O'Reilly logo

Managing Projects with GNU Make, 3rd Edition by Robert Mecklenburg

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Index

A note on the digital index

A link in an index entry is displayed as the section title in which that entry appears. Because some sections have multiple index markers, it is not unusual for an entry to have several links to the same section. Clicking on any link will take you directly to the place in the text in which the marker appears.

Symbols

$% automatic variable, Empty Targets
$* automatic variables, Automatic Variables
$+ automatic variable, Automatic Variables
$< automatic variable, Empty Targets
$? automatic variable, Empty Targets
$@ automatic variable, Empty Targets
$^ automatic variable, Automatic Variables
% (percent) character, pattern rules, Pattern Rules
( ) (parentheses) in variables, Variables and Macros
* (asterisk) wildcard, Explicit Rules
+ (plus) command modifier, Command Modifiers
+= (append) operator, Other Types of Assignment
- (dash) command prefix, Command Modifiers
:= operator, What Variables Are Used For
= operator, Variables and Macros
? (question mark) wildcard, Explicit Rules
?= (conditional variable assignment) operator, Variable Types
?= operator, environment variables, Where Variables Come From
@ command prefix, echo and, Continuing Long Commands
@ sign, performance and, Simple Variables Versus Recursive
[ ] (brackets) wildcard, Explicit Rules
^ in patterns, Explicit Rules
{ } (curly braces) in variables, Variables and Macros
~ (tilde) wildcard, Explicit Rules

A

add-manifest function, jars, Managing Jars
addprefix function, Filename Functions
addsuffix function, Filename Functions
all target, Phony Targets
ALL_TREES variable, Supporting Multiple Binary Trees
--always-make option, Running make
Ant (Java), Java
build files, Java
mkdir program, Ant
portability, Ant
tasks, Ant
append operator (+=), Other Types of Assignment
ar command, archive libraries, Automatic Dependency Generation
archive libraries, Automatic Dependency Generation
archive members, automatic variables and, Empty Targets
arguments, patterns as built-in functions, Built-in Functions
arithmetic, performing with make, Data Structures
arrays, files array and command-line limits, Command-Line Limits
assert function, Flow Control
automake tool, Working with Nonportable Tools
automatic variables, Empty Targets, Where Variables Come From
archive members, Empty Targets
empty targets and, Empty Targets
prerequisites, Empty Targets
targets and, Empty Targets
VPATH and, Finding Files with VPATH and vpath
vpath and, Finding Files with VPATH and vpath

B

basename function, Filename Functions
bash shell, benchmarking and, Benchmarking
benchmarking, Improving the Performance of make
bash shell, Benchmarking
Cygwin and, Benchmarking
subst function calls and, Benchmarking
variable assignment speed, Benchmarking
binary trees
ALL_TREES variables, Supporting Multiple Binary Trees
filesystem layout and, Requirements
multiple, makedepend Programs
searches, Supporting Multiple Binary Trees
separate, Requirements
source tree separation, C and C++
book makefile, Example Makefiles
m4 macros and, Managing Examples
output generation, XML Preprocessing
source validation, Generating Output
XML preprocessing, Managing Examples
bottlenecks, Benchmarking
dependencies and, Identifying and Handling Bottlenecks
build files, XML, Java
build targets, recursive make and, Passing Variables
build-classpath function, Setting CLASSPATH
builds
automation, Filesystem Layout
Linux kernel makefile, Command-Line Options
testing, Filesystem Layout
built-in functions, User-Defined Functions
filenames and, Filename Functions
flow control and, Filename Functions
patterns as arguments, Built-in Functions
string functions, Built-in Functions
syntax, User-Defined Functions
built-in rules, Pattern Rules
implicit rules, Suffix Rules
variables, Working with Implicit Rules
(see also rules)

C

