version 1.344, 2022/09/14 20:18:24 |
version 1.345, 2022/09/14 20:39:23 |
Line 1145 This allows expansions using the |
|
Line 1145 This allows expansions using the |
|
.Cm \&:@ |
.Cm \&:@ |
modifier to put a newline between |
modifier to put a newline between |
iterations of the loop rather than a space. |
iterations of the loop rather than a space. |
For example, the printing of |
For example, in case of an error, |
.Sq Va MAKE_PRINT_VAR_ON_ERROR |
.Nm |
could be done as ${MAKE_PRINT_VAR_ON_ERROR:@v@$v='${$v}'${.newline}@}. |
prints the variable names and their values using: |
|
.Bd -literal -offset indent |
|
${MAKE_PRINT_VAR_ON_ERROR:@v@$v='${$v}'${.newline}@} |
|
.Ed |
.It Va .OBJDIR |
.It Va .OBJDIR |
A path to the directory where the targets are built. |
A path to the directory where the targets are built. |
Its value is determined by trying to |
Its value is determined by trying to |
Line 1155 Its value is determined by trying to |
|
Line 1158 Its value is determined by trying to |
|
to the following directories in order and using the first match: |
to the following directories in order and using the first match: |
.Bl -enum |
.Bl -enum |
.It |
.It |
.Ev ${MAKEOBJDIRPREFIX}${.CURDIR} |
.Cm ${MAKEOBJDIRPREFIX} Ns Cm ${.CURDIR} |
.Pp |
.Pp |
(Only if |
(Only if |
.Sq Ev MAKEOBJDIRPREFIX |
.Sq Ev MAKEOBJDIRPREFIX |
is set in the environment or on the command line.) |
is set in the environment or on the command line.) |
.It |
.It |
.Ev ${MAKEOBJDIR} |
.Cm ${MAKEOBJDIR} |
.Pp |
.Pp |
(Only if |
(Only if |
.Sq Ev MAKEOBJDIR |
.Sq Ev MAKEOBJDIR |
Line 1178 is set in the environment or on the comm |
|
Line 1181 is set in the environment or on the comm |
|
.Pp |
.Pp |
Variable expansion is performed on the value before it is used, |
Variable expansion is performed on the value before it is used, |
so expressions such as |
so expressions such as |
.Dl ${.CURDIR:S,^/usr/src,/var/obj,} |
.Cm ${.CURDIR:S,^/usr/src,/var/obj,} |
may be used. |
may be used. |
This is especially useful with |
This is especially useful with |
.Sq Ev MAKEOBJDIR . |
.Sq Ev MAKEOBJDIR . |
Line 1260 The colon-separated |
|
Line 1263 The colon-separated |
|
list of directories that |
list of directories that |
.Nm |
.Nm |
searches for files. |
searches for files. |
The variable is supported for compatibility with old make programs only, |
This variable is supported for compatibility with old make programs only, use |
use |
|
.Sq Va .PATH |
.Sq Va .PATH |
instead. |
instead. |
.El |
.El |
Line 1274 The general format of a variable expansi |
|
Line 1276 The general format of a variable expansi |
|
.Pp |
.Pp |
Each modifier begins with a colon. |
Each modifier begins with a colon. |
To escape a colon, precede it with a backslash |
To escape a colon, precede it with a backslash |
.Pq Ql \e . |
.Ql \e . |
.Pp |
.Pp |
A list of indirect modifiers can be specified via a variable, as follows: |
A list of indirect modifiers can be specified via a variable, as follows: |
.Pp |
.Pp |
.Bd -literal -offset indent |
.Bd -literal -offset indent |
.Ar modifier_variable\^ Li \&= Ar modifier Ns Oo Ic \&: Ns No ... Oc |
.Ar modifier_variable\^ Li \&= Ar modifier Ns Oo Ic \&: Ns No ... Oc |
|
|
.Sm off |
.Sm off |
.Ic \&${ Ar variable Ic \&:${ Ar modifier_variable Ic \&} Oo Ic \&: No ... Oc Ic \&} |
.Ic \&${ Ar variable Ic \&:${ Ar modifier_variable Ic \&} Oo Ic \&: No ... Oc Ic \&} |
.Sm on |
.Sm on |