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.
+2001-09-18 Akim Demaille <akim@epita.fr>
+
+ * 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.
+
2001-09-18 Akim Demaille <akim@epita.fr>
* lib/autom4te.in (Autoconf): Preselect AM_CONDITIONAL,
# 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 \
rm -f freeze.log; \
fi
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 \
AC_DEFUN([AC_CONFIG_TESTDIR],
[AC_CONFIG_COMMANDS([$1/atconfig],
[# Do not use _ACEOF as we are being dumped into config.status via
-# an _ACEOF-heredoe.
+# an _ACEOF-heredoc.
cat >$1/atconfig <<ATEOF
@%:@ Configurable variable values for building test suites.
@%:@ 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'
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
# 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)
m4_define([_AC_INIT_NOTICE],
[m4_divert_text([HEADER-COMMENT],
[@%:@ Guess values for system-dependent variables and create Makefiles.
-@%:@ Generated by Autoconf m4_acversion[]dnl
+@%:@ Generated by m4_PACKAGE_STRING[]dnl
m4_ifset([AC_PACKAGE_STRING], [ for AC_PACKAGE_STRING]).])
m4_ifset([AC_PACKAGE_BUGREPORT],
[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
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] $[@]
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
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
# patterns: *.at
args: --include @datadir@
args: autotest/autotest.m4
+args: package.m4?
args: --mode 777
args: --warning syntax
end-language: "Autotest"
[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])
# How were we run?
at_cli_args=${1+"$[@]"}
-# Who are we?
-at_testsuite_name='$1'
-at_bugreport='$2'
-
# Load the config file.
for at_file in atconfig atlocal
do
;;
--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
;;
if ($[4]) printf " %s\n", $[4] } ';;
esac
echo
- echo "Report bugs to <$at_bugreport>."
+ echo "Report bugs to <PACKAGE_BUGREPORT>."
exit 0
fi
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:"
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
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
## 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], [@PACKAGE_NAME@])'; \
+ echo 'm4_define([m4_PACKAGE_TARNAME], [@PACKAGE_TARNAME@])'; \
+ echo 'm4_define([m4_PACKAGE_VERSION], [@PACKAGE_VERSION@])'; \
+ echo 'm4_define([m4_PACKAGE_STRING], [@PACKAGE_STRING@])'; \
+ echo 'm4_define([m4_PACKAGE_BUGREPORT], [@PACKAGE_BUGREPORT@])'; \
+ } >version.m4
## --------------- ##
VERSION = @VERSION@
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
TAGS_FILES = $(dist_m4sugarlib_DATA)
mkinstalldirs = $(SHELL) $(top_srcdir)/config/mkinstalldirs
CONFIG_CLEAN_FILES =
DIST_SOURCES =
-DATA = $(dist_m4sugarlib_DATA)
+DATA = $(dist_m4sugarlib_DATA) $(nodist_m4sugarlib_DATA)
DIST_COMMON = $(dist_m4sugarlib_DATA) Makefile.am Makefile.in
all: all-am
echo " rm -f $(DESTDIR)$(m4sugarlibdir)/$$f"; \
rm -f $(DESTDIR)$(m4sugarlibdir)/$$f; \
done
+install-nodist_m4sugarlibDATA: $(nodist_m4sugarlib_DATA)
+ @$(NORMAL_INSTALL)
+ $(mkinstalldirs) $(DESTDIR)$(m4sugarlibdir)
+ @list='$(nodist_m4sugarlib_DATA)'; for p in $$list; do \
+ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+ f="`echo $$p | sed -e 's|^.*/||'`"; \
+ echo " $(INSTALL_DATA) $$d$$p $(DESTDIR)$(m4sugarlibdir)/$$f"; \
+ $(INSTALL_DATA) $$d$$p $(DESTDIR)$(m4sugarlibdir)/$$f; \
+ done
+
+uninstall-nodist_m4sugarlibDATA:
+ @$(NORMAL_UNINSTALL)
+ @list='$(nodist_m4sugarlib_DATA)'; for p in $$list; do \
+ f="`echo $$p | sed -e 's|^.*/||'`"; \
+ echo " rm -f $(DESTDIR)$(m4sugarlibdir)/$$f"; \
+ rm -f $(DESTDIR)$(m4sugarlibdir)/$$f; \
+ done
tags: TAGS
all-am: Makefile $(DATA)
installdirs:
- $(mkinstalldirs) $(DESTDIR)$(m4sugarlibdir)
+ $(mkinstalldirs) $(DESTDIR)$(m4sugarlibdir) $(DESTDIR)$(m4sugarlibdir)
install: install-am
install-exec: install-exec-am
info-am:
-install-data-am: install-dist_m4sugarlibDATA
+install-data-am: install-dist_m4sugarlibDATA \
+ install-nodist_m4sugarlibDATA
install-exec-am:
mostlyclean-am: mostlyclean-generic
-uninstall-am: uninstall-dist_m4sugarlibDATA uninstall-info-am
+uninstall-am: uninstall-dist_m4sugarlibDATA uninstall-info-am \
+ uninstall-nodist_m4sugarlibDATA
.PHONY: GTAGS all all-am check check-am check-local clean clean-generic \
distclean distclean-generic distclean-tags distdir dvi dvi-am \
info info-am install install-am install-data install-data-am \
install-dist_m4sugarlibDATA install-exec install-exec-am \
- install-info install-info-am install-man install-strip \
- installcheck installcheck-am installdirs maintainer-clean \
+ install-info install-info-am install-man \
+ install-nodist_m4sugarlibDATA install-strip installcheck \
+ installcheck-am installdirs maintainer-clean \
maintainer-clean-generic mostlyclean mostlyclean-generic tags \
uninstall uninstall-am uninstall-dist_m4sugarlibDATA \
- uninstall-info-am
-
-
-# - 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
+ uninstall-info-am uninstall-nodist_m4sugarlibDATA
+
+
+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], [@PACKAGE_NAME@])'; \
+ echo 'm4_define([m4_PACKAGE_TARNAME], [@PACKAGE_TARNAME@])'; \
+ echo 'm4_define([m4_PACKAGE_VERSION], [@PACKAGE_VERSION@])'; \
+ echo 'm4_define([m4_PACKAGE_STRING], [@PACKAGE_STRING@])'; \
+ echo 'm4_define([m4_PACKAGE_BUGREPORT], [@PACKAGE_BUGREPORT@])'; \
+ } >version.m4
check-local:
if (cd $(srcdir) && \
(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])
# ----------------------------------------------------
# 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
+++ /dev/null
-# This file is part of Autoconf. -*- Autoconf -*-
-# Version of Autoconf.
-# Copyright 1999, 2000, 2001 Free Software Foundation, Inc.
-
-m4_define([m4_acversion], [@VERSION@])
# 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 \
$(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 $@.tmp
+## ------------ ##
+## package.m4. ##
+## ------------ ##
+
+package.m4: $(top_srcdir)/configure.ac
+ { \
+ echo '# Signature of the current package.'; \
+ echo 'm4_define([PACKAGE_NAME], [@PACKAGE_NAME@])'; \
+ echo 'm4_define([PACKAGE_TARNAME], [@PACKAGE_TARNAME@])'; \
+ echo 'm4_define([PACKAGE_VERSION], [@PACKAGE_VERSION@])'; \
+ echo 'm4_define([PACKAGE_STRING], [@PACKAGE_STRING@])'; \
+ echo 'm4_define([PACKAGE_BUGREPORT], [@PACKAGE_BUGREPORT@])'; \
+ } >package.m4
+
+
+
+
## ------------------ ##
## Maintainer rules. ##
## ------------------ ##
# 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 \
mkinstalldirs = $(SHELL) $(top_srcdir)/config/mkinstalldirs
CONFIG_CLEAN_FILES =
DIST_SOURCES =
-DIST_COMMON = README Makefile.am Makefile.in configure.ac
+DIST_COMMON = README Makefile.am Makefile.in configure configure.ac
all: all-am
.SUFFIXES:
$(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 $@.tmp
installcheck-local:
$(SHELL) $(TESTSUITE) AUTOTEST_PATH=$(exec_prefix)/bin
+package.m4: $(top_srcdir)/configure.ac
+ { \
+ echo '# Signature of the current package.'; \
+ echo 'm4_define([PACKAGE_NAME], [@PACKAGE_NAME@])'; \
+ echo 'm4_define([PACKAGE_TARNAME], [@PACKAGE_TARNAME@])'; \
+ echo 'm4_define([PACKAGE_VERSION], [@PACKAGE_VERSION@])'; \
+ echo 'm4_define([PACKAGE_STRING], [@PACKAGE_STRING@])'; \
+ echo 'm4_define([PACKAGE_BUGREPORT], [@PACKAGE_BUGREPORT@])'; \
+ } >package.m4
+
$(TESTSUITE_GENERATED_AT): mktests.sh $(AUTOCONF_FILES)
cd $(srcdir) && ./mktests.sh $(AUTOCONF_FILES)
# 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
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.