I have read about 1/3 of the GNU Make manual, do you guys know of any resources to really learn the Art of using Make.
Ideally, there might be some examples where two ways of doing something are possible, and the author explains which method he chose and why.
I am primarily using Make not to build C/C++ programs but to operate a processing pipeline for data analysis.
":=" is for defining simply expanded variable, which is expanded once and for all.
Basics of Variable References To substitute a variable's value, write a dollar sign followed by the name of the variable in parentheses or braces: either `$(foo)' or `${foo}' is a valid reference to the variable foo .
?= indicates to set the KDIR variable only if it's not set/doesn't have a value. For example: KDIR ?= "foo" KDIR ?= "bar" test: echo $(KDIR) Would print "foo"
Managing Projects with GNU Make, by Robert Mecklenburg, is the best I've come across. Plus, it's an O'Reilly Open Book, so O'Reilly gives away free PDFs of it on their website. Read it linearly, and start from the beginning (even if you think you already know the basics of GNU Make).
John Graham-Cumming has written a book called GNU Make Unleashed which looks promising, although I have not read it yet. http://www.lulu.com/product/paperback/gnu-make-unleashed/2937580 and http://jgc.org/
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With