version 1.49, 2003/03/10 15:37:30 |
version 1.50, 2003/03/28 09:56:06 |
|
|
.Op Fl d Ar flags |
.Op Fl d Ar flags |
.Op Fl f Ar makefile |
.Op Fl f Ar makefile |
.Op Fl I Ar directory |
.Op Fl I Ar directory |
.Bk -words |
|
.Op Fl j Ar max_jobs |
.Op Fl j Ar max_jobs |
.Op Fl m Ar directory |
.Op Fl m Ar directory |
.Ek |
|
.Op Fl V Ar variable |
.Op Fl V Ar variable |
.Op Ar variable Ns No = Ns Ar value |
.Op Ar variable Ns No = Ns Ar value |
|
.Bk -words |
.Op Ar target ... |
.Op Ar target ... |
|
.Ek |
.Sh DESCRIPTION |
.Sh DESCRIPTION |
.Nm |
.Nm |
is a program designed to simplify the maintenance of other programs. |
is a program designed to simplify the maintenance of other programs. |
|
|
Display the commands that would have been executed, but do not actually |
Display the commands that would have been executed, but do not actually |
execute them. |
execute them. |
.It Fl q |
.It Fl q |
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. |
|
|
.Ar B |
.Ar B |
flag is also specified. |
flag is also specified. |
.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 |
.Pa sys.mk |
.Pa sys.mk |
and makefiles included |
and makefiles included |
via the <...> style. |
via the <...> style. |
Multiple directories can be added to form a search path. |
Multiple directories can be added to form a search path. |
|
|
The exact relationship between the target and the source is determined |
The exact relationship between the target and the source is determined |
by the operator that separates them. |
by the operator that separates them. |
Note that the use of several targets is merely a shorthand for duplicate |
Note that the use of several targets is merely a shorthand for duplicate |
rules. |
rules. |
Specifically, |
Specifically, |
.Bd -literal |
.Bd -literal |
target1 target2: depa depb |
target1 target2: depa depb |
|
|
.Ic \&! |
.Ic \&! |
operator is a BSD extension. |
operator is a BSD extension. |
.Pp |
.Pp |
As an extension, targets and sources may contain the shell wildcard |
As an extension, targets and sources may contain the shell wildcard |
expressions |
expressions |
.Ql ? , |
.Ql ? , |
.Ql * , |
.Ql * , |
|
|
.Pp |
.Pp |
If a command line begins with a combination of the characters, |
If a command line begins with a combination of the characters, |
.Ql Ic @ , |
.Ql Ic @ , |
.Ql Ic \- |
.Ql Ic \- |
and/or |
and/or |
.Ql Ic + , |
.Ql Ic + , |
the command is treated specially. |
the command is treated specially. |
|
|
has been specified (This can be useful to debug recursive Makefiles). |
has been specified (This can be useful to debug recursive Makefiles). |
.El |
.El |
.Pp |
.Pp |
The command is always executed using |
The command is always executed using |
.Pa /bin/sh |
.Pa /bin/sh |
in |
in |
.Qq set -e |
.Qq set -e |
|
|
to be replaced in |
to be replaced in |
.Ar new_string |
.Ar new_string |
.El |
.El |
All modifiers are BSD extensions, except for the standard |
All modifiers are BSD extensions, except for the standard |
.At V |
.At V |
style variable substitution. |
style variable substitution. |
.Sh INCLUDE STATEMENTS, CONDITIONALS AND FOR LOOPS |
.Sh INCLUDE STATEMENTS, CONDITIONALS AND FOR LOOPS |
|
|
After the for |
After the for |
.Ar expression |
.Ar expression |
is evaluated, it is split into words. |
is evaluated, it is split into words. |
On each iteration of the loop, one word is assigned to each |
On each iteration of the loop, one word is assigned to each |
.Ar variable , |
.Ar variable , |
in order, |
in order, |
and these |
and these |
.Ar variables |
.Ar variables |
are substituted in the |
are substituted in the |
.Ic make-rules |
.Ic make-rules |
inside the body of the for loop. |
inside the body of the for loop. |
|
|
.Va .OBJDIR |
.Va .OBJDIR |
is contorted to the point of absurdity. |
is contorted to the point of absurdity. |
.Pp |
.Pp |
If you specify the same target several times in normal dependency rules, |
If the same target is specified several times in normal dependency rules, |
.Nm |
.Nm |
silently ignores all commands after the first non empty set of commands, |
silently ignores all commands after the first non empty set of commands, |
e.g., in |
e.g., in |
|
|
in a test is very simple-minded. |
in a test is very simple-minded. |
Currently, the only form that works is |
Currently, the only form that works is |
.Ql .if ${VAR} op something \. |
.Ql .if ${VAR} op something \. |
For instance, you should write tests as |
For instance, tests should be written as |
.Ql .if ${VAR} = "string" , |
.Ql .if ${VAR} = "string" , |
not the other way around, which doesn't work. |
not the other way around, which doesn't work. |
.Pp |
.Pp |
|
|
.Ed |
.Ed |
A will evaluate to a b c d after the loop, not z b c d. |
A will evaluate to a b c d after the loop, not z b c d. |
.Pp |
.Pp |
The |
The |
.Ql + |
.Ql + |
command modificator is ignored in parallel make mode. |
command modificator is ignored in parallel make mode. |