A Tutorial on Portable Makefiles
An issue I have with make is that it can not handle non-existence dependencies. DJB noted this in 2003 [1]. To quote myself on this [2]:<p>> Especially when using C or C++, often target files depend on nonexistent files as well, meaning that a target file should be rebuilt when a previosly nonexistent file is created: If the preprocessor includes /usr/include/stdio.h because it could not find /usr/local/include/stdio.h, the creation of the latter file should trigger a rebuild.<p>I did some research on the topic using the repository of the game Liberation Circuit [3] and my own redo implementation [4] … it turns out that a typical project in C or C++ has lots of non-existence dependencies. How do make users handle non-existence dependencies – except for always calling “make clean”?<p>[1] <a href="http://cr.yp.to/redo/honest-nonfile.html" rel="nofollow">http://cr.yp.to/redo/honest-nonfile.html</a><p>[2] <a href="http://news.dieweltistgarnichtso.net/posts/redo-gcc-automatic-dependencies.html" rel="nofollow">http://news.dieweltistgarnichtso.net/posts/redo-gcc-automati...</a><p>[3] <a href="https://github.com/linleyh/liberation-circuit" rel="nofollow">https://github.com/linleyh/liberation-circuit</a><p>[4] <a href="http://news.dieweltistgarnichtso.net/bin/redo-sh.html" rel="nofollow">http://news.dieweltistgarnichtso.net/bin/redo-sh.html</a> (redo-dot gives a graph of dependencies and non-existence dependencies)