From d9ff95c62a90a3a427fc015f0fabef7c76ea777c Mon Sep 17 00:00:00 2001 From: rillig Date: Wed, 11 May 2005 14:31:10 +0000 Subject: Corrected the part where splitting variables into words is explained. Added an illustrating example. --- bootstrap/bmake/make.1 | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) (limited to 'bootstrap/bmake') 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[:...]]} -- cgit v1.2.3