-C directory option, Running make
call function, User-Defined Functions
calling functions, wildcards and, Explicit Rules
canned sequences (see macros)
case-sensitivity in variables, Variables and Macros
chaining rules, Pattern Rules
intermediate files and, Working with Implicit Rules
character classes, wildcards and, Explicit Rules
characters in variables, Variables and Macros
check target, Phony Targets
circular references, libraries, Using Libraries as Prerequisites
circularities, libraries, Using Libraries as Prerequisites
CLASSPATH variable, Java makefile, Compiling with Dependencies
clean target, Phony Targets
code
debugging
defensive coding, Good Coding Practices
writing for, The --debug Option
duplicating, recursive make and, Cross-Makefile Dependencies
command scripts, Basic Makefile Syntax
error messages, commands commence before first target
evaluation, Command Environment
parsing and, Basic Makefile Syntax, Parsing Commands
(see also scripts)
command-line
debugging options, Debugging Features of make
limits, Evaluating Commands
echo command line, Command-Line Limits
Linux kernel makefile options, The Linux Kernel Makefile
recursive make and, Recursive make
subshells, Errors and Interrupts
targets as arguments, How to Write a Simple Makefile
variable definition and, Target- and Pattern-Specific Variables
commands
ar (archive library), Automatic Dependency Generation
awk, phony targets and, Phony Targets
df, phony targets and, Phony Targets
empty, Which Shell to Use
environments, Command Environment
file descriptors, Command Environment
MAKEFLAGS variable, Command Environment
MAKELEVEL variable, Command Environment
errors in, ignoring, Command Modifiers
help, Implicit Rules for Source Control
long, Parsing Commands
make, execution order, Targets and Prerequisites
makefile, execution order, Targets and Prerequisites
multiline, Errors and Interrupts
no-op, Errors and Interrupts
options, errors and, Errors and Interrupts
parsing, Commands
command scripts and, Parsing Commands
editors and, Parsing Commands
prefixes
+ (plus), Command Modifiers
- (dash), Command Modifiers
@, Continuing Long Commands
shell, sequences, Parsing Commands
status code, Command Modifiers
targets, overriding, Errors in Command Scripts
variable expansion, When Variables Are Expanded
comments, Basic Makefile Syntax
commercial development model, Components of Large Systems
compile-bean function (Java), Enterprise JavaBeans
computed variables, assert function and, Flow Control
Concurrent Version Systems (see CVS)
conditional directives ifdef, Conditional and include Processing
ifeq, Conditional and include Processing
ifndef, Conditional and include Processing
ifneq, Conditional and include Processing
syntax, Conditional and include Processing
conditional processing directives, Conditional and include Processing
conditional variable assignment operator (?=), Variable Types
configuring Linux kernel makefile, Command-Line Options
constants, user-customized variables, Variables and Macros
cookies, Phony Targets
(see also empty targets)
counter function, Automatic Variables
CPPFLAGS variable, When Variables Are Expanded
CURDIR variable, include and Dependencies
curly braces ({ }) in variables, Variables and Macros
CVS (Concurrent Version Systems)
binary files, large, Partial Source Trees
implicit rules and, Rule Structure
cwd (current working directory), CURDIR variable and, include and Dependencies
Cygwin, User-Defined Functions
benchmarking and, Benchmarking
conflicts, Filesystem
line termination, Portability Issues
portability and, Portability Issues
regtool, Setting CLASSPATH
Windows filesystem and, Line Termination

D

