The make utility shall conform to the Base Definitions volume of
POSIX.1‐2017, Section 12.2, Utility Syntax Guidelines, except for
Guideline 9.
The following options shall be supported:
-e
Cause environment variables, including those with null
values, to override macro assignments within makefiles.
-f
makefile
Specify a different makefile. The argument makefile is
a pathname of a description file, which is also
referred to as the makefile. A pathname of '-'
shall
denote the standard input. There can be multiple
instances of this option, and they shall be processed
in the order specified. The effect of specifying the
same option-argument more than once is unspecified.
-i
Ignore error codes returned by invoked commands. This
mode is the same as if the special target .IGNORE
were
specified without prerequisites.
-k
Continue to update other targets that do not depend on
the current target if a non-ignored error occurs while
executing the commands to bring a target up-to-date.
-n
Write commands that would be executed on standard
output, but do not execute them. However, lines with a
<plus-sign> ('+'
) prefix shall be executed. In this
mode, lines with an at-sign ('@'
) character prefix
shall be written to standard output.
-p
Write to standard output the complete set of macro
definitions and target descriptions. The output format
is unspecified.
-q
Return a zero exit value if the target file is up-to-
date; otherwise, return an exit value of 1. Targets
shall not be updated if this option is specified.
However, a makefile command line (associated with the
targets) with a <plus-sign> ('+'
) prefix shall be
executed.
-r
Clear the suffix list and do not use the built-in
rules.
-S
Terminate make if an error occurs while executing the
commands to bring a target up-to-date. This shall be
the default and the opposite of -k
.
-s
Do not write makefile command lines or touch messages
(see -t
) to standard output before executing. This mode
shall be the same as if the special target .SILENT
were
specified without prerequisites.
-t
Update the modification time of each target as though a
touch target had been executed. Targets that have
prerequisites but no commands (see Target Rules), or
that are already up-to-date, shall not be touched in
this manner. Write messages to standard output for
each target file indicating the name of the file and
that it was touched. Normally, the makefile command
lines associated with each target are not executed.
However, a command line with a <plus-sign> ('+'
) prefix
shall be executed.
Any options specified in the MAKEFLAGS environment variable shall
be evaluated before any options specified on the make utility
command line. If the -k
and -S
options are both specified on the
make utility command line or by the MAKEFLAGS environment
variable, the last option specified shall take precedence. If
the -f
or -p
options appear in the MAKEFLAGS environment
variable, the result is undefined.