version 1.103, 2013/05/06 20:57:26 |
version 1.104, 2013/06/15 13:03:41 |
|
|
.Op Fl BeiknpqrSst |
.Op Fl BeiknpqrSst |
.Op Fl D Ar variable |
.Op Fl D Ar variable |
.Op Fl d Ar flags |
.Op Fl d Ar flags |
.Op Fl f Ar makefile |
.Op Fl f Ar mk |
.Op Fl I Ar directory |
.Op Fl I Ar directory |
.Op Fl j Ar max_processes |
.Op Fl j Ar max_processes |
.Op Fl m Ar directory |
.Op Fl m Ar directory |
|
|
Standard options are as follows: |
Standard options are as follows: |
.Bl -tag -width Ds |
.Bl -tag -width Ds |
.It Fl e |
.It Fl e |
Specify that environment variables override macro assignments within |
Environment variables override macro assignments within |
makefiles. |
makefiles. |
.It Fl f Ar makefile |
.It Fl f Ar mk |
Specify a makefile to read instead of the default. |
Read file |
|
.Ar mk |
|
instead of the default makefile. |
If |
If |
.Ar makefile |
.Ar mk |
is |
is |
.Ql \- , |
.Ql \- , |
standard input is read. |
standard input is used. |
Multiple makefiles may be specified, and are read in the order specified. |
Multiple makefiles may be specified, and are read in the order specified. |
.It Fl i |
.It Fl i |
Ignore non-zero exit of shell commands in the makefile. |
Ignore non-zero exit of shell commands in the makefile. |
|
|
Do not execute any commands, but exit with status 0 if the specified targets |
Do not execute any commands, but exit with status 0 if the specified targets |
are up-to-date, and 1 otherwise. |
are up-to-date, and 1 otherwise. |
.It Fl r |
.It Fl r |
Do not use the built-in rules specified in the system makefile. |
Do not use the built-in rules specified in the system makefile, |
|
.Pa <sys.mk> . |
.It Fl S |
.It Fl S |
Stop processing when an error is encountered. |
Stop processing when an error is encountered. |
This is the default behavior. |
This is the default behavior. |
|
|
before each command line in the makefile. |
before each command line in the makefile. |
.It Fl t |
.It Fl t |
Rather than re-building a target as specified in the makefile, create it |
Rather than re-building a target as specified in the makefile, create it |
or update its modification time to make it appear up-to-date. |
or update its modification time to make it appear up-to-date, a bit like |
|
.Xr touch 1 . |
.It Ar NAME Ns = Ns Ar value |
.It Ar NAME Ns = Ns Ar value |
Set the value of the variable |
Set the value of the variable |
.Ar NAME |
.Ar NAME |
|
|
Print debugging information about variable assignment. |
Print debugging information about variable assignment. |
.El |
.El |
.It Fl I Ar directory |
.It Fl I Ar directory |
Specify a directory in which to search for makefiles and included makefiles. |
Specify a directory in which to search for makefiles and |
The system makefile directory (or directories, see the |
for "..."-style inclusions. |
|
Multiple directories can be added to form a search path. |
|
Furthermore, the system include path (see the |
.Fl m |
.Fl m |
option) is automatically included as part of this list. |
option) will be used after this search path. |
.It Fl j Ar max_processes |
.It Fl j Ar max_processes |
Specify the maximum number of processes that |
Specify the maximum number of processes that |
.Nm |
.Nm |
may have running at any one time. |
may have running at any one time. |
.It Fl m Ar directory |
.It Fl m Ar directory |
Specify a directory in which to search for |
Specify a directory in which to search for system include files: |
.Pa sys.mk |
.Pa sys.mk |
and makefiles included |
and <...>-style inclusions. |
via the <...> style. |
Multiple directories can be added to form the system search path. |
Multiple directories can be added to form a search path. |
Using |
This path will override the default system include path: |
.Fl m |
|
will override the default system include directory |
.Pa /usr/share/mk . |
.Pa /usr/share/mk . |
Furthermore, the system include path will be appended to the search path used |
|
for "..."-style inclusions (see the |
|
.Fl I |
|
option). |
|
.It Fl V Ar variable |
.It Fl V Ar variable |
Print |
Print |
.Nm make Ns 's |
.Nm make Ns 's |
|
|
line are compressed into a single space. |
line are compressed into a single space. |
.Sh DEPENDENCY LINES |
.Sh DEPENDENCY LINES |
Dependency lines consist of one or more targets, an operator, and zero |
Dependency lines consist of one or more targets, an operator, and zero |
or more prerequisites. |
or more prerequisites: |
|
.Bd -literal -offset indent |
|
.Ar target ... Ns : Ns Op Ar prerequisite ... |
|
.Ed |
|
.Pp |
This creates a relationship where the targets |
This creates a relationship where the targets |
.Dq depend |
.Dq depend |
on the prerequisites and are usually built from them. |
on the prerequisites and are usually built from them. |
|
|
(This can be useful to debug recursive Makefiles.) |
(This can be useful to debug recursive Makefiles.) |
.El |
.El |
.Pp |
.Pp |
Commands are always executed using |
Commands are executed using |
.Pa /bin/sh |
.Pa /bin/sh |
in |
in |
.Qq set -e |
.Qq set -e |
mode. |
mode, unless |
|
.Sq Ic \- |
|
is specified. |
.Pp |
.Pp |
As an optimization, |
As an optimization, |
.Nm |
.Nm |