data structures, The Outer Limits
illegal, Data Structures
trapping, Data Structures
--debug option, --warn-undefined-variables
debug-enter variable, Advanced User-Defined Functions
debug-leave variable, Advanced User-Defined Functions
debugging
code writing and, The --debug Option
command script error messages, commands commence before first target
command-line options, Debugging Features of make
defensive coding and, Good Coding Practices
error messages, Debugging Techniques
introduction, Debugging Makefiles
macros and, Advanced User-Defined Functions
make output, phony targets and, Phony Targets
overriding commands, targets, Errors in Command Scripts
syntax errors, Common Error Messages
techniuqes for, Defensive Coding
warning function and, Debugging Makefiles
declarations, reusable, library functions, Finding Files with VPATH and vpath
deferred expansion, When Variables Are Expanded
define directive, macros, Macros
.DELETE_ON_ERROR target modifier, Special Targets
dependencies, Building Other Targets
bottlenecks and, Identifying and Handling Bottlenecks
generating, The Hard Way
automatically, Special Targets
include directive and, include and Dependencies
Java makefile, The Fast Approach: All-in-One Compile
make-depend, Tromey’s Way
recursion and, Recursive make
rules, How to Write a Simple Makefile
dependency checking, Targets and Prerequisites
development environments, variables, Where Variables Come From
development requirements, Components of Large Systems
development styles, Components of Large Systems
dir function, Filename Functions
directives
conditional processing, Conditional and include Processing
conditional, syntax, Conditional and include Processing
define, Macros
include, Conditional and include Processing, Conditional and include Processing
dependencies and, include and Dependencies
optimization, Nonrecursive make
vpath, Finding Files with VPATH and vpath
directories
multidirectory projects, nonrecursive make and, Nonrecursive make
~ (tilde) and, Explicit Rules
distclean target, Phony Targets
distributed make, Parallel make
distribution, performance and, Parallel make
double-colon rules, Using Libraries as Prerequisites

E

echo command line, limits, Command-Line Limits
Eclipse, Ant
EJB (Enterprise Java Beans), Enterprise JavaBeans
ejb-rule function, Enterprise JavaBeans
EJBS variable, Enterprise JavaBeans
else keyword, Conditional and include Processing
Emacs JDEE, Ant
embedded periods, variable definition and, The Outer Limits
empty commands, Which Shell to Use
empty targets, Phony Targets
automatic variables and, Empty Targets
encapsulation, Java packages, Java
endef keyword, Macros
endif keyword, Conditional and include Processing
Enterprise JavaBeans (EJB), Enterprise JavaBeans
--environment-overrides option, Running make
environment variables, ?= operator, Where Variables Come From
environments
commands, Command Environment
file descriptors, Command Environment
MAKEFLAGS variable, Command Environment
MAKELEVEL variable, Command Environment
variable definition and, Target- and Pattern-Specific Variables
error function, Flow Control
error handling, recursive make and, Passing Variables
error messages
command scripts, commands commence before first target
debugging and, Debugging Techniques
fatal, printing, Flow Control
errors, commands
ignoring, Command Modifiers
options, Errors and Interrupts
eval function, eval and value
parsing and, eval and value
expanding macros
deferred versus immediate, When Variables Are Expanded
macros invoked from another, User-Defined Functions
expanding text, foreach function and, Flow Control
expanding variables, Macros
curly braces and, Variables and Macros
deferred, When Variables Are Expanded
immediate, When Variables Are Expanded
explicit rules, Rules, Rules
empty targets and, Phony Targets
phony targets, Wildcards
wildcards, Explicit Rules
exporting variables, Where Variables Come From

F

