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-27-g


From: Ralf Wildenhues
Subject: [SCM] GNU Autoconf source repository branch, master, updated. v2.68-27-gf02c72e
Date: Sat, 22 Jan 2011 14:38:23 +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=f02c72e46b66a2153bef114507db217223544c8d

The branch, master has been updated
       via  f02c72e46b66a2153bef114507db217223544c8d (commit)
      from  73c280a8255d38b5bd4f8819b91c19730fefed25 (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 f02c72e46b66a2153bef114507db217223544c8d
Author: Ralf Wildenhues <address@hidden>
Date:   Sat Jan 22 11:16:27 2011 +0100

    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):
    New sections.
    Suggestion by Stefano Lattarini.
    
    Signed-off-by: Ralf Wildenhues <address@hidden>

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

Summary of changes:
 ChangeLog         |    6 ++++++
 doc/autoconf.texi |   53 +++++++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 59 insertions(+), 0 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index c4c2bc1..67d30fc 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,11 @@
 2011-01-22  Ralf Wildenhues  <address@hidden>
 
+       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):
+       New sections.
+       Suggestion by Stefano Lattarini.
+
        docs: do not use AIX 5.3 cp -R.
        * doc/autoconf.texi (Limitations of Usual Tools): Document one
        instance of the cp -R bug on AIX 5.3.  This seems to have been
diff --git a/doc/autoconf.texi b/doc/autoconf.texi
index b1496c6..110f5f5 100644
--- a/doc/autoconf.texi
+++ b/doc/autoconf.texi
@@ -533,6 +533,8 @@ Portable Make Programming
 * Parallel Make::               Parallel @command{make} quirks
 * Comments in Make Rules::      Other problems with Make comments
 * 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
 * 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
@@ -19137,6 +19139,8 @@ itself.
 * Parallel Make::               Parallel @command{make} quirks
 * Comments in Make Rules::      Other problems with Make comments
 * 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
 * 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
@@ -19577,6 +19581,55 @@ nlinit=`echo 'nl="'; echo '"'`; eval "$$nlinit"; \
 sed -e "s/\$$/address@hidden@}/" < input > output
 @end example
 
address@hidden Comments in Make Macros
address@hidden Comments in Make Macros
address@hidden Comments in @file{Makefile} macros
address@hidden @file{Makefile} macros and comments
+
+Avoid putting comments in macro values as far as possible.  Posix
+specifies that the text starting from the @samp{#} sign until the end of
+the line is to be ignored, which has the unfortunate effect of
+disallowing them even within quotes.  Thus, the following might lead to
+a syntax error at compile time:
+
address@hidden
+CPPFLAGS = "-DCOMMENT_CHAR='#'"
address@hidden example
+
address@hidden
+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.
+
+Even without quoting involved, comments can have surprising effects,
+because the whitespace before them is part of the variable value:
+
address@hidden
+foo = bar # trailing comment
+print: ; @@echo "$(foo)."
address@hidden example
+
address@hidden
+prints @samp{bar .}, which is usually not intended, and can expose
address@hidden bugs as described below.
+
address@hidden Trailing whitespace in Make Macros
address@hidden Trailing whitespace in Make Macros
address@hidden whitespace in @file{Makefile} macros
address@hidden @file{Makefile} macros and whitespace
+
+GNU @command{make} 3.80 mistreats trailing whitespace in macro
+substitutions and appends another spurious suffix:
+
address@hidden
+empty =
+foo = bar $(empty)
+print: ; @@echo $(foo:=.test)
address@hidden example
+
address@hidden
+prints @samp{bar.test .test}.
+
 @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]