am 16. November 2007
Which unix administrator has not typed "./configure; make; make install" many times to magically compile source code. No need to know how to invoke the compiler, what libraries must be linked etc. It simply works, thanks to make and the makefile.
Ever wondered how to write a makefile to automate source code compilations or other tasks? I did, wanting to provide an easy way for my colleagues to update and tranlate my LaTeX documentations when they make changes to a system and to also automatically update the central documentation repository with the new version. I also want to build an easier to handle system for sorting and processing my vacation photos, etc.
In this book, Robert Mecklenburg introduces the reader in a well chosen sequence of steps to make and the art of writing makefiles. Throughout the book he uses samples, starting out simple and refining them as new concepts are explained. Some clever hacks and tricks are shown and explained as well.
Even though most samples handle compiling C or Java code, the explanations are clear enough to easily apply the techniques to other uses as well. Part one explains rules, variables, macros, functions and commands, while part two goes into advanced and specialized topics like managing large projects, writing portable makefiles, samples for handling C, C++ and Java, performance and debugging.
I did not understand everything (and don't need to), but rather than feeling intimidated by makefiles, I now believe to be able to write simple and moderately involved makefiles for the uses I had in mind.