fatal error messages, Flow Control
--file option, Running make
file descriptors, Command Environment
file management, Filesystem
source tree layout, Source Tree Layout
filenames
built-in functions and, Filename Functions
functions
addprefix, Filename Functions
addsuffix, Filename Functions
basename, Filename Functions
dir, Filename Functions
join, Filename Functions
notdir, Filename Functions
suffix, Filename Functions
wildcard function, Filename Functions
patterns (see pattern rules)
suffixes, functions, Filename Functions
timestamps and, Important Miscellaneous Functions
files
variable definition and, Target- and Pattern-Specific Variables
wildcards, Explicit Rules
files array, command-line limits and, Command-Line Limits
filesystems layout, binary trees and, Requirements
filter function, Built-in Functions
filter-out function, String Functions
find command, module definition, Nonrecursive make
findstring function, String Functions
firstword function, String Functions
flow control functions, Filename Functions
assert, Flow Control
error, Flow Control
foreach, Flow Control
if, Filename Functions
foreach function, Flow Control
free software model development, Components of Large Systems
functions
add-manifest, Managing Jars
addprefix, Filename Functions
addsuffix, Filename Functions
assert, Flow Control
basename, Filename Functions
build-classpath, Setting CLASSPATH
built-in, User-Defined Functions
call, User-Defined Functions
filename, Filename Functions
flow control, Filename Functions
patterns as arguments, Built-in Functions
string functions, Built-in Functions
syntax, User-Defined Functions
calling, wildcards and, Explicit Rules
compile-bean, Enterprise JavaBeans
counter, Automatic Variables
defslot, Data Structures
dir, Filename Functions
ejb-rule, Enterprise JavaBeans
error, Flow Control
eval, eval and value
filter, Built-in Functions
filter-out, String Functions
findstring, String Functions
firstword, String Functions
flow control, Filename Functions
foreach, Flow Control
generated-source, Nonrecursive make
hooks, eval and value
if, Filename Functions
join, Filename Functions
library, declarations, Finding Files with VPATH and vpath
make-library, Nonrecursive make
miscellaneous, Style note concerning variables and parentheses, Less Important Miscellaneous Functions
notdir, Filename Functions
origin, Style note concerning variables and parentheses
parameters, passing to, eval and value
patsubst, String Functions
remote-file, Data Structures
search and replace, strings, String Functions
shell, String Functions
sort, String Functions
source-to-object, Nonrecursive make
space-to-question, Managing Programs and Files
string functions, Built-in Functions
strip, Style note concerning variables and parentheses
whitespace removal, Conditional and include Processing
subst, String Functions
suffix, Filename Functions
user-defined, Functions
advanced, Less Important Miscellaneous Functions
Linux kernel makefile, Managing Command Echo
parameters and, User-Defined Functions
value, eval and value
variables, Variables and Macros
warning, Less Important Miscellaneous Functions
whitespace manipulation, String Functions
wildcard, Filename Functions
wildcard-spaces, Managing Programs and Files
word, String Functions
wordlist, String Functions
words, String Functions

G

generated-source function, Nonrecursive make
generating dependencies, The Hard Way
globbing, Explicit Rules
GNU Free Documentation License, GNU Free Documentation License—GNU Project—Free Software Foundation (FSF)
grep command, variables and, Command Environment

H

header files, include directory, Finding Files with VPATH and vpath
Hello World makefile file, How to Write a Simple Makefile
--help option, Running make
help commands, Implicit Rules for Source Control
home directory, ~ (tilde) and, Explicit Rules
hooks, functions, eval and value

I

IDEs (Integrated Development Environments), Java, Ant
if function, Filename Functions
ifdef conditional directive, Conditional and include Processing
ifeq conditional directive, Conditional and include Processing
ifndef conditional directive, Conditional and include Processing
ifneq conditional directive, Conditional and include Processing
immediate expansion, When Variables Are Expanded
implicit rules, Rules, Suffix Rules
built-in, Suffix Rules
source control and, Rule Structure
CVS, Rule Structure
--include-dir option, Running make
include directive, Conditional and include Processing, Conditional and include Processing
dependencies and, include and Dependencies
header files, Finding Files with VPATH and vpath
optimization, Nonrecursive make
include processing, Conditional and include Processing
incrementing, Data Structures
info target, Phony Targets
initialization, performance and, Simple Variables Versus Recursive
input files, text printing, Minimizing Rebuilds
install target, Phony Targets
installers, reference builds and, Partial Source Trees
Integrated Development Environments (see IDEs)
interfaces, phony targets and, Phony Targets
.INTERMEDIATE target modifier, A Simple Help Command
intermediate files, chaining rules and, Working with Implicit Rules
invoking make, Minimizing Rebuilds

J

jar program, Setting CLASSPATH
reference trees, Managing Jars
third-party, Managing Jars
jars (Java), Setting CLASSPATH
Java
Ant, Java
build file, Java
mkdir program, Ant
portability, Ant
tasks, Ant
Eclipse, Java
EJB, Enterprise JavaBeans
IDEs, Ant
jars and, Setting CLASSPATH
make and, Java
makefile (generic), A Generic Java Makefile
CLASSPATH variable, Compiling with Dependencies
dependecies and, The Fast Approach: All-in-One Compile
packages, Java
Java virtual machine (JVM), Java
JBuilder, Ant
JIT (just-in-time) optimization, Java
--jobs option, Lazy Initialization
join function, Filename Functions
--just-print option, Running make
--just-print option, debugging, Debugging Features of make
just-in-time (JIT) optimization, Java
JVM (Java virtual machine), Java

