CLEANFILES += t/ax/test-defs.sh
nodist_noinst_DATA = t/ax/test-defs.sh
+ noinst_SCRIPTS = # Will be updated soon.
+
+ t/ax/shell-no-trail-bslash: t/ax/shell-no-trail-bslash.in Makefile
+ $(AM_V_at)rm -f $@ $@-t
+ $(AM_V_GEN)in=t/ax/shell-no-trail-bslash.in \
+ && $(MKDIR_P) t/ax \
+ && $(do_subst) <$(srcdir)/$$in >$@-t \
+ && chmod a+x $@-t
+ $(generated_file_finalize)
+ EXTRA_DIST += t/ax/shell-no-trail-bslash.in
+ CLEANFILES += t/ax/shell-no-trail-bslash
+ noinst_SCRIPTS += t/ax/shell-no-trail-bslash
+
runtest: runtest.in Makefile
$(AM_V_at)rm -f $@ $@-t
- $(AM_V_GEN)in=runtest.in \
- && $(MKDIR_P) t/ax \
- && $(do_subst) <$(srcdir)/runtest.in >$@-t \
- && chmod a+x $@-t
+ $(AM_V_GEN)$(do_subst)
+ $(AM_V_at)chmod a+x $@-t
$(generated_file_finalize)
EXTRA_DIST += runtest.in
CLEANFILES += runtest
check-local: check-tests-syntax
.PHONY: check-tests-syntax
-## Checking the list of tests.
-test_subdirs = t t/pm contrib/t
-include $(srcdir)/t/CheckListOfTests.am
-
+ # Recipes with a trailing backslash character (possibly followed by
+ # blank characters only) can cause spurious syntax errors with at
+ # least older bash versions (e.g., bash 2.05b), and can be potentially
+ # be unportable to other weaker shells. Run the testsuite in a way
+ # that helps catching such problems in Automake-generated recipes.
+ # See automake bug#10436.
+ check-no-trailing-backslash-in-recipes:
+ $(AM_V_at)$(MAKE) $(AM_MAKEFLAGS) check \
+ CONFIG_SHELL='$(abs_top_builddir)/t/ax/shell-no-trail-bslash'
+ .PHONY: check-no-trailing-backslash-in-recipes
+
# Run the testsuite with the installed aclocal and automake.
installcheck-local: installcheck-testsuite
installcheck-testsuite:
# 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 silent-rules mode for C++.
# This test should work with generic C++ compilers; keep it in sync with
- # sister test 'silentcxx-gcc.sh', which requires the GNU C++ compiler
+ # sister test 'silent-cxx-gcc.sh', which requires the GNU C++ compiler
# and forces the use of gcc depmode.
required=c++
$AUTOMAKE --add-missing
$AUTOCONF
- ./configure --enable-silent-rules
- $MAKE >stdout || { cat stdout; exit 1; }
- cat stdout
- $EGREP ' (-c|-o)|(mv|mkdir) ' stdout && exit 1
- grep ' CC *libfoo\.lo' stdout
- grep ' CC *libbar_la-libbar\.lo' stdout
- grep ' CC *sub/libbaz\.lo' stdout
- grep ' CC *sub/sub_libbla_la-libbla\.lo' stdout
- grep ' CCLD *libfoo\.la' stdout
- grep ' CCLD *libbar\.la' stdout
- grep ' CCLD *sub/libbaz\.la' stdout
- grep ' CCLD *sub/libbla\.la' stdout
+ for config_args in \
+ '--enable-dependency-tracking' \
+ '--disable-dependency-tracking' \
+ ; do
- $MAKE clean
- $MAKE V=1 >stdout || { cat stdout; exit 1; }
- cat stdout
- grep ' -c' stdout
- grep ' -o libfoo' stdout
- grep ' -o sub/libbaz' stdout
- # The libtool command line can contain e.g. a '--tag=CC' option.
- sed 's/--tag=[^ ]*/--tag=x/g' stdout | $EGREP '(CC|LD) ' && exit 1
+ ./configure --enable-silent-rules $config_args
+
+ $MAKE >stdout || { cat stdout; exit 1; }
+ cat stdout
-
- $EGREP ' (-c|-o)' stdout && exit 1
- grep 'mv ' stdout && exit 1
- grep ' CC .*foo\.' stdout
- grep ' CC .*bar\.' stdout
- grep ' CC .*baz\.' stdout
- grep ' CC .*bla\.' stdout
- grep ' CCLD .*foo' stdout
- grep ' CCLD .*bar' stdout
- grep ' CCLD .*baz' stdout
- grep ' CCLD .*bla' stdout
++ $EGREP ' (-c|-o)|(mv|mkdir) ' stdout && exit 1
++ grep ' CC *libfoo\.lo' stdout
++ grep ' CC *libbar_la-libbar\.lo' stdout
++ grep ' CC *sub/libbaz\.lo' stdout
++ grep ' CC *sub/sub_libbla_la-libbla\.lo' stdout
++ grep ' CCLD *libfoo\.la' stdout
++ grep ' CCLD *libbar\.la' stdout
++ grep ' CCLD *sub/libbaz\.la' stdout
++ grep ' CCLD *sub/libbla\.la' stdout
+
+ $MAKE clean
+ $MAKE V=1 >stdout || { cat stdout; exit 1; }
+ cat stdout
+ grep ' -c' stdout
+ grep ' -o libfoo' stdout
++ grep ' -o sub/libbaz' stdout
+ # The libtool command line can contain e.g. a '--tag=CC' option.
+ sed 's/--tag=[^ ]*/--tag=x/g' stdout | $EGREP '(CC|LD) ' && exit 1
+
+ $MAKE distclean
+
+ done
: