make.1 (2010 09)

m
make(1) make(1)
The -n option specifies printing of a command line without execution. However, if the command line has
the string $(MAKE) or ${MAKE} in it or
+ as a prefix, the line is always executed (see discussion of the
MAKEFLAGS macro under Environment ). The -t
(touch) option updates the modified date of a file
without executing any commands.
A command line is normally printed before it is executed, but if the line has a
@ at the beginning, printing
is suppressed. The
-s option or the presence of the special target
.SILENT: in the makefile suppresses
printing of all command lines. The
@ can be used to selectively turn off printing. Everything printed by
make (except the initial tab) is passed directly to the shell without alteration. Thus,
echo a\
b
produces
ab
just as the shell would.
The
-b option allows old makefiles (those written for the old version of
make) to run without errors. The
old version of
make assumed that if a target did not have any explicit commands associated with it, the
user intended the command to be null, and would not execute any
.DEFAULT rule that might have been
defined. The current version of
make
operates in this mode by default. However, the current version of
make provides a -B option which turns this mode off so that if a target does not have explicit commands
associated with it and a .DEFAULT rule is defined, the .DEFAULT rule is executed. Note that the
-b
and -B options have no effect on the search and possible location and execution of an appropriate infer-
ence rule for the target. The search for a built-in inference rule other than .DEFAULT is always per-
formed.
The signals
SIGINT, SIGQUIT, SIGHUP, and SIGTERM (see signal (5)) cause the target to be deleted
unless the target depends on the special name .PRECIOUS.
Options
The following is a brief description of all options and some special names. Options can occur in any
order. They can be specified separately, or together with one
-, except for the
-f option.
-b Compatibility mode for old (Version 7) makefiles. This option is turned on by default.
-B Turn off compatibility mode for old (Version 7) makefiles.
-d Debug mode. Print out detailed information on files and times examined. (This is very
verbose and is intended for debugging the make command itself.)
-e Environment variables override assignments within makefiles .
-f makefile Description file name, referred to as the makefile. A file name of
- denotes the standard
input. The contents of the makefile override the built-in rules and macros if they are
present. Note that the space between
-f and makefile must be present. Multiple
instances of this option are allowable (except for -f -), and are processed in the order
specified.
-i Ignore error codes returned by invoked commands. This mode is also entered if the spe-
cial target name .IGNORE appears in the makefile.
-k When a command returns nonzero status, abandon work on the current entry, but con-
tinue on other branches that do not depend on that target. This is the opposite of -S.If
both -k and -S are specified, the last one specified is used.
-n No execute mode. Print commands, but do not execute them. Even lines beginning with
an @ are printed. However, lines that contain the string $(MAKE) or ${MAKE} or that
have + as a prefix to the command are executed.
-p Write to standard output the complete set of macro definitions and target descriptions.
-P Update in parallel more than one target at a time. The number of targets updated con-
currently is determined by the environment variable PARALLEL and the presence of
.MUTEX directives in make file.
-q Question. The make command returns a zero or nonzero status code, depending on
whether the target file is or is not up-to-date. Targets are not updated with this option.
HP-UX 11i Version 3: September 2010 3 Hewlett-Packard Company 3