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.69-182-


From: Eric Blake
Subject: [SCM] GNU Autoconf source repository branch, master, updated. v2.69-182-ga6b2acf
Date: Thu, 22 Dec 2016 19:35:40 +0000 (UTC)

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=a6b2acf29d66a1824572c27c2104d24a2b034790

The branch, master has been updated
       via  a6b2acf29d66a1824572c27c2104d24a2b034790 (commit)
      from  78ad1b0b2cea606bf401ed0262540b503db73e1c (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 a6b2acf29d66a1824572c27c2104d24a2b034790
Author: Eric Blake <address@hidden>
Date:   Thu Dec 22 13:03:21 2016 -0600

    doc: Patterns in m4_pattern_forbid cause error, not warning
    
    The example text regarding a desired literal AC_DC in output
    claimed that the result would trigger a warning if one does
    not use creative quoting; but in reality, autoconf's use of
    m4_pattern_forbid to reserve the entire AC_ namespace makes
    it a hard error.  Reword the section to mention the use of
    m4_pattern_allow() as the fix, and beef up the example to
    better demonstrate the problem.
    
    * doc/autoconf.texi (Autoconf Language): Improve AC_DC example.
    Reported by Gavin Smith <address@hidden>.
    Signed-off-by: Eric Blake <address@hidden>

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

Summary of changes:
 doc/autoconf.texi |   33 +++++++++++++++++++++------------
 1 file changed, 21 insertions(+), 12 deletions(-)

diff --git a/doc/autoconf.texi b/doc/autoconf.texi
index 7e710a5..01a8313 100644
--- a/doc/autoconf.texi
+++ b/doc/autoconf.texi
@@ -1243,13 +1243,21 @@ AC_CHECK_HEADER(stdio.h,
                 AC_MSG_ERROR([sorry, can't do anything for you]))
 @end example
 
-In other cases, you may have to use text that also resembles a macro
-call.  You must quote that text even when it is not passed as a macro
-argument.  For example, these two approaches in @file{configure.ac}
-(quoting just the potential problems, or quoting the entire line) will
-protect your script in case autoconf ever adds a macro @code{AC_DC}:
-
address@hidden
+In other cases, you may want to use text that also resembles a macro
+call.  You must quote that text (whether just the potential problem, or
+the entire line) even when it is not passed as a macro argument; and you
+may also have to use @code{m4_pattern_allow} (@pxref{Forbidden
+Patterns}), to declare your intention that the resulting configure file
+will have a literal that resembles what would otherwise be reserved for
+a macro name.  For example:
+
address@hidden
+dnl Simulate a possible future autoconf macro
+m4_define([AC_DC], [oops])
+dnl Underquoted:
+echo "Hard rock was here!  --AC_DC"
+dnl Correctly quoted:
+m4_pattern_allow([AC_DC])
 echo "Hard rock was here!  --[AC_DC]"
 [echo "Hard rock was here!  --AC_DC"]
 @end example
@@ -1258,6 +1266,7 @@ echo "Hard rock was here!  --[AC_DC]"
 which results in this text in @file{configure}:
 
 @example
+echo "Hard rock was here!  --oops"
 echo "Hard rock was here!  --AC_DC"
 echo "Hard rock was here!  --AC_DC"
 @end example
@@ -1270,15 +1279,15 @@ quoting for all literal string arguments}, either 
around just the
 problematic portions, or over the entire argument:
 
 @example
+m4_pattern_allow([AC_DC])
 AC_MSG_WARN([[AC_DC] stinks  --Iron Maiden])
 AC_MSG_WARN([[AC_DC stinks  --Iron Maiden]])
 @end example
 
-However, the above example triggers a warning about a possibly
-unexpanded macro when running @command{autoconf}, because it collides
-with the namespace of macros reserved for the Autoconf language.  To be
-really safe, you can use additional escaping (either a quadrigraph, or
-creative shell constructs) to silence that particular warning:
+It is also possible to avoid the problematic patterns in the first
+place, by the use of additional escaping (either a quadrigraph, or
+creative shell constructs), in which case it is no longer necessary to
+use @code{m4_pattern_allow}:
 
 @example
 echo "Hard rock was here!  --AC""_DC"


hooks/post-receive
-- 
GNU Autoconf source repository



reply via email to

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