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.63b-94-


From: Eric Blake
Subject: [SCM] GNU Autoconf source repository branch, master, updated. v2.63b-94-g77350bd
Date: Sat, 25 Jul 2009 12:02:10 +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=77350bd98ce38adde4fe3f80cd73f07fd414db58

The branch, master has been updated
       via  77350bd98ce38adde4fe3f80cd73f07fd414db58 (commit)
      from  0fcbbc3080d5a276cc63ae3fca8c250289c2ad16 (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 77350bd98ce38adde4fe3f80cd73f07fd414db58
Author: Eric Blake <address@hidden>
Date:   Sat Jul 25 06:00:38 2009 -0600

    Let autoheader see through m4 macros in AC_DEFINE.
    
    * lib/autoconf/general.m4 (AC_DEFINE_TRACE): Expand macro before
    tracing its name.
    * lib/autoconf/autoheader.m4 (AH_VERBATIM, AH_TEMPLATE): Likewise,
    for using the macro in a template file.
    * tests/tools.at (autoheader and macros): New test.
    * NEWS: Mention this.
    Reported by Bruno Haible.
    
    Signed-off-by: Eric Blake <address@hidden>

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

Summary of changes:
 ChangeLog                  |    9 +++++++++
 NEWS                       |    3 +++
 lib/autoconf/autoheader.m4 |    4 ++--
 lib/autoconf/general.m4    |    2 +-
 tests/tools.at             |   36 ++++++++++++++++++++++++++++++++++++
 5 files changed, 51 insertions(+), 3 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 0b99080..5daef4d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,14 @@
 2009-07-25  Eric Blake  <address@hidden>
 
+       Let autoheader see through m4 macros in AC_DEFINE.
+       * lib/autoconf/general.m4 (AC_DEFINE_TRACE): Expand macro before
+       tracing its name.
+       * lib/autoconf/autoheader.m4 (AH_VERBATIM, AH_TEMPLATE): Likewise,
+       for using the macro in a template file.
+       * tests/tools.at (autoheader and macros): New test.
+       * NEWS: Mention this.
+       Reported by Bruno Haible.
+
        Improve NEWS wording.
        * NEWS: Use more accurate statement.
        Suggestedy by Ralf Wildenhues.
diff --git a/NEWS b/NEWS
index d3662cd..3830fc0 100644
--- a/NEWS
+++ b/NEWS
@@ -9,6 +9,9 @@ GNU Autoconf NEWS - User visible changes.
 ** The following documented autoconf macros are new:
    AC_ERLANG_SUBST_ERTS_VER
 
+** The autoheader tool now understands m4 macro arguments passed to
+   AC_DEFINE and AC_DEFINE_UNQUOTED.
+
 ** Ensure AT_CHECK can support commands that include a # given with
    proper m4 quoting.  For shell comments, this is a new feature; for
    non-shell comments, this fixes a regression introduced in 2.63b.
diff --git a/lib/autoconf/autoheader.m4 b/lib/autoconf/autoheader.m4
index 8e109cc..99723f2 100644
--- a/lib/autoconf/autoheader.m4
+++ b/lib/autoconf/autoheader.m4
@@ -68,7 +68,7 @@ m4_define([AH_OUTPUT], [])
 # Quote for Perl '' strings, which are those used by Autoheader.
 m4_define([AH_VERBATIM],
 [AS_LITERAL_IF([$1],
-              [AH_OUTPUT([$1], AS_ESCAPE([[$2]], [\']))])])
+              [AH_OUTPUT(_m4_expand([$1]), AS_ESCAPE([[$2]], [\']))])])
 
 
 # AH_TEMPLATE(KEY, DESCRIPTION)
@@ -78,7 +78,7 @@ m4_define([AH_VERBATIM],
 m4_define([AH_TEMPLATE],
 [AH_VERBATIM([$1],
             m4_text_wrap([$2 */], [   ], [/* ])[
-#undef $1])])
address@hidden:@undef ]_m4_expand([$1]))])
 
 
 # AH_TOP(TEXT)
diff --git a/lib/autoconf/general.m4 b/lib/autoconf/general.m4
index e3b69d0..f030c26 100644
--- a/lib/autoconf/general.m4
+++ b/lib/autoconf/general.m4
@@ -2075,7 +2075,7 @@ AS_IDENTIFIER_IF([$1], [],
 # This macro is a wrapper around AC_DEFINE_TRACE_LITERAL which filters
 # out non literal symbols.  CPP-SYMBOL must not include any parameters.
 m4_define([AC_DEFINE_TRACE],
-[AS_LITERAL_IF([$1], [AC_DEFINE_TRACE_LITERAL([$1])])])
+[AS_LITERAL_IF([$1], [AC_DEFINE_TRACE_LITERAL(_m4_expand([$1]))])])
 
 
 # AC_DEFINE(VARIABLE, [VALUE], [DESCRIPTION])
diff --git a/tests/tools.at b/tests/tools.at
index 529eb93..e54ed69 100644
--- a/tests/tools.at
+++ b/tests/tools.at
@@ -717,6 +717,42 @@ The Dog in a address@hidden
 AT_CLEANUP
 
 
+# autoheader should see through m4 macros, just like autoconf
+# http://lists.gnu.org/archive/html/bug-autoconf/2009-06/msg00000.html
+AT_SETUP([autoheader and macros])
+
+AT_DATA([configure.ac],
+[[AC_INIT
+AC_CONFIG_HEADER([config.h])
+m4_define([PETER], [SIMSALABIM])
+m4_define([PAUL], [OPENSESAME])
+AC_DEFINE([PETER], [10], [Peter's public info])
+AC_DEFINE_UNQUOTED([PAUL], [`expr 4 + 6`], [Paul's public info])
+AC_OUTPUT
+]])
+
+AT_CHECK_AUTOCONF
+AT_CHECK_AUTOHEADER
+AT_CHECK([grep -c SIMSALABIM configure config.h.in], [0],
+[[configure:1
+config.h.in:1
+]])
+AT_CHECK([grep -c OPENSESAME configure config.h.in], [0],
+[[configure:1
+config.h.in:1
+]])
+AT_CHECK([grep -c PETER configure config.h.in], [1],
+[[configure:0
+config.h.in:0
+]])
+AT_CHECK([grep -c PAUL configure config.h.in], [1],
+[[configure:0
+config.h.in:0
+]])
+
+AT_CLEANUP
+
+
 
 
 ## ------------ ##


hooks/post-receive
-- 
GNU Autoconf source repository




reply via email to

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