* NEWS: Update.
* tests/defs-static.in ($am_running_installcheck): New variable.
Initialize it to a default of "no", and sanity-check its value.
($am_datadir, $am_docdir, $am_automake_acdir, $am_system_acdir,
$am_bindir, $am_scriptdir, $am_pkgvdir): New variables,
initialized from AC_SUBST'ed values which are adaptively chosen
depending on whether the testsuite is running in "simple" mode
or in "installcheck" mode.
($MISSING): Remove, it's not really required by the testsuite.
($PATH): Update using `$am_bindir', not `$testbuilddir'.
* Makefile.am (installcheck-local): New target.
* lib/Automake/tests/Makefile.am (installcheck-local): New target.
(AM_TESTS_ENVIRONMENT, AM_PL_LOG_FLAGS): Adaptively choose the
`-I' flags for perl based on whether the tests are being run by
"make check" or "make installcheck".
* tests/Makefile.am (installcheck-local): New target.
(defs-static): Generate it at make time, not at configure time,
in order to correctly resolve all the indirections in the
AC_SUBST'd variables; done with the help of ...
(do_subst): ... this new macro.
(EXTRA_DIST): Explicitly distribute `defs-static.in'.
(CLEANFILES): Remove `defs-static'.
* configure.ac (AC_CONFIG_FILES): Remove `tests/defs-static'.
(AC_SUBST): Substitute also `automake_acdir', `system_acdir',
`scriptdir' and `amdir' to proper values.
* lib/Makefile.am (scriptdir): Don't explicitly define anymore.
* lib/am/Makefile.am (amdir): Likewise.
* m4/acdir/dirlist: Remove, it's not needed anymore. Instead
use ...
* m4/acdir/.placeholder: ... this file.
* m4/Makefile.am (EXTRA_DIST): Update.
(automake_acdir, system_acdir): Don't explicitly define anymore.
* tests/aclocal-print-acdir.test: Use new `$am_...dir' variables,
instead of hard-coding values with $testsrcdir and $testbuilddir,
to test more faithfully under "make installcheck".
* tests/amhello-binpkg.test: Likewise.
* tests/amhello-cflags.test: Likewise.
* tests/amhello-cross-compile.test: Likewise.
* tests/ansi2knr-no-more.test: Likewise.
* tests/autodist-stamp-vti.test: Likewise.
* tests/auxdir.test: Likewise.
* tests/check2.test: Likewise.
* tests/copy.test: Likewise.
* tests/multlib.test: Likewise.
* tests/obsolete.test: Likewise.
* tests/parallel-tests-interrupt.test: Likewise.
* tests/repeated-options.test: Likewise.
* tests/suffix5.test: Likewise.
* tests/tap-doc2.test: Likewise.
* tests/txinfo22.test: Likewise.
* tests/vtexi3.test: Likewise.
* tests/defs: Likewise. Also, print the values of `$using_tap'
and `$am_running_installcheck', to simplify debugging, and do
some related code movings and tweakings.
* tests/aclocal3.test: Update to avoid possible spurious failures
when running under "make installcheck".
* tests/warnings-unknown.test: Likewise.
* tests/location.test: Likewise, and improve debugging input since
we are at it.
* tests/acloca10.test: Adapt and tweak to work also during a
"make installcheck", and not to require a pre-populated `dirlist'
file.
* tests/acloca18.test: Likewise.
* tests/dirlist2.test: Likewise.
* tests/dirlist.test: Likewise, and remove an obsolete comment.
* tests/README: Update.
* tests/dirlist-abspath.test: New test.
* tests/list-of-tests.mk: Update.
2011-09-08 Stefano Lattarini <stefano.lattarini@gmail.com>
+ installcheck: support it in our own testsuite
+ * NEWS: Update.
+ * tests/defs-static.in ($am_running_installcheck): New variable.
+ Initialize it to a default of "no", and sanity-check its value.
+ ($am_datadir, $am_docdir, $am_automake_acdir, $am_system_acdir,
+ $am_bindir, $am_scriptdir, $am_pkgvdir): New variables,
+ initialized from AC_SUBST'ed values which are adaptively chosen
+ depending on whether the testsuite is running in "simple" mode
+ or in "installcheck" mode.
+ ($MISSING): Remove, it's not really required by the testsuite.
+ ($PATH): Update using `$am_bindir', not `$testbuilddir'.
+ * Makefile.am (installcheck-local): New target.
+ * lib/Automake/tests/Makefile.am (installcheck-local): New target.
+ (AM_TESTS_ENVIRONMENT, AM_PL_LOG_FLAGS): Adaptively choose the
+ `-I' flags for perl based on whether the tests are being run by
+ "make check" or "make installcheck".
+ * tests/Makefile.am (installcheck-local): New target.
+ (defs-static): Generate it at make time, not at configure time,
+ in order to correctly resolve all the indirections in the
+ AC_SUBST'd variables; done with the help of ...
+ (do_subst): ... this new macro.
+ (EXTRA_DIST): Explicitly distribute `defs-static.in'.
+ (CLEANFILES): Remove `defs-static'.
+ * configure.ac (AC_CONFIG_FILES): Remove `tests/defs-static'.
+ (AC_SUBST): Substitute also `automake_acdir', `system_acdir',
+ `scriptdir' and `amdir' to proper values.
+ * lib/Makefile.am (scriptdir): Don't explicitly define anymore.
+ * lib/am/Makefile.am (amdir): Likewise.
+ * m4/acdir/dirlist: Remove, it's not needed anymore. Instead
+ use ...
+ * m4/acdir/.placeholder: ... this file.
+ * m4/Makefile.am (EXTRA_DIST): Update.
+ (automake_acdir, system_acdir): Don't explicitly define anymore.
+ * tests/aclocal-print-acdir.test: Use new `$am_...dir' variables,
+ instead of hard-coding values with $testsrcdir and $testbuilddir,
+ to test more faithfully under "make installcheck".
+ * tests/amhello-binpkg.test: Likewise.
+ * tests/amhello-cflags.test: Likewise.
+ * tests/amhello-cross-compile.test: Likewise.
+ * tests/ansi2knr-no-more.test: Likewise.
+ * tests/autodist-stamp-vti.test: Likewise.
+ * tests/auxdir.test: Likewise.
+ * tests/check2.test: Likewise.
+ * tests/copy.test: Likewise.
+ * tests/multlib.test: Likewise.
+ * tests/obsolete.test: Likewise.
+ * tests/parallel-tests-interrupt.test: Likewise.
+ * tests/repeated-options.test: Likewise.
+ * tests/suffix5.test: Likewise.
+ * tests/tap-doc2.test: Likewise.
+ * tests/txinfo22.test: Likewise.
+ * tests/vtexi3.test: Likewise.
+ * tests/defs: Likewise. Also, print the values of `$using_tap'
+ and `$am_running_installcheck', to simplify debugging, and do
+ some related code movings and tweakings.
+ * tests/aclocal3.test: Update to avoid possible spurious failures
+ when running under "make installcheck".
+ * tests/warnings-unknown.test: Likewise.
+ * tests/location.test: Likewise, and improve debugging input since
+ we are at it.
+ * tests/acloca10.test: Adapt and tweak to work also during a
+ "make installcheck", and not to require a pre-populated `dirlist'
+ file.
+ * tests/acloca18.test: Likewise.
+ * tests/dirlist2.test: Likewise.
+ * tests/dirlist.test: Likewise, and remove an obsolete comment.
+ * tests/README: Update.
+ * tests/dirlist-abspath.test: New test.
+ * tests/list-of-tests.mk: Update.
+
+2011-09-08 Stefano Lattarini <stefano.lattarini@gmail.com>
+
maintcheck: fix spurious failures
* tests/gen-testsuite-part (write_wrapper_script): More uses of
creative quoting in the generated tests, to avoid triggering
INSTALL: lib/INSTALL
$(AM_V_GEN)cp $(srcdir)/lib/INSTALL $@
+# Run the testsuite with the installed aclocal and automake.
+installcheck-local:
+ am_running_installcheck=yes $(MAKE) $(AM_MAKEFLAGS) check
+
## recheck: convenience proxy target for the test suites.
.PHONY: recheck
recheck:
am__leading_dot = @am__leading_dot@
am__tar = @am__tar@
am__untar = @am__untar@
+amdir = @amdir@
+automake_acdir = @automake_acdir@
bindir = @bindir@
build = @build@
build_alias = @build_alias@
program_transform_name = @program_transform_name@
psdir = @psdir@
sbindir = @sbindir@
+scriptdir = @scriptdir@
sh_errexit_works = @sh_errexit_works@
sharedstatedir = @sharedstatedir@
srcdir = @srcdir@
sysconfdir = @sysconfdir@
+system_acdir = @system_acdir@
target_alias = @target_alias@
top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
install-ps-am:
-installcheck-am:
+installcheck-am: installcheck-local
maintainer-clean: maintainer-clean-recursive
-rm -f $(am__CONFIG_DISTCLEAN_FILES)
install-exec-am install-exec-hook install-html install-html-am \
install-info install-info-am install-man install-pdf \
install-pdf-am install-ps install-ps-am install-strip \
- installcheck installcheck-am installdirs installdirs-am \
- maintainer-clean maintainer-clean-generic mostlyclean \
- mostlyclean-generic pdf pdf-am ps ps-am tags tags-recursive \
- uninstall uninstall-am uninstall-binSCRIPTS uninstall-hook
+ installcheck installcheck-am installcheck-local installdirs \
+ installdirs-am maintainer-clean maintainer-clean-generic \
+ mostlyclean mostlyclean-generic pdf pdf-am ps ps-am tags \
+ tags-recursive uninstall uninstall-am uninstall-binSCRIPTS \
+ uninstall-hook
install-exec-hook:
INSTALL: lib/INSTALL
$(AM_V_GEN)cp $(srcdir)/lib/INSTALL $@
+# Run the testsuite with the installed aclocal and automake.
+installcheck-local:
+ am_running_installcheck=yes $(MAKE) $(AM_MAKEFLAGS) check
+
.PHONY: recheck
recheck:
@failcom='exit 1'; \
* Long standing bugs:
+ - Automake's own build system finally have a real "installcheck" target.
+
- Automake now warns about more primary/directory invalid combinations,
such as "doc_LIBRARIES" or "pkglib_PROGRAMS".
TEX
PERL_THREADS
PERL
+system_acdir
+automake_acdir
+amdir
+scriptdir
pkgvdatadir
APIVERSION
AM_BACKSLASH
APIVERSION=`echo "$VERSION" | sed -e 's/^\([0-9]*\.[0-9]*[a-z]*\).*$/\1/'`
-# A versioned directory, defined here for convenience.
pkgvdatadir="\${datadir}/$PACKAGE-$APIVERSION"
+scriptdir="\${pkgvdatadir}"
+
+amdir="\${pkgvdatadir}/am"
+
+automake_acdir="\${datadir}/aclocal-$APIVERSION"
+
+system_acdir="\${datadir}/aclocal"
+
# $AUTOMAKE and $ACLOCAL are always run after a `cd $top_srcdir',
# hence `.' is really what we want for perllibdir, libdir, and acdir.
sh_errexit_works=$am_cv_sh_errexit_works
-ac_config_files="$ac_config_files Makefile doc/Makefile lib/Automake/Makefile lib/Automake/tests/Makefile lib/Makefile lib/am/Makefile m4/Makefile tests/Makefile tests/defs-static"
+ac_config_files="$ac_config_files Makefile doc/Makefile lib/Automake/Makefile lib/Automake/tests/Makefile lib/Makefile lib/am/Makefile m4/Makefile tests/Makefile"
ac_config_links="$ac_config_links tests/defs:tests/defs"
"lib/am/Makefile") CONFIG_FILES="$CONFIG_FILES lib/am/Makefile" ;;
"m4/Makefile") CONFIG_FILES="$CONFIG_FILES m4/Makefile" ;;
"tests/Makefile") CONFIG_FILES="$CONFIG_FILES tests/Makefile" ;;
- "tests/defs-static") CONFIG_FILES="$CONFIG_FILES tests/defs-static" ;;
"tests/defs") CONFIG_LINKS="$CONFIG_LINKS tests/defs:tests/defs" ;;
"tests/aclocal-${APIVERSION}") CONFIG_FILES="$CONFIG_FILES tests/aclocal-${APIVERSION}:tests/aclocal.in" ;;
"tests/automake-${APIVERSION}") CONFIG_FILES="$CONFIG_FILES tests/automake-${APIVERSION}:tests/automake.in" ;;
APIVERSION=`echo "$VERSION" | sed -e 's/^\([[0-9]]*\.[[0-9]]*[[a-z]]*\).*$/\1/'`
AC_SUBST([APIVERSION])
-# A versioned directory, defined here for convenience.
AC_SUBST([pkgvdatadir], ["\${datadir}/$PACKAGE-$APIVERSION"])
+AC_SUBST([scriptdir], ["\${pkgvdatadir}"])
+AC_SUBST([amdir], ["\${pkgvdatadir}/am"])
+AC_SUBST([automake_acdir], ["\${datadir}/aclocal-$APIVERSION"])
+AC_SUBST([system_acdir], ["\${datadir}/aclocal"])
# $AUTOMAKE and $ACLOCAL are always run after a `cd $top_srcdir',
# hence `.' is really what we want for perllibdir, libdir, and acdir.
lib/am/Makefile
m4/Makefile
tests/Makefile
- tests/defs-static
])
AC_CONFIG_LINKS([tests/defs:tests/defs])
AC_CONFIG_FILES([tests/aclocal-${APIVERSION}:tests/aclocal.in],
am__leading_dot = @am__leading_dot@
am__tar = @am__tar@
am__untar = @am__untar@
+amdir = @amdir@
+automake_acdir = @automake_acdir@
bindir = @bindir@
build = @build@
build_alias = @build_alias@
program_transform_name = @program_transform_name@
psdir = @psdir@
sbindir = @sbindir@
+scriptdir = @scriptdir@
sh_errexit_works = @sh_errexit_works@
sharedstatedir = @sharedstatedir@
srcdir = @srcdir@
sysconfdir = @sysconfdir@
+system_acdir = @system_acdir@
target_alias = @target_alias@
top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
am__leading_dot = @am__leading_dot@
am__tar = @am__tar@
am__untar = @am__untar@
+amdir = @amdir@
+automake_acdir = @automake_acdir@
bindir = @bindir@
build = @build@
build_alias = @build_alias@
program_transform_name = @program_transform_name@
psdir = @psdir@
sbindir = @sbindir@
+scriptdir = @scriptdir@
sh_errexit_works = @sh_errexit_works@
sharedstatedir = @sharedstatedir@
srcdir = @srcdir@
sysconfdir = @sysconfdir@
+system_acdir = @system_acdir@
target_alias = @target_alias@
top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
## Process this file with automake to create Makefile.in
-# Copyright (C) 2002, 2003, 2008, 2009, 2010 Free Software Foundation,
-# Inc.
+# Copyright (C) 2002, 2003, 2008, 2009, 2010, 2011 Free Software
+# Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# along with this program. If not, see <http://www.gnu.org/licenses/>.
PL_LOG_COMPILER = $(PERL)
-AM_PL_LOG_FLAGS = -Mstrict -I ../.. -I $(top_srcdir)/lib -w
+AM_TESTS_ENVIRONMENT = \
+ case $$am_running_installcheck in \
+ yes) am_pl_I_flags='-I $(pkgvdatadir)';; \
+ *) am_pl_I_flags='-I ../.. -I $(top_srcdir)/lib';; \
+ esac;
+AM_PL_LOG_FLAGS = -Mstrict -w $$am_pl_I_flags
TEST_EXTENSIONS = .pl
TESTS = \
EXTRA_DIST = $(TESTS)
include $(top_srcdir)/CheckListOfTests.am
+
+# Run the testsuite with the installed aclocal and automake.
+installcheck-local:
+ am_running_installcheck=yes $(MAKE) $(AM_MAKEFLAGS) check
@SET_MAKE@
-# Copyright (C) 2002, 2003, 2008, 2009, 2010 Free Software Foundation,
-# Inc.
+# Copyright (C) 2002, 2003, 2008, 2009, 2010, 2011 Free Software
+# Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
am__leading_dot = @am__leading_dot@
am__tar = @am__tar@
am__untar = @am__untar@
+amdir = @amdir@
+automake_acdir = @automake_acdir@
bindir = @bindir@
build = @build@
build_alias = @build_alias@
program_transform_name = @program_transform_name@
psdir = @psdir@
sbindir = @sbindir@
+scriptdir = @scriptdir@
sh_errexit_works = @sh_errexit_works@
sharedstatedir = @sharedstatedir@
srcdir = @srcdir@
sysconfdir = @sysconfdir@
+system_acdir = @system_acdir@
target_alias = @target_alias@
top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
PL_LOG_COMPILER = $(PERL)
-AM_PL_LOG_FLAGS = -Mstrict -I ../.. -I $(top_srcdir)/lib -w
+AM_TESTS_ENVIRONMENT = \
+ case $$am_running_installcheck in \
+ yes) am_pl_I_flags='-I $(pkgvdatadir)';; \
+ *) am_pl_I_flags='-I ../.. -I $(top_srcdir)/lib';; \
+ esac;
+
+AM_PL_LOG_FLAGS = -Mstrict -w $$am_pl_I_flags
TEST_EXTENSIONS = .pl
TESTS = \
Condition.pl \
install-ps-am:
-installcheck-am:
+installcheck-am: installcheck-local
maintainer-clean: maintainer-clean-am
-rm -f Makefile
install-dvi-am install-exec install-exec-am install-html \
install-html-am install-info install-info-am install-man \
install-pdf install-pdf-am install-ps install-ps-am \
- install-strip installcheck installcheck-am installdirs \
- maintainer-clean maintainer-clean-generic mostlyclean \
- mostlyclean-generic pdf pdf-am ps ps-am recheck recheck-html \
- uninstall uninstall-am
+ install-strip installcheck installcheck-am installcheck-local \
+ installdirs maintainer-clean maintainer-clean-generic \
+ mostlyclean mostlyclean-generic pdf pdf-am ps ps-am recheck \
+ recheck-html uninstall uninstall-am
.PHONY: maintainer-check-list-of-tests
clean-maintcheck-testslist-tmp:
rm -f $(am__tmk) $(am__tfs) $(am__tdf)
+# Run the testsuite with the installed aclocal and automake.
+installcheck-local:
+ am_running_installcheck=yes $(MAKE) $(AM_MAKEFLAGS) check
+
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:
## These must all be executable when installed. However, if we use
## _SCRIPTS, then the program transform will be applied, which is not
## what we want. So we make them executable by hand.
-scriptdir = $(pkgvdatadir)
dist_script_DATA = \
config.guess \
config.sub \
am__leading_dot = @am__leading_dot@
am__tar = @am__tar@
am__untar = @am__untar@
+amdir = @amdir@
+automake_acdir = @automake_acdir@
bindir = @bindir@
build = @build@
build_alias = @build_alias@
program_transform_name = @program_transform_name@
psdir = @psdir@
sbindir = @sbindir@
+scriptdir = @scriptdir@
sh_errexit_works = @sh_errexit_works@
sharedstatedir = @sharedstatedir@
srcdir = @srcdir@
sysconfdir = @sysconfdir@
+system_acdir = @system_acdir@
target_alias = @target_alias@
top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
SUBDIRS = Automake am
dist_pkgvdata_DATA = COPYING INSTALL texinfo.tex config-ml.in
-scriptdir = $(pkgvdatadir)
dist_script_DATA = \
config.guess \
config.sub \
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-amdir = $(pkgvdatadir)/am
-
dist_am_DATA = \
check.am \
check2.am \
am__leading_dot = @am__leading_dot@
am__tar = @am__tar@
am__untar = @am__untar@
+amdir = @amdir@
+automake_acdir = @automake_acdir@
bindir = @bindir@
build = @build@
build_alias = @build_alias@
program_transform_name = @program_transform_name@
psdir = @psdir@
sbindir = @sbindir@
+scriptdir = @scriptdir@
sh_errexit_works = @sh_errexit_works@
sharedstatedir = @sharedstatedir@
srcdir = @srcdir@
sysconfdir = @sysconfdir@
+system_acdir = @system_acdir@
target_alias = @target_alias@
top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
-amdir = $(pkgvdatadir)/am
dist_am_DATA = \
check.am \
check2.am \
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-automake_acdir = $(datadir)/aclocal-$(APIVERSION)
-system_acdir = $(datadir)/aclocal
-
dist_automake_ac_DATA = \
$(top_srcdir)/m4/amversion.m4 \
as.m4 \
# So that $(system_acdir) will be created by "make install".
dist_system_ac_DATA =
-EXTRA_DIST = acdir/dirlist amversion.in
+EXTRA_DIST = acdir/.placeholder amversion.in
# We build amversion.m4 here, instead of from config.status,
# because config.status is rerun each time one of configure's
am__leading_dot = @am__leading_dot@
am__tar = @am__tar@
am__untar = @am__untar@
+amdir = @amdir@
+automake_acdir = @automake_acdir@
bindir = @bindir@
build = @build@
build_alias = @build_alias@
program_transform_name = @program_transform_name@
psdir = @psdir@
sbindir = @sbindir@
+scriptdir = @scriptdir@
sh_errexit_works = @sh_errexit_works@
sharedstatedir = @sharedstatedir@
srcdir = @srcdir@
sysconfdir = @sysconfdir@
+system_acdir = @system_acdir@
target_alias = @target_alias@
top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
-automake_acdir = $(datadir)/aclocal-$(APIVERSION)
-system_acdir = $(datadir)/aclocal
dist_automake_ac_DATA = \
$(top_srcdir)/m4/amversion.m4 \
as.m4 \
# So that $(system_acdir) will be created by "make install".
dist_system_ac_DATA =
-EXTRA_DIST = acdir/dirlist amversion.in
+EXTRA_DIST = acdir/.placeholder amversion.in
all: all-am
.SUFFIXES:
--- /dev/null
+This file is here only to ensure the directory containing it exists
+in the git repository, and goes in the distribution tarball.
+++ /dev/null
-# This file is used by the testsuite (dirlist*.test)
-# it should not be installed
-./dirlist-test
-./dirlist2*-test
$(TEST_LOGS): plain-functions.sh tap-functions.sh
EXTRA_DIST += tap-functions.sh plain-functions.sh
+# Keep in sync with AC_SUBST'd stuff in defs-static.in.
+do_subst = sed \
+ -e 's|@abs_srcdir[@]|$(abs_srcdir)|g' \
+ -e 's|@abs_top_srcdir[@]|$(abs_top_srcdir)|g' \
+ -e 's|@abs_builddir[@]|$(abs_builddir)|g' \
+ -e 's|@prefix[@]|$(prefix)|g' \
+ -e 's|@amdir[@]|$(amdir)|g' \
+ -e 's|@bindir[@]|$(bindir)|g' \
+ -e 's|@datadir[@]|$(datadir)|g' \
+ -e 's|@docdir[@]|$(docdir)|g' \
+ -e 's|@automake_acdir[@]|$(automake_acdir)|g' \
+ -e 's|@system_acdir[@]|$(system_acdir)|g' \
+ -e 's|@scriptdir[@]|$(scriptdir)|g' \
+ -e 's|@pkgvdatadir[@]|$(pkgvdatadir)|g' \
+ -e 's|@host_alias[@]|$(host_alias)|g' \
+ -e 's|@build_alias[@]|$(build_alias)|g' \
+ -e 's|@APIVERSION[@]|$(APIVERSION)|g' \
+ -e 's|@PATH_SEPARATOR[@]|$(PATH_SEPARATOR)|g' \
+ -e 's|@SHELL[@]|$(SHELL)|g' \
+ -e 's|@PERL[@]|$(PERL)|g' \
+ -e 's|@EGREP[@]|$(EGREP)|g' \
+ -e 's|@FGREP[@]|$(FGREP)|g' \
+ -e 's|@TEX[@]|$(TEX)|g' \
+ -e 's|@MODIFICATION_DELAY[@]|$(MODIFICATION_DELAY)|g' \
+ -e 's|@am_AUTOCONF[@]|$(am_AUTOCONF)|g' \
+ -e 's|@am_AUTOM4TE[@]|$(am_AUTOM4TE)|g' \
+ -e 's|@am_AUTORECONF[@]|$(am_AUTORECONF)|g' \
+ -e 's|@am_AUTOHEADER[@]|$(am_AUTOHEADER)|g' \
+ -e 's|@am_AUTOUPDATE[@]|$(am_AUTOUPDATE)|g' \
+ -e 's|@sh_errexit_works[@]|$(sh_errexit_works)|g' \
+ -e 's|@configure_input[@]|Generated from $@.in. DO NOT EDIT BY HAND!|'
+
+defs-static: defs-static.in
+ $(AM_V_at)rm -f $@ $@-t
+ $(AM_V_GEN)$(do_subst) $(srcdir)/defs-static.in >$@-t
+ $(AM_V_at) : Sanity check on the substitutions; \
+ if LC_ALL=C grep '@[a-zA-Z0-9_][a-zA-Z0-9_]*@' $@-t; then \
+ echo "$@ contains unexpanded substitution (see lines above)"; \
+ exit 1; \
+ fi
+ $(AM_V_at)chmod a-w $@-t && mv -f $@-t $@
+EXTRA_DIST += defs-static.in
+CLEANFILES = defs-static
# If two test scripts have the same basename, they will end up sharing
# the same log file, leading to all sort of undefined and undesired
## Checking the list of tests.
include $(top_srcdir)/CheckListOfTests.am
+# Run the testsuite with the installed aclocal and automake.
+installcheck-local:
+ am_running_installcheck=yes $(MAKE) $(AM_MAKEFLAGS) check
+
clean-local: clean-local-check
.PHONY: clean-local-check
clean-local-check:
host_triplet = @host@
DIST_COMMON = README $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
$(srcdir)/aclocal.in $(srcdir)/automake.in $(srcdir)/defs \
- $(srcdir)/defs-static.in $(srcdir)/list-of-tests.mk \
- $(srcdir)/testsuite-part.am $(top_srcdir)/CheckListOfTests.am
+ $(srcdir)/list-of-tests.mk $(srcdir)/testsuite-part.am \
+ $(top_srcdir)/CheckListOfTests.am
subdir = tests
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/amversion.m4 \
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(SHELL) $(top_srcdir)/lib/mkinstalldirs
-CONFIG_CLEAN_FILES = defs-static aclocal-${APIVERSION} \
- automake-${APIVERSION}
+CONFIG_CLEAN_FILES = aclocal-${APIVERSION} automake-${APIVERSION}
CONFIG_CLEAN_VPATH_FILES = defs
AM_V_GEN = $(am__v_GEN_$(V))
am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
am__leading_dot = @am__leading_dot@
am__tar = @am__tar@
am__untar = @am__untar@
+amdir = @amdir@
+automake_acdir = @automake_acdir@
bindir = @bindir@
build = @build@
build_alias = @build_alias@
program_transform_name = @program_transform_name@
psdir = @psdir@
sbindir = @sbindir@
+scriptdir = @scriptdir@
sh_errexit_works = @sh_errexit_works@
sharedstatedir = @sharedstatedir@
srcdir = @srcdir@
sysconfdir = @sysconfdir@
+system_acdir = @system_acdir@
target_alias = @target_alias@
top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
tap-setup.sh extract-testsuite-summary \
testsuite-summary-checks.sh trivial-test-driver \
$(generated_TESTS) gen-testsuite-part tap-functions.sh \
- plain-functions.sh
+ plain-functions.sh defs-static.in
# Hand-written tests.
destdir.test \
dirlist.test \
dirlist2.test \
+dirlist-abspath.test \
discover.test \
dist-included-parent-dir.test \
distcleancheck.test \
tap-diagnostic-custom-w.test tap-driver-stderr-w.test \
tap-doc-w.test tap-more-w.test tap-more2-w.test \
tap-recheck-w.test
+
+# Keep in sync with AC_SUBST'd stuff in defs-static.in.
+do_subst = sed \
+ -e 's|@abs_srcdir[@]|$(abs_srcdir)|g' \
+ -e 's|@abs_top_srcdir[@]|$(abs_top_srcdir)|g' \
+ -e 's|@abs_builddir[@]|$(abs_builddir)|g' \
+ -e 's|@prefix[@]|$(prefix)|g' \
+ -e 's|@amdir[@]|$(amdir)|g' \
+ -e 's|@bindir[@]|$(bindir)|g' \
+ -e 's|@datadir[@]|$(datadir)|g' \
+ -e 's|@docdir[@]|$(docdir)|g' \
+ -e 's|@automake_acdir[@]|$(automake_acdir)|g' \
+ -e 's|@system_acdir[@]|$(system_acdir)|g' \
+ -e 's|@scriptdir[@]|$(scriptdir)|g' \
+ -e 's|@pkgvdatadir[@]|$(pkgvdatadir)|g' \
+ -e 's|@host_alias[@]|$(host_alias)|g' \
+ -e 's|@build_alias[@]|$(build_alias)|g' \
+ -e 's|@APIVERSION[@]|$(APIVERSION)|g' \
+ -e 's|@PATH_SEPARATOR[@]|$(PATH_SEPARATOR)|g' \
+ -e 's|@SHELL[@]|$(SHELL)|g' \
+ -e 's|@PERL[@]|$(PERL)|g' \
+ -e 's|@EGREP[@]|$(EGREP)|g' \
+ -e 's|@FGREP[@]|$(FGREP)|g' \
+ -e 's|@TEX[@]|$(TEX)|g' \
+ -e 's|@MODIFICATION_DELAY[@]|$(MODIFICATION_DELAY)|g' \
+ -e 's|@am_AUTOCONF[@]|$(am_AUTOCONF)|g' \
+ -e 's|@am_AUTOM4TE[@]|$(am_AUTOM4TE)|g' \
+ -e 's|@am_AUTORECONF[@]|$(am_AUTORECONF)|g' \
+ -e 's|@am_AUTOHEADER[@]|$(am_AUTOHEADER)|g' \
+ -e 's|@am_AUTOUPDATE[@]|$(am_AUTOUPDATE)|g' \
+ -e 's|@sh_errexit_works[@]|$(sh_errexit_works)|g' \
+ -e 's|@configure_input[@]|Generated from $@.in. DO NOT EDIT BY HAND!|'
+
+CLEANFILES = defs-static
am__tmk = tests-in-makefile-list.tmp
am__tfs = tests-on-filesystem-list.tmp
am__tdf = diff-in-tests-lists.tmp
$(ACLOCAL_M4): $(am__aclocal_m4_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(am__aclocal_m4_deps):
-defs-static: $(top_builddir)/config.status $(srcdir)/defs-static.in
- cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
aclocal-${APIVERSION}: $(top_builddir)/config.status $(srcdir)/aclocal.in
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
automake-${APIVERSION}: $(top_builddir)/config.status $(srcdir)/automake.in
-test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG)
clean-generic:
+ -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
distclean-generic:
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
install-ps-am:
-installcheck-am:
+installcheck-am: installcheck-local
maintainer-clean: maintainer-clean-am
-rm -f Makefile
install-dvi-am install-exec install-exec-am install-html \
install-html-am install-info install-info-am install-man \
install-pdf install-pdf-am install-ps install-ps-am \
- install-strip installcheck installcheck-am installdirs \
- maintainer-clean maintainer-clean-generic mostlyclean \
- mostlyclean-generic pdf pdf-am ps ps-am recheck recheck-html \
- uninstall uninstall-am
+ install-strip installcheck installcheck-am installcheck-local \
+ installdirs maintainer-clean maintainer-clean-generic \
+ mostlyclean mostlyclean-generic pdf pdf-am ps ps-am recheck \
+ recheck-html uninstall uninstall-am
print-list-of-tests:
# subdivision of the tests.
$(TEST_LOGS): plain-functions.sh tap-functions.sh
+defs-static: defs-static.in
+ $(AM_V_at)rm -f $@ $@-t
+ $(AM_V_GEN)$(do_subst) $(srcdir)/defs-static.in >$@-t
+ $(AM_V_at) : Sanity check on the substitutions; \
+ if LC_ALL=C grep '@[a-zA-Z0-9_][a-zA-Z0-9_]*@' $@-t; then \
+ echo "$@ contains unexpanded substitution (see lines above)"; \
+ exit 1; \
+ fi
+ $(AM_V_at)chmod a-w $@-t && mv -f $@-t $@
+
# If two test scripts have the same basename, they will end up sharing
# the same log file, leading to all sort of undefined and undesired
# behaviours.
clean-maintcheck-testslist-tmp:
rm -f $(am__tmk) $(am__tfs) $(am__tdf)
+# Run the testsuite with the installed aclocal and automake.
+installcheck-local:
+ am_running_installcheck=yes $(MAKE) $(AM_MAKEFLAGS) check
+
clean-local: clean-local-check
.PHONY: clean-local-check
clean-local-check:
code preserves filenames with spaces. This will catch errors like
`echo $filename | ...`.
+ Make sure your test script can be used to faithfully check an
+ installed version of automake (as with "make installcheck"). For
+ example, if you need to copy or grep an automake-provided script,
+ do not assume that they can be found in the `$top_srcdir/lib'
+ directory, but use `$am_scriptdir' instead. The complete list of
+ such `$am_..dir' variables can be found in tests/defs-static.in.
+
Before commit: make sure the test is executable, add the tests to
TESTS in Makefile.am, add it to XFAIL_TESTS in addition if needed,
write a ChangeLog entry, send the diff to <automake-patches@gnu.org>.
#
# Also check for --install.
+# TODO: write a sister test that doesn't use a `dirlist' file, but
+# TODO: puts third-party macros directly into `acdir'.
+
. ./defs || Exit 1
cat >> configure.in << 'END'
MACRO3
END
-mkdir m4_1 m4_2 dirlist-test
+ACLOCAL="$ACLOCAL --system-acdir acdir"
+
+mkdir m4_1 m4_2 acdir acdir2
+echo ./acdir2 > acdir/dirlist
cat >m4_1/somedefs.m4 <<EOF
AC_DEFUN([MACRO1], [echo macro11 >> foo])
AC_DEFUN([MACRO1], [echo macro12 >> foo])
EOF
-cat >dirlist-test/macro.m4 <<EOF
+cat >acdir2/macro.m4 <<EOF
AC_DEFUN([MACRO3], [echo macro3 >> foo])
EOF
cp aclocal.m4 copy.m4
$sleep
-echo '#GREPME' >>dirlist-test/macro.m4
+echo '#GREPME' >>acdir2/macro.m4
$ACLOCAL -I m4_1 -I m4_2 --install
$AUTOCONF
./configure
grep macro14 foo
grep macro21 foo
+mkdir acdir
+ACLOCAL="$ACLOCAL --system-acdir acdir"
+
$sleep
-mkdir dirlist-test
-cat >dirlist-test/m1.m4 <<EOF
+cat >acdir/m1.m4 <<EOF
#serial 456
AC_DEFUN([AM_MACRO1], [echo macro1d >> foo])
AC_DEFUN([AM_MACRO2], [echo macro2d >> foo])
set -e
$ACLOCAL --print-ac-dir
-test "`$ACLOCAL --print-ac-dir`" = "$top_testsrcdir/m4"
+test "`$ACLOCAL --print-ac-dir`" = "$am_system_acdir"
$ACLOCAL -Wno-obsolete --acdir foo --print-ac-dir
test "`$ACLOCAL -Wno-obsolete --acdir foo --print-ac-dir`" = foo
test "`$ACLOCAL --system-acdir /bar --print-ac-dir`" = /bar
$ACLOCAL --automake-acdir /bar --print-ac-dir
-test "`$ACLOCAL --automake-acdir /bar --print-ac-dir`" = "$top_testsrcdir/m4"
+test "`$ACLOCAL --automake-acdir /bar --print-ac-dir`" = "$am_system_acdir"
:
cat > macros/gnome.m4 << 'END'
AC_DEFUN([GNOME_X_CHECKS], [
- AM_PATH_GTK(0.99.5,,AC_MSG_ERROR(GTK not installed, or gtk-config not in path))
+# Use a macro that cannot be installed in a third-party system-wide m4
+# file; otherwise, this test might fail under "make installcheck".
+ AM__PATH__GTK(0.99.5,,AC_MSG_ERROR(GTK not installed, or gtk-config not in path))
])
END
$ACLOCAL -I macros 2>stderr && { cat stderr >&2; Exit 1; }
cat stderr
-grep 'macros/gnome.m4:2:.*AM_PATH_GTK.*not found' stderr
+grep '^macros/gnome\.m4:4:.*AM__PATH__GTK.*not found' stderr
+
+:
am_create_testdir=empty
. ./defs || Exit 1
-cp "$top_testsrcdir"/doc/amhello-1.0.tar.gz . \
+cp "$am_docdir"/amhello-1.0.tar.gz . \
|| fatal_ "cannot get amhello tarball"
gzip -dc amhello-1.0.tar.gz | tar xf -
required=gcc
. ./defs || Exit 1
-cp "$top_testsrcdir"/doc/amhello-1.0.tar.gz . \
+cp "$am_docdir"/amhello-1.0.tar.gz . \
|| fatal_ "cannot get amhello tarball"
gzip -dc amhello-1.0.tar.gz | tar xf -
required=i586-mingw32msvc-gcc
. ./defs || Exit 1
-cp "$top_testsrcdir"/doc/amhello-1.0.tar.gz . \
+cp "$am_docdir"/amhello-1.0.tar.gz . \
|| fatal_ "cannot get amhello tarball"
host=i586-mingw32msvc
-build=`"$top_testsrcdir"/lib/config.guess` && test -n "$build" \
+build=`"$am_scriptdir"/config.guess` && test -n "$build" \
|| fatal_ "cannot guess build platform"
case $build in *mingw*) skip_ "build system is MinGW too";; esac
cat stderr >&2
grep "^configure\\.in:5:.*$warn_rx" stderr
-cat aclocal.sav "$top_testsrcdir"/m4/protos.m4 > aclocal.m4
+cat aclocal.sav "$am_automake_acdir"/protos.m4 > aclocal.m4
$AUTOCONF -Wnone 2>stderr && { cat stderr >&2; Exit 1; }
cat stderr >&2
grep "^configure\\.in:5:.*$warn_rx" stderr
# Required when using Texinfo.
: > texinfo.tex
-cp "$top_testsrcdir"/lib/mdate-sh .
+cp "$am_scriptdir"/mdate-sh .
$ACLOCAL
$AUTOCONF
pkgdata_DATA =
END
-cp "$top_testsrcdir/lib/mkinstalldirs" .
+cp "$am_scriptdir/mkinstalldirs" .
# The "././" prefix confuses Automake into thinking it is doing a
# subdir build. Yes, this is hacky.
END
if test x"$parallel_tests" = x"yes"; then
- cp "$top_testsrcdir"/lib/test-driver .
+ cp "$am_scriptdir/test-driver" .
fi
$ACLOCAL
rm -rf auxdir
mkdir auxdir
cd auxdir
-ln -s "$top_testsrcdir/lib/missing" "$top_testsrcdir/lib/install-sh" .
+ln -s "$am_scriptdir/missing" "$am_scriptdir/install-sh" .
cd ..
$AUTOMAKE -a -c
test -h auxdir/missing
test -f auxdir/depcomp
test ! -h auxdir/depcomp
-diff $top_testsrcdir/lib/depcomp auxdir/depcomp
+diff "$am_scriptdir"/depcomp auxdir/depcomp
:
# by the configure-time detected $CONFIG_SHELL.
+## ----------------------- ##
+## Early debugging info. ##
+## ----------------------- ##
+
+echo "Running from installcheck: $am_running_installcheck"
+echo "Using TAP: $using_tap"
+echo "PATH = $PATH"
+
+
## ---------------------- ##
## Environment cleanup. ##
## ---------------------- ##
get_shell_script ()
{
if test x"$test_prefer_config_shell" = x"yes"; then
- sed "1s|#!.*|#! $SHELL|" "$top_testsrcdir/lib/$1" > "$1"
+ sed "1s|#!.*|#! $SHELL|" "$am_scriptdir/$1" > "$1"
chmod a+x "$1"
else
- cp "$top_testsrcdir/lib/$1" .
+ cp "$am_scriptdir/$1" .
fi
sed 10q "$1" # For debugging.
}
# TODO: with /bin/sh, for better coverage.
case $am_tap_implementation in
perl)
- sed "1s|#!.*|#! $PERL -w|" "$top_testsrcdir"/lib/tap-driver.pl ;;
+ sed "1s|#!.*|#! $PERL -w|" "$am_scriptdir"/tap-driver.pl ;;
shell)
- sed "1s|#!.*|#! $SHELL|" "$top_testsrcdir"/lib/tap-driver.sh ;;
+ sed "1s|#!.*|#! $SHELL|" "$am_scriptdir"/tap-driver.sh ;;
*)
fatal_ "invalid \$am_tap_implementation '$am_tap_implementation'" ;;
esac > tap-driver \
## required by them. ##
## ----------------------------------------------------------- ##
-# Print it here, so that the user will see it also if the test
-# will be skipped due to some tool missing in $PATH itself.
-echo "$PATH"
-
# So that we can force the use of correct gcc, g++ etc., consistently
# with cross-compilation settings.
if cross_compiling; then
# We might need extra macros, e.g., from Libtool or Gettext.
# Find them on the system.
-# Use `-I $top_testsrcdir/m4' in addition to `--acdir=$top_testsrcdir/m4',
-# because the other `-I' directories added for libtool and gettext might
-# contain files from an old version of Automake that we don't want to use.
-# Use `-Wno-syntax' because we do not want our test suite to fail because
-# some third-party .m4 file is underquoted.
case " $required " in
*' libtool '* | *' libtoolize '* | *' gettext '* )
aclocaldir=$testprefix/share/aclocal
fi
;;
esac
- ACLOCAL="$ACLOCAL -Wno-syntax -I $top_testsrcdir/m4 $extra_includes -I $aclocaldir"
+ # Use `-I $am_automake_acdir' because the other `-I' directories added
+ # for libtool and gettext might contain files from an old version of
+ # Automake that we don't want to use. Use `-Wno-syntax' because we
+ # do not want our test suite to fail because some third-party `.m4'
+ # file is underquoted.
+ ACLOCAL="$ACLOCAL -Wno-syntax -I $am_automake_acdir"
+ ACLOCAL="$ACLOCAL $extra_includes -I $aclocaldir"
unset libtool_found gettext_found
unset extra_includes aclocaldir
;;
cd ./$testSubDir \
|| framework_failure_ "cannot chdir into test subdirectory"
if test x"$am_create_testdir" != x"empty"; then
- cp "$top_testsrcdir"/lib/install-sh "$top_testsrcdir"/lib/missing \
- "$top_testsrcdir"/lib/depcomp . \
- || framework_failure_ "fetching common files from lib/"
+ cp "$am_scriptdir"/install-sh "$am_scriptdir"/missing \
+ "$am_scriptdir"/depcomp . \
+ || framework_failure_ "fetching common files from $am_scriptdir"
# Build appropriate environment in test directory. E.g., create
# configure.in, touch all necessary files, etc. Don't use AC_OUTPUT,
# but AC_CONFIG_FILES so that appending still produces a valid
testbuilddir='@abs_builddir@'
testprefix='@prefix@'
+# Support for the "installcheck" target.
+case ${am_running_installcheck:=no} in
+ yes)
+ am_amdir='@amdir@'
+ am_automake_acdir='@automake_acdir@'
+ am_bindir='@bindir@'
+ am_datadir='@datadir@'
+ am_docdir='@docdir@'
+ am_pkgvdatadir='@pkgvdatadir@'
+ am_scriptdir='@scriptdir@'
+ am_system_acdir='@system_acdir@'
+ ;;
+ no)
+ am_amdir=$top_testsrcdir/lib/am
+ am_automake_acdir=$top_testsrcdir/m4
+ am_bindir=$testbuilddir
+ am_datadir=$top_testsrcdir
+ am_docdir=$top_testsrcdir/doc
+ am_pkgvdatadir=$top_testsrcdir/lib
+ am_scriptdir=$top_testsrcdir/lib
+ am_system_acdir=$top_testsrcdir/m4/acdir
+ ;;
+ *)
+ echo "$argv0: variable \`am_running_installcheck' has invalid"
+ "value \`$am_running_installcheck'" >&2
+ exit 99
+ ;;
+esac
+
APIVERSION='@APIVERSION@'
PATH_SEPARATOR='@PATH_SEPARATOR@'
test -z "$AUTORECONF" && AUTORECONF="@am_AUTORECONF@"
test -z "$AUTOHEADER" && AUTOHEADER="@am_AUTOHEADER@"
test -z "$AUTOUPDATE" && AUTOUPDATE="@am_AUTOUPDATE@"
-test -z "$MISSING" && MISSING=$top_testsrcdir/lib/missing
# Use -Werror because this also turns some Perl warnings into error.
# Tests for which this is inappropriate should use -Wno-error.
# in UTC; see <http://www.gnu.org/gnu/initial-announcement.html>.
old_timestamp=198309271735.59
-# Make our wrapper scripts accessible by default. And avoid to uselessly
+# Make our wrapper script (or installed scripts, if running under
+# "installcheck") accessible by default. And avoid to uselessly
# extend $PATH multiple times if this file is sourced multiple times.
case $PATH in
- "$testbuilddir$PATH_SEPARATOR"*) ;;
- *) PATH="$testbuilddir$PATH_SEPARATOR$PATH";;
+ $am_bindir$PATH_SEPARATOR*) ;;
+ *) PATH=$am_bindir$PATH_SEPARATOR$PATH;;
esac
export PATH
# Keep this in sync with the contents of depend.m4.
all_depmodes=`\
- sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < "$top_testsrcdir/lib/depcomp" \
+ sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < "$am_scriptdir/depcomp" \
| grep -v '^none$'` \
&& : Turn newlines and tabs into spaces, and strip extra whitespace. \
&& all_depmodes=`echo $all_depmodes` \
--- /dev/null
+#! /bin/sh
+# Copyright (C) 2002, 2003, 2004, 2011 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# Check use of absolute paths in dirlist.
+
+am_create_testdir=empty
+. ./defs || Exit 1
+
+mkdir acdir-more sub sub/acdir
+echo "`pwd`/acdir-more" > sub/acdir/dirlist
+
+echo 'AC_DEFUN([AM_FOO], [foo-foo--foo])' > acdir-more/foo.m4
+
+cd sub
+
+cat > configure.in <<EOF
+AC_INIT([$me], [1.0])
+AM_FOO
+EOF
+
+$ACLOCAL --system-acdir acdir
+$AUTOCONF
+
+# Only -I directories are subject to file inclusion.
+grep m4_include aclocal.m4 && Exit 1
+
+grep 'foo-foo--foo' configure
+
+:
# along with this program. If not, see <http://www.gnu.org/licenses/>.
# Check dirlist support.
-# This test relies on m4/dirlist.
. ./defs || Exit 1
AM_INIT_GUILE_MODULE
EOF
-mkdir dirlist-test
+mkdir acdir dirlist-test
+echo ./dirlist-test > acdir/dirlist
cat >dirlist-test/dirlist-check.m4 <<'END'
AC_DEFUN([AM_INIT_GUILE_MODULE],[
AC_DEFUN([AM_INIT_AUTOMAKE], [I should not be included])
EOF
-$ACLOCAL
+$ACLOCAL --system-acdir acdir
$AUTOCONF
# There should be no m4_include in aclocal.m4, even though m4/dirlist
# along with this program. If not, see <http://www.gnu.org/licenses/>.
# Check dirlist globbing support.
-# This test relies on m4/dirlist.
. ./defs || Exit 1
: foo bar baz
])
END
-$ACLOCAL
+
+mkdir my-acdir
+cat > my-acdir/dirlist <<'END'
+dirlist2*-test
+END
+
+$ACLOCAL --system-acdir my-acdir
$AUTOCONF
# There should be no m4_include in aclocal.m4, even though m4/dirlist
destdir.test \
dirlist.test \
dirlist2.test \
+dirlist-abspath.test \
discover.test \
dist-included-parent-dir.test \
distcleancheck.test \
3
END
+# Smash the useless difference of lib file locations.
+smash_useless_diffs ()
+{
+ # FIXME: we could get rid of the second 's|||' once we improve our
+ # wrapper scripts ...
+ sed -e "s|^$am_amdir/\\([a-z]*\.am\\)|\\1|" \
+ -e "s|^automake-$APIVERSION:|automake:|" ${1+"$@"};
+}
+
$ACLOCAL
AUTOMAKE_fails -Wno-error
-# Smash the useless difference of lib file locations.
-sed 's,^.*lib/am/\([a-z]*\.am\),\1,' stderr >observed
+smash_useless_diffs stderr >observed
+
cat >expected <<\EOF
Makefile.am:12: warning: VAR multiply defined in condition TRUE ...
Makefile.am:8: ... `VAR' previously defined here
Makefile.am:6: while processing program `ctags'
EOF
+cat expected
+cat observed
diff expected observed || Exit 1
AUTOMAKE_fails -Werror
-sed 's,^.*lib/am/\([a-z]*\.am\),\1,' stderr >observed
-( echo 'automake: warnings are treated as errors'; cat expected ) \
- | diff - observed || Exit 1
+smash_useless_diffs stderr >observed
+(echo 'automake: warnings are treated as errors' && cat expected) > t
+mv -f t expected
+
+cat expected
+cat observed
+
+diff expected observed || Exit 1
+
:
: > libbar/bar.c
-cp "$top_testsrcdir/lib/config-ml.in" .
-cp "$top_testsrcdir/lib/symlink-tree" .
+cp "$am_scriptdir"/config-ml.in "$am_scriptdir"/symlink-tree .
$ACLOCAL
$AUTOCONF
END
$PERL -ne '/AU_DEFUN\(\[(\w+)\]/ && print "$1\n"' \
- "$top_testsrcdir/m4/obsolete.m4" >> obs
+ "$am_automake_acdir/obsolete.m4" > obs
cat obs >> configure.in
$PERL -ne 'chomp; print "grep $_ output || Exit 1\n"; ' obs > obs.1
$PERL -ne 'chomp; print "grep $_ configure.in && Exit 1\n"; ' obs > obs.2
# This is hacky and ugly, but has the great advantage of avoiding us a lot
# of pain with background processes and related synchronization issues.
-cat - "$top_testsrcdir"/lib/test-driver > test-driver <<'END'
+cat - "$am_scriptdir"/test-driver > test-driver <<'END'
#!/bin/sh
echo $$ > pid
END
}
END
-cp "$top_testsrcdir"/lib/compile "$top_testsrcdir"/lib/test-driver .
+cp "$am_scriptdir"/compile "$am_scriptdir"/test-driver .
$ACLOCAL
$AUTOMAKE --foreign --foreign -Wall 2>stderr || { cat stderr >&2; Exit 1; }
: > ltmain.sh
-cp "$top_testsrcdir"/lib/config.guess "$top_testsrcdir"/lib/config.sub .
+cp "$am_scriptdir/config.guess" "$am_scriptdir/config.sub" .
$ACLOCAL
$AUTOMAKE
chmod a+x *.test
mkdir build-aux
-cp "$top_testsrcdir"/lib/tap-driver.pl build-aux \
+cp "$am_scriptdir"/tap-driver.pl build-aux \
|| framework_failure_ "fetching the perl TAP driver"
(export AUTOMAKE ACLOCAL AUTOCONF && $AUTORECONF -vi) || Exit 1
mkdir aux1
mkdir tex
-cp "$top_testsrcdir/lib/texinfo.tex" tex
+cp "$am_pkgvdatadir/texinfo.tex" tex
$ACLOCAL
$AUTOMAKE --add-missing
# Required when using Texinfo.
: > texinfo.tex
-cp "$top_testsrcdir"/lib/mdate-sh .
+cp "$am_scriptdir"/mdate-sh .
$ACLOCAL
$AUTOCONF
$ACLOCAL
AUTOMAKE_fails -Wbazquux
+# FIXME: we could get rid of this once we improve our wrapper scripts.
+sed "s/^automake:/automake-$APIVERSION:/" stderr > t
+mv -f t stderr
+cat stderr >&2
grep '^configure\.in:2:.* unknown warning category.*zardoz' stderr
grep '^Makefile\.am:1:.* unknown warning category.*foobar' stderr
-grep '^automake:.* unknown warning category.*bazquux' stderr
+grep "^automake-$APIVERSION:.* unknown warning category.*bazquux" stderr
# Check that we can override warnings about unknown warning categories.
$AUTOMAKE -Wno-unsupported -Wbazquux