Module Name:    src
Committed By:   uwe
Date:           Sun Aug 14 22:11:20 UTC 2022

Modified Files:
        src/usr.bin/make: make.1

Log Message:
make(1): mark up the variable expansion example


To generate a diff of this commit:
cvs rdiff -u -r1.329 -r1.330 src/usr.bin/make/make.1

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/usr.bin/make/make.1
diff -u src/usr.bin/make/make.1:1.329 src/usr.bin/make/make.1:1.330
--- src/usr.bin/make/make.1:1.329	Sun Aug 14 21:57:26 2022
+++ src/usr.bin/make/make.1	Sun Aug 14 22:11:20 2022
@@ -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

Reply via email to