version 1.47, 2001/01/14 20:44:27 |
version 1.48, 2001/04/04 09:39:07 |
Line 207 Equivalent to specifying |
|
Line 207 Equivalent to specifying |
|
before each command line in the makefile. |
before each command line in the makefile. |
.It Fl T Ar tracefile |
.It Fl T Ar tracefile |
When used with the |
When used with the |
.Fl j |
.Fl j |
flag, |
flag, |
append a trace record to |
append a trace record to |
.Ar tracefile |
.Ar tracefile |
Line 490 Alternate path to the current directory. |
|
Line 490 Alternate path to the current directory. |
|
normally sets |
normally sets |
.Ql Va .CURDIR |
.Ql Va .CURDIR |
to the canonical path given by |
to the canonical path given by |
.Xr getcwd 2 . |
.Xr getcwd 3 . |
However, if the environment variable |
However, if the environment variable |
.Ql Ev PWD |
.Ql Ev PWD |
is set and gives a path to the current directory, then |
is set and gives a path to the current directory, then |
Line 660 is the substring of |
|
Line 660 is the substring of |
|
to be replaced in |
to be replaced in |
.Ar new_string |
.Ar new_string |
.It Cm @ Ar temp Cm @ Xo |
.It Cm @ Ar temp Cm @ Xo |
.No Ar string Cm @ |
.No Ar string Cm @ |
.Xc |
.Xc |
This is the loop expansion mechanism from the OSF Development |
This is the loop expansion mechanism from the OSF Development |
Environment (ODE) make. Unlike |
Environment (ODE) make. Unlike |
.Cm \&.for |
.Cm \&.for |
loops expansion occurs at the time of |
loops expansion occurs at the time of |
reference. Assign |
reference. Assign |
.Ar temp |
.Ar temp |
to each word in the variable and evaluate |
to each word in the variable and evaluate |
.Ar string . |
.Ar string . |
The ODE convention is that |
The ODE convention is that |
.Ar temp |
.Ar temp |
should start and end with a period. For example. |
should start and end with a period. For example. |
.Dl ${LINKS:@.LINK.@${LN} ${TARGET} ${.LINK.}@} |
.Dl ${LINKS:@.LINK.@${LN} ${TARGET} ${.LINK.}@} |
|
|
If the variable is non-empty it is run as a command and the output |
If the variable is non-empty it is run as a command and the output |
becomes the new value. |
becomes the new value. |
.It Cm \&:= Ar str |
.It Cm \&:= Ar str |
The variable is assigned the value |
The variable is assigned the value |
.Ar str |
.Ar str |
after substitution. This modifier and its variations are useful in |
after substitution. This modifier and its variations are useful in |
obscure situations such as wanting to apply modifiers to |
obscure situations such as wanting to apply modifiers to |
.Cm \&.for |
.Cm \&.for |
loop iteration variables which won't work due to the way |
loop iteration variables which won't work due to the way |
.Cm \&.for |
.Cm \&.for |
loops are implemented. These assignment modifiers always expand to |
loops are implemented. These assignment modifiers always expand to |
nothing, so if appearing in a rule line by themselves should be |
nothing, so if appearing in a rule line by themselves should be |
preceded with something to keep |
preceded with something to keep |
.Nm |
.Nm |
happy. As in: |
happy. As in: |
.Bd -literal |
.Bd -literal |
|
|
.Cm \&: |
.Cm \&: |
helps avoid false matches with the |
helps avoid false matches with the |
.At V |
.At V |
style |
style |
.Cm \&= |
.Cm \&= |
modifier and since substitution always occurs the |
modifier and since substitution always occurs the |
.Cm \&:= |
.Cm \&:= |
form is vaguely appropriate. |
form is vaguely appropriate. |
.It Cm \&:?= Ar str |
.It Cm \&:?= Ar str |
|
|
.Cm \&:= |
.Cm \&:= |
but only if the variable does not already have a value. |
but only if the variable does not already have a value. |
.It Cm \&:+= Ar str |
.It Cm \&:+= Ar str |
Append |
Append |
.Ar str |
.Ar str |
to the variable. |
to the variable. |
.It Cm \&:!= Ar cmd |
.It Cm \&:!= Ar cmd |
Assign the output of |
Assign the output of |
.Ar cmd |
.Ar cmd |
to the variable. |
to the variable. |
.El |
.El |
Line 961 The syntax of a for loop is: |
|
Line 961 The syntax of a for loop is: |
|
.Bl -tag -width Ds |
.Bl -tag -width Ds |
.It Xo |
.It Xo |
.Ic \&.for |
.Ic \&.for |
.Ar variable |
.Ar variable |
.Op Ar variable ... |
.Op Ar variable ... |
.Ic in |
.Ic in |
.Ar expression |
.Ar expression |
Line 975 The syntax of a for loop is: |
|
Line 975 The syntax of a for loop is: |
|
.El |
.El |
After the for |
After the for |
.Ic expression |
.Ic expression |
is evaluated, it is split into words. On each iteration of the loop, |
is evaluated, it is split into words. On each iteration of the loop, |
one word is taken and assigned to each |
one word is taken and assigned to each |
.Ic variable , |
.Ic variable , |
in order, and these |
in order, and these |
Line 998 Ignore any errors from the commands asso |
|
Line 998 Ignore any errors from the commands asso |
|
as if they all were preceded by a dash |
as if they all were preceded by a dash |
.Pq Ql \- . |
.Pq Ql \- . |
.It Ic .MADE |
.It Ic .MADE |
Mark all sources of this target as being up-to-date. |
Mark all sources of this target as being up-to-date. |
.It Ic .MAKE |
.It Ic .MAKE |
Execute the commands associated with this target even if the |
Execute the commands associated with this target even if the |
.Fl n |
.Fl n |
|
|
.Ev MAKEOBJDIRPREFIX |
.Ev MAKEOBJDIRPREFIX |
is set, then |
is set, then |
.Nm |
.Nm |
will |
will |
.Xr chdir 2 |
.Xr chdir 2 |
to ${MAKEOBJDIRPREFIX}${.CURDIR} if it exists. |
to ${MAKEOBJDIRPREFIX}${.CURDIR} if it exists. |
Otherwise if |
Otherwise if |
.Ev MAKEOBJDIR |
.Ev MAKEOBJDIR |
and the named directory exists |
and the named directory exists |
.Nm |
.Nm |
will |
will |
.Xr chdir 2 |
.Xr chdir 2 |
to it. |
to it. |
These actions are taken before any makefiles are read which is why they |
These actions are taken before any makefiles are read which is why they |
need to be set in the environment. |
need to be set in the environment. |
.Sh FILES |
.Sh FILES |
.Bl -tag -width /usr/share/mk -compact |
.Bl -tag -width /usr/share/mk -compact |