I'm trying to understand why so many people seems to hate make.
I hate building system that don't use Makefile, or that use but don't respect the variable convention. It makes really quite annoying to do things like changing allocation library, add compilers flags, etc.
Yeah. As far as I can tell, most people complaining about Make, and building its replacements haven't figured out how to use Make, or bothered to read the manual. It's really not that complicated...
100% agreed. Half these comments make no sense and demonstrate a real ignorance of make. Please everyone read the manual and judge make for make, not autotools...
Yeah, I am currently learning make, and I feel kind of confused by a lot of comments: Either I really don't understand make, yet, or people really didn't understand that make is for building files from other files and handling the dependencies.
The problem is that as soon as you support multiple platforms, the exact same action of "building files from other files" can look fairly different. Since if you use make you want your readme to be: "cd folder; make -j" and since you don't want to write multiple entirely distinct set of makefiles for different platforms, this turns the makefiles in a hellish mess of special characters.
And all that just for executing a set of tasks in a DAG much slower than ninja
I usually reach for make because it’s simple to get a simple project built but once I start throwing stuff like source code generators at it then I have to spend a bunch of time getting the dependency tree right so I’m not chasing bugs I’ve already fixed but didn’t get recompiled. Or recompile the whole thing when I change some trivial thing.
Still, for the stuff I do, it gets the job done without too much trouble.
while make is simple, autotools is really complicated. However it's also very powerful and I've been in situations where cmake couldn't help me but autotools had solved the problem already.
As a build system make wasn't really designed to handle stuff like partial rebuilds, caching, or distributed building. Modern build systems like bazel are just orders and orders of magnitude faster and better for complex projects.
The whole point of make is to handle partial rebuilds. It is why it was invented in the first place.
"Make originated with a visit from Steve Johnson (author of yacc, etc.), storming into my office, cursing the Fates that had caused him to waste a morning debugging a correct program (bug had been fixed, file hadn't been compiled, cc *.o was therefore unaffected). As I had spent a part of the previous evening coping with the same disaster on a project I was working on, the idea of a tool to solve it came up. It began with an elaborate idea of a dependency analyzer, boiled down to something much simpler, and turned into Make that weekend."
If they had rebuilt the whole project, make would not have been needed, However because they wanted to do partial builds and the manual process had downsides make was invented.
I love make. What I hate are the default implicit rules. Compiling C from an empty makefile is cool and all, but I resent having implicit build rules for rcs, modula2, texinfo, lex for ratfor (a "preprocessor for fortran 66" tf?)... talk about surprise rules when one of your files is a .p, .r or .f file.
This isn't at all true, in my experience. If it's true for you, please consider that your issues are about autotools and not Make, and direct your complaints in that direction.
I use Make for all kinds of general-purpose build automation tasks, and as kind of a top-level catch all. No Autotools to be found in them (except maybe if called from some recipe).
I hate building system that don't use Makefile, or that use but don't respect the variable convention. It makes really quite annoying to do things like changing allocation library, add compilers flags, etc.