From: Akim Demaille Date: Tue, 18 Sep 2001 09:03:18 +0000 (+0000) Subject: * lib/autoconf/autotest.m4 (AC_CONFIG_TESTDIR): No INIT-CMDS in X-Git-Tag: AUTOCONF-2.52f~139 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=01bbecaa0a0596b170f8361a07de69022196adf3;p=thirdparty%2Fautoconf.git * 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. --- diff --git a/ChangeLog b/ChangeLog index c1c6e116c..f19cb65b5 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,22 @@ +2001-09-18 Akim Demaille + + * 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 * lib/autom4te.in (Autoconf): Preselect AM_CONDITIONAL, diff --git a/lib/autoconf/Makefile.am b/lib/autoconf/Makefile.am index 688674e5e..7b0fad348 100644 --- a/lib/autoconf/Makefile.am +++ b/lib/autoconf/Makefile.am @@ -109,7 +109,7 @@ M4_INCLUDES = --include $(srcdir) \ # 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 \ diff --git a/lib/autoconf/Makefile.in b/lib/autoconf/Makefile.in index 52bff4aa5..ebde46933 100644 --- a/lib/autoconf/Makefile.in +++ b/lib/autoconf/Makefile.in @@ -329,7 +329,7 @@ check-local: 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 \ diff --git a/lib/autoconf/autotest.m4 b/lib/autoconf/autotest.m4 index 085fe5208..22fda540f 100644 --- a/lib/autoconf/autotest.m4 +++ b/lib/autoconf/autotest.m4 @@ -61,17 +61,12 @@ 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 <&AS_MESSAGE_LOG_FD <<_CSEOF 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 @@ cat >>$CONFIG_STATUS <<_ACEOF 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 diff --git a/lib/autom4te.in b/lib/autom4te.in index 94d93d439..b8277021d 100644 --- a/lib/autom4te.in +++ b/lib/autom4te.in @@ -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" diff --git a/lib/autotest/general.m4 b/lib/autotest/general.m4 index a38a6f783..c7a9bdb22 100644 --- a/lib/autotest/general.m4 +++ b/lib/autotest/general.m4 @@ -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]) @@ -103,10 +105,6 @@ SHELL=${CONFIG_SHELL-/bin/sh} # 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 @@ -149,13 +147,7 @@ while test $[@%:@] -gt 0; 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 ;; @@ -286,7 +278,7 @@ _ATEOF if ($[4]) printf " %s\n", $[4] } ';; esac echo - echo "Report bugs to <$at_bugreport>." + echo "Report bugs to ." exit 0 fi @@ -369,17 +361,9 @@ else 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:" @@ -473,7 +457,7 @@ m4_divert([TAIL])[]dnl 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 . _ATEOF echo "$at_setup_line" >at-check-line fi @@ -583,8 +567,8 @@ elif test $at_debug = false; then 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 ," + echo "along with all information you think might help." exit 1 fi diff --git a/lib/m4sugar/Makefile.am b/lib/m4sugar/Makefile.am index 6b9177a57..9ed378c50 100644 --- a/lib/m4sugar/Makefile.am +++ b/lib/m4sugar/Makefile.am @@ -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], [@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 ## --------------- ## diff --git a/lib/m4sugar/Makefile.in b/lib/m4sugar/Makefile.in index a6e629d6d..83f43749c 100644 --- a/lib/m4sugar/Makefile.in +++ b/lib/m4sugar/Makefile.in @@ -64,11 +64,8 @@ PERL = @PERL@ 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) @@ -79,7 +76,7 @@ subdir = lib/m4sugar 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 @@ -110,6 +107,23 @@ uninstall-dist_m4sugarlibDATA: 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 @@ -170,7 +184,7 @@ check: check-am all-am: Makefile $(DATA) installdirs: - $(mkinstalldirs) $(DESTDIR)$(m4sugarlibdir) + $(mkinstalldirs) $(DESTDIR)$(m4sugarlibdir) $(DESTDIR)$(m4sugarlibdir) install: install-am install-exec: install-exec-am @@ -211,7 +225,8 @@ info: info-am info-am: -install-data-am: install-dist_m4sugarlibDATA +install-data-am: install-dist_m4sugarlibDATA \ + install-nodist_m4sugarlibDATA install-exec-am: @@ -229,28 +244,33 @@ mostlyclean: mostlyclean-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) && \ diff --git a/lib/m4sugar/m4sugar.m4 b/lib/m4sugar/m4sugar.m4 index a60cc4c25..18a2d44b5 100644 --- a/lib/m4sugar/m4sugar.m4 +++ b/lib/m4sugar/m4sugar.m4 @@ -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_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 diff --git a/lib/m4sugar/version.in b/lib/m4sugar/version.in deleted file mode 100644 index 91fbf3c76..000000000 --- a/lib/m4sugar/version.in +++ /dev/null @@ -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], [@VERSION@]) diff --git a/tests/Makefile.am b/tests/Makefile.am index d8ff64edd..83656a9b5 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -26,7 +26,7 @@ EXTRA_DIST = $(WRAPPERS) $(TESTSUITE_AT) atspecific.m4 aclocal.m4 mktests.sh \ # 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 \ @@ -53,6 +53,7 @@ testsuite: $(top_srcdir)/lib/m4sugar/m4sugar.m4 \ $(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 @@ -77,6 +78,23 @@ installcheck-local: +## ------------ ## +## 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. ## ## ------------------ ## diff --git a/tests/Makefile.in b/tests/Makefile.in index aecebef72..9440a78b7 100644 --- a/tests/Makefile.in +++ b/tests/Makefile.in @@ -73,7 +73,7 @@ EXTRA_DIST = $(WRAPPERS) $(TESTSUITE_AT) atspecific.m4 aclocal.m4 mktests.sh \ # 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 \ @@ -126,7 +126,7 @@ subdir = tests 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: @@ -245,6 +245,7 @@ testsuite: $(top_srcdir)/lib/m4sugar/m4sugar.m4 \ $(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 @@ -267,6 +268,16 @@ check-local: atconfig atlocal $(TESTSUITE) 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) diff --git a/tests/suite.at b/tests/suite.at index 16bec35e7..3b33ef72a 100644 --- a/tests/suite.at +++ b/tests/suite.at @@ -17,13 +17,14 @@ # 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 @@ -31,13 +32,6 @@ m4_include([atspecific.m4]) 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.