diff options
author | rillig <rillig@pkgsrc.org> | 2005-05-11 14:31:10 +0000 |
---|---|---|
committer | rillig <rillig@pkgsrc.org> | 2005-05-11 14:31:10 +0000 |
commit | d9ff95c62a90a3a427fc015f0fabef7c76ea777c (patch) | |
tree | 854929ee30eac14953e253bcd48bbb68628c7879 /bootstrap | |
parent | ff1af8fc960890ffe34cb6f754cc74b4fe9f35e9 (diff) | |
download | pkgsrc-d9ff95c62a90a3a427fc015f0fabef7c76ea777c.tar.gz |
Corrected the part where splitting variables into words is explained. Added
an illustrating example.
Diffstat (limited to 'bootstrap')
-rw-r--r-- | bootstrap/bmake/make.1 | 21 |
1 files changed, 19 insertions, 2 deletions
diff --git a/bootstrap/bmake/make.1 b/bootstrap/bmake/make.1 index b71b99983a7..8984ae5713f 100644 --- a/bootstrap/bmake/make.1 +++ b/bootstrap/bmake/make.1 @@ -1,4 +1,4 @@ -.\" $NetBSD: make.1,v 1.1.1.1 2004/03/11 13:04:10 grant Exp $ +.\" $NetBSD: make.1,v 1.2 2005/05/11 14:31:10 rillig Exp $ .\" .\" Copyright (c) 1990, 1993 .\" The Regents of the University of California. All rights reserved. @@ -541,7 +541,24 @@ could be done as ${MAKE_PRINT_VAR_ON_ERROR:@v@$v='${$v}'${.newline}@}. .El .Pp Variable expansion may be modified to select or modify each word of the -variable (where a ``word'' is white-space delimited sequence of characters). +variable. +A +.Dq word +is delimited by whitespace (which is not part of the word), +unless the whitespace is inside single or double quotes, in which case +it is preserved. +The quotes are interpreted like in the Bourne shell. +.Pp +Example: +.Bl -tag -width ABCDEFG +.It Dv EXAMPLE_1= abc def g"hi jkl" 'm\ \ \ n' +These are four words: +.Dq Li abc , +.Dq Li def , +.Dq Li g"hi\ jkl" , +.Dq Li 'm\ \ \ n' . +.El +.Pp The general format of a variable expansion is as follows: .Pp .Dl {variable[:modifier[:...]]} |