NOTE: this is a preliminary, experimental version of a patch intended to boost up the performance of the Automake testsuite, idaelly by ~ 15% or 20%. I post it here to get early feedback (hopefully) and objections (hopefully not too many ;-)
The patch is attached. Below is the git commit message, which should offer a detailed explanation of what the patch does, and how and why it does it. Regards, Stefano -*-*-*- In our testsuite, basically each test that runs automake also runs aclocal beforehand, in order to generate a proper aclocal.m4 file. But for many tests, the generated aclocal.m4 is quite minimal, and very similar to those generated in other tests. So we can avoid a lot of aclocal invocations by pre-computing a common aclocal.m4, and making eligible test use it instead of having to run aclocal. This gives a noticeable speed-up to the testsuite. [FIXME: this touted "speed-up" should really be quantified on a few systems]. [TEMPORARY SPEEDUP QUANTIFICATION]: The time of execution of the tests modified so far, average of three runs on my Debian system: * precomputed aclocal.m4 = no: real 253.1, user 168.1, sys 60.3 * precomputed aclocal.m4 = yes: real 220.0, user 133.6, sys 55.6 In order not to reduce coverage of the most common real-world usages, where a call to autoconf/automake is almost always preceded by a call to aclocal, we don't use the pre-computed aclocal.m4 by default; the developer that wants to use it has to enable its use explicitly by exporting the variable `$am_precomputed_aclocal' to "yes". A note about the implementation: we had previously tried to use the apparently simpler (and certainly more naive) idiom of just copying unconditionally the pre-computed aclocal.m4 from `tests/defs', and letting the test scripts override it (when needed) by re-running aclocal; but then, if the test script subsequently modifies the configure.in skeleton, we could (subject to a highly time-dependent race condition) end up in the situation of having configure.in *older* than aclocal.m4, so that the automatic remake rules from Automake would be triggered, potentially leading to intermittent, spurious failures. * tests/Makefile.am (common-aclocal.m4): New target, builds an almost-minimal aclocal.m4 file that contains the definitions of the most commonly used automake macros. ($(TEST_LOGS)): Depends on it. (CLEANFILES): Remove it. * tests/.gitignore: Ignore `common-aclocal.m4'. * tests/defs (aclocal_simple_): New subroutine. It can be used to generate an aclocal.m4 file for the commonly-used automake macros. This is done by simply calling $ACLOCAL, unless the shell variable `$am_precomputed_aclocal' is set to a "true" value, in which case the precomputed common-aclocal.m4 is used instead. * tests/acoutnoq.test: Use aclocal_simple_ instead of $ACLOCAL. * tests/acoutbs.test: Likewise. * tests/acoutbs2.test: Likewise. * tests/acoutpt.test: Likewise. * tests/acoutqnl.test: Likewise. * tests/acsubst.test: Likewise. * tests/acsubst2.test: Likewise. * tests/all.test: Likewise. * tests/all2.test: Likewise. * tests/alloca.test: Likewise. * tests/alloca2.test: Likewise. * tests/amopt.test: Likewise. * tests/amopts-location.test: Likewise. * tests/amopts-variable-expansion.test: Likewise. * tests/ar.test: Likewise. * tests/ar2.test: Likewise. * tests/autodist-acconfig.test: Likewise. * tests/autodist-acconfig-no-subdir.test: Likewise. * tests/autodist-config-headers.test: Likewise. * tests/autodist-configure-no-subdir.test: Likewise. * tests/autodist-stamp-vti.test: Likewise. * tests/autodist-subdir.test: Likewise. * tests/autohdr.test: Likewise. * tests/autohdr4.test: Likewise. * tests/autohdrdry.test: Likewise. * tests/auxdir.test: Likewise. * tests/auxdir2.test: Likewise. * tests/auxdir3.test: Likewise. * tests/auxdir4.test: Likewise. * tests/auxdir5.test: Likewise. * tests/auxdir6.test: Likewise. * tests/auxdir7.test: Likewise. * tests/auxdir8.test: Likewise. * tests/backsl.test: Likewise. * tests/backsl2.test: Likewise. * tests/backsl3.test: Likewise. * tests/badprog.test: Likewise. * tests/block.test: Likewise. * tests/bsource.test: Likewise. * tests/backcompat6.test: Likewise. * tests/alpha.test: Likewise, and add a trailing `:' command. * tests/alpha2.test: Likewise. * tests/backsl4.test: Likewise. * tests/amsubst.test: Likewise. Also, move checks in Makefile.am instead of grepping make output, and grep Makefile.in. * tests/acoutpt2.test: Use aclocal_simple_ instead of $ACLOCAL, and remove a redundant $ACLOCAL call. * tests/asm.test: Likewise, but remove various redundant $ACLOCAL calls. * tests/asm2.test: Likewise. * tests/asm3.test: Likewise. * tests/backcompat.test: Likewise, and related adjustments. * tests/backcompat3.test: Likewise. * tests/backcompat4.test: Likewise. * tests/badopt.test: Use aclocal_simple_ instead of $ACLOCAL. Make grepping of automake stderr stricter. Add trailing `:' command. * tests/badline.test: Likewise. Also, use proper m4 quoting in configure.in, and remove a `|| Exit 1' guard, it isn't required anymore now that all tests use `set -e'. * ... MORE TESTS TO BE MODIFIED ...
From 2df3f068023c394cacf9b72a89799b8ef77f646f Mon Sep 17 00:00:00 2001 Message-Id: <2df3f068023c394cacf9b72a89799b8ef77f646f.1307298042.git.stefano.lattar...@gmail.com> From: Stefano Lattarini <stefano.lattar...@gmail.com> Date: Fri, 3 Dec 2010 15:24:14 +0100 Subject: [PATCH] testsuite: can avoid many aclocal runs by pre-computing aclocal.m4 In our testsuite, basically each test that runs automake also runs aclocal beforehand, in order to generate a proper aclocal.m4 file. But for many tests, the generated aclocal.m4 is quite minimal, and very similar to those generated in other tests. So we can avoid a lot of aclocal invocations by pre-computing a common aclocal.m4, and making eligible test use it instead of having to run aclocal. This gives a noticeable speed-up to the testsuite. [FIXME: this touted "speed-up" should really be quantified on a few systems]. [TEMPORARY SPEEDUP QUANTIFICATION]: The time of execution of the tests modified so far, average of three runs on my Debian system: * precomputed aclocal.m4 = no: real 253.1, user 168.1, sys 60.3 * precomputed aclocal.m4 = yes: real 220.0, user 133.6, sys 55.6 In order not to reduce coverage of the most common real-world usages, where a call to autoconf/automake is almost always preceded by a call to aclocal, we don't use the pre-computed aclocal.m4 by default; the developer that wants to use it has to enable its use explicitly by exporting the variable `$am_precomputed_aclocal' to "yes". A note about the implementation: we had previously tried to use the apparently simpler (and certainly more naive) idiom of just copying unconditionally the pre-computed aclocal.m4 from `tests/defs', and letting the test scripts override it (when needed) by re-running aclocal; but then, if the test script subsequently modifies the configure.in skeleton, we could (subject to a highly time-dependent race condition) end up in the situation of having configure.in *older* than aclocal.m4, so that the automatic remake rules from Automake would be triggered, potentially leading to intermittent, spurious failures. * tests/Makefile.am (common-aclocal.m4): New target, builds an almost-minimal aclocal.m4 file that contains the definitions of the most commonly used automake macros. ($(TEST_LOGS)): Depends on it. (CLEANFILES): Remove it. * tests/.gitignore: Ignore `common-aclocal.m4'. * tests/defs (aclocal_simple_): New subroutine. It can be used to generate an aclocal.m4 file for the commonly-used automake macros. This is done by simply calling $ACLOCAL, unless the shell variable `$am_precomputed_aclocal' is set to a "true" value, in which case the precomputed common-aclocal.m4 is used instead. * tests/acoutnoq.test: Use aclocal_simple_ instead of $ACLOCAL. * tests/acoutbs.test: Likewise. * tests/acoutbs2.test: Likewise. * tests/acoutpt.test: Likewise. * tests/acoutqnl.test: Likewise. * tests/acsubst.test: Likewise. * tests/acsubst2.test: Likewise. * tests/all.test: Likewise. * tests/all2.test: Likewise. * tests/alloca.test: Likewise. * tests/alloca2.test: Likewise. * tests/amopt.test: Likewise. * tests/amopts-location.test: Likewise. * tests/amopts-variable-expansion.test: Likewise. * tests/ar.test: Likewise. * tests/ar2.test: Likewise. * tests/autodist-acconfig.test: Likewise. * tests/autodist-acconfig-no-subdir.test: Likewise. * tests/autodist-config-headers.test: Likewise. * tests/autodist-configure-no-subdir.test: Likewise. * tests/autodist-stamp-vti.test: Likewise. * tests/autodist-subdir.test: Likewise. * tests/autohdr.test: Likewise. * tests/autohdr4.test: Likewise. * tests/autohdrdry.test: Likewise. * tests/auxdir.test: Likewise. * tests/auxdir2.test: Likewise. * tests/auxdir3.test: Likewise. * tests/auxdir4.test: Likewise. * tests/auxdir5.test: Likewise. * tests/auxdir6.test: Likewise. * tests/auxdir7.test: Likewise. * tests/auxdir8.test: Likewise. * tests/backsl.test: Likewise. * tests/backsl2.test: Likewise. * tests/backsl3.test: Likewise. * tests/badprog.test: Likewise. * tests/block.test: Likewise. * tests/bsource.test: Likewise. * tests/backcompat6.test: Likewise. * tests/alpha.test: Likewise, and add a trailing `:' command. * tests/alpha2.test: Likewise. * tests/backsl4.test: Likewise. * tests/amsubst.test: Likewise. Also, move checks in Makefile.am instead of grepping make output, and grep Makefile.in. * tests/acoutpt2.test: Use aclocal_simple_ instead of $ACLOCAL, and remove a redundant $ACLOCAL call. * tests/asm.test: Likewise, but remove various redundant $ACLOCAL calls. * tests/asm2.test: Likewise. * tests/asm3.test: Likewise. * tests/backcompat.test: Likewise, and related adjustments. * tests/backcompat3.test: Likewise. * tests/backcompat4.test: Likewise. * tests/badopt.test: Use aclocal_simple_ instead of $ACLOCAL. Make grepping of automake stderr stricter. Add trailing `:' command. * tests/badline.test: Likewise. Also, use proper m4 quoting in configure.in, and remove a `|| Exit 1' guard, it isn't required anymore now that all tests use `set -e'. * ... MORE TESTS TO BE MODIFIED ... --- ChangeLog | 106 +++++++++++++++++++++++++++++++ tests/.gitignore | 1 + tests/Makefile.am | 26 +++++++- tests/Makefile.in | 27 ++++++++- tests/acoutbs.test | 2 +- tests/acoutbs2.test | 2 +- tests/acoutnoq.test | 2 +- tests/acoutpt.test | 2 +- tests/acoutpt2.test | 3 +- tests/acoutqnl.test | 2 +- tests/acsubst.test | 2 +- tests/acsubst2.test | 2 +- tests/all.test | 2 +- tests/all2.test | 2 +- tests/alloca.test | 2 +- tests/alloca2.test | 2 +- tests/alpha.test | 4 +- tests/alpha2.test | 4 +- tests/amopt.test | 2 +- tests/amopts-location.test | 2 +- tests/amopts-variable-expansion.test | 2 +- tests/amsubst.test | 17 +++-- tests/ar.test | 2 +- tests/ar2.test | 2 +- tests/asm.test | 6 +- tests/asm2.test | 6 +- tests/asm3.test | 6 +- tests/autodist-acconfig-no-subdir.test | 2 +- tests/autodist-acconfig.test | 2 +- tests/autodist-config-headers.test | 2 +- tests/autodist-configure-no-subdir.test | 2 +- tests/autodist-stamp-vti.test | 2 +- tests/autohdr.test | 2 +- tests/autohdr4.test | 2 +- tests/autohdrdry.test | 2 +- tests/auxdir.test | 2 +- tests/auxdir2.test | 2 +- tests/auxdir3.test | 2 +- tests/auxdir4.test | 3 +- tests/auxdir5.test | 2 +- tests/auxdir6.test | 2 +- tests/auxdir7.test | 2 +- tests/auxdir8.test | 2 +- tests/backcompat.test | 4 +- tests/backcompat3.test | 11 +++- tests/backcompat4.test | 8 +- tests/backcompat5.test | 2 +- tests/backcompat6.test | 2 +- tests/backsl.test | 2 +- tests/backsl2.test | 2 +- tests/backsl3.test | 2 +- tests/backsl4.test | 4 +- tests/badline.test | 9 ++- tests/badopt.test | 6 +- tests/badprog.test | 2 +- tests/block.test | 2 +- tests/bsource.test | 3 +- tests/defs | 19 ++++++ 58 files changed, 271 insertions(+), 78 deletions(-) diff --git a/ChangeLog b/ChangeLog index 91f4f99..e639139 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,109 @@ +2011-06-05 Stefano Lattarini <stefano.lattar...@gmail.com> + + testsuite: can avoid many aclocal runs by pre-computing aclocal.m4 + In our testsuite, basically each test that runs automake also runs + aclocal beforehand, in order to generate a proper aclocal.m4 file. + But for many tests, the generated aclocal.m4 is quite minimal, and + very similar to those generated in other tests. So we can avoid a + lot of aclocal invocations by pre-computing a common aclocal.m4, + and making eligible test use it instead of having to run aclocal. + This gives a noticeable speed-up to the testsuite. [FIXME: this + touted "speed-up" should really be quantified on a few systems]. + + [TEMPORARY SPEEDUP QUANTIFICATION]: The time of execution of the + tests modified so far, average of three runs on my Debian system: + + * precomputed aclocal.m4 = no: real 253.1, user 168.1, sys 60.3 + * precomputed aclocal.m4 = yes: real 220.0, user 133.6, sys 55.6 + + In order not to reduce coverage of the most common real-world + usages, where a call to autoconf/automake is almost always preceded + by a call to aclocal, we don't use the pre-computed aclocal.m4 by + default; the developer that wants to use it has to enable its use + explicitly by exporting the variable `$am_precomputed_aclocal' to + "yes". + A note about the implementation: we had previously tried to use the + apparently simpler (and certainly more naive) idiom of just copying + unconditionally the pre-computed aclocal.m4 from `tests/defs', and + letting the test scripts override it (when needed) by re-running + aclocal; but then, if the test script subsequently modifies the + configure.in skeleton, we could (subject to a highly time-dependent + race condition) end up in the situation of having configure.in + *older* than aclocal.m4, so that the automatic remake rules from + Automake would be triggered, potentially leading to intermittent, + spurious failures. + * tests/Makefile.am (common-aclocal.m4): New target, builds an + almost-minimal aclocal.m4 file that contains the definitions of + the most commonly used automake macros. + ($(TEST_LOGS)): Depends on it. + (CLEANFILES): Remove it. + * tests/.gitignore: Ignore `common-aclocal.m4'. + * tests/defs (aclocal_simple_): New subroutine. It can be used to + generate an aclocal.m4 file for the commonly-used automake macros. + This is done by simply calling $ACLOCAL, unless the shell variable + `$am_precomputed_aclocal' is set to a "true" value, in which case + the precomputed common-aclocal.m4 is used instead. + * tests/acoutnoq.test: Use aclocal_simple_ instead of $ACLOCAL. + * tests/acoutbs.test: Likewise. + * tests/acoutbs2.test: Likewise. + * tests/acoutpt.test: Likewise. + * tests/acoutqnl.test: Likewise. + * tests/acsubst.test: Likewise. + * tests/acsubst2.test: Likewise. + * tests/all.test: Likewise. + * tests/all2.test: Likewise. + * tests/alloca.test: Likewise. + * tests/alloca2.test: Likewise. + * tests/amopt.test: Likewise. + * tests/amopts-location.test: Likewise. + * tests/amopts-variable-expansion.test: Likewise. + * tests/ar.test: Likewise. + * tests/ar2.test: Likewise. + * tests/autodist-acconfig.test: Likewise. + * tests/autodist-acconfig-no-subdir.test: Likewise. + * tests/autodist-config-headers.test: Likewise. + * tests/autodist-configure-no-subdir.test: Likewise. + * tests/autodist-stamp-vti.test: Likewise. + * tests/autodist-subdir.test: Likewise. + * tests/autohdr.test: Likewise. + * tests/autohdr4.test: Likewise. + * tests/autohdrdry.test: Likewise. + * tests/auxdir.test: Likewise. + * tests/auxdir2.test: Likewise. + * tests/auxdir3.test: Likewise. + * tests/auxdir4.test: Likewise. + * tests/auxdir5.test: Likewise. + * tests/auxdir6.test: Likewise. + * tests/auxdir7.test: Likewise. + * tests/auxdir8.test: Likewise. + * tests/backsl.test: Likewise. + * tests/backsl2.test: Likewise. + * tests/backsl3.test: Likewise. + * tests/badprog.test: Likewise. + * tests/block.test: Likewise. + * tests/bsource.test: Likewise. + * tests/backcompat6.test: Likewise. + * tests/alpha.test: Likewise, and add a trailing `:' command. + * tests/alpha2.test: Likewise. + * tests/backsl4.test: Likewise. + * tests/amsubst.test: Likewise. Also, move checks in Makefile.am + instead of grepping make output, and grep Makefile.in. + * tests/acoutpt2.test: Use aclocal_simple_ instead of $ACLOCAL, + and remove a redundant $ACLOCAL call. + * tests/asm.test: Likewise, but remove various redundant $ACLOCAL + calls. + * tests/asm2.test: Likewise. + * tests/asm3.test: Likewise. + * tests/backcompat.test: Likewise, and related adjustments. + * tests/backcompat3.test: Likewise. + * tests/backcompat4.test: Likewise. + * tests/badopt.test: Use aclocal_simple_ instead of $ACLOCAL. Make + grepping of automake stderr stricter. Add trailing `:' command. + * tests/badline.test: Likewise. Also, use proper m4 quoting in + configure.in, and remove a `|| Exit 1' guard, it isn't required + anymore now that all tests use `set -e'. + * ... MORE TESTS TO BE MODIFIED ... + 2011-05-27 Stefano Lattarini <stefano.lattar...@gmail.com> testsuite: each test case depends on `defs-static' diff --git a/tests/.gitignore b/tests/.gitignore index c309c22..fce168d 100644 --- a/tests/.gitignore +++ b/tests/.gitignore @@ -1,5 +1,6 @@ aclocal-* automake-* +common-aclocal.m4 defs-static instspc-tests.am parallel-tests.am diff --git a/tests/Makefile.am b/tests/Makefile.am index 3d1e5c4..86fc728 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -1089,7 +1089,31 @@ include $(top_srcdir)/CheckListOfTests.am maintainer-check-list-of-tests: $(expected_list_of_tests) # Dependencies valid for each test case. -$(TEST_LOGS): defs defs-static aclocal-$(APIVERSION) automake-$(APIVERSION) +$(TEST_LOGS): defs defs-static +$(TEST_LOGS): aclocal-$(APIVERSION) automake-$(APIVERSION) +$(TEST_LOGS): common-aclocal.m4 + +# Build an almost-minimal aclocal.m4 file that contains the definitions of +# the most commonly used automake macros. This will avoid us the need to +# call `alocal' too often in our tests. +common-aclocal.m4: defs-static aclocal-$(APIVERSION) Makefile.am + $(AM_V_GEN): \ + && tempdir=common-aclocal.dir \ + && { test ! -d $$tmpdir || rm -rf $$tempdir; } \ + && mkdir $$tempdir \ + && cd $$tempdir \ + && exec 5>>configure.ac \ + && echo 'AC_INIT([foo], [0])' >&5 \ + && echo 'AM_INIT_AUTOMAKE' >&5 \ + && echo 'AM_CONDITIONAL([COND], [:])' >&5 \ + && echo 'AM_SILENT_RULES' >&5 \ + && echo 'AM_PROG_CC_C_O' >&5 \ + && (. ../defs-static && $$ACLOCAL) \ + && chmod a-w aclocal.m4 \ + && cd .. \ + && mv -f $$tempdir/aclocal.m4 $@ \ + && rm -rf $$tempdir +CLEANFILES = common-aclocal.m4 clean-local: clean-local-check .PHONY: clean-local-check diff --git a/tests/Makefile.in b/tests/Makefile.in index 840e4f0..9395bab 100644 --- a/tests/Makefile.in +++ b/tests/Makefile.in @@ -1351,6 +1351,7 @@ expected_list_of_tests = $(handwritten_tests) $(generated_tests) am__tmk = tests-in-makefile-list.tmp am__tfs = tests-on-filesystem-list.tmp am__tdf = diff-in-tests-lists.tmp +CLEANFILES = common-aclocal.m4 all: all-am .SUFFIXES: @@ -1592,6 +1593,7 @@ mostlyclean-generic: -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) @@ -1803,7 +1805,30 @@ clean-maintcheck-testslist-tmp: maintainer-check-list-of-tests: $(expected_list_of_tests) # Dependencies valid for each test case. -$(TEST_LOGS): defs defs-static aclocal-$(APIVERSION) automake-$(APIVERSION) +$(TEST_LOGS): defs defs-static +$(TEST_LOGS): aclocal-$(APIVERSION) automake-$(APIVERSION) +$(TEST_LOGS): common-aclocal.m4 + +# Build an almost-minimal aclocal.m4 file that contains the definitions of +# the most commonly used automake macros. This will avoid us the need to +# call `alocal' too often in our tests. +common-aclocal.m4: defs-static aclocal-$(APIVERSION) Makefile.am + $(AM_V_GEN): \ + && tempdir=common-aclocal.dir \ + && { test ! -d $$tmpdir || rm -rf $$tempdir; } \ + && mkdir $$tempdir \ + && cd $$tempdir \ + && exec 5>>configure.ac \ + && echo 'AC_INIT([foo], [0])' >&5 \ + && echo 'AM_INIT_AUTOMAKE' >&5 \ + && echo 'AM_CONDITIONAL([COND], [:])' >&5 \ + && echo 'AM_SILENT_RULES' >&5 \ + && echo 'AM_PROG_CC_C_O' >&5 \ + && (. ../defs-static && $$ACLOCAL) \ + && chmod a-w aclocal.m4 \ + && cd .. \ + && mv -f $$tempdir/aclocal.m4 $@ \ + && rm -rf $$tempdir clean-local: clean-local-check .PHONY: clean-local-check diff --git a/tests/acoutbs.test b/tests/acoutbs.test index 232267d..fc63815 100755 --- a/tests/acoutbs.test +++ b/tests/acoutbs.test @@ -30,7 +30,7 @@ END : > Makefile.am : > zot.in -$ACLOCAL +aclocal_simple_ $AUTOCONF $AUTOMAKE diff --git a/tests/acoutbs2.test b/tests/acoutbs2.test index cd1cd9d..6b1ffd8 100755 --- a/tests/acoutbs2.test +++ b/tests/acoutbs2.test @@ -35,7 +35,7 @@ END : > Makefile.am : > zot.in -$ACLOCAL +aclocal_simple_ $AUTOCONF $AUTOMAKE diff --git a/tests/acoutnoq.test b/tests/acoutnoq.test index d49f878..2d2f3ef 100755 --- a/tests/acoutnoq.test +++ b/tests/acoutnoq.test @@ -31,5 +31,5 @@ END : > Makefile.am -$ACLOCAL +aclocal_simple_ $AUTOMAKE diff --git a/tests/acoutpt.test b/tests/acoutpt.test index 12b6427..d020339 100755 --- a/tests/acoutpt.test +++ b/tests/acoutpt.test @@ -28,5 +28,5 @@ END : > Makefile.am -$ACLOCAL +aclocal_simple_ $AUTOMAKE diff --git a/tests/acoutpt2.test b/tests/acoutpt2.test index d972989..aef3f6c 100755 --- a/tests/acoutpt2.test +++ b/tests/acoutpt2.test @@ -31,14 +31,13 @@ mkdir subdir : > foo.in : > subdir/foo.in -$ACLOCAL +aclocal_simple_ $AUTOMAKE count=`$FGREP foo.in Makefile.in | wc -l` test $count -eq 2 # This ought to work as well. -$ACLOCAL $AUTOMAKE --add-missing --force-missing : diff --git a/tests/acoutqnl.test b/tests/acoutqnl.test index 5cfac28..35811ef 100755 --- a/tests/acoutqnl.test +++ b/tests/acoutqnl.test @@ -28,5 +28,5 @@ END : > Makefile.am -$ACLOCAL +aclocal_simple_ $AUTOMAKE diff --git a/tests/acsubst.test b/tests/acsubst.test index a02b34c..b6dfd3c 100755 --- a/tests/acsubst.test +++ b/tests/acsubst.test @@ -27,5 +27,5 @@ mumble_SOURCES = a.c b.c d.h mumble_LDFLAGS = $(FOOBAR_LDFLAGS) END -$ACLOCAL +aclocal_simple_ $AUTOMAKE -a diff --git a/tests/acsubst2.test b/tests/acsubst2.test index cbbbfd8..08e3586 100755 --- a/tests/acsubst2.test +++ b/tests/acsubst2.test @@ -28,5 +28,5 @@ mumble_SOURCES = a.c b.c d.h mumble_CFLAGS = $(FOOBAR_CFLAGS) END -$ACLOCAL +aclocal_simple_ $AUTOMAKE -a diff --git a/tests/all.test b/tests/all.test index 6df1397..d27eb9d 100755 --- a/tests/all.test +++ b/tests/all.test @@ -23,7 +23,7 @@ targets='all install-exec install-data uninstall' echo "$targets:" | sed -e 's/[ :]/-local&/g' > Makefile.am cat Makefile.am # might be useful for debugging -$ACLOCAL +aclocal_simple_ $AUTOMAKE for target in $targets; do diff --git a/tests/all2.test b/tests/all2.test index f38167e..523dfe8 100755 --- a/tests/all2.test +++ b/tests/all2.test @@ -18,7 +18,7 @@ . ./defs || Exit 1 -$ACLOCAL +aclocal_simple_ targets='all install-exec install-data uninstall' for target in $targets; do diff --git a/tests/alloca.test b/tests/alloca.test index cff6641..a2f80a7 100755 --- a/tests/alloca.test +++ b/tests/alloca.test @@ -30,7 +30,7 @@ END : > alloca.c -$ACLOCAL +aclocal_simple_ AUTOMAKE_fails grep '^Makefile\.am:1:.*define .*RANLIB.* add .*AC_PROG_RANLIB' stderr grep '^Makefile\.am:3:.*define .*ALLOCA.* add .*AC_FUNC_ALLOCA' stderr diff --git a/tests/alloca2.test b/tests/alloca2.test index 8ebdcd7..a0a87de 100755 --- a/tests/alloca2.test +++ b/tests/alloca2.test @@ -30,7 +30,7 @@ END : > alloca.c -$ACLOCAL +aclocal_simple_ AUTOMAKE_fails grep '^Makefile\.am:1:.*define.*LIBTOOL.* add .*LT_INIT' stderr grep '^Makefile\.am:3:.*LTALLOCA' stderr diff --git a/tests/alpha.test b/tests/alpha.test index a95e42d..22c891a 100755 --- a/tests/alpha.test +++ b/tests/alpha.test @@ -55,7 +55,7 @@ END : > ChangeLog : > THANKS -$ACLOCAL +aclocal_simple_ $AUTOCONF $AUTOMAKE ./configure @@ -69,3 +69,5 @@ test ! -f works echo 'alpha 1.0a released' > NEWS $MAKE check test -f works + +: diff --git a/tests/alpha2.test b/tests/alpha2.test index b8ef266..ee3df83 100755 --- a/tests/alpha2.test +++ b/tests/alpha2.test @@ -51,9 +51,11 @@ mkdir sub : > ChangeLog : > THANKS -$ACLOCAL +aclocal_simple_ $AUTOCONF $AUTOMAKE ./configure $MAKE check test -f works + +: diff --git a/tests/amopt.test b/tests/amopt.test index 568299a..9831c88 100755 --- a/tests/amopt.test +++ b/tests/amopt.test @@ -31,7 +31,7 @@ AUTOMAKE_OPTIONS = -Wall endif END -$ACLOCAL +aclocal_simple_ AUTOMAKE_fails grep '^Makefile\.am:2.*AUTOMAKE_OPTIONS.*conditional' stderr diff --git a/tests/amopts-location.test b/tests/amopts-location.test index 23b75c0..9bb29d8 100755 --- a/tests/amopts-location.test +++ b/tests/amopts-location.test @@ -58,7 +58,7 @@ cat >>configure.in <<'END' AC_CONFIG_FILES([Makefile2 Makefile3]) END -$ACLOCAL +aclocal_simple_ # Automake options 'tar-v7', 'tar-ustar' and 'tar-pax' can only be used # as argument to AM_INIT_AUTOMAKE, and not in AUTOMAKE_OPTIONS. AUTOMAKE_fails diff --git a/tests/amopts-variable-expansion.test b/tests/amopts-variable-expansion.test index 7a746ea..2f83c96 100755 --- a/tests/amopts-variable-expansion.test +++ b/tests/amopts-variable-expansion.test @@ -43,7 +43,7 @@ zardoz := install: END -$ACLOCAL +aclocal_simple_ AUTOMAKE_run 0 grep '^Makefile\.am:.*:=.*not portable' stderr grep README stderr && Exit 1 diff --git a/tests/amsubst.test b/tests/amsubst.test index 9bba8fa..2d48ecc 100755 --- a/tests/amsubst.test +++ b/tests/amsubst.test @@ -25,15 +25,20 @@ AC_OUTPUT END cat > Makefile.am << 'END' +.PHONY: test test: - @echo $(backslash) @backslash@$$ +## If _AM_SUBST_NOTMAKE is honored, the $(backslash) variable will be +## empty. But the @backslash@ string should still be substituted. + test x'$(backslash)' = x && test x'@backslash@' = x'\' END -$ACLOCAL -$AUTOCONF +aclocal_simple_ $AUTOMAKE +grep '^backslash' Makefile.in && Exit 1 + +$AUTOCONF ./configure -# If _AM_SUBST_NOTMAKE is not honored, the backslash -# variable will not be empty. -$MAKE test | grep '^[$]$' +$MAKE test + +: diff --git a/tests/ar.test b/tests/ar.test index 4a69c34..b5176fb 100755 --- a/tests/ar.test +++ b/tests/ar.test @@ -31,7 +31,7 @@ lib_LIBRARIES = libfoo.a libfoo_a_SOURCES = END -$ACLOCAL +aclocal_simple_ $AUTOCONF $AUTOMAKE ./configure diff --git a/tests/ar2.test b/tests/ar2.test index a614949..f3566cc 100755 --- a/tests/ar2.test +++ b/tests/ar2.test @@ -30,7 +30,7 @@ EXTRA_LIBRARIES = libfoo.a libfoo_a_SOURCES = foo.c END -$ACLOCAL +aclocal_simple_ $AUTOMAKE grep '^ARFLAGS =' Makefile.in grep '^AR =' Makefile.in diff --git a/tests/asm.test b/tests/asm.test index ec6dbec..a1cdf5f 100755 --- a/tests/asm.test +++ b/tests/asm.test @@ -20,6 +20,8 @@ . ./defs || Exit 1 +aclocal_simple_ + mv configure.in configure.stub cat > Makefile.am << 'END' @@ -33,7 +35,6 @@ AC_SUBST([CCASFLAGS]) AC_OUTPUT END -$ACLOCAL AUTOMAKE_fails grep '[Aa]ssembler source.*CCAS.* undefined' stderr grep 'define .*CCAS.* add .*AM_PROG_AS' stderr @@ -53,7 +54,6 @@ AC_SUBST([CCASFLAGS]) AC_OUTPUT END -$ACLOCAL AUTOMAKE_fails grep '[Aa]ssembler source.*CCAS.* undefined' stderr grep 'define .*CCAS.* add .*AM_PROG_AS' stderr @@ -68,7 +68,6 @@ AC_PROG_CC AC_OUTPUT END -$ACLOCAL AUTOMAKE_fails grep '[Aa]ssembler source.*CCASFLAGS.* undefined' stderr grep 'define .*CCASFLAGS.* add .*AM_PROG_AS' stderr @@ -84,7 +83,6 @@ AC_SUBST([CCASFLAGS]) AC_OUTPUT END -$ACLOCAL $AUTOMAKE rm -rf autom4te*.cache diff --git a/tests/asm2.test b/tests/asm2.test index e7c0396..85c3530 100755 --- a/tests/asm2.test +++ b/tests/asm2.test @@ -20,6 +20,8 @@ . ./defs || Exit 1 +aclocal_simple_ + mv configure.in configure.stub cat > Makefile.am << 'END' @@ -33,7 +35,6 @@ AC_SUBST([CCASFLAGS]) AC_OUTPUT END -$ACLOCAL AUTOMAKE_fails grep '[Aa]ssembler source.*CCAS.* undefined' stderr grep 'define .*CCAS.* add .*AM_PROG_AS' stderr @@ -53,7 +54,6 @@ AC_SUBST([CCASFLAGS]) AC_OUTPUT END -$ACLOCAL AUTOMAKE_fails grep '[Aa]ssembler source.*CCAS.* undefined' stderr grep 'define .*CCAS.* add .*AM_PROG_AS' stderr @@ -68,7 +68,6 @@ AC_PROG_CC AC_OUTPUT END -$ACLOCAL AUTOMAKE_fails grep '[Aa]ssembler source.*CCASFLAGS.* undefined' stderr grep 'define .*CCASFLAGS.* add .*AM_PROG_AS' stderr @@ -84,7 +83,6 @@ AC_SUBST([CCASFLAGS]) AC_OUTPUT END -$ACLOCAL AUTOMAKE_fails grep ' add .*AM_PROG_AS' stderr diff --git a/tests/asm3.test b/tests/asm3.test index f2f40f2..12d40be 100755 --- a/tests/asm3.test +++ b/tests/asm3.test @@ -20,6 +20,8 @@ . ./defs || Exit 1 +aclocal_simple_ + mv configure.in configure.stub cat > Makefile.am << 'END' @@ -33,7 +35,6 @@ AC_SUBST([CCASFLAGS]) AC_OUTPUT END -$ACLOCAL AUTOMAKE_fails grep '[Aa]ssembler source.*CCAS.* undefined' stderr grep 'define .*CCAS.* add .*AM_PROG_AS' stderr @@ -53,7 +54,6 @@ AC_SUBST([CCASFLAGS]) AC_OUTPUT END -$ACLOCAL AUTOMAKE_fails grep '[Aa]ssembler source.*CCAS.* undefined' stderr grep 'define .*CCAS.* add .*AM_PROG_AS' stderr @@ -68,7 +68,6 @@ AC_PROG_CC AC_OUTPUT END -$ACLOCAL AUTOMAKE_fails grep '[Aa]ssembler source.*CCASFLAGS.* undefined' stderr grep 'define .*CCASFLAGS.* add .*AM_PROG_AS' stderr @@ -84,7 +83,6 @@ AC_SUBST([CCASFLAGS]) AC_OUTPUT END -$ACLOCAL AUTOMAKE_fails grep ' add .*AM_PROG_AS' stderr diff --git a/tests/autodist-acconfig-no-subdir.test b/tests/autodist-acconfig-no-subdir.test index 931feaf..67fae86 100755 --- a/tests/autodist-acconfig-no-subdir.test +++ b/tests/autodist-acconfig-no-subdir.test @@ -46,7 +46,7 @@ END : > sub/acconfig.h -$ACLOCAL +aclocal_simple_ $AUTOMAKE $AUTOCONF diff --git a/tests/autodist-acconfig.test b/tests/autodist-acconfig.test index 5674e27..d4b588a 100755 --- a/tests/autodist-acconfig.test +++ b/tests/autodist-acconfig.test @@ -34,7 +34,7 @@ END : > acconfig.h -$ACLOCAL +aclocal_simple_ $AUTOMAKE $AUTOCONF diff --git a/tests/autodist-config-headers.test b/tests/autodist-config-headers.test index 76bd740..acaaf2f 100755 --- a/tests/autodist-config-headers.test +++ b/tests/autodist-config-headers.test @@ -49,7 +49,7 @@ touch config.h.in config.h.top config.h.bot \ conf2.hin cfg2.h.top cfg2.h.bot \ sub/config.h.in sub/config.h.top sub/config.h.bot -$ACLOCAL +aclocal_simple_ $AUTOMAKE $AUTOCONF diff --git a/tests/autodist-configure-no-subdir.test b/tests/autodist-configure-no-subdir.test index d2bd60c..67c801e 100755 --- a/tests/autodist-configure-no-subdir.test +++ b/tests/autodist-configure-no-subdir.test @@ -60,7 +60,7 @@ END : > sub/configure.in : > sub/configure -$ACLOCAL +aclocal_simple_ $AUTOMAKE $AUTOCONF diff --git a/tests/autodist-stamp-vti.test b/tests/autodist-stamp-vti.test index 2984372..92b9328 100755 --- a/tests/autodist-stamp-vti.test +++ b/tests/autodist-stamp-vti.test @@ -48,7 +48,7 @@ END : > texinfo.tex cp "$testsrcdir/../lib/mdate-sh" . -$ACLOCAL +aclocal_simple_ $AUTOCONF $AUTOMAKE -a diff --git a/tests/autohdr.test b/tests/autohdr.test index 3e0e231..db96418 100755 --- a/tests/autohdr.test +++ b/tests/autohdr.test @@ -24,7 +24,7 @@ EOF : > Makefile.am -$ACLOCAL +aclocal_simple_ $AUTOHEADER test -f thisfile.h.in diff --git a/tests/autohdr4.test b/tests/autohdr4.test index 430d75c..d961850 100755 --- a/tests/autohdr4.test +++ b/tests/autohdr4.test @@ -59,7 +59,7 @@ int main (void) EOF -$ACLOCAL +aclocal_simple_ $AUTOCONF $AUTOHEADER $AUTOMAKE diff --git a/tests/autohdrdry.test b/tests/autohdrdry.test index b6208ff..3c81693 100755 --- a/tests/autohdrdry.test +++ b/tests/autohdrdry.test @@ -26,7 +26,7 @@ EOF : >Makefile.am -$ACLOCAL +aclocal_simple_ $AUTOCONF $AUTOHEADER $AUTOMAKE diff --git a/tests/auxdir.test b/tests/auxdir.test index 04e69f8..d369ac9 100755 --- a/tests/auxdir.test +++ b/tests/auxdir.test @@ -35,7 +35,7 @@ cp "$top_testsrcdir/lib/mkinstalldirs" . # The "././" prefix confuses Automake into thinking it is doing a # subdir build. Yes, this is hacky. -$ACLOCAL +aclocal_simple_ $AUTOMAKE ././Makefile grep '/\./\./mkinstalldirs' Makefile.in diff --git a/tests/auxdir2.test b/tests/auxdir2.test index 4912751..597ac8e 100755 --- a/tests/auxdir2.test +++ b/tests/auxdir2.test @@ -28,7 +28,7 @@ END : > Makefile.am -$ACLOCAL +aclocal_simple_ # Both these two invocations are meant. # They exercise both code paths concerning auxiliary files. $AUTOMAKE -a diff --git a/tests/auxdir3.test b/tests/auxdir3.test index eb1a888..da05e1a 100755 --- a/tests/auxdir3.test +++ b/tests/auxdir3.test @@ -24,7 +24,7 @@ END : > Makefile.am -$ACLOCAL +aclocal_simple_ AUTOMAKE_fails grep 'AC_CONFIG_AUX_DIR.*AM_INIT_AUTOMAKE' stderr diff --git a/tests/auxdir4.test b/tests/auxdir4.test index 09bde4a..f99f9fa 100755 --- a/tests/auxdir4.test +++ b/tests/auxdir4.test @@ -27,7 +27,8 @@ END : > Makefile.am -$ACLOCAL +aclocal_simple_ + AUTOMAKE_fails grep '^configure\.in:2:.*aux.*W32' stderr diff --git a/tests/auxdir5.test b/tests/auxdir5.test index 6c43295..c0660dc 100755 --- a/tests/auxdir5.test +++ b/tests/auxdir5.test @@ -27,7 +27,7 @@ END : > Makefile.am -$ACLOCAL +aclocal_simple_ AUTOMAKE_fails grep '^configure\.in:2:.*nonesuch.* not exist' stderr diff --git a/tests/auxdir6.test b/tests/auxdir6.test index bf63895..7c31cc5 100755 --- a/tests/auxdir6.test +++ b/tests/auxdir6.test @@ -41,7 +41,7 @@ cp Makefile.am subdir/Makefile.am : > auxdir/install-sh : > auxdir/missing -$ACLOCAL +aclocal_simple_ $AUTOMAKE $FGREP '$(top_srcdir)/auxdir/mkinstalldirs' Makefile.in diff --git a/tests/auxdir7.test b/tests/auxdir7.test index d346ad2..83e2270 100755 --- a/tests/auxdir7.test +++ b/tests/auxdir7.test @@ -38,7 +38,7 @@ cp Makefile.am subdir/Makefile.am : > mkinstalldirs -$ACLOCAL +aclocal_simple_ $AUTOMAKE $FGREP '$(top_srcdir)/mkinstalldirs' Makefile.in diff --git a/tests/auxdir8.test b/tests/auxdir8.test index 1a5e5d9..60b04f2 100755 --- a/tests/auxdir8.test +++ b/tests/auxdir8.test @@ -38,7 +38,7 @@ cp Makefile.am subdir/Makefile.am : > mkinstalldirs -$ACLOCAL +aclocal_simple_ $AUTOMAKE $FGREP '$(top_srcdir)/mkinstalldirs' Makefile.in diff --git a/tests/backcompat.test b/tests/backcompat.test index 9ef4d4c..8338a69 100755 --- a/tests/backcompat.test +++ b/tests/backcompat.test @@ -43,6 +43,8 @@ test: display test x'$(PACKAGE_STRING)' = x END +aclocal_simple_ + for ac_init in 'AC_INIT' 'AC_INIT([Makefile.am])'; do for am_extra_args in '' ', []' ', [:]' ', [false]'; do rm -rf autom4te*.cache config* Makefile.in Makefile @@ -53,7 +55,7 @@ AC_CONFIG_FILES([Makefile]) AC_OUTPUT END cat configure.in # might be useful for debugging - $ACLOCAL + touch aclocal.m4 # Avoid useless automatic remake. $AUTOCONF $AUTOMAKE ./configure diff --git a/tests/backcompat3.test b/tests/backcompat3.test index 437377f..99e5844 100755 --- a/tests/backcompat3.test +++ b/tests/backcompat3.test @@ -21,6 +21,8 @@ empty='' +aclocal_simple_ + cat > Makefile.am <<'END' ## Leading `:;' here required to work around bugs of (at least) bash 3.2 got: Makefile @@ -39,6 +41,8 @@ END ### Run 1 ### +touch aclocal.m4 # Avoid useless automatic remake. + cat > configure.in <<END AC_INIT([ac_name], [ac_version]) AM_INIT_AUTOMAKE([am_name], [am_version]) @@ -48,7 +52,6 @@ END cat configure.in -$ACLOCAL $AUTOCONF $AUTOMAKE @@ -72,6 +75,8 @@ diff exp got ### Run 2 ### +touch aclocal.m4 # Avoid useless automatic remake. + cat > configure.in <<'END' dnl# `AC_INIT' in Autoconf <= 2.63 doesn't have an URL argument. dnl# Luckily, `AC_AUTOCONF_VERSION' and `m4_version_prereq' are @@ -89,7 +94,6 @@ END cat configure.in -$ACLOCAL $AUTOCONF $AUTOMAKE @@ -113,6 +117,8 @@ diff exp got ### Run 3 ### +touch aclocal.m4 # Avoid useless automatic remake. + cat > configure.in <<END AC_INIT([ac_name], [ac_version]) AM_INIT_AUTOMAKE([am_name], [am_version], [am_foo_quux]) @@ -122,7 +128,6 @@ END cat configure.in -$ACLOCAL $AUTOCONF $AUTOMAKE diff --git a/tests/backcompat4.test b/tests/backcompat4.test index 97f0e8c..287c5fd 100755 --- a/tests/backcompat4.test +++ b/tests/backcompat4.test @@ -29,6 +29,8 @@ mkdir sub ls -l # might be useful for debugging +aclocal_simple_ + for args in \ 'foo' \ 'foo:foo1.in' \ @@ -39,7 +41,7 @@ for args in \ 'foo:foo1.in:foo2.in:foo3.in' \ 'foo:foo1.in:foo2.in:sub/bar.in:foo3.in' \ ; do - rm -rf autom4te*.cache aclocal.m4 + rm -rf autom4te*.cache cat >configure.in <<END AC_INIT([$me], [1.0]) AM_INIT_AUTOMAKE @@ -47,17 +49,15 @@ AC_CONFIG_FILES([$args]) AC_OUTPUT END cat configure.in # for debugging - $ACLOCAL $AUTOMAKE Makefile mv -f Makefile.in Makefile.acf - rm -rf autom4te*.cache aclocal.m4 + rm -rf autom4te*.cache cat >configure.in <<END AC_INIT([$me], [1.0]) AM_INIT_AUTOMAKE AC_OUTPUT([$args]) END cat configure.in # for debugging - $ACLOCAL $AUTOMAKE Makefile mv -f Makefile.in Makefile.aco diff Makefile.acf Makefile.aco diff --git a/tests/backcompat5.test b/tests/backcompat5.test index 2385ae4..95fecdc 100755 --- a/tests/backcompat5.test +++ b/tests/backcompat5.test @@ -88,7 +88,7 @@ TESTS = a.test EXTRA_DIST = $(TESTS) END -$ACLOCAL +aclocal_simple_ $AUTOCONF $AUTOMAKE diff --git a/tests/backcompat6.test b/tests/backcompat6.test index 343fd4e..b5d5582 100755 --- a/tests/backcompat6.test +++ b/tests/backcompat6.test @@ -76,7 +76,7 @@ int main (void) } END -$ACLOCAL +aclocal_simple_ $AUTOMAKE $AUTOCONF diff --git a/tests/backsl.test b/tests/backsl.test index 4e3943f..a839729 100755 --- a/tests/backsl.test +++ b/tests/backsl.test @@ -28,7 +28,7 @@ bin_PROGRAMS = \ frob END -$ACLOCAL +aclocal_simple_ $AUTOMAKE grep '^_SOURCE' Makefile.in && Exit 1 diff --git a/tests/backsl2.test b/tests/backsl2.test index f0116e3..a1929a8 100755 --- a/tests/backsl2.test +++ b/tests/backsl2.test @@ -25,7 +25,7 @@ SUBDIRS = \ . END -$ACLOCAL +aclocal_simple_ $AUTOMAKE : diff --git a/tests/backsl3.test b/tests/backsl3.test index 876c045..e95f2ae 100755 --- a/tests/backsl3.test +++ b/tests/backsl3.test @@ -23,7 +23,7 @@ cat > Makefile.am << 'END' foo = \ END -$ACLOCAL +aclocal_simple_ AUTOMAKE_fails cat stderr grep 'trailing backslash' stderr diff --git a/tests/backsl4.test b/tests/backsl4.test index 7cfe737..7230670 100755 --- a/tests/backsl4.test +++ b/tests/backsl4.test @@ -34,7 +34,7 @@ END echo 'data_DATA = baz \ ' >>Makefile.am echo ' fum' >>Makefile.am -$ACLOCAL +aclocal_simple_ $AUTOCONF AUTOMAKE_fails grep ':1:.*whitespace' stderr @@ -43,3 +43,5 @@ $AUTOMAKE -Wno-error ./configure # Older versions of Automake used to produce invalid Makefiles such input. $MAKE ok + +: diff --git a/tests/badline.test b/tests/badline.test index 18ad929..012b810 100755 --- a/tests/badline.test +++ b/tests/badline.test @@ -23,12 +23,15 @@ cat > configure.in << END AC_INIT([$me], [1.0]) AM_INIT_AUTOMAKE -AC_SUBST(TEXINFOS) +AC_SUBST([TEXINFOS]) AC_CONFIG_FILES([Makefile]) END : > Makefile.am -$ACLOCAL || Exit 1 +$ACLOCAL AUTOMAKE_fails -grep 'configure.in:3:.*info_TEXINFOS' stderr +grep '^configure\.in:3:.* anachronism' stderr +grep '^configure\.in:3:.*use .*info_TEXINFOS' stderr + +: diff --git a/tests/badopt.test b/tests/badopt.test index 6f6d792..35c9735 100755 --- a/tests/badopt.test +++ b/tests/badopt.test @@ -21,6 +21,8 @@ echo 'AUTOMAKE_OPTIONS = zardoz' > Makefile.am -$ACLOCAL +aclocal_simple_ AUTOMAKE_fails -grep zardoz stderr +grep 'option.*zardoz' stderr + +: diff --git a/tests/badprog.test b/tests/badprog.test index 87b7562..56a2048 100755 --- a/tests/badprog.test +++ b/tests/badprog.test @@ -29,5 +29,5 @@ bin_PROGRAMS = a,b a_b_SOURCES = ab.c END -$ACLOCAL +aclocal_simple_ $AUTOMAKE diff --git a/tests/block.test b/tests/block.test index 0eda190..3f3d854 100755 --- a/tests/block.test +++ b/tests/block.test @@ -28,7 +28,7 @@ cat > Makefile.am << 'END' #END END -$ACLOCAL +aclocal_simple_ $AUTOMAKE (sed -e '/^#START/,/^#END/ !d' Makefile.in | grep -v '^#') && Exit 1 diff --git a/tests/bsource.test b/tests/bsource.test index 38f8a43..b1fb9ca 100755 --- a/tests/bsource.test +++ b/tests/bsource.test @@ -25,7 +25,8 @@ include_HEADERS = gettext-po.h BUILT_SOURCES = po-hash-gen.c END -$ACLOCAL +aclocal_simple_ $AUTOMAKE grep 'install-recursive' Makefile.in && Exit 1 + : diff --git a/tests/defs b/tests/defs index 5494625..0a38a8c 100644 --- a/tests/defs +++ b/tests/defs @@ -201,6 +201,25 @@ is_newest () test -z "$is_newest_files" } +# aclocal_simple_ +# --------------- +# Generate an aclocal.m4 file for the commonly-used automake macros. +# This is done by simply calling $ACLOCAL, unless the variable +# `$am_precomputed_aclocal' is set to a "true" value, in which case +# a precomputed aclocal.m4 is used instead. +aclocal_simple_ () +{ + if test $# -gt 0; then + framework_failure_ "'simple_aclocal_' called with arguments" + fi + case $am_precomputed_aclocal in + [yY]|[yY]es|1) + cp "$testbuilddir/common-aclocal.m4" aclocal.m4 || return 99;; + *) + $ACLOCAL;; + esac +} + # AUTOMAKE_run status [options...] # -------------------------------- # Run Automake with OPTIONS, and fail if automake -- 1.7.2.3