Sorry, like I said, I don't think I really understand make.
I mean, I can understand that it's doing some checks to determine what commands to emit, but doesn't it all end up falling out as pretty much a straight "Yes? Do this. No? Do that. Do this and then this and then this. Do all these at the same time."
That's my mental model at the moment anyway.
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.
If we didn't mind waiting for hours each time we build, then of course, a shell script that does `rm -rf target` then assembles everything from scratch would be significantly more straightforward and readable.