I feel that when I hear somebody say they don't like make, usually they misunderstand this, or they think somebody's bad experiences with makefiles is somehow representative of the capability of the tool.
One person created make in a weekend in 1976. We are still talking about it. Most humans and most software will never achieve this.
The list is long, but here's a random sample:
- If you have an atomic step that produces multiple targets, it confuses make, and encoding the fact properly in the Makefile is *really* not straightforward.
- tabs are indeed a pain
- make's DSL (the part that pre-processes the Makefile before feeding it to whatever shell you want) is really ugly. In particular, using '$' in the commands is a disaster coz make will chew on those before passing them to the shell.
- Oh yeah, and $ABC is in fact understood as "evaluate variable A" and concatenate with the string "BC". Ugh.
- managing "generated" dependencies (.e.g. includes) is a pain, especially if you try to have make manage the generating step
- managing dependencies on the actual content of the Makefile itself is a pain (as in: if I change the Makefile, what should be rebuilt?)
- Make has no (or rather very little) introspection capabilities and even less self-introspection capabilities. If you want a proof of that fact, try to build a graphviz graph of the dependencies, or better: know what commands will be executed if you change a specific file.
- The many warts an bags on the side that make grew over the years (.PHONY anyone?)
- Recursive Makefiles are a nightmare and make is simply not equipped to deal with them
- etc...Make does have a lot of warts, but this isn’t one of them any more. Grouped targets were added in the most recent release of GNU Make, and they address exactly this problem.
Re: your other points, many of them boil down to “the syntax is weird”. I agree 100%, and also it’s not so tough once you get used to it. I use GNU Make for tons of things, and I like it a lot.
Very good to know, thank you (that's indeed in release 4.3 IIUC)
> e: your other points, many of them boil down to “the syntax is weird”.
I don't think lack of introspection or recursive Makfiles or generated deps. falls in the "syntax is weird" column. Weird syntax I can leave with. Lack or very difficult to use essential features are a different story.
Yes, I realize GNU Make has a config option to fix this. That doesn't seem to be widely adopted.
On a second thought, the shellisms it borrows are also annoying. POSIX shell syntax needs to die on its own right.
I reserve the right to be fully satisfied only after the majority of random Makefiles I find on the net or emitted from build systems will use that convention.
To add another thing to the pot, let me repeat some things already mentioned or implied:
Make is too focused on files. Not every input is a file, and not every artifact is supposed to be a file either.
Make doesn't allow choosing the update criterion per file. Sometimes it's the has, sometimes the timestamp, and sometimes the parsed AST of the source code that should trigger a rebuild when changed.
It's a good thing that the update criterion can be delegated, but this should really be a thing that has a wide range of builtin options, both for ergonomics, and for avoidng mistakes. "Goals" comes to mind: http://git.annexia.org/?p=libguestfs-talks.git;a=blob;f=2020...
Why? What's wrong with Make?