[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
FYI: Revamping Autotest, step 6
From: |
Akim Demaille |
Subject: |
FYI: Revamping Autotest, step 6 |
Date: |
13 Nov 2001 15:35:01 +0100 |
User-agent: |
Gnus/5.0808 (Gnus v5.8.8) XEmacs/21.4 (Artificial Intelligence) |
Index: ChangeLog
from Akim Demaille <address@hidden>
* tests/atspecific.m4 (AT_DATA_M4SUGAR, AT_DATA_M4SH)
(AT_DATA_AUTOCONF): Also protect @&t@ from autom4te.
(AT_CHECK_AUTOCONF, AT_CHECK_AUTOHEADER): Pass no --include
option.
(AT_CHECK_CONFIGURE): Use absolute paths.
(_AT_CHECK_AC_MACRO): Create aclocal.m4 with AC_STATE_SAVE in it.
The problem is still the old one: there is no means in M4 (that I
know about) to create a defining macro, because there is no means
to create `$1' etc., therefore, the defining macro ``swallows''
all the arguments meant to the defined macro.
Index: tests/atspecific.m4
===================================================================
RCS file: /cvs/autoconf/tests/atspecific.m4,v
retrieving revision 1.64
diff -u -u -r1.64 atspecific.m4
--- tests/atspecific.m4 2001/11/13 14:05:25 1.64
+++ tests/atspecific.m4 2001/11/13 14:42:57
@@ -29,6 +29,7 @@
m4_define([AT_DATA_M4SUGAR],
[AT_DATA([$1],
[m4_bpatsubsts([$2],
+ [@&address@hidden, [@&@&address@hidden@],
[\(m4\)_], [\1@&address@hidden,
[dnl], [d@&address@hidden)])])
@@ -52,6 +53,7 @@
m4_define([AT_DATA_M4SH],
[AT_DATA([$1],
[m4_bpatsubsts([$2],
+ [@&address@hidden, [@&@&address@hidden@],
[\(m4\|AS\)_], [\1@&address@hidden,
[dnl], [d@&address@hidden)])])
@@ -75,6 +77,7 @@
m4_define([AT_DATA_AUTOCONF],
[AT_DATA([$1],
[m4_bpatsubsts([$2],
+ [@&address@hidden, [@&@&address@hidden@],
[\(m4\|AS\|AC\)_], [\1@&address@hidden,
[dnl], [d@&address@hidden)])])
@@ -110,7 +113,7 @@
# From acfunctions.m4.
#
m4_define([AT_CONFIGURE_AC],
-[AT_DATA_AUTOCONF([configure.ac],
+[AT_DATA_AUTOCONF([aclocal.m4],
[[
# AC_STATE_SAVE(FILE)
# ------------------
@@ -142,36 +145,39 @@
[^(_|@|.[*#?].|LINENO|OLDPWD|PIPESTATUS|RANDOM|SECONDS)=])' 2>/dev/null |
# There maybe variables spread on several lines, eg IFS, remove the dead
# lines.
- grep '^m4_defn([m4_re_word])=' >state-env.$1
-test $? = 0 || rm -f state-env.$1
+ grep '^m4_defn([m4_re_word])=' >address@hidden&address@hidden
+test $? = 0 || rm -f address@hidden&address@hidden
-ls -1 | egrep -v '^(at-|state-|config\.)' | sort >state-ls.$1
+ls -1 | egrep -v '^(at-|state-|config\.)' | sort >address@hidden&address@hidden
])# AC_STATE_SAVE
+]])
-AC_INIT
+AT_DATA([configure.ac],
+[[AC_INIT
AC_CONFIG_AUX_DIR($top_srcdir/config)
AC_CONFIG_HEADER(config.h:config.hin)
AC_STATE_SAVE(before)]
$1
[AC_OUTPUT
AC_STATE_SAVE(after)
-]])])
+]])
+])# AT_CONFIGURE_AC
# AT_CHECK_AUTOCONF(ARGS, [EXIT-STATUS = 0], STDOUT, STDERR)
# ----------------------------------------------------------
m4_define([AT_CHECK_AUTOCONF],
-[AT_CHECK([autoconf --include=$srcdir $1],
- [$2], [$3], [$4])])
+[AT_CHECK([autoconf $1],
+ [$2], [$3], [$4])])
# AT_CHECK_AUTOHEADER(ARGS, [EXIT-STATUS = 0],
# STDOUT, [STDERR = `autoheader: `config.hin' is created'])
# -----------------------------------------------------------------------------
m4_define([AT_CHECK_AUTOHEADER],
-[AT_CHECK([autoheader --localdir=$srcdir $1], [$2],
- [$3],
- m4_default([$4], [[autoheader: `config.hin' is created
+[AT_CHECK([autoheader $1], [$2],
+ [$3],
+ m4_default([$4], [[autoheader: `config.hin' is created
]]))])
@@ -179,13 +185,13 @@
# [EXIT-STATUS = 0],
# [SDOUT = IGNORE], STDERR)
# --------------------------------------------
-# `top_srcdir' is needed so that `./configure' finds install-sh.
+# `top_srcpath' is needed so that `./configure' finds install-sh.
# Using --srcdir is more expensive.
m4_define([AT_CHECK_CONFIGURE],
-[AT_CHECK([top_srcdir=$top_srcdir ./configure $1],
- [$2],
- m4_default([$3], [ignore]), [$4],
- [test $at_verbose = echo && echo "$srcdir/AT_LINE: config.log" && cat
config.log])])
+[AT_CHECK([top_srcdir=$top_srcpath ./configure $1],
+ [$2],
+ m4_default([$3], [ignore]), [$4],
+ [test $at_verbose = echo && echo "$srcdir/AT_LINE: config.log" &&
cat config.log])])
# AT_CHECK_ENV
@@ -231,8 +237,6 @@
# Create a minimalist configure.ac running the macro named
# NAME-OF-THE-MACRO, check that autoconf runs on that script,
# and that the shell runs correctly the configure.
-# TOP_SRCDIR is needed to set the auxdir (some macros need `install-sh',
-# `config.guess' etc.).
m4_define([_AT_CHECK_AC_MACRO],
[AT_CONFIGURE_AC([$1])
$2
@@ -249,8 +253,6 @@
# Create a minimalist configure.ac running the macro named
# NAME-OF-THE-MACRO, check that autoconf runs on that script,
# and that the shell runs correctly the configure.
-# TOP_SRCDIR is needed to set the auxdir (some macros need `install-sh',
-# `config.guess' etc.).
#
# New macros are not expected to depend upon obsolete macros.
m4_define([AT_CHECK_MACRO],
@@ -272,8 +274,6 @@
# Create a minimalist configure.ac running the macro named
# NAME-OF-THE-MACRO, autoupdate this script, check that autoconf runs
# on that script, and that the shell runs correctly the configure.
-# TOP_SRCDIR is needed to set the auxdir (some macros need
-# `install-sh', `config.guess' etc.).
#
# Updated configure.ac shall not depend upon obsolete macros, which votes
# in favor of `-W obsolete', but since many of these macros leave a message
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- FYI: Revamping Autotest, step 6,
Akim Demaille <=