Make runs on Windows, OS X, Linux and Android.
How is a Makefile quite limited?
• make(1) has a hard time rebuilding target files when source files have changed. The problem is that users have to declare the dependencies of a target before the build, but due to file search paths, it can be that dependencies are only known after building a target. To know about all dependencies, make(1) would have to build any target at least twice.
• make(1) by default does not rebuild a target when its build rules change. While this seems really weird to me, it seems to be a consequence of having a single makefile. When a build rule is changed, the makefile changes. So should all targets depend on the makefile implicitly? One could argue that they should – but then each change in a makefile would rebuild all targets.
• make(1) can not handle non-existence dependencies. Imagine a file foo.h being searched for by a compiler in directories bar and baz (in that order). If the header file baz/foo.h is found, then bar/foo.h should be considered a non-existence dependency: If at any future point in time it exists, the target should be rebuilt.
These problems are all solved by DJB's redo approach, which I implemented in a few hundred lines of Bourne shell (/bin/sh): http://news.dieweltistgarnichtso.net/bin/redo-sh.html
The compiler may know paths, the linker may know paths, the shell might, make might, or you can supply them.
I've seen and used nested Makefiles before.
These things aren't really make things. If I use tcc, Haskell or Go in my Makefile, then they mightn't apply.
If you can write it in Bash, you can integrate it into your Makefile.
How would you solve all three problems I listed using make(1)?
If I use pip as part of my buildchain, then it has a series of places it can lookup, or you can supply one. Same with npm, cargo, and even Go.
If instead, I use a tool that has dynamic lookup, then it will only look in those places after the event.
So, if I used make to send a command like:
$(echo 'require "foo"' > bar.lua)
Then it can lookup those when the lua file is called, later in the process.So how would this be a limitation of make itself? The limitation only exists in what you call with make... Which could be anything.
COBOL already did what C does, why do you need C?
Assembler is Turing complete.
How is assembler quite limited compared to PHP (or C or COBOL)?
That was not my argument.
My argument, was calling make "quite limited".
How would you call make limited? The syntax is expressive, and so is the macro access.
I never said I wanted to replace or not replace make.