The GNU Make Book is intended for people who already have an understanding of GNU Make, what it is, and the basics of how and why someone would use it. The reader is assumed to know enough about programming and source code, about compiling and creating software executables to not need an introduction. The book begins by talking about setting environment variables in your makefile. If you know what this means, you will likely benefit from the book. If you don’t, you aren’t ready for this book.
The GNU Make Book has six clear chapters, arranged in a logical order:
- The Basics Revisited covers topics like variables and version checking in your makefile.
- Makefile Debugging helps you find problems with tips and tricks like variable tracing and dynamic breakpoints.
- Building and Rebuilding uses example makefiles to demonstrate things like automatic dependency generation and rebuilding under specific circumstances.
- Pitfalls and Problems clarifies many troublesome aspects of makefiles and helps you avoid common difficulties.
- Pushing the Envelope takes you beyond the typical use of make with a few cool ideas.
- The GNU Make Standard Library works as a reference for an open source project started by the book’s author, John Graham-Cumming, to collect and provide common functions that makefile authors “end up writing over and over again.”
I think this book is fantastic. It does have one weakness that, once addressed, would be likely to broaden its appeal. Many people who want or need to learn to use GNU make more effectively do not yet have the foundational knowledge necessary for reading or benefiting from this book. That could be remedied in a 15-20 page introductory chapter covering topics like “what is make?” and “how is make typically used?” The descriptions could be short, but would set the context for the rest of the book and ease the nervous reader in. Perhaps starting with something like, “GNU make is a tool that enables you to automate the generation of program executables from program source code” would be useful and could be followed by, “This is typically accomplished by writing a Makefile, which includes a list of instructions for make to use as it does its work.”