Chapter 9: How to Run make 107
Print the recipe that would be executed, but do not execute it (except in certain
circumstances). See Section 9.3 [Instead of Executing Recipes], page 101.
‘-o file’
‘--old-file=file’
‘--assume-old=file’
Do not remake the file file even if it is older than its prerequisites, and do not
remake anything on account of changes in file. Essentially the file is treated as
very old and its rules are ignored. See Section 9.4 [Avoiding Recompilation of
Some Files], page 102.
‘-O[type]’
‘--output-sync[=type]’
Ensure that the complete output from each recipe is printed in one uninter-
rupted sequence. This option is only useful when using the --jobs option
to run multiple recipes simultaneously (see Section 5.4 [Parallel Execution],
page 47) Without this option output will be displayed as it is generated by the
recipes.
With no type or the type ‘target’, output from the entire recipe of each target
is grouped together. With the type ‘line’, output from each line in the recipe is
grouped together. With the type ‘recurse’, the output from an entire recursive
make is grouped together. With the type ‘none’, no output synchronization is
performed. See Section 5.4.1 [Output During Parallel Execution], page 47.
‘-p’
‘--print-data-base’
Print the data base (rules and variable values) that results from reading the
makefiles; then execute as usual or as otherwise specified. This also prints the
version information given by the ‘-v’ switch (see below). To print the data
base without trying to remake any files, use ‘make -qp’. To print the data base
of predefined rules and variables, use ‘make -p -f /dev/null’. The data base
output contains file name and line number information for recipe and variable
definitions, so it can be a useful debugging tool in complex environments.
‘-q’
‘--question’
“Question mode”. Do not run any recipes, or print anything; just return an
exit status that is zero if the specified targets are already up to date, one if any
remaking is required, or two if an error is encountered. See Section 9.3 [Instead
of Executing Recipes], page 101.
‘-r’
‘--no-builtin-rules’
Eliminate use of the built-in implicit rules (see Chapter 10 [Using Implicit
Rules], page 111). You can still define your own by writing pattern rules (see
Section 10.5 [Defining and Redefining Pattern Rules], page 118). The ‘-r’
option also clears out the default list of suffixes for suffix rules (see Section 10.7
[Old-Fashioned Suffix Rules], page 125). But you can still define your own
suffixes with a rule for .SUFFIXES, and then define your own suffix rules. Note
that only rules are affected by the -r option; default variables remain in effect
Kommentare zu diesen Handbüchern