K

--keep-going option, Running make
killing processes, user-defined functions and, User-Defined Functions

L

large projects, Managing Large Projects
libraries
.SECONDARY target modifier, A Simple Help Command
archive libraries, Automatic Dependency Generation
as prerequisites, Creating and Updating Libraries
circular references, Using Libraries as Prerequisites
creating, Creating and Updating Libraries
double-colon rules, Using Libraries as Prerequisites
make-library function, Nonrecursive make
recursion and, Recursive make
reference builds and, Partial Source Trees
updating, Creating and Updating Libraries
library functions, reusable, Finding Files with VPATH and vpath
line termination, Cygwin, Portability Issues
Linux kernel makefile, The Linux Kernel Makefile
command echo, Configuration Versus Building
command-line options, The Linux Kernel Makefile
configuration versus building, Command-Line Options
user-defined functions, Managing Command Echo
long commands, Parsing Commands

M

m4 macros, book makefile and, Managing Examples
macros
debugging and, Advanced User-Defined Functions
define directive, Macros
defining, When Variables Are Expanded
expanding, Macros
implementing, scoping and, User-Defined Functions
introduction, Other Types of Assignment
invoking from another macro, User-Defined Functions
program-variables, eval and value
rules in, eval and value
make
automation and, How to Write a Simple Makefile
command execution, Targets and Prerequisites
comments, Basic Makefile Syntax
dependency checking, Targets and Prerequisites
escape character, Basic Makefile Syntax
invoking, Minimizing Rebuilds
scripts and, How to Write a Simple Makefile
$(MAKE) variable, Recursive make
make shell command, benchmarking and, Benchmarking
make-library function, Nonrecursive make
MAKECMDGOALS variable, Standard make Variables
makedepend, Tromey’s Way
makefiles
book makefile, Example Makefiles
m4 macros, Managing Examples
output generation, XML Preprocessing
source validation, Generating Output
XML preprocessing, Managing Examples
command execution, Targets and Prerequisites
Hello World, How to Write a Simple Makefile
Java, generic for, A Generic Java Makefile
Linux kernel, The Linux Kernel Makefile
command echo and, Configuration Versus Building
command-line options, The Linux Kernel Makefile
configuration versus building, Command-Line Options
user-defined functions, Managing Command Echo
syntax, Invoking make
targets as command-line arguments, How to Write a Simple Makefile
top-down style, Targets and Prerequisites
MAKEFILE_LIST variable, Standard make Variables
MAKEFLAGS variable, command environment and, Command Environment
MAKELEVEL variable, command environments, Command Environment
MAKE_VERSION variable, include and Dependencies
matched rules, automatic variables, Empty Targets
members of archive libraries, Automatic Dependency Generation
miscellaneous functions, Style note concerning variables and parentheses
warning, Less Important Miscellaneous Functions
module definition, find command, Nonrecursive make
module.mk include files, Nonrecursive make
multiline commands, Errors and Interrupts

N

--new-file option, Running make
newline rule, Minimizing Rebuilds
no-op commands, Errors and Interrupts
nonrecursive make, Nonrecursive make
notdir function, Filename Functions

O

$(OBJECTS) variable, The Patterns
object files, updates, Working with Implicit Rules
--old-file option, Running make
options
commands, errors and, Errors and Interrupts
portability and, Portable Makefiles
origin function, Style note concerning variables and parentheses
output, book makefile example, XML Preprocessing

P

