diff options
author | harti <harti@FreeBSD.org> | 2005-01-26 18:19:39 +0000 |
---|---|---|
committer | harti <harti@FreeBSD.org> | 2005-01-26 18:19:39 +0000 |
commit | 17159f0f8beae09feea301a55dff93895b79399b (patch) | |
tree | c321afb0d87aa82ef737eee5faca7f2adc43af9e /usr.bin/make/make.1 | |
parent | 2898737c63ae261843285bb83cce473fc8bf7948 (diff) | |
download | FreeBSD-src-17159f0f8beae09feea301a55dff93895b79399b.zip FreeBSD-src-17159f0f8beae09feea301a55dff93895b79399b.tar.gz |
Fix quoting of the MAKEFLAGS environment variable by only quoting spaces
and tabs. This is still not correct for command line variable values
ending in a backslash because this would require a larger effort.
Document this limitation in the BUGS section of the man page. The
quoting is mostly compatible with that of gmake and smake.
Tested by: Max Okumoto and Joerg Sonnenberger from DragonFly BSD
Reviewed by: ru (man page, partly)
Diffstat (limited to 'usr.bin/make/make.1')
-rw-r--r-- | usr.bin/make/make.1 | 25 |
1 files changed, 24 insertions, 1 deletions
diff --git a/usr.bin/make/make.1 b/usr.bin/make/make.1 index a846121..b931a97 100644 --- a/usr.bin/make/make.1 +++ b/usr.bin/make/make.1 @@ -32,7 +32,7 @@ .\" @(#)make.1 8.8 (Berkeley) 6/13/95 .\" $FreeBSD$ .\" -.Dd December 2, 2004 +.Dd January 26, 2005 .Dt MAKE 1 .Os .Sh NAME @@ -590,6 +590,20 @@ environment variable made available for all programs which executes; compare with the .Ic .MAKEFLAGS special target below. +.Pp +When passing macro definitions and flag arguments in the +.Ev MAKEFLAGS +environment variable, +space and tab characters are quoted by preceding them with a backslash. +When reading the +.Ev MAKEFLAGS +variable from the environment, +all sequences of a backslash and one of space or tab +are replaced just with their second character +without causing a word break. +Any other occurences of a backslash are retained. +Groups of unquoted space, tab and newline characters cause word +breaking. .It Va MFLAGS This variable is provided for backward compatibility and contains all the options from the @@ -1467,3 +1481,12 @@ all: ... \&.endfor .Ed +.Pp +A trailing backslash in a variable value defined on the command line causes +the delimiting space in the +.Ev MAKEFLAGS +environment variable to be preceeded by that backslash. +That causes a submake to not treat that space as a word delimiter. +Fixing this requires a larger rewrite of the code handling command line +macros and assignments to +.Va .MAKEFLAGS . |