Book description
GNU Make Book is a practical, thorough guide to GNU Make basics, solutions, and advanced uses.
Publisher resources
Table of contents
- The GNU Make Book
- About the Author
- About the Technical Reviewer
- Preface
-
1. The Basics Revisited
- Getting Environment Variables into GNU make
- Setting Variables from Outside the Makefile
- The Environment Used by Commands
- The $(shell) Environment
- Target-Specific and Pattern-Specific Variables
- Version Checking
- Using Boolean Values
- Logical Operations Using Boolean Values
- Command Detection
- Delayed Variable Assignment
- Simple List Manipulation
- User-Defined Functions
- Recent GNU make Versions: 3.81, 3.82, and 4.0
- 2. Makefile Debugging
- 3. Building and Rebuilding
-
4. Pitfalls and Problems
- GNU make Gotcha: ifndef and ?=
- $(shell) and := Go Together
- $(eval) and Variable Caching
- The Trouble with Hidden Targets
- GNU make’s Escaping Rules
- The Trouble with $(wildcard)
-
Making Directories
- An Example Makefile
- What Not to Do
- Solution 1: Build the Directory When the Makefile Is Parsed
- Solution 2: Build the Directory When all Is Built
- Solution 3: Use a Directory Marker File
- Solution 4: Use an Order-Only Prerequisite to Build the Directory
- Solution 5: Use Pattern Rules, Second Expansion, and a Marker File
- Solution 6: Make the Directory in Line
- GNU make Meets Filenames with Spaces
- Path Handling
- Usman’s Law
- Pitfalls and Benefits of GNU make Parallelization
- Making $(wildcard) Recursive
- Which Makefile Am I In?
- 5. Pushing the Envelope
-
6. The GNU Make Standard Library
- Importing the GMSL
- Calling a GMSL Function
- Checking the GMSL Version
- Example Real-World GMSL Use
-
GMSL Reference
- Logical Operators
- Integer Arithmetic Functions
- Integer Comparison Functions
- Miscellaneous Integer Functions
- List Manipulation Functions
- String Manipulation Functions
- Set Manipulation Functions
- Associative Arrays
- Named Stacks
- Function Memoization
- Miscellaneous and Debugging Facilities
- Environment Variables
- A. Updates
- Index
- Copyright
Product information
- Title: The GNU Make Book
- Author(s):
- Release date: April 2015
- Publisher(s): No Starch Press
- ISBN: 9781593276492
You might also like
book
Linux Kernel Development, Third Edition
Linux Kernel Development details the design and implementation of the Linux kernel, presenting the content in …
book
Modern CMake for C++
Write comprehensive, professional-standard CMake projects and ensure the quality and simplicity of your solutions Purchase of …
book
Practical Vim, 2nd Edition
Vim is a fast and efficient text editor that will make you a faster and more …
book
Advanced C and C++ Compiling
Learning how to write C/C++ code is only the first step. To be a serious programmer, …