packages, Java, Java
parallelism
--jobs option, Lazy Initialization
performance and, Lazy Initialization
pmake, Parallel make
parameters
passing to functions, eval and value
user-defined functions, User-Defined Functions
parentheses, variables and, Variables and Macros, Flow Control
parsing
commands, Commands
command scripts and, Parsing Commands
editors and, Parsing Commands
eval function and, eval and value
partial source trees, Supporting Multiple Binary Trees
passing parameters to functions, eval and value
passing variables, recursive make and, Recursive make
paths, portability and, Portable Makefiles
patsubst function, String Functions
pattern rules, Rules, Pattern Rules
% (percent) character, Pattern Rules
implicit rules and, Rules
static pattern rules, The Patterns
suffix rules, Static Pattern Rules
deleting, Static Pattern Rules
pattern-specific variables, When Variables Are Expanded
patterns, Pattern Rules
as arguments in built-in functions, Built-in Functions
filter function, Built-in Functions
performance
@ sign and, Simple Variables Versus Recursive
benchmarking and, Improving the Performance of make
bottlenecks, Benchmarking
distribution and, Parallel make
initialization and, Simple Variables Versus Recursive
introduction, Improving the Performance of make
parallelism and, Lazy Initialization
recursive variables, Identifying and Handling Bottlenecks
simple variables, Identifying and Handling Bottlenecks
.PHONY target modifier, Wildcards
phony targets, Wildcards
interfaces and, Phony Targets
nonrecursive make and, Nonrecursive make
output
debugging, Phony Targets
reading, Phony Targets
prerequisites, Wildcards
special targets, A Simple Help Command
standard, Phony Targets
pmake, Parallel make
portability, Portable Makefiles
Ant (Java), Ant
Cygwin, Portability Issues
nonportable tools, Source Tree Layout
options and, Portable Makefiles
paths and, Portable Makefiles
program behavior and, Portable Makefiles
program names and, Portable Makefiles
shell and, Portable Makefiles, Working with Nonportable Tools
.PRECIOUS target modifier, A Simple Help Command
prefixes
on commands
+ (plus), Command Modifiers
- (dash), Command Modifiers
@, Continuing Long Commands
pattern rules, The Patterns
prerequisites
automatic variables and, Empty Targets
libraries as, Creating and Updating Libraries
phony targets, Wildcards
rules and, How to Write a Simple Makefile
saving, Using Libraries as Prerequisites
targets
.INTERMEDIATE modifier and, A Simple Help Command
.SECONDARY modifier, A Simple Help Command
chaining, Targets and Prerequisites
updates, ordering and, Recursive make
--print-data-base option, Running make
debugging and, Debugging Features of make
program behavior, portability and, Portable Makefiles
program management, Filesystem
program names, portability and, Portable Makefiles
program-variables macro, eval and value

R

RCS source control, implicit rules and, Rule Structure
read-only source, The Hard Way
rebuilds, minimizing, Minimizing Rebuilds
recursion, Managing Large Projects
recursive make, Recursive make
$(MAKE) variable, Recursive make
build targets and, Passing Variables
code duplication, Cross-Makefile Dependencies
command-line and, Recursive make
dependencies and, Recursive make
error handling, Passing Variables
variables, passing, Recursive make
(see also nonrecursive make)
recursive variables
performance and, Identifying and Handling Bottlenecks
shell function and, Important Miscellaneous Functions
recursively expanded variables, What Variables Are Used For
reference builds
installers and, Partial Source Trees
libraries and, Partial Source Trees
reference trees, jar program, Managing Jars
regtool, Setting CLASSPATH
relative paths, converting to Java class name, Important Miscellaneous Functions
release tree layout, Filesystem Layout
remote-file function, Data Structures
reusable library functions, declarations, Finding Files with VPATH and vpath
rule chaining, Pattern Rules
rules
any character, Minimizing Rebuilds
chaining, intermediate files, Working with Implicit Rules
customization, variables and, Working with Implicit Rules
default rule, How to Write a Simple Makefile
dependents, How to Write a Simple Makefile
double-colon, Using Libraries as Prerequisites
explicit, Rules, Rules
empty targets, Phony Targets
phony targets, Wildcards
implicit, Rules, Suffix Rules
built-in, Suffix Rules
source control and, Rule Structure
macros, eval and value
matching, automatic variables and, Empty Targets
newline, Minimizing Rebuilds
pattern, Rules, Pattern Rules
suffix rules, Static Pattern Rules
prerequisites and, How to Write a Simple Makefile
static pattern, Rules, The Patterns
structure, Working with Implicit Rules
suffix, Rules
targets, How to Write a Simple Makefile
multiple, Rules
variables, customization and, Working with Implicit Rules
run-make shell script, running book makefile, Managing Examples

