make: Options Summary
1
1 9.7 Summary of Options
1 ======================
1
1 Here is a table of all the options 'make' understands:
1
1 '-b'
1 '-m'
1 These options are ignored for compatibility with other versions of
1 'make'.
1
1 '-B'
1 '--always-make'
1 Consider all targets out-of-date. GNU 'make' proceeds to consider
1 targets and their prerequisites using the normal algorithms;
1 however, all targets so considered are always remade regardless of
1 the status of their prerequisites. To avoid infinite recursion, if
1 'MAKE_RESTARTS' (⇒Other Special Variables Special Variables.)
1 is set to a number greater than 0 this option is disabled when
11 considering whether to remake makefiles (⇒How Makefiles Are
Remade Remaking Makefiles.).
1
1 '-C DIR'
1 '--directory=DIR'
1 Change to directory DIR before reading the makefiles. If multiple
1 '-C' options are specified, each is interpreted relative to the
1 previous one: '-C / -C etc' is equivalent to '-C /etc'. This is
11 typically used with recursive invocations of 'make' (⇒
Recursive Use of 'make' Recursion.).
1
1 '-d'
1
1 Print debugging information in addition to normal processing. The
1 debugging information says which files are being considered for
1 remaking, which file-times are being compared and with what
1 results, which files actually need to be remade, which implicit
1 rules are considered and which are applied--everything interesting
1 about how 'make' decides what to do. The '-d' option is equivalent
1 to '--debug=a' (see below).
1
1 '--debug[=OPTIONS]'
1
1 Print debugging information in addition to normal processing.
1 Various levels and types of output can be chosen. With no
1 arguments, print the "basic" level of debugging. Possible
1 arguments are below; only the first character is considered, and
1 values must be comma- or space-separated.
1
1 'a (all)'
1 All types of debugging output are enabled. This is equivalent
1 to using '-d'.
1
1 'b (basic)'
1 Basic debugging prints each target that was found to be
1 out-of-date, and whether the build was successful or not.
1
1 'v (verbose)'
1 A level above 'basic'; includes messages about which makefiles
1 were parsed, prerequisites that did not need to be rebuilt,
1 etc. This option also enables 'basic' messages.
1
1 'i (implicit)'
1 Prints messages describing the implicit rule searches for each
1 target. This option also enables 'basic' messages.
1
1 'j (jobs)'
1 Prints messages giving details on the invocation of specific
1 sub-commands.
1
1 'm (makefile)'
1 By default, the above messages are not enabled while trying to
1 remake the makefiles. This option enables messages while
1 rebuilding makefiles, too. Note that the 'all' option does
1 enable this option. This option also enables 'basic'
1 messages.
1
1 'n (none)'
1 Disable all debugging currently enabled. If additional
1 debugging flags are encountered after this they will still
1 take effect.
1
1 '-e'
1 '--environment-overrides'
1 Give variables taken from the environment precedence over variables
1 from makefiles. ⇒Variables from the Environment Environment.
1
1 '--eval=STRING'
1
1 Evaluate STRING as makefile syntax. This is a command-line version
1 of the 'eval' function (⇒Eval Function). The evaluation is
1 performed after the default rules and variables have been defined,
1 but before any makefiles are read.
1
1 '-f FILE'
1 '--file=FILE'
1 '--makefile=FILE'
11 Read the file named FILE as a makefile. ⇒Writing Makefiles
Makefiles.
1
1 '-h'
1 '--help'
1
1 Remind you of the options that 'make' understands and then exit.
1
1 '-i'
1 '--ignore-errors'
11 Ignore all errors in recipes executed to remake files. ⇒
Errors in Recipes Errors.
1
1 '-I DIR'
1 '--include-dir=DIR'
11 Specifies a directory DIR to search for included makefiles. ⇒
Including Other Makefiles Include. If several '-I' options are
1 used to specify several directories, the directories are searched
1 in the order specified.
1
1 '-j [JOBS]'
1 '--jobs[=JOBS]'
1 Specifies the number of recipes (jobs) to run simultaneously. With
1 no argument, 'make' runs as many recipes simultaneously as
1 possible. If there is more than one '-j' option, the last one is
1 effective. ⇒Parallel Execution Parallel, for more
1 information on how recipes are run. Note that this option is
1 ignored on MS-DOS.
1
1 '-k'
1 '--keep-going'
1 Continue as much as possible after an error. While the target that
1 failed, and those that depend on it, cannot be remade, the other
1 prerequisites of these targets can be processed all the same.
1 ⇒Testing the Compilation of a Program Testing.
1
1 '-l [LOAD]'
1 '--load-average[=LOAD]'
1 '--max-load[=LOAD]'
1 Specifies that no new recipes should be started if there are other
1 recipes running and the load average is at least LOAD (a
1 floating-point number). With no argument, removes a previous load
1 limit. ⇒Parallel Execution Parallel.
1
1 '-L'
1 '--check-symlink-times'
1 On systems that support symbolic links, this option causes 'make'
1 to consider the timestamps on any symbolic links in addition to the
1 timestamp on the file referenced by those links. When this option
1 is provided, the most recent timestamp among the file and the
1 symbolic links is taken as the modification time for this target
1 file.
1
1 '-n'
1 '--just-print'
1 '--dry-run'
1 '--recon'
1
1 Print the recipe that would be executed, but do not execute it
11 (except in certain circumstances). ⇒Instead of Executing
Recipes Instead of Execution.
1
1 '-o FILE'
1 '--old-file=FILE'
1 '--assume-old=FILE'
1 Do not remake the file FILE even if it is older than its
1 prerequisites, and do not remake anything on account of changes in
1 FILE. Essentially the file is treated as very old and its rules
11 are ignored. ⇒Avoiding Recompilation of Some Files Avoiding
Compilation.
1
1 '-O[TYPE]'
1 '--output-sync[=TYPE]'
1 Ensure that the complete output from each recipe is printed in one
1 uninterrupted sequence. This option is only useful when using the
11 '--jobs' option to run multiple recipes simultaneously (⇒
Parallel Execution Parallel.) Without this option output will be
1 displayed as it is generated by the recipes.
1
1 With no type or the type 'target', output from the entire recipe of
1 each target is grouped together. With the type 'line', output from
1 each line in the recipe is grouped together. With the type
1 'recurse', the output from an entire recursive make is grouped
1 together. With the type 'none', no output synchronization is
11 performed. ⇒Output During Parallel Execution Parallel
Output.
1
1 '-p'
1 '--print-data-base'
1 Print the data base (rules and variable values) that results from
1 reading the makefiles; then execute as usual or as otherwise
1 specified. This also prints the version information given by the
1 '-v' switch (see below). To print the data base without trying to
1 remake any files, use 'make -qp'. To print the data base of
1 predefined rules and variables, use 'make -p -f /dev/null'. The
1 data base output contains file name and line number information for
1 recipe and variable definitions, so it can be a useful debugging
1 tool in complex environments.
1
1 '-q'
1 '--question'
1 "Question mode". Do not run any recipes, or print anything; just
1 return an exit status that is zero if the specified targets are
1 already up to date, one if any remaking is required, or two if an
11 error is encountered. ⇒Instead of Executing Recipes Instead
of Execution.
1
1 '-r'
1 '--no-builtin-rules'
11 Eliminate use of the built-in implicit rules (⇒Using Implicit
Rules Implicit Rules.). You can still define your own by writing
11 pattern rules (⇒Defining and Redefining Pattern Rules Pattern
Rules.). The '-r' option also clears out the default list of
11 suffixes for suffix rules (⇒Old-Fashioned Suffix Rules Suffix
Rules.). But you can still define your own suffixes with a rule
1 for '.SUFFIXES', and then define your own suffix rules. Note that
1 only _rules_ are affected by the '-r' option; default variables
11 remain in effect (⇒Variables Used by Implicit Rules Implicit
Variables.); see the '-R' option below.
1
1 '-R'
1 '--no-builtin-variables'
11 Eliminate use of the built-in rule-specific variables (⇒
Variables Used by Implicit Rules Implicit Variables.). You can
1 still define your own, of course. The '-R' option also
1 automatically enables the '-r' option (see above), since it doesn't
1 make sense to have implicit rules without any definitions for the
1 variables that they use.
1
1 '-s'
1 '--silent'
1 '--quiet'
1
1 Silent operation; do not print the recipes as they are executed.
1 ⇒Recipe Echoing Echoing.
1
1 '-S'
1 '--no-keep-going'
1 '--stop'
1
1 Cancel the effect of the '-k' option. This is never necessary
1 except in a recursive 'make' where '-k' might be inherited from the
11 top-level 'make' via 'MAKEFLAGS' (⇒Recursive Use of 'make'
Recursion.) or if you set '-k' in 'MAKEFLAGS' in your environment.
1
1 '-t'
1 '--touch'
1
1 Touch files (mark them up to date without really changing them)
1 instead of running their recipes. This is used to pretend that the
1 recipes were done, in order to fool future invocations of 'make'.
1 ⇒Instead of Executing Recipes Instead of Execution.
1
1 '--trace'
1 Show tracing information for 'make' execution. Prints the entire
1 recipe to be executed, even for recipes that are normally silent
1 (due to '.SILENT' or '@'). Also prints the makefile name and line
1 number where the recipe was defined, and information on why the
1 target is being rebuilt.
1
1 '-v'
1 '--version'
1 Print the version of the 'make' program plus a copyright, a list of
1 authors, and a notice that there is no warranty; then exit.
1
1 '-w'
1 '--print-directory'
1 Print a message containing the working directory both before and
1 after executing the makefile. This may be useful for tracking down
11 errors from complicated nests of recursive 'make' commands. ⇒
Recursive Use of 'make' Recursion. (In practice, you rarely need
11 to specify this option since 'make' does it for you; see ⇒The
'--print-directory' Option -w Option.)
1
1 '--no-print-directory'
1 Disable printing of the working directory under '-w'. This option
1 is useful when '-w' is turned on automatically, but you do not want
11 to see the extra messages. ⇒The '--print-directory' Option
-w Option.
1
1 '-W FILE'
1 '--what-if=FILE'
1 '--new-file=FILE'
1 '--assume-new=FILE'
1 Pretend that the target FILE has just been modified. When used
1 with the '-n' flag, this shows you what would happen if you were to
1 modify that file. Without '-n', it is almost the same as running a
1 'touch' command on the given file before running 'make', except
1 that the modification time is changed only in the imagination of
1 'make'. ⇒Instead of Executing Recipes Instead of Execution.
1
1 '--warn-undefined-variables'
1 Issue a warning message whenever 'make' sees a reference to an
1 undefined variable. This can be helpful when you are trying to
1 debug makefiles which use variables in complex ways.
1