[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
01-fyi-package-m4.patch
From: |
Akim Demaille |
Subject: |
01-fyi-package-m4.patch |
Date: |
Mon, 17 Sep 2001 11:01:40 +0200 |
My recent efforts are aiming at making it possible to have really
standalone test suites, that could be installed for instance. In
addition, I want to be able to exercise other programs than those in
builddir, and to have several test suite cohabit in a single dir.
My ideas are not yet extremely clear, but it converges.
Index: ChangeLog
from Akim Demaille <address@hidden>
* lib/autoconf/autotest.m4 (AC_CONFIG_TESTDIR): No INIT-CMDS in
the AC_CONFIG_COMMANDS invocation.
This also solves the name clash problems.
Don't set the package's ID.
* lib/m4sugar/Makefile.am (version.m4): Revamp.
No longer to be shipped.
(version.in): Remove.
* lib/m4sugar/m4sugar.m4, lib/autoconf/general.m4,
* lib/autoconf/status.m4: Adjust.
Use `m4_PACKAGE_STRING'.
* lib/autotest/general.m4 (AT_INIT): N-th signature change: now
the only optional argument is the name of the test suite.
Expect `package.m4' to define the package signature.
* lib/autom4te.in (Autotest): Add `package.m4?'.
* tests/Makefile.am (package.m4): New.
* tests/suite.at: ifnames is a victim.
Index: lib/autom4te.in
--- lib/autom4te.in Sun, 16 Sep 2001 12:29:21 +0200 akim
+++ lib/autom4te.in Sun, 16 Sep 2001 14:24:29 +0200 akim
@@ -113,6 +113,7 @@ begin-language: "Autotest"
# patterns: *.at
args: --include @datadir@
args: autotest/autotest.m4
+args: package.m4?
args: --mode 777
args: --warning syntax
end-language: "Autotest"
Index: lib/autoconf/Makefile.am
--- lib/autoconf/Makefile.am Wed, 05 Sep 2001 15:58:40 +0200 akim
+++ lib/autoconf/Makefile.am Sun, 16 Sep 2001 15:06:33 +0200 akim
@@ -109,7 +109,7 @@ .m4.m4f:
# the dependencies...
srclibdir = $(top_srcdir)/lib
autoconf.m4f: $(srclibdir)/m4sugar/m4sugar.m4 \
- $(srclibdir)/m4sugar/version.m4 \
+ ../m4sugar/version.m4 \
$(srclibdir)/m4sugar/m4sh.m4 \
$(srclibdir)/autoconf/autoconf.m4 \
$(srclibdir)/autoconf/general.m4 \
Index: lib/autoconf/autotest.m4
--- lib/autoconf/autotest.m4 Wed, 12 Sep 2001 17:50:53 +0200 akim
+++ lib/autoconf/autotest.m4 Sun, 16 Sep 2001 13:01:27 +0200 akim
@@ -65,11 +65,6 @@ AC_DEFUN([AC_CONFIG_TESTDIR],
@%:@ Generated by $[0]
@%:@ Copyright 2000, 2001 Free Software Foundation, Inc.
-at_package_name='$at_package_name'
-at_package_version='$at_package_version'
-at_package_string='$at_package_string'
-at_bugreport='$at_bugreport'
-
at_testdir='$1'
srcdir='$ac_srcdir'
top_srcdir='$ac_top_srcdir'
@@ -77,15 +72,8 @@ AC_DEFUN([AC_CONFIG_TESTDIR],
AUTOTEST_PATH='m4_default([$2], [$1])'
-SHELL=\${CONFIG_SHELL-'$at_shell'}
+SHELL=\${CONFIG_SHELL-'$SHELL'}
_ATEOF
-],
-[at_package_name='$PACKAGE_NAME'
-at_package_version='$PACKAGE_VERSION'
-at_package_string='$PACKAGE_STRING'
-at_bugreport='$PACKAGE_BUGREPORT'
-
-at_shell='$SHELL'
])
if test -f $srcdir/$1/atlocal.in; then
Index: lib/autoconf/general.m4
--- lib/autoconf/general.m4 Sun, 16 Sep 2001 12:29:21 +0200 akim
+++ lib/autoconf/general.m4 Sun, 16 Sep 2001 14:40:47 +0200 akim
@@ -386,15 +386,15 @@ m4_define([AC_REVISION],
# Update this `AC_PREREQ' statement to require the current version of
# Autoconf. But fail if ever this autoupdate is too old.
#
-# Note that `m4_defn([m4_acversion])' below are expanded before calling
-# `AU_DEFUN', i.e., it is hard coded. Otherwise it would be quite
-# complex for autoupdate to import the value of `m4_acversion'. We
-# could `AU_DEFUN' `m4_acversion', but this would replace all its
-# occurrences with the current version of Autoconf, which is certainly
-# not what meant the user.
+# Note that `m4_defn([m4_PACKAGE_VERSION])' below are expanded before
+# calling `AU_DEFUN', i.e., it is hard coded. Otherwise it would be
+# quite complex for autoupdate to import the value of
+# `m4_PACKAGE_VERSION'. We could `AU_DEFUN' `m4_PACKAGE_VERSION', but
+# this would replace all its occurrences with the current version of
+# Autoconf, which is certainly not what meant the user.
AU_DEFUN([AC_PREREQ],
[m4_version_prereq([$1])[]dnl
-[AC_PREREQ(]]m4_defn([m4_acversion])[[)]])
+[AC_PREREQ(]]m4_defn([m4_PACKAGE_VERSION])[[)]])
# AC_PREREQ(VERSION)
@@ -422,7 +422,7 @@ m4_define([AC_REVISION],
m4_define([_AC_INIT_NOTICE],
[m4_divert_text([HEADER-COMMENT],
address@hidden:@ Guess values for system-dependent variables and create
Makefiles.
address@hidden:@ Generated by Autoconf m4_acversion[]dnl
address@hidden:@ Generated by m4_PACKAGE_STRING[]dnl
m4_ifset([AC_PACKAGE_STRING], [ for AC_PACKAGE_STRING]).])
m4_ifset([AC_PACKAGE_BUGREPORT],
@@ -1120,7 +1120,7 @@ m4_define([_AC_INIT_VERSION],
[dnl
m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])configure[]dnl
m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION])
-generated by GNU Autoconf m4_acversion])])
+generated by m4_PACKAGE_STRING])])
m4_divert_text([VERSION_END],
[_ACEOF
exit 0
@@ -1141,7 +1141,7 @@ m4_define([_AC_INIT_CONFIG_LOG],
It was created by m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])dnl
$as_me[]m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION]), which was
-generated by GNU Autoconf m4_acversion. Invocation command line was
+generated by m4_PACKAGE_STRING. Invocation command line was
$ $[0] address@hidden
Index: lib/autoconf/status.m4
--- lib/autoconf/status.m4 Wed, 12 Sep 2001 23:47:08 +0200 akim
+++ lib/autoconf/status.m4 Sun, 16 Sep 2001 15:07:29 +0200 akim
@@ -1233,7 +1233,7 @@ m4_define([_AC_OUTPUT_CONFIG_STATUS],
This file was extended by m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])dnl
$as_me[]m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION]), which was
-generated by GNU Autoconf m4_acversion. Invocation command line was
+generated by m4_PACKAGE_STRING. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
CONFIG_HEADERS = $CONFIG_HEADERS
@@ -1311,7 +1311,7 @@ Usage: $[0] [[OPTIONS]] [[FILE]]...
ac_cs_version="\\
m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.status[]dnl
m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION])
-configured by [$]0, generated by GNU Autoconf m4_acversion,
+configured by $[0], generated by m4_PACKAGE_STRING,
with options \\"`echo "$ac_configure_args" | sed 's/[[\\""\`\$]]/\\\\&/g'`\\"
Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
Index: lib/autotest/general.m4
--- lib/autotest/general.m4 Sun, 16 Sep 2001 12:29:21 +0200 akim
+++ lib/autotest/general.m4 Sun, 16 Sep 2001 14:57:40 +0200 akim
@@ -84,12 +84,14 @@ m4_define([AT_LINE],
[m4_patsubst(__file__, [^\(.*/\)*\(.*\)], [[\2]]):__line__])
-# AT_INIT([TESTSUITE-NAME], [BUG-REPORT])
-# ---------------------------------------
+# AT_INIT([TESTSUITE-NAME])
+# -------------------------
# Begin test suite.
m4_define([AT_INIT],
[AS_INIT
m4_pattern_forbid([^_?AT_])
+m4_define([AT_TESTSUITE_NAME],
+ m4_defn([PACKAGE_STRING])[ test suite]m4_ifval([$1], [: $1])[.])
m4_define([AT_ordinal], 0)
m4_define([AT_banner_ordinal], 0)
m4_define([AT_data_files], [stdout expout at-* stderr experr ])
@@ -102,10 +104,6 @@ m4_define([AT_data_files], [stdout expou
# How were we run?
at_cli_args=${1+"address@hidden"}
-# Who are we?
-at_testsuite_name='$1'
-at_bugreport='$2'
-
# Load the config file.
for at_file in atconfig atlocal
do
@@ -148,13 +146,7 @@ m4_define([AT_data_files], [stdout expou
;;
--version)
- if test -n "$at_package_string"; then
- echo "$as_me ($at_package_string)"
- echo "Embedded test suite."
- else
- echo "$as_me ($at_testsuite_name)"
- echo "Stand-alone test suite."
- fi
+ echo "$as_me (PACKAGE_STRING)"
exit 0
;;
@@ -285,7 +277,7 @@ Tests:
if ($[4]) printf " %s\n", $[4] } ';;
esac
echo
- echo "Report bugs to <$at_bugreport>."
+ echo "Report bugs to <PACKAGE_BUGREPORT>."
exit 0
fi
@@ -368,17 +360,9 @@ m4_define([AS_MESSAGE_LOG_FD], [6])
fi
# Banners and logs.
-if test -n "$at_package_string"; then
- AS_BOX([$at_package_string test suite.])
-else
- AS_BOX([$at_testsuite_name test suite.])
-fi
+AS_BOX(m4_defn([AT_TESTSUITE_NAME]))
{
- if test -n "$at_package_string"; then
- AS_BOX([Embedded $at_package_string test suite.])
- else
- AS_BOX([$at_testsuite_name test suite.])
- fi
+ AS_BOX(m4_defn([AT_TESTSUITE_NAME]))
echo
echo "$as_me: command line was:"
@@ -472,7 +456,7 @@ m4_define([AS_MESSAGE_LOG_FD], [6])
sed "s/^ */$as_me: warning: /" <<_ATEOF
A failure happened in a test group before any test could be
run. This means that test suite is improperly designed. Please
- report this failure to <$at_bugreport>.
+ report this failure to <PACKAGE_BUGREPORT>.
_ATEOF
echo "$at_setup_line" >at-check-line
fi
@@ -582,8 +566,8 @@ m4_define([AS_MESSAGE_LOG_FD], [6])
AS_BOX([$as_me.log is created.])
echo
- echo "Please send \`$as_me.log' to <$at_bugreport>, along with all"
- echo "information you think might help."
+ echo "Please send \`$as_me.log' to <PACKAGE_BUGREPORT>,"
+ echo "along with all information you think might help."
exit 1
fi
Index: lib/m4sugar/Makefile.am
--- lib/m4sugar/Makefile.am Fri, 24 Aug 2001 08:01:11 +0200 akim
+++ lib/m4sugar/Makefile.am Sun, 16 Sep 2001 15:05:48 +0200 akim
@@ -1,28 +1,25 @@
## Process this file with automake to create Makefile.in
m4sugarlibdir = $(pkgdatadir)/m4sugar
-# We ship version.m4 so that it's in src. `autoconf' wants all the sources
-# at the same place...
-dist_m4sugarlib_DATA = version.m4 m4sugar.m4 m4sh.m4
-
-EXTRA_DIST = version.in
-
+dist_m4sugarlib_DATA = m4sugar.m4 m4sh.m4
+nodist_m4sugarlib_DATA = version.m4
## ------------ ##
## version.m4. ##
## ------------ ##
-# - version.m4 needs to be updated only once, since it depends on
-# configure.ac, not on the results of a 'configure' run.
-# - It is guaranteed (with GNU Make) that when the version in configure.ac
-# is changed, version.m4 is built only after the new version number is
-# propagated to the Makefile. (Libtool uses the same guarantee.)
-
-$(srcdir)/version.m4: $(srcdir)/version.in $(top_srcdir)/configure.ac
- sed 's,@VERSION\@,$(VERSION),g' $(srcdir)/version.in >version.tm4
- mv version.tm4 $(srcdir)/version.m4
-
-
+version.m4: $(top_srcdir)/configure.ac
+ { \
+ echo '# This file is part of -*- Autoconf -*-.'; \
+ echo '# Version of Autoconf.'; \
+ echo '# Copyright 1999, 2000, 2001 Free Software Foundation, Inc.'; \
+ echo ;\
+ echo 'm4_define([m4_PACKAGE_NAME], address@hidden@])'; \
+ echo 'm4_define([m4_PACKAGE_TARNAME], address@hidden@])'; \
+ echo 'm4_define([m4_PACKAGE_VERSION], address@hidden@])'; \
+ echo 'm4_define([m4_PACKAGE_STRING], address@hidden@])'; \
+ echo 'm4_define([m4_PACKAGE_BUGREPORT], address@hidden@])'; \
+ } >version.m4
## --------------- ##
Index: lib/m4sugar/m4sugar.m4
--- lib/m4sugar/m4sugar.m4 Wed, 12 Sep 2001 23:58:47 +0200 akim
+++ lib/m4sugar/m4sugar.m4 Sun, 16 Sep 2001 14:28:12 +0200 akim
@@ -1706,8 +1706,12 @@ m4_define([m4_version_compare],
(m4_split(m4_version_unletter([$2]), [\.])))])
-# m4_acversion
-# ------------
+# m4_PACKAGE_NAME
+# m4_PACKAGE_TARNAME
+# m4_PACKAGE_VERSION
+# m4_PACKAGE_STRING
+# m4_PACKAGE_BUGREPORT
+# --------------------
m4_include([m4sugar/version.m4])
@@ -1715,7 +1719,7 @@ m4_define([m4_version_compare],
# ----------------------------------------------------
# Check this Autoconf version against VERSION.
m4_define([m4_version_prereq],
-[m4_if(m4_version_compare(m4_defn([m4_acversion]), [$1]), -1,
+[m4_if(m4_version_compare(m4_defn([m4_PACKAGE_VERSION]), [$1]), -1,
[m4_default([$3],
[m4_fatal([Autoconf version $1 or higher is required])])],
[$2])[]dnl
Index: tests/Makefile.am
--- tests/Makefile.am Wed, 12 Sep 2001 17:14:05 +0200 akim
+++ tests/Makefile.am Sun, 16 Sep 2001 14:24:25 +0200 akim
@@ -53,6 +53,7 @@ testsuite: $(top_srcdir)/lib/m4sugar/m4s
$(top_srcdir)/lib/m4sugar/m4sh.m4 \
$(top_srcdir)/lib/autotest/autotest.m4 \
$(top_srcdir)/lib/autotest/general.m4 \
+ package.m4 \
atspecific.m4 \
$(TESTSUITE_AT)
$(AUTOTEST) -I $(srcdir) suite.at -o address@hidden
@@ -74,6 +75,23 @@ check-local: atconfig atlocal $(TESTSUIT
# Run the test suite on the *installed* tree.
installcheck-local:
$(SHELL) $(TESTSUITE) AUTOTEST_PATH=$(exec_prefix)/bin
+
+
+
+## ------------ ##
+## package.m4. ##
+## ------------ ##
+
+package.m4: $(top_srcdir)/configure.ac
+ { \
+ echo '# Signature of the current package.'; \
+ echo 'm4_define([PACKAGE_NAME], address@hidden@])'; \
+ echo 'm4_define([PACKAGE_TARNAME], address@hidden@])'; \
+ echo 'm4_define([PACKAGE_VERSION], address@hidden@])'; \
+ echo 'm4_define([PACKAGE_STRING], address@hidden@])'; \
+ echo 'm4_define([PACKAGE_BUGREPORT], address@hidden@])'; \
+ } >package.m4
+
Index: tests/suite.at
--- tests/suite.at Sun, 09 Sep 2001 20:38:28 +0200 akim
+++ tests/suite.at Sun, 16 Sep 2001 14:25:02 +0200 akim
@@ -17,26 +17,20 @@
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
# 02111-1307, USA.
-# We need a very up to date version of Autotest, more recent than that
-# needed by configure.ac.
-m4_version_prereq([2.52c])
+# We need a very up to date version of Autotest.
+m4_version_prereq([2.52d])
# Macros specialized for Autoconf testing.
m4_include([atspecific.m4])
+AT_VICTIMS([autom4te autoconf autoheader autoupdate autoreconf ifnames])
+
# Still many parts of `autoconf' are not exercised by the test suite. A few
# FIXME's, below, are used to list tests that we would need. Do you feel
# like contributing new tests? If you do, you may tell your intent to
# address@hidden', so no two people work at the same thing.
AT_INIT
-
-AT_VICTIMS([autom4te autoconf autoheader autoupdate
- autoreconf])
-
-AT_BANNER(
-[Some tests might be skipped if you don't have the software which the
-macros check (e.g., a Fortran compiler).])
# Run the tests from the lowest level to the highest level, and from
# the most selective to the easiest.
Index: lib/m4sugar/version.in
--- lib/m4sugar/version.in Thu, 23 Aug 2001 23:06:00 +0200 akim
+++ lib/m4sugar/version.in Sun, 16 Sep 2001 15:12:54 +0200 akim
@@ -1,5 +0,0 @@
-# This file is part of Autoconf. -*- Autoconf -*-
-# Version of Autoconf.
-# Copyright 1999, 2000, 2001 Free Software Foundation, Inc.
-
-m4_define([m4_acversion], address@hidden@])
Index: tests/Makefile.am
--- tests/Makefile.am Sun, 16 Sep 2001 15:14:29 +0200 akim
+++ tests/Makefile.am Sun, 16 Sep 2001 15:51:43 +0200 akim
@@ -26,7 +26,7 @@
# Running the uninstalled scripts.
WRAPPERS = autoconf autoheader autoreconf autom4te autoupdate ifnames
-DISTCLEANFILES = atconfig atlocal $(TESTSUITE)
+DISTCLEANFILES = atconfig atlocal package.m4 $(TESTSUITE)
TESTSUITE_GENERATED_AT = \
aclang.at acc.at acfortran.at \
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- 01-fyi-package-m4.patch,
Akim Demaille <=