top | item 33411121

(no title)

voigt | 3 years ago

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?

discuss

order

mturmon|3 years ago

John Graham-Cumming (who's in this thread) wrote this book which I recommend:

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

> 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.

SoftTalker|3 years ago

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.

_wldu|3 years ago

I do this too. I can do anything with vim, Go and a Makefile.

coldpie|3 years ago

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.

kazinator|3 years ago

I recommend reading the GNU Make manual in its entirety.