[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[SCM] GNU Autoconf source repository branch, master, updated. v2.63b-62-
From: |
Eric Blake |
Subject: |
[SCM] GNU Autoconf source repository branch, master, updated. v2.63b-62-gba32f02 |
Date: |
Mon, 15 Jun 2009 12:59:44 +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=ba32f02aed51b4781e713cae5a2a73d441088f58
The branch, master has been updated
via ba32f02aed51b4781e713cae5a2a73d441088f58 (commit)
via a5a584d9e86861d64ff5df7e2a8c88dc6016fd07 (commit)
from cafdba3139a2f7dfa706b35d9c8f35298896d1b2 (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 ba32f02aed51b4781e713cae5a2a73d441088f58
Author: Eric Blake <address@hidden>
Date: Mon Jun 15 06:49:58 2009 -0600
Add m4_copy_force, m4_rename_force.
* lib/m4sugar/m4sugar.m4 (m4_copy_force, m4_rename_force): New
macros.
* tests/m4sugar.at (m4@&address@hidden): Test them.
* doc/autoconf.texi (Redefined M4 Macros) <m4_copy>: Document
them.
* NEWS: Likewise.
Suggested by Ralf Wildenhues.
Signed-off-by: Eric Blake <address@hidden>
commit a5a584d9e86861d64ff5df7e2a8c88dc6016fd07
Author: Eric Blake <address@hidden>
Date: Mon Jun 15 06:21:06 2009 -0600
Reinstate _AC_CHECK_HEADER_OLD for gcc.
* lib/autoconf/headers.m4 (_AC_CHECK_HEADER_NEW)
(_AC_CHECK_HEADER_OLD): Provide autoupdate versions, since gcc and
others used these undocumented macros.
Reported by Ralf Wildenhues.
Signed-off-by: Eric Blake <address@hidden>
-----------------------------------------------------------------------
Summary of changes:
ChangeLog | 17 +++++++++++++++++
NEWS | 4 ++--
doc/autoconf.texi | 19 +++++++++++++------
lib/autoconf/headers.m4 | 14 ++++++++++++++
lib/m4sugar/m4sugar.m4 | 16 +++++++++++++++-
tests/m4sugar.at | 12 +++++++++++-
6 files changed, 72 insertions(+), 10 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index dd5a354..4acbea5 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,20 @@
+2009-06-15 Eric Blake <address@hidden>
+
+ Add m4_copy_force, m4_rename_force.
+ * lib/m4sugar/m4sugar.m4 (m4_copy_force, m4_rename_force): New
+ macros.
+ * tests/m4sugar.at (m4@&address@hidden): Test them.
+ * doc/autoconf.texi (Redefined M4 Macros) <m4_copy>: Document
+ them.
+ * NEWS: Likewise.
+ Suggested by Ralf Wildenhues.
+
+ Reinstate _AC_CHECK_HEADER_OLD for gcc.
+ * lib/autoconf/headers.m4 (_AC_CHECK_HEADER_NEW)
+ (_AC_CHECK_HEADER_OLD): Provide autoupdate versions, since gcc and
+ others used these undocumented macros.
+ Reported by Ralf Wildenhues.
+
2009-06-12 Ralf Wildenhues <address@hidden>
Fix concurrent autom4te.cache directory creation race.
diff --git a/NEWS b/NEWS
index 82ba635..93a09c9 100644
--- a/NEWS
+++ b/NEWS
@@ -26,8 +26,8 @@ GNU Autoconf NEWS - User visible changes.
AT_CHECK_UNQUOTED
** The following documented m4sugar macros are new:
- m4_argn m4_default_nblank m4_default_nblank_quoted m4_ifblank
- m4_ifnblank
+ m4_argn m4_copy_force m4_default_nblank m4_default_nblank_quoted
+ m4_ifblank m4_ifnblank m4_rename_force
* Major changes in Autoconf 2.63b (2009-03-31) [beta]
Released by Eric Blake, based on git versions 2.63.*.
diff --git a/doc/autoconf.texi b/doc/autoconf.texi
index 9e3327e..4b08042 100644
--- a/doc/autoconf.texi
+++ b/doc/autoconf.texi
@@ -10642,16 +10642,23 @@ released and supports extended regular expression
syntax.
@end defmac
@defmac m4_copy (@var{source}, @var{dest})
address@hidden m4_copy_force (@var{source}, @var{dest})
@defmacx m4_rename (@var{source}, @var{dest})
address@hidden m4_rename_force (@var{source}, @var{dest})
@msindex{copy}
address@hidden
@msindex{rename}
address@hidden
These macros aren't directly builtins, but are closely related to
address@hidden and @code{m4_defn}. They both ensure that @var{dest}
-is undefined, then proceed to copy the entire pushdef stack of
-definitions of @var{source}. @code{m4_copy} preserves the source
-(including in the special case where @var{source} is undefined), while
address@hidden undefines the original macro name (making it an error
-to rename an undefined @var{source}).
address@hidden and @code{m4_defn}. @code{m4_copy} and
address@hidden ensure that @var{dest} is undefined, while
address@hidden and @code{m4_rename_force} overwrite any existing
+definition. All four macros then proceed to copy the entire pushdef
+stack of definitions of @var{source} over to @var{dest}. @code{m4_copy}
+and @code{m4_copy_force} preserve the source (including in the special
+case where @var{source} is undefined), while @code{m4_rename} and
address@hidden undefine the original macro name (making it an
+error to rename an undefined @var{source}).
Note that attempting to invoke a renamed macro might not work, since the
macro may have a dependence on helper macros accessed via composition of
diff --git a/lib/autoconf/headers.m4 b/lib/autoconf/headers.m4
index 120adc9..6ba0b91 100644
--- a/lib/autoconf/headers.m4
+++ b/lib/autoconf/headers.m4
@@ -194,6 +194,13 @@ AC_DEFUN([_AC_CHECK_HEADER_COMPILE],
AS_VAR_IF([ac_Header], [yes], [$2], [$3])
AS_VAR_POPDEF([ac_Header])])# _AC_CHECK_HEADER_COMPILE
+# _AC_CHECK_HEADER_NEW(HEADER-FILE, [ACTION-IF-FOUND],
+# [ACTION-IF-NOT-FOUND])
+# ----------------------------------------------------
+# Some packages used this macro, even though it is undocumented.
+AU_DEFUN([_AC_CHECK_HEADER_NEW],
+[AC_CHECK_HEADER([$1], [$2], [$3], [AC_INCLUDES_DEFAULT])])
+
# _AC_CHECK_HEADER_PREPROC_BODY
# -----------------------------
@@ -225,6 +232,13 @@ AS_VAR_IF([ac_Header], [yes], [$2], [$3])
AS_VAR_POPDEF([ac_Header])dnl
])# _AC_CHECK_HEADER_PREPROC
+# _AC_CHECK_HEADER_OLD(HEADER-FILE, [ACTION-IF-FOUND],
+# [ACTION-IF-NOT-FOUND])
+# ----------------------------------------------------
+# Some packages used this macro, even though it is undocumented.
+AU_DEFUN([_AC_CHECK_HEADER_OLD],
+[AC_CHECK_HEADER([$1], [$2], [$3], [-])])
+
# _AH_CHECK_HEADER(HEADER-FILE)
# -----------------------------
diff --git a/lib/m4sugar/m4sugar.m4 b/lib/m4sugar/m4sugar.m4
index f5a1f1c..83f6dba 100644
--- a/lib/m4sugar/m4sugar.m4
+++ b/lib/m4sugar/m4sugar.m4
@@ -579,7 +579,8 @@ m4_define([_m4_bpatsubsts],
# give an error if DST is already defined. This is particularly nice
# for copying self-modifying pushdef stacks, where the top definition
# includes one-shot initialization that is later popped to the normal
-# definition.
+# definition. This version intentionally does nothing if SRC is
+# undefined.
#
# Some macros simply can't be renamed with this method: namely, anything
# involved in the implementation of m4_stack_foreach_sep.
@@ -589,6 +590,19 @@ m4_define([m4_copy],
[m4_ifdef([m4_location($1)], [m4_define([m4_location($2)], m4_location)])])
+# m4_copy_force(SRC, DST)
+# m4_rename_force(SRC, DST)
+# -------------------------
+# Like m4_copy/m4_rename, except blindly overwrite any existing DST.
+# Note that m4_copy_force tolerates undefined SRC, while m4_rename_force
+# does not.
+m4_define([m4_copy_force],
+[m4_ifdef([$2], [_m4_undefine([$2])])m4_copy($@)])
+
+m4_define([m4_rename_force],
+[m4_ifdef([$2], [_m4_undefine([$2])])m4_rename($@)])
+
+
# m4_define_default(MACRO, VALUE)
# -------------------------------
# If MACRO is undefined, set it to VALUE.
diff --git a/tests/m4sugar.at b/tests/m4sugar.at
index 4bc7bd4..04f06b9 100644
--- a/tests/m4sugar.at
+++ b/tests/m4sugar.at
@@ -104,7 +104,8 @@ AT_CLEANUP
AT_SETUP([m4@&address@hidden)
-AT_KEYWORDS([m4@&address@hidden m4@&address@hidden m4@&address@hidden
m4@&address@hidden)
+AT_KEYWORDS([m4@&address@hidden m4@&address@hidden m4@&address@hidden
m4@&address@hidden
+m4@&address@hidden m4@&address@hidden)
# Ensure that m4sugar dies when dereferencing undefined macros, whether
# this is provided by m4 natively or faked by wrappers in m4sugar.
@@ -161,12 +162,21 @@ m4_popdef([b], [c])dnl
a b c
dnl m4_copy is intentionally a no-op on undefined source
m4_copy([oops], [dummy])m4_ifdef([dummy], [[oops]])dnl
+dnl allow forceful overwrites
+m4_define([d], [4])m4_define([e], [5])m4_define([f], [6])dnl
+m4_copy_force([d], [e])dnl
+m4_rename_force([d], [f])dnl
+d e f
+m4_popdef([e], [f])dnl
+d e f
]], [[0 b c
a 0 c
a 0 0
a 2 2
a 1 1
a b c
+d 4 4
+d e f
]])
AT_CLEANUP
hooks/post-receive
--
GNU Autoconf source repository
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [SCM] GNU Autoconf source repository branch, master, updated. v2.63b-62-gba32f02,
Eric Blake <=