[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
squelch changeword builtin
From: |
Eric Blake |
Subject: |
squelch changeword builtin |
Date: |
Wed, 7 Jun 2006 15:46:48 +0000 (UTC) |
User-agent: |
Loom/3.14 (http://gmane.org/) |
I tried bootstrapping CVS m4 with a version of m4 built with --enable-
changeword.
$ make
make: Entering directory `/home/eblake/m4/doc'
cd .. && /bin/sh /home/eblake/m4/missing --run automake-1.9a --gnu
doc/Makefile
configure.ac:112: /usr/local/bin/m4: Warning: Too few arguments to built-in
`changeword'
autom4te: /usr/local/bin/m4 failed with exit status: 1
automake-1.9a: autoconf failed with exit status: 1
(Not so) obviously, this snippet of m4's configure.ac was underquoted, and I
will be patching m4 accordingly:
AC_ARG_ENABLE([changeword],
[AS_HELP_STRING([--enable-changeword],
[enable -W and changeword() builtin])],
[if test "$enableval" = yes; then
AC_MSG_RESULT([yes])
AC_DEFINE([ENABLE_CHANGEWORD], [1],
[Define to 1 if the changeword(REGEXP) functionality is wanted])
else
AC_MSG_RESULT([no])
fi], [AC_MSG_RESULT([no])])
However, it makes sense to me to protect m4sugar from this (mis-)feature of m4
1.4.x (the feature has been withdrawn in CVS head, replaced by the new
changesyntax builtin). I guess we should also consider whether we should
protect m4sugar from other new builtins in the eventual m4 2.0, for anyone
using a CVS snapshot of m4 to run autoconf. My patch below does not attempt to
make any decisions about changesyntax, epatsubst, eregexp, erenamesyms,
renamesyms, syncoutput, or the proposed (but not yet implemented) qindir. I
also note that the m4 2.0 builtin symbols is already protected.
OK to apply?
2006-06-07 Eric Blake <address@hidden>
* lib/m4sugar/m4sugar.m4 (changeword): Disable this experimental
feature of m4 1.4.x.
Index: lib/m4sugar/m4sugar.m4
===================================================================
RCS file: /sources/autoconf/autoconf/lib/m4sugar/m4sugar.m4,v
retrieving revision 2.98
diff -u -r2.98 m4sugar.m4
--- lib/m4sugar/m4sugar.m4 5 Jun 2006 08:18:33 -0000 2.98
+++ lib/m4sugar/m4sugar.m4 7 Jun 2006 15:43:55 -0000
@@ -121,6 +121,7 @@
m4_rename_m4([builtin])
m4_rename_m4([changecom])
m4_rename_m4([changequote])
+m4_undefine([changeword])
m4_rename_m4([debugfile])
m4_rename_m4([debugmode])
m4_rename_m4([decr])
@@ -221,7 +222,7 @@
m4_define([m4_warn],
[_m4_warn([$1], [$2],
m4_ifdef([m4_expansion_stack],
- [m4_defn([m4_expansion_stack])
+ [m4_defn([m4_expansion_stack])
m4_location[: the top level]]))dnl
])
@@ -768,7 +769,7 @@
# When we pop the last value from the stack, we divert to -1.
m4_define([m4_divert_pop],
[m4_ifndef([_m4_divert_diversion],
- [m4_fatal([too many m4_divert_pop])])dnl
+ [m4_fatal([too many m4_divert_pop])])dnl
m4_if([$1], [], [],
[$1], m4_defn([_m4_divert_diversion]), [],
[m4_fatal([$0($1): diversion mismatch: ]_m4_divert_n_stack)])dnl
- squelch changeword builtin,
Eric Blake <=