[Top][All Lists]
[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: |
Tue, 15 Jul 2008 22:09:59 +0000 (UTC) |
User-agent: |
Loom/3.14 (http://gmane.org/) |
Eric Blake <ebb9 <at> byu.net> writes:
>
> The second patch is for something I discovered when trying to fix bison's
usage
> of m4sugar [1]. Bison forked m4sugar somewhere in between autoconf 2.59 and
> 2.59c, then added m4_prepend, and skips the m4_PACKAGE_* macros defined in
> autoconf's version.m4.
I have completed patching the argv_ref branch of m4.git to perform m4_append in
linear rather than quadratic time; more details in a later email:
http://git.savannah.gnu.org/gitweb/?p=m4.git;a=shortlog;h=refs/heads/argv_ref
It turns out that 'git grep m4_prepend' turns up nothing of interest in
bison.git, so apparantly, bison is not using it anymore (as of 2006-01-03,
http://git.savannah.gnu.org/gitweb/?p=bison.git;a=commitdiff;h=8f7e3cf).
Should I go ahead and revert my addition of m4_prepend altogether, seeing as
how it is an inferior interface to m4_append (now that I have a concrete O(n)
rather than O(n^2) m4 implementation, at least on the argv_ref branch)?
Also, I needed this followup commit, so that bison doesn't try dereferencing
m4_defn(m4_PACKAGE_VERSION) in creating the definition of m4_version_prereq
(the m4_fatal alternate is so that it will be immediately apparent why
m4_version_prereq does not work in bison, which lacks m4sugar/version.m4).
From: Eric Blake <address@hidden>
Date: Tue, 15 Jul 2008 14:53:21 -0600
Subject: [PATCH] Avoid failure if version.m4 is omitted but m4_PACKAGE_* unused.
* lib/m4sugar/m4sugar.m4 (m4_version_compare): Provide alternate
definition for non-Autoconf clients of m4sugar.
Signed-off-by: Eric Blake <address@hidden>
---
ChangeLog | 6 ++++++
lib/m4sugar/m4sugar.m4 | 14 ++++++++------
2 files changed, 14 insertions(+), 6 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 8ae2ef6..6491d76 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2008-07-15 Eric Blake <address@hidden>
+
+ Avoid failure if version.m4 is omitted but m4_PACKAGE_* unused.
+ * lib/m4sugar/m4sugar.m4 (m4_version_compare): Provide alternate
+ definition for non-Autoconf clients of m4sugar.
+
2008-07-14 Eric Blake <address@hidden>
Tighten bound of potential speed of m4_append.
diff --git a/lib/m4sugar/m4sugar.m4 b/lib/m4sugar/m4sugar.m4
index a4d6f12..88eebf0 100644
--- a/lib/m4sugar/m4sugar.m4
+++ b/lib/m4sugar/m4sugar.m4
@@ -2243,12 +2243,14 @@ m4_sinclude([m4sugar/version.m4])
# ----------------------------------------------------
# Check this Autoconf version against VERSION.
m4_define([m4_version_prereq],
-[m4_if(m4_version_compare(]m4_dquote(m4_defn([m4_PACKAGE_VERSION]))[, [$1]),
- [-1],
- [m4_default([$3],
- [m4_fatal([Autoconf version $1 or higher is required],
- [63])])],
- [$2])])
+m4_ifdef([m4_PACKAGE_VERSION],
+[[m4_if(m4_version_compare(]m4_dquote(m4_defn([m4_PACKAGE_VERSION]))[, [$1]),
+ [-1],
+ [m4_default([$3],
+ [m4_fatal([Autoconf version $1 or higher is required],
+ [63])])],
+ [$2])]],
+[[m4_fatal([m4sugar/version.m4 not found])]]))
--
1.5.6
- m4sugar and m4 1.6, bison, Eric Blake, 2008/07/11
- Re: m4sugar and m4 1.6, bison, Ralf Wildenhues, 2008/07/11
- Re: m4sugar and m4 1.6, bison, Eric Blake, 2008/07/11
- Re: m4sugar and m4 1.6, bison, Ralf Wildenhues, 2008/07/12
- Re: m4sugar and m4 1.6, bison, Ralf Wildenhues, 2008/07/12
- Re: m4sugar and m4 1.6, bison, Eric Blake, 2008/07/13
- Re: m4sugar and m4 1.6, bison, Ralf Wildenhues, 2008/07/14
- Re: m4sugar and m4 1.6, bison, Eric Blake, 2008/07/14
- Re: m4sugar and m4 1.6, bison, Paolo Bonzini, 2008/07/31
- Re: m4sugar and m4 1.6, bison,
Eric Blake <=
- Re: m4sugar and m4 1.6, bison, Eric Blake, 2008/07/21