From: Stefano Lattarini Date: Sat, 30 Jun 2012 18:18:32 +0000 (+0200) Subject: Merge branch 'master' into ng/master X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7a3a1b6d8b030312203c22e137f1d387566487b4;p=thirdparty%2Fautomake.git Merge branch 'master' into ng/master * master: texi: clean after Texinfo manuals in $(SUBDIRS) directories correctly coverage: regression in texinfo "make mostlyclean" with $(SUBDIRS) tests: fix a spurious failure configure: fix detection of POSIX shell to work in a VPATH build tests: prefer "test ! -e FILE" to check that a file doesn't exist configure: move a misplaced "section" comment configure: clump check for ${var%...} and ${var#...} expansion together cosmetics: improve wording of a couple of configure messages configure: the testsuite shell must support 'test -e' and 'test ! -e' tests: remove stale workarounds for Solaris /bin/sh Signed-off-by: Stefano Lattarini --- 7a3a1b6d8b030312203c22e137f1d387566487b4 diff --cc t/distcom-subdir.sh index 15693311e,a841fd9ba..c6b6926b1 --- a/t/distcom-subdir.sh +++ b/t/distcom-subdir.sh @@@ -47,22 -37,13 +47,22 @@@ EN $ACLOCAL $AUTOCONF $AUTOMAKE - test ! -f depcomp + test ! -e depcomp -cat > subdir/Makefile.am << 'END' +cat >> subdir/Makefile.am << 'END' bin_PROGRAMS = foo +.PHONY: test-distcom +test-distcom: + echo ' ' $(am__dist_common) ' ' | $(FGREP) ' $(top_srcdir)/depcomp ' +check-local: test-distcom END -: > subdir/foo.c +cat > subdir/foo.c <<'END' +int main (void) +{ + return 0; +} +END $AUTOMAKE -a subdir/Makefile test -f depcomp diff --cc t/fort5.sh index f2267f3b2,c5be2ab4f..517fb23ff --- a/t/fort5.sh +++ b/t/fort5.sh @@@ -88,17 -88,20 +88,17 @@@ grep " --tag=FC" Makefile.i # ./configure may exit with status 77 if no compiler is found, # or if the compiler cannot compile Fortran 90 files). ./configure -$MAKE -subobjs=$(echo sub/*.lo) -test "$subobjs" = 'sub/*.lo' -$MAKE distcheck -# The following will be fixed in a later patch: -$MAKE distclean -echo 'AUTOMAKE_OPTIONS = subdir-objects' >> Makefile.am -$AUTOMAKE -a -./configure $MAKE +test -f sub/bar.lo - test ! -f bar.lo + test ! -e bar.lo +## The setting of FCFLAGS should only cause objects deriving from +## Fortran 90, not Fortran 77, to be renamed. +test -f sub/baz.lo - test ! -f baz.lo - test ! -f sub/libgoodbye_la-baz.lo - test ! -f libgoodbye_la-baz.lo + test ! -e baz.lo ++test ! -e sub/libgoodbye_la-baz.lo + test ! -e libgoodbye_la-baz.lo + $MAKE distcheck : diff --cc t/instdir-java.sh index 5d2d77685,f31cdb78c..4a68b7476 --- a/t/instdir-java.sh +++ b/t/instdir-java.sh @@@ -45,16 -45,16 +45,16 @@@ cd buil ../configure --prefix="$instdir" $MAKE -javadir= -export javadir -$MAKE -e install +xMAKE() { $MAKE javadir= "$@"; } + +xMAKE install - test ! -d "$instdir" + test ! -e "$instdir" -$MAKE -e install DESTDIR="$destdir" +xMAKE install DESTDIR="$destdir" - test ! -d "$instdir" - test ! -d "$destdir" + test ! -e "$instdir" + test ! -e "$destdir" -$MAKE -e uninstall > stdout || { cat stdout; exit 1; } +xMAKE uninstall > stdout || { cat stdout; exit 1; } cat stdout grep 'rm -f' stdout && exit 1 -$MAKE -e uninstall DESTDIR="$destdir" +xMAKE uninstall DESTDIR="$destdir" : diff --cc t/instdir-lisp.sh index 0bcf58428,59bf8b0e4..bbdcdb49a --- a/t/instdir-lisp.sh +++ b/t/instdir-lisp.sh @@@ -42,16 -42,17 +42,16 @@@ cd buil ../configure --prefix="$instdir" $MAKE -lispdir= -export lispdir +xMAKE () { $MAKE lispdir= "$@"; } -$MAKE -e install +xMAKE install - test ! -d "$instdir" + test ! -e "$instdir" -$MAKE -e install DESTDIR="$destdir" +xMAKE install DESTDIR="$destdir" - test ! -d "$instdir" - test ! -d "$destdir" + test ! -e "$instdir" + test ! -e "$destdir" -$MAKE -e uninstall > stdout || { cat stdout; exit 1; } +xMAKE uninstall > stdout || { cat stdout; exit 1; } cat stdout grep 'rm -f' stdout && exit 1 -$MAKE -e uninstall DESTDIR="$destdir" +xMAKE uninstall DESTDIR="$destdir" : diff --cc t/instdir-ltlib.sh index 430fb74e0,c6578e24c..136374b61 --- a/t/instdir-ltlib.sh +++ b/t/instdir-ltlib.sh @@@ -68,14 -69,14 +68,14 @@@ cd buil am_cv_python_pyexecdir="$instdir/pyexec" $MAKE -bindir= libdir= pyexecdir= -export bindir libdir pyexecdir -$MAKE -e install +xMAKE() { $MAKE bindir= libdir= pyexecdir= "$@"; } + +xMAKE install - test ! -d "$instdir" + test ! -e "$instdir" -$MAKE -e install DESTDIR="$destdir" +xMAKE install DESTDIR="$destdir" - test ! -d "$instdir" - test ! -d "$destdir" + test ! -e "$instdir" + test ! -e "$destdir" -$MAKE -e uninstall > stdout || { cat stdout; exit 1; } +xMAKE uninstall > stdout || { cat stdout; exit 1; } cat stdout # Creative quoting below to please maintainer-check. grep 'rm'' ' stdout && exit 1 diff --cc t/instdir-no-empty.sh index 136e1e37c,bef179d53..5223cd532 --- a/t/instdir-no-empty.sh +++ b/t/instdir-no-empty.sh @@@ -106,16 -106,16 +106,16 @@@ doinst ( ./configure --prefix="$cwd/inst" doinst - test ! -d inst || { find inst; exit 1; } + test ! -e inst || { find inst; exit 1; } $MAKE uninstall -doinst bin_SCRIPTS=foo.sh AM_MAKEFLAGS='bin_SCRIPTS=foo.sh' +doinst bin_SCRIPTS=foo.sh test -f inst/bin/foo.sh ./configure doinst DESTDIR="$cwd/dest" - test ! -d dest || { find dest; exit 1; } + test ! -e dest || { find dest; exit 1; } $MAKE uninstall -doinst DESTDIR="$cwd/dest" bin_SCRIPTS=foo.sh AM_MAKEFLAGS='bin_SCRIPTS=foo.sh' +doinst DESTDIR="$cwd/dest" bin_SCRIPTS=foo.sh test -f dest/usr/local/bin/foo.sh : diff --cc t/instdir-prog.sh index 4eb1f695c,ed0acc130..957f6ef76 --- a/t/instdir-prog.sh +++ b/t/instdir-prog.sh @@@ -67,15 -68,14 +67,15 @@@ cd buil am_cv_python_pyexecdir="$instdir/pyexec" $MAKE -bindir= libdir= pyexecdir= +xMAKE () { $MAKE bindir= libdir= pyexecdir= "$@"; } + export bindir libdir pyexecdir -$MAKE -e install +xMAKE install - test ! -d "$instdir" + test ! -e "$instdir" -$MAKE -e install DESTDIR="$destdir" +xMAKE install DESTDIR="$destdir" - test ! -d "$instdir" - test ! -d "$destdir" + test ! -e "$instdir" + test ! -e "$destdir" -$MAKE -e uninstall > stdout || { cat stdout; exit 1; } +xMAKE uninstall > stdout || { cat stdout; exit 1; } cat stdout # Creative quoting below to please maintainer-check. grep 'rm'' ' stdout && exit 1 diff --cc t/instdir-python.sh index 4fed80474,d57fb4b35..384b3b05b --- a/t/instdir-python.sh +++ b/t/instdir-python.sh @@@ -46,16 -46,17 +46,16 @@@ cd buil ../configure --prefix="$instdir" $MAKE -pythondir= -export pythondir +xMAKE () { $MAKE pythondir= "$@"; } -$MAKE -e install +xMAKE install - test ! -d "$instdir" + test ! -e "$instdir" -$MAKE -e install DESTDIR="$destdir" +xMAKE install DESTDIR="$destdir" - test ! -d "$instdir" - test ! -d "$destdir" + test ! -e "$instdir" + test ! -e "$destdir" -$MAKE -e uninstall > stdout || { cat stdout; exit 1; } +xMAKE uninstall > stdout || { cat stdout; exit 1; } cat stdout grep 'rm -f' stdout && exit 1 -$MAKE -e uninstall DESTDIR="$destdir" +xMAKE uninstall DESTDIR="$destdir" : diff --cc t/instdir-texi.sh index 146fa5238,33bf6361e..1defda42e --- a/t/instdir-texi.sh +++ b/t/instdir-texi.sh @@@ -56,16 -56,18 +56,16 @@@ cd buil $MAKE all dvi ps pdf html ls -l -infodir= htmldir= dvidir= psdir= pdfdir= -export infodir htmldir dvidir psdir pdfdir +xMAKE () { $MAKE infodir= htmldir= dvidir= psdir= pdfdir= "$@"; } -$MAKE -e install install-html install-dvi install-ps install-pdf +xMAKE install install-html install-dvi install-ps install-pdf - test ! -d "$instdir" + test ! -e "$instdir" -$MAKE -e install install-html install-dvi install-ps install-pdf \ - DESTDIR="$destdir" +xMAKE install install-html install-dvi install-ps install-pdf DESTDIR="$destdir" - test ! -d "$instdir" - test ! -d "$destdir" + test ! -e "$instdir" + test ! -e "$destdir" -$MAKE -e uninstall > stdout || { cat stdout; exit 1; } +xMAKE uninstall > stdout || { cat stdout; exit 1; } cat stdout grep 'rm -f' stdout && exit 1 -$MAKE -e uninstall DESTDIR="$destdir" +xMAKE uninstall DESTDIR="$destdir" : diff --cc t/instdir.sh index f35dcbf44,d0c253271..a8338a941 --- a/t/instdir.sh +++ b/t/instdir.sh @@@ -55,19 -55,17 +55,19 @@@ cd buil ../configure --prefix="$instdir" $MAKE -bindir= datadir= includedir= foodir= bardir= man1dir= man2dir= -export bindir datadir includedir foodir bardir man1dir man2dir +xMAKE () +{ + $MAKE bindir= datadir= includedir= foodir= bardir= man1dir= man2dir= "$@" +} -$MAKE -e install +xMAKE install - test ! -d "$instdir" + test ! -e "$instdir" -$MAKE -e install DESTDIR="$destdir" +xMAKE install DESTDIR="$destdir" - test ! -d "$instdir" - test ! -d "$destdir" + test ! -e "$instdir" + test ! -e "$destdir" -$MAKE -e uninstall > stdout || { cat stdout; exit 1; } +xMAKE uninstall > stdout || { cat stdout; exit 1; } cat stdout grep 'rm -f' stdout && exit 1 -$MAKE -e uninstall DESTDIR="$destdir" +xMAKE uninstall DESTDIR="$destdir" : diff --cc t/instdir2.sh index 2393026bc,51e78bedc..e791aa01a --- a/t/instdir2.sh +++ b/t/instdir2.sh @@@ -77,19 -77,17 +77,19 @@@ cd buil ../configure --prefix="$instdir" $MAKE -bindir= datadir= includedir= foodir= bardir= man1dir= man2dir= -export bindir datadir includedir foodir bardir man1dir man2dir +xMAKE () +{ + $MAKE bindir= datadir= includedir= foodir= bardir= man1dir= man2dir= "$@" +} -$MAKE -e install +xMAKE install - test ! -d "$instdir" + test ! -e "$instdir" -$MAKE -e install DESTDIR="$destdir" +xMAKE install DESTDIR="$destdir" - test ! -d "$instdir" - test ! -d "$destdir" + test ! -e "$instdir" + test ! -e "$destdir" -$MAKE -e uninstall > stdout || { cat stdout; exit 1; } +xMAKE uninstall > stdout || { cat stdout; exit 1; } cat stdout grep 'rm -f' stdout && exit 1 -$MAKE -e uninstall DESTDIR="$destdir" +xMAKE uninstall DESTDIR="$destdir" : diff --cc t/libtoo10.sh index 78d150aa9,c84ddb8a6..3fd8444cd --- a/t/libtoo10.sh +++ b/t/libtoo10.sh @@@ -56,23 -52,11 +56,23 @@@ $AUTOMAKE --add-missin $AUTOCONF ./configure $MAKE all check +: > lib/so_locations +: > src/so_locations $MAKE clean +ls *.lo && exit 1 +test -f libtool - test ! -d src/.libs - test ! -d src/_libs - test ! -d check/.libs - test ! -d check/_libs + test ! -e src/.libs + test ! -e src/_libs + test ! -e check/.libs + test ! -e check/_libs +test -f src/so_locations - test ! -f lib/so_locations ++test ! -e lib/so_locations +# No libtool libraries created in this directory, our rules +# shouldn't bother about possible linker files in it. +test -f src/so_locations $MAKE distcheck +$MAKE distclean +test ! -f libtool + : diff --cc t/maken3.sh index 3dca8a602,6d580eca8..b1875cbe1 --- a/t/maken3.sh +++ b/t/maken3.sh @@@ -132,22 -149,28 +132,22 @@@ check_targets ( case $target in install-* | installdirs | tags | TAGS ) ;; *) - if $have_dotmake; then - grep "stamp-$target$" stdout || exit 1 - fi + grep "stamp-$target$" stdout || exit 1 - test ! -f "stamp-$target$" || exit 1 + test ! -e "stamp-$target" || exit 1 ;; esac case $target in install-* | installdirs ) ;; *) - if $have_dotmake; then - grep "stamp-$target-sub" stdout || exit 1 - fi + grep "stamp-$target-sub" stdout || exit 1 - test ! -f "sub/stamp-$target-sub" || exit 1 + test ! -e "sub/stamp-$target-sub" || exit 1 ;; esac case $target in distclean | maintainer-clean ) ;; *) - if $have_dotmake; then - grep "should-not-be-executed" stdout || exit 1 - fi + grep "should-not-be-executed" stdout || exit 1 - test ! -f "sub2/sub2-$target-should-not-be-executed" || exit 1 + test ! -e "sub2/sub2-$target-should-not-be-executed" || exit 1 ;; esac done diff --cc t/parallel-tests-exeext.sh index c6dbee2a9,22a5aadb1..f90258781 --- a/t/parallel-tests-exeext.sh +++ b/t/parallel-tests-exeext.sh @@@ -53,19 -56,11 +53,19 @@@ touch x y.bin a.test b.test.bi $MAKE check ls -l # For debugging. test -f y.log - test ! -r y.bin.log + test ! -e y.bin.log test -f b.log - test ! -r b.test.log + test ! -e b.test.log -$EGREP '^y\.log: y(\$\(EXEEXT\)|\.bin)' Makefile -$EGREP '^\.test(\$\(EXEEXT\)|\.bin)\.log:' Makefile +# Opportunistically check that we are not forced to specify +# the test suffixes nor the $(EXEEXT) suffix when overriding +# TESTS on the command line. +rm -f *.log *.trs + +$MAKE check TESTS='y a b' +ls -l # For debugging. +test -f a.log +test -f b.log +test -f y.log : diff --cc t/parallel-tests-log-override.sh index 7aa3020a1,e4af517de..940823f40 --- a/t/parallel-tests-log-override.sh +++ b/t/parallel-tests-log-override.sh @@@ -76,9 -76,9 +76,9 @@@ $MAKE clea test -f test-suite.log && exit 99 # Sanity check. # Check that we can override the testsuite log file at runtime. -TEST_SUITE_LOG=zardoz.log $MAKE -e check +$MAKE check TEST_SUITE_LOG=zardoz.log ls -l - test ! -f test-suite.log + test ! -e test-suite.log cat zardoz.log test_log_expected zardoz.log # Sanity check the distribution too (this also does minimal checks on @@@ -88,9 -88,9 +88,9 @@@ $MAKE distcheck TEST_SUITE_LOG=zardoz.l # Check that cleanup rules remove the correct file even when # user overrides are in place. cp orig test-suite.log -TEST_SUITE_LOG=zardoz.log $MAKE -e clean +$MAKE clean TEST_SUITE_LOG=zardoz.log ls -l - test ! -f zardoz.log + test ! -e zardoz.log diff orig test-suite.log # Check that the default testsuite log doesn't get unduly modified. @@@ -101,9 -101,9 +101,9 @@@ $MAKE check TEST_SUITE_LOG=TheLogFil ls -l diff orig test-suite.log test_log_expected TheLogFile -TEST_SUITE_LOG=TheLogFile $MAKE -e clean +$MAKE clean TEST_SUITE_LOG=TheLogFile ls -l - test ! -f TheLogFile + test ! -e TheLogFile diff orig test-suite.log : diff --cc t/parallel-tests2.sh index 4c2d75243,ae9bd38b6..7d57640b6 --- a/t/parallel-tests2.sh +++ b/t/parallel-tests2.sh @@@ -121,18 -121,18 +121,18 @@@ test ! -e mylog.htm # and recheck-html should rerun no tests if check has not been run. $MAKE clean - test ! -f mylog.html + test ! -e mylog.html -env TEST_LOGS=foo.log $MAKE -e check-html +$MAKE check-html TEST_LOGS=foo.log test -f bla test -f foo.log - test ! -f bar.log - test ! -f baz.log + test ! -e bar.log + test ! -e baz.log test -f mylog.html $MAKE clean -env TESTS=foo.test $MAKE -e recheck-html +$MAKE recheck-html TESTS=foo.test test -f bla - test ! -f foo.log + test ! -e foo.log test -f mylog.html $MAKE clean diff --cc t/pr401.sh index 1f06d2056,b1044760f..28aa16ab6 --- a/t/pr401.sh +++ b/t/pr401.sh @@@ -100,9 -100,20 +100,9 @@@ $ACLOCA $AUTOCONF $AUTOMAKE ./configure - test ! -d lib/lib + test ! -e lib/lib $MAKE distcheck -## -------------------------------------------- ## -## Error message with usage in wrong directory. ## -## -------------------------------------------- ## - -mv -f src/Makefile.am src/t -sed 's/LDADD = .*/LDADD = @LIBOBJS@/' src/t > src/Makefile.am -AUTOMAKE_fails -grep 'cannot be used outside.*lib' stderr -mv -f src/t src/Makefile.am - - ## -------------------------------------------- ## ## Test using LIBOBJS from a sibling directory. ## ## -------------------------------------------- ## diff --cc t/pr401b.sh index 36a32df8d,5d0adc08f..997b04590 --- a/t/pr401b.sh +++ b/t/pr401b.sh @@@ -101,9 -101,18 +101,9 @@@ $ACLOCA $AUTOCONF $AUTOMAKE -a ./configure - test ! -d lib/lib + test ! -e lib/lib $MAKE distcheck -## -------------------------------------------- ## -## Error message with usage in wrong directory. ## -## -------------------------------------------- ## - -mv -f src/Makefile.am src/t -sed 's/LDADD = .*/LDADD = @LTLIBOBJS@/' src/t > src/Makefile.am -AUTOMAKE_fails -grep 'cannot be used outside.*lib' stderr -mv -f src/t src/Makefile.am ## ---------------------------------------------- ## ## Test using LTLIBOBJS from a sibling directory. ## diff --cc t/pr401c.sh index d2efaa950,3336f13a6..19d275f5b --- a/t/pr401c.sh +++ b/t/pr401c.sh @@@ -102,9 -102,19 +102,9 @@@ $ACLOCA $AUTOCONF $AUTOMAKE ./configure - test ! -d lib/lib + test ! -e lib/lib $MAKE distcheck -## -------------------------------------------- ## -## Error message with usage in wrong directory. ## -## -------------------------------------------- ## - -mv -f src/Makefile.am src/t -sed 's/LDADD = .*/LDADD = @ALLOCA@/' src/t > src/Makefile.am -AUTOMAKE_fails -grep 'cannot be used outside.*lib' stderr -mv -f src/t src/Makefile.am - ## ------------------------------------------- ## ## Test using ALLOCA from a sibling directory. ## diff --cc t/python-virtualenv.sh index 9e2c39ea4,51ae78e28..cc5ace05d --- a/t/python-virtualenv.sh +++ b/t/python-virtualenv.sh @@@ -161,16 -161,14 +161,16 @@@ $MAKE distclea # Overriding pythondir and pyexecdir at make time should be enough. ./configure --prefix="$cwd/bad-prefix" -pythondir=$py_site pyexecdir=$py_site + +xMAKE () { $MAKE pythondir="$py_site" pyexecdir="$py_site" "$@"; } + export pythondir pyexecdir -$MAKE -e install +xMAKE install - test ! -d bad-prefix + test ! -e bad-prefix -$MAKE -e test-install -$MAKE test-run -$MAKE -e uninstall -$MAKE -e test-uninstall +xMAKE test-install +xMAKE test-run +xMAKE uninstall +xMAKE test-uninstall unset pythondir pyexecdir # Also check that the distribution is self-contained, for completeness. diff --cc t/remake-gnulib-remove-header.sh index 36bb3ecce,9044a04ab..ec94af55c --- a/t/remake-gnulib-remove-header.sh +++ b/t/remake-gnulib-remove-header.sh @@@ -111,9 -111,10 +111,9 @@@ for vpath in : false; d diff $srcdir/macros.m4 t && fatal_ "failed to edit macros.m4" mv -f t $srcdir/macros.m4 - using_gmake || $MAKE Makefile $MAKE ls -l - test ! -f stdio.h + test ! -e stdio.h # And now simulate that we want our custom stdio.h back. diff --cc t/remake-renamed-am.sh index 9336faefe,378aa2660..8ebe56355 --- a/t/remake-renamed-am.sh +++ b/t/remake-renamed-am.sh @@@ -50,8 -50,9 +50,8 @@@ $slee rm -f has-run-1 bar.am echo 'all-local:; echo ok > has-run-2' > zardoz.am echo 'include $(srcdir)/zardoz.am' > Makefile.am -using_gmake || $MAKE Makefile $MAKE - test ! -f has-run-1 + test ! -e has-run-1 test -f has-run-2 : diff --cc t/remake-renamed-m4-file.sh index 27044d3d1,ee25c5894..666cf4cd0 --- a/t/remake-renamed-m4-file.sh +++ b/t/remake-renamed-m4-file.sh @@@ -54,9 -55,10 +54,9 @@@ $MAKE tes $MAKE distdir ls -l $distdir $distdir/* test -f $distdir/m4/bar.m4 - test ! -f $distdir/m4/foo.m4 + test ! -e $distdir/m4/foo.m4 mv m4/macros.m4 m4/defs.m4 -using_gmake || $MAKE Makefile $MAKE test $MAKE distdir ls -l $distdir $distdir/* diff --cc t/repeated-options.sh index 0eea68499,c300996f8..69a9cb475 --- a/t/repeated-options.sh +++ b/t/repeated-options.sh @@@ -28,20 -30,53 +28,20 @@@ AC_OUTPU END cat > Makefile.am <<'END' -AUTOMAKE_OPTIONS = parallel-tests subdir-objects subdir-objects -AUTOMAKE_OPTIONS += dist-bzip2 parallel-tests -TESTS = foo.test -EXTRA_DIST = $(TESTS) -TESTS_ENVIRONMENT = EXEEXT='$(EXEEXT)' -bin_PROGRAMS = sub/foo -.PHONY: test-build -test-build: - ls -l . sub - test -f sub/foo.$(OBJEXT) - test -f sub/foo$(EXEEXT) +AUTOMAKE_OPTIONS = no-dist-gzip no-dist-gzip dist-bzip2 +AUTOMAKE_OPTIONS += dist-bzip2 foreign END -mkdir sub - -cat > foo.test <<'END' -#!/bin/sh -test -f sub/foo$EXEEXT && test -x sub/foo$EXEEXT -END -chmod a+x foo.test - -cat > sub/foo.c <<'END' -int main (void) -{ - return 0; -} -END - -cp "$am_scriptdir"/compile "$am_scriptdir"/test-driver . - $ACLOCAL -$AUTOMAKE --foreign --foreign -Wall 2>stderr || { cat stderr >&2; exit 1; } -test -s stderr && { cat stderr >&2; exit 1; } -rm -f stderr $AUTOCONF +$AUTOMAKE --foreign --foreign -Wall 2>stderr && test ! -s stderr \ + || { cat stderr >&2; exit 1; } ./configure + $MAKE -$MAKE test-build -$MAKE check -ls -l -test -f foo.log -test -f test-suite.log -$MAKE clean $MAKE distcheck -ls -l test -f $me-1.0.tar.bz2 - test ! -r $me-1.0.tar.gz + test ! -e $me-1.0.tar.gz : diff --cc t/self-check-dir.tap index 2bbe82d81,94555a6d9..4a228d7ea --- a/t/self-check-dir.tap +++ b/t/self-check-dir.tap @@@ -66,10 -65,8 +65,8 @@@ do_check 'do not pre-populate testdir' do_check 'do not create nor chdir in testdir' \ 'am_create_testdir=no' \ - 'test ! -d t/_self.dir || exit 1 - test ! -f t/_self.dir || exit 1 - test ! -r t/_self.dir || exit 1 + 'test ! -e t/_self.dir || exit 1 - grep "self-check-dir\.tap" Makefile || exit 1 + grep "compare-autodiffs" Makefile || exit 1 case $(pwd) in '"$cwd"') : ;; *) exit 1;; esac' : diff --cc t/subpkg-yacc.sh index 52b896b83,0ce1a7c23..fe170ef63 --- a/t/subpkg-yacc.sh +++ b/t/subpkg-yacc.sh @@@ -125,10 -117,13 +125,10 @@@ test -f compil ./configure -$MAKE dist -test -f lib-dist-hook-has-run +$MAKE +$MAKE distcheck +test -f lib-dist-hook-has-run # Sanity check test -f subpack-1.tar.gz - test ! -d subpack-1 # Make sure "distcheck" cleans up after itself. -test ! -e subpack-1 # Make sure "dist" cleans up after itself. - -rm -f lib-dist-hook-has-run subpack-1.tar.gz - -yl_distcheck ++test ! -e subpack-1 # Make sure "distcheck" cleans up after itself. : diff --cc t/subpkg.sh index 4f86072f9,c8ce125b6..79c51dae7 --- a/t/subpkg.sh +++ b/t/subpkg.sh @@@ -107,13 -104,10 +107,13 @@@ $AUTOHEADE $AUTOMAKE -Wno-override --add-missing cd .. -./configure +./configure >stdout || { cat stdout; exit 1; } +cat stdout +grep '^checking whether cc understands -c and -o together' stdout + $MAKE $MAKE distcheck - test ! -d subpack-1 # Make sure distcheck cleans up after itself. + test ! -e subpack-1 # Make sure distcheck cleans up after itself. test -f subpack-1.tar.gz : diff --cc t/suffix3.sh index f569c528c,000000000..4688e5357 mode 100755,000000..100755 --- a/t/suffix3.sh +++ b/t/suffix3.sh @@@ -1,69 -1,0 +1,68 @@@ +#! /bin/sh +# Copyright (C) 1999-2012 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 . + +# Test to make sure that suffix rules chain. + +required=c++ +. ./defs || exit 1 + +cat >> configure.ac << 'END' +AC_PROG_CXX +AC_OUTPUT +END + +cat > Makefile.am << 'END' +%.cc: %.zoo + sed 's/INTEGER/int/g' $< >$@ +bin_PROGRAMS = zardoz +nodist_zardoz_SOURCES = foo.cc +EXTRA_DIST = foo.zoo +CLEANFILES = foo.cc +END + +$ACLOCAL +$AUTOMAKE + +# Automake has been clearly told that foo.zoo is eventually transformed +# into foo.o, and to use this latter file (to link foo). +$FGREP 'foo.$(OBJEXT)' Makefile.in +# Finally, our dummy package doesn't use C in any way, so it the +# Makefile shouldn't contain stuff related to the C compiler. +$FGREP '$(LINK)' Makefile.in && exit 1 +$FGREP 'AM_CFLAGS' Makefile.in && exit 1 +$FGREP '$(CFLAGS)' Makefile.in && exit 1 +$FGREP '$(CC)' Makefile.in && exit 1 + - +$AUTOCONF +./configure + +# This is deliberately valid C++, but invalid C. +cat > foo.zoo <<'END' +using namespace std; +INTEGER main (void) +{ + return 0; +} +END + +$MAKE all +$MAKE distcheck + +# Intermediate files should not be distributed. +$MAKE distdir - test ! -r $me-1.0/foo.cc ++test ! -e $me-1.0/foo.cc + +: diff --cc t/tap-log.sh index d5f113ed3,32cb475e9..d39965a03 --- a/t/tap-log.sh +++ b/t/tap-log.sh @@@ -85,10 -85,10 +85,10 @@@ EN chmod a+x *.test -TEST_SUITE_LOG=my.log $MAKE -e check && exit 1 +$MAKE check TEST_SUITE_LOG=my.log && exit 1 ls -l # For debugging. - test ! -f test-suite.log - test ! -f global.log + test ! -e test-suite.log + test ! -e global.log test -f my.log st=0 for result in pass fail xfail xpass skip error; do @@@ -116,15 -116,15 +116,15 @@@ $FGREP 'xpass.test' my.lo $FGREP 'error.test' my.log touch error2.log test-suite.log global.log -TEST_SUITE_LOG=my.log $MAKE -e mostlyclean +$MAKE mostlyclean TEST_SUITE_LOG=my.log ls -l # For debugging. - test ! -f my.log - test ! -f pass.log - test ! -f fail.log - test ! -f xfail.log - test ! -f xpass.log - test ! -f skip.log - test ! -f error.log + test ! -e my.log + test ! -e pass.log + test ! -e fail.log + test ! -e xfail.log + test ! -e xpass.log + test ! -e skip.log + test ! -e error.log # "make mostlyclean" shouldn't remove unrelated log files. test -f error2.log test -f test-suite.log diff --cc t/test-driver-custom-multitest-recheck2.sh index fa5feee9a,623cbad4b..a622c237f --- a/t/test-driver-custom-multitest-recheck2.sh +++ b/t/test-driver-custom-multitest-recheck2.sh @@@ -92,58 -93,64 +92,56 @@@ for vpath in : false; d rm -f *.run - : An empty '$(TESTS)' or '$(TEST_LOGS)' means that no test should be run. - for var in TESTS TEST_LOGS; do - env "$var=" $MAKE -e recheck >stdout || { cat stdout; exit 1; } - cat stdout - count_test_results total=0 pass=0 fail=0 xpass=0 xfail=0 skip=0 error=0 - test ! -e a.run - test ! -e b.run - test ! -e c.run - done - unset var + : An empty '$(TESTS)' means that no test should be run. + $MAKE TESTS= recheck >stdout || { cat stdout; exit 1; } + cat stdout + count_test_results total=0 pass=0 fail=0 xpass=0 xfail=0 skip=0 error=0 - test ! -r a.run - test ! -r b.run - test ! -r c.run ++ test ! -e a.run ++ test ! -e b.run ++ test ! -e c.run : a.test was successful the first time, no need to re-run it. - env TESTS=a.test $MAKE -e recheck >stdout \ - || { cat stdout; exit 1; } + $MAKE TESTS=a.test recheck >stdout || { cat stdout; exit 1; } cat stdout count_test_results total=0 pass=0 fail=0 xpass=0 xfail=0 skip=0 error=0 - test ! -r a.run - test ! -r b.run - test ! -r c.run + test ! -e a.run + test ! -e b.run + test ! -e c.run : b.test failed, it should be re-run. And make it pass this time. echo OK > b.ok - TEST_LOGS=b.log $MAKE -e recheck >stdout \ - || { cat stdout; exit 1; } + $MAKE TESTS=b recheck >stdout || { cat stdout; exit 1; } cat stdout - test ! -r a.run + test ! -e a.run test -f b.run - test ! -r c.run + test ! -e c.run count_test_results total=2 pass=0 fail=0 xpass=0 xfail=1 skip=1 error=0 rm -f *.run : No need to re-run a.test or b.test anymore. - TEST_LOGS=b.log $MAKE -e recheck >stdout \ - || { cat stdout; exit 1; } + $MAKE TESTS=b recheck >stdout || { cat stdout; exit 1; } cat stdout count_test_results total=0 pass=0 fail=0 xpass=0 xfail=0 skip=0 error=0 - test ! -r a.run - test ! -r b.run - test ! -r c.run + test ! -e a.run + test ! -e b.run + test ! -e c.run - TESTS='a.test b.test' $MAKE -e recheck >stdout \ - || { cat stdout; exit 1; } + $MAKE TESTS='a.test b.test' recheck >stdout || { cat stdout; exit 1; } cat stdout count_test_results total=0 pass=0 fail=0 xpass=0 xfail=0 skip=0 error=0 - test ! -r a.run - test ! -r b.run - test ! -r c.run + test ! -e a.run + test ! -e b.run + test ! -e c.run : No need to re-run a.test anymore, but c.test should be rerun, : as it contained an XPASS. And this time, make it fail with : an hard error. - # Use 'echo' here, since Solaris 10 /bin/sh would try to optimize - # a ':' away after the first iteration, even if it is redirected. echo dummy > c.err - env TEST_LOGS='a.log c.log' $MAKE -e recheck >stdout \ - && { cat stdout; exit 1; } + $MAKE TESTS='a.test c' recheck >stdout && { cat stdout; exit 1; } cat stdout count_test_results total=1 pass=0 fail=0 xpass=0 xfail=0 skip=0 error=1 - test ! -r a.run - test ! -r b.run + test ! -e a.run + test ! -e b.run test -f c.run rm -f *.run *.err @@@ -152,11 -159,12 +150,11 @@@ : This time, make it pass # Use 'echo', not ':'; see comments above for why. echo dummy > c.ok - env TESTS='c.test a.test' $MAKE -e recheck >stdout \ - || { cat stdout; exit 1; } + $MAKE TESTS='c.test a.test' recheck >stdout || { cat stdout; exit 1; } cat stdout count_test_results total=1 pass=1 fail=0 xpass=0 xfail=0 skip=0 error=0 - test ! -r a.run - test ! -r b.run + test ! -e a.run + test ! -e b.run test -f c.run rm -f *.run *.err *.ok diff --cc t/test-log.sh index 6d453d83c,0ae77b391..84a7b15d9 --- a/t/test-log.sh +++ b/t/test-log.sh @@@ -88,10 -88,10 +88,10 @@@ $AUTOMAKE - ./configure -TEST_SUITE_LOG=my.log $MAKE -e check && exit 1 +$MAKE TEST_SUITE_LOG=my.log check && exit 1 ls -l # For debugging. - test ! -f test-suite.log - test ! -f global.log + test ! -e test-suite.log + test ! -e global.log test -f my.log st=0 for result in pass fail xfail xpass skip error; do @@@ -130,15 -130,15 +130,15 @@@ have_rst_section 'XPASS: xpass' my.lo have_rst_section 'ERROR: error' my.log touch error2.log test-suite.log global.log -TEST_SUITE_LOG=my.log $MAKE -e mostlyclean +$MAKE TEST_SUITE_LOG=my.log mostlyclean ls -l # For debugging. - test ! -f my.log - test ! -f pass.log - test ! -f fail.log - test ! -f xfail.log - test ! -f xpass.log - test ! -f skip.log - test ! -f error.log + test ! -e my.log + test ! -e pass.log + test ! -e fail.log + test ! -e xfail.log + test ! -e xpass.log + test ! -e skip.log + test ! -e error.log # "make mostlyclean" shouldn't remove unrelated log files. test -f error2.log test -f test-suite.log diff --cc t/test-missing.sh index 12bb22980,7cf1d52af..fb7974c4e --- a/t/test-missing.sh +++ b/t/test-missing.sh @@@ -35,22 -37,24 +35,22 @@@ $AUTOMAKE - ./configure -$MAKE check >output 2>&1 && { cat output; exit 1; } -cat output +$MAKE check >stdout 2>stderr && { cat stdout; cat stderr >&2; exit 1; } +cat stdout; cat stderr >&2 test -f ok.log -grep '^PASS: ok\.test' output -$FGREP 'zardoz.log' output +grep '^PASS: ok\.test' stdout +$FGREP 'zardoz.log' stderr - test ! -f test-suite.log + test ! -e test-suite.log -TESTS='zardoz2.test' $MAKE -e check >output 2>&1 \ - && { cat output; exit 1; } -cat output -$FGREP 'zardoz2.log' output +$MAKE TESTS='zardoz2.test' check 2>stderr && { cat stderr >&2; exit 1; } +cat stderr +$FGREP 'zardoz2.log' stderr - test ! -f test-suite.log + test ! -e test-suite.log -TEST_LOGS='zardoz3.log' $MAKE -e check >output 2>&1 \ - && { cat output; exit 1; } -cat output -$FGREP 'zardoz3.log' output +$MAKE TESTS='zardoz3' check 2>stderr && { cat stderr >&2; exit 1; } +cat stderr >&2 +$FGREP 'zardoz3.log' stderr - test ! -f test-suite.log + test ! -e test-suite.log # The errors should persist even after 'test-suite.log' # has been created. @@@ -59,9 -63,9 +59,9 @@@ $MAKE check rm -f zardoz.test -$MAKE check >output 2>&1 && { cat output; exit 1; } -cat output -$FGREP 'zardoz.log' output +$MAKE check 2>stderr && { cat stderr >&2; exit 1; } +cat stderr >&2 +$FGREP 'zardoz.log' stderr - test ! -f test-suite.log + test ! -e test-suite.log : diff --cc t/test-trs-basic.sh index 0f039bc99,f0c30b876..7947e639d --- a/t/test-trs-basic.sh +++ b/t/test-trs-basic.sh @@@ -113,45 -113,45 +113,45 @@@ test -f unrelated.tr test -f sub/foo.trs # -# Try with a subset of TESTS. +# Try with a subset of TESTS, complete with test extensions. # -TESTS=foo.test $MAKE -e check +$MAKE TESTS=foo.test check test -f foo.trs - test ! -f bar.trs - test ! -f sub/zardoz.trs + test ! -e bar.trs + test ! -e sub/zardoz.trs $MAKE clean - test ! -f foo.trs + test ! -e foo.trs -TESTS='foo.test bar.sh' $MAKE -e check +$MAKE TESTS='foo.test bar.sh' check test -f foo.trs test -f bar.trs - test ! -f sub/zardoz.trs + test ! -e sub/zardoz.trs # "make clean" shouldn't remove '.trs' files for tests not in $(TESTS). -TESTS=bar.sh $MAKE -e clean +$MAKE TESTS=bar.sh clean test -f foo.trs - test ! -f bar.trs + test ! -e bar.trs $MAKE clean # -# Try with a subset of TEST_LOGS. +# Try with a subset of TESTS, omitting the test extensions. # -TEST_LOGS=sub/zardoz.log $MAKE -e check +$MAKE TESTS=sub/zardoz check - test ! -f foo.trs - test ! -f bar.trs + test ! -e foo.trs + test ! -e bar.trs test -f sub/zardoz.trs $MAKE clean - test ! -f sub/zardoz.trs + test ! -e sub/zardoz.trs -TEST_LOGS='foo.log bar.log' $MAKE -e check +$MAKE TESTS='foo bar' check test -f foo.trs test -f bar.trs - test ! -f sub/zardoz.trs + test ! -e sub/zardoz.trs -# "make clean" shouldn't remove '.trs' files for tests whose log -# is not in $(TEST_LOGS). -TEST_LOGS=foo.log $MAKE -e clean +# "make clean" shouldn't remove '.trs' files for tests that are not +# in is not in $(TESTS). +$MAKE TESTS=foo clean - test ! -f foo.trs + test ! -e foo.trs test -f bar.trs - test ! -f sub/zardoz.trs + test ! -e sub/zardoz.trs : diff --cc t/test-trs-recover.sh index 1c24cef03,95a9ddcec..c782b9118 --- a/t/test-trs-recover.sh +++ b/t/test-trs-recover.sh @@@ -95,17 -95,17 +95,17 @@@ grep '^PASS: baz\.test' stdou : Recreate with a "make check" with redefined TESTS. rm -f foo.trs bar.trs baz.trs -TESTS=foo.test $MAKE -e check +$MAKE TESTS=foo.test check test -f foo.trs - test ! -f bar.trs - test ! -f baz.trs + test ! -e bar.trs + test ! -e baz.trs -: Recreate with a "make check" with redefined TEST_LOGS. +: Recreate with a "make check" with redefined suffix-less TESTS. rm -f foo.trs bar.trs baz.trs -TEST_LOGS=bar.log $MAKE -e check +$MAKE TESTS=bar check - test ! -f foo.trs + test ! -e foo.trs test -f bar.trs - test ! -f baz.trs + test ! -e baz.trs : Interactions with "make recheck" are OK. rm -f foo.trs bar.trs baz.log baz.trs diff --cc t/txinfo20.sh index 45acc7504,3d644f5bb..6faba3849 --- a/t/txinfo20.sh +++ b/t/txinfo20.sh @@@ -70,9 -70,9 +70,9 @@@ test -f main.info- cp main.texi sub/main.texi mv main.old main.texi $MAKE && exit 1 -test -f main -test ! -e main-1 -test -f sub/main -test -f sub/main-1 +test -f main.info - test ! -f main.info-1 ++test ! -e main.info-1 +test -f sub/main.info +test -f sub/main.info-1 : diff --cc t/txinfo21.sh index 62cdfe7bf,b6c222f19..001d134a7 --- a/t/txinfo21.sh +++ b/t/txinfo21.sh @@@ -100,12 -103,12 +103,12 @@@ $MAKE htm is_newest main.html main.texi $MAKE clean - test ! -d main.html - test ! -d sub/main2.html - test ! -d rec/main3.html + test ! -e main.html + test ! -e sub/main2.html + test ! -e rec/main3.html # Test production of a single HTML file. -MAKEINFOFLAGS=--no-split $MAKE -e html +$MAKE MAKEINFOFLAGS=--no-split html test -f main.html test -f sub/main2.html test -f rec/main3.html diff --cc t/uninstall-fail.sh index 14e3219db,230832cb3..16f86b1fe --- a/t/uninstall-fail.sh +++ b/t/uninstall-fail.sh @@@ -73,24 -73,25 +73,24 @@@ f chmod a-rwx $inst/share (cd $inst/share) && skip_ "cannot make directories fully unreadable" -$MAKE uninstall >output 2>&1 && { cat output; exit 1; } -cat output +$MAKE uninstall 2>stderr && { cat stderr >&2; exit 1; } # - # Some shells, like Solaris 10 /bin/sh and /bin/ksh, do not report - # the name of the 'cd' builtin upon a chdir error: + # Some shells, like Solaris 10 /bin/ksh and /usr/xpg4/bin/sh, do not + # report the name of the 'cd' builtin upon a chdir error: # - # $ /bin/sh -c 'cd /none' - # /bin/sh: /none: does not exist + # $ /bin/ksh -c 'cd /none' + # /bin/ksh: /none: not found # - # In addition, some shells, like Solaris 10 /usr/xpg4/bin/sh, also print - # a line number in the error message *if the command contains newlines*: + # and also print a line number in the error message *if the command + # contains newlines*: # - # $ /usr/xpg4/bin/sh -c 'cd unreadable' - # /usr/xpg4/bin/sh: unreadable: permission denied - # $ /usr/xpg4/bin/sh -c '\ + # $ /bin/ksh -c 'cd unreadable' + # /bin/ksh: unreadable: permission denied + # $ /bin/ksh -c '\ # > \ # > cd unreadable' - # /usr/xpg4/bin/sh[3]: unreadable: permission denied + # /bin/ksh[3]: unreadable: permission denied # -$EGREP "(cd|sh)(\[[0-9]*[0-9]\])?: .*$inst/share" output +$EGREP "(cd|sh)(\[[0-9]*[0-9]\])?: .*$inst/share" stderr : diff --cc t/vala3.sh index 1de29726d,d9ecdea0e..ccce705fc --- a/t/vala3.sh +++ b/t/vala3.sh @@@ -59,21 -58,41 +59,21 @@@ test -f src/zardoz. test -f src_zardoz_vala.stamp $MAKE distcheck $MAKE maintainer-clean - test ! -f src/zardoz.c + test ! -e src/zardoz.c +# FIXME: having 'src/zardoz_vala.stamp' should be more appropriate here. - test ! -f src_zardoz_vala.stamp + test ! -e src_zardoz_vala.stamp mkdir build cd build ../configure $MAKE +test -f ../src/zardoz.c +# FIXME: having 'src/zardoz_vala.stamp' should be more appropriate here. +test -f ../src_zardoz_vala.stamp $MAKE distcheck +$MAKE maintainer-clean +test ! -f src/zardoz.c +# FIXME: having 'src/zardoz_vala.stamp' should be more appropriate here. - test ! -f src_zardoz_vala.stamp ++test ! -e src_zardoz_vala.stamp -cd .. -rm -rf build - -# Try again with subdir-objects. - -cat > 'Makefile.am' <<'END' -AUTOMAKE_OPTIONS = subdir-objects - -bin_PROGRAMS = src/zardoz -src_zardoz_CFLAGS = $(GOBJECT_CFLAGS) -src_zardoz_LDADD = $(GOBJECT_LIBS) -src_zardoz_SOURCES = src/zardoz.vala -END - -$ACLOCAL -$AUTOCONF -$AUTOMAKE -a - -./configure || skip_ "configure failure" -$MAKE -$MAKE distcheck -$MAKE distclean -mkdir build -cd build -../configure -$MAKE -$MAKE distcheck - - +: diff --cc t/yacc-auxdir.sh index b0cb353fd,eb7357d9d..d531758f2 --- a/t/yacc-auxdir.sh +++ b/t/yacc-auxdir.sh @@@ -47,10 -47,10 +47,10 @@@ EN $ACLOCAL $AUTOMAKE -a test -f aux1/ylwrap - test ! -f ylwrap - test ! -f sub/ylwrap + test ! -e ylwrap + test ! -e sub/ylwrap grep -i 'ylwrap' Makefile.in sub/Makefile.in # For debugging. -$FGREP '$(top_srcdir)/aux1/ylwrap' Makefile.in -$FGREP '$(top_srcdir)/aux1/ylwrap' sub/Makefile.in +$FGREP '$(am__config_aux_dir)/ylwrap' Makefile.in +$FGREP '$(am__config_aux_dir)/ylwrap' sub/Makefile.in :