I’m using Make for years now but usually only for very basic things. I always feel like it can do much more.
Are there any good docs/books/articles about advanced usage of make?
> 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 a big fan of using a standalone Makefile to manage the build of a project rather than having the IDE do it by "magic." Makefiles can also be used to handle a lot of repetitive processes or tasks that have to happen in a certain order based on dependencies -- they aren't limited to running compilers.
One thing that's helpful is to study how real-world projects use Make. Try to understand them, and look up pieces you're missing from the reference material. You'll probably end up having to dive into autotools, too, for some of it.
mturmon|3 years ago
https://nostarch.com/gnumake
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!
nerdponx|3 years ago
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.
treffer|3 years ago
My last workplace was very Makefile heavy and I used that as an excuse to read it. 10/10, would recommend/do it again.
SoftTalker|3 years ago
FrenchyJiby|3 years ago
[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]
[1]: https://jiby.tech/presentation/makefiles/makefiles
_wldu|3 years ago
elchief|3 years ago
https://www.oreilly.com/library/view/managing-projects-with/...
O'Reilly is free via my public library. Yours might have the same
coldpie|3 years ago
kazinator|3 years ago