News for hackers. Stuff that matters.
Re:Falsehoods programmers believe about build systems (2012) by ancarda on Saturday July 18, 2020 @03:02PM (#23883869)
>I want to see an end to Make in my lifetime

Why? What's wrong with Make?

Re:Falsehoods programmers believe about build systems (2012) by asveikau on Saturday July 18, 2020 @03:21PM (#23884030)
Make 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.

Re:Falsehoods programmers believe about build systems (2012) by eddieh on Saturday July 18, 2020 @03:37PM (#23884168)
Exactly this! Make is the worst build system, except for all the others.
Re:Falsehoods programmers believe about build systems (2012) by ur-whale on Sunday July 19, 2020 @10:09AM (#23889475)
>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...
Re:Falsehoods programmers believe about build systems (2012) by nrclark on Sunday July 19, 2020 @10:58AM (#23889784)
> 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.

Re:Falsehoods programmers believe about build systems (2012) by ur-whale on Sunday July 19, 2020 @05:01PM (#23892399)
> . 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.

Re:Falsehoods programmers believe about build systems (2012) by rhn_mk1 on Saturday July 18, 2020 @04:05PM (#23884391)
Tabs 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.

Re:Falsehoods programmers believe about build systems (2012) by dima55 on Saturday July 18, 2020 @04:08PM (#23884419)
Of 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?
Re:Falsehoods programmers believe about build systems (2012) by rhn_mk1 on Saturday July 18, 2020 @04:15PM (#23884475)
Thanks 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.

Re:Falsehoods programmers believe about build systems (2012) by eddieh on Saturday July 18, 2020 @04:45PM (#23884693)
Make 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.
Re:Falsehoods programmers believe about build systems (2012) by rhn_mk1 on Sunday July 19, 2020 @01:50AM (#23887309)
The 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...

Re:Falsehoods programmers believe about build systems (2012) by dima55 on Saturday July 18, 2020 @04:45PM (#23884687)
Yep. Plenty of real things to argue about.