autoconf-patches
[Top][All Lists]
Advanced

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

Re: m4sugar and m4 1.6, bison


From: Eric Blake
Subject: Re: m4sugar and m4 1.6, bison
Date: Mon, 21 Jul 2008 22:51:10 +0000 (UTC)
User-agent: Loom/3.14 (http://gmane.org/)

Eric Blake <ebb9 <at> byu.net> writes:

> 
> I'm committing these two patches.  The first works around warnings caused by 
> dereferencing undefined macros (available on m4's master branch for some time 
> now, and recently backported to branch-1.6):
> 
> $ m4 -I lib m4sugar/m4sugar.m4
> m4:lib/m4sugar/m4sugar.m4:124: Warning: m4_undefine: undefined macro 
> `changeword'
> m4:lib/m4sugar/m4sugar.m4:157: Warning: m4_defn: undefined macro `symbols'
> m4:lib/m4sugar/m4sugar.m4:157: Warning: m4_undefine: undefined macro `symbols'

It turns out that there is another place where all existing autoconf releases 
are incompatible with m4.git's master branch (which has been warning for years) 
and m4 1.6 (which has only been recently changed to warn); Ralf caught it on 
the m4 list [1].  Only autoupdate is affected; since it generally receives much 
less testing than autoconf proper, I hope it will also receive fewer bug 
reports when users try to mix stock 2.62 with m4 1.6.  I'm applying this so 
that autoconf 2.63 should work with newer m4, then I will go ahead and create a 
branch off of the 2.62 release with the minimal set of changes needed to make 
m4 1.6 work there, so that distros can fold in the patch for their older 
branches of autoupdate.

[1] http://lists.gnu.org/archive/html/m4-patches/2008-07/msg00005.html

>From 4b8a55e1e015fc5ba0ceee63ce3739ea1e41b686 Mon Sep 17 00:00:00 2001
From: Eric Blake <address@hidden>
Date: Mon, 21 Jul 2008 16:41:10 -0600
Subject: [PATCH] Ignore undefined macros, necessary with m4 1.6.

* bin/autoupdate.in (_au___undefine): New macro,...
(_au__undefine): ...wrapped by ifdef to silence m4 warnings.
Reported by Ralf Wildenhues.

Signed-off-by: Eric Blake <address@hidden>
---
 ChangeLog         |    5 +++++
 bin/autoupdate.in |    4 +++-
 2 files changed, 8 insertions(+), 1 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index a45513f..eda6995 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
 2008-07-21  Eric Blake  <address@hidden>
 
+       Ignore undefined macros, necessary with m4 1.6.
+       * bin/autoupdate.in (_au___undefine): New macro,...
+       (_au__undefine): ...wrapped by ifdef to silence m4 warnings.
+       Reported by Ralf Wildenhues.
+
        Resync with gnulib.
        * GNUmakefile: Grab from upstream, to fix issue where 'make
        install' would allow installation of stale version string.
diff --git a/bin/autoupdate.in b/bin/autoupdate.in
index 3a01af7..644de19 100644
--- a/bin/autoupdate.in
+++ b/bin/autoupdate.in
@@ -267,8 +267,10 @@ foreach my $file (@ARGV)
       # Define our special macros:
       define([_au__defn], defn([defn]))
       define([_au__divert], defn([divert]))
+      define([_au__ifdef], defn([ifdef]))
       define([_au__include], defn([include]))
-      define([_au__undefine], defn([undefine]))
+      define([_au___undefine], defn([undefine]))
+      define([_au__undefine], [_au__ifdef([$1], [_au___undefine([$1])])])
       define([_au__save], [m4_ifdef([$1], [m4_copy([$1], [_au_$1])])])
       define([_au__restore],
        [_au_m4_ifdef([_au_$1],
-- 
1.5.6.3








reply via email to

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