S

SCCS source control, implicit rules and, Rule Structure
scoping, macro implementation and, User-Defined Functions
scripts
command scripts, parsing and, Parsing Commands
make and, How to Write a Simple Makefile
search and replace functions, strings, String Functions
substitution references, String Functions
searches
binary trees, Supporting Multiple Binary Trees
source treese, Supporting Multiple Binary Trees
VPATH and, Automatic Variables
vpath and, Automatic Variables
.SECONDARY target modifier, A Simple Help Command
separators, missing (error messages), Common Error Messages
shell
command lines, subshells, Errors and Interrupts
portability and, Portable Makefiles, Working with Nonportable Tools
shell commands, sequences, Parsing Commands
shell function, String Functions
variables, Important Miscellaneous Functions
simple variables
performance and, Identifying and Handling Bottlenecks
shell function and, Important Miscellaneous Functions
simply expanded variables, What Variables Are Used For
sort function, String Functions
source
binary tree separation, C and C++
src directory, Finding Files with VPATH and vpath
validation, book makefile, Generating Output
source trees
layout, file management and, Source Tree Layout
partial, Supporting Multiple Binary Trees
read-only, The Hard Way
searches, Supporting Multiple Binary Trees
source-to-object function, Nonrecursive make
sources of variables, Target- and Pattern-Specific Variables
space-to-question function, Managing Programs and Files
special targets, A Simple Help Command
src directory, source files, Finding Files with VPATH and vpath
static pattern rules, Rules, The Patterns
status code, commands, Command Modifiers
stderr file descriptor, Command Environment
stdin file descriptor, Command Environment
stdout file descriptor, Command Environment
string functions, Built-in Functions
filter, Built-in Functions
filter-out, String Functions
findstring, String Functions
firstword, String Functions
patsubst, String Functions
search and replace functions, String Functions
subst, String Functions
wordlist, String Functions
words, String Functions
strip function, Style note concerning variables and parentheses
whitespace removal, Conditional and include Processing
structure of rules, Working with Implicit Rules
subshells, command lines and, Errors and Interrupts
subst function, String Functions
substitution references, string functions, String Functions
suffix function, Filename Functions
suffix rules, Static Pattern Rules
implicit rules and, Rules
suffixes
filenames, functions, Filename Functions
pattern rules, The Patterns
deleting, Static Pattern Rules
targets, Static Pattern Rules
syntax
built-in functions, User-Defined Functions
conditional directives, Conditional and include Processing
editors, Parsing Commands
errors, debugging and, Common Error Messages
makefile, Invoking make
target-specific variables, Target- and Pattern-Specific Variables

T

tab character, error message, Common Error Messages
TAGS target, Phony Targets
target-specific variables, When Variables Are Expanded
syntax, Target- and Pattern-Specific Variables
targets
as command-line arguments, How to Write a Simple Makefile
automatic variables and, Empty Targets
build targets, recursive make and, Passing Variables
commands, overriding, Errors in Command Scripts
deleting, Errors and Interrupts
empty, Phony Targets
modifiers, A Simple Help Command
.DELETE_ON_ERROR, Special Targets
.INTERMEDIATE, A Simple Help Command
.PHONY, Wildcards
.PRECIOUS, A Simple Help Command
.SECONDARY, A Simple Help Command
phony targets, Wildcards
special targets, A Simple Help Command
prerequisites
chaining, Targets and Prerequisites
saving, Using Libraries as Prerequisites
rules, How to Write a Simple Makefile
explicit rules, Rules
multiple, Rules
special targets, A Simple Help Command
static pattern rules, The Patterns
suffixes, Static Pattern Rules
updating, rule chaining and, Pattern Rules
tasks (Ant), Ant
text expansion, foreach function and, Flow Control
timestamps
empty files and, Phony Targets
filenames and, Important Miscellaneous Functions
top-down style, makefiles, Targets and Prerequisites
--touch option, Running make

