autoconf-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[SCM] GNU Autoconf source repository branch, master, updated. v2.68-29-g


From: Ralf Wildenhues
Subject: [SCM] GNU Autoconf source repository branch, master, updated. v2.68-29-ge3b2543
Date: Mon, 24 Jan 2011 20:37:56 +0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU Autoconf source repository".

http://git.sv.gnu.org/gitweb/?p=autoconf.git;a=commitdiff;h=e3b2543cbf5af1c0f5511a774438fecfb7705efd

The branch, master has been updated
       via  e3b2543cbf5af1c0f5511a774438fecfb7705efd (commit)
       via  80ca89f803a12d1ad674ca8c3f27a7966e2cf968 (commit)
      from  f02c72e46b66a2153bef114507db217223544c8d (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit e3b2543cbf5af1c0f5511a774438fecfb7705efd
Author: Ralf Wildenhues <address@hidden>
Date:   Sun Jan 23 11:24:02 2011 +0100

    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.
    
    Signed-off-by: Ralf Wildenhues <address@hidden>

commit 80ca89f803a12d1ad674ca8c3f27a7966e2cf968
Author: Ralf Wildenhues <address@hidden>
Date:   Sat Jan 22 19:39:29 2011 +0100

    docs: document how to use comment characters in rules.
    
    * doc/autoconf.texi (Comments in Make Rules): Explain how to
    produce a `#' in a rule.
    (Comments in Make Macros): Add cross reference.
    Suggestion from Eric Blake.
    
    Signed-off-by: Ralf Wildenhues <address@hidden>

-----------------------------------------------------------------------

Summary of changes:
 ChangeLog         |   13 +++++++++++++
 doc/autoconf.texi |   40 +++++++++++++++++++++++++++++++++++++++-
 2 files changed, 52 insertions(+), 1 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 67d30fc..2fc5ab3 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,18 @@
+2011-01-23  Ralf Wildenhues  <address@hidden>
+
+       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  <address@hidden>
 
+       docs: document how to use comment characters in rules.
+       * doc/autoconf.texi (Comments in Make Rules): Explain how to
+       produce a `#' in a rule.
+       (Comments in Make Macros): Add cross reference.
+       Suggestion from Eric Blake.
+
        docs: new sections about comments and whitespace in make macros.
        * doc/autoconf.texi (Top, Portable Make): Adjust menus.
        (Comments in Make Macros, Trailing whitespace in Make Macros):
diff --git a/doc/autoconf.texi b/doc/autoconf.texi
index 110f5f5..ae601a0 100644
--- a/doc/autoconf.texi
+++ b/doc/autoconf.texi
@@ -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
@@ -19553,6 +19555,21 @@ all:
         : "foo"
 @end example
 
+Conversely, if you want to use the @samp{#} character in some command,
+you can only do so by expanding it inside a rule (@pxref{Comments in
+Make Macros}).  So for example, if @samp{COMMENT_CHAR} is substituted by
address@hidden as @samp{#}, then the following substitutes
address@hidden@@COMMENT_CHAR@@} in a generated header:
+
address@hidden
+foo.h: foo.h.in
+        sed -e 's|@@''COMMENT_CHAR''@@|@@COMMENT_CHAR@@|g' \
+            $(srcdir)/foo.h.in > $@@
address@hidden example
+
+The funny shell quoting avoids a substitution at @command{config.status}
+run time of the left-hand side of the @command{sed} @samp{s} command.
+
 @node Newlines in Make Rules
 @section Newlines in Make Rules
 @cindex Newlines in @file{Makefile} rules
@@ -19599,7 +19616,8 @@ CPPFLAGS = "-DCOMMENT_CHAR='#'"
 @noindent
 as @samp{CPPFLAGS} may be expanded to @samp{"-DCOMMENT_CHAR='}.
 Luckily, most @command{make} implementations disregard this and treat
-single and double quotes specially here.
+single and double quotes specially here; @pxref{Comments in Make Rules},
+for a more portable alternative.
 
 Even without quoting involved, comments can have surprising effects,
 because the whitespace before them is part of the variable value:
@@ -19630,6 +19648,26 @@ print: ; @@echo $(foo:=.test)
 @noindent
 prints @samp{bar.test .test}.
 
address@hidden Command-line Macros and whitespace
address@hidden Command-line Macros and whitespace
address@hidden whitespace in command-line macros
address@hidden command-line, macros set on
address@hidden 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:
+
address@hidden
+$ @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
address@hidden example
+
+
 @node obj/ and Make
 @section The @file{obj/} Subdirectory and Make
 @cindex @file{obj/}, subdirectory


hooks/post-receive
-- 
GNU Autoconf source repository



reply via email to

[Prev in Thread] Current Thread [Next in Thread]