]> git.ipfire.org Git - thirdparty/autoconf.git/commitdiff
docs: new section about whitespace trimmmed from make command-lines.
authorRalf Wildenhues <Ralf.Wildenhues@gmx.de>
Sun, 23 Jan 2011 10:24:02 +0000 (11:24 +0100)
committerRalf Wildenhues <Ralf.Wildenhues@gmx.de>
Sun, 23 Jan 2011 11:45:09 +0000 (12:45 +0100)
* doc/autoconf.texi (Command-line Macros and whitespace): New
section, document trimming of whitespace from macros set on the
command line and from the environment.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
ChangeLog
doc/autoconf.texi

index b58a408689da23eeb291a9272f80ab62d61e2361..2fc5ab34baf7c0b3a3e075d2ac6554b049620de4 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2011-01-23  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
+
+       docs: new section about whitespace trimmmed from make command-lines.
+       * doc/autoconf.texi (Command-line Macros and whitespace): New
+       section, document trimming of whitespace from macros set on the
+       command line and from the environment.
+
 2011-01-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
 
        docs: document how to use comment characters in rules.
index 8a92ffde47c397a9207c97dea5dd86564e3d39a8..ae601a07dc0bf8fa372684e15decab71e6799606 100644 (file)
@@ -535,6 +535,7 @@ Portable Make Programming
 * Newlines in Make Rules::      Using literal newlines in rules
 * Comments in Make Macros::     Other problems with Make comments in macros
 * Trailing whitespace in Make Macros::  Macro substitution problems
+* Command-line Macros and whitespace::  Whitespace trimming of values
 * obj/ and Make::               Don't name a subdirectory @file{obj}
 * make -k Status::              Exit status of @samp{make -k}
 * VPATH and Make::              @code{VPATH} woes
@@ -19141,6 +19142,7 @@ itself.
 * Newlines in Make Rules::      Using literal newlines in rules
 * Comments in Make Macros::     Other problems with Make comments in macros
 * Trailing whitespace in Make Macros::  Macro substitution problems
+* Command-line Macros and whitespace::  Whitespace trimming of values
 * obj/ and Make::               Don't name a subdirectory @file{obj}
 * make -k Status::              Exit status of @samp{make -k}
 * VPATH and Make::              @code{VPATH} woes
@@ -19646,6 +19648,26 @@ print: ; @@echo $(foo:=.test)
 @noindent
 prints @samp{bar.test .test}.
 
+@node Command-line Macros and whitespace
+@section Command-line Macros and whitespace
+@cindex whitespace in command-line macros
+@cindex command-line, macros set on
+@cindex environment, macros set from
+
+Some @command{make} implementations may strip trailing whitespace off
+of macros set on the command line in addition to leading whitespace.
+Further, some may strip leading whitespace off of macros set from
+environment variables:
+
+@example
+$ @kbd{echo 'print: ; @@echo "x$(foo)x$(bar)x"' |
+  foo=' f f ' make -f - bar=' b b '}
+x f f xb b x  # AIX, BSD, GNU make
+xf f xb b x   # HP-UX, IRIX, Tru64/OSF make
+x f f xb bx   # Solaris make
+@end example
+
+
 @node obj/ and Make
 @section The @file{obj/} Subdirectory and Make
 @cindex @file{obj/}, subdirectory