4 ms·
I learned Make, but it is just a terrible tool: A) It is a 2-phase build system (read DAG, traverse DAG) whereas code generation requires an N-phase build syst
by Peaker 12y ago
I learned Make, but it is just a terrible tool:
A) It is a 2-phase build system (read DAG, traverse DAG) whereas code generation requires an N-phase build system (build some files, detect more dependencies, build more files, ...)
B) It has no way to express dependencies on the inexistence of files (#include "foo.h" will behave differently if the first search directory in the include path starts also featuring a "foo.h", but this cannot be specified), necessarily meaning that incremental build become incorrect in various circumstances
C) It does mtime-newer check, rather than mtime-equal check. This has numerous problems with various file systems.
D) It does not check the mtime did not change during a build, effectively allowing the build tree to be poisoned with an incorrect build result. For example, edit foo.c while foo.o is being compiled from it. foo.o can be correct w.r.t old foo.c, but its mtime suggests it is newer than the current foo.c. All incremental builds thus become incorrect.
In short, make doesn't try hard enough to be a correct build system, and it is also inflexible.
This is why I wrote `buildsome`[1], where I resolve all these issues and more.
buildsome is only tailored for our needs at the moment, so can only build on Linux, and not on OS X or Windows.
[1] https://github.com/Elastilotem/buildsome https://github.com/Elastilotem/buildsome