The GNU Make Book

The GNU Make Book

by John Graham-Cumming
The GNU Make Book

The GNU Make Book

by John Graham-Cumming

eBook

$20.99 

Available on Compatible NOOK devices, the free NOOK App and in My Digital Library.
WANT A NOOK?  Explore Now

Related collections and offers


Overview

GNU make is the most widely used build automation tool, but it can be challenging to master and its terse language can be tough to parse for even experienced programmers. Those who run into difficulties face a long, involved struggle, often leaving unsolved problems behind and GNU make's vast potential untapped.

The GNU Make Book demystifies GNU make and shows you how to use its best features. You'll find a fast, thorough rundown of the basics of variables, rules, targets, and makefiles. Learn how to fix wastefully long build times and other common problems, and gain insight into more advanced capabilities, such as complex pattern rules. With this utterly pragmatic manual and cookbook, you'll make rapid progress toward becoming a more effective user.

You'll also learn how to:
–Master user-defined functions, variables, and path handling
–Weigh the pitfalls and advantages of GNU make parallelization
–Handle automatic dependency generation, rebuilding, and non-recursive make
–Modify the GNU make source and take advantage of the GNU Make Standard Library
–Create makefile assertions and debug makefiles

GNU make is known for being tricky to use, but it doesn't have to be. If you’re looking for a deeper understanding of this indispensable tool, you'll find The GNU Make Book to be an indispensable guide.

Product Details

ISBN-13: 9781593276836
Publisher: No Starch Press
Publication date: 04/01/2015
Sold by: Penguin Random House Publisher Services
Format: eBook
Pages: 256
File size: 1 MB

About the Author

John Graham-Cumming is a longtime GNU make expert. He wrote the acclaimed machine learning–based POPFile email filter and successfully petitioned the British government to apologize for its treatment of Alan Turing. He holds a doctorate in computer security from Oxford University and works at CloudFlare.

Table of Contents

About the Author;
About the Technical Reviewer;
Preface;
Chapter 1: The Basics Revisited;
1.1 Getting Environment Variables into GNU make;
1.2 Setting Variables from Outside the Makefile;
1.3 The Environment Used by Commands;
1.4 The $(shell) Environment;
1.5 Target-Specific and Pattern-Specific Variables;
1.6 Version Checking;
1.7 Using Boolean Values;
1.8 Logical Operations Using Boolean Values;
1.9 Command Detection;
1.10 Delayed Variable Assignment;
1.11 Simple List Manipulation;
1.12 User-Defined Functions;
1.13 Recent GNU make Versions: 3.81, 3.82, and 4.0;
Chapter 2: Makefile Debugging;
2.1 Printing the Value of a Makefile Variable;
2.2 Dumping Every Makefile Variable;
2.3 Tracing Variable Values;
2.4 Tracing Rule Execution;
2.5 Makefile Assertions;
2.6 An Interactive GNU make Debugger;
2.7 Dynamic Breakpoints in the GNU make Debugger;
2.8 An Introduction to remake;
Chapter 3: Building and Rebuilding;
3.1 Rebuilding When CPPFLAGS Changes;
3.2 Rebuilding When a File’s Checksum Changes;
3.3 Automatic Dependency Generation;
3.4 Atomic Rules in GNU make;
3.5 Painless Non-recursive make;
Chapter 4: Pitfalls and Problems;
4.1 GNU make Gotcha: ifndef and ?=;
4.2 $(shell) and := Go Together;
4.3 $(eval) and Variable Caching;
4.4 The Trouble with Hidden Targets;
4.5 GNU make’s Escaping Rules;
4.6 The Trouble with $(wildcard);
4.7 Making Directories;
4.8 GNU make Meets Filenames with Spaces;
4.9 Path Handling;
4.10 Usman’s Law;
4.11 Pitfalls and Benefits of GNU make Parallelization;
4.12 Making $(wildcard) Recursive;
4.13 Which Makefile Am I In?;
Chapter 5: Pushing the Envelope;
5.1 Doing Arithmetic;
5.2 Making an XML Bill of Materials;
5.3 Advanced User-Defined Functions;
5.4 GNU make 4.0 Loadable Objects;
5.5 Using Guile in GNU make;
5.6 Self-Documenting Makefiles;
Chapter 6: The GNU Make Standard Library;
6.1 Importing the GMSL;
6.2 Calling a GMSL Function;
6.3 Checking the GMSL Version;
6.4 Example Real-World GMSL Use;
6.5 GMSL Reference;
Updates;

From the B&N Reads Blog

Customer Reviews