U

updates
libraries, Creating and Updating Libraries
object files, rules, Working with Implicit Rules
prerequisites, ordering and, Recursive make
targets, rule chaining, Pattern Rules
user-defined functions, Functions
advanced, Less Important Miscellaneous Functions
killing processes and, User-Defined Functions
Linux kernel makefile, Managing Command Echo
parameters and, User-Defined Functions
variables and, Variables and Macros

V

validating source, book makefile, Generating Output
value function, eval and value
variables, Empty Targets
.VARIABLE, Standard make Variables
ALL_TREES, Supporting Multiple Binary Trees
assigning, speed, Benchmarking
automatic, Empty Targets, Where Variables Come From
empty targets and, Empty Targets
built-in rules, Working with Implicit Rules
case-sensitivity, Variables and Macros
characters allowed, Variables and Macros
CLASSPATH, Java makefile, Compiling with Dependencies
computed, assert function and, Flow Control
constants, user-customized, Variables and Macros
CPPFLAGS, When Variables Are Expanded
CURDIR, include and Dependencies
debug-enter, Advanced User-Defined Functions
debug-leave, Advanced User-Defined Functions
development environment, Where Variables Come From
EJBS, Enterprise JavaBeans
error messagess, commands commence before first target
expanding, Macros
curly braces and, Variables and Macros
exporting, Where Variables Come From
functions, user-defined, Variables and Macros
grep command, Command Environment
introduction, Variables and Macros
macros and, Macros
MAKE, Recursive make
MAKECMDGOALS, Standard make Variables
MAKEFILE_LIST, Standard make Variables
MAKEFLAGS, command environment and, Command Environment
MAKELEVEL, Command Environment
MAKE_VERSION, include and Dependencies
OBJECTS, The Patterns
operators
+= (append), Other Types of Assignment
:=, What Variables Are Used For
=, Variables and Macros
?= (conditional variable assignment operator), Variable Types
origins, origin function, Style note concerning variables and parentheses
parentheses and, Variables and Macros, Flow Control
passing, recursive make and, Recursive make
pattern-specific, When Variables Are Expanded
periods, embedded, The Outer Limits
recursive, performance and, Identifying and Handling Bottlenecks
recursively expanded, What Variables Are Used For
shell function, Important Miscellaneous Functions
simple, performance and, Identifying and Handling Bottlenecks
simply expanded, What Variables Are Used For
sources, Target- and Pattern-Specific Variables
target-specific, When Variables Are Expanded
trailing spaces and, Variables and Macros
uses, Variables and Macros
VARIABLES, Standard make Variables
VPATH (see VPATH)
.VARIABLES variable, Standard make Variables
VARIABLES variable, Standard make Variables
VPATH, Automatic Variables
vpath, Automatic Variables
vpath directive, Finding Files with VPATH and vpath

W

--warn-undefined-variables option, Running make
debugging and, --print-data-base
warning function, Less Important Miscellaneous Functions
debugging and, Debugging Makefiles
whitespace
functions for manipulating, String Functions
removing, User-Defined Functions
strip function, Style note concerning variables and parentheses
wildcard function, Filename Functions
wildcard-spaces function, Managing Programs and Files
wildcards, Explicit Rules
? (question mark), Explicit Rules
calling functions and, Explicit Rules
character classes, Explicit Rules
expanding, Explicit Rules
misuse, Explicit Rules
pattern rules and, Rules
(see also globbing)
~ (tilde), Explicit Rules
Windows filesystem, Cygwin and, Line Termination
Windows, using Cygwin and make on, Portability Issues
word function, String Functions
wordlist function, String Functions
words function, String Functions

X

XML
build files, Java
preprocessing book makefile, Managing Examples

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required