@end detailmenu
@end menu
-@node Overview, Introduction, Top, Top
+@node Overview
@comment node-name, next, previous, up
@chapter Overview of @code{make}
* Bugs:: Problems and bugs.
@end menu
-@node Preparing, Reading, Overview, Overview
+@node Preparing
@ifnottex
@heading Preparing and Running Make
@end ifnottex
files should be recompiled, or how. @xref{Running, ,How to Run
@code{make}}.
-@node Reading, Bugs, Preparing, Overview
+@node Reading
@section How to Read This Manual
If you are new to @code{make}, or are looking for a general
For a quick summary, see @ref{Options Summary}, @ref{Quick Reference},
and @ref{Special Targets}.
-@node Bugs, , Reading, Overview
+@node Bugs
@section Problems and Bugs
@cindex reporting bugs
@cindex bugs, reporting
If you have a code change you'd like to submit, see the @file{README} file
section ``Submitting Patches'' for information.
-@node Introduction, Makefiles, Overview, Top
+@node Introduction
@comment node-name, next, previous, up
@chapter An Introduction to Makefiles
* Cleanup:: Rules for cleaning the directory.
@end menu
-@node Rule Introduction, Simple Makefile, Introduction, Introduction
+@node Rule Introduction
@comment node-name, next, previous, up
@section What a Rule Looks Like
@cindex rule, introduction to
need only contain rules. Rules may look somewhat more complicated
than shown in this template, but all fit the pattern more or less.
-@node Simple Makefile, How Make Works, Rule Introduction, Introduction
+@node Simple Makefile
@section A Simple Makefile
@cindex simple makefile
@cindex makefile, simple
@cindex @code{clean} target
@cindex @code{rm} (shell command)
-@node How Make Works, Variables Simplify, Simple Makefile, Introduction
+@node How Make Works
@comment node-name, next, previous, up
@section How @code{make} Processes a Makefile
@cindex processing a makefile
@code{make}, @code{make} will recompile the object files @file{kbd.o},
@file{command.o} and @file{files.o} and then link the file @file{edit}.
-@node Variables Simplify, make Deduces, How Make Works, Introduction
+@node Variables Simplify
@section Variables Make Makefiles Simpler
@cindex variables
@cindex simplifying with variables
@end group
@end example
-@node make Deduces, Combine By Prerequisite, Variables Simplify, Introduction
+@node make Deduces
@section Letting @code{make} Deduce the Recipes
@cindex deducing recipes (implicit rules)
@cindex implicit rule, introduction to
Because implicit rules are so convenient, they are important. You
will see them used frequently.
-@node Combine By Prerequisite, Cleanup, make Deduces, Introduction
+@node Combine By Prerequisite
@section Another Style of Makefile
@cindex combining rules by prerequisite
people dislike it because they find it clearer to put all the information
about each target in one place.
-@node Cleanup, , Combine By Prerequisite, Introduction
+@node Cleanup
@section Rules for Cleaning the Directory
@cindex cleaning up
@cindex removing, to clean up
order to make the rule run, we have to type @samp{make clean}.
@xref{Running, ,How to Run @code{make}}.
-@node Makefiles, Rules, Introduction, Top
+@node Makefiles
@chapter Writing Makefiles
@cindex makefile, how to write
* Secondary Expansion:: How and when secondary expansion is performed.
@end menu
-@node Makefile Contents, Makefile Names, Makefiles, Makefiles
+@node Makefile Contents
@section What Makefiles Contain
Makefiles contain five kinds of things: @dfn{explicit rules},
* Splitting Lines:: Splitting long lines in makefiles
@end menu
-@node Splitting Lines, , Makefile Contents, Makefile Contents
+@node Splitting Lines
@subsection Splitting Long Lines
@cindex splitting long lines
@cindex long lines, splitting
@end example
-@node Makefile Names, Include, Makefile Contents, Makefiles
+@node Makefile Names
@section What Name to Give Your Makefile
@cindex makefile name
@cindex name of makefile
@cindex name of makefile, how to specify
@cindex file name of makefile, how to specify
-@node Include, MAKEFILES Variable, Makefile Names, Makefiles
+@node Include
@section Including Other Makefiles
@cindex including other makefiles
@cindex makefile, including
For compatibility with some other @code{make} implementations,
@code{sinclude} is another name for @w{@code{-include}}.
-@node MAKEFILES Variable, Remaking Makefiles, Include, Makefiles
+@node MAKEFILES Variable
@section The Variable @code{MAKEFILES}
@cindex makefile, and @code{MAKEFILES} variable
@cindex including (@code{MAKEFILES} variable)
anyone else. It is much better to write explicit @code{include} directives
in the makefiles. @xref{Include, , Including Other Makefiles}.
-@node Remaking Makefiles, Overriding Makefiles, MAKEFILES Variable, Makefiles
+@node Remaking Makefiles
@section How Makefiles Are Remade
@cindex updating makefiles
@cindex remaking makefiles
without running that. The recipe for @file{foo} will be the one
specified by the existing contents of @file{mfile}.
-@node Overriding Makefiles, Reading Makefiles, Remaking Makefiles, Makefiles
+@node Overriding Makefiles
@section Overriding Part of Another Makefile
@cindex overriding makefiles
build it---otherwise it would apply the same match-anything rule to
@file{force} itself and create a prerequisite loop!
-@node Reading Makefiles, Parsing Makefiles, Overriding Makefiles, Makefiles
+@node Reading Makefiles
@section How @code{make} Reads a Makefile
@cindex reading makefiles
@cindex makefile, reading
deferred. This is true for explicit rules, pattern rules, suffix
rules, static pattern rules, and simple prerequisite definitions.
-@node Parsing Makefiles, Secondary Expansion, Reading Makefiles, Makefiles
+@node Parsing Makefiles
@section How Makefiles Are Parsed
@cindex parsing makefiles
@cindex makefiles, parsing
@code{eval} function: this causes the @code{make} parser to be run on
the results of the expanded macro (@pxref{Eval Function}).
-@node Secondary Expansion, , Parsing Makefiles, Makefiles
+@node Secondary Expansion
@section Secondary Expansion
@cindex secondary expansion
@cindex expansion, secondary
reconstruction, you can use @code{$$*} instead of @code{%} in the
prerequisites list.
-@node Rules, Recipes, Makefiles, Top
+@node Rules
@chapter Writing Rules
@cindex writing rules
@cindex rule, how to write
@end menu
@ifnottex
-@node Rule Example, Rule Syntax, Rules, Rules
+@node Rule Example
@section Rule Example
Here is an example of a rule:
@end itemize
@end ifnottex
-@node Rule Syntax, Prerequisite Types, Rule Example, Rules
+@node Rule Syntax
@section Rule Syntax
@cindex rule syntax
lines to be executed by the shell (normally @samp{sh}), but with some
extra features (@pxref{Recipes, ,Writing Recipes in Rules}).
-@node Prerequisite Types, Wildcards, Rule Syntax, Rules
+@node Prerequisite Types
@comment node-name, next, previous, up
@section Types of Prerequisites
@cindex prerequisite types
needed, before any @samp{.o} is built, but no @samp{.o} will be built
because the @file{objdir} directory timestamp changed.
-@node Wildcards, Directory Search, Prerequisite Types, Rules
+@node Wildcards
@section Using Wildcard Characters in File Names
@cindex wildcard
@cindex file name with wildcards
it does not normally take place.
@end menu
-@node Wildcard Examples, Wildcard Pitfall, Wildcards, Wildcards
+@node Wildcard Examples
@subsection Wildcard Examples
Wildcards can be used in the recipe of a rule, where they are expanded
@noindent
@xref{Wildcard Function}.
-@node Wildcard Pitfall, Wildcard Function, Wildcard Examples, Wildcards
+@node Wildcard Pitfall
@subsection Pitfalls of Using Wildcards
@cindex wildcard pitfalls
@cindex pitfalls of wildcards
you @emph{must} use Unix-style slashes in these cases.
-@node Wildcard Function, , Wildcard Pitfall, Wildcards
+@node Wildcard Function
@subsection The Function @code{wildcard}
@findex wildcard
@xref{Flavors, ,The Two Flavors of Variables}, for an explanation of
@samp{:=}, which is a variant of @samp{=}.)
-@node Directory Search, Phony Targets, Wildcards, Rules
+@node Directory Search
@section Searching Directories for Prerequisites
@cindex vpath
@cindex search path for prerequisites (@code{VPATH})
* Libraries/Search:: Directory search for link libraries.
@end menu
-@node General Search, Selective Search, Directory Search, Directory Search
+@node General Search
@subsection @code{VPATH}: Search Path for All Prerequisites
@vindex VPATH
assuming the file @file{foo.c} does not exist in the current directory but
is found in the directory @file{src}.
-@node Selective Search, Search Algorithm, General Search, Directory Search
+@node Selective Search
@subsection The @code{vpath} Directive
@findex vpath
will look for a file ending in @samp{.c} in @file{foo}, then
@file{bar}, then @file{blish}.
-@node Search Algorithm, Recipes/Search, Selective Search, Directory Search
+@node Search Algorithm
@subsection How Directory Searches are Performed
@cindex algorithm for directory search
@cindex directory search algorithm
@code{GPATH}, then that pathname is not thrown away. The target is
rebuilt using the expanded path.
-@node Recipes/Search, Implicit/Search, Search Algorithm, Directory Search
+@node Recipes/Search
@subsection Writing Recipes with Directory Search
@cindex recipes, and directory search
@cindex directory search (@code{VPATH}), and recipes
cc -c $(CFLAGS) $< -o $@@
@end example
-@node Implicit/Search, Libraries/Search, Recipes/Search, Directory Search
+@node Implicit/Search
@subsection Directory Search and Implicit Rules
@cindex @code{VPATH}, and implicit rules
@cindex directory search (@code{VPATH}), and implicit rules
matter of necessity; consequently they will use the file names found by
directory search with no extra effort.
-@node Libraries/Search, , Implicit/Search, Directory Search
+@node Libraries/Search
@subsection Directory Search for Link Libraries
@cindex link libraries, and directory search
@cindex libraries for linking, directory search
You can turn off link library expansion completely by setting this
variable to an empty value.
-@node Phony Targets, Force Targets, Directory Search, Rules
+@node Phony Targets
@section Phony Targets
@cindex phony targets
@cindex targets, phony
rm *.diff
@end example
-@node Force Targets, Empty Targets, Phony Targets, Rules
+@node Force Targets
@section Rules without Recipes or Prerequisites
@cindex force targets
@cindex targets, force
other versions of @code{make} do not support @samp{.PHONY}; thus
@samp{FORCE} appears in many makefiles. @xref{Phony Targets}.
-@node Empty Targets, Special Targets, Force Targets, Rules
+@node Empty Targets
@section Empty Target Files to Record Events
@cindex empty targets
@cindex targets, empty
automatic variable @samp{$?} is used to print only those files that have
changed (@pxref{Automatic Variables}).
-@node Special Targets, Multiple Targets, Empty Targets, Rules
+@node Special Targets
@section Special Built-in Target Names
@cindex special targets
@cindex built-in special targets
@samp{.}, so these special target names also begin with @samp{.}.
@xref{Suffix Rules, ,Old-Fashioned Suffix Rules}.
-@node Multiple Targets, Multiple Rules, Special Targets, Rules
+@node Multiple Targets
@section Multiple Targets in a Rule
@cindex multiple targets
@cindex several targets in a rule
grouped double-colon rule's recipe is executed at most once, if at
least one of its multiple targets requires updating.
-@node Multiple Rules, Static Pattern, Multiple Targets, Rules
+@node Multiple Rules
@section Multiple Rules for One Target
@cindex multiple rules for one target
@cindex several rules for one target
searches for an applicable implicit rule to find one
@pxref{Implicit Rules, ,Using Implicit Rules}).
-@node Static Pattern, Double-Colon, Multiple Rules, Rules
+@node Static Pattern
@section Static Pattern Rules
@cindex static pattern rule
@cindex rule, static pattern
* Static versus Implicit:: When are they better than implicit rules?
@end menu
-@node Static Usage, Static versus Implicit, Static Pattern, Static Pattern
+@node Static Usage
@subsection Syntax of Static Pattern Rules
@cindex static pattern rule, syntax of
@cindex pattern rules, static, syntax of
When the @code{generate} command is run, @code{$*} will expand to the
stem, either @samp{big} or @samp{little}.
-@node Static versus Implicit, , Static Usage, Static Pattern
+@node Static versus Implicit
@subsection Static Pattern Rules versus Implicit Rules
@cindex rule, static pattern versus implicit
@cindex static pattern rule, versus implicit
to precisely the targets specified.
@end itemize
-@node Double-Colon, Automatic Prerequisites, Static Pattern, Rules
+@node Double-Colon
@section Double-Colon Rules
@cindex double-colon rules
@cindex rule, double-colon (@code{::})
implicit rule will be used if one applies.
@xref{Implicit Rules, ,Using Implicit Rules}.
-@node Automatic Prerequisites, , Double-Colon, Rules
+@node Automatic Prerequisites
@section Generating Prerequisites Automatically
@cindex prerequisites, automatic generation
@cindex automatic generation of prerequisites
object file become the default goal.
@xref{How Make Works}.
-@node Recipes, Using Variables, Rules, Top
+@node Recipes
@chapter Writing Recipes in Rules
@cindex recipes
@cindex recipes, how to write
* Empty Recipes:: Defining useful, do-nothing recipes.
@end menu
-@node Recipe Syntax, Echoing, Recipes, Recipes
+@node Recipe Syntax
@section Recipe Syntax
@cindex recipe syntax
@cindex syntax of recipe
* Variables in Recipes:: Using @code{make} variables in recipes.
@end menu
-@node Splitting Recipe Lines, Variables in Recipes, Recipe Syntax, Recipe Syntax
+@node Splitting Recipe Lines
@subsection Splitting Recipe Lines
@cindex recipes, splitting
@cindex splitting recipes
a tighter correspondence between the variable and the recipe that
uses it.
-@node Variables in Recipes, , Splitting Recipe Lines, Recipe Syntax
+@node Variables in Recipes
@subsection Using Variables in Recipes
@cindex variable references in recipes
@cindex recipes, using variables in
@end group
@end example
-@node Echoing, Execution, Recipe Syntax, Recipes
+@node Echoing
@section Recipe Echoing
@cindex echoing of recipes
@cindex silent operation
@code{.SILENT} without prerequisites has the same effect
(@pxref{Special Targets, ,Special Built-in Target Names}).
-@node Execution, Parallel, Echoing, Recipes
+@node Execution
@section Recipe Execution
@cindex recipe, execution
@cindex execution, of recipes
to run recipes.
@end menu
-@node One Shell, Choosing the Shell, Execution, Execution
+@node One Shell
@subsection Using One Shell
@cindex recipe lines, single shell
@cindex @code{.ONESHELL}, use of
may need to harden your recipe lines to allow them to work with
@code{.ONESHELL}.
-@node Choosing the Shell, , One Shell, Execution
+@node Choosing the Shell
@subsection Choosing the Shell
@cindex shell, choosing the
@cindex @code{SHELL}, value of
on MS-DOS unaltered if you have e.g.@: @file{sh.exe} installed in some
directory along your @code{PATH}.
-@node Parallel, Errors, Execution, Recipes
+@node Parallel
@section Parallel Execution
@cindex recipes, execution in parallel
@cindex parallel execution
* Parallel Input:: Handling input during parallel execution
@end menu
-@node Parallel Disable, Parallel Output, Parallel, Parallel
+@node Parallel Disable
@subsection Disabling Parallel Execution
@cindex disabling parallel execution
@cindex parallel execution, disabling
The @code{.WAIT} feature is also implemented in other versions of @code{make}
and it's specified in the POSIX standard for @code{make}.
-@node Parallel Output, Parallel Input, Parallel Disable, Parallel
+@node Parallel Output
@subsection Output During Parallel Execution
@cindex output during parallel execution
@cindex parallel execution, output during
in ``non-interactive'' mode even though the output will ultimately go
to the terminal.
-@node Parallel Input, , Parallel Output, Parallel
+@node Parallel Input
@subsection Input During Parallel Execution
@cindex input during parallel execution
@cindex parallel execution, input during
if you are not using this feature, then standard input works normally in
all recipes.
-@node Errors, Interrupts, Parallel, Recipes
+@node Errors
@section Errors in Recipes
@cindex errors (in recipes)
@cindex recipes, errors in
it is not historical practice; so for compatibility, you must explicitly
request it.
-@node Interrupts, Recursion, Errors, Recipes
+@node Interrupts
@section Interrupting or Killing @code{make}
@cindex interrupt
@cindex signal
then rename the temporary file to the final target name. Some compilers
already behave this way, so that you don't need to write a defensive recipe.
-@node Recursion, Canned Recipes, Interrupts, Recipes
+@node Recursion
@section Recursive Use of @code{make}
@cindex recursion
@cindex subdirectories, recursion for
helps debug use of recursive @code{make} commands.
@end menu
-@node MAKE Variable, Variables/Recursion, Recursion, Recursion
+@node MAKE Variable
@subsection How the @code{MAKE} Variable Works
@vindex MAKE
@cindex recursion, and @code{MAKE} variable
Sub-@code{make}}), so your request to touch the files, or print the
recipes, is propagated to the subsystem.
-@node Variables/Recursion, Options/Recursion, MAKE Variable, Recursion
+@node Variables/Recursion
@subsection Communicating Variables to a Sub-@code{make}
@cindex sub-@code{make}
@cindex environment, and recursion
before the usual or specified ones. @xref{MAKEFILES Variable, ,The
Variable @code{MAKEFILES}}.
-@node Options/Recursion, -w Option, Variables/Recursion, Recursion
+@node Options/Recursion
@subsection Communicating Options to a Sub-@code{make}
@cindex options, and recursion
@cindex recursion, and options
as @samp{--no-print-directory} or @samp{--output-sync} may be
appropriate for @code{GNUMAKEFLAGS}.
-@node -w Option, , Options/Recursion, Recursion
+@node -w Option
@subsection The @samp{--print-directory} Option
@cindex directories, printing them
@cindex printing directories
be silent, or if you use @samp{--no-print-directory} to explicitly
disable it.
-@node Canned Recipes, Empty Recipes, Recursion, Recipes
+@node Canned Recipes
@section Defining Canned Recipes
@cindex canned recipes
@cindex recipes, canned
does not echo @emph{any} recipe lines.
(@xref{Echoing, ,Recipe Echoing}, for a full explanation of @samp{@@}.)
-@node Empty Recipes, , Canned Recipes, Recipes
+@node Empty Recipes
@section Using Empty Recipes
@cindex empty recipes
@cindex recipes, empty
does exist. @xref{Phony Targets, ,Phony Targets}, for a better way to
do this.
-@node Using Variables, Conditionals, Recipes, Top
+@node Using Variables
@chapter How to Use Variables
@cindex variable
@cindex value
* Special Variables:: Variables with special meaning or behavior.
@end menu
-@node Reference, Flavors, Using Variables, Using Variables
+@node Reference
@section Basics of Variable References
@cindex variables, how to reference
@cindex reference to variables
significant readability improvements. One place where readability is
often improved is automatic variables (@pxref{Automatic Variables}).
-@node Flavors, Advanced, Reference, Using Variables
+@node Flavors
@section The Two Flavors of Variables
@cindex flavors of variables
@cindex recursive variable expansion
* Conditional Assignment:: Assigning variable values conditionally.
@end menu
-@node Recursive Assignment, Simple Assignment, Flavors, Flavors
+@node Recursive Assignment
@subsection Recursively Expanded Variable Assignment
@cindex =
The first flavor of variable is a @dfn{recursively expanded} variable.
because you cannot easily control when they are called, or even how many
times.
-@node Simple Assignment, Immediate Assignment, Recursive Assignment, Flavors
+@node Simple Assignment
@subsection Simply Expanded Variable Assignment
To avoid the problems and inconveniences of recursively expanded
variables, there is another flavor: simply expanded variables.
(with four trailing spaces), which was probably not the intention.
(Imagine something like @w{@samp{$(dir)/file}} with this definition!)
-@node Immediate Assignment, Conditional Assignment, Simple Assignment, Flavors
+@node Immediate Assignment
@subsection Immediately Expanded Variable Assignment
@cindex immediate variable assignment
@cindex variables, immediate assignment
@code{make} @samp{:=} operator. The @code{:::=} operator is added to the
POSIX specification in Issue 8 to provide portability.
-@node Conditional Assignment, , Immediate Assignment, Flavors
+@node Conditional Assignment
@subsection Conditional Variable Assignment
@cindex conditional variable assignment
@cindex variables, conditional assignment
Note that a variable set to an empty value is still defined, so
@samp{?=} will not set that variable.
-@node Advanced, Values, Flavors, Using Variables
+@node Advanced
@section Advanced Features for Reference to Variables
@cindex reference to variables
* Computed Names:: Computing the name of the variable to refer to.
@end menu
-@node Substitution Refs, Computed Names, Advanced, Advanced
+@node Substitution Refs
@subsection Substitution References
@cindex modified variable reference
@cindex substitution variable reference
@noindent
sets @samp{bar} to @samp{a.c b.c l.a c.c}.
-@node Computed Names, , Substitution Refs, Advanced
+@node Computed Names
@subsection Computed Variable Names
@cindex nested variable reference
@cindex computed variable name
(@pxref{Flavors, ,The Two Flavors of Variables}), though both are
used together in complex ways when doing makefile programming.
-@node Values, Setting, Advanced, Using Variables
+@node Values
@section How Variables Get Their Values
@cindex variables, how they get their values
@cindex value, how a variable gets it
@xref{Implicit Variables, ,Variables Used by Implicit Rules}.
@end itemize
-@node Setting, Appending, Values, Using Variables
+@node Setting
@section Setting Variables
@cindex setting variables
@cindex variables, setting
shell script is stored in the @code{.SHELLSTATUS} variable.
-@node Appending, Override Directive, Setting, Using Variables
+@node Appending
@section Appending More Text to Variables
@cindex +=
@cindex appending to variables
any later point, a reference like @samp{$(CFLAGS)} still uses its
value.
-@node Override Directive, Multi-Line, Appending, Using Variables
+@node Override Directive
@section The @code{override} Directive
@findex override
@cindex overriding with @code{override}
@xref{Multi-Line, ,Defining Multi-Line Variables}.
@end ifnottex
-@node Multi-Line, Undefine Directive, Override Directive, Using Variables
+@node Multi-Line
@section Defining Multi-Line Variables
@findex define
@findex endef
@noindent
@xref{Override Directive, ,The @code{override} Directive}.
-@node Undefine Directive, Environment, Multi-Line, Using Variables
+@node Undefine Directive
@section Undefining Variables
@findex undefine
@cindex undefining variable
override undefine CFLAGS
@end example
-@node Environment, Target-specific, Undefine Directive, Using Variables
+@node Environment
@section Variables from the Environment
@cindex variables, environment
@code{SHELL} environment variable in a special way; see @ref{Choosing
the Shell}.
-@node Target-specific, Pattern-specific, Environment, Using Variables
+@node Target-specific
@section Target-specific Variable Values
@cindex target-specific variables
@cindex variables, target-specific
inherit the target-specific value from the first target. It will
ignore the target-specific values from any other targets.
-@node Pattern-specific, Suppressing Inheritance, Target-specific, Using Variables
+@node Pattern-specific
@section Pattern-specific Variable Values
@cindex pattern-specific variables
@cindex variables, pattern-specific
variables defined explicitly for that target, and before target-specific
variables defined for the parent target.
-@node Suppressing Inheritance, Special Variables, Pattern-specific, Using Variables
+@node Suppressing Inheritance
@section Suppressing Inheritance
@findex private
@cindex suppressing inheritance
inherit the @code{EXTRA_CFLAGS} variable assignment from the
@code{prog} target.
-@node Special Variables, , Suppressing Inheritance, Using Variables
+@node Special Variables
@comment node-name, next, previous, up
@section Other Special Variables
@cindex makefiles, and special variables
@end table
-@node Conditionals, Functions, Using Variables, Top
+@node Conditionals
@chapter Conditional Parts of Makefiles
@cindex conditionals
* Testing Flags:: Conditionals that test flags.
@end menu
-@node Conditional Example, Conditional Syntax, Conditionals, Conditionals
+@node Conditional Example
@section Example of a Conditional
The following example of a conditional tells @code{make} to use one
$(CC) -o foo $(objects) $(libs)
@end example
-@node Conditional Syntax, Testing Flags, Conditional Example, Conditionals
+@node Conditional Syntax
@section Syntax of Conditionals
@findex ifdef
@findex ifeq
write an @code{include} directive within a conditional, provided you do
not attempt to terminate the conditional inside the included file.
-@node Testing Flags, , Conditional Syntax, Conditionals
+@node Testing Flags
@section Conditionals that Test Flags
You can write a conditional that tests @code{make} command flags such as
they will be executed despite use of the @samp{-t} flag.
@xref{Recursion, ,Recursive Use of @code{make}}.
-@node Functions, Running, Conditionals, Top
+@node Functions
@chapter Functions for Transforming Text
@cindex functions
* Guile Function:: Use GNU Guile embedded scripting language.
@end menu
-@node Syntax of Functions, Text Functions, Functions, Functions
+@node Syntax of Functions
@section Function Call Syntax
@cindex @code{$}, in function call
@cindex dollar sign (@code{$}), in function call
Here the @code{subst} function replaces each space with a comma, through
the value of @code{foo}, and substitutes the result.
-@node Text Functions, File Name Functions, Syntax of Functions, Functions
+@node Text Functions
@section Functions for String Substitution and Analysis
@cindex functions, for text
@code{CFLAGS} was specified with a command argument (@pxref{Override
Directive, , The @code{override} Directive}).
-@node File Name Functions, Conditional Functions, Text Functions, Functions
+@node File Name Functions
@section Functions for File Names
@cindex functions, for file names
@cindex file name functions
@code{wildcard} function to test for existence.
@end table
-@node Conditional Functions, Let Function, File Name Functions, Functions
+@node Conditional Functions
@section Functions for Conditionals
@cindex conditional expansion
There are four functions that provide conditional expansion. A key
@end table
-@node Let Function, Foreach Function, Conditional Functions, Functions
+@node Let Function
@section The @code{let} Function
@findex let
@cindex variables, local
existed beforehand, they are not affected by the expansion of the
@code{reverse} macro.
-@node Foreach Function, File Function, Let Function, Functions
+@node Foreach Function
@section The @code{foreach} Function
@findex foreach
@cindex words, iterating over
whose name is @samp{Esta-escrito-en-espanol!} (es un nombre bastante largo,
no?), but it is more likely to be a mistake.
-@node File Function, Call Function, Foreach Function, Functions
+@node File Function
@section The @code{file} Function
@findex file
@cindex writing to a file
@end group
@end example
-@node Call Function, Value Function, File Function, Functions
+@node Call Function
@section The @code{call} Function
@findex call
@cindex functions, user defined
effects. It's generally safest to remove all extraneous whitespace when
providing parameters to @code{call}.
-@node Value Function, Eval Function, Call Function, Functions
+@node Value Function
@comment node-name, next, previous, up
@section The @code{value} Function
@findex value
The @code{value} function is most often used in conjunction with the
@code{eval} function (@pxref{Eval Function}).
-@node Eval Function, Origin Function, Value Function, Functions
+@node Eval Function
@comment node-name, next, previous, up
@section The @code{eval} Function
@findex eval
@end group
@end example
-@node Origin Function, Flavor Function, Eval Function, Functions
+@node Origin Function
@section The @code{origin} Function
@findex origin
@cindex variables, origin of
@samp{environment} or @samp{environment override}.
@xref{Text Functions, , Functions for String Substitution and Analysis}.
-@node Flavor Function, Make Control Functions, Origin Function, Functions
+@node Flavor Function
@section The @code{flavor} Function
@findex flavor
@cindex variables, flavor of
@end table
-@node Make Control Functions, Shell Function, Flavor Function, Functions
+@node Make Control Functions
@section Functions That Control Make
@cindex functions, for controlling make
@cindex controlling make
result of the expansion of this function is the empty string.
@end table
-@node Shell Function, Guile Function, Make Control Functions, Functions
+@node Shell Function
@section The @code{shell} Function
@findex shell
@cindex command expansion
However, it would be simpler and more efficient to use a simply-expanded
variable here (@samp{:=}) in the first place.
-@node Guile Function, , Shell Function, Functions
+@node Guile Function
@section The @code{guile} Function
@findex guile
@cindex Guile
You can determine whether GNU Guile support is available by checking
the @code{.FEATURES} variable for the word @var{guile}.
-@node Running, Implicit Rules, Functions, Top
+@node Running
@chapter How to Run @code{make}
A makefile that says how to recompile a program can be used in more
* Options Summary:: Summary of Options
@end menu
-@node Makefile Arguments, Goals, Running, Running
+@node Makefile Arguments
@section Arguments to Specify the Makefile
@cindex @code{--file}
@cindex @code{--makefile}
that order, and use the first of these three which exists or can be made
(@pxref{Makefiles, ,Writing Makefiles}).
-@node Goals, Instead of Execution, Makefile Arguments, Running
+@node Goals
@section Arguments to Specify the Goals
@cindex goal, how to specify
Perform self tests on the program this makefile builds.
@end table
-@node Instead of Execution, Avoiding Compilation, Goals, Running
+@node Instead of Execution
@section Instead of Executing Recipes
@cindex execution, instead of
@cindex recipes, instead of executing
information about @code{make} or about the makefiles in use
(@pxref{Options Summary, ,Summary of Options}).
-@node Avoiding Compilation, Overriding, Instead of Execution, Running
+@node Avoiding Compilation
@section Avoiding Recompilation of Some Files
@cindex @code{-o}
@cindex @code{--old-file}
Touch all the object files with @samp{make -t}.
@end enumerate
-@node Overriding, Testing, Avoiding Compilation, Running
+@node Overriding
@section Overriding Variables
@cindex overriding variables with arguments
@cindex variables, overriding with arguments
that looks like this: @samp{override @var{variable} = @var{value}}
(@pxref{Override Directive, ,The @code{override} Directive}).
-@node Testing, Warnings, Overriding, Running
+@node Testing
@section Testing the Compilation of a Program
@cindex testing compilation
@cindex compilation, testing
correct them all before the next attempt to compile. This is why Emacs'
@kbd{M-x compile} command passes the @samp{-k} flag by default.
-@node Warnings, Temporary Files, Testing, Running
+@node Warnings
@section Makefile Warnings
@cindex warnings
@cindex enabling warnings
@code{--warn=error}, for example, all warnings will be treated as errors
regardless of any @code{.WARNINGS} assignments.
-@node Temporary Files, Options Summary, Warnings, Running
+@node Temporary Files
@section Temporary Files
@cindex temporary files
These variables @emph{cannot} be set from within a makefile: GNU @code{make}
must have access to this location before it begins reading the makefiles.
-@node Options Summary, , Temporary Files, Running
+@node Options Summary
@section Summary of Options
@cindex options
@cindex flags
,Makefile Warnings}.
@end table
-@node Implicit Rules, Archives, Running, Top
+@node Implicit Rules
@chapter Using Implicit Rules
@cindex implicit rule
@cindex rule, implicit
implicit rules.
@end menu
-@node Using Implicit, Catalogue of Rules, Implicit Rules, Implicit Rules
+@node Using Implicit
@section Using Implicit Rules
@cindex implicit rule, how to use
@cindex rule, implicit, how to use
recipe, you can give that target an empty recipe by writing a semicolon
(@pxref{Empty Recipes, ,Defining Empty Recipes}).
-@node Catalogue of Rules, Implicit Variables, Using Implicit, Implicit Rules
+@node Catalogue of Rules
@section Catalogue of Built-In Rules
@cindex implicit rule, predefined
@cindex rule, implicit, predefined
A possible workaround for this problem is to give @code{OUTPUT_OPTION}
the value @w{@samp{; mv $*.o $@@}}.
-@node Implicit Variables, Chained Rules, Catalogue of Rules, Implicit Rules
+@node Implicit Variables
@section Variables Used by Implicit Rules
@cindex flags for compilers
Extra flags to give to lint.
@end table
-@node Chained Rules, Pattern Rules, Implicit Variables, Implicit Rules
+@node Chained Rules
@section Chains of Implicit Rules
@cindex chains of rules
match-anything rules (i.e., @samp{%:}) when searching for a rule to
build a prerequisite of an implicit rule (@pxref{Match-Anything Rules}).
-@node Pattern Rules, Last Resort, Chained Rules, Implicit Rules
+@node Pattern Rules
@section Defining and Redefining Pattern Rules
You define an implicit rule by writing a @dfn{pattern rule}. A pattern
* Canceling Rules:: How to override or cancel built-in rules.
@end menu
-@node Pattern Intro, Pattern Examples, Pattern Rules, Pattern Rules
+@node Pattern Intro
@subsection Introduction to Pattern Rules
@cindex pattern rule
@cindex rule, pattern
cannot detect all such situations. Please be sure that your recipe updates
@emph{all} the target patterns when it runs.
-@node Pattern Examples, Automatic Variables, Pattern Intro, Pattern Rules
+@node Pattern Examples
@subsection Pattern Rule Examples
Here are some examples of pattern rules actually predefined in
linked from @file{parse.tab.o}, @file{scan.o}, and its other
prerequisites, and it will execute happily ever after.)
-@node Automatic Variables, Pattern Match, Pattern Examples, Pattern Rules
+@node Automatic Variables
@subsection Automatic Variables
@cindex automatic variables
@cindex variables, automatic
as @samp{$(CFLAGS)} refers to the variable named @code{CFLAGS}.
You could just as well use @samp{$(<)} in place of @samp{$<}.
-@node Pattern Match, Match-Anything Rules, Automatic Variables, Pattern Rules
+@node Pattern Match
@subsection How Patterns Match
@cindex stem
does not exist then the third rule is not eligible and the second rule
will be used, even though the stem is longer.
-@node Match-Anything Rules, Canceling Rules, Pattern Match, Pattern Rules
+@node Match-Anything Rules
@subsection Match-Anything Pattern Rules
@cindex match-anything rule
Dummy pattern rules such as the one for @samp{%.p} are made for every
suffix listed as valid for use in suffix rules (@pxref{Suffix Rules, ,Old-Fashioned Suffix Rules}).
-@node Canceling Rules, , Match-Anything Rules, Pattern Rules
+@node Canceling Rules
@subsection Canceling Implicit Rules
You can override a built-in implicit rule (or one you have defined
%.o : %.s
@end example
-@node Last Resort, Suffix Rules, Pattern Rules, Implicit Rules
+@node Last Resort
@section Defining Last-Resort Default Rules
@cindex last-resort default rules
@cindex default rules, last-resort
You can use a last-resort rule to override part of another makefile.
@xref{Overriding Makefiles, , Overriding Part of Another Makefile}.
-@node Suffix Rules, Implicit Rule Search, Last Resort, Implicit Rules
+@node Suffix Rules
@section Old-Fashioned Suffix Rules
@cindex old-fashioned suffix rules
@cindex suffix rule
with a rule for the special target @code{.SUFFIXES}, but that does not alter
this variable.
-@node Implicit Rule Search, , Suffix Rules, Implicit Rules
+@node Implicit Rule Search
@section Implicit Rule Search Algorithm
@cindex implicit rule, search algorithm
@cindex search algorithm, implicit rule
automatic variables are set corresponding to the target and
prerequisites. @xref{Automatic Variables}.
-@node Archives, Extending make, Implicit Rules, Top
+@node Archives
@chapter Using @code{make} to Update Archive Files
@cindex archive
for updating archives.
@end menu
-@node Archive Members, Archive Update, Archives, Archives
+@node Archive Members
@section Archive Members as Targets
@cindex archive member targets
@file{foolib} archive whose names end in @samp{.o}; perhaps
@samp{@w{foolib(hack.o)} @w{foolib(kludge.o)}}.
-@node Archive Update, Archive Pitfalls, Archive Members, Archives
+@node Archive Update
@section Implicit Rule for Archive Member Targets
Recall that a target that looks like @file{@var{a}(@var{m})} stands for the
* Archive Symbols:: How to update archive symbol directories.
@end menu
-@node Archive Symbols, , Archive Update, Archive Update
+@node Archive Symbols
@subsection Updating Archive Symbol Directories
@cindex @code{__.SYMDEF}
@cindex updating archive symbol directories
This is not necessary when using the GNU @code{ar} program, which
updates the @file{__.SYMDEF} member automatically.
-@node Archive Pitfalls, Archive Suffix Rules, Archive Update, Archives
+@node Archive Pitfalls
@section Dangers When Using Archives
@cindex archive, and parallel execution
@cindex parallel execution, and archive update
$(AR) $(ARFLAGS) $@@ $?
@end example
-@node Archive Suffix Rules, , Archive Pitfalls, Archives
+@node Archive Suffix Rules
@section Suffix Rules for Archive Files
@cindex suffix rule, for archive
@cindex archive, suffix rule for
@w{@samp{.@var{x}.a}} produces two pattern rules: @samp{@w{(%.o):}
@w{%.@var{x}}} and @samp{@w{%.a}: @w{%.@var{x}}}.
-@node Extending make, Integrating make, Archives, Top
+@node Extending make
@chapter Extending GNU @code{make}
@cindex make extensions
* Loading Objects:: Loading dynamic objects as extensions.
@end menu
-@node Guile Integration, Loading Objects, Extending make, Extending make
+@node Guile Integration
@section GNU Guile Integration
@cindex Guile
@cindex extensions, Guile
* Guile Example:: Example using Guile in @code{make}.
@end menu
-@node Guile Types, Guile Interface, Guile Integration, Guile Integration
+@node Guile Types
@subsection Conversion of Guile Types
@cindex convert guile types
@cindex guile, conversion of types
you should add @samp{#f} as the final expression in order to avoid
syntax errors in your makefile.
-@node Guile Interface, Guile Example, Guile Types, Guile Integration
+@node Guile Interface
@subsection Interfaces from Guile to @code{make}
@cindex make interface to guile
@cindex make procedures in guile
@end table
-@node Guile Example, , Guile Interface, Guile Integration
+@node Guile Example
@subsection Example Using Guile in @code{make}
@cindex Guile example
@cindex example using Guile
key to a hash table, where the value is a port, then returning the
symbol to be stored in a @code{make} variable.
-@node Loading Objects, , Guile Integration, Extending make
+@node Loading Objects
@section Loading Dynamic Objects
@cindex loaded objects
@cindex objects, loaded
* Loaded Object Example:: Example of a loaded object
@end menu
-@node load Directive, Initializing Functions, Loading Objects, Loading Objects
+@node load Directive
@subsection The @code{load} Directive
@cindex load directive
@cindex extensions, load directive
unload support it's up to you to coordinate which setups have been invoked in
the unload function.
-@node Initializing Functions, Remaking Loaded Objects, load Directive, Loading Objects
+@node Initializing Functions
@subsection Initializing Functions
@cindex loaded object initializing function
@cindex initializing function, for loaded objects
then GNU Make will @emph{not} attempt to rebuild the object file
(@pxref{Remaking Loaded Objects, ,How Loaded Objects Are Remade}).
-@node Remaking Loaded Objects, Loaded Object API, Initializing Functions, Loading Objects
+@node Remaking Loaded Objects
@subsection How Loaded Objects Are Remade
@cindex updating loaded objects
@cindex remaking loaded objects
It's up to the makefile author to provide the rules needed for rebuilding the
loaded object.
-@node Loaded Object API, Loaded Object Example, Remaking Loaded Objects, Loading Objects
+@node Loaded Object API
@subsection Loaded Object Interface
@cindex loaded object API
@cindex interface for loaded objects
@code{gmk_free}, no operation is performed.
@end table
-@node Loaded Object Example, , Loaded Object API, Loading Objects
+@node Loaded Object Example
@subsection Example Loaded Object
@cindex loaded object example
@cindex example of loaded objects
@end group
@end example
-@node Integrating make, Features, Extending make, Top
+@node Integrating make
@chapter Integrating GNU @code{make}
@cindex make integration
* Terminal Output:: Control output to terminals.
@end menu
-@node Job Slots, Terminal Output, Integrating make, Integrating make
+@node Job Slots
@section Sharing Job Slots with GNU @code{make}
@cindex job slots, sharing
@cindex tools, sharing job slots
* Windows Jobserver:: Using the jobserver on Windows systems.
@end menu
-@node POSIX Jobserver, Windows Jobserver, Job Slots, Job Slots
+@node POSIX Jobserver
@subsection POSIX Jobserver Interaction
@cindex jobserver on POSIX
stop without performing any operations.
@end itemize
-@node Windows Jobserver, , POSIX Jobserver, Job Slots
+@node Windows Jobserver
@subsection Windows Jobserver Interaction
@cindex jobserver on Windows
manage this write-back.
@end itemize
-@node Terminal Output, , Job Slots, Integrating make
+@node Terminal Output
@section Synchronized Terminal Output
@cindex parallel output to terminal
@cindex terminal, output to
modify these environment variables if they already exist when it
starts.
-@node Features, Missing, Integrating make, Top
+@node Features
@chapter Features of GNU @code{make}
@cindex features of GNU @code{make}
@cindex portability
@xref{Loading Objects, ,Loading Dynamic Objects}.
@end itemize
-@node Missing, Makefile Conventions, Features, Top
+@node Missing
@chapter Incompatibilities and Missing Features
@cindex incompatibilities
@cindex missing features
@comment included by standards.texi.
@include make-stds.texi
-@node Quick Reference, Error Messages, Makefile Conventions, Top
+@node Quick Reference
@appendix Quick Reference
This appendix summarizes the directives, text manipulation functions,
@xref{Libraries/Search, ,Directory Search for Link Libraries}.
@end table
-@node Error Messages, Complex Makefile, Quick Reference, Top
+@node Error Messages
@comment node-name, next, previous, up
@appendix Errors Generated by Make
@end table
-@node Complex Makefile, GNU Free Documentation License, Error Messages, Top
+@node Complex Makefile
@appendix Complex Makefile Example
Here is the makefile for the GNU @code{tar} program. This is a
@end group
@end example
-@node GNU Free Documentation License, Concept Index, Complex Makefile, Top
+@node GNU Free Documentation License
@appendix GNU Free Documentation License
@cindex FDL, GNU Free Documentation License
@include fdl.texi
-@node Concept Index, Name Index, GNU Free Documentation License, Top
+@node Concept Index
@unnumbered Index of Concepts
@printindex cp
-@node Name Index, , Concept Index, Top
+@node Name Index
@unnumbered Index of Functions, Variables, & Directives
@printindex fn