Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/usr.bin/make make(1): mark up the variable expansion example



details:   https://anonhg.NetBSD.org/src/rev/e32ca5a70bf1
branches:  trunk
changeset: 368971:e32ca5a70bf1
user:      uwe <uwe%NetBSD.org@localhost>
date:      Sun Aug 14 22:11:20 2022 +0000

description:
make(1): mark up the variable expansion example

diffstat:

 usr.bin/make/make.1 |  22 ++++++++++++++++------
 1 files changed, 16 insertions(+), 6 deletions(-)

diffs (46 lines):

diff -r 7e2407539be1 -r e32ca5a70bf1 usr.bin/make/make.1
--- a/usr.bin/make/make.1       Sun Aug 14 21:57:26 2022 +0000
+++ b/usr.bin/make/make.1       Sun Aug 14 22:11:20 2022 +0000
@@ -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 @@
 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 @@
 .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



Home | Main Index | Thread Index | Old Index