92 points · by chmaynard · 4y ago · 54 comments
I just noticed he did some screencasts that make up a course:
https://cloudflare.tv/shows/the-gnu-make-course
And here's links to a bunch of blog posts, from which I learned a lot:
https://blog.jgc.org/2013/02/updated-list-of-my-gnu-make-art...
Of course, the manual itself is really very good!
I actually don't agree with this. It's really good as a "user guide", but it's not the best as a "reference manual". It does not always clearly define terms, it freely mixes technical terms and hand-waving language, the writing style tends toward an "expository prose" that makes it hard to find specific pieces of information. In general, it could do with some reorganization using the Diátaxis principles: https://diataxis.fr/
It does have pretty good indices, and the quick reference is very helpful. However the HTML version (can't speak for the others) needs a lot more anchors, to make it easy to cross-link to individual elements, rather than just to chapter headings.
I'm very comfortable with the manual now, when I need to look something up, but that's because I've spent years looking things up in it, so I have a fairly good idea where to find things. Even so, it's sometimes confusing, e.g. where to find the definition of automatic variables like `$@`, `$^` and the like? When I started learning Make I remember it being infuriatingly hard to find the entry about a topic of interest.
While the manual is great (as are most of GNU's major works!) compared to most of the software ecosystem [1], you're quite right that it can still improve a lot.
[1] It's kind of amazing how even a company like Apple can have some pretty underwhelming documentation, see today's post about ExtensionKit https://news.ycombinator.com/item?id=33409558
My last workplace was very Makefile heavy and I used that as an excuse to read it. 10/10, would recommend/do it again.
[small plug] I've just done a presentation at $Work saying just that:
> By using Makefiles in your repos, you document and automate common "build" tasks.[1]
https://www.oreilly.com/library/view/managing-projects-with/...
O'Reilly is free via my public library. Yours might have the same
Even Debian 9 had Make 4.1. You either have a very old OS or are keeping it around for some reason.
unfortunate situation.
I'll never understand why other developers like Macs. I had to use one for work and it was horrible. I can't imagine paying 2 grand for that!
No need to go back over the GPLv2 vs. GPLv3 situation with macOS. There are dozens of threads on HN about it.
However, it’s easy to solve in any number of ways; I’d recommend installing Homebrew [1] and using it to install make.
BTW, Homebrew has make 4.4 ready to go; I just installed it [2].
[1]: https://brew.sh
I did not just check one of our servers.
:(
In particular, 3.82 changed how precedence between pattern rules works.
Well, I'll use it to compile make on elf/linux.
* WARNING: Deprecation!
The following systems are deprecated in this release:
- OS/2 (EMX)
- AmigaOS
- Xenix
- CrayDoes that include only Xenix proper (last release '89), or later SCO derivatives as well (SCO UNIX/OpenServer)? Asking purely out of curiosity.
If this wasn’t LWN, I’d call it “blogspam”, but I know LWN does this to have their own archive which they can link to. But this does not mean that there’s any good reason for anyone outside of LWN to use LWN’s copy of the announcement, unless the original link had gone stale or something.
Heck, most LKML posts get posted as lkml.iu.edu or lwn.net; rather than lore.kernel.org or lkml.org.
> Previously each target in a explicit grouped target rule was considered individually: if the targets needed by the build were not out of date the recipe was not run even if other targets in the group were out of date. Now if any of the grouped targets are needed by the build, then if any of the grouped targets are out of date the recipe is run and all targets in the group are considered updated.
This is a welcome change! I always thought this was how Make worked anyway, until I tried it and it didn't. Unfortunately none of my coworkers using stock Make on their Macs can benefit, but I can also insist that they install v4.4 since they all have Homebrew already.
> .WAIT
What's a use case for this? Is the idea that you can use it for explicitly sequencing build order of dependencies, without making them actually dependent on each other? Why would you want that?
> let, intcmp
The Turing Tarpit grows... do we have a Scheme interpreter in Make yet?
> What's a use case for this? Is the idea that you can use it for explicitly sequencing build order of dependencies, without making them actually dependent on each other? Why would you want that?
A use-case that I've wanted this for for a long time is to have build phases. `make install` should build things if necessary; but it'd also be great to have it build everything before it installs anything.
To introduce concurrency unsafety by deadlocks.