4 ms·
>I want to see an end to Make in my lifetime Why? What's wrong with Make?
by ancarda 6y ago
>I want to see an end to Make in my lifetime
Why? What's wrong with Make?
- asveikau 6y agoMake is actually pretty amazing for its simplicity, longevity, how it gets so much of the job done without doing very much. Yes there are pitfalls and caveats, good uses and bad, but the balance reached between simplicity and ability to be productive and get you most of the way is amazing. 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.
- eddieh 6y agoExactly this! Make is the worst build system, except for all the others.
- rhn_mk1 6y agoTabs having a different meaning than spaces. Literally the only reason I'm not using it. 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.
- dima55 6y agoOf all the things to complain about, this one is just silly. You can use ; instead of TAB. There. Problem solved? Do you like Make now?
- rhn_mk1 6y agoThanks for the tip! I had no idea about this. 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.
- dima55 6y agoYep. Plenty of real things to argue about.
- eddieh 6y agoMake has phony targets for when you don't want a file. Any update criterion can be delegate to a script or a helper tool such as with latexmk for building LaTeX documents with Make.
- rhn_mk1 6y agoThe phony target is a problem because it can't be an input to another stage of the process. 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-goals/notes.txt;h=b03d9e5ea1062869c642a1850a09340ea1575116;hb=HEAD http://git.annexia.org/?p=libguestfs-talks.git;a=blob;f=2020...
- ur-whale 6y ago>Why? What's wrong with Make? 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...
- nrclark 6y ago> 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. 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.
- ur-whale 6y ago> . Grouped targets were added in the most recent release 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.