I played around with this a few years back when looking at build tools. strace is ungodly slow, and I wouldn't recommend using this for anything real. When I looked into why, it's basically the time it takes to print and read from strace - printing to stdout every time there is a syscall is obviously very slow.<p>Instead you can use tup, though someone mentioned it now requires Fuse, which obviously isn't good. So instead you can use an LD_PRELOAD to record all the file accesses, which is what I think tup used to do.<p>There is also some filesystem thing added to git that let's introspect file access, though I don't recall the details.<p>That said, I think memoize is the first use of this technique (record actual file accesses dynamically for dependency tracking), which is utterly genius. I worked with Bill McCloskey who wrote it, and he is an incredibly smart dude. He did a lot of work on making Firefox's GC better over the last few years.
See also fabricate, a script inspired by memorize that works on Windows:<p><a href="https://code.google.com/p/fabricate/" rel="nofollow">https://code.google.com/p/fabricate/</a><p>I tried to contribute OS X support years ago but was too lazy to spend the time to polish it - sorry!<p>Neither tool supports any sort of parallelism, which caused me to eventually give up on them. (It is possible in theory! Though in the worst case it requires killing compiler invocations and rerunning them.)<p>Edit: Apparently fabricate does support parallel execution now, which is neat, but only with explicit markers, which I expect is somewhat detrimental to the magic feel of these tools... maybe I should try it. In the previous parenthetical I meant automatically detecting what can be run in parallel.
This has nothing to do with Memoization [1] that Python already have out of the box through `functools.lru_cache` [2]<p>This is just a very bad naming choice for this library that seems to be an OK alternative to Make.<p>[1] <a href="https://en.wikipedia.org/wiki/Memoization" rel="nofollow">https://en.wikipedia.org/wiki/Memoization</a><p>[2] <a href="https://docs.python.org/3/library/functools.html#functools.lru_cache" rel="nofollow">https://docs.python.org/3/library/functools.html#functools.l...</a>
I believe tup [1] uses a similar technique for compile dependency tracking.<p>[1] <a href="http://gittup.org/tup/ex_dependencies.html" rel="nofollow">http://gittup.org/tup/ex_dependencies.html</a>
If you're interested in a make replacement, check out redo (designed by djb):<p><a href="http://cr.yp.to/redo.html" rel="nofollow">http://cr.yp.to/redo.html</a><p><a href="https://github.com/apenwarr/redo" rel="nofollow">https://github.com/apenwarr/redo</a>
Nice, but a problem with this approach is that strace is not "re-entrant". That is you can't strace a program that uses strace (or more precisely, the ptrace syscall).
I believe MSBuild is doing something similar (but on Windows) - <a href="https://github.com/Microsoft/msbuild/tree/master/src/Utilities/TrackedDependencies" rel="nofollow">https://github.com/Microsoft/msbuild/tree/master/src/Utiliti...</a>
Every few years someone tries to reinvent make, and they usually end up with some unholy mess that complicates build systems or causes maintenance nightmares, and is never quite as good.<p>It turns out that make's syntax is actually quite simple and appropriate if you take a day or so to learn it properly. It's such a fantastic tool that if its syntax was really that problematic, someone would have created a new syntax front-end to GNU make by now. The fact that they haven't speaks volumes: by the time you learn enough to be able to do it, you realise you can't really come up with anything better.
See also these things. But memoize.py looks more flexible; building anything.<p><pre><code> ccache - https://ccache.samba.org
fastbuild - http://fastbuild.org
</code></pre>
Also for the besodden remaining ClearCase users, they have nice feature which seems rarely spoken of these days: clearmake and wink-ins.