3 ms·
x: y z x depends on y (meaning, if x is missing, or is a file that is older than y where y is also a file, it needs to be recreated). z is how to recr
by barrkel 12y ago
x: y
z
x depends on y (meaning, if x is missing, or is a file that is older than y where y is also a file, it needs to be recreated).
z is how to recreate x.
Makefiles are programs that construct a dependency graph.
The rest of makefile syntax is mostly about ways of generating variants of the above without being overly verbose, or reducing gruntwork when e.g. adding new header includes to existing source files. But this is the heart of it.
Root the dependency graph somewhere, and as long as the dependencies are complete and correct, the minimal set of commands, and potential parallelism, can be calculated.