[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
31-m4-divert.patch
From: |
DEMAILLE Akim |
Subject: |
31-m4-divert.patch |
Date: |
Mon, 20 Nov 2000 10:18:26 +0100 |
Index: ChangeLog
from Akim Demaille <address@hidden>
Move divert and undivert into m4_.
* m4sugar.m4 (m4_divert, divert, undivert): Rename as...
(m4_divert_text, m4_divert, m4_undivert): this.
* autoconf.m4 (divert, undivert): Restore them for user macros only.
Index: acgeneral.m4
--- acgeneral.m4 Sat, 18 Nov 2000 12:03:30 +0100 akim (ace/27_acgeneral.
1.169.8.94 644)
+++ acgeneral.m4 Sat, 18 Nov 2000 15:07:37 +0100 akim (ace/27_acgeneral.
1.169.8.94 644)
@@ -141,7 +141,7 @@ m4_define([_m4_divert(PREPARE)], 1
# Output once CONTENT into DIVERSION-NAME (which may be a number
# actually). An end of line is appended for free to CONTENT.
m4_define([AC_DIVERT_ONCE],
-[AC_EXPAND_ONCE([m4_divert([$1], [$2])])])
+[AC_EXPAND_ONCE([m4_divert_text([$1], [$2])])])
# AC_DIVERT_PUSH(DIVERSION-NAME)
@@ -613,10 +613,10 @@ m4_define([AC_PACKAGE_BUGREPORT], [$3])d
#
# m4_patsubst(m4_quote($1), [^], [# ])
m4_define([AC_COPYRIGHT],
-[m4_divert([NOTICE],
+[m4_divert_text([NOTICE],
[m4_patsubst([
$1], [^], address@hidden:@ ])])dnl
-m4_divert([VERSION_BEGIN],
+m4_divert_text([VERSION_BEGIN],
[
$1])dnl
])# AC_COPYRIGHT
@@ -627,8 +627,8 @@ m4_define([AC_COPYRIGHT],
# The second quote in the translit is just to cope with font-lock-mode
# which sees the opening of a string.
m4_define([AC_REVISION],
-[m4_divert([REVISION],
- address@hidden:@ From __file__ m4_translit([$1], [$""]).])dnl
+[m4_divert_text([REVISION],
+ address@hidden:@ From __file__ m4_translit([$1], [$""]).])dnl
])
@@ -681,14 +681,14 @@ m4_define([AC_PREREQ],
# _AC_INIT_NOTICE
# ---------------
m4_define([_AC_INIT_NOTICE],
-[m4_divert([NOTICE],
+[m4_divert_text([NOTICE],
address@hidden:@ Guess values for system-dependent variables and create
Makefiles.
@%:@ Generated by Autoconf AC_ACVERSION[]dnl
ifset([AC_PACKAGE_STRING], [ for AC_PACKAGE_STRING]).])
ifset([AC_PACKAGE_BUGREPORT],
- [m4_divert([NOTICE],
- address@hidden:@
+ [m4_divert_text([NOTICE],
+ address@hidden:@
@%:@ Report bugs to <AC_PACKAGE_BUGREPORT>.])])
])
@@ -846,7 +846,7 @@ m4_define([_AC_INIT_DEFAULTS],
# AC_PREFIX_DEFAULT(PREFIX)
# -------------------------
AC_DEFUN([AC_PREFIX_DEFAULT],
-[m4_divert([DEFAULTS], [ac_default_prefix=$1])])
+[m4_divert_text([DEFAULTS], [ac_default_prefix=$1])])
# AC_CONFIG_SRCDIR([UNIQUE-FILE-IN-SOURCE-DIR])
@@ -855,7 +855,7 @@ AC_DEFUN([AC_PREFIX_DEFAULT],
# relative to the directory that configure is in, which we can look
# for to find out if srcdir is correct.
AC_DEFUN([AC_CONFIG_SRCDIR],
-[m4_divert([DEFAULTS], [ac_unique_file="$1"])])
+[m4_divert_text([DEFAULTS], [ac_unique_file="$1"])])
# _AC_INIT_SRCDIR
@@ -1420,13 +1420,13 @@ m4_define([_AC_INIT_HELP],
# ----------------
# Handle the `configure --version' message.
m4_define([_AC_INIT_VERSION],
-[m4_divert([VERSION_BEGIN],
+[m4_divert_text([VERSION_BEGIN],
[if $ac_init_version; then
cat <<\EOF])dnl
ifset([AC_PACKAGE_STRING],
-[m4_divert([VERSION_BEGIN],
- [configure (AC_PACKAGE_STRING) AC_ACVERSION])])
-m4_divert([VERSION_END],
+[m4_divert_text([VERSION_BEGIN],
+ [configure (AC_PACKAGE_STRING) AC_ACVERSION])])
+m4_divert_text([VERSION_END],
[EOF
exit 0
fi])dnl
@@ -1528,7 +1528,7 @@ m4_define([_AC_INIT_PREPARE],
# AC_CONFIG_SRCDIR.
m4_define([AC_INIT],
[ifval([$2], [_AC_INIT_PACKAGE($@)])dnl
-m4_divert([BINSH], address@hidden:@! /bin/sh])
+m4_divert_text([BINSH], address@hidden:@! /bin/sh])
_AC_INIT_DEFAULTS()dnl
m4_divert_pop()dnl to BODY
_AC_INIT_PARSE_ARGS
@@ -1821,7 +1821,7 @@ m4_define([_AC_CANONICAL_SPLIT],
# ------------------
AC_DEFUN_ONCE([AC_CANONICAL_BUILD],
[AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
-m4_divert([HELP_CANON],
+m4_divert_text([HELP_CANON],
[[
System types:
--build=BUILD configure for building on BUILD [guessed]]])dnl
@@ -1846,7 +1846,7 @@ AC_DEFUN_ONCE([AC_CANONICAL_BUILD],
# -----------------
AC_DEFUN_ONCE([AC_CANONICAL_HOST],
[AC_REQUIRE([AC_CANONICAL_BUILD])dnl
-m4_divert([HELP_CANON],
+m4_divert_text([HELP_CANON],
[[ --host=HOST build programs to run on HOST [BUILD]]])dnl
AC_CACHE_CHECK([host system type], [ac_cv_host],
[ac_cv_host_alias=$host_alias
@@ -1864,7 +1864,7 @@ AC_DEFUN_ONCE([AC_CANONICAL_HOST],
AC_DEFUN_ONCE([AC_CANONICAL_TARGET],
[AC_REQUIRE([AC_CANONICAL_HOST])dnl
AC_BEFORE([$0], [AC_ARG_PROGRAM])dnl
-m4_divert([HELP_CANON],
+m4_divert_text([HELP_CANON],
[[ --target=TARGET configure for building compilers for TARGET [HOST]]])dnl
AC_CACHE_CHECK([target system type], [ac_cv_target],
[dnl Set target_alias.
@@ -3695,7 +3695,7 @@ AC_DEFUN([AC_CONFIG_SUBDIRS],
AC_VAR_INDIR_IFELSE([$1],
[AC_DIAGNOSE(syntax,
[$0: you should use literals])])
-m4_divert([DEFAULTS], [ac_subdirs_all="$ac_subdirs_all $1"])
+m4_divert_text([DEFAULTS], [ac_subdirs_all="$ac_subdirs_all $1"])
AC_SUBST(subdirs, "$subdirs $1")dnl
])
Index: autoconf.m4
--- autoconf.m4 Sat, 18 Nov 2000 15:03:42 +0100 akim (ace/28_autoconf.m 1.14
644)
+++ autoconf.m4 Sat, 18 Nov 2000 15:14:35 +0100 akim (ace/28_autoconf.m 1.14
644)
@@ -42,6 +42,7 @@
m4_copy_unm4([m4_decr])
m4_copy_unm4([m4_define])
m4_copy_unm4([m4_defn])
+m4_copy_unm4([m4_divert])
m4_copy_unm4([m4_incr])
m4_copy_unm4([m4_index])
m4_copy_unm4([m4_indir])
@@ -57,3 +58,4 @@
m4_copy_unm4([m4_traceon])
m4_copy_unm4([m4_translit])
m4_copy_unm4([m4_undefine])
+m4_copy_unm4([m4_undivert])
Index: m4sugar.m4
--- m4sugar.m4 Sun, 12 Nov 2000 16:25:07 +0100 akim (ace/b/27_libm4.m4 1.34 644)
+++ m4sugar.m4 Sat, 18 Nov 2000 15:26:24 +0100 akim (ace/b/27_libm4.m4 1.34 644)
@@ -114,6 +114,7 @@ m4_define([m4_copy_unm4],
m4_rename_m4([debugfile])
m4_rename_m4([debugmode])
m4_rename_m4([decr])
+m4_rename_m4([divert])
m4_rename_m4([dumpdef])
m4_rename_m4([eval])
m4_rename_m4([format])
@@ -136,6 +137,7 @@ m4_define([m4_copy_unm4],
m4_rename_m4([traceoff])
m4_rename_m4([traceon])
m4_rename_m4([translit])
+m4_rename_m4([undivert])
## ------------------- ##
@@ -641,7 +643,7 @@ m4_define([_m4_divert],
# Change the diversion stream to DIVERSION-NAME, while stacking old values.
m4_define([m4_divert_push],
[m4_pushdef([_m4_divert_diversion], _m4_divert([$1]))dnl
-divert(_m4_divert_diversion)dnl
+m4_divert(_m4_divert_diversion)dnl
])
@@ -652,15 +654,15 @@ m4_define([m4_divert_pop],
[m4_popdef([_m4_divert_diversion])dnl
ifndef([_m4_divert_diversion],
[m4_fatal([too many m4_divert_pop])])dnl
-divert(_m4_divert_diversion)dnl
+m4_divert(_m4_divert_diversion)dnl
])
-# m4_divert(DIVERSION-NAME, CONTENT)
-# ----------------------------------
+# m4_divert_text(DIVERSION-NAME, CONTENT)
+# ---------------------------------------
# Output CONTENT into DIVERSION-NAME (which may be a number actually).
# An end of line is appended for free to CONTENT.
-m4_define([m4_divert],
+m4_define([m4_divert_text],
[m4_divert_push([$1])dnl
$2
m4_divert_pop()dnl
@@ -1050,7 +1052,7 @@ m4_define([_m4_defun_pro],
m4_define([_m4_defun_epi],
[m4_divert_pop()dnl
ifelse(_m4_divert_dump, _m4_divert_diversion,
- [undivert(_m4_divert([GROW]))dnl
+ [m4_undivert(_m4_divert([GROW]))dnl
m4_undefine([_m4_divert_dump])])dnl
m4_popdef([_m4_expansion_stack])dnl
m4_popdef([_m4_expanding($1)])dnl
@@ -1149,7 +1151,7 @@ m4_define([m4_require],
[],
[m4_divert_push(m4_eval(_m4_divert_diversion - 1))dnl
m4_default([$2], [$1])
-divert(_m4_divert_dump)undivert(_m4_divert_diversion)dnl
+m4_divert(_m4_divert_dump)m4_undivert(_m4_divert_diversion)dnl
m4_divert_pop()])dnl
m4_provide_ifelse([$1],
[],
Index: tests/Makefile.am
--- tests/Makefile.am Sat, 18 Nov 2000 15:03:42 +0100 akim (ace/b/17_Makefile.a
1.33 644)
+++ tests/Makefile.am Sat, 18 Nov 2000 15:27:38 +0100 akim (ace/b/17_Makefile.a
1.33 644)
@@ -33,7 +33,9 @@
check-local: atconfig testsuite
$(SHELL) testsuite
-testsuite: atgeneral.m4 atspecific.m4 $(SUITE)
+testsuite: $(top_srcdir)/m4sugar.m4 $(top_srcdir)/m4sh.m4 \
+ atgeneral.m4 atspecific.m4 \
+ $(SUITE)
$(M4) -I $(srcdir) -I $(top_srcdir) atspecific.m4 suite.at | \
sed -e 's/[ ]*$$//' | \
sed -e '/^$$/N;/\n$$/D' > address@hidden
Index: tests/atgeneral.m4
--- tests/atgeneral.m4 Sat, 18 Nov 2000 15:03:42 +0100 akim
(ace/b/19_atgeneral. 1.20 644)
+++ tests/atgeneral.m4 Sat, 18 Nov 2000 15:30:58 +0100 akim
(ace/b/19_atgeneral. 1.20 644)
@@ -71,7 +71,7 @@ m4_define([AT_UNDEFINE], m4_defn([m4_und
# Begin testing suite, using PROGRAM to check version. The search path
# should be already preset so the proper executable will be selected.
AT_DEFINE([AT_INIT],
-[AT_DEFINE(AT_ordinal, 0)
+[AT_DEFINE([AT_ordinal], 0)
. ./atconfig
# Snippet (3
# -e sets to true
@@ -153,7 +153,7 @@ m4_define([AT_UNDEFINE], m4_defn([m4_und
at_failed_list=
at_ignore_count=0
-divert(2)[]dnl
+m4_divert(2)[]dnl
# Wrap up the testing suite with summary statistics.
@@ -227,7 +227,7 @@ m4_define([AT_UNDEFINE], m4_defn([m4_und
fi
exit 0
-divert[]dnl
+m4_divert[]dnl
])# AT_INIT
@@ -242,7 +242,7 @@ m4_define([AT_UNDEFINE], m4_defn([m4_und
m4_pushdef([AT_data_expout], )
m4_pushdef([AT_data_experr], )
if $at_stop_on_error && test -n "$at_failed_list"; then :; else
-divert(1)[]dnl
+m4_divert(1)[]dnl
echo AT_LINE > at-check-line
echo AT_LINE > at-setup-line
if $at_verbose; then
@@ -293,12 +293,12 @@ m4_define([AT_UNDEFINE], m4_defn([m4_und
fi
at_test_count=AT_ordinal
if $at_stop_on_error && test -n "$at_failed_list"; then :; else
-divert(0)[]dnl
+m4_divert(0)[]dnl
[#] Snippet (c[]AT_ordinal[](
rm ifelse([AT_data_files$1], , [-f], [-rf[]AT_data_files[]ifelse($1, , , [
$1])]) stdout stderr[]AT_data_expout[]AT_data_experr
[#] Snippet )c[]AT_ordinal[])
-undivert(1)[]dnl
+m4_undivert(1)[]dnl
rm ifelse([AT_data_files$1], , [-f], [-rf[]AT_data_files[]ifelse($1, , , [
$1])]) stdout stderr[]AT_data_expout[]AT_data_experr
fi
fi
@@ -380,4 +380,4 @@ m4_define([AT_UNDEFINE], m4_defn([m4_und
])# AT_CHECK
-divert(0)dnl
+m4_divert(0)dnl
Index: tests/atspecific.m4
--- tests/atspecific.m4 Sat, 18 Nov 2000 15:03:42 +0100 akim
(ace/b/24_atspecific 1.20 664)
+++ tests/atspecific.m4 Sat, 18 Nov 2000 15:18:01 +0100 akim
(ace/b/24_atspecific 1.20 664)
@@ -16,7 +16,7 @@
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
# 02111-1307, USA.
-include(atgeneral.m4)divert(-1)
+include(atgeneral.m4)m4_divert(-1)
@@ -106,4 +106,4 @@
AT_DEFINE(AT_CHECK_DEFINES,
[AT_CHECK([[fgrep '#' config.h | grep -v 'STDC_HEADERS']],, [$1])])
-divert(0)dnl
+m4_divert(0)dnl
- 31-m4-divert.patch,
DEMAILLE Akim <=