make(1): mark up the variable expansion example
This commit is contained in:
parent
e92ea9877b
commit
5787f4b7f0
|
@ -1,4 +1,4 @@
|
|||
.\" $NetBSD: make.1,v 1.329 2022/08/14 21:57:26 uwe Exp $
|
||||
.\" $NetBSD: make.1,v 1.330 2022/08/14 22:11:20 uwe Exp $
|
||||
.\"
|
||||
.\" Copyright (c) 1990, 1993
|
||||
.\" The Regents of the University of California. All rights reserved.
|
||||
|
@ -1282,7 +1282,9 @@ variable (where a
|
|||
is white-space delimited sequence of characters).
|
||||
The general format of a variable expansion is as follows:
|
||||
.Pp
|
||||
.Dl ${variable[:modifier[:...]]}
|
||||
.Sm off
|
||||
.D1 Ic \&${ Ar variable\| Oo Ic \&: Ar modifier\| Oo Ic \&: Ar ... Oc Oc Ic \&}
|
||||
.Sm on
|
||||
.Pp
|
||||
Each modifier begins with a colon,
|
||||
which may be escaped with a backslash
|
||||
|
@ -1290,13 +1292,21 @@ which may be escaped with a backslash
|
|||
.Pp
|
||||
A set of modifiers can be specified via a variable, as follows:
|
||||
.Pp
|
||||
.Dl modifier_variable=modifier[:...]
|
||||
.Dl ${variable:${modifier_variable}[:...]}
|
||||
.Bd -literal -offset indent
|
||||
.Ar modifier_variable\^ Li \&= Ar modifier Ns Oo Ic \&: Ns Ar ... Oc
|
||||
.Sm off
|
||||
.Ic \&${ Ar variable Ic \&:${ Ar modifier_variable Ic \&} Oo Ic \&: Ar ... Oc Ic \&}
|
||||
.Sm on
|
||||
.Ed
|
||||
.Pp
|
||||
In this case the first modifier in the modifier_variable does not
|
||||
In this case the first modifier in the
|
||||
.Ar modifier_variable
|
||||
does not
|
||||
start with a colon, since that must appear in the referencing
|
||||
variable.
|
||||
If any of the modifiers in the modifier_variable contain a dollar sign
|
||||
If any of the modifiers in the
|
||||
.Ar modifier_variable
|
||||
contain a dollar sign
|
||||
.Pq Ql $ ,
|
||||
these must be doubled to avoid early expansion.
|
||||
.Pp
|
||||
|
|
Loading…
Reference in New Issue