]> git.ipfire.org Git - thirdparty/automake.git/commitdiff
Merge branch 'master' into ng/master
authorStefano Lattarini <stefano.lattarini@gmail.com>
Thu, 28 Jun 2012 13:57:28 +0000 (15:57 +0200)
committerStefano Lattarini <stefano.lattarini@gmail.com>
Thu, 28 Jun 2012 14:28:16 +0000 (16:28 +0200)
* master:
  cosmetics: remove trailing whitespace in some files
  coverage: enhance tests in 'missing' script a little
  coverage: tests AM_MISSING_PROG usage
  docs: document AM_MISSING_PROG
  tests: fix a spurious failure with Solaris make
  tests: simpler workaround for shells losing the exit status in exit trap
  tests: avoid several spurious failures on Solaris
  tests: avoid a spurious failure on NetBSD

+ Extra non-trivial edits:
* Several tests: Adjusted to use 'exit' rather than 'Exit'.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
470 files changed:
1  2 
configure.ac
doc/automake-ng.texi
gen-testsuite-part
lib/missing
syntax-checks.mk
t/README
t/aclocal4.sh
t/all-prog-libs.sh
t/am-default-source-ext.sh
t/am-dir.sh
t/amopts-variable-expansion.sh
t/autodist-aclocal-m4.sh
t/autodist-configure-no-subdir.sh
t/autodist-stamp-vti.sh
t/autodist-subdir.sh
t/autodist.sh
t/autohdr3.sh
t/auxdir.sh
t/auxdir6.sh
t/auxdir7.sh
t/auxdir8.sh
t/ax/depcomp-shuffle.sh
t/ax/tap-summary-aux.sh
t/ax/test-init.sh
t/ax/testsuite-summary-checks.sh
t/backslash-tricks.sh
t/bsource.sh
t/built-sources-check.sh
t/built-sources-cond.sh
t/built-sources-install.sh
t/built-sources-subdir.sh
t/built-sources.sh
t/canon.sh
t/canon5.sh
t/ccnoco2.sh
t/ccnoco3.sh
t/check-concurrency-bug9245.sh
t/check10.sh
t/check11.sh
t/check12.sh
t/check2.sh
t/check4.sh
t/check5.sh
t/check7.sh
t/check8.sh
t/cleanvars.sh
t/colon5.sh
t/colon6.sh
t/colon7.sh
t/color.sh
t/color2.sh
t/comment4.sh
t/comment6.sh
t/comment8.sh
t/cond30.sh
t/cond38.sh
t/condman3.sh
t/conffile-leading-dot.sh
t/confh.sh
t/confh4.sh
t/confh8.sh
t/cscope.tap
t/cxx-fortran.sh
t/cxx-lt-demo.sh
t/cxxcpp.sh
t/deleted-am.sh
t/deleted-m4.sh
t/depcomp-implicit-auxdir.sh
t/depcomp-recover.sh
t/depcomp-shuffle-sub-vpath.sh
t/depcomp-shuffle-sub.sh
t/depcomp-shuffle-vpath.sh
t/depcomp-shuffle.sh
t/depcomp8a.sh
t/depcomp8b.sh
t/depdist.sh
t/depend.sh
t/depend4.sh
t/dist-auxfile-2.sh
t/dist-auxfile.sh
t/dist-formats.tap
t/dist-missing-am.sh
t/dist-missing-included-m4.sh
t/dist-missing-m4.sh
t/dist-repeated.sh
t/dist-srcdir.sh
t/dist-srcdir2.sh
t/distcheck-configure-flags-am.sh
t/distcheck-configure-flags-subpkg.sh
t/distcheck-configure-flags.sh
t/distcheck-hook.sh
t/distcheck-hook2.sh
t/distcheck-missing-m4.sh
t/distcheck-outdated-m4.sh
t/distcheck-override-infodir.sh
t/distcheck-pr10470.sh
t/distcheck-pr9579.sh
t/distcom-subdir.sh
t/distcom2.sh
t/distcom3.sh
t/distcom4.sh
t/distcom5.sh
t/distdir.sh
t/distlinksbrk.sh
t/dollar.sh
t/double-colon-rules.sh
t/empty-data-primary.sh
t/empty-sources-primary.tap
t/ensure-dir-exists.sh
t/exeext.sh
t/exeext4.sh
t/exsource.sh
t/ext.sh
t/ext2.sh
t/extra10.sh
t/extra11.sh
t/extra12.sh
t/fort2.sh
t/fort4.sh
t/fort5.sh
t/gcj.sh
t/gmake-vars.sh
t/gnits2.sh
t/gnits3.sh
t/gnumake.sh
t/hdr-vars-defined-once.sh
t/insh2.sh
t/instdir-java.sh
t/instdir-lisp.sh
t/instdir-ltlib.sh
t/instdir-no-empty.sh
t/instdir-prog.sh
t/instdir-python.sh
t/instdir-texi.sh
t/instdir.sh
t/instdir2.sh
t/insthook.sh
t/instmany-mans.sh
t/instmany-python.sh
t/instmany.sh
t/instspc.tap
t/internals.tap
t/interp3.sh
t/java-compile-install.sh
t/java-compile-run-flat.sh
t/java-compile-run-nested.sh
t/java-nobase.sh
t/javaflags.sh
t/lex-depend-cxx.sh
t/lex-depend.sh
t/lex-lib-external.sh
t/lex-libobj.sh
t/lex-line.sh
t/lex-noyywrap.sh
t/lex-subobj-nodep.sh
t/lex3.sh
t/lex5.sh
t/lflags.sh
t/lflags2.sh
t/libobj19.sh
t/libobj20b.sh
t/libobj20c.sh
t/libobj7.sh
t/library2.sh
t/libtoo10.sh
t/libtool3.sh
t/libtool7.sh
t/libtool9.sh
t/link_cond.sh
t/lisp3.sh
t/lisp8.sh
t/local-targets.sh
t/longline.sh
t/make-dryrun.tap
t/makej.sh
t/makej2.sh
t/maken.sh
t/maken3.sh
t/man3.sh
t/man6.sh
t/man8.sh
t/mdate2.sh
t/memoize.tap
t/mkinst3.sh
t/mmodely.sh
t/multlib.sh
t/no-c.tap
t/no-extra-makefile-code.sh
t/nobase-python.sh
t/nodist.sh
t/nodist3.sh
t/nostdinc.sh
t/objc-basic.sh
t/objcxx-basic.sh
t/objdir.sh
t/option-ng.sh
t/output6.sh
t/parallel-am2.sh
t/parallel-tests-concatenated-suffix.sh
t/parallel-tests-dynamic.sh
t/parallel-tests-empty-tests.sh
t/parallel-tests-exeext.sh
t/parallel-tests-exit-statuses.sh
t/parallel-tests-extra-programs.sh
t/parallel-tests-fd-redirect-exeext.sh
t/parallel-tests-fd-redirect.sh
t/parallel-tests-fork-bomb.sh
t/parallel-tests-harderror.sh
t/parallel-tests-internals.sh
t/parallel-tests-log-compiler-1.sh
t/parallel-tests-log-override.sh
t/parallel-tests-logvars-example.sh
t/parallel-tests-longest-stem.sh
t/parallel-tests-many.sh
t/parallel-tests-no-color-in-log.sh
t/parallel-tests-no-repeat.sh
t/parallel-tests-per-suffix-deps.sh
t/parallel-tests-srcdir-in-test-name.sh
t/parallel-tests-suffix-prog.sh
t/parallel-tests-unreadable.sh
t/parallel-tests.sh
t/parallel-tests2.sh
t/parallel-tests3.sh
t/parallel-tests5.sh
t/parallel-tests6.sh
t/parallel-tests8.sh
t/pattern-rules.sh
t/pattern-rules2.sh
t/per-target-flags.sh
t/phony.sh
t/pluseq3.sh
t/pluseq5.sh
t/posixsubst-ldadd.sh
t/posixsubst-libraries.sh
t/posixsubst-ltlibraries.sh
t/posixsubst-sources.sh
t/pr2.sh
t/pr224.sh
t/pr401.sh
t/pr401b.sh
t/pr401c.sh
t/pr8365-remake-timing.sh
t/pr87.sh
t/pr9.sh
t/primary-prefix-couples-force-valid.sh
t/primary-prefix-valid-couples.sh
t/python-virtualenv.sh
t/remake-all-1.sh
t/remake-deleted-m4-file.sh
t/remake-gnulib-add-acsubst.sh
t/remake-gnulib-add-header.sh
t/remake-gnulib-remove-header.sh
t/remake-moved-m4-file.sh
t/remake-renamed-am.sh
t/remake-renamed-m4-file.sh
t/remake-renamed-m4-macro-and-file.sh
t/remake-renamed-m4-macro.sh
t/remake-subdir-from-subdir.sh
t/remake-subdir-gnu.sh
t/remake-subdir-long-time.sh
t/remake-subdir.sh
t/remake10a.sh
t/remake10b.sh
t/remake10c.sh
t/remake12.sh
t/remake4.sh
t/remake5.sh
t/remake8a.sh
t/remake8b.sh
t/remake9a.sh
t/remake9b.sh
t/remake9c.sh
t/remake9d.sh
t/repeated-options.sh
t/reqd.sh
t/self-check-dir.tap
t/serial-tests.sh
t/silent-configsite.sh
t/silent-lex.sh
t/silent-many-gcc.sh
t/silent-many-generic.sh
t/silent-texi.sh
t/silent-yacc.sh
t/silent.sh
t/silent2.sh
t/silent3.sh
t/silent4.sh
t/silent6.sh
t/silent9.sh
t/silentcxx-gcc.sh
t/silentcxx.sh
t/silentf77.sh
t/silentf90.sh
t/specflg-dummy.sh
t/specflg6.sh
t/spell.sh
t/spell2.sh
t/spy-autovars.sh
t/spy-pattern-rules.sh
t/spy-phony.sh
t/spy-trailing-backlash.sh
t/spy-var-append.sh
t/spy-vpath-rewrite.sh
t/spy-wildcard.sh
t/stdinc-no-repeated.sh
t/subdir.sh
t/subobj-c.sh
t/subobj-clean-lt-pr10697.sh
t/subobj-clean-pr10697.sh
t/subobj-cxx-grep.sh
t/subobj-cxx.sh
t/subobj-libtool.sh
t/subobj10.sh
t/subobj11a.sh
t/subobj5.sh
t/subobj8.sh
t/subobj9.sh
t/subpkg-yacc.sh
t/subpkg.sh
t/substref.sh
t/suffix-chain.sh
t/suffix-custom-default-ext.sh
t/suffix-custom-link.sh
t/suffix-custom-subobj.sh
t/suffix-custom.sh
t/suffix-hdr.sh
t/suffix-obj.sh
t/suffix-rules-old-fashioned.sh
t/suffix.sh
t/suffix10.sh
t/suffix13.sh
t/suffix2.sh
t/suffix3.sh
t/suffix5.sh
t/suffix8.sh
t/suffix9.sh
t/tap-autonumber.sh
t/tap-bad-prog.tap
t/tap-bailout-leading-space.sh
t/tap-bailout-suppress-later-errors.sh
t/tap-bailout.sh
t/tap-basic.sh
t/tap-color.sh
t/tap-common-setup.sh
t/tap-deps.sh
t/tap-diagnostic-custom.sh
t/tap-diagnostic.sh
t/tap-doc.sh
t/tap-doc2.sh
t/tap-global-log.sh
t/tap-global-result.sh
t/tap-lazy-check.sh
t/tap-log.sh
t/tap-merge-stdout-stderr.sh
t/tap-more.sh
t/tap-more2.sh
t/tap-msg0-bailout.sh
t/tap-msg0-planskip.sh
t/tap-out-of-order.sh
t/tap-passthrough-exit.sh
t/tap-passthrough.sh
t/tap-plan-corner.sh
t/tap-plan-leading-zero.sh
t/tap-plan-malformed.sh
t/tap-plan-middle.sh
t/tap-plan-whitespace.sh
t/tap-plan.sh
t/tap-planskip-and-logging.sh
t/tap-planskip-case-insensitive.sh
t/tap-planskip-late.sh
t/tap-planskip-unplanned-corner.sh
t/tap-planskip-whitespace.sh
t/tap-planskip.sh
t/tap-realtime.sh
t/tap-recheck.sh
t/tap-signal.tap
t/tap-test-number-0.sh
t/tap-todo-skip.sh
t/tap-unplanned.sh
t/test-driver-acsubst.sh
t/test-driver-cond.sh
t/test-driver-create-log-dir.sh
t/test-driver-custom-multitest-recheck.sh
t/test-driver-custom-multitest-recheck2.sh
t/test-driver-custom-multitest.sh
t/test-driver-custom-xfail-tests.sh
t/test-driver-custom.sh
t/test-driver-fail.sh
t/test-driver-is-distributed.sh
t/test-driver-strip-vpath.sh
t/test-extensions-cond.sh
t/test-extensions-dynamic.sh
t/test-extensions-funny-chars.sh
t/test-extensions-invalid.sh
t/test-log.sh
t/test-metadata-global-log.sh
t/test-metadata-global-result.sh
t/test-metadata-recheck.sh
t/test-metadata-results.sh
t/test-missing.sh
t/test-trs-basic.sh
t/test-trs-recover-parallel.sh
t/test-trs-recover.sh
t/testsuite-summary-reference-log.sh
t/transform3.sh
t/txinfo-include.sh
t/txinfo-rules-once.sh
t/txinfo-unrecognized-extension-2.sh
t/txinfo.sh
t/txinfo17.sh
t/txinfo2.sh
t/txinfo20.sh
t/txinfo21.sh
t/txinfo21b.sh
t/txinfo8.sh
t/uninstall-fail.sh
t/vala-headers.sh
t/vala-libs.sh
t/vala-mix.sh
t/vala-mix2.sh
t/vala-parallel.sh
t/vala-vapi.sh
t/vala-vpath.sh
t/vala2.sh
t/vala3.sh
t/vala5.sh
t/var-undef-append.sh
t/vars-assign.sh
t/vartar.sh
t/vartypos-deps.sh
t/vartypos-whitelist.sh
t/vartypos.sh
t/verbatim.sh
t/version7.sh
t/vpath-built-sources.sh
t/vpath-rewrite.sh
t/vpath.sh
t/vtexi.sh
t/vtexi2.sh
t/vtexi3.sh
t/vtexi4.sh
t/warning-groups-win-over-strictness.sh
t/warnings-override.sh
t/warnings-precedence.sh
t/warnings-strictness-interactions.sh
t/warnings-win-over-strictness.sh
t/warnopts.sh
t/werror.sh
t/werror2.sh
t/xsource.sh
t/yacc-auxdir.sh
t/yacc-basic.sh
t/yacc-bison-skeleton-cxx.sh
t/yacc-bison-skeleton.sh
t/yacc-cxx.sh
t/yacc-d-basic.sh
t/yacc-d-cxx.sh
t/yacc-depend2.sh
t/yacc-dist-nobuild-subdir.sh
t/yacc-dist-nobuild.sh
t/yacc-lex-cxx-alone.sh
t/yacc-line.sh
t/yacc-mix-c-cxx.sh
t/yacc-nodist.sh
t/yacc-subobj-nodep.sh
t/yacc5.sh
t/yacc8.sh
t/yflags-cmdline-override.sh
t/yflags.sh
t/yflags2.sh

diff --cc configure.ac
Simple merge
Simple merge
index 460ec6357beef9c52eb54c29fb6459a8e746b948,002136263144ee3e24ff9e3668c16cffddd66bdc..28fb3d28f1b79ceac1fff1926f0ddf85e65ec397
@@@ -89,19 -89,18 +89,16 @@@ sub write_wrapper_script ($$$
    print $file_handle unindent <<EOF;
      #! /bin/sh
      # This file has been automatically generated.  DO NOT EDIT BY HAND!
-     . ./defs-static || exit '99';
+     . ./defs-static || exit 1
      $shell_setup_code
 -    # In the spirit of VPATH, we prefer a test in the build tree
 -    # over one in the source tree.
 -    for dir in . "\$am_top_srcdir"; do
 -      if test -f "\$dir/$wrapped_test"; then
 -        echo "\$0: will source \$dir/$wrapped_test"
 -        . "\$dir/$wrapped_test"; exit "\$?"
 -      fi
 -    done
 -    echo "\$0: cannot find wrapped test '$wrapped_test'" >&2
 +    w="\$am_top_srcdir/$wrapped_test"
 +    if test -f "\$w"; then
 +      echo "\$0: will source '\$w'"
 +      . "\$w"
-       exit "\$?"
-     else
-       echo "\$0: cannot find wrapped test '\$w'" >&2
-       exit '99'
++      exit \$?
 +    fi
++    echo "\$0: cannot find wrapped test '\$w'" >&2
+     exit 99
  EOF
  }
  
diff --cc lib/missing
Simple merge
Simple merge
diff --cc t/README
Simple merge
diff --cc t/aclocal4.sh
Simple merge
index 1857a45e26efcff8c2ebba3561f266f7ea465dd0,0000000000000000000000000000000000000000..60da56c2d60a79352f0183f7dc1c29f0ef25d98e
mode 100755,000000..100755
--- /dev/null
@@@ -1,85 -1,0 +1,85 @@@
- . ./defs || Exit 1
 +#! /bin/sh
 +# Copyright (C) 2007-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 <http://www.gnu.org/licenses/>.
 +
 +# Test internal automake variables:
 +#  - $(am__all_progs).
 +#  - $(am__all_libs).
 +#  - $(am__all_ltlibs).
 +
++. ./defs || exit 1
 +
 +cat >> configure.ac << 'END'
 +AC_SUBST([CC], [who-cares])
 +m4_define([AM_PROG_AR], [AC_SUBST([AR], [who-cares])])
 +AM_PROG_AR
 +AC_SUBST([RANLIB], [who-cares])
 +AC_SUBST([LIBTOOL], [who-cares])
 +AC_SUBST([EXEEXT], [''])
 +AC_OUTPUT
 +END
 +
 +cat > Makefile.am << 'END'
 +AUTOMAKE_OPTIONS = no-dependencies
 +
 +check_PROGRAMS = p1
 +check_LIBRARIES = lib01.a
 +check_LTLIBRARIES = lib1.la
 +check_SCRIPTS = x1
 +
 +EXTRA_PROGRAMS = p2
 +EXTRA_LIBRARIES = lib02.a
 +EXTRA_LTLIBRARIES = lib2.la
 +EXTRA_SCRIPTS = x2
 +
 +bin_PROGRAMS = p3
 +lib_LIBRARIES = lib03.a
 +lib_LTLIBRARIES = lib3.la
 +bin_SCRIPTS = x3
 +
 +noinst_PROGRAMS = p4
 +noinst_LIBRARIES = lib04.a
 +noinst_LTLIBRARIES = lib4.la
 +noinst_SCRIPTS = x4
 +
 +mydir = $(prefix)
 +my_PROGRAMS = p5
 +my_LIBRARIES = lib05.a
 +my_LTLIBRARIES = lib5.la
 +my_SCRIPTS = x5
 +
 +.PHONY: debug test
 +debug:
 +      @echo  PROGS-BEG:  $(am__all_progs)   :PROGS-END
 +      @echo   LIBS-BEG:  $(am__all_libs)    :LIBS-END
 +      @echo LTLIBS-BEG:  $(am__all_ltlibs)  :LTLIBS-END
 +test: debug
 +      test '$(am__all_progs)'  = 'p1 p2 p3 p4 p5'
 +      test '$(am__all_libs)'   = 'lib01.a lib02.a lib03.a lib04.a lib05.a'
 +      test '$(am__all_ltlibs)' = 'lib1.la lib2.la lib3.la lib4.la lib5.la'
 +END
 +
 +: > ltmain.sh
 +
 +$ACLOCAL
 +$AUTOCONF
 +$AUTOMAKE --add-missing
 +
 +./configure
 +$MAKE test
 +$MAKE test EXEEXT=.exe
 +$MAKE test EXEEXT=.bin
 +
 +:
Simple merge
diff --cc t/am-dir.sh
index f3026598b9d0227def9a53969611253d1dc1ae4c,0000000000000000000000000000000000000000..373fa4ff3905d13ceb6c4ed1bb2cbaff001970a3
mode 100755,000000..100755
--- /dev/null
@@@ -1,92 -1,0 +1,92 @@@
- . ./defs || Exit 1
 +#! /bin/sh
 +# Copyright (C) 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 <http://www.gnu.org/licenses/>.
 +
 +#
 +# Check support for private automake working directory in builddir:
 +#
 +#  * internal variables:
 +#      $(am__dir)
 +#      $(am__abs_dir)
 +#      $(am__top_dir)
 +#      $(am__abs_top_dir)
 +#
 +#  * cleaning rules and "make distcheck" interaction.
 +#
 +
++. ./defs || exit 1
 +
 +d=.am
 +
 +cat >> configure.ac <<'END'
 +AC_CONFIG_FILES([xsrc/Makefile])
 +AC_OUTPUT
 +END
 +
 +cat > Makefile.am <<'END'
 +SUBDIRS = . xsrc
 +all-local: | $(am__dir)
 +END
 +
 +mkdir xsrc
 +cat >> xsrc/Makefile.am <<'END'
 +subdir:
 +      mkdir $@
 +all-local: | $(am__dir) subdir
 +      : > $(am__dir)/sub
 +      : > $(am__top_dir)/top
 +      (cd ./subdir && : > $(am__abs_dir)/abs-sub)
 +      rmdir subdir
 +      (cd /tmp && : > $(am__abs_top_dir)/abs-top)
 +END
 +
 +sort > exp <<END
 +$d
 +$d/top
 +$d/abs-top
 +xsrc/$d
 +xsrc/$d/sub
 +xsrc/$d/abs-sub
 +END
 +
 +$ACLOCAL
 +$AUTOCONF
 +$AUTOMAKE
 +
 +do_check ()
 +{
 +  srcdir=$1
 +  $srcdir/configure
 +  $MAKE
 +  find $d xsrc/$d | sort > got
 +  cat $srcdir/exp
 +  cat got
 +  diff $srcdir/exp got
 +}
 +
 +mkdir build
 +cd build
 +do_check ..
 +
 +cd ..
 +do_check .
 +
 +$MAKE distcheck
 +$MAKE clean
 +test -d $d
 +$MAKE distclean
 +test ! -e $d
 +
 +:
index 1c085b224bd8c0793fc46ab72ef8fba36e884ecb,bc0daea286d0a0643403388c150ebbaa521cdf41..830373a5974fa27728351ac243f50bb8e47fe15e
@@@ -16,8 -16,7 +16,8 @@@
  
  # Check that AUTOMAKE_OPTIONS support variable expansion.
  
- . ./defs || Exit 1
 +am_create_testdir=empty
+ . ./defs || exit 1
  
  # We want complete control over automake options.
  AUTOMAKE=$am_original_AUTOMAKE
@@@ -47,16 -43,10 +47,16 @@@ foo_SOURCES = sub/foo.
  install:
  END
  
 +: > compile
 +: > missing
 +: > depcomp
 +: > install-sh
 +
  $ACLOCAL
  AUTOMAKE_run
 -grep '^Makefile\.am:.*:=.*not portable' stderr
 +grep '^Makefile\.am:.*sub/foo\.c.*requires.*AM_PROG_CC_C_O' stderr
- grep README stderr && Exit 1
- $EGREP '(install|override)' stderr && Exit 1
- $EGREP 'distdir|\.tar' Makefile.in && Exit 1
+ grep README stderr && exit 1
+ $EGREP '(install|override)' stderr && exit 1
++$EGREP 'distdir|\.tar' Makefile.in && exit 1
  
  :
Simple merge
index 93e7f5f1356f5f60330e253584de068e9eff8aca,a48a0a76c4bd7c8c88461d71ae68c5dbfb770e08..458142c5d6a8e6d362f2f3c56cef4d595f27d61b
  # 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 that 'configure', 'configure.ac' and 'configure.in' are *not*
 -# automatically distributed when placed in a subdirectory.
 +# Check that 'configure' and 'configure.ac' are *not* automatically
 +# distributed when placed in a subdirectory.
  # Related to automake bug#7819.
  
- . ./defs || Exit 1
+ . ./defs || exit 1
  
  cat >> configure.ac <<END
  AC_CONFIG_FILES([sub/Makefile])
Simple merge
Simple merge
diff --cc t/autodist.sh
Simple merge
diff --cc t/autohdr3.sh
Simple merge
diff --cc t/auxdir.sh
Simple merge
diff --cc t/auxdir6.sh
Simple merge
diff --cc t/auxdir7.sh
Simple merge
diff --cc t/auxdir8.sh
Simple merge
index 3e9f61b2d10830446e32ed7652b1b8306b97e973,0000000000000000000000000000000000000000..a887f02847b8990d5f593facb9bdcf2d9929df60
mode 100644,000000..100644
--- /dev/null
@@@ -1,174 -1,0 +1,174 @@@
- . ./defs || Exit 1
 +#! /bin/sh
 +# Copyright (C) 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 <http://www.gnu.org/licenses/>.
 +
 +# Dependency tracking in the face of added/removed/renamed files.
 +# This is meant to be sourced by other the tests, after they've
 +# set the variables '$xdir' and '$vpath' appropriately.
 +
 +required=cc
-   diff "$1" t && Exit 1
++. ./defs || exit 1
 +
 +test x${xdir+"set"} = x"set" || fatal_ "\$xdir is unset"
 +test x${vpath+"set"} = x"set" || fatal_ "\$vpath is unset"
 +
 +if test $vpath = no; then
 +  srcdir=.
 +elif test $vpath = yes; then
 +  srcdir=..
 +else
 +  fatal_ "invalid value for \$vpath: '$vpath'"
 +fi
 +
 +if test -z "$xdir"; then
 +  thedir=$srcdir
 +else
 +  thedir=$srcdir/$xdir
 +  xdir=$xdir/
 +fi
 +
 +
 +finalize_edit ()
 +{
-   grep_prog_out () { ./prg && ./prg | grep "$1" || Exit 1; }
++  diff "$1" t && exit 1
 +  mv -f t "$2"
 +}
 +
 +func_subst ()
 +{
 +  subst=$1; shift
 +  for file
 +  do
 +    sed "$subst" "$file" > t
 +    finalize_edit "$subst" "$file"
 +  done
 +}
 +
 +prepend ()
 +{
 +  cat "$1" "$2" > t
 +  finalize_edit "$@"
 +}
 +
 +if cross_compiling; then
 +  grep_prog_out () { :; }
 +else
- test $vpath = no || { mkdir build && cd build; } || Exit 99
++  grep_prog_out () { ./prg && ./prg | grep "$1" || exit 1; }
 +fi
 +
 +echo AC_PROG_CC                         >> configure.ac
 +echo AM_PROG_AR                         >> configure.ac
 +echo AC_PROG_RANLIB                     >> configure.ac
 +test -z "$xdir" || echo AM_PROG_CC_C_O  >> configure.ac
 +echo AC_OUTPUT                          >> configure.ac
 +
 +cat > Makefile.am <<END
 +noinst_PROGRAMS = prg
 +noinst_LIBRARIES = liber.a
 +prg_SOURCES = ${xdir}main.c
 +liber_a_SOURCES = ${xdir}niam.c
 +get-exeext:
 +      @echo \$(EXEEXT)
 +END
 +
 +cat configure.ac # For debugging.
 +cat Makefile.am  # Likewise.
 +
 +test -z "$xdir" || mkdir "$xdir"
 +
 +echo '#define THE_STRING "foofoofoo"' > ${xdir}foo.h
 +
 +cat > ${xdir}main.c << 'END'
 +#include "foo.h"
 +#include <stdio.h>
 +int main (void)
 +{
 +   printf ("%s\n", THE_STRING);
 +   return 0;
 +}
 +END
 +
 +sed 's/main/niam/' ${xdir}main.c > ${xdir}niam.c
 +
 +$ACLOCAL
 +$AUTOCONF
 +$AUTOMAKE -a
 +
++test $vpath = no || { mkdir build && cd build; } || exit 99
 +
 +$srcdir/configure --enable-dependency-tracking
 +$MAKE
 +grep_prog_out foofoofoo # Sanity check.
 +
 +EXEEXT=`$MAKE -s --no-print-directory get-exeext` \
 +  || fatal_ "cannot get \$EXEEXT"
 +
 +# Modify an header file.
 +$sleep
 +echo '#define THE_STRING "oofoofoof"' > $thedir/foo.h
 +$MAKE
 +is_newest prg$EXEEXT $thedir/foo.h
 +is_newest liber.a $thedir/foo.h
 +grep_prog_out oofoofoof
 +
 +# Rename an header file.
 +$sleep
 +mv $thedir/foo.h $thedir/foo2.h
 +func_subst 's|foo\.h|foo2.h|' $thedir/main.c $thedir/niam.c
 +$MAKE
 +is_newest prg$EXEEXT $thedir/main.c
 +is_newest liber.a $thedir/niam.c
 +grep_prog_out oofoofoof
 +
 +# Add an header file, modify another one.
 +$sleep
 +mv $thedir/foo2.h $thedir/bar.h
 +echo '#include "bar.h"' > $thedir/foo2.h
 +$MAKE
 +grep_prog_out oofoofoof
 +is_newest prg$EXEEXT $thedir/foo2.h
 +is_newest liber.a $thedir/foo2.h
 +
 +# Remove an header file, modify another one.
 +$sleep
 +echo '#define THE_STRING "bazbazbaz"' > $thedir/foo2.h
 +rm -f $thedir/bar.h
 +$MAKE
 +is_newest prg$EXEEXT $thedir/foo2.h
 +is_newest liber.a $thedir/foo2.h
 +grep_prog_out bazbazbaz
 +
 +# Add two header files, rename another file.
 +$sleep
 +echo '#define S_ONE "zar"' > $thedir/1.h
 +echo '#define S_TWO "doz"' > $thedir/2.h
 +cat > $thedir/baz.h <<'END'
 +#include "1.h"
 +#include "2.h"
 +#define THE_STRING S_ONE S_TWO
 +END
 +func_subst 's|foo2\.h|baz.h|' $thedir/main.c $thedir/niam.c
 +rm -f $thedir/foo2.h
 +$MAKE
 +is_newest prg$EXEEXT $thedir/*.[ch]
 +is_newest liber.a $thedir/*.[ch]
 +grep_prog_out zardoz
 +
 +# Check the distribution.
 +$sleep
 +echo prg_SOURCES += ${xdir}baz.h ${xdir}1.h ${xdir}2.h >> $srcdir/Makefile.am
 +$MAKE distcheck
 +
 +:
Simple merge
index ba3c1e6ce8fba8e7317b7bb3a297fae5eeafce9a,d9f4729961586c9e41c7ab6c47b88fb00b105caa..c8b6c32e5e004d1f46652e0c4d31ac56bc7db143
@@@ -319,14 -323,124 +321,14 @@@ extract_configure_help (
  grep_configure_help ()
  {
    ./configure --help > am--all-help \
-     || { cat am--all-help; Exit 1; }
+     || { cat am--all-help; exit 1; }
    cat am--all-help
    extract_configure_help "$1" am--all-help > am--our-help \
-     || { cat am--our-help; Exit 1; }
+     || { cat am--our-help; exit 1; }
    cat am--our-help
-   $EGREP "$2" am--our-help || Exit 1
+   $EGREP "$2" am--our-help || exit 1
  }
  
 -# using_gmake
 -# -----------
 -# Return success if $MAKE is GNU make, return failure otherwise.
 -# Caches the result for speed reasons.
 -using_gmake ()
 -{
 -  case $am__using_gmake in
 -    yes)
 -      return 0;;
 -    no)
 -      return 1;;
 -    '')
 -      # Use --version AND -v, because SGI Make doesn't fail on --version.
 -      # Also grep for GNU because newer versions of FreeBSD make do
 -      # not complain about --version (they seem to silently ignore it).
 -      if $MAKE --version -v | grep GNU; then
 -        am__using_gmake=yes
 -        return 0
 -      else
 -        am__using_gmake=no
 -        return 1
 -      fi;;
 -    *)
 -      fatal_ "invalid value for \$am__using_gmake: '$am__using_gmake'";;
 -  esac
 -}
 -am__using_gmake="" # Avoid interferences from the environment.
 -
 -# make_can_chain_suffix_rules
 -# ---------------------------
 -# Return 0 if $MAKE is a make implementation that can chain suffix rules
 -# automatically, return 1 otherwise.  Caches the result for speed reasons.
 -make_can_chain_suffix_rules ()
 -{
 -  if test -z "$am__can_chain_suffix_rules"; then
 -    if using_gmake; then
 -      am__can_chain_suffix_rules=yes
 -      return 0
 -    else
 -      mkdir am__chain.dir$$
 -      cd am__chain.dir$$
 -      unindent > Makefile << 'END'
 -        .SUFFIXES: .u .v .w
 -        .u.v: ; cp $< $@
 -        .v.w: ; cp $< $@
 -END
 -      echo make can chain suffix rules > foo.u
 -      if $MAKE foo.w && diff foo.u foo.w; then
 -        am__can_chain_suffix_rules=yes
 -      else
 -        am__can_chain_suffix_rules=no
 -      fi
 -      cd ..
 -      rm -rf am__chain.dir$$
 -    fi
 -  fi
 -  case $am__can_chain_suffix_rules in
 -    yes) return 0;;
 -     no) return 1;;
 -      *) fatal_ "make_can_chain_suffix_rules: internal error";;
 -  esac
 -}
 -am__can_chain_suffix_rules="" # Avoid interferences from the environment.
 -
 -# useless_vpath_rebuild
 -# ---------------------
 -# Tell whether $MAKE suffers of the bug triggering automake bug#7884.
 -# For example, this happens with FreeBSD make, since in a VPATH build
 -# it tends to rebuilt files for which there is an explicit or even just
 -# a suffix rule, even if said files are already available in the VPATH
 -# directory.
 -useless_vpath_rebuild ()
 -{
 -  if test -z "$am__useless_vpath_rebuild"; then
 -    if using_gmake; then
 -      am__useless_vpath_rebuild=no
 -      return 1
 -    fi
 -    mkdir am__vpath.dir$$
 -    cd am__vpath.dir$$
 -    touch foo.a foo.b bar baz
 -    mkdir build
 -    cd build
 -    unindent > Makefile << 'END'
 -        .SUFFIXES: .a .b
 -        VPATH = ..
 -        all: foo.b baz
 -        .PHONY: all
 -        .a.b: ; cp $< $@
 -        baz: bar ; cp ../baz bar
 -END
 -    if $MAKE all && test ! -f foo.b && test ! -f bar; then
 -      am__useless_vpath_rebuild=no
 -    else
 -      am__useless_vpath_rebuild=yes
 -    fi
 -    cd ../..
 -    rm -rf am__vpath.dir$$
 -  fi
 -  case $am__useless_vpath_rebuild in
 -    yes) return 0;;
 -     no) return 1;;
 -     "") ;;
 -      *) fatal_ "no_useless_builddir_remake: internal error";;
 -  esac
 -}
 -am__useless_vpath_rebuild=""
 -
 -yl_distcheck () { useless_vpath_rebuild || $MAKE distcheck ${1+"$@"}; }
 -
  # seq_ - print a sequence of numbers
  # ----------------------------------
  # This function simulates GNU seq(1) portably.  Valid usages:
index 2419718ff9e5e858dc841ccc3da9ec67757956c9,9137c22a4ec646e717cbcf01f7cda715d24b1ad1..d31a94c87ccc9cfcb569e40f5c2486df8d253717
@@@ -75,14 -76,14 +75,14 @@@ do_check (
      case $t in fail*|xpass*|error*) expect_failure=:;; esac
      case $t in xfail*|xpass*) xfail_tests="$xfail_tests $t";; esac
    done
 -  test -z "$xfail_tests" || xfail_tests="XFAIL_TESTS='$xfail_tests'"
 -  st=0
 -  eval "env $tests $xfail_tests \$MAKE -e check > stdout || st=\$?"
 +  set "TESTS=$tests"
 +  test -z "$xfail_tests" || set "$@" XFAIL_TESTS="$xfail_tests"
 +  st=0; $MAKE "$@" check >stdout || st=$?
    cat stdout
    if $expect_failure; then
-     test $st -gt 0 || Exit 1
+     test $st -gt 0 || exit 1
    else
-     test $st -eq 0 || Exit 1
+     test $st -eq 0 || exit 1
    fi
    $PERL "$am_testauxdir"/extract-testsuite-summary.pl stdout >summary.got \
     || fatal_ "cannot extract testsuite summary"
index e236183fd355508b913f664cc69803a5350bc58d,0000000000000000000000000000000000000000..d0057657976df69c8f8d86a12f90987e5a60e681
mode 100755,000000..100755
--- /dev/null
@@@ -1,78 -1,0 +1,78 @@@
- . ./defs || Exit 1
 +#! /bin/sh
 +# Copyright (C) 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 <http://www.gnu.org/licenses/>.
 +
 +#
 +# - Automake should handle trailing backslashes in comments the way GNU
 +#   make does, i.e., considering the next line as a continuation of the
 +#   comment.
 +#
 +# - Automake should allow backslash-escaped '#' characters at the end
 +#   of a line (in variable definitions as well as well as in recipes),
 +#   because GNU make allows that.
 +#
 +# - GNU make handles comments following trailing backslashes gracefully,
 +#   so Automake should do the same.
 +#
 +# - Automake should not complain if the Makefile ands with a backslash
 +#   and newline sequence, because GNU make handles that gracefully.
 +#
 +
++. ./defs || exit 1
 +
 +echo AC_OUTPUT >> configure.ac
 +
 +# Avoid possible interferences from the environment.
 +var1= var2=; unset var1 var2
 +
 +cat > Makefile.am << 'END'
 +# a comment with backslash \
 +var1 = foo
 +var2 = bar
 +
 +var3 = \#
 +var4 = $(var3)
 +
 +var5 = ok \
 +# ko
 +
 +var6 = \# \
 +\#\\\\\# seen # not seen
 +
 +var6 += \# \# # again not seen
 +
 +.PHONY: test
 +test:
 +      test -z '$(var1)'
 +      test '$(var2)' = bar
 +      test '$(var3)' = '#'
 +      test '$(var4)' = \#
 +      # Use '[', not 'test', here, so that spurious comments
 +      # are ensured to cause syntax errors.
 +      [ $(var5) = ok ]
 +      test '$(var6)' = '# #\\# seen # #'
 +
 +# Yes, this file ends with a backslash-newline.  So what?
 +\
 +END
 +
 +$ACLOCAL
 +$AUTOCONF
 +$AUTOMAKE
 +
 +./configure
 +$MAKE test
 +
 +:
diff --cc t/bsource.sh
index 0ab31f7b880308619ef0bd640f6eb0cdda3afe06,d16b58060cc7eb598aa90a50cb315bd40305986a..e3e481d4b1a7e4bfbc413a75b1ef187cf82e09ed
@@@ -27,14 -27,6 +27,14 @@@ EN
  
  $ACLOCAL
  $AUTOMAKE
 -grep 'install-recursive' Makefile.in && exit 1
 +$AUTOCONF
 +
 +./configure
 +
 +for t in all check install; do
-   $MAKE -n $t-recursive 2>stderr && { cat stderr >&2; Exit 1; }
++  $MAKE -n $t-recursive 2>stderr && { cat stderr >&2; exit 1; }
 +  cat stderr >&2
 +  grep " [Nn]o rule to make target.*[\`\"']$t-recursive" stderr
 +done
  
  :
index 28fa21fbb3a3fbea7626ee893b31269f0648d7aa,a00e37a49ce3a8f50a678f48de7183cb63c6213b..d4d3c51e2a44ae1574cf430b93ea94d8e9743902
@@@ -58,11 -58,23 +58,11 @@@ $AUTOCON
  $AUTOMAKE -a
  ./configure --prefix "$(pwd)/inst"
  
- $MAKE check >stdout || { cat stdout; Exit 1; }
+ $MAKE check >stdout || { cat stdout; exit 1; }
  cat stdout
  grep '^PASS: subrun\.sh *$' stdout
- grep 'PASS.*echo\.sh' stdout && Exit 1
+ grep 'PASS.*echo\.sh' stdout && exit 1
  
 -# check should depend directly on $(BUILT_SOURCES) (similar tests
 -# are in check.test and check2.test).
 -$EGREP '^check:.* \$\(BUILT_SOURCES\)( |$)' Makefile.in
 -$EGREP '^check:.* \$\(BUILT_SOURCES\)( |$)' dir/Makefile.in
 -
 -$MAKE clean
 -# Sanity checks
 -test ! -f command1.inc
 -test ! -f dir/command2.inc
 -# Now make sure these two files are rebuilt during make install.
 -$MAKE install
 -test -f command1.inc
 -test -f dir/command2.inc
 +$MAKE distcheck
  
  :
index d74ababac752c22b68e9bb3b05729b90333d198c,0000000000000000000000000000000000000000..ac78a9756f59e614850c7769f2f72182ce39fafe
mode 100755,000000..100755
--- /dev/null
@@@ -1,91 -1,0 +1,91 @@@
- . ./defs || Exit 1
 +#! /bin/sh
 +# Copyright (C) 2003-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 <http://www.gnu.org/licenses/>.
 +
 +# Interaction of BUILT_SOURCES with conditionals.
 +
++. ./defs || exit 1
 +
 +cat >> configure.ac <<'END'
 +AM_CONDITIONAL([COND1], [test $cond1 = yes])
 +AM_CONDITIONAL([COND2], [test $cond2 = yes])
 +AC_OUTPUT
 +END
 +
 +cat > Makefile.am << 'END'
 +if COND1
 +BUILT_SOURCES = a
 +else
 +BUILT_SOURCES = b
 +endif
 +if COND2
 +BUILT_SOURCES += c
 +endif
 +
 +a b c:
 +      echo who cares > $@
 +END
 +
 +$ACLOCAL
 +$AUTOMAKE
 +$AUTOCONF
 +
 +cleanup ()
 +{
 +  # Files in $(BUILT_SOURCES) should be automatically removed
 +  # upon maintainer-clean.
 +  $MAKE maintainer-clean
 +  test ! -f a
 +  test ! -f b
 +  test ! -f c
 +}
 +
 +./configure cond1=yes cond2=yes
 +
 +$MAKE
 +test -f a
 +test ! -f b
 +test -f c
 +
 +cleanup
 +
 +./configure cond1=no cond2=yes
 +
 +$MAKE
 +test ! -f a
 +test -f b
 +test -f c
 +
 +cleanup
 +
 +./configure cond1=yes cond2=no
 +
 +$MAKE
 +test -f a
 +test ! -f b
 +test ! -f c
 +
 +cleanup
 +
 +./configure cond1=no cond2=no
 +
 +$MAKE
 +test ! -f a
 +test -f b
 +test ! -f c
 +
 +cleanup
 +
 +:
index 307864c34708ef6e794f008d31efd095799686d2,0000000000000000000000000000000000000000..7234e7a3fb693775cf230dbe40b719622c7d63a0
mode 100755,000000..100755
--- /dev/null
@@@ -1,69 -1,0 +1,69 @@@
- . ./defs || Exit 1
 +#! /bin/sh
 +# Copyright (C) 2002-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 <http://www.gnu.org/licenses/>.
 +
 +# Make sure 'install:' honors $(BUILT_SOURCES).
 +# PR/359.
 +
++. ./defs || exit 1
 +
 +cat >> configure.ac << 'END'
 +AC_CONFIG_FILES([dir/Makefile])
 +AC_OUTPUT
 +END
 +
 +mkdir dir
 +
 +cat > Makefile.am << 'END'
 +BUILT_SOURCES = built1
 +SUBDIRS = dir
 +built1:
 +      echo ok > $@
 +CLEANFILES = built1
 +install-data-hook:
 +      $(MKDIR_P) $(DESTDIR)$(prefix)/dir2
 +      cp built1 $(DESTDIR)$(prefix)/built1
 +      cp dir/built2 $(DESTDIR)$(prefix)/dir2/built3
 +uninstall-hook:
 +      rm -f $(DESTDIR)$(prefix)/built1
 +      rm -f $(DESTDIR)$(prefix)/dir2/built3
 +      rmdir $(DESTDIR)$(prefix)/dir2
 +installcheck-local:
 +      test -f $(prefix)/built1
 +      test -f $(prefix)/dir2/built3
 +END
 +
 +cat > dir/Makefile.am << 'END'
 +BUILT_SOURCES = built2
 +built2:
 +## The next line ensures that command1.inc has been built before
 +## recurring into the subdir.
 +      cp ../built1 $@
 +CLEANFILES = built2
 +END
 +
 +$ACLOCAL
 +$AUTOCONF
 +$AUTOMAKE
 +./configure --prefix "`pwd`/inst"
 +
 +# Now make sure these two files are rebuilt during make install.
 +$MAKE install
 +test -f built1
 +test -f dir/built2
 +$MAKE installcheck
 +$MAKE distcheck
 +
 +:
Simple merge
index b60a637cc7db59a78c1ead625e5c3a308e01d1d3,7c848144cefd9a3915b63c8a7f66ab3dca67f743..902cee10d7963579c1eb491ca9b293a77cf3d050
  # You should have received a copy of the GNU General Public License
  # along with this program.  If not, see <http://www.gnu.org/licenses/>.
  
 -# Test to make sure a sensible default source for libraries is used.
 +# Basic test on BUILT_SOURCES.
  
 -required='cc libtool'
 +required=cc
- . ./defs || Exit 1
+ . ./defs || exit 1
  
 -cat >> configure.ac << 'END'
 +cat >> configure.ac <<'END'
  AC_PROG_CC
 -AM_PROG_AR
 -AC_PROG_LIBTOOL
  AC_OUTPUT
  END
  
diff --cc t/canon.sh
Simple merge
diff --cc t/canon5.sh
Simple merge
diff --cc t/ccnoco2.sh
index 6d4bf9cb98f8524acb00d7b71b02dcc8d6f3a589,dcb6fa70d93dd69f221c0f680676c2eba04dda28..e97558b86c8adf9cf25f9fb1d51c16c0665d02ed
  # along with this program.  If not, see <http://www.gnu.org/licenses/>.
  
  # Make sure Automake requires AM_PROG_CC_C_O when either per-targets
 -# flags or subdir-objects are used.
 +# flags or subdir objects are used.
  
- . ./defs || Exit 1
+ . ./defs || exit 1
  
  cat >>configure.ac <<EOF
 +AC_CONFIG_FILES([src/Makefile])
  AC_PROG_CC
  AC_OUTPUT
  EOF
diff --cc t/ccnoco3.sh
Simple merge
index 177806a7f071bd2fdb43b131cb0672fa3a1b70ab,79e8ffcf9f7c3285d9e234314e9d6effb45062a3..108f142dd962b3585a75f88c3abce3c26397fb38
  # You should have received a copy of the GNU General Public License
  # along with this program.  If not, see <http://www.gnu.org/licenses/>.
  
 -# Look for a bug where FreeBSD make in concurrent mode reported success
 -# even when the Automake-generated parallel testsuite harness failed.
 +# Look for a bug where make in concurrent mode reported success even
 +# when the Automake-generated parallel testsuite harness failed.
 +# This issue was originally present only with FreeBSD make, but we
 +# keep the test anyway, for extra safety.
  # See automake bug#9245.
  
- . ./defs || Exit 1
+ . ./defs || exit 1
  
  cat >> configure.ac << 'END'
  AC_OUTPUT
@@@ -44,14 -42,17 +44,14 @@@ $AUTOMAKE -
  
  ./configure
  
 -# Some make implementations don't grok the '-j' option.
 -$MAKE -j1 || exit 77
 -
  for j in '' -j1 -j2; do
-   $MAKE $j check && Exit 1
-   $MAKE $j TESTS=foo.test check && Exit 1
-   $MAKE $j recheck && Exit 1
-   $MAKE $j TESTS=foo check && Exit 1
 -  $MAKE $j check && exit 1
 -  TESTS=foo.test $MAKE $j -e check && exit 1
 -  $MAKE $j recheck && exit 1
 -  TEST_LOGS=foo.log $MAKE $j -e check && exit 1
++  $MAKE $j check                && exit 1
++  $MAKE $j TESTS=foo.test check && exit 1
++  $MAKE $j recheck              && exit 1
++  $MAKE $j TESTS=foo check      && exit 1
    rm -f test-suite.log
-   $MAKE $j test-suite.log && Exit 1
-   test -f test-suite.log || Exit 1
 -  $MAKE $j test-suite.log && exit 1
 -  test -f test-suite.log || exit 1
++  $MAKE $j test-suite.log       && exit 1
++  test -f test-suite.log        || exit 1
  done
  
  :
diff --cc t/check10.sh
index d108335eb0b3c69ce4e385f44c96408c0ec09136,e76773c160bd9f3c64b05966d883abaffc2707a4..ce04e3d2a6a9d53c72c8daca5607a53499fb76c2
@@@ -58,28 -58,28 +58,28 @@@ $AUTOMAKE -
  (
    # Do not check for failure in this subshell
    set +e
 -  env TESTS=pass $MAKE -e check
 -  env TESTS=fail $MAKE -e check
 -  env TESTS=skip $MAKE -e check
 -  env TESTS=xfail $MAKE -e check
 -  env TESTS=xpass $MAKE -e check
 -  env TESTS="pass pass2" $MAKE -e check
 -  env TESTS="fail fail2" $MAKE -e check
 -  env TESTS="skip skip2" $MAKE -e check
 -  env TESTS="xfail xfail2" $MAKE -e check
 -  env TESTS="xpass xpass2" $MAKE -e check
 -  env TESTS='pass skip xfail' $MAKE -e check
 +  $MAKE check TESTS="pass"
 +  $MAKE check TESTS="fail"
 +  $MAKE check TESTS="skip"
 +  $MAKE check TESTS="xfail"
 +  $MAKE check TESTS="xpass"
 +  $MAKE check TESTS="pass pass2"
 +  $MAKE check TESTS="fail fail2"
 +  $MAKE check TESTS="skip skip2"
 +  $MAKE check TESTS="xfail xfail2"
 +  $MAKE check TESTS="xpass xpass2"
 +  $MAKE check TESTS="pass skip xfail"
    $MAKE check
    :
- ) >stdout || { cat stdout; Exit 1; }
+ ) >stdout || { cat stdout; exit 1; }
  cat stdout
  
- grep '1 [tT]ests' stdout && Exit 1
- grep '[02-9] [tT]est ' stdout && Exit 1
- grep '1 .* were ' stdout && Exit 1
- grep '[02-9].* was .*run' stdout && Exit 1
- grep 'All 1 ' stdout && Exit 1
- $EGREP '1 (un)?expected (failures|passes)' stdout && Exit 1
- $EGREP '[^1] (un)?expected (failure|pass)\)' stdout && Exit 1
+ grep '1 [tT]ests' stdout && exit 1
+ grep '[02-9] [tT]est ' stdout && exit 1
+ grep '1 .* were ' stdout && exit 1
+ grep '[02-9].* was .*run' stdout && exit 1
+ grep 'All 1 ' stdout && exit 1
+ $EGREP '1 (un)?expected (failures|passes)' stdout && exit 1
+ $EGREP '[^1] (un)?expected (failure|pass)\)' stdout && exit 1
  
  :
diff --cc t/check11.sh
index 9d56a7c028a743a491c5eee4f4661e9be0cd82f6,2fa489a4400d204b951062f731509204db3c7330..1c764873c9c7f04faf2926d2c391d132a60fceba
@@@ -40,19 -40,19 +40,19 @@@ $AUTOMAKE -
  
  ./configure
  
- $MAKE check TESTS=skip >stdout || { cat stdout; Exit 1; }
 -env TESTS=skip $MAKE -e check >stdout || { cat stdout; exit 1; }
++$MAKE check TESTS=skip >stdout || { cat stdout; exit 1; }
  cat stdout
  if test x"$am_serial_tests" = x"yes"; then
-   grep '1.*passed' stdout && Exit 1
+   grep '1.*passed' stdout && exit 1
    : For shells with buggy 'set -e'.
  else
    count_test_results total=1 pass=0 fail=0 skip=1 xfail=0 xpass=0 error=0
  fi
  
- $MAKE check TESTS="skip skip2" >stdout || { cat stdout; Exit 1; }
 -env TESTS="skip skip2" $MAKE -e check >stdout || { cat stdout; exit 1; }
++$MAKE check TESTS="skip skip2" >stdout || { cat stdout; exit 1; }
  cat stdout
  if test x"$am_serial_tests" = x"yes"; then
-   grep '2.*passed' stdout && Exit 1
+   grep '2.*passed' stdout && exit 1
    : For shells with buggy 'set -e'.
  else
    count_test_results total=2 pass=0 fail=0 skip=2 xfail=0 xpass=0 error=0
diff --cc t/check12.sh
index 79a45e517d2a9044ec793121bd89f5812e7ba560,69dac885c92415b913f0cce7caa34d879d88108f..025089645991a19f405b95c3b80278d1328c2fd8
@@@ -179,11 -179,11 +179,11 @@@ for vpath in : false; d
      : For shells with busted 'set -e'.
    fi
  
-   CHECKLOCAL_EXIT_STATUS=1 $MAKE check && Exit 1
+   CHECKLOCAL_EXIT_STATUS=1 $MAKE check && exit 1
    grep 'check-local failed :-(' local.log
  
 -  # Do not trust the exit status of 'make -k'.
 -  NAIL=screw B_EXIT_STATUS=23 CHECKLOCAL_EXIT_STATUS=1 $MAKE -k check || :
 +  env NAIL=screw B_EXIT_STATUS=23 CHECKLOCAL_EXIT_STATUS=1 \
-       $MAKE -k check && Exit 1
++      $MAKE -k check && exit 1
    test -f hammer.log
    test -f hammer.sum
    test -f spanner.log
diff --cc t/check2.sh
index 439f04bf539782375706858933305c0bd7f77ed7,05dcacb0b3a436d5f7d37be001df7ab77b7337a5..9a1124ad207837db3564b5337d3100e0848131ed
@@@ -51,16 -51,19 +51,16 @@@ $AUTOCON
  $AUTOMAKE
  ./configure
  
- $MAKE check >stdout || { cat stdout; Exit 1; }
+ $MAKE check >stdout || { cat stdout; exit 1; }
  cat stdout
  grep '^PASS: subrun\.sh *$' stdout
- grep 'PASS.*echo\.sh' stdout && Exit 1
+ grep 'PASS.*echo\.sh' stdout && exit 1
  
 -# 'check' should depend directly on 'check-am' (similar tests are
 -# in check.test and check3.test).
 -$EGREP '^check:.* check-recursive( |$)' Makefile.in
 -$EGREP '^check:.* check-am( |$)' dir/Makefile.in
 +$EGREP '^check:.*check-recursive' Makefile.in
 +$EGREP '^check:.*check-am' dir/Makefile.in
  
  # Make sure subrun.sh is still on its line as above.  This means Automake
 -# hasn't rewritten the TESTS line unnecessarily (we can tell, because all
 -# Automake variables are reformatted by VAR_PRETTY).
 +# hasn't rewritten the TESTS line unnecessarily.
  grep '^  subrun\.sh$' Makefile.in
  
  :
diff --cc t/check4.sh
index 0e2554c0266996e7e16088f0bf34834d5461b871,946290f34c426f209172386d683d443c0a38006f..d7c9fac4ad8bbe17f5ccec301f80e26e65236715
@@@ -51,28 -51,34 +51,28 @@@ $AUTOMAKE --add-missin
  
  ./configure --prefix "$(pwd)/inst"
  
- $MAKE check >stdout && { cat stdout; Exit 1; }
+ $MAKE check >stdout && { cat stdout; exit 1; }
  cat stdout
  grep '^FAIL: fail\.sh *$' stdout
- grep '^PASS: ok\.sh *$' stdout && Exit 1
+ grep '^PASS: ok\.sh *$' stdout && exit 1
  
- $MAKE -k check >stdout && { cat stdout; Exit 1; }
 -# The exit status of 'make -k' can be anything
 -# (depending on the Make implementation)
 -$MAKE -k check >stdout || :
++$MAKE -k check >stdout && { cat stdout; exit 1; }
  cat stdout
  grep '^FAIL: fail\.sh *$' stdout
  grep '^PASS: ok\.sh *$' stdout
  
  # Should also works when -k is not in first position.
- $MAKE -s -k check >stdout && { cat stdout; Exit 1; }
 -$MAKE -s -k check >stdout || :
++$MAKE -s -k check >stdout && { cat stdout; exit 1; }
  cat stdout
  grep '^FAIL: fail\.sh *' stdout
  grep '^PASS: ok\.sh *' stdout
  
 -# The rest of the test is for GNU Make.
 -
 -if using_gmake; then
 -  # Try with a long-option that do not have a short option equivalent
 -  # (here, --no-print-directory).  That should cause all options to
 -  # appear verbatim in MAKEFLAGS.
 -  $MAKE --no-print-directory -k check >stdout || :
 -  cat stdout
 -  grep '^FAIL: fail\.sh *$' stdout
 -  grep '^PASS: ok\.sh *$' stdout
 -fi
 +# Try with a long-option that do not have a short option equivalent
 +# (here, --no-print-directory).  That should cause all options to
 +# appear verbatim in MAKEFLAGS.
- $MAKE --no-print-directory -k check >stdout && { cat stdout; Exit 1; }
++$MAKE --no-print-directory -k check >stdout && { cat stdout; exit 1; }
 +cat stdout
 +grep '^FAIL: fail\.sh *$' stdout
 +grep '^PASS: ok\.sh *$' stdout
  
  :
diff --cc t/check5.sh
Simple merge
diff --cc t/check7.sh
Simple merge
diff --cc t/check8.sh
index b50a5124b62a90ec2fef09387632793592bbb5c4,6fcd30ae232d783aad0f1f5dfcab7dff532384a7..24eab72baa84943a4d2a355a218b8e98245f5287
@@@ -64,8 -65,8 +64,8 @@@ $AUTOCON
  $AUTOMAKE -a
  
  ./configure
 -AM_COLOR_TESTS=always $MAKE check >stdout 2>stderr &&
 -  { cat stdout; cat stderr >&2; exit 1; }
 +AM_COLOR_TESTS=always $MAKE check >stdout 2>stderr \
-   && { cat stdout; cat stderr >&2; Exit 1; }
++  && { cat stdout; cat stderr >&2; exit 1; }
  cat stdout
  cat stderr >&2
  grep 'XPASS.* foo$' stdout
diff --cc t/cleanvars.sh
index 2f14e176a32dde8d79bc4ee693eaa52d29a2de3e,0000000000000000000000000000000000000000..a5d0506214612983d1a48b756d04b425ffb6df66
mode 100755,000000..100755
--- /dev/null
@@@ -1,100 -1,0 +1,100 @@@
- . ./defs || Exit 1
 +#! /bin/sh
 +# Copyright (C) 2001-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 <http://www.gnu.org/licenses/>.
 +
 +# Check support for:
 +#   - MOSTLYCLEANFILES
 +#   - CLEANFILES
 +#   - DISTCLEANFILES
 +#   - MAINTAINERCLEANFILES
 +# Especially checks that it is possible to extend them also from a
 +# "wrapper" makefile never processed nor seen by Automake.
 +
++. ./defs || exit 1
 +
 +echo AC_OUTPUT >> configure.ac
 +
 +setup () { touch mostly plain dist maint mostly2 plain2 dist2 maint2; }
 +
 +cat > Makefile.am << 'END'
 +MOSTLYCLEANFILES = mostly
 +CLEANFILES = plain
 +DISTCLEANFILES = dist
 +MAINTAINERCLEANFILES = maint
 +END
 +
 +$ACLOCAL
 +$AUTOCONF
 +$AUTOMAKE
 +
 +cat > GNUmakefile << 'END'
 +include Makefile
 +MOSTLYCLEANFILES += mostly2
 +CLEANFILES += plain2
 +DISTCLEANFILES += dist2
 +MAINTAINERCLEANFILES += maint2
 +END
 +
 +./configure
 +cp config.status config.sav # Save for later.
 +
 +setup
 +$MAKE mostlyclean
 +test ! -f mostly
 +test ! -f mostly2
 +test -f plain
 +test -f plain2
 +test -f dist
 +test -f dist2
 +test -f maint
 +test -f maint2
 +
 +setup
 +$MAKE clean
 +test ! -f mostly
 +test ! -f mostly2
 +test ! -f plain
 +test ! -f plain2
 +test -f dist
 +test -f dist2
 +test -f maint
 +test -f maint2
 +
 +setup
 +$MAKE distclean
 +test ! -f mostly
 +test ! -f mostly2
 +test ! -f plain
 +test ! -f plain2
 +test ! -f dist
 +test ! -f dist2
 +test -f maint
 +test -f maint2
 +
 +setup
 +# The "make distclean" before has removed Makefile and config.status.
 +mv config.sav config.status
 +./config.status Makefile
 +$MAKE maintainer-clean
 +test ! -f mostly
 +test ! -f mostly2
 +test ! -f plain
 +test ! -f plain2
 +test ! -f dist
 +test ! -f dist2
 +test ! -f maint
 +test ! -f maint2
 +
 +:
diff --cc t/colon5.sh
Simple merge
diff --cc t/colon6.sh
index bf2dacd7dc810da93f7c4f6add996c6502b8afc0,1e93a8f99dd678a18a29c0658f57805c568c87e4..48b4f07af6ce8c569ab99bcc48faa5d5e1eb6d38
@@@ -82,10 -87,10 +82,10 @@@ for vpath in : false; d
  
    # version.good should depend on version.gin.
    rm -f version.good
-   $MAKE version.good 2>stderr && { cat stderr >&2; Exit 1; }
 -  $MAKE version.good >output 2>&1 && { cat output; exit 1; }
 -  cat output
++  $MAKE version.good 2>stderr && { cat stderr >&2; exit 1; }
 +  cat stderr >&2
    # Try to verify that we errored out for the right reason.
 -  $FGREP version.gin output
 +  $FGREP version.gin stderr
  
    cd .. # Back in top builddir.
    cd $srcdir
diff --cc t/colon7.sh
Simple merge
diff --cc t/color.sh
index 9e4ac04fbde3c5415540cf34de8435ae8965b187,61158b17a2ba4335f4c746172a0736fddd919b2c..9b3b3bc4f9edd30c7c2c23a40aabcdd3f697bdbc
@@@ -89,10 -89,36 +89,10 @@@ test_color (
  
  test_no_color ()
  {
 -  # With make implementations that, like Solaris make, in case of errors
 -  # print the whole failing recipe on standard output, we should content
 -  # ourselves with a laxer check, to avoid false positives.
 -  # Keep this in sync with lib/am/check.am:$(am__color_tests).
 -  if $FGREP '= Xalways; then' stdout; then
 -    # Extra verbose make, resort to laxer checks.
 -    # Note that we also want to check that the testsuite summary is
 -    # not unduly colorized.
 -    (
 -      set +e # In case some grepped regex below isn't matched.
 -      # Not a useless use of cat; see above comments "grep-nonprinting"
 -      # requirement in 'test-init.sh'.
 -      cat stdout | grep "TOTAL.*:"
 -      cat stdout | grep "PASS.*:"
 -      cat stdout | grep "FAIL.*:"
 -      cat stdout | grep "SKIP.*:"
 -      cat stdout | grep "XFAIL.*:"
 -      cat stdout | grep "XPASS.*:"
 -      cat stdout | grep "ERROR.*:"
 -      cat stdout | grep 'test.*expected'
 -      cat stdout | grep 'test.*not run'
 -      cat stdout | grep '===='
 -      cat stdout | grep '[Ss]ee .*test-suite\.log'
 -      cat stdout | grep '[Tt]estsuite summary'
 -    ) | grep "$esc" && exit 1
 -    : For shells with broken 'set -e'
 -  else
 -    cat stdout | grep "$esc" && exit 1
 -    : For shells with broken 'set -e'
 -  fi
 +  # Not a useless use of cat; see above comments "grep-nonprinting"
 +  # requirement in 'test-init.sh'.
-   cat stdout | grep "$esc" && Exit 1
++  cat stdout | grep "$esc" && exit 1
 +  :
  }
  
  for vpath in false :; do
  
    # Forced colorization should take place also with non-ANSI terminals;
    # hence the "TERM=dumb" definition.
 -  TERM=dumb AM_COLOR_TESTS=always $MAKE -e check >stdout \
 +  $MAKE check AM_COLOR_TESTS=always TERM=dumb >stdout \
-     && { cat stdout; Exit 1; }
+     && { cat stdout; exit 1; }
    cat stdout
    test_color
  
-   $MAKE check TERM=ansi >stdout && { cat stdout; Exit 1; }
 -  TERM=ansi $MAKE -e check >stdout && { cat stdout; exit 1; }
++  $MAKE check TERM=ansi >stdout && { cat stdout; exit 1; }
    cat stdout
    test_no_color
  
diff --cc t/color2.sh
index 841c585d4747b8dc8f95a07db8e9a43ca1556230,e79ab277b1a56d1d8d2b5e125abbd3e11257760d..18734c96dc77a7f01bdd8b7d459697b98f5a2a12
@@@ -30,10 -30,32 +30,9 @@@ mgn="$esc\[0;35m
  std="$esc\[m"
  
  # This test requires a working a working 'expect' program.
- # Creative quoting required to avoid spurious maintainer-check failure.
- (set +e; expect -c 'exit ''77'; test $? -eq 77) \
+ (set +e; expect -c 'exit 77'; test $? -eq 77) \
    || skip_ "requires a working expect program"
  
 -# Also, if the $MAKE program fails to consider the standard output as a
 -# tty (this happens with e.g., BSD make and Solaris dmake when they're
 -# run in parallel mode; see the autoconf manual), there is little point
 -# in proceeding.
 -cat > Makefile <<'END'
 -all:
 -## Creative quoting in the 'echo' below to avoid risk of spurious output
 -## matches by 'expect', below.
 -      @test -t 1 && echo "stdout" "is" "a" "tty"
 -END
 -
 -cat > expect-check <<'END'
 -eval spawn $env(MAKE)
 -expect {
 -  "stdout is a tty" { exit 0 }
 -  default { exit 1 }
 -}
 -exit 1
 -END
 -MAKE=$MAKE expect -f expect-check \
 -  || skip_ "make spawned by expect should have a tty stdout"
 -rm -f expect-check Makefile
 -
  # Do the tests.
  
  cat >>configure.ac <<END
@@@ -96,10 -118,36 +95,10 @@@ test_color (
  
  test_no_color ()
  {
 -  # With make implementations that, like Solaris make, in case of errors
 -  # print the whole failing recipe on standard output, we should content
 -  # ourselves with a laxer check, to avoid false positives.
 -  # Keep this in sync with lib/am/check.am:$(am__color_tests).
 -  if $FGREP '= Xalways; then' stdout; then
 -    # Extra verbose make, resort to laxer checks.
 -    # Note that we also want to check that the testsuite summary is
 -    # not unduly colorized.
 -    (
 -      set +e # In case some grepped regex below isn't matched.
 -      # Not a useless use of cat; see above comments "grep-nonprinting"
 -      # requirement in 'test-init.sh'.
 -      cat stdout | grep "TOTAL.*:"
 -      cat stdout | grep "PASS.*:"
 -      cat stdout | grep "FAIL.*:"
 -      cat stdout | grep "SKIP.*:"
 -      cat stdout | grep "XFAIL.*:"
 -      cat stdout | grep "XPASS.*:"
 -      cat stdout | grep "ERROR.*:"
 -      cat stdout | grep 'test.*expected'
 -      cat stdout | grep 'test.*not run'
 -      cat stdout | grep '===='
 -      cat stdout | grep '[Ss]ee .*test-suite\.log'
 -      cat stdout | grep '[Tt]estsuite summary'
 -    ) | grep "$esc" && exit 1
 -    : For shells with broken 'set -e'
 -  else
 -    cat stdout | grep "$esc" && exit 1
 -    : For shells with broken 'set -e'
 -  fi
 +  # Not a useless use of cat; see above comments "grep-nonprinting"
 +  # requirement in 'test-init.sh'.
-   cat stdout | grep "$esc" && Exit 1
++  cat stdout | grep "$esc" && exit 1
 +  :
  }
  
  cat >expect-make <<'END'
diff --cc t/comment4.sh
Simple merge
diff --cc t/comment6.sh
index 19fc43b76412f0380b5e6abe2fa218d27b3472b8,496dfdd32dbf0a910f5b62812aae175e87432007..e0c37cf4e9d31bdc8aa7b41e6d440dd02900833b
@@@ -37,20 -35,11 +37,20 @@@ cat > Makefile.am << 'EOF
           file2 \
           file3
  
 -all-local:
 -      @echo Good
 -
 +.PHONY: test
 +test:
 +      test -z '$(SOME_FILES)'
  EOF
  
-   grep '#.*file[123]' Makefile && Exit 1
 +do_check ()
 +{
 +  $MAKE test
 +  grep '^# SOME_FILES =' Makefile
 +  # No useless munging please.
++  grep '#.*file[123]' Makefile && exit 1
 +  :
 +}
 +
  $ACLOCAL
  $AUTOCONF
  $AUTOMAKE
diff --cc t/comment8.sh
Simple merge
diff --cc t/cond30.sh
index 495842c951f5f71524d562f6047dddd8703bb002,cf505d92436a1b4a05038374dc2925e99d0d2cde..da954ed6d395279bdcd2d4c706014fa57be81d8c
  # You should have received a copy of the GNU General Public License
  # along with this program.  If not, see <http://www.gnu.org/licenses/>.
  
 -# For PR/352: make sure we support bin_PROGRAMS being defined conditionally.
 +# For PR/352: make sure we support bin_PROGRAMS, lib_LIBRARIES and
 +#             lib_LTLIBRARIES being defined conditionally.
  
- . ./defs || Exit 1
+ . ./defs || exit 1
  
  cat >>configure.ac <<'EOF'
 -AM_CONDITIONAL([C1], [test -z "$two"])
 -AM_CONDITIONAL([C2], [test -n "$two"])
 +m4_define([AM_PROG_AR], [:])
 +AM_PROG_AR
 +AM_CONDITIONAL([C1], [test x"$two" != x"yes"])
 +AM_CONDITIONAL([C2], [test x"$two"  = x"yes"])
  AC_OUTPUT
  EOF
  
diff --cc t/cond38.sh
Simple merge
diff --cc t/condman3.sh
Simple merge
index 3c5ba9753e5143fd99fd1868382a4a2502a8d653,3eed30bb4ebe7917b518144b386a6dfd4988e9e9..2146183f990de2baab104e1e6d99ca59b295772e
@@@ -18,7 -18,8 +18,7 @@@
  # with a dot (like "./Makefile"), since the remake rules might be subtly
  # broken in that case.
  
- . ./defs || Exit 1
 -required=GNUmake
+ . ./defs || exit 1
  
  cat > configure.ac << END
  AC_INIT([$me], [1.0])
diff --cc t/confh.sh
Simple merge
diff --cc t/confh4.sh
index ddcbebab20da54adc4bc70a1fc47034699d0e422,06ae96fbb8a730338428d7b1a56cd67c07265ff1..9331fcb1649617d233de20812a32432e0b1cc04c
  # > How-To-Repeat:
  #  Use AM_CONFIG_HEADER(subdir/config.h) to place configuration
  #  header in subdirectory and observe that it is not included.
 +# Also check that our preprocessing code is smart enough not to pass
 +# repeated '-I<DIR>' options on the compiler command line.
  
- . ./defs || Exit 1
+ . ./defs || exit 1
  
  cat >> configure.ac << 'END'
 -AC_CONFIG_FILES([include/Makefile])
 +AC_CONFIG_FILES([include/Makefile sub/Makefile])
  AC_CONFIG_HEADERS([include/config.h])
 -AC_PROG_CC
 +AC_PROG_FGREP
 +AC_OUTPUT
  END
  
 -cat > Makefile.am << 'END'
 +mkdir include sub
 +: > include/config.h.in
 +
 +cat > c-defs.am << 'END'
 +## To bring in the definition of AM_DEFAULT_INCLUDES
 +CC = who-cares
 +AUTOMAKE_OPTIONS = no-dependencies
  bin_PROGRAMS = foo
 -foo_SOURCES = foo.c
  END
  
 -mkdir include
 -: > include/Makefile.am
 -: > include/config.h.in
 +cat > Makefile.am << 'END'
 +include $(top_srcdir)/c-defs.am
 +.PHONY: test-default-includes
 +test-default-includes:
 +      echo ' ' $(AM_DEFAULT_INCLUDES) ' ' \
 +        | $(FGREP) ' -I$(top_builddir)/include '
 +END
 +
 +cp Makefile.am sub
 +
 +cat > include/Makefile.am << 'END'
 +include $(top_srcdir)/c-defs.am
 +.PHONY: test-default-includes
 +test-default-includes:
 +      echo ' ' $(AM_DEFAULT_INCLUDES) ' ' | $(FGREP) ' -I. '
 +      case ' $(AM_DEFAULT_INCLUDES) ' in \
 +        *'$(top_builddir)'*) exit 1;; \
 +        *include*) exit 1;; \
 +        *-I.*-I.*) exit 1;; \
 +        *' -I. ') exit 0;; \
 +        *) exit 1;; \
 +      esac
 +END
  
  $ACLOCAL
 +$AUTOCONF
  $AUTOMAKE
  
 -grep '^ *DEFAULT_INCLUDES *=.* -I\$(top_builddir)/include' Makefile.in
 +./configure
 +
 +$MAKE test-default-includes
 +$MAKE -C sub test-default-includes
 +$MAKE -C include test-default-includes
  
  :
diff --cc t/confh8.sh
Simple merge
diff --cc t/cscope.tap
Simple merge
index b2138db857cbdd4f2727766b9159c7ef6032fb93,0000000000000000000000000000000000000000..7b7e9cb1ff976cd60160e76ab083d338d61f0347
mode 100755,000000..100755
--- /dev/null
@@@ -1,69 -1,0 +1,69 @@@
- . ./defs || Exit 1
 +#! /bin/sh
 +# Copyright (C) 2006-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 <http://www.gnu.org/licenses/>.
 +
 +# Test mixing Fortran 77 and C++.
 +
 +# For now, require the GNU compilers, to avoid possible spurious failure.
 +required='gfortran g++'
- grep '\$(FCLINK)' Makefile.in && Exit 1
++. ./defs || exit 1
 +
 +cat >> configure.ac << 'END'
 +AC_PROG_CXX
 +AC_PROG_F77
 +AC_OUTPUT
 +END
 +
 +cat > Makefile.am << 'END'
 +noinst_PROGRAMS = foo
 +foo_SOURCES = new.cc old.f
 +END
 +
 +cat > new.cc << 'END'
 +#include <iostream>
 +using namespace std;
 +extern "C" { int cube_ (int *); }
 +int main (void)
 +{
 +   int n = 3;
 +   cout << "The Cube of " << n << " is " << cube_ (&n) << endl;
 +   return 0;
 +}
 +END
 +
 +cat > old.f << 'END'
 +      INTEGER FUNCTION CUBE(N)
 +C     COMPUTES AND RETURN THE CUBE OF THE INTEGER N
 +      CUBE=N*N*N
 +      RETURN
 +      END
 +END
 +
 +$ACLOCAL
 +$AUTOCONF
 +$AUTOMAKE -a
 +# The C++ linker should be preferred.
++grep '\$(FCLINK)' Makefile.in && exit 1
 +grep '.\$(CXXLINK)' Makefile.in
 +
 +./configure
 +$MAKE
 +
 +if cross_compiling; then :; else
 +  ./foo
 +  test "$(./foo)" = "The Cube of 3 is 27"
 +fi
 +
 +$MAKE distcheck
Simple merge
diff --cc t/cxxcpp.sh
Simple merge
diff --cc t/deleted-am.sh
index e3612a339388dfe565704c0b5298d2bfecbcbfb1,9dc015a64d87c84727ff1dad01d458a8a8b71c30..d3d2616aef7e00b4835a6fe410d41b239c32aabf
@@@ -35,12 -35,13 +35,12 @@@ $AUTOMAK
  $MAKE
  
  rm -f zardoz.am
- $MAKE 2>stderr && { cat stderr >&2; Exit 1; }
 -$sleep # Required to avoid racy failures with FreeBSD make.
 -$MAKE >output 2>&1 && { cat output; exit 1; }
 -cat output
++$MAKE 2>stderr && { cat stderr >&2; exit 1; }
 +cat stderr >&2
  # This error will come from automake, not make, so we can be stricter
  # in our grepping of it.
 -grep 'cannot open.*zardoz\.am' output
 -grep 'foobar\.am' output && exit 1 # No spurious error, please.
 +grep 'cannot open.*zardoz\.am' stderr
- grep 'foobar\.am' stderr && Exit 1 # No spurious error, please.
++grep 'foobar\.am' stderr && exit 1 # No spurious error, please.
  
  # Try with one less indirection.
  : > foobar.am
@@@ -48,10 -49,11 +48,10 @@@ $AUTOMAKE Makefil
  ./config.status Makefile
  $MAKE # Sanity check.
  rm -f foobar.am
- $MAKE 2>stderr && { cat stderr >&2; Exit 1; }
 -$sleep # Required to avoid racy failures with FreeBSD make.
 -$MAKE >output 2>&1 && { cat output; exit 1; }
 -cat output
++$MAKE 2>stderr && { cat stderr >&2; exit 1; }
 +cat stderr >&2
  # This error will come from automake, not make, so we can be stricter
  # in our grepping of it.
 -grep 'cannot open.*foobar\.am' output
 +grep 'cannot open.*foobar\.am' stderr
  
  :
diff --cc t/deleted-m4.sh
index 328657e18565cf05f321be9c43cdb06e9de01e74,296f453cf8ee6a9d7c16241327d74c2b6b997406..a5fb0e89e0760b52456730ac0c4be57d5bfe22b9
@@@ -39,13 -39,13 +39,13 @@@ $AUTOMAK
  $MAKE
  
  rm -f zardoz.m4
- $MAKE 2>stderr && { cat stderr >&2; Exit 1; }
 -$MAKE >output 2>&1 && { cat output; exit 1; }
 -cat output
++$MAKE 2>stderr && { cat stderr >&2; exit 1; }
 +cat stderr >&2
  # This error will come from aclocal, not make, so we can be stricter
  # in our grepping of it.
 -grep ' foobar\.m4:1:.*zardoz\.m4.*does not exist' output
 +grep ' foobar\.m4:1:.*zardoz\.m4.*does not exist' stderr
  # No spurious errors, please.
- $FGREP -v ' foobar.m4:1:' stderr | $FGREP 'foobar.m4' && Exit 1
 -$FGREP -v ' foobar.m4:1:' output | $FGREP 'foobar.m4' && exit 1
++$FGREP -v ' foobar.m4:1:' stderr | $FGREP 'foobar.m4' && exit 1
  
  # Try with one less indirection.
  : > foobar.m4
@@@ -54,12 -54,12 +54,12 @@@ $AUTOCON
  ./configure
  $MAKE # Sanity check.
  rm -f foobar.m4
- $MAKE 2>stderr && { cat stderr >&2; Exit 1; }
 -$MAKE >output 2>&1 && { cat output; exit 1; }
 -cat output
++$MAKE 2>stderr && { cat stderr >&2; exit 1; }
 +cat stderr >&2
  # This error will come from aclocal, not make, so we can be stricter
  # in our grepping of it.
 -grep 'foobar\.m4.*does not exist' output
 +grep 'foobar\.m4.*does not exist' stderr
  # No spurious errors, please (ok, this is really paranoid).
- $FGREP 'zardoz.m4' stderr && Exit 1
 -$FGREP 'zardoz.m4' output && exit 1
++$FGREP 'zardoz.m4' stderr && exit 1
  
  :
Simple merge
index a93319cb85ad1fb4c1bb10fd24216fbbac4533be,0000000000000000000000000000000000000000..7d3e7df3082855b60fee0f33e5223acba9cd251b
mode 100755,000000..100755
--- /dev/null
@@@ -1,111 -1,0 +1,111 @@@
- . ./defs || Exit 1
 +#! /bin/sh
 +# Copyright (C) 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 <http://www.gnu.org/licenses/>.
 +
 +# Dependency tracking:
 +#  - we can recover if any .Po file in $(DEPDIR) gets removed;
 +#  - in fact, we can recover if the whole $(DEPDIR) directory gets
 +#    removed.
 +
 +required=cc
++. ./defs || exit 1
 +
 +cat >> configure.ac <<'END'
 +AC_PROG_CC
 +AM_PROG_CC_C_O
 +AC_CONFIG_FILES([sub/Makefile])
 +AC_OUTPUT
 +END
 +
 +cat > Makefile.am <<'END'
 +SUBDIRS = . sub
 +noinst_PROGRAMS = foo
 +foo_SOURCES = main.c foo.c foo.h
 +get-depdir:
 +      @echo '$(DEPDIR)'
 +END
 +
 +cat > main.c <<'END'
 +#include "foo.h"
 +int main (void)
 +{
 +  return foo ();
 +}
 +END
 +cat > foo.c <<'END'
 +#include "foo.h"
 +int foo (void)
 +{
 +  return 0;
 +}
 +END
 +echo 'int foo (void);' > foo.h
 +
 +mkdir sub sub/src
 +cat > sub/Makefile.am <<'END'
 +noinst_PROGRAMS = foo
 +foo_SOURCES = src/main.c src/foo.c src/foo.h
 +END
 +cp main.c foo.c foo.h sub/src
 +
 +$ACLOCAL
 +$AUTOCONF
 +$AUTOMAKE -a
 +
 +for vpath in : false; do
 +
 +  if $vpath; then
 +    srcdir=..
 +    mkdir build
 +    cd build
 +  else
 +    srcdir=.
 +  fi
 +
 +  $srcdir/configure --enable-dependency-tracking
 +  $MAKE
 +  depdir=`$MAKE -s --no-print-directory get-depdir` \
 +    && test -n "$depdir" \
 +    && test -d $depdir \
 +    && test -d sub/src/$depdir \
 +    || fatal_ "cannot find the depdir"
 +
 +  for remove_stuff in \
 +    "rm -f $depdir/main.Po" \
 +    "rm -f sub/src/$depdir/foo.Po" \
 +    "rm -rf $depdir" \
 +    "rm -rf $depdir sub/src/$depdir" \
 +  ; do
 +    $remove_stuff
 +    # We can still use make and order a build, even if we have probably
 +    # lost the dependency information registered in removed the .Po files.
 +    # TODO: maybe we should detect such a situation and force a clean
 +    # TODO: rebuild?
 +    $MAKE
 +    # But if we force a rebuild by hand by cleaning out the existing
 +    # objects, everything works out as expected.
 +    $MAKE clean
 +    $MAKE
 +    test -f $depdir/main.Po
 +    test -f $depdir/foo.Po
 +    test -f sub/src/$depdir/main.Po
 +    test -f sub/src/$depdir/foo.Po
 +  done
 +
 +  cd $srcdir
 +
 +done
 +
 +:
index 223008f04cb22116651580c765002b57bd4d5188,f77f4396a8410be9b4c044501e7a6c13a9e22cb7..18fde7e2995bda0a85acceed9567eb23da243ce5
@@@ -1,5 -1,5 +1,5 @@@
  #! /bin/sh
- # Copyright (C) 1996-2012 Free Software Foundation, Inc.
 -# Copyright (C) 1999-2012 Free Software Foundation, Inc.
++# Copyright (C) 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
index 57abf0ce73f6ad745b369f66faa40f5c0f1d154b,e2404ba6f364d909d55cbd33fa6584aadd69efc4..21f703baa77210da144b4f9c3172c72a46b9f3be
@@@ -1,5 -1,5 +1,5 @@@
  #! /bin/sh
- # Copyright (C) 2002-2012 Free Software Foundation, Inc.
 -# Copyright (C) 1998-2012 Free Software Foundation, Inc.
++# Copyright (C) 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
  # You should have received a copy of the GNU General Public License
  # along with this program.  If not, see <http://www.gnu.org/licenses/>.
  
 -# Test for error for bad syntax.
 +# Dependency tracking in the face of added/removed/renamed files.
 +#  - in-tree build
 +#  - use of subdir objects
  
- . ./defs-static || exit '99'
 -. ./defs || exit 1
 -
 -cat > Makefile.am << 'END'
 -foo = q \
 -
 -bin_SCRIPTS = foo.sh
 -END
 -
 -$ACLOCAL
 -AUTOMAKE_fails -Wnone
 -grep '^Makefile\.am:2:.*blank line following trailing backslash' stderr
 -
 -:
++. ./defs-static || exit 99
 +xdir='sub' vpath='no'
 +. "$am_testauxdir"/depcomp-shuffle.sh
index ea8cbda5a15378ad1905822d05024e7835ace6bf,1bc60f00885839532dfd70e10036b64f841ea8cd..4baf20fa684b1295bd3f601a04befdcffcb16d26
@@@ -1,5 -1,5 +1,5 @@@
  #! /bin/sh
- # Copyright (C) 2010-2012 Free Software Foundation, Inc.
 -# Copyright (C) 2005-2012 Free Software Foundation, Inc.
++# Copyright (C) 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
  # You should have received a copy of the GNU General Public License
  # along with this program.  If not, see <http://www.gnu.org/licenses/>.
  
 -# Make sure comments following trailing backslashes are diagnosed.
 -# Report from Harald Dunkel.
 +# Dependency tracking in the face of added/removed/renamed files.
 +#  - VPATH build
 +#  - no use of subdir objects
  
- . ./defs-static || exit '99'
 -. ./defs || exit 1
 -
 -cat > Makefile.am << 'END'
 -SUBDIRS = foo \
 -# bar
 -
 -END
 -
 -mkdir foo
 -
 -$ACLOCAL
 -AUTOMAKE_fails
 -grep backslash stderr
++. ./defs-static || exit 99
 +xdir='' vpath='yes'
 +. "$am_testauxdir"/depcomp-shuffle.sh
index 3a284db92fe017ea6a46420423e44d329d845e1b,0000000000000000000000000000000000000000..23ce20c64ac82f13b24b4282bc535c15af21a3bb
mode 100755,000000..100755
--- /dev/null
@@@ -1,23 -1,0 +1,23 @@@
- # Copyright (C) 2002-2012 Free Software Foundation, Inc.
 +#! /bin/sh
- . ./defs-static || exit '99'
++# Copyright (C) 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 <http://www.gnu.org/licenses/>.
 +
 +# Dependency tracking in the face of added/removed/renamed files.
 +#  - in-tree build
 +#  - no use of subdir objects
 +
++. ./defs-static || exit 99
 +xdir='' vpath='no'
 +. "$am_testauxdir"/depcomp-shuffle.sh
diff --cc t/depcomp8a.sh
Simple merge
diff --cc t/depcomp8b.sh
Simple merge
diff --cc t/depdist.sh
Simple merge
diff --cc t/depend.sh
Simple merge
diff --cc t/depend4.sh
Simple merge
Simple merge
Simple merge
Simple merge
index 5bef889ee356e2e76ddc23bf614cac8055edd5a3,80254c49a407767530be1ff228617a16b38b5b5e..df5801a1cdb54acf5b6df94bdf1f73a990dcfa79
@@@ -54,12 -54,12 +54,12 @@@ for vpath in false :; d
      cd $distdir
      ./configure
    fi
-   $MAKE 2>stderr && { cat stderr >&2; Exit 1; }
 -  $MAKE >output 2>&1 && { cat output; exit 1; }
 -  cat output
++  $MAKE 2>stderr && { cat stderr >&2; exit 1; }
 +  cat stderr >&2
    # This error comes from automake, not make, so we can be stricter
    # in our grepping of it.
 -  grep 'cannot open.*zardoz\.am' output
 -  grep 'foobar\.am' output && exit 1 # No spurious error, please.
 +  grep 'cannot open.*zardoz\.am' stderr
-   grep 'foobar\.am' stderr && Exit 1 # No spurious error, please.
++  grep 'foobar\.am' stderr && exit 1 # No spurious error, please.
    cd "$ocwd" || fatal_ "cannot chdir back to top-level test directory"
  done
  
index ab491bce7803354937ec4ba11c22e68b4ef32b94,6a2a57de9f8ccf25291b9370d199335614f151cb..08b91fa9ac9a6a063a5382bc911e49b613918504
@@@ -56,12 -56,12 +56,12 @@@ for vpath in false :; d
      cd $distdir
      ./configure
    fi
-   $MAKE 2>stderr && { cat stderr >&2; Exit 1; }
 -  $MAKE >output 2>&1 && { cat output; exit 1; }
 -  cat output
++  $MAKE 2>stderr && { cat stderr >&2; exit 1; }
 +  cat stderr
    # This error will come from automake, not make, so we can be stricter
    # in our grepping of it.
 -  grep 'zardoz\.m4.*does not exist' output
 -  grep 'foobar\.m4' output && exit 1 # No spurious error, please.
 +  grep 'zardoz\.m4.*does not exist' stderr
-   grep 'foobar\.m4' stderr && Exit 1 # No spurious error, please.
++  grep 'foobar\.m4' stderr && exit 1 # No spurious error, please.
    cd "$ocwd" || fatal_ "cannot chdir back to top-level test directory"
  done
  
index b0e1de2393ebfab122616937e2ea30dccd4cae05,4e002e4ddfb15ca2f080c271bbc210f811f4e7f6..79473b03341f64fb5ad3338076ce77cd0faae1dc
@@@ -58,12 -58,12 +58,12 @@@ for vpath in false :; d
      cd $distdir
      ./configure
    fi
-   $MAKE 2>stderr && { cat stderr; Exit 1; }
 -  $MAKE >output 2>&1 && { cat output; exit 1; }
 -  cat output
++  $MAKE 2>stderr && { cat stderr; exit 1; }
 +  cat stderr
    # This error will come from autoconf, not make, so we can be stricter
    # in our grepping of it.
 -  grep 'possibly undefined .*MY_ZARDOZ' output
 -  grep 'MY_FOOBAR' output && exit 1 # No spurious error, please.
 +  grep 'possibly undefined .*MY_ZARDOZ' stderr
-   grep 'MY_FOOBAR' stderr && Exit 1 # No spurious error, please.
++  grep 'MY_FOOBAR' stderr && exit 1 # No spurious error, please.
    cd "$ocwd" || fatal_ "cannot chdir back to top-level test directory"
  done
  
Simple merge
index 88d8d4a7e15b8f5f81965aff430e6c3da12d97cf,0000000000000000000000000000000000000000..1f6cbb0a22dbd7896806933a83d159b5c545ce24
mode 100755,000000..100755
--- /dev/null
@@@ -1,92 -1,0 +1,92 @@@
- . ./defs || Exit 1
 +#! /bin/sh
 +# Copyright (C) 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 <http://www.gnu.org/licenses/>.
 +
 +# We use EXTRA_DIST to distribute stuff *explicitly* from the srcdir.
 +
 +am_create_testdir=empty
++. ./defs || exit 1
 +
 +ocwd=`pwd` || fatal_ "cannot get current working directory"
 +
 +mkdir src
 +cd src
 +
 +cat >> configure.ac <<END
 +AC_INIT([$me], [1.0])
 +AM_INIT_AUTOMAKE
 +AC_CONFIG_FILES([Makefile sub/Makefile])
 +AC_OUTPUT
 +END
 +
 +cat > Makefile.am <<'END'
 +SUBDIRS = sub
 +
 +EXTRA_DIST = \
 +  $(srcdir)/one \
 +  @srcdir@/two \
 +  $(top_srcdir)/three \
 +  @top_srcdir@/four
 +
 +.PHONY: test
 +check-local: test
 +test: distdir
 +      find $(distdir) # For debugging.
 +      test -f $(distdir)/one
 +      test -f $(distdir)/two
 +      test -f $(distdir)/three
 +      test -f $(distdir)/four
 +      test -f $(distdir)/sub/five
 +      test -f $(distdir)/sub/six
 +      test ! -f $(distdir)/five
 +      test ! -f $(distdir)/six
 +      test -f $(distdir)/seven
 +      test -f $(distdir)/eight
 +      test ! -f $(distdir)/sub/seven
 +      test ! -f $(distdir)/sub/eight
 +END
 +
 +mkdir sub
 +cat > sub/Makefile.am <<'END'
 +EXTRA_DIST  = $(srcdir)/five @srcdir@/six
 +EXTRA_DIST += $(top_srcdir)/seven @top_srcdir@/eight
 +END
 +
 +touch one two three four sub/five sub/six seven eight
 +
 +$ACLOCAL
 +$AUTOCONF
 +$AUTOMAKE -a
 +
 +mkdir build
 +cd build
 +../configure
 +$MAKE test
 +$MAKE distcheck
 +cd "$ocwd"
 +
 +mkdir a a/b a/b/c
 +cd a/b/c
 +../../../src/configure
 +$MAKE test
 +cd "$ocwd"
 +
 +mkdir build2
 +cd build2
 +"$ocwd"/src/configure
 +$MAKE test
 +cd "$ocwd"
 +
 +:
index e64d412fa74adccf4a702cb7d22c07aee74795da,0000000000000000000000000000000000000000..5a105234be7778c3c7b85eae52887d021988132f
mode 100755,000000..100755
--- /dev/null
@@@ -1,49 -1,0 +1,49 @@@
- . ./defs || Exit 1
 +#! /bin/sh
 +# Copyright (C) 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 <http://www.gnu.org/licenses/>.
 +
 +# If we distribute a file whose name that starts with $(srcdir),
 +# then the distribution rules should not try to instead distribute
 +# a file with the same name from the builddir.
 +# Currently, this doesn't work (the reasons and details for this
 +# limitation should be explained in depth in comments in file
 +# 'lib/am/distdir.am').
 +
- $MAKE distdir 2>stderr && { cat stderr >&2; Exit 1; }
++. ./defs || exit 1
 +
 +echo AC_OUTPUT >> configure.ac
 +
 +cat > Makefile.am <<'END'
 +EXTRA_DIST = $(srcdir)/filename-that-is-easy-to-grep
 +END
 +
 +$ACLOCAL
 +$AUTOCONF
 +$AUTOMAKE -a
 +
 +mkdir build
 +cd build
 +../configure
 +
 +echo bad > filename-that-is-easy-to-grep
++$MAKE distdir 2>stderr && { cat stderr >&2; exit 1; }
 +cat stderr >&2
 +grep 'filename-that-is-easy-to-grep' stderr
 +
 +echo good > ../filename-that-is-easy-to-grep
 +$MAKE distdir
 +test "`cat $distdir/filename-that-is-easy-to-grep`" = good
 +
 +:
index be214ffcb4c0a04ccb161dfb9f0894570ad30287,11c992c14b43ea58271aabb30677555227a6206f..828199ec778f0e10933353689e9f27e573ed10f9
@@@ -59,9 -59,9 +59,9 @@@ EN
  $AUTOMAKE Makefile
  ./config.status Makefile
  
- $MAKE distcheck 2>stderr && { cat stderr >&2; Exit 1; }
 -$MAKE distcheck >output 2>&1 && { cat output; exit 1; }
 -cat output
 -grep "^configure:.* success='no', sentence='it works :-)'" output
++$MAKE distcheck 2>stderr && { cat stderr >&2; exit 1; }
 +cat stderr >&2
 +grep "^configure:.* success='no', sentence='it works :-)'" stderr
  
  $MAKE distcheck DISTCHECK_CONFIGURE_FLAGS="--enable-success=yes"
  
index 17dfc9cbb7d99d9cff06be498ceb0629bd38a3cd,f5bc15d261f57b4df2df750fdf3ed51b17ec62a8..567dd58c2289bda5deafd1b5322514cb1b2b70f2
@@@ -74,8 -74,8 +74,8 @@@ $MAKE distchec
  
  # ... but not when "make distcheck" is run from the subpackage.
  cd subpkg
- $MAKE distcheck 2>stderr && { cat stderr >&2; Exit 1; }
 -$MAKE distcheck >output 2>&1 && { cat output; exit 1; }
 -cat output
 -grep '^configure:.* dc=KO am_dc=KO' output
++$MAKE distcheck 2>stderr && { cat stderr >&2; exit 1; }
 +cat stderr >&2
 +grep '^configure:.* dc=KO am_dc=KO' stderr
  
  :
index bb6f840a51c298039278199e87bfbda2b299217c,e10b2bafe03411c9550c169122fadda7355a1fbe..fdec9a5c4cdb896b5e573aa9932a282627f6a72e
@@@ -48,8 -47,8 +48,8 @@@ $MAKE distcheck 
    DISTCHECK_CONFIGURE_FLAGS="--enable-success=yes sentence='it works :-)'"
  
  # Sanity check.
- $MAKE distcheck 2>stderr && { cat stderr >&2; Exit 1; }
 -$MAKE distcheck >output 2>&1 && { cat output; exit 1; }
 -cat output
 -grep "^configure:.* success='no', sentence=''" output
++$MAKE distcheck 2>stderr && { cat stderr >&2; exit 1; }
 +cat stderr >&2
 +grep "^configure:.* success='no', sentence=''" stderr
  
  :
Simple merge
index 3eccc4f4700d3032bacc2e8aa299147df9636323,ee177ee8df0e4f5f6acdab8c295c53abfbbfd6fd..7c7352bbb4c4dc3c5bc352c39027b8413b5c04e9
@@@ -63,8 -63,8 +63,8 @@@ cd .
  # For debugging.
  $FGREP 'distcheck-hook' Makefile.in subpkg/Makefile.in
  
- $FGREP 'distcheck-hook' subpkg/Makefile.in && Exit 1
+ $FGREP 'distcheck-hook' subpkg/Makefile.in && exit 1
 -$FGREP '$(MAKE) $(AM_MAKEFLAGS) distcheck-hook' Makefile.in
 +$FGREP '$(MAKE) distcheck-hook' Makefile.in
  grep '^distcheck-hook:' Makefile.in
  
  ./configure
index 6366455d08ffb5727fffb8acaa58e171d1215b75,1eef8720d53aa4ba0ce1c2ff3db648692511dc7f..b2669184a5c09f247bd120ef00e9367a8d7285b0
@@@ -65,9 -65,11 +65,9 @@@ $AUTOMAK
  
  check_no_spurious_error ()
  {
-   $EGREP -i 'mkdir:|:.*(permission|denied)' output && Exit 1
-   grep -i 'autom4te.*\.cache' output && Exit 1
-   : # To placate 'set -e'.
+   $EGREP -i 'mkdir:|:.*(permission|denied)' output && exit 1
 -  # On failure, some make implementations (such as Solaris make) print the
 -  # whole failed recipe on stdout.  The first grep works around this.
 -  grep -v 'rm -rf ' output | grep -i 'autom4te.*\.cache' && exit 1
++  grep -i 'autom4te.*\.cache' output && exit 1
+   : To placate 'set -e'.
  }
  
  ./configure
index 34084df22653c3914757b62bb887827609301c13,50e1057e2494ee60f265081577d9ff739aa1cd26..3c3336c0c08b10f8437f4da80e87edb0715ee1bd
@@@ -59,9 -59,11 +59,9 @@@ $MAKE distcheck # Sanity check
  
  check_no_spurious_error ()
  {
-   $EGREP -i 'mkdir:|:.*(permission|denied)' output && Exit 1
-   grep -i 'autom4te.*\.cache' output && Exit 1
-   : # To placate 'set -e'.
+   $EGREP -i 'mkdir:|:.*(permission|denied)' output && exit 1
 -  # On failure, some make implementations (such as Solaris make) print the
 -  # whole failed recipe on stdout.  The first grep works around this.
 -  grep -v 'rm -rf ' output | grep -i 'autom4te.*\.cache' && exit 1
++  grep -i 'autom4te.*\.cache' output && exit 1
+   : To placate 'set -e'.
  }
  
  # We start to use a new "third-party" macro in a new version
index e3bff09151efa5c9f85981291701f141d9630103,f7a5640f90a975562815454d65d2cf974fb5dc5f..8ebcd95ba8562a8af77ccffa7d53ff30c09b3a31
@@@ -55,7 -55,7 +55,7 @@@ $AUTOCON
  $MAKE
  
  $MAKE distcheck
 -infodir="$(pwd)/_info" $MAKE -e distcheck
 +$MAKE distcheck infodir="$(pwd)"/_info
- test -f _info/dir || Exit 99 # Sanity check.
+ test -f _info/dir || exit 99 # Sanity check.
  
  :
index de8a98468dbb330ebb8aceac2cc2b11e0d1e850c,d888a9972187ba45cbb37f14573ec71c4e55aa9c..a030f90dafa4ab81711942ce78b0f9f5e3d6ffcb
@@@ -49,10 -49,10 +49,10 @@@ $AUTOMAK
  ./configure
  
  # We can build the distribution.
- $MAKE distcheck 2>stderr || { cat stderr >&2; Exit 1; }
 -$MAKE distcheck >output 2>&1 || { cat output; exit 1; }
 -cat output
++$MAKE distcheck 2>stderr || { cat stderr >&2; exit 1; }
 +cat stderr >&2
  # Sanity check: verify that our code has hit a problem removing
  # the distdir, but has recovered from it.
 -grep "rm:.*$destdir" output || fatal_ "expected code path not covered"
 +grep "rm:.*$destdir" stderr || fatal_ "expected code path not covered"
  
  :
index 09fd1900d8c3c86af24e6b176ab981e3f72c6814,ae1da2b923fac94320fc8a25d0bbe5a4b67e3af5..58c9b6e76a1ceb03eafdff8c2abb1984eae825c6
@@@ -54,11 -54,11 +54,11 @@@ $MAKE uninstal
  test -f inst/share/dir
  rm -rf inst
  
- $MAKE distcheck 2>stderr && { cat stderr >&2; Exit 1; }
 -$MAKE distcheck >output 2>&1 && { cat output; exit 1; }
 -cat output
++$MAKE distcheck 2>stderr && { cat stderr >&2; exit 1; }
 +cat stderr >&2
  
 -$FGREP 'ERROR: files left after uninstall:' output
 -grep '/share/dir *$' output
 +grep 'ERROR: files left after uninstall:' stderr
 +grep '/share/dir *$' stderr
  
  # A few trickier corner cases.
  
@@@ -86,11 -86,11 +86,11 @@@ test -f inst/mu/share/info/di
  test -f inst/share/info/more/dir
  rm -rf inst
  
- $MAKE distcheck 2>stderr && { cat stderr >&2; Exit 1; }
 -$MAKE distcheck >output 2>&1 && { cat output; exit 1; }
 -cat output
++$MAKE distcheck 2>stderr && { cat stderr >&2; exit 1; }
 +cat stderr >&2
  
 -$FGREP 'ERROR: files left after uninstall:' output
 -grep '/mu/share/info/dir *$' output
 -grep '/share/info/more/dir *$' output
 +grep 'ERROR: files left after uninstall:' stderr
 +grep '/mu/share/info/dir *$' stderr
 +grep '/share/info/more/dir *$' stderr
  
  :
index ac1420fdde2835ced9c5eb787156d2671c0ee4fc,7def7bf25a03df2973d57f5baa5bd1cb2dcc391c..15693311e4af2cb6669ab9e8b26aaad7280bca7c
@@@ -17,8 -17,7 +17,8 @@@
  # Test to make sure that if an auxfile (here depcomp) is required
  # by a subdir Makefile.am, it is distributed by that Makefile.am.
  
- . ./defs || Exit 1
 +required=cc
+ . ./defs || exit 1
  
  cat >> configure.ac << 'END'
  AC_CONFIG_FILES([subdir/Makefile])
diff --cc t/distcom2.sh
Simple merge
diff --cc t/distcom3.sh
index 8ed0809a4cbe97a19e46f88abf166af6b0c745f1,a2ffe0b0c1da9d089225993e6ddecdd1ce2670f2..d83409efb98e2702e717a0d88cabd771763e3642
@@@ -32,11 -32,11 +32,11 @@@ EN
  $ACLOCAL
  
  # Should not warn about missing README, since it is a target.
- $AUTOMAKE --add-missing --gnu >output 2>&1 || { cat output; Exit 1; }
+ $AUTOMAKE --add-missing --gnu >output 2>&1 || { cat output; exit 1; }
  cat output
- grep README output && Exit 1
+ grep README output && exit 1
  
 -sed -n -e '/^DIST_COMMON =.*\\$/ {
 +sed -n -e '/^am__dist_common =.*\\$/ {
     :loop
     p
     n
diff --cc t/distcom4.sh
Simple merge
diff --cc t/distcom5.sh
index 744039758269463ecedf189ca5e2d8b2b2b13288,0ee2946cce21e2e6b9e20ba2cb1224879389f55a..4d3789d673f3c95c05da9fbc8b38893bad54e106
  # a Makefile in that directory.  distcom4.test performs the same
  # test without Makefile in the directory.
  
- . ./defs || Exit 1
+ . ./defs || exit 1
  
 -extract_distcommon ()
 -{
 -  sed -n -e '/^DIST_COMMON =.*\\$/ {
 -    :loop
 -    p
 -    n
 -    t clear
 -    :clear
 -    s/\\$/\\/
 -    t loop
 -    p
 -    n
 -    }' -e '/^DIST_COMMON =/ p' ${1+"$@"}
 -}
 -
  cat >> configure.ac << 'END'
     AC_CONFIG_FILES([tests/autoconf:tests/wrapper.in],
                     [chmod +x tests/autoconf])
diff --cc t/distdir.sh
index 9f365b7366e5ecb9f69dd6acc8dddbf1baf2bb98,9600746b2c239a83bbc26aca50f6238a0cb0a79b..9d0d6ee91bc75a334375d9d1cfa5cae08258a68d
  # sure *srcdir is properly handled.  Note that using './', as in
  #   EXTRA_DIST = ./joe
  # does not work portably: it fails with HP-UX and Tru64 make.
 -# Also test DISTFILES containing a directory and a file in it,
 -# and repeated directories.
 +# Also test the situation when the lsit of distributed files contains
 +# a directory and a file in it, and repeated directories.
  
- . ./defs || Exit 1
+ . ./defs || exit 1
  
  cat >> configure.ac << 'END'
  AC_OUTPUT
index 04c6b7f35773c849c963a2cb4f07f5e26bb7702f,9f537681f59f2b8156ba6cf884403647f1c48b98..72c7cf3a32c0f1b98921cdab480f53a9d62bcc51
@@@ -59,15 -53,16 +59,15 @@@ $AUTOMAK
  
  ls -l # For debugging.
  
 -# Don't try to use "make -k", because some botched make implementations
 -# (HP-UX, IRIX) might still exit on the first error in this situations.
 -for lnk in $lnk1 $lnk2 $lnka $lnkb; do
 -  echo "EXTRA_DIST = $lnk" > Makefile.am
 -  $AUTOMAKE
 -  ./configure
 -  # Distribution must fail, with a decent error message.
 -  $MAKE distdir >out 2>&1 && { cat out; exit 1; }
 -  cat out
 -  $FGREP $lnk out
 -done
 +# Distribution must fail.
- $MAKE distdir && Exit 1
++$MAKE distdir && exit 1
 +
 +# Names of distributed broken symlinks should be reported in make output.
- $MAKE -k distdir 2>stderr && { cat stderr >&2; Exit 1; }
++$MAKE -k distdir 2>stderr && { cat stderr >&2; exit 1; }
 +cat stderr >&2
 +$FGREP $lnk1 stderr
 +$FGREP $lnk2 stderr
 +$FGREP $lnka stderr
 +$FGREP $lnkb stderr
  
  :
diff --cc t/dollar.sh
index 7f8de16b10376c2823611fd170987bb0505bc540,e62f42b32ce75be8bd3054955d4e09ca5d1cd7c0..214345b96be2a5f400838e8da2f8da31ed4b524c
  # Java people need this.
  # PR/317, reported by Eric Siegerman and Philip Fong.
  
- . ./defs || Exit 1
 -# Require GNU make for this test.  SunOS Make does not support
 -# '$$' in a target or a dependency (it outputs the empty string instead).
 -required=GNUmake
+ . ./defs || exit 1
  
  echo AC_OUTPUT >> configure.ac
  
index ef7c45a2abd5c607c1c02047bef1068a0895ae6b,0000000000000000000000000000000000000000..b6803cc556eff6fe3bc215331271de28f128a8b2
mode 100755,000000..100755
--- /dev/null
@@@ -1,112 -1,0 +1,112 @@@
- . ./defs || Exit 1
 +#! /bin/sh
 +# Copyright (C) 2003-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 <http://www.gnu.org/licenses/>.
 +
 +# Check that double colon rules work.
 +# This test not only checks that Automake do not mangle double-colon rules
 +# seen in input Makefile.am, but also that GNU make support of double-colon
 +# rules is as reliable and well-working as we expect and need.
 +
++. ./defs || exit 1
 +
 +echo AC_OUTPUT >> configure.ac
 +
 +cat > Makefile.am <<'END'
 +all-local:
 +      @echo Please select an explicit target; exit 1
 +
 +# No space after 'a'.
 +a:: b
 +      echo rule1 >> $@
 +# Deliberate space after 'a'.
 +a :: c
 +      echo rule2 >> $@
 +
 +# Overlapping rules should work as well
 +a2 :: b2
 +      echo rule21 >> $@
 +a2 :: c2
 +      echo rule22 >> $@
 +a2:: b2 c2
 +      echo rule23 >> $@
 +b2 c2:
 +      touch $@
 +END
 +
 +$ACLOCAL
 +$AUTOCONF
 +$AUTOMAKE
 +
 +grep '::' Makefile.in # For debugging.
 +test $(grep -c '^a *:: *b *$' Makefile.in) -eq 1
 +test $(grep -c '^a *:: *c *$' Makefile.in) -eq 1
 +test $(grep -c '^a2 *:: *b2 *$' Makefile.in) -eq 1
 +test $(grep -c '^a2 *:: *c2 *$' Makefile.in) -eq 1
 +test $(grep -c '^a2 *:: *b2  *c2 *$' Makefile.in) -eq 1
 +
 +./configure
 +
 +# Non-overlapping double-colon rules.
 +
 +touch b c
 +$sleep
 +: > a
 +$MAKE a
 +test ! -s a
 +$sleep
 +touch b
 +$MAKE a
 +test "$(cat a)" = rule1
 +: > a
 +$sleep
 +touch c
 +$MAKE a
 +test "$(cat a)" = rule2
 +
 +: > a
 +$sleep
 +touch b c
 +$MAKE a
 +test "$(sort a)" = "rule1${nl}rule2"
 +
 +rm -f a b c
 +
 +# Overlapping double-colon rules.
 +
 +$MAKE a2
 +test -f a2
 +test -f b2
 +test -f c2
 +
 +: > a2
 +$MAKE a2
 +test ! -s a2
 +$sleep
 +touch b2
 +$MAKE a2
 +test "$(sort a2)" = "rule21${nl}rule23"
 +: > a2
 +$sleep
 +touch c2
 +$MAKE a2
 +test "$(sort a2)" = "rule22${nl}rule23"
 +
 +: > a2
 +$sleep
 +touch b2 c2
 +$MAKE a2
 +test "$(sort a2)" = "rule21${nl}rule22${nl}rule23"
 +
 +:
Simple merge
index 87f534848ee1d5029c0ff5f63d473abec2340a77,1233f4097f099ee043c221ac2b16f43aafda31f9..3e5b3f400a818c4386e6528b26bf299e793f1eb5
  # You should have received a copy of the GNU General Public License
  # along with this program.  If not, see <http://www.gnu.org/licenses/>.
  
 -# Test to make sure empty _SOURCES works.
 -# From Paul Berrevoets.
 +# A test for missing _SOURCES variable.  Also test to make sure empty
 +# _SOURCES suppresses assumption about default name.
  
- . ./defs || Exit 1
+ . ./defs || exit 1
  
 +plan_ 5
 +
  cat >> configure.ac << 'END'
  AC_PROG_CC
 -AC_SUBST(ZOO_OBJ)
 +AC_SUBST([zoo_obj])
  END
  
  cat > Makefile.am << 'END'
index d47d22fb373c6fb60af2cbd707dde727ffad8e12,0000000000000000000000000000000000000000..bc396b6d7c1f3ad8d4c1bd73763780d3f0fccc76
mode 100755,000000..100755
--- /dev/null
@@@ -1,70 -1,0 +1,70 @@@
- . ./defs || Exit 1
 +#! /bin/sh
 +# Copyright (C) 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 <http://www.gnu.org/licenses/>.
 +
 +# Test Automake-provided internal macro 'am__ensure_dir_exists'.
 +
 +am_create_testdir=empty
++. ./defs || exit 1
 +
 +cp "$am_amdir"/header-vars.am . \
 +  || fatal_ "fetching makefile fragment headers-vars.am"
 +
 +# Filter out Automake comments and things that would need configure
 +# substitutions.
 +LC_ALL=C $EGREP -v '(^##|=.*@[a-zA-Z0-9_]+@)' header-vars.am > defn.mk
 +rm -f header-vars.am
 +
 +cat > Makefile << 'END'
 +include ./defn.mk
 +
 +files = x/1 x/2 x/3
 +
 +all: $(files)
 +.PHONY: all
 +
 +sanity-check:
 +      $(warning $(call am__ensure_dir_exists,x))
 +      $(if $(filter $(call am__ensure_dir_exists,x),:MKDIR_P:),, \
 +             $(error am__ensure_dir_exists does not contain $$(MKDIR_P)))
 +.PHONY: sanity-check
 +
 +$(files):
 +      $(call am__ensure_dir_exists,x)
 +      echo dummy > $@
 +END
 +
 +# Sanity check.
 +$MAKE sanity-check MKDIR_P=:MKDIR_P:
 +
 +# Basic usage.
 +$MAKE MKDIR_P='mkdir -p'
 +test -f x/1
 +test -f x/2
 +test -f x/3
 +
 +# Mkdir is not called uselessly.
 +rm -rf x
 +mkdir x
 +$MAKE MKDIR_P=false
 +
 +# Mkdir is  not called too many times.
 +rm -rf x
 +$MAKE MKDIR_P=mkdir
 +test -f x/1
 +test -f x/2
 +test -f x/3
 +
 +:
diff --cc t/exeext.sh
index 5f4395739e6ce526cc05d4d33dc9e8ef80cbeb0e,1eb42564c1d4e0a1fecdadf647e700e5dede6022..409ac755b37f494fcbc1c2c46f2199a22e70bdbf
@@@ -69,7 -69,7 +69,7 @@@ grep 'maude3__EXEEXT__OBJECTS' Makefile
  
  ./configure
  
- $MAKE EXEEXT=.foo print > stdout || { cat stdout; Exit 1; }
 -EXEEXT=.foo $MAKE -e print > stdout
++$MAKE EXEEXT=.foo print > stdout || { cat stdout; exit 1; }
  cat stdout
  
  grep '1BEG: maude.foo mt.foo :END1' stdout
@@@ -79,7 -79,7 +79,7 @@@ grep '4BEG: rmt.foo :END4' stdou
  
  ./configure revert=yes
  
- $MAKE EXEEXT=.foo print > stdout || { cat stdout; Exit 1; }
 -EXEEXT=.foo $MAKE -e print > stdout
++$MAKE EXEEXT=.foo print > stdout || { cat stdout; exit 1; }
  cat stdout
  
  grep '1BEG: maude.foo :END1' stdout
diff --cc t/exeext4.sh
index c69f656e174724638d9159fe9c6b6b4951690cd1,6d8bc88ead6c8d8d65bd528bc780c150a704bc50..acb16cc238ab7c88b7a3153b8d2768949548797f
@@@ -17,8 -17,8 +17,8 @@@
  # Make sure $(EXEEXT) is appended to programs and to tests that are
  # programs, but not to @substitutions@.
  
 -# For gen-testsuite-part: ==> try-with-serial-tests <==
 +am_serial_tests=yes
- . ./defs || Exit 1
+ . ./defs || exit 1
  
  cat >> configure.ac << 'END'
  AM_CONDITIONAL([COND], [test -n "$cond"])
diff --cc t/exsource.sh
Simple merge
diff --cc t/ext.sh
index 72ff211e88219fb87f0ac82f3738a01bdcc0e16b,a69fe8b4a5d1b2d57737210fd613f459610fa663..1a198c12d52ca9d9b24679d4f3b63aba446461e7
+++ b/t/ext.sh
@@@ -34,11 -34,10 +34,11 @@@ EN
  $ACLOCAL
  $AUTOMAKE
  
 +$FGREP '%.$(OBJEXT)' Makefile.in  # For debugging.
 +
  for ext in f for f90 f95 F F90 F95 r m mm upc; do
-    grep "%.*: %$ext" Makefile.in && Exit 1
 -   grep "^\.$ext\.o:" Makefile.in
 -   grep "^$ext\.o:" Makefile.in && exit 1
 -   : For shells with busted 'set -e'.
++   grep "%.*: %$ext" Makefile.in && exit 1
 +   grep "^%\.\$(OBJEXT): %\.$ext$" Makefile.in
  done
  
  :
diff --cc t/ext2.sh
Simple merge
diff --cc t/extra10.sh
index 27eb1ed7c6ec4a72ee38b6a88d1c3e70d678ff92,de82422587f13d205e23eb6fe65b3b7dab94a5d3..808d3dda266d1911497b9b20092d7dfbb2e4fccd
@@@ -19,7 -19,8 +19,7 @@@
  # See also sister test 'extra11.test', that check a similar usage
  # with the involvement of the $(wildcard) GNU make builtin.
  
- . ./defs || Exit 1
 -required=GNUmake
+ . ./defs || exit 1
  
  echo AC_OUTPUT >> configure.ac
  
diff --cc t/extra11.sh
index b97000d437b168eb0041d11d3566a5a0dd938f2a,f5319c61b18e16e7cc32f94e06219bba17e98e2a..3f97e6bd66864f789c4ac9190674db9a9eb4b338
@@@ -17,7 -17,8 +17,7 @@@
  # Check for more complex usage of wildcards in EXTRA_DIST.
  # Suggested by observations from Braden McDaniel.
  
- . ./defs || Exit 1
 -required=GNUmake
+ . ./defs || exit 1
  
  echo AC_OUTPUT >> configure.ac
  
diff --cc t/extra12.sh
index 0745850d81a892a971c60c91b0c7925f4e0cf99d,a2a797b0d3e19a91bd90240dbbcb368ca631abf9..67fa1fe4e9de6c6464d72543942f57402f544741
@@@ -18,7 -18,8 +18,7 @@@
  # $srcdir != $builddir, if properly declared.
  # Suggested by observations from Braden McDaniel.
  
- . ./defs || Exit 1
 -required=GNUmake
+ . ./defs || exit 1
  
  echo AC_OUTPUT >> configure.ac
  
diff --cc t/fort2.sh
index d7348ed555169a1feaf150aa96dc56c8f1fff13d,cb93e79472c860b6a1891921296b4d289fd26bf2..510938ca1ef037ce63678bcf3165de42fc95fe9f
@@@ -19,8 -19,7 +19,8 @@@
  
  # Cf. fort1.test and link_f90_only.test.
  
- . ./defs || Exit 1
 +required=gfortran # Required only in order to run ./configure.
+ . ./defs || exit 1
  
  mkdir sub
  
@@@ -44,49 -41,22 +44,49 @@@ EN
  
  $ACLOCAL
  $AUTOMAKE
- grep '.\$(LINK)'       Makefile.in && Exit 1
 -# The following tests aren't fool-proof, but they don't
 -# need a Fortran compiler.
+ grep '.\$(LINK)'       Makefile.in && exit 1
  grep '.\$(FCLINK)'     Makefile.in
  grep '.\$(FCCOMPILE)'  Makefile.in > stdout
  cat stdout
- grep -v '\$(FCFLAGS_f' stdout && Exit 1
- grep '.\$(FC.*\$(FCFLAGS_blabla' Makefile.in && Exit 1
+ grep -v '\$(FCFLAGS_f' stdout && exit 1
+ grep '.\$(FC.*\$(FCFLAGS_blabla' Makefile.in && exit 1
 -# Notice the TAB:
 -grep '^[      ].*\$(FC.*\$(FCFLAGS_f90).*\.f90' Makefile.in
 -grep '^[      ].*\$(FC.*\$(FCFLAGS_f95).*\.f95' Makefile.in
 -grep '^[      ].*\$(FC.*\$(FCFLAGS_f03).*\.f03' Makefile.in
 -grep '^[      ].*\$(FC.*\$(FCFLAGS_f08).*\.f08' Makefile.in
 -grep '^[      ].*\$(FC.*\$(FCFLAGS_f90).*\.f95' Makefile.in && exit 1
 -grep '^[      ].*\$(FC.*\$(FCFLAGS_f95).*\.f90' Makefile.in && exit 1
 -grep '^[      ].*\$(FC.*\$(FCFLAGS_f90).*\.f03' Makefile.in && exit 1
 -grep '^[      ].*\$(FC.*\$(FCFLAGS_f08).*\.f90' Makefile.in && exit 1
 +
 +sed '/^AC_FC_SRCEXT.*blabla/d' configure.ac >t
 +mv -f t configure.ac
 +
 +rm -rf autom4te*.cache
 +$ACLOCAL
 +$AUTOMAKE
 +$AUTOCONF
 +
 +./configure
 +
 +touch hello.f90 foo.f95 sub/bar.f95 hi.f03 sub/howdy.f03 greets.f08 \
 +      sub/bonjour.f08 bye.f95 sub/baz.f90
 +
 +$MAKE -n FC=fake-fc \
 +  FCFLAGS_f90=--@90 FCFLAGS_f95=--@95 FCFLAGS_f03=--@03 FCFLAGS_f08=--@08 \
-   > stdout || { cat stdout; Exit 1; }
++  > stdout || { cat stdout; exit 1; }
 +cat stdout
 +# To make it easier to have  stricter grepping below.
 +sed -e 's/[   ][      ]*/  /g' -e 's/^/ /' -e 's/$/ /' stdout > out
 +cat out
 +
 +grep ' fake-fc .* --@90 .* hello\.f90 ' out
 +grep ' fake-fc .* --@95 .* foo\.f95 ' out
 +grep ' fake-fc .* --@95 .* sub/bar\.f95 ' out
 +grep ' fake-fc .* --@03 .* hi\.f03 ' out
 +grep ' fake-fc .* --@03 .* sub/howdy\.f03 ' out
 +grep ' fake-fc .* --@08 .* greets\.f08 ' out
 +grep ' fake-fc .* --@08 .* sub/bonjour\.f08 ' out
 +grep ' fake-fc .* --gby .* --@95 .* bye\.f95 ' out
 +grep ' fake-fc .* --gby .* --@90 .* sub/baz\.f90 ' out
 +
 +test `grep -c '.*--gby.*\.f' out` -eq 2
 +
- $EGREP 'fake-fc.*--@(95|03|08).*\.f90' out && Exit 1
- $EGREP 'fake-fc.*--@(90|03|08).*\.f95' out && Exit 1
- $EGREP 'fake-fc.*--@(90|95|08).*\.f03' out && Exit 1
- $EGREP 'fake-fc.*--@(95|95|03).*\.f08' out && Exit 1
++$EGREP 'fake-fc.*--@(95|03|08).*\.f90' out && exit 1
++$EGREP 'fake-fc.*--@(90|03|08).*\.f95' out && exit 1
++$EGREP 'fake-fc.*--@(90|95|08).*\.f03' out && exit 1
++$EGREP 'fake-fc.*--@(95|95|03).*\.f08' out && exit 1
  
  :
diff --cc t/fort4.sh
Simple merge
diff --cc t/fort5.sh
Simple merge
diff --cc t/gcj.sh
index cad90b7374a4ee9fad38b0960dd3bb22dab469ff,d069ec7617695138840432b5f5dc6c7f0585c13a..849302413f881a86a67dcf3a10f9b829db475c94
+++ b/t/gcj.sh
  
  # Test of compiled java.
  
- . ./defs || Exit 1
 +required='gcc gcj'
+ . ./defs || exit 1
  
  cat >> configure.ac << 'END'
 -_AM_DEPENDENCIES([GCJ])
 -AC_SUBST([GCJ])
 +# FIXME: AM_PROG_GCJ should cause OBJEXT and EXEEXT to be set, but
 +# FIXME: it currently does not.  See also xfailing test 'gcj6.sh'.
 +AC_PROG_CC
 +AM_PROG_GCJ
 +AC_OUTPUT
  END
  
  cat > Makefile.am << 'END'
diff --cc t/gmake-vars.sh
index 0c4012b7df1b016c0d5b6dd3a0ea3a8a678c9ef3,0000000000000000000000000000000000000000..0691ae07e87baea6b0829c5d9c4c9914046849e1
mode 100755,000000..100755
--- /dev/null
@@@ -1,85 -1,0 +1,85 @@@
- . ./defs || Exit 1
 +#! /bin/sh
 +# Copyright (C) 2002-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 <http://www.gnu.org/licenses/>.
 +
 +# Check that Automake does not warns about nested variables expansion,
 +# variables with non-POSIX names, or GNU make function calls.
 +
++. ./defs || exit 1
 +
 +cat > Makefile.am <<'END'
 +define get-libname
 +$(addprefix lib, $(1))
 +endef
 +
 +v0 = $(shell LC_ALL=C && export LC_ALL && echo foo* bar*)
 +v1 = $(sort $(wildcard foo* bar*))
 +v2 = $(call get-libname, foo)
 +v3 = sub/$(addsuffix .a, ${v2})
 +v4 = $(v3)
 +v4 += $(notdir ${v3})
 +
 +x = 1
 +mu1 = okey-dokey
 +bla = $(mu$x)
 +bli = $(mu$(x))
 +blo = $(mu${x})
 +blu = $(mu1)
 +
 +bar$(x) = 6
 +baz${x} = 7
 +zap$x = 8
 +
 +.a^very-weird!var@name%accepted;by,gnu/make = wow
 +
 +.PHONY: do/test my/prereq
 +my/prereq:
 +      @: Do nothing.
 +do/test: my/prereq
 +      : \
 +        && test '$(v0)' = 'foo.sh bar.sh bar.txt' \
 +        && test '$(v1)' = 'bar.sh bar.txt foo.sh' \
 +        && test $(v3) = sub/libfoo.a \
 +        && test '$(v4)' = 'sub/libfoo.a libfoo.a' \
 +        && test $(bla) = okey-dokey \
 +        && test $(bli) = okey-dokey \
 +        && test $(blo) = okey-dokey \
 +        && test $(blu) = okey-dokey \
 +        && test $(bar1) = 6 \
 +        && test $(baz1) = 7 \
 +        && test $(zap1) = 8 \
 +        && test $(.a^very-weird!var@name%accepted;by,gnu/make) = wow \
 +## See automake bug#9587 .
 +        && test '$(@F)' = 'test' \
 +        && test '$(@D)' = 'do' \
 +        && test '$(<F)' = 'prereq' \
 +        && test '$(<D)' = 'my'
 +END
 +
 +echo AC_OUTPUT >> configure.ac
 +
 +$ACLOCAL
 +AUTOMAKE_run
 +test ! -s stderr
 +
 +: > foo.sh
 +: > bar.sh
 +: > bar.txt
 +
 +$AUTOCONF
 +./configure
 +$MAKE 'do/test'
 +
 +:
diff --cc t/gnits2.sh
index e27a87e710eaca33093462e9c304c3bb6472fea5,bf8ec34b430df410db74feaf9247d65957007731..6e4e1a4b39f10be2c99990d39a5e4f4b5caf5e90
@@@ -107,7 -107,7 +107,7 @@@ cd buil
  ../configure "--prefix=$(pwd)/../inst-dir" --program-prefix=p
  $MAKE all
  $MAKE test-install
- $MAKE -k installcheck 2>stderr && { cat stderr >&2; Exit 1; }
 -$MAKE -k installcheck 2>stderr || : # Never trust the exit status of make -k.
++$MAKE -k installcheck 2>stderr && { cat stderr >&2; exit 1; }
  cat stderr >&2
  $MAKE grep-stderr
  
diff --cc t/gnits3.sh
index 544331d7a292b1beba008231609e85bd449746fd,0b67253ef7b0dc0dbcbccf8831aec7ac861f1731..b3a885e421b9ca5372fbd65a87cc02bc4eb69843
@@@ -86,8 -86,8 +86,8 @@@ cd buil
  ../configure "--prefix=$(pwd)/../inst-dir" --program-prefix=p
  $MAKE
  $MAKE install
- $MAKE installcheck && Exit 1
- $MAKE -k installcheck 2>stderr && { cat stderr >&2; Exit 1; }
+ $MAKE installcheck && exit 1
 -$MAKE -k installcheck 2>stderr || : # Never trust the exit status of make -k.
++$MAKE -k installcheck 2>stderr && { cat stderr >&2; exit 1; }
  cat stderr >&2
  $MAKE grep-stderr
  
diff --cc t/gnumake.sh
index dd2fe378fda193f394125ff9b8f6ee2f98b4be3d,ed660a2ff7f8d34ce23de5d4edbc3ade7ba643c6..7b1fbfe57c1a65200c618ef8765ea17f46ea126f
@@@ -17,7 -17,8 +17,7 @@@
  # Automake should not assume that make files are called Makefile.
  # Report from Braden McDaniel.
  
- . ./defs || Exit 1
 -required=GNUmake
+ . ./defs || exit 1
  
  cat >> configure.ac << 'END'
  AC_CONFIG_FILES([sub/GNUmakefile])
Simple merge
diff --cc t/insh2.sh
Simple merge
index f39b3c18b0461d7b418d1a3a998a6256dbb2c5e9,f9c651c1875a4e2f386934d35993028e6225d14d..5d2d77685de6a73758376e89e5f88f65fa07594f
@@@ -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"
 -$MAKE -e install DESTDIR="$destdir"
 +xMAKE install DESTDIR="$destdir"
  test ! -d "$instdir"
  test ! -d "$destdir"
- xMAKE uninstall > stdout || { cat stdout; Exit 1; }
 -$MAKE -e uninstall > stdout || { cat stdout; exit 1; }
++xMAKE uninstall > stdout || { cat stdout; exit 1; }
  cat stdout
- grep 'rm -f' stdout && Exit 1
+ grep 'rm -f' stdout && exit 1
 -$MAKE -e uninstall DESTDIR="$destdir"
 +xMAKE uninstall DESTDIR="$destdir"
  
  :
index b7f04bf1da9bd5de6b5ab250d27d14b2ff8d4776,0c2fa1ebe3c9cca8f12b8712303246f3814f3898..0bcf58428edc7c770a29115d8d51dd9b269fff47
@@@ -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"
 -$MAKE -e install DESTDIR="$destdir"
 +xMAKE install DESTDIR="$destdir"
  test ! -d "$instdir"
  test ! -d "$destdir"
- xMAKE uninstall > stdout || { cat stdout; Exit 1; }
 -$MAKE -e uninstall > stdout || { cat stdout; exit 1; }
++xMAKE uninstall > stdout || { cat stdout; exit 1; }
  cat stdout
- grep 'rm -f' stdout && Exit 1
+ grep 'rm -f' stdout && exit 1
 -$MAKE -e uninstall DESTDIR="$destdir"
 +xMAKE uninstall DESTDIR="$destdir"
  
  :
index 13615905b71c7341ebf9a8a7bd1a34207ea70269,dcd03624e0501e7a03e7643dc296e64fbdf1d5de..430fb74e0a30fb5ddf6c514e76fb33de30efebee
@@@ -68,20 -69,20 +68,20 @@@ 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"
 -$MAKE -e install DESTDIR="$destdir"
 +xMAKE install DESTDIR="$destdir"
  test ! -d "$instdir"
  test ! -d "$destdir"
- xMAKE uninstall > stdout || { cat stdout; Exit 1; }
 -$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
- xMAKE uninstall DESTDIR="$destdir" > stdout || { cat stdout; Exit 1; }
+ grep 'rm'' ' stdout && exit 1
 -$MAKE -e uninstall DESTDIR="$destdir" > stdout || { cat stdout; exit 1; }
++xMAKE uninstall DESTDIR="$destdir" > stdout || { cat stdout; exit 1; }
  cat stdout
  # Creative quoting below to please maintainer-check.
- grep 'rm'' ' stdout && Exit 1
+ grep 'rm'' ' stdout && exit 1
  
  :
index 45b341c33660e056a724674c89201cea1a629a65,53572644b089115d61416b3b7e2202ccda83475f..136e1e37c76a21055677164fc8c06fcb0888756a
@@@ -106,16 -106,16 +106,16 @@@ doinst (
  
  ./configure --prefix="$cwd/inst"
  doinst
- test ! -d inst || { find inst; Exit 1; }
+ test ! -d 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 ! -d 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
  
  :
index 6523c34a57a9ba4734ac924da92f25e15b3fd68f,7306c5c94af733f9d68d03ef07eb9705eb901736..4eb1f695c155507e5b01ba4e0d2519846d14652f
@@@ -67,21 -68,20 +67,21 @@@ 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"
 -$MAKE -e install DESTDIR="$destdir"
 +xMAKE install DESTDIR="$destdir"
  test ! -d "$instdir"
  test ! -d "$destdir"
- xMAKE uninstall > stdout || { cat stdout; Exit 1; }
 -$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
- xMAKE uninstall DESTDIR="$destdir" > stdout || { cat stdout; Exit 1; }
+ grep 'rm'' ' stdout && exit 1
 -$MAKE -e uninstall DESTDIR="$destdir" > stdout || { cat stdout; exit 1; }
++xMAKE uninstall DESTDIR="$destdir" > stdout || { cat stdout; exit 1; }
  cat stdout
  # Creative quoting below to please maintainer-check.
- grep 'rm'' ' stdout && Exit 1
+ grep 'rm'' ' stdout && exit 1
  
  :
index 55e23c253c10f030b135127e7b698bde43567e4f,3d39bd8e06f7d00ecd013123bf8b3cd29cafd558..4fed80474815496d728945c3349aeef2a097699e
@@@ -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"
 -$MAKE -e install DESTDIR="$destdir"
 +xMAKE install DESTDIR="$destdir"
  test ! -d "$instdir"
  test ! -d "$destdir"
- xMAKE uninstall > stdout || { cat stdout; Exit 1; }
 -$MAKE -e uninstall > stdout || { cat stdout; exit 1; }
++xMAKE uninstall > stdout || { cat stdout; exit 1; }
  cat stdout
- grep 'rm -f' stdout && Exit 1
+ grep 'rm -f' stdout && exit 1
 -$MAKE -e uninstall DESTDIR="$destdir"
 +xMAKE uninstall DESTDIR="$destdir"
  
  :
index 214e330f7a6598e9ddc0587ad39b497e6d25e456,b15ecaac845c48d719d89cc986a744259a9246bc..146fa52384cb2096657e01b0d9e6193dd370b3c2
@@@ -56,16 -56,17 +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"
 -$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"
- xMAKE uninstall > stdout || { cat stdout; Exit 1; }
 -$MAKE -e uninstall > stdout || { cat stdout; exit 1; }
++xMAKE uninstall > stdout || { cat stdout; exit 1; }
  cat stdout
- grep 'rm -f' stdout && Exit 1
+ grep 'rm -f' stdout && exit 1
 -$MAKE -e uninstall DESTDIR="$destdir"
 +xMAKE uninstall DESTDIR="$destdir"
  
  :
diff --cc t/instdir.sh
index c30ce92d3c7e2700fc1146a7ff15713939fbac9e,f9d8e641d1cc98946ea4c6ad32bb71986f78ea05..f35dcbf44b5806195d50639bfb31354978b79595
@@@ -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"
 -$MAKE -e install DESTDIR="$destdir"
 +xMAKE install DESTDIR="$destdir"
  test ! -d "$instdir"
  test ! -d "$destdir"
- xMAKE uninstall > stdout || { cat stdout; Exit 1; }
 -$MAKE -e uninstall > stdout || { cat stdout; exit 1; }
++xMAKE uninstall > stdout || { cat stdout; exit 1; }
  cat stdout
- grep 'rm -f' stdout && Exit 1
+ grep 'rm -f' stdout && exit 1
 -$MAKE -e uninstall DESTDIR="$destdir"
 +xMAKE uninstall DESTDIR="$destdir"
  
  :
diff --cc t/instdir2.sh
index c84d256fb7fc00d93dfd1ecbd64ce1fd57be6685,27314814dc41ffa83a40066cb50140496b543370..2393026bc387d7d780dc57284a5c0a66c998c353
@@@ -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"
 -$MAKE -e install DESTDIR="$destdir"
 +xMAKE install DESTDIR="$destdir"
  test ! -d "$instdir"
  test ! -d "$destdir"
- xMAKE uninstall > stdout || { cat stdout; Exit 1; }
 -$MAKE -e uninstall > stdout || { cat stdout; exit 1; }
++xMAKE uninstall > stdout || { cat stdout; exit 1; }
  cat stdout
- grep 'rm -f' stdout && Exit 1
+ grep 'rm -f' stdout && exit 1
 -$MAKE -e uninstall DESTDIR="$destdir"
 +xMAKE uninstall DESTDIR="$destdir"
  
  :
diff --cc t/insthook.sh
Simple merge
Simple merge
Simple merge
diff --cc t/instmany.sh
Simple merge
diff --cc t/instspc.tap
Simple merge
diff --cc t/internals.tap
index 2c2fccda699c4eb8a7c925b911aeb191fa2c1d50,0000000000000000000000000000000000000000..aaf6b9399d083853ba79f5bd6c30ac4eed4e34dd
mode 100755,000000..100755
--- /dev/null
@@@ -1,182 -1,0 +1,182 @@@
- . ./defs || Exit 1
 +#! /bin/sh
 +# Copyright (C) 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 <http://www.gnu.org/licenses/>.
 +
 +# Test some generic Automake-provided internal macros and make functions.
 +
 +am_create_testdir=empty
++. ./defs || exit 1
 +
 +plan_ 8
 +
 +cp "$am_amdir"/header-vars.am . \
 +  || fatal_ "fetching makefile fragment headers-vars.am"
 +
 +# Filter out Automake comments and things that would need configure
 +# substitutions.
 +LC_ALL=C $EGREP -v '(^##|=.*@[a-zA-Z0-9_]+@)' header-vars.am > defn.mk
 +rm -f header-vars.am
 +
 +# WARNING: there are a lot of embedded tabs in this makefile.
 +# DO NOT "NORMALIZE" THEM TO SPACES!
 +cat > Makefile << 'END'
 +include ./defn.mk
 +
 +lower = abcdefghijklmnopqrstuvwxyz
 +upper = ABCDEFGHIJKLMNOPQRSTUVWXYZ
 +digits = 0123456789
 +comma = ,
 +dollar = $$
 +bslash = \\
 +
 +default:
 +      @echo Please select an explicit test; exit 1
 +.PHONY: default
 +
 +.PHONY: test-strip-firstword
 +test-strip-firstword:
 +      test '$(call am__strip_firstword,)'                = ''
 +      test '$(call am__strip_firstword,1)'               = ''
 +      test '$(call am__strip_firstword,1 1)'             = '1'
 +      test '$(call am__strip_firstword,1 2)'             = '2'
 +      test '$(call am__strip_firstword,1 2 3 4 5 6 7 8)' = '2 3 4 5 6 7 8'
 +      test '$(call am__strip_firstword,  1      2     )' = '2'
 +
 +.PHONY: test-strip-lastword
 +test-strip-lastword:
 +      test '$(call am__strip_lastword,)'                 = ''
 +      test '$(call am__strip_lastword,1)'                = ''
 +      test '$(call am__strip_lastword,1 1)'              = '1'
 +      test '$(call am__strip_lastword,1 2)'              = '1'
 +      test '$(call am__strip_lastword,1 2 3 4 5 6 7 8)'  = '1 2 3 4 5 6 7'
 +      test '$(call am__strip_lastword,  1       2     )' = '1'
 +
 +.PHONY: test-uniq
 +test-uniq:
 +      test '$(call am__uniq,)'                = ''
 +      test '$(call am__uniq,1)'               = '1'
 +      test '$(call am__uniq,1 1)'             = '1'
 +      test '$(call am__uniq,1 2)'             = '1 2'
 +      test '$(call am__uniq,2 1)'             = '2 1'
 +      test '$(call am__uniq,1 2 3)'           = '1 2 3'
 +      test '$(call am__uniq,2 3 1)'           = '2 3 1'
 +      test '$(call am__uniq,1 1 1)'           = '1'
 +      test '$(call am__uniq,1 2 1)'           = '1 2'
 +      test '$(call am__uniq,2 1 1)'           = '2 1'
 +      test '$(call am__uniq,2 1 1)'           = '2 1'
 +      test '$(call am__uniq,2 2 1)'           = '2 1'
 +      test '$(call am__uniq,1 1 1 3 1 1 1)'   = '1 3'
 +      test '$(call am__uniq,3 1 1 4 1 4 1 1)' = '3 1 4'
 +      test '$(call am__uniq,  1   3   1  )'   = '1 3'
 +
 +.PHONY: test-strip-suffixes
 +test-strip-suffixes:
 +      test '$(call am__strip_suffixes,,)'                 = ''
 +      test '$(call am__strip_suffixes,          ,)'       = ''
 +      test '$(call am__strip_suffixes,,         )'        = ''
 +      test '$(call am__strip_suffixes,        ,       )'  = ''
 +      test '$(call am__strip_suffixes,x,)'                = ''
 +      test '$(call am__strip_suffixes,x y,      )'        = ''
 +      test '$(call am__strip_suffixes,,x y)'              = 'x y'
 +      test '$(call am__strip_suffixes,         ,x y)'     = 'x y'
 +      test '$(call am__strip_suffixes,.c,foo.c)'          = 'foo'
 +      test '$(call am__strip_suffixes,.foo,a.foo b.foo)'  = 'a b'
 +      test '$(call am__strip_suffixes, x y, ax ay ax)'    = 'a a a'
 +      test '$(call am__strip_suffixes,x,ax)'              = 'a'
 +      test '$(call am__strip_suffixes,x,xa)'              = 'xa'
 +      test '$(call am__strip_suffixes,x,xx)'              = 'x'
 +      test '$(call am__strip_suffixes,x,xux)'             = 'xu'
 +      test '$(call am__strip_suffixes, .c .c++, \
 +              foo.c bar.c++ baz.cxx zap.c)' = 'foo bar baz.cxx zap'
 +      test '$(call am__strip_suffixes, .a .b, \
 +              1.a.a 2.a.b 3.b.a 4.b.b)' = '1.a 2.a 3.b 4.b'
 +      # Corner cases: the *first* matched suffix is stripped
 +      test '$(call am__strip_suffixes,.a .b,x.a.a)' = 'x.a'
 +      test '$(call am__strip_suffixes,.a .b,x.a.b)' = 'x.a'
 +      test '$(call am__strip_suffixes,.a .b,x.b.a)' = 'x.b'
 +      test '$(call am__strip_suffixes,.a .b,x.b.b)' = 'x.b'
 +      test '$(call am__strip_suffixes, .a .b.a, foo.b.a bar.a)' \
 +            = 'foo.b bar'
 +      test '$(call am__strip_suffixes, .b.a .a, foo.b.a bar.a)' \
 +            = 'foo bar'
 +
 +.PHONY: test-toupper
 +test-toupper:
 +      test '$(call am__toupper,a)'  = A
 +      test '$(call am__toupper,A)'  = A
 +      test '$(call am__toupper,aba)' = ABA
 +      test '$(call am__toupper,a b)' = 'A B'
 +      test '$(call am__toupper, a B)' = ' A B'
 +      test '$(call am__toupper,Ab  )' = 'AB  '
 +      test '$(call am__toupper,A       B c )' = 'A     B C '
 +      test '$(call am__toupper,0)'  = 0
 +      test '$(call am__toupper,0d)' = 0D
 +      test '$(call am__toupper,@:&/?-)' = '@:&/?-'
 +      test '$(call am__toupper,a@B)' = A@B
 +      test '$(call am__toupper,zxzxzxZXZxzxzxzxzx)' = ZXZXZXZXZXZXZXZXZX
 +      test '$(call am__toupper,$(lower))' = '$(upper)'
 +      test '$(call am__toupper,$(upper))' = '$(upper)'
 +
 +.PHONY: test-tolower
 +test-tolower:
 +      test '$(call am__tolower,A)'  = a
 +      test '$(call am__tolower,a)'  = a
 +      test '$(call am__tolower,ABA)' = aba
 +      test '$(call am__tolower,A B)' = 'a b'
 +      test '$(call am__tolower, A b)' = ' a b'
 +      test '$(call am__tolower,aB  )' = 'ab  '
 +      test '$(call am__tolower,a       b C )' = 'a     b c '
 +      test '$(call am__tolower,0)'  = 0
 +      test '$(call am__tolower,0D)' = 0d
 +      test '$(call am__tolower,@:&/?-)' = '@:&/?-'
 +      test '$(call am__tolower,a@B)' = a@b
 +      test '$(call am__tolower,ZXZXZXzxzXZXZXZXZX)' = zxzxzxzxzxzxzxzxzx
 +      test '$(call am__tolower,$(upper))' = '$(lower)'
 +      test '$(call am__tolower,$(lower))' = '$(lower)'
 +
 +.PHONY: test-canonicalize
 +test-canonicalize:
 +      test '$(call am__canon,A)' = A
 +      test '$(call am__canon, b)' = b
 +      test '$(call am__canon, foo      )' = foo
 +      test '$(call am__canon,$(upper)$(lower)$(digits)_)' = '$(upper)$(lower)$(digits)_'
 +      test '$(call am__canon,@)' = '@'
 +      test '$(call am__canon,%)' = '_'
 +      test '$(call am__canon,.&@!;)' = '__@__'
 +      test '$(call am__canon,')' = '_'
 +      test '$(call am__canon,$(dollar))' = '_'
 +      test '$(call am__canon,$(bslash))' = '_'
 +      test '$(call am__canon,$(comma))' = '_'
 +      test '$(call am__canon,$(bslash)$(comma))' = '__'
 +      test '$(call am__canon,x$(comma)@$(bslash))' = 'x_@_'
 +
 +.PHONY: test-newline
 +test-newline:
 +      @echo OK > foo$(am__newline)@touch bar$(am__newline)-false > baz
 +      test `cat foo` = OK
 +      test -f bar
 +      test -f baz
 +END
 +
 +command_ok_  am__strip_firstword        $MAKE test-strip-firstword
 +command_ok_  am__strip_lastword         $MAKE test-strip-lastword
 +command_ok_  am__uniq                   $MAKE test-uniq
 +command_ok_  am__test_strip_suffixes    $MAKE test-strip-suffixes
 +command_ok_  am__tolower                $MAKE test-tolower
 +command_ok_  am__toupper                $MAKE test-toupper
 +command_ok_  am__canon                  $MAKE test-canonicalize
 +command_ok_  am__newline                $MAKE test-newline
 +
 +:
diff --cc t/interp3.sh
index 1394c6d181aa52c74b7f5291c18e05a9c855a3b2,9c56acaf567d16cf5d6facc9dd380ac03f64156e..b0ed1c7f006133c1c78ae78bb8777128d5ef9c39
  # You should have received a copy of the GNU General Public License
  # along with this program.  If not, see <http://www.gnu.org/licenses/>.
  
 -# Test exe-specific flags with dependency tracking.
 +# Variable interpolation should work even when GNU make functions are
 +# involved.  This is unfortunately not the case currently, due to
 +# historical and hard-to-lift limitations (this is also documented in
 +# the manual, using an example that is a stripped-down version of this
 +# test case).
  
- . ./defs || Exit 1
 +required=cc
+ . ./defs || exit 1
  
  cat >> configure.ac << 'END'
  AC_PROG_CC
Simple merge
Simple merge
Simple merge
Simple merge
diff --cc t/javaflags.sh
Simple merge
Simple merge
diff --cc t/lex-depend.sh
index 653ae8da0ae0452cf76e39c7dea754d10cb0cbf6,7280b84db1a954e33d8e0ca08b0ee50f5317ffaa..9d4f9609f163f56c40fbeeae5e610ccde7b1feb8
@@@ -77,9 -77,9 +77,9 @@@ $AUTOCON
  # using slow dependency extractors.
  ./configure --enable-dependency-tracking
  
 -$MAKE test-deps-exist
  $MAKE
- cross_compiling || test "$(./zoo)" = 'Hello, World!' || Exit 1
 +$MAKE test-deps-exist
+ cross_compiling || test "$(./zoo)" = 'Hello, World!' || exit 1
  
  $sleep
  cat >> my-hdr.h << 'END'
index 238a1266213d0e9ed757a843dc5ddd998d149477,9a64266c91599046ce19eddd50b14f5434541521..28f254b06be85f85af6a080af3e67718ad1d6ecc
@@@ -71,9 -71,9 +71,9 @@@ $MAKE have-lexlib || skip_ "no system-w
  $MAKE all
  if ! cross_compiling; then
    echo GOOD | ./lexer
-   echo BAD | ./lexer && Exit 1
+   echo BAD | ./lexer && exit 1
    : For shells with busted 'set -e'.
  fi
 -yl_distcheck
 +$MAKE distcheck
  
  :
diff --cc t/lex-libobj.sh
Simple merge
diff --cc t/lex-line.sh
index 3db979f30410432f7a12247272ef34244a44aca8,9629cce247782c20827f6b5399fbc5111c08891d..fc7ce17eccd4352161b3bc74062921fbb1b6173c
  # See also sister test 'yacc-line.test'.
  
  required='cc lex'
- . ./defs || Exit 1
+ . ./defs || exit 1
  
  cat >> configure.ac << 'END'
 -AC_CONFIG_FILES([sub/Makefile])
  AC_PROG_CC
  AM_PROG_CC_C_O
  AC_PROG_LEX
@@@ -83,24 -103,28 +83,24 @@@ for vpath in : false; d
    $MAKE
  
    # For debugging,
 -  ls -l . sub sub/dir
 +  ls -l . dir
    $EGREP 'line|\.l' $c_outputs
  
-   grep '#.*line.*build.*\.l' $c_outputs && Exit 1
+   grep '#.*line.*build.*\.l' $c_outputs && exit 1
    # Adjusted "#line" should not contain reference to the absolute
    # srcdir.
-   $EGREP '#.*line *"?/.*\.l' $c_outputs && Exit 1
+   $EGREP '#.*line *"?/.*\.l' $c_outputs && exit 1
    # Adjusted "#line" should not contain reference to the default
    # output file names, e.g., 'lex.yy.c'.
-   grep '#.*line.*lex\.yy' $c_outputs && Exit 1
+   grep '#.*line.*lex\.yy' $c_outputs && exit 1
    # Look out for a silly regression.
-   grep "#.*\.l.*\.l" $c_outputs && Exit 1
+   grep "#.*\.l.*\.l" $c_outputs && exit 1
    if $vpath; then
      grep '#.*line.*"\.\./zardoz\.l"' zardoz.c
 -    grep '#.*line.*"\.\./dir/quux\.l"' bar-quux.c
 -    grep '#.*line.*"\.\./\.\./sub/zardoz\.l"' sub/foo-zardoz.c
 -    grep '#.*line.*"\.\./\.\./sub/dir/quux\.l"' sub/dir/quux.c
 +    grep '#.*line.*"\.\./dir/quux\.l"' dir/bar-quux.c
    else
      grep '#.*line.*"zardoz\.l"' zardoz.c
 -    grep '#.*line.*"dir/quux\.l"' bar-quux.c
 -    grep '#.*line.*"zardoz\.l"' sub/foo-zardoz.c
 -    grep '#.*line.*"dir/quux\.l"' sub/dir/quux.c
 +    grep '#.*line.*"dir/quux\.l"' dir/bar-quux.c
    fi
  
    cd $srcdir
Simple merge
index f2c9626f0eaaa7f82c89623a1e45e17b54392169,0c021a26a47689ef5d1bf98b7a52fdb2e6bd0c3e..526e01b64be074e45944bc9a4660a27818041a7e
  # You should have received a copy of the GNU General Public License
  # along with this program.  If not, see <http://www.gnu.org/licenses/>.
  
 -# Ensure subdirs for subdir scanners are generated when subdir-objects
 -# are used, even when dependency tracking is disabled.
 +# Ensure subdirs for subdir scanners are generated, even when dependency
 +# tracking is disabled.
  
  required='cc lex'
- . ./defs || Exit 1
+ . ./defs || exit 1
  
  cat >>configure.ac <<\END
  AC_PROG_CC
diff --cc t/lex3.sh
Simple merge
diff --cc t/lex5.sh
Simple merge
diff --cc t/lflags.sh
Simple merge
diff --cc t/lflags2.sh
Simple merge
diff --cc t/libobj19.sh
Simple merge
diff --cc t/libobj20b.sh
index 395bd7b1929819994e6487a3c1792fbc711974ce,a90df20b66659a65249229261e797e176f3f63bd..fce4ab342eea3d850f16259290d9b6644cb0f4c5
@@@ -15,9 -15,9 +15,9 @@@
  # along with this program.  If not, see <http://www.gnu.org/licenses/>.
  
  # Test error reporting for AC_CONFIG_LIBOBJ_DIR.
 -# See also sister tests 'libobj20a.test' and 'libobj20c.test' .
 +# See also sister test 'libobj20c.sh'.
  
- . ./defs || Exit 1
+ . ./defs || exit 1
  
  cat >> configure.ac << 'END'
  AC_CONFIG_LIBOBJ_DIR([libobj-dir])
diff --cc t/libobj20c.sh
index e764e975dd2367615e8c6ea4aaabab6dba8b2765,2d1d65b5a8a602681b08ea8a4ccb7980090392cb..533f195a18fcf5da431a91a03cfb22b095574b1c
@@@ -15,9 -15,9 +15,9 @@@
  # along with this program.  If not, see <http://www.gnu.org/licenses/>.
  
  # Test error reporting for AC_CONFIG_LIBOBJ_DIR.
 -# See also sister tests 'libobj20a.test' and 'libobj20b.test' .
 +# See also sister test 'libobj20b.sh'.
  
- . ./defs || Exit 1
+ . ./defs || exit 1
  
  cat >> configure.ac << 'END'
  AC_CONFIG_LIBOBJ_DIR([libobj-dir])
diff --cc t/libobj7.sh
Simple merge
diff --cc t/library2.sh
Simple merge
diff --cc t/libtoo10.sh
index 07efaea3e8f359495965728468a05c54ca23d0cc,d78886a20db76384ee0c3dfc8fca4c674582ca68..78d150aa9c165e62bb799d53b9274ef474cac59e
  
  # Make sure .libs directories are removed for _PROGRAMS.
  # Report from Guillermo Ontañón.
 +# Also make sure the 'so_locations' files generated by some linkers
 +# (OSF, IRIX) are removed.
 +# And also make sure the generated 'libtool' script as well as the
 +# *.lo files are removed when they should.
  
  required='cc libtoolize'
- . ./defs || Exit 1
+ . ./defs || exit 1
  
  cat >> configure.ac << 'END'
  AM_PROG_AR
@@@ -56,11 -52,7 +56,11 @@@ $AUTOMAKE --add-missin
  $AUTOCONF
  ./configure
  $MAKE all check
 +: > lib/so_locations
 +: > src/so_locations
  $MAKE clean
- ls *.lo && Exit 1
++ls *.lo && exit 1
 +test -f libtool
  test ! -d src/.libs
  test ! -d src/_libs
  test ! -d check/.libs
diff --cc t/libtool3.sh
index 711581a9010a7ac73003671943ab3cc491b7ce31,22c72d1d82e08bf4a6a3b577804368c6b833edc9..456cf62edfaa37e5af98b1805a6778145cd0ced2
@@@ -76,8 -75,12 +76,8 @@@ $ACLOCA
  $AUTOCONF
  $AUTOMAKE --add-missing --copy
  
 -# We need explicit rules to build 1.o and a.lo.  Make sure
 -# Automake did not output additional rules for 1.lo and and a.lo.
 -$FGREP '1.o:' Makefile.in
 -$FGREP '1.lo:' Makefile.in && exit 1
 -$FGREP 'a.o:' Makefile.in && exit 1
 -$FGREP 'a.lo:' Makefile.in
 +# We shouldn't need explicit rules.
- $EGREP '[^%]\.(o|obj|lo|\$\(OBJEXT\)) *:' Makefile.in && Exit 1
++$EGREP '[^%]\.(o|obj|lo|\$\(OBJEXT\)) *:' Makefile.in && exit 1
  
  ./configure
  
diff --cc t/libtool7.sh
Simple merge
diff --cc t/libtool9.sh
index ac3a6b0a4fc6165027cc07ad9d15ab579651a3ce,eb777d8079fe755609136aa86f285f8c65a1480e..4d82ddfce84299cbdb056a0790c4d45a75a0f530
@@@ -85,11 -85,9 +85,11 @@@ $AUTOCON
  $AUTOMAKE --add-missing --copy
  
  ./configure
 -env LDFLAGS=ldflags AM_LDFLAGS=am_ldflags libmod1_la_LDFLAGS=lm1_la_ldflags \
 -    CFLAGS=cflags AM_CFLAGS=am_cflags prg2_CFLAGS=prg2_cflags \
 -    $MAKE -e print >output 2>&1 || { cat output; exit 1; }
 +$MAKE LDFLAGS=ldflags AM_LDFLAGS=am_ldflags \
 +      CFLAGS=cflags AM_CFLAGS=am_cflags \
 +      libmod1_la_LDFLAGS=lm1_la_ldflags \
 +      prg2_CFLAGS=prg2_cflags \
-       print >output 2>&1 || { cat output; Exit 1; }
++      print >output 2>&1 || { cat output; exit 1; }
  cat output
  grep '1BEG: libmod1.la mod2.la :END1' output
  grep '2BEG: mod2.la :END2' output
diff --cc t/link_cond.sh
index 9c120af7f0b449c6093e541f519effcc5306f460,a5ac4b1019f4cd56e1173539ea799b350508e4b3..459453cb5d239fb1018df9197635cb85f56fdde2
@@@ -64,7 -64,7 +64,7 @@@ $MAKE CXX=fals
  
  # Sanity check.
  rm -f foo foo.exe
- $MAKE CC=false && Exit 99
 -CC=false $MAKE -e && exit 99
++$MAKE CC=false && exit 99
  
  $MAKE distclean
  
@@@ -83,6 -83,6 +83,6 @@@ $MAKE CC=fals
  
  # Sanity check.
  rm -f foo foo.exe
- $MAKE CXX=false && Exit 99
 -CXX=false $MAKE -e && exit 99
++$MAKE CXX=false && exit 99
  
  :
diff --cc t/lisp3.sh
index ea18e002137a4e7df1b5a4c8ccb3864f42305112,5b95715ec403c19a8abb8126fc6a06abed45cfec..9425d9c324f1bfc8a61bb13069e0cac1f02eaf1d
@@@ -84,9 -84,9 +84,9 @@@ find _inst | $EGREP '\.elc?$' && exit 
  unique=0a3346e2af8a689b85002b53df09142a
  $sleep
  echo "(message \"$unique\")(provide 'am-three)" > am-three.el
- $MAKE 2>stderr || { cat stderr >&2; Exit 1; }
 -$MAKE >output 2>&1 || { cat output; exit 1; }
 -cat output
 -grep $unique output
++$MAKE 2>stderr || { cat stderr >&2; exit 1; }
 +cat stderr >&2
 +grep $unique stderr
  
  # It should also work for VPATH-builds.
  $MAKE distcheck
diff --cc t/lisp8.sh
index d686bfb9d2a2af704352d0fc80276057b5b4f357,6e6b901de8afe7a22728d97bec4e8ef2f3d15eb5..c542cf74912b325b1d6c3e844af4cee8f5e4dc83
@@@ -16,8 -16,8 +16,8 @@@
  
  # Check the recover rule of lisp_LISP with parallel make.
  
 -required='GNUmake emacs'
 +required=emacs
- . ./defs || Exit 1
+ . ./defs || exit 1
  
  cat > Makefile.am << 'EOF'
  dist_lisp_LISP = am-one.el am-two.el am-three.el
index 003a7e3f379b76344ee7ff9aaa3105876a1018ce,0000000000000000000000000000000000000000..d15bc809a0ccf872eb7e073b675cbe53dc1a2bf0
mode 100755,000000..100755
--- /dev/null
@@@ -1,62 -1,0 +1,62 @@@
- . ./defs || Exit 1
 +#! /bin/sh
 +# Copyright (C) 2001-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 <http://www.gnu.org/licenses/>.
 +
 +# The 'all-local', 'check-local' and 'installdirs-local' targets can
 +# also be defined by included or wrapper Makefiles that Automake never
 +# sees, as well as through GNU make constructs that Automake does not
 +# parse.
 +
++. ./defs || exit 1
 +
 +cat >> configure.ac << 'END'
 +AC_SUBST([SafeInclude], [include])
 +AC_OUTPUT
 +END
 +
 +cat > Makefile.am <<'END'
 +@SafeInclude@ ./inc.mk
 +$(foreach x,all check installdirs,$(eval $(x)-local:: ; : > main-$(x)))
 +END
 +
 +cat > inc.mk << 'END'
 +all-local check-local installdirs-local:: %-local:
 +      : > incl-$*
 +END
 +
 +cat > GNUmakefile << 'END'
 +include ./Makefile
 +all-local check-local installdirs-local:: %-local:
 +      : > wrap-$*
 +END
 +
 +$ACLOCAL
 +$AUTOCONF
 +$AUTOMAKE
 +
 +./configure
 +
 +$MAKE check installdirs
 +test -f wrap-all
 +test -f wrap-check
 +test -f wrap-installdirs
 +test -f incl-all
 +test -f incl-check
 +test -f incl-installdirs
 +test -f main-all
 +test -f main-check
 +test -f main-installdirs
 +
 +:
diff --cc t/longline.sh
index e246e3008d12999bc18fb069711586dce9c7ae5a,d0240fdc6d0dd5c799a61854e1975eef81d8ce92..2536846ea6c973ab40e065d524d8a2f09da92bdd
  # You should have received a copy of the GNU General Public License
  # along with this program.  If not, see <http://www.gnu.org/licenses/>.
  
 -# Long lines of += should be wrapped.
 +# Long lines of = and += should be wrapped.
  # Report from Simon Josefsson.
  
- . ./defs || Exit 1
+ . ./defs || exit 1
  
 -(echo DUMMY = some_long_filename_1;
 -for i in 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20;
 -do
 -  echo DUMMY += some_long_filename_$i
 -done) > Makefile.am
 +i=0
 +while test $i -lt 30; do
 +  echo some_very_very_long_variable_content_$i
 +  i=$((i + 1))
 +done > t
 +
 +{ echo "DUMMY =" && sed 's/^/DUMMY +=/' t; } > Makefile.am
 +{ echo "ZARDOZ =" && cat t; } | tr '\012\015' '  ' >> Makefile.am
  
  $ACLOCAL
  $AUTOMAKE
Simple merge
diff --cc t/makej.sh
index 617b45f582ddec464650450eabfcdb00d3a4192a,b339bd73c7820cf67ce430fc208b8aec009083f1..3b236bf2fd6462598d917822b2a54f54f48ee7b6
@@@ -21,7 -21,8 +21,7 @@@
  # depend on the time at which autoconf and automake update the cache
  # via autom4te.
  
- . ./defs || Exit 1
 -required=GNUmake
+ . ./defs || exit 1
  
  cat >configure.ac <<END
  m4_include([version.m4])
diff --cc t/makej2.sh
index 317d3ff7c097280605af1f1312b3e61ea6344ec2,c7d809e89651d54ff316b9b058747f018b5c8b33..b7ec43a3137661bb6beb95f1eea0920b48390208
  # Test to make sure known BSD 'make -jN' issues are fixed:
  # without -B, it may reuse the same shell for separate commands in a
  # rule, which can lead to interesting results.
 +# Problems like this shouldn't happen with GNU make, but we keep the
 +# test anyway for the moment, for extra safety.
  
- . ./defs || Exit 1
+ . ./defs || exit 1
  
  cat >>configure.ac <<'END'
  AC_OUTPUT
diff --cc t/maken.sh
index ffd5ef0df492a61376f03f5d004835a7daec75b0,ec72008958a9cfef5eefc3d2f7992446b301ace0..0caa12cf76d938e1e4c5ac0a718603b27c61c406
  # You should have received a copy of the GNU General Public License
  # along with this program.  If not, see <http://www.gnu.org/licenses/>.
  
 -# Ensure that 'make -n dist' and 'make -n distcheck' do not change files
 +# Ensure that "make -n dist" and "make -n distcheck" do not change files
  # on disk, due to GNU make executing rules containing '$(MAKE)'.
 -# Also, ensure that 'make -n dist' and 'make -n distcheck' show what
 -# would happen, at least when using GNU make.
 +# Also, ensure that "make -n dist" and "make -n distcheck" show what
 +# would happen.
  
- . ./defs || Exit 1
+ . ./defs || exit 1
  
  mkdir sub
  
diff --cc t/maken3.sh
index 5f9981e4a1e76e54db6fd8d38e84ebdb0a284325,99e2305bf6f650fc8ad9770303c20d0827cad703..3dca8a602581913a1175f4a058fe70ff1176a0af
  # as well as tags, TAGS.
  
  # For gen-testsuite-part: ==> try-with-serial-tests <==
- . ./defs || Exit 1
+ . ./defs || exit 1
  
 -# Does $MAKE support the '.MAKE' special target?
 -have_dotmake=false
 -if using_gmake; then
 -  have_dotmake=: # GNU make must support it.
 -else
 -  unindent > mk.tmp << 'END'
 -    targ.tmp:
 -      : > $@
 -    .MAKE: targ.tmp
 -END
 -  if $MAKE -n -f mk.tmp targ.tmp && test -f targ.tmp; then
 -    have_dotmake=:
 -  fi
 -fi
 -
  mkdir sub sub2
  
  cat >> configure.ac << 'END'
@@@ -132,22 -149,28 +132,22 @@@ check_targets (
      case $target in
      install-* | installdirs | tags | TAGS ) ;;
      *)
-       grep "stamp-$target$" stdout || Exit 1
-       test ! -f "stamp-$target$" || Exit 1
 -      if $have_dotmake; then
 -        grep "stamp-$target$" stdout || exit 1
 -      fi
++      grep "stamp-$target$" stdout || exit 1
+       test ! -f "stamp-$target$" || exit 1
        ;;
      esac
      case $target in
      install-* | installdirs ) ;;
      *)
-       grep "stamp-$target-sub" stdout || Exit 1
-       test ! -f "sub/stamp-$target-sub" || Exit 1
 -      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
        ;;
      esac
      case $target in
      distclean | maintainer-clean ) ;;
      *)
-       grep "should-not-be-executed" stdout || Exit 1
-       test ! -f "sub2/sub2-$target-should-not-be-executed" || Exit 1
 -      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
        ;;
      esac
    done
diff --cc t/man3.sh
Simple merge
diff --cc t/man6.sh
index dfaeb12deba169fbd69a1496ea410e596f578b9d,dc90321ffdcd8f1ddd53eb390482176d91f9175c..c2f21a9b7efe1a3353ff62920239df882168cb06
+++ b/t/man6.sh
  # even if the 'missing' script is involved.
  
  required=help2man
- . ./defs || Exit 1
+ . ./defs || exit 1
  
 -# Avoid a spurious failure due to a known FreeBSD make incompatibility.
 -useless_vpath_rebuild \
 -  && skip_ "VPATH useless rebuild detected (see bug#7884)"
 -
  cat > Makefile.am << 'END'
  dist_man_MANS = $(srcdir)/foobar.1 bazquux.1 zardoz.1
  dist_bin_SCRIPTS = foobar bazquux zardoz
diff --cc t/man8.sh
index 4293fde0e595a61549537ee7602ed9050860f0af,a7116ae7e2d03f66949d80e9127197711262cbdf..597093f948a7432090dcbc9e8cd0a419255d5161
+++ b/t/man8.sh
  
  # Check for a bug in distcheck w.r.t. generated manpages.
  
- . ./defs || Exit 1
+ . ./defs || exit 1
  
 -# Avoid a spurious failure due to a known FreeBSD make incompatibility.
 -useless_vpath_rebuild \
 -  && skip_ "VPATH useless rebuild detected (see bug#7884)"
 -
  cat > Makefile.am << 'END'
  dist_man_MANS = foo.1
  foo.1:
diff --cc t/mdate2.sh
Simple merge
diff --cc t/memoize.tap
index b9188bf72a0db9bda5ce76f9309fafedd73834f9,0000000000000000000000000000000000000000..ea2f69e5b5305316b0e3834bc6588ac914630b84
mode 100755,000000..100755
--- /dev/null
@@@ -1,326 -1,0 +1,326 @@@
- . ./defs || Exit 1
 +#! /bin/sh
 +# Copyright (C) 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 <http://www.gnu.org/licenses/>.
 +
 +# Test Automake-provided memoization for make variables.
 +
 +am_create_testdir=empty
++. ./defs || exit 1
 +
 +plan_ 17
 +
 +ocwd=`pwd` || fatal_ "couldn't get current working directory"
 +
 +cp "$am_amdir"/header-vars.am . \
 +  || fatal_ "fetching makefile fragment headers-vars.am"
 +
 +# Filter out Automake comments and things that would need configure
 +# substitutions.
 +LC_ALL=C $EGREP -v '(^##|=.*@[a-zA-Z0-9_]+@)' header-vars.am > defn.mk
 +rm -f header-vars.am
 +
 +T ()
 +{
 +  tcount=`expr $tcount + 1`
 +  mkdir $tcount.d
 +  cd $tcount.d
 +  echo include ../defn.mk > Makefile
 +  cat >> Makefile
 +  command_ok_ "$1" "$MAKE" test
 +  cd ..
 +}
 +tcount=0
 +
 +#---------------------------------------------------------------------------
 +
 +## NOTE: Every repeated check in the recipes of the tests below is
 +##       really intended!
 +
 +#---------------------------------------------------------------------------
 +
 +T "basic usage" <<'END'
 +
 +foo = $(call am__memoize,foo,ok)
 +
 +test:
 +      test '$(foo)' = ok
 +      test '$(foo)' = ok
 +END
 +
 +#---------------------------------------------------------------------------
 +
 +T "variables expanding to blanks only (1)" <<'END'
 +
 +foo = $(call am__memoize,foo,$(am__empty) )
 +
 +test:
 +      test '$(foo)' = ' '
 +      test '$(foo)' = ' '
 +END
 +
 +#---------------------------------------------------------------------------
 +
 +T "variables expanding to blanks only (2)" <<END
 +
 +blank = \$(am__empty) $tab$tab   \$(am__empty)
 +foo = \$(call am__memoize,foo,\$(blank))
 +
 +test:
 +      test '\$(foo)' = ' $tab$tab   '
 +      test '\$(foo)' = ' $tab$tab   '
 +END
 +
 +#---------------------------------------------------------------------------
 +
 +# $var will be 3 * 2^12 ~ 12000 characters long.
 +var=foo
 +for i in 1 2 3 4 5 6 7 8 9 10 11 12; do
 +  var=$var$var
 +done
 +
 +T "very long variable name" <<END
 +
 +$var = \$(call am__memoize,$var,foo)
 +
 +test:
 +      test '\$($var)' = foo
 +      test '\$($var)' = foo
 +END
 +
 +#---------------------------------------------------------------------------
 +
 +# $var and $val will be 3 * 2^12 ~ 12000 characters long.
 +var=foo
 +val=bar
 +for i in 1 2 3 4 5 6 7 8 9 10 11 12; do
 +  var=$var$var
 +  val=$val$val
 +done
 +
 +T "very long variable name with long content" <<END
 +
 +$var = \$(call am__memoize,$var,$val)
 +
 +test:
 +      test '\$($var)' = '$val'
 +      test '\$($var)' = '$val'
 +END
 +
 +#---------------------------------------------------------------------------
 +
 +T "memoize indirect recursive variable expansion" <<'END'
 +
 +foo = $(call am__memoize,foo,$(indir))
 +
 +## This is delibrately placed after the memoize call.
 +indir = zardoz
 +
 +test:
 +      test '$(foo)' = zardoz
 +      test '$(foo)' = zardoz
 +END
 +
 +#---------------------------------------------------------------------------
 +
 +T "memoize indirect immediate variable expansion" <<'END'
 +
 +foo = $(call am__memoize,foo,$(indir))
 +
 +## This is delibrately placed after the memoize call.
 +indir := blob
 +
 +test:
 +      test '$(foo)' = blob
 +      test '$(foo)' = blob
 +END
 +
 +#---------------------------------------------------------------------------
 +
 +T "memoize function call (containing builtin calls)" <<'END'
 +
 +my_func = $(firstword $(sort $(1)))
 +foo = $(call am__memoize,foo,$(call my_func, 6 3 1 7))
 +
 +test:
 +      test '$(foo)' = 1
 +      test '$(foo)' = 1
 +END
 +
 +#---------------------------------------------------------------------------
 +
 +T "expanded as function argument" <<'END'
 +
 +foo = $(call am__memoize,foo,bar)
 +func = ::$(0)::$(1)::
 +
 +test:
 +      test '$(call func,$(foo))' = ::func::bar::
 +      test '$(foo)' = bar
 +        # Once more.
 +      test '$(call func,$(foo))' = ::func::bar::
 +END
 +
 +#---------------------------------------------------------------------------
 +
 +T "expanded as function argument (trickier)" <<'END'
 +
 +foo = $(call am__memoize,foo,zardoz)
 +indir_func = ::$($1)::
 +
 +test:
 +      test '$(call indir_func,foo)' = ::zardoz::
 +      test '$(foo)' = zardoz
 +        # Once more.
 +      test '$(call indir_func,foo)' = ::zardoz::
 +END
 +
 +#---------------------------------------------------------------------------
 +
 +T "expanded into another memoized variable" <<'END'
 +
 +foo = $(call am__memoize,foo,one $(bar))
 +bar = $(call am__memoize,bar,two $(baz))
 +baz = $(call am__memoize,baz,$(sort 4 3))
 +
 +test:
 +      test '$(foo)' = 'one two 3 4'
 +      test '$(bar)' = 'two 3 4'
 +END
 +
 +#---------------------------------------------------------------------------
 +
 +T "memoization actually takes place (1)" <<'END'
 +
 +indir := ok
 +foo = $(call am__memoize,foo,$(indir))
 +expand-it := $(foo)
 +override indir := ko
 +
 +test:
 +      test '$(foo)' = ok
 +      test '$(indir)' = ko
 +END
 +
 +#---------------------------------------------------------------------------
 +
 +T "memoization actually takes place (2)" <<'END'
 +
 +indir := ok
 +expand = $(eval expanded-to := $$($1))
 +foo = $(call am__memoize,foo,$(indir))
 +$(call expand,foo)
 +override indir := ko
 +
 +test:
 +      test '$(foo)' = ok
 +      test '$(indir)' = ko
 +      test '$(expanded-to)' = ok
 +END
 +
 +#---------------------------------------------------------------------------
 +
 +T "memoization actually takes place (3)" <<'END'
 +
 +foo1 = $(call am__memoize,foo1,$(shell test -f x && echo "+"))
 +foo2 = $(call am__memoize,foo2,$(shell test -f y || echo "-"))
 +
 +test: one two
 +two: one
 +.PHONY: one two one-setup two-setup
 +one-setup:
 +      rm -f y
 +      echo dummy > x
 +one: one-setup
 +      test -f x
 +      test '$(foo1)' = '+'
 +      test ! -f y
 +      test '$(foo2)' = '-'
 +two-setup:
 +      rm -f x
 +      echo dummy > y
 +two: two-setup
 +      test ! -f x
 +      test '$(foo1)' = '+'
 +      test -f y
 +      test '$(foo2)' = '-'
 +END
 +
 +#---------------------------------------------------------------------------
 +
 +
 +T "definition on multiple lines" <<'END'
 +
 +foo = $(call am__memoize,foo,a \
 +  b \
 +  c \
 +  \
 +  d)
 +
 +test:
 +      test '$(foo)' = 'a b c d'
 +      test '$(foo)' = 'a b c d'
 +END
 +
 +#---------------------------------------------------------------------------
 +
 +# This usage has been known to cause problems with GNU make <= 3.82,
 +# tickling this bug:
 +# <http://lists.gnu.org/archive/html/bug-make/2012-05/msg00013.html>
 +# <https://savannah.gnu.org/patch/?7534>
 +
 +T "known GNU make issue (https://savannah.gnu.org/patch/?7534)" <<'END'
 +
 +setup := $(shell mkdir -p t/pm && : > t/pm/Cond2.pl)
 +
 +TESTS = $(wildcard t/pm/Cond2.pl)
 +am__test_bases = $(call am__memoize,am__test_bases,$(TESTS))
 +
 +test:
 +      test '$(am__test_bases)' = 't/pm/Cond2.pl'
 +END
 +
 +#---------------------------------------------------------------------------
 +
 +# Try memoization with variables having a very long content.  Our first
 +# (unpublished) memoization implementation didn't work in that case -- it
 +# triggered errors like "*** unterminated variable reference.  Stop" when
 +# the content's length because big enough.
 +
 +line='dummy abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ ='
 +
 +# About 1 million lines.
 +echo "  $line \\" > t
 +for i in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20; do
 +  cat t t > t1
 +  mv -f t1 t
 +done
 +
 +echo "list = \$(call am__memoize,list,$line \\" >> big.mk
 +cat t >> big.mk
 +echo "  $line)" >> big.mk
 +
 +cat >> big.mk << 'END'
 +test:
 +      test x'$(word  1, $(list))' = x'dummy'
 +      test x'$(word  3, $(list))' = x'='
 +      test x'$(word 31, $(list))' = x'dummy'
 +      test x'$(word 93, $(list))' = x'='
 +END
 +
 +T "very long variable content" < big.mk
 +
 +#---------------------------------------------------------------------------
 +
 +:
diff --cc t/mkinst3.sh
index 79a8dd5d020b4b6aca16c1e15a6dcb7e4b148fe8,258275821b069ff40b9919cc3ab7262579881f4b..880d417b3e988d84d3f297a73205163cbd581bb8
  # You should have received a copy of the GNU General Public License
  # along with this program.  If not, see <http://www.gnu.org/licenses/>.
  
 -# Test mkinstalldirs with spaces in directory names.
 +# Test "install-sh -d" with spaces in directory names.
  
  am_create_testdir=empty
- . ./defs || Exit 1
+ . ./defs || exit 1
  
  cwd=$(pwd) || fatal_ "getting current working directory"
  
diff --cc t/mmodely.sh
Simple merge
diff --cc t/multlib.sh
index 1744b36bb9f6035782148a4b796a3a085eb79c05,778db14e4c2dd8fd127500494a8abd8e8eb7e073..a5b1c94a3816f16caa391dd0c068002ce5e432b8
@@@ -19,8 -19,8 +19,8 @@@
  # FIXME: the features tested by this script has been moved in contrib.
  # FIXME: We should move this script accordingly.
  
 -required='gcc GNUmake'
 +required=gcc
- . ./defs || Exit 1
+ . ./defs || exit 1
  
  mldir=$am_top_srcdir/contrib/multilib
  mkdir m4
diff --cc t/no-c.tap
index 5adb056df2f0925a1d060138f09aed1347e7f750,0000000000000000000000000000000000000000..90a767ed709ed83ec4f3fc86240f92ab22e407e2
mode 100755,000000..100755
--- /dev/null
@@@ -1,57 -1,0 +1,57 @@@
- . ./defs || Exit 1
 +#! /bin/sh
 +# Copyright (C) 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 <http://www.gnu.org/licenses/>.
 +
 +# Projects using only Fortran or C++ shouldn't need C-related stuff.
 +
 +am_create_testdir=empty
++. ./defs || exit 1
 +
 +plan_ 6
 +
 +only_ ()
 +{
 +  test $# -eq 3 || fatal_ "only_: bad usage"
 +  lang=$1; shift
 +  macro=$1; shift
 +  sources=$*
 +  : ================  $lang  ================ :
 +  mkdir "$macro"
 +  cd "$macro"
 +  unindent > configure.ac <<END
 +    AC_INIT([Only $2], [1.0])
 +    AM_INIT_AUTOMAKE
 +    AC_CONFIG_FILES([Makefile])
 +    $macro
 +END
 +  echo bin_PROGRAMS = foo > Makefile.am
 +  echo foo_SOURCES = $sources >> Makefile.am
 +  r=ok
 +  $ACLOCAL \
 +    && $AUTOMAKE -a \
 +    && not $EGREP '\(CC\)|\(CFLAGS\)|AM_CFLAGS' Makefile.in \
 +    || r='not ok'
 +  result_ "$r" "$lang only"
 +  cd ..
 +}
 +
 +only_ "C++"           AC_PROG_CXX    '1.cxx 2.cpp 3.c++ 4.cc 5.C'
 +only_ "Fortran"       AC_PROG_FC     'a.f90 b.f95 c.f03 d.f08'
 +only_ "Fortran 77"    AC_PROG_F77    'x.f y.for'
 +only_ "Java"          AM_PROG_GCJ    'foo.java bar.class'
 +only_ "Objective C"   AC_PROG_OBJC   'zardoz.m fu.m'
 +only_ "Objective C++" AC_PROG_OBJCXX 'foo.mm bar.mm'
 +
 +:
index 1c91452e4e09878a1539e94305b8753a6ec0d751,ab0e33d3af597a16c26768c8ddb0eb677475dd95..cfe124945d7cdcdb5c9e1afee6fc85c57f92f0de
@@@ -30,6 -30,7 +30,6 @@@ rm -f depcomp compil
  $ACLOCAL
  $AUTOMAKE
  
- $EGREP 'INCLUDE|-compile|\$\(OBJEXT\)|tab\.[ch]' Makefile.in && Exit 1
 -$EGREP 'DEFAULT_INCLUDES|@am__isrc@|-compile|\$\(OBJEXT\)|tab\.[ch]' \
 -  Makefile.in && exit 1
++$EGREP 'INCLUDE|-compile|\$\(OBJEXT\)|tab\.[ch]' Makefile.in && exit 1
  
  :
Simple merge
diff --cc t/nodist.sh
index 931b5c87c70fb3209585aa2df823f41f9f89a4a6,f63ea976aa747c7dd2c15c51d71d14b1a961c0e8..41083c3f6ba62f74b0a93426659e54335fd0c7c0
@@@ -34,7 -34,7 +34,7 @@@ $ACLOCA
  $AUTOMAKE
  
  grep '^am_eyeball_OBJECTS' Makefile.in
 -grep '^DIST_SOURCES =' Makefile.in
 -grep '^DIST_SOURCES =.*nodist' Makefile.in && exit 1
 +grep '^am__dist_sources =' Makefile.in
- grep '^am__dist_sources =.*nodist' Makefile.in && Exit 1
++grep '^am__dist_sources =.*nodist' Makefile.in && exit 1
  
  :
diff --cc t/nodist3.sh
index 07e90472439d7a8e544630dfdeded117bf471bc7,f45f66f9e180b4d2cbb28303503d34c11c7c4f2d..33a2d5c20c5a6f3f59edf44a351b59cdf3d8a9b8
@@@ -31,7 -31,7 +31,7 @@@ EN
  $ACLOCAL
  $AUTOMAKE
  
- grep '^dist:' Makefile.in && Exit 1
- grep 'am__dist_sources' Makefile.in && Exit 1
+ grep '^dist:' Makefile.in && exit 1
 -grep '^DIST_SOURCES =' Makefile.in && exit 1
++grep 'am__dist_sources' Makefile.in && exit 1
  
  :
diff --cc t/nostdinc.sh
index 62e752e6ac1c1d2d4fea4ae604d386bebe6f2320,812c6be221d422f84ec62dbf9aaed9f9c27f0a05..2ec2b82dab0871787d9d619c17504974df9d510b
  
  # Test to make sure nostdinc option works correctly.
  
 -# We don't require a C compiler explicitly, because the first part of the
 -# test (where 'Makefile.in' is grepped) does not require one.  Insted, we
 -# just skip the rest of the test if configure fails to find a working C
 -# compiler.
 -
 +required=cc
- . ./defs || Exit 1
+ . ./defs || exit 1
  
  cat >> configure.ac << 'END'
  AC_PROG_CC
@@@ -50,20 -45,12 +50,20 @@@ $AUTOMAKE --add-missin
  # Test with $builddir != $srcdir
  mkdir build
  cd build
 -../configure || exit $?
 -$EGREP '.*-I *(\.|\$.srcdir.)' Makefile && exit 1
 +../configure
- $MAKE V=1 > output || { cat output; Exit 1; }
++$MAKE V=1 > output || { cat output; exit 1; }
 +cat output
- grep '.*-I *\.' stdout && Exit 1
++grep '.*-I *\.' stdout && exit 1
 +$MAKE clean
 +# Shouldn't be picked up from builddir either.
 +cp ../stdlib.h .
 +$MAKE
 +cd ..
  
  # Test with $builddir = $srcdir
 -cd ..
 -./configure || exit $?
 -$EGREP '.*-I *(\.|\$.srcdir.)' Makefile && exit 1
 +./configure
- $MAKE V=1 > output || { cat output; Exit 1; }
++$MAKE V=1 > output || { cat output; exit 1; }
 +cat output
- grep '.*-I *\.' output && Exit 1
++grep '.*-I *\.' output && exit 1
  
 -exit 0
 +:
diff --cc t/objc-basic.sh
Simple merge
Simple merge
diff --cc t/objdir.sh
index 0f1f84466806d9e3a702dc274a9d26b5a2991a6e,d14f8c8f34b6683fd15562e275babc4ada2ecd9f..5d2a599b8e5297b9467982ce9ff6b610e014b5c6
  # You should have received a copy of the GNU General Public License
  # along with this program.  If not, see <http://www.gnu.org/licenses/>.
  
 -# Naming a subdirectory 'obj/' is a bad idea.  Automake should say so.
 +# A directory named 'obj' could create problems with BSD make, but
 +# shouldn't with GNU make; so check that
 +#  - the old portability warning diagnosing it is gone, and
 +#  - such a directory truly causes no problems with GNU make.
  
- . ./defs || Exit 1
 +am_create_testdir=empty
+ . ./defs || exit 1
  
 -mkdir obj
 -
 -cat >>configure.ac << 'END'
 -AC_CONFIG_FILES([obj/Makefile])
 +cat > configure.ac <<END
 +AC_INIT([$me], [1.0])
 +AC_CONFIG_AUX_DIR([obj])
 +AM_INIT_AUTOMAKE
 +AC_REQUIRE_AUX_FILE([Makefile])
 +AC_CONFIG_FILES([Makefile])
  AC_OUTPUT
  END
  
diff --cc t/option-ng.sh
index 3ad9fa74f5c873801596c21a81e9347421ac571e,ca3184dc6dd30adf7208f1221be9965f152ab976..11044273ac7a67a06d058730154ca4b5b143c7c1
  # You should have received a copy of the GNU General Public License
  # along with this program.  If not, see <http://www.gnu.org/licenses/>.
  
 -# Test to make sure '.txi' extension works.
 +# Automake-NG should recognize the (no-op) 'ng' option.
  
- . ./defs || Exit 1
+ . ./defs || exit 1
  
 -cat > Makefile.am << 'END'
 -info_TEXINFOS = foo.txi
 +cat > configure.ac <<END
 +AC_INIT([$me], [1.0])
 +AM_INIT_AUTOMAKE([ng])
 +AC_CONFIG_FILES([Makefile])
  END
  
 -echo '@setfilename foo.info' > foo.txi
 -: > texinfo.tex
 +echo AUTOMAKE_OPTIONS = ng > Makefile.am
  
  $ACLOCAL
  $AUTOMAKE
diff --cc t/output6.sh
Simple merge
Simple merge
index 11e3f0222cf9bd2dfa39b25526b89e53e8291dcb,0000000000000000000000000000000000000000..0c87cfa10b7bd6fb826322d18ecdb91b22275491
mode 100755,000000..100755
--- /dev/null
@@@ -1,75 -1,0 +1,75 @@@
- . ./defs || Exit 1
 +#! /bin/sh
 +# Copyright (C) 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 <http://www.gnu.org/licenses/>.
 +
 +# The parallel-tests driver should be able to cope with test scripts
 +# whose names end with several concatenated suffixes.
 +
-   $MAKE $j check >>stdout || { cat stdout; Exit 1; }
++. ./defs || exit 1
 +
 +cat >> configure.ac << 'END'
 +AC_OUTPUT
 +END
 +
 +tests='foo.sh foo.t.sh foo.sh.t foo.x.x foo.x.t.sh foo.t.x.sh foo.sh.t.x'
 +
 +for t in $tests; do
 +  (echo '#!/bin/sh' && echo 'echo == /$0 ==') > $t
 +  chmod a+x $t
 +done
 +
 +cat > Makefile.am <<END
 +TEST_EXTENSIONS = .t .sh .x
 +TESTS = $tests
 +END
 +
 +$ACLOCAL
 +$AUTOCONF
 +$AUTOMAKE -a
 +
 +./configure
 +
 +for j in '' -j4; do
 +
 +  # Use append mode here to avoid dropping output.  See automake bug#11413.
 +  # Also, use 'echo' here to "nullify" the previous contents of 'stdout',
 +  # since Solaris 10 /bin/sh would try to optimize a ':' away after the
 +  # first iteration, even if it is redirected.
 +  echo " " >stdout
++  $MAKE $j check >>stdout || { cat stdout; exit 1; }
 +  cat stdout
 +  count_test_results total=7 pass=7 fail=0 skip=0 xfail=0 xpass=0 error=0
 +  for t in $tests; do grep "^PASS: $t *$" stdout; done
 +
 +  grep '== .*/foo\.sh =='       foo.log
 +  grep '== .*/foo\.t\.sh =='    foo.t.log
 +  grep '== .*/foo\.sh\.t =='    foo.sh.log
 +  grep '== .*/foo\.x\.x =='     foo.x.log
 +  grep '== .*/foo\.x\.t\.sh ==' foo.x.t.log
 +  grep '== .*/foo\.t\.x\.sh ==' foo.t.x.log
 +  grep '== .*/foo\.sh\.t\.x ==' foo.sh.t.log
 +
 +  $MAKE $j clean
 +  test ! -f foo.log
 +  test ! -f foo.t.log
 +  test ! -f foo.sh.log
 +  test ! -f foo.x.log
 +  test ! -f foo.x.t.log
 +  test ! -f foo.t.x.log
 +  test ! -f foo.sh.t.log
 +
 +done
 +
 +:
index 625b5f6f1f600b9445c279b6e389f8e68f5fdf49,0000000000000000000000000000000000000000..da61450c4d5d9c716e55cf142df53d3499f87a92
mode 100755,000000..100755
--- /dev/null
@@@ -1,160 -1,0 +1,160 @@@
- . ./defs || Exit 1
 +#! /bin/sh
 +# Copyright (C) 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 <http://www.gnu.org/licenses/>.
 +
 +# Check that dynamic content for $(TESTS) is supported, both when set from
 +# inside the Makefile.am and when overridden from the command line.
 +
- $MAKE check > stdout || { cat stdout; Exit 1; }
++. ./defs || exit 1
 +
 +echo AC_OUTPUT >> configure.ac
 +
 +cat > ok <<'END'
 +#!/bin/sh
 +exit 0
 +END
 +
 +cat > ko <<'END'
 +#!/bin/sh
 +exit 1
 +END
 +
 +cat > sk <<'END'
 +#!/bin/sh
 +exit 77
 +END
 +
 +cat > er << 'END'
 +#!/bin/sh
 +echo $0 should not be run >&2
 +exit 99
 +END
 +
 +chmod a+x ko ok sk
 +
 +mkdir t
 +cp ok t/nosuffix
 +
 +cp ok g1.sh
 +cp ok g2.sh
 +cp ok g3.sh
 +cp ok g4.sh
 +cp er g5.sh
 +
 +cp ok t00-foo.sh
 +cp ok t02.sh
 +cp ok t57_mu.sh
 +cp ok t7311.sh
 +cp ko t98S.sh
 +cp ko t99.sh
 +cp er t1.sh
 +cp er t9.sh
 +cp er tx98.sh
 +
 +cp sk fu.sh
 +cp sk mu
 +
 +cat > get-tests-list <<END
 +#!/bin/sh
 +echo "g1.sh  ${tab}g2.sh "
 +if :; then echo '  g3.sh'; fi
 +echo
 +echo g4.sh
 +END
 +chmod a+x get-tests-list
 +
 +cat > Makefile.am << 'END'
 +my_add_dirprefix = $(strip $(1))/$(strip $(2))
 +EXTRA_DIST = $(TESTS) get-tests-list
 +TEST_EXTENSIONS = .sh
 +
 +t1 = fu
 +t2 = mux
 +
 +# Also try an empty match suffix, to ensure that the ':=' in there is
 +# not confused by the parser with an immediate assignment operator.
 +TESTS = $(t1:=.sh) $(t2:x=)
 +TESTS += $(wildcard $(srcdir)/t[0-9][0-9]*.sh)
 +TESTS += $(shell $(srcdir)/get-tests-list)
 +TESTS += $(call my_add_dirprefix, t, nosuffix)
 +XFAIL_TESTS = $(wildcard $(srcdir)/t9[0-9]*.sh)
 +END
 +
 +$ACLOCAL
 +$AUTOCONF
 +$AUTOMAKE -a
 +
 +./configure
 +
- $MAKE distcheck > stdout || { cat stdout; Exit 1; }
++$MAKE check > stdout || { cat stdout; exit 1; }
 +cat stdout
 +
 +count_test_results total=13 pass=9 fail=0 xpass=0 xfail=2 skip=2 error=0
 +
 +grep '^PASS: t/nosuffix$'  stdout
 +grep '^PASS: g1\.sh$'      stdout
 +grep '^PASS: g2\.sh$'      stdout
 +grep '^PASS: g3\.sh$'      stdout
 +grep '^PASS: g4\.sh$'      stdout
 +grep '^PASS: t00-foo\.sh$' stdout
 +grep '^PASS: t02\.sh$'     stdout
 +grep '^PASS: t57_mu\.sh$'  stdout
 +grep '^PASS: t7311\.sh$'   stdout
 +grep '^XFAIL: t98S\.sh$'   stdout
 +grep '^XFAIL: t99\.sh$'    stdout
 +grep '^SKIP: fu\.sh$'      stdout
 +grep '^SKIP: mu$'          stdout
 +
 +$MAKE mostlyclean
 +test "`find . -name *.log`" = ./config.log
 +
-   > stdout || { cat stdout; Exit 1; }
++$MAKE distcheck > stdout || { cat stdout; exit 1; }
 +cat stdout
 +count_test_results total=13 pass=9 fail=0 xpass=0 xfail=2 skip=2 error=0
 +
 +$MAKE check tests1='$(wildcard t00*.sh t98?.sh)' \
 +            tests2='$(shell ./get-tests-list | sed 1d)' \
 +            TESTS='$(tests1) $(tests2)' \
-   > stdout || { cat stdout; Exit 1; }
++  > stdout || { cat stdout; exit 1; }
 +cat stdout
 +
 +count_test_results total=4 pass=3 fail=0 xpass=0 xfail=1 skip=0 error=0
 +
 +grep '^PASS: g3\.sh$'     stdout
 +grep '^PASS: g4\.sh$'     stdout
 +grep '^PASS: t00-foo\.sh' stdout
 +grep '^XFAIL: t98S\.sh'   stdout
 +
 +$MAKE mostlyclean
 +test "`find . -name *.log`" = ./config.log
 +
 +$MAKE check TESTS='$(shell echo t00 | sed "s/$$/-foo/") t99'
 +test -f t00-foo.log
 +test -f t99.log
 +
 +$MAKE check \
 +      foo='E9E9E' \
 +      a='t00.err' \
 +      b='${a:.err=-foo}' \
 +      TESTS='$(b) t$(subst E,,$(foo)) $(call my_add_dirprefix,t,nosuffix)' \
++  > stdout || { cat stdout; exit 1; }
 +cat stdout
 +
 +count_test_results total=3 pass=2 fail=0 xpass=0 xfail=1 skip=0 error=0
 +grep '^PASS: t/nosuffix'  stdout
 +grep '^PASS: t00-foo\.sh' stdout
 +grep '^XFAIL: t99\.sh'    stdout
 +
 +:
index 9edd26021f5bb5407b10d37671b2dfeb66166dfe,0ed2ff255646bf6bec36eafec6d17fabea66df23..aefe6b5922dce16e5f5276e4dd9b2cf4b85c1652
  # 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 parallel-tests features:
 -# - empty TESTS
 -# - empty TEST_LOGS
 +# Check parallel-tests features: empty TESTS
  
- . ./defs || Exit 1
+ . ./defs || exit 1
  
  cat >> configure.ac << 'END'
  AC_CONFIG_FILES([sub1/Makefile sub2/Makefile])
Simple merge
index ab910950cd2e4f637b222ffdaf2861b36c848987,bd5bb7685bf96bc264a2aa6ef189dbd261f82e23..dd899ea1e459a2650e89fac95f4354917b6e9038
@@@ -83,21 -82,19 +83,21 @@@ LC_ALL=C grep '^[A-Z][A-Z]*:' stdout | 
  diff exp-fail got-fail
  
  st=1
 -XFAIL_TESTS="$failure_statuses 99" $MAKE -e check >stdout && st=0
 +$MAKE check XFAIL_TESTS="$failure_statuses 99" >stdout && st=0
  cat stdout
  cat test-suite.log
- test $st -gt 0 || Exit 1
+ test $st -gt 0 || exit 1
  LC_ALL=C grep '^[A-Z][A-Z]*:' stdout | LC_ALL=C sort > got-xfail-1
  diff exp-xfail-1 got-xfail-1
  
  st=0
 -XFAIL_TESTS="$failure_statuses" TESTS="0 77 $failure_statuses" \
 -  $MAKE -e check >stdout || st=$?
 +$MAKE check \
 +  XFAIL_TESTS="$failure_statuses" \
 +  TESTS="0 77 $failure_statuses" \
 +  > stdout || st=$?
  cat stdout
  cat test-suite.log
- test $st -eq 0 || Exit 1
+ test $st -eq 0 || exit 1
  LC_ALL=C grep '^[A-Z][A-Z]*:' stdout | LC_ALL=C sort > got-xfail-2
  diff exp-xfail-2 got-xfail-2
  
index 2fd09cfc515708489ea2584de023a5dbf869b297,52eb2b03ffd454b550689a6b85eb2cd0e8f7f8b3..7f2a0ea339186b3780ba11c639281da495d09a02
@@@ -151,10 -159,10 +151,10 @@@ $slee
  echo 'int main (void) { return 0; }' > none.c
  
  st=0
 -RECHECK_LOGS= $MAKE -e check >stdout || st=$?
 +$MAKE check AM_LAZY_CHECK=yes >stdout || st=$?
  cat stdout
  ls -l
- test $st -eq 0 || Exit 1
+ test $st -eq 0 || exit 1
  
  # For debugging.
  stat stamp foo.log bar.log baz.log || :
Simple merge
index 7542fb5c0cbb12f323575445940482cc26729eb1,2e6bfac1921514370c9cb13326bfc2b2b5692e36..8cb248ec96525ca66df007a4e0aab39b615dd71b
@@@ -62,12 -100,36 +62,12 @@@ do_check (
  {
    st=0
    log=$1; shift
 -  env "$@" $MAKE -e check >output 2>&1 || st=$?
 +  $MAKE "$@" check >output 2>&1 || st=$?
    cat output
-   $FGREP '::OOPS::' output && Exit 1 # Possible infinite recursion.
+   $FGREP '::OOPS::' output && exit 1 # Possible infinite recursion.
 -  # Check that at least we don't create a botched global log file.
 -  test ! -f "$log"
 -  if using_gmake; then
 -    grep "[Cc]ircular.*dependency" output | $FGREP "$log"
 -    test $st -gt 0
 -  else
 -    # Look for possible error messages about circular dependencies from
 -    # either make or our own recipes.  At least one such a message must
 -    # be present.  OTOH, some make implementations (e.g., NetBSD's), while
 -    # smartly detecting the circular dependency early and diagnosing it,
 -    # still exit with a successful exit status (yikes!).  So don't check
 -    # the exit status of non-GNU make, to avoid spurious failures.
 -    # this case.
 -    err_seen=no
 -    for err_rx in \
 -      'circular.* depend' \
 -      'depend.* circular' \
 -      'graph cycle' \
 -      'infinite (loop|recursion)' \
 -      'depend.* on itself' \
 -    ; do
 -      $EGREP -i "$err_rx" output | $FGREP "$log" || continue
 -      err_seen=yes
 -      break
 -    done
 -    test $err_seen = yes || exit 1
 -  fi
 +  grep "[Cc]ircular.*dependency" output | $FGREP "$log"
 +  grep "$log:.*depends on itself" output
 +  test $st -gt 0
  }
  
  : > test-suite.test
index b51b27182f6dec6d0c6f169bebd92ff72af138a6,8e1e014d721914a27ba4ce4658612356248235c8..4ac1f61887b54a34694a010833c47a3e397df288
@@@ -67,7 -69,8 +67,7 @@@ cat test-suite.lo
  grep '^ERROR: foo$' test-suite.log
  
  cd sub
- $MAKE DISABLE_HARD_ERRORS='' check && Exit 1
 -# The '-e' is wanted here.
 -DISABLE_HARD_ERRORS='' $MAKE -e check && exit 1
++$MAKE DISABLE_HARD_ERRORS='' check && exit 1
  cat test-suite.log
  grep '^ERROR: bar$' test-suite.log
  cd ..
index 8614c5c9eb1712810507380ce5b9bb26536e7b45,4211131c79145aacbc73fc91c2bba64fc2460f6b..f15852f6647a1383be4980c06a7401c789aa56ca
  # You should have received a copy of the GNU General Public License
  # along with this program.  If not, see <http://www.gnu.org/licenses/>.
  
 -# Test that := definitions work as expected at make time.
 +# Some internals of the parallel testsuite harness implementation.
  
- . ./defs || Exit 1
 -required=GNUmake
+ . ./defs || exit 1
  
  cat >> configure.ac << 'END'
  AC_OUTPUT
index 0d109bb5b2c5d569840b42bcf4ea65a9da656d98,9c4ffce0036ba2303f8bc33496a35162bd7639d5..a3b3a94fbfda706c521157b628fda76ee89a595a
@@@ -111,7 -111,7 +111,7 @@@ test -f bla.lo
  test -f bli.suff.log
  test -f sub/test.log
  
- $MAKE check T_LOG_FLAGS=--bad && Exit 1
 -T_LOG_FLAGS=--bad $MAKE -e check && exit 1
++$MAKE check T_LOG_FLAGS=--bad && exit 1
  cat test-suite.log
  cat bla.log
  # With the above flag overridden, bla.t should fail ...
index a02ec54028ad58814d76a1b066f1412b35b2b09a,1fa5d9a0559eeefed0cfc389df69b4b79d47540f..7aa3020a190e066a74f413ede8d3dbba1c47acb9
@@@ -73,10 -73,10 +73,10 @@@ cat test-suite.lo
  cp test-suite.log orig
  
  $MAKE clean
- test -f test-suite.log && Exit 99 # Sanity check.
+ 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
  cat zardoz.log
index 301eb57d049eea1336d6146c61de9ed6f1a8bfab,0d66b646c73ebb8140dd4ad997cef19c831e219f..50bdba2f16f57c94a0de58967aa822cc8fe3cec6
  # along with this program.  If not, see <http://www.gnu.org/licenses/>.
  
  # Test the example of usage of generic and extension-specific
 -# LOG_COMPILER and LOG_FLAGS given in the manual.
 +# LOG_COMPILER, LOG_FLAGS and LOG_DEPENDNECIES given in the manual.
  
  required=python
- . ./defs || Exit 1
+ . ./defs || exit 1
  
  cat >> configure.ac <<END
  AC_SUBST([PERL], ['$PERL'])
@@@ -64,10 -58,7 +64,10 @@@ $MAKE check || st=$
  cat foo.log
  cat bar.log
  cat baz.log
- test $st -eq 0 || Exit $st
 +cat foo.trs
 +cat bar.trs
 +cat baz.trs
+ test $st -eq 0 || exit $st
  
  # Check that the wrappers have been run with the expected flags.
  grep '[rR]eversed.*+=.*operator.*foo\.pl' foo.log
index a2d06ca329a9fa68957d39c848df6befdb9b0fc2,0000000000000000000000000000000000000000..521cefd647245e4a0400a48473b0183f782c6e2c
mode 100755,000000..100755
--- /dev/null
@@@ -1,64 -1,0 +1,64 @@@
- . ./defs || Exit 1
 +#! /bin/sh
 +# Copyright (C) 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 <http://www.gnu.org/licenses/>.
 +
 +# The parallel-tests driver must prefer tests with an extension to
 +# extension-less tests.  This is required to allow the user to have
 +# a, say, 'all.test' test case even in the face of the 'all' target.
 +
++. ./defs || exit 1
 +
 +echo AC_OUTPUT >> configure.ac
 +
 +cat > foo <<'END'
 +#!/bin/sh
 +echo "foo without suffix run" >&2
 +exit 99
 +END
 +
 +cat > foo.test <<'END'
 +#!/bin/sh
 +echo "$0 has been run"
 +END
 +chmod a+x foo.test
 +
 +cp foo.test all.test
 +cp foo.test dist.test
 +cp foo.test install.test
 +cp foo.test bad-target.test
 +
 +cat > Makefile.am << 'END'
 +bad-target:
 +      @echo $@ has been run >&2; exit 1
 +install-data-local:
 +      @echo $@ has been run >&2; exit 1
 +TESTS = foo.test all.test install.test dist.test bad-target.test
 +EXTRA_DIST = oops-this-does-not-exist
 +END
 +
 +$ACLOCAL
 +$AUTOCONF
 +$AUTOMAKE -a
 +
 +./configure --prefix="`pwd`/inst"
 +
 +$MAKE check
 +ls -l # For debugging.
 +test ! -d inst
 +for t in foo all install dist bad-target; do
 +  grep "$t\.test has been run" $t.log
 +done
 +
 +:
Simple merge
index 2f19fbc64049b5cb6a1dabbba6af5c69759e9999,c46993fef787054c784226e2328fce901632d95a..acfc16f9aff0915f63efe4fc4a0e0ea2fd1643df
@@@ -46,9 -45,9 +45,9 @@@ $AUTOMAKE --add-missin
  
  ./configure
  mv config.log config-log # Avoid possible false positives below.
- $MAKE check AM_COLOR_TESTS=always && Exit 1
 -AM_COLOR_TESTS=always $MAKE -e check && exit 1
++$MAKE check AM_COLOR_TESTS=always && exit 1
  # Not a useless use of cat; see above comments "grep-nonprinting"
  # requirement in 'test-init.sh'.
- cat *.log | grep "$esc" && Exit 1
+ cat *.log | grep "$esc" && exit 1
  
  :
index 2c696506a6f6ea86b5e9c79bd58b5659b7f349ce,70809a6a6b1dd3c38c5f49492f79384c633810e2..dae8b60131c7892a5cd51297991d8cbaf1d3319f
  # You should have received a copy of the GNU General Public License
  # along with this program.  If not, see <http://www.gnu.org/licenses/>.
  
 -# Test to make sure that mdate-sh is added to the right directory.
 -# Report from Kevin Dalley.
 +# The parallel-tests harness do not cause the same test to be
 +# uselessly run multiple times.
  
- . ./defs || Exit 1
+ . ./defs || exit 1
  
 -cat >> configure.ac << 'END'
 -AC_CONFIG_FILES([sub/Makefile])
 -END
 -
 -cat > Makefile.am << 'END'
 -SUBDIRS = sub
 -END
 +echo AC_OUTPUT >> configure.ac
 +echo TESTS = foo.test > Makefile.am
  
 -mkdir sub
 -
 -cat > sub/Makefile.am << 'END'
 -info_TEXINFOS = textutils.texi
 -END
 -
 -cat > sub/textutils.texi << 'END'
 -@include version.texi
 -@setfilename textutils.info
 +cat > foo.test <<'END'
 +#! /bin/sh
 +ls -l && mkdir bar
  END
 +chmod a+x foo.test
  
  $ACLOCAL
 +$AUTOCONF
  $AUTOMAKE -a
 -ls -l sub
 -test -f sub/mdate-sh
 +
 +./configure
 +
- $MAKE -j1 check || { cat test-suite.log; Exit 1; }
++$MAKE -j1 check || { cat test-suite.log; exit 1; }
 +rmdir bar
- $MAKE -j2 check || { cat test-suite.log; Exit 1; }
++$MAKE -j2 check || { cat test-suite.log; exit 1; }
 +rmdir bar
- $MAKE -j4 check || { cat test-suite.log; Exit 1; }
++$MAKE -j4 check || { cat test-suite.log; exit 1; }
  
  :
index d60a609e2c6b47af9f0d6f697b0b4a62b7e036bb,0000000000000000000000000000000000000000..7bf0017357c8b2dcc8c58015b1673d863d3f0ae6
mode 100755,000000..100755
--- /dev/null
@@@ -1,162 -1,0 +1,162 @@@
- . ./defs || Exit 1
 +#! /bin/sh
 +# Copyright (C) 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 <http://www.gnu.org/licenses/>.
 +
 +# The user should be able to easily specify extra dependencies for
 +# the test cases, depending on their extension (or lack thereof).
 +# We do so with the help of "${prefix}LOG_DEPENDENCIES" variables.
 +# See the last wishlist in automake bug#11287.
 +
++. ./defs || exit 1
 +
 +cat >> configure.ac <<'END'
 +AC_SUBST([EXEEXT], [.bin])
 +AC_OUTPUT
 +END
 +
 +cat > Makefile.am << 'END'
 +TEST_EXTENSIONS = .test .sh
 +TESTS = foo.test foo2.test bar.sh baz zard.oz quux.bin mu.test.bin
 +
 +TEST_LOG_DEPENDENCIES = test-dep
 +SH_LOG_DEPENDENCIES = sh-dep1 sh-dep2
 +LOG_DEPENDENCIES = dep
 +
 +DEPS = test-dep sh-dep1 sh-dep2 dep new-test-dep
 +$(DEPS):
 +      echo dummy > $@
 +CLEANFILES = $(DEPS)
 +
 +.PHONY: setup
 +setup:
 +      chmod a+x $(TESTS)
 +EXTRA_DIST = $(TESTS)
 +END
 +
 +cat > foo.test <<'END'
 +#! /bin/sh
 +test -f test-dep || test -f new-test-dep
 +END
 +
 +cat > foo2.test <<'END'
 +#! /bin/sh
 +test -f test-dep
 +END
 +
 +cp foo2.test mu.test.bin
 +
 +cat > bar.sh <<'END'
 +#! /bin/sh
 +test -f sh-dep1 && test -f sh-dep2
 +END
 +
 +cat > baz <<'END'
 +#! /bin/sh
 +test -f dep
 +END
 +
 +cp baz quux.bin
 +
 +cat > zard.oz <<'END'
 +#! /bin/sh
 +test -f dep
 +END
 +
 +$ACLOCAL
 +$AUTOCONF
 +$AUTOMAKE -a
 +
 +./configure
 +
 +$MAKE setup
 +
 +cleanup () { rm -f test-dep sh-dep1 sh-dep2 dep; }
 +
 +$MAKE check -j4
 +test ! -f new-test-dep
 +test -f test-dep
 +test -f sh-dep1
 +test -f sh-dep2
 +test -f dep
 +test -f quux.log  # Sanity check.
 +test -f mu.log    # Likewise.
 +
 +cleanup
 +
 +$MAKE check TESTS=foo.test
 +test -f test-dep
 +test ! -f sh-dep1
 +test ! -f sh-dep2
 +test ! -f dep
 +
 +cleanup
 +rm -f bar.log
 +$MAKE check TESTS=bar.sh AM_LAZY_CHECK=yes
 +test ! -f test-dep
 +test -f sh-dep1
 +test -f sh-dep2
 +test ! -f dep
 +
 +cleanup
 +$MAKE check TESTS=baz
 +test ! -f test-dep
 +test ! -f sh-dep1
 +test ! -f sh-dep2
 +test -f dep
 +
 +cleanup
 +$MAKE check TESTS='foo bar'
 +test -f test-dep
 +test -f sh-dep1
 +test -f sh-dep2
 +test ! -f dep
 +
 +cleanup
 +$MAKE check TESTS=zard.oz
 +test ! -f test-dep
 +test ! -f sh-dep1
 +test ! -f sh-dep2
 +test -f dep
 +
 +cleanup
 +$MAKE check TESTS=mu.test.bin
 +test -f test-dep
 +test ! -f sh-dep1
 +test ! -f sh-dep2
 +test ! -f dep
 +
 +cleanup
 +$MAKE check TESTS='quux.bin bar.sh'
 +test ! -f test-dep
 +test -f sh-dep1
 +test -f sh-dep2
 +test -f dep
 +
 +cleanup
 +$MAKE check TESTS=foo TEST_LOG_DEPENDENCIES=new-test-dep
 +test -f new-test-dep
 +test ! -f test-dep
 +test ! -f sh-dep1
 +test ! -f sh-dep2
 +test ! -f dep
 +
 +cleanup
 +$MAKE check TESTS=baz XFAIL_TESTS=baz LOG_DEPENDENCIES=
 +test ! -f dep
 +grep ':test-result: XFAIL' baz.trs
 +
 +$MAKE distcheck
 +
 +:
index f137e9385bdbf73dca3c757bbfcc097de5d34ae4,0088529241af28cee3ffe518fcdc7ce79df64e33..72dc491b5dfb9c1cd9ec749fcb692dadc1cb9184
  # 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 that ':test-results:' directives in test scripts' output doesn't
 -# originate spurious results in the testsuite summary.
 +# Check parallel-tests features: listing $(srcdir)/ in TESTS works.
  
- . ./defs || Exit 1
+ . ./defs || exit 1
  
 -cat >> configure.ac << 'END'
 -AC_OUTPUT
 -END
 +echo AC_OUTPUT >> configure.ac
  
  cat > Makefile.am << 'END'
 -TESTS = foo.test bar.test
 +TESTS = \
 +  $(srcdir)/foo \
 +  @srcdir@/foo2 \
 +  @srcdir@/bar.test \
 +  ${srcdir}/sub/baz.test \
 +  built.test
 +
 +XFAIL_TESTS = $(srcdir)/bar.test foo2
 +
 +built.test:
 +      (echo '#!/bin/sh' && echo 'exit 77') >$@-t
 +      chmod a-w,a+x $@-t && mv -f $@-t $@
  END
  
 -cat > foo.test <<'END'
 -#! /bin/sh
 -echo :test-result:XFAIL
 -echo :test-result: SKIP
 -echo :test-result:ERROR
 +cat > foo <<'END'
 +#!/bin/sh
  exit 0
  END
 -cat > bar.test <<'END'
 -#! /bin/sh
 -echo :test-result: ERROR
 -echo :test-result:FAIL
 -echo :test-result: XPASS
 -exit 0
 +chmod a+x foo
 +
 +cat > foo2 <<'END'
 +#!/bin/sh
 +exit 1
  END
 -chmod a+x foo.test bar.test
 +chmod a+x foo2
 +
 +cp foo2 bar.test
 +
 +mkdir sub
 +cp foo sub/baz.test
  
  $ACLOCAL
  $AUTOCONF
Simple merge
index fa2448a10316555cb7c0225aab34d8fb3397df97,895d4769e7d12b28e442c2a79ca3dedf915f545c..39e35192631ac1636d9074b330f7b9b17cb16aa7
@@@ -49,57 -51,25 +49,57 @@@ $AUTOMAKE -
  
  ./configure
  
 -for files in \
 -  'foo.log bar.log' \
 -  'foo.trs bar.trs' \
 -  'foo.trs bar.log' \
 -  'foo.log bar.trs' \
 -; do
 +doit ()
 +{
 +  rm -f $*
    $MAKE check
    rm -f test-suite.log
 -  chmod a-r $files
 -  $MAKE test-suite.log || { ls -l; exit 1; }
 -  ls -l
 -  grep '^foofoofoo$' foo.log
 -  grep '^:test-result: PASS' foo.trs
 -  grep '^barbarbar$' bar.log
 -  grep '^:test-result: SKIP' bar.trs
 -  grep '^SKIP: bar' test-suite.log
 -  grep '^barbarbar$' test-suite.log
 -  $EGREP ':.*foo|foofoofoo' test-suite.log && exit 1
 -  : For shells with busted 'set -e'.
 +  chmod a-r $*
-   $MAKE test-suite.log 2>stderr && { cat stderr >&2; Exit 1; }
++  $MAKE test-suite.log 2>stderr && { cat stderr >&2; exit 1; }
 +  cat stderr >&2
 +}
 +
 +could_not_read ()
 +{
 +  # We have to settle for weak checks to avoid spurious failures due to
 +  # the differences in error massages on different systems; for example:
 +  #
 +  #   $ cat unreadable-file # GNU/Linux or NetBSD
 +  #   cat: unreadable-file: Permission denied
 +  #   $ cat unreadable-file # Solaris 10
 +  #   cat: cannot open unreadable
 +  #
 +  #   $ grep foo unreadable-file # GNU/Linux and NetBSD
 +  #   grep: unreadable: Permission denied
 +  #   $ grep foo unreadable-file # Solaris 10
 +  #   grep: can't open "unreadable"
 +  #
 +  # Plus, we must cater to error messages displayed by our own awk
 +  # script: "cannot read "unreadable"".
 +  #
 +  # FIXME: this might still needs adjustments on other systems ...
 +  #
 +  grep "$1:.*[pP]ermission denied" stderr \
 +    || $EGREP "can(no|')t (open|read) [\"'\`]?$1" stderr
 +}
 +
 +for lst in bar.log 'foo.log bar.log'; do
 +  doit $lst
 +  could_not_read bar.log
 +  grep 'test-suite\.log:.* I/O error reading test results' stderr
  done
  
 +doit foo.trs
 +could_not_read foo.trs
 +grep 'test-suite\.log:.* I/O error reading test results' stderr
 +
 +doit foo.trs bar.trs
 +could_not_read foo.trs
 +could_not_read bar.trs
 +grep 'test-suite\.log:.* I/O error reading test results' stderr
 +
 +doit foo.trs bar.log
 +could_not_read foo.trs
 +grep 'test-suite\.log:.* I/O error reading test results' stderr
 +
  :
index 4adf8322870ec59577b40c5b69cd5bcd4bebab0b,f6ebb85a278b3e636306f12fa1c8f3cbab161020..dede278545781b9dbcdfe400217e955e8bf7a765
  #  - log files, and what goes in 'test-suite.log'
  #  - make clean
  #  - dependencies between tests
 -#  - TESTS redefinition at runtime
 -#  - TEST_LOGS redefinition at runtime
 -#  - RECHECK_LOGS redefinition at runtime
 +#  - TESTS redefinition at runtime (with and without test suffixes)
 +#  - AM_LAZY_CHECK
  
- . ./defs || Exit 1
+ . ./defs || exit 1
  
  cat >> configure.ac << 'END'
  AC_OUTPUT
@@@ -78,10 -84,10 +78,10 @@@ test ! -f test-suite.lo
  
  # Check dependencies: baz.test needs to run before bar.test,
  # but foo.test is not needed.
 -# Note that this usage has a problem: the summary will only
 -# take bar.log into account, because the $(TEST_SUITE_LOG) rule
 -# does not "see" baz.log.  Hmm.
 -env TESTS='bar.test' $MAKE -e check >stdout && { cat stdout; exit 1; }
 +# FIXME: Note that this usage has a problem: the summary will only
 +# FIXME: take bar.log into account, because the $(TEST_SUITE_LOG)
 +# FIXME: rule does not "see" baz.log.  Hmm.
- $MAKE check TESTS=bar.test >stdout && { cat stdout; Exit 1; }
++$MAKE check TESTS=bar.test >stdout && { cat stdout; exit 1; }
  cat stdout
  grep '^FAIL: baz\.test$' stdout
  grep '^ERROR: bar\.test$' stdout
@@@ -97,7 -103,7 +97,7 @@@ test -f test-suite.lo
  # Note that the previous test and this one taken together expose the timing
  # issue that requires the check-TESTS rule to always remove TEST_SUITE_LOG
  # before running the tests lazily.
- $MAKE check AM_LAZY_CHECK=yes > stdout && { cat stdout; Exit 1; }
 -env RECHECK_LOGS= $MAKE -e check > stdout && { cat stdout; exit 1; }
++$MAKE check AM_LAZY_CHECK=yes > stdout && { cat stdout; exit 1; }
  cat stdout
  test -f foo.log
  grep '^PASS: foo\.test$' stdout
@@@ -109,27 -115,37 +109,27 @@@ grep '^# ERROR: *1$' stdou
  
  # Now, explicitly retry with all test logs already updated, and ensure
  # that the summary is still displayed.
- $MAKE check AM_LAZY_CHECK=yes > stdout && { cat stdout; Exit 1; }
 -env RECHECK_LOGS= $MAKE -e check > stdout && { cat stdout; exit 1; }
++$MAKE check AM_LAZY_CHECK=yes > stdout && { cat stdout; exit 1; }
  cat stdout
- grep foo.test stdout && Exit 1
- grep bar.test stdout && Exit 1
- grep baz.test stdout && Exit 1
+ grep foo.test stdout && exit 1
+ grep bar.test stdout && exit 1
+ grep baz.test stdout && exit 1
  grep '^# PASS: *1$' stdout
  grep '^# FAIL: *1$' stdout
  grep '^# ERROR: *1$' stdout
  
 -# Lazily rerunning only foo should only rerun this one test.
 -env RECHECK_LOGS=foo.log $MAKE -e check > stdout && { cat stdout; exit 1; }
 -cat stdout
 -grep foo.test stdout
 -grep bar.test stdout && exit 1
 -grep baz.test stdout && exit 1
 -grep '^# PASS: *1$' stdout
 -grep '^# FAIL: *1$' stdout
 -grep '^# ERROR: *1$' stdout
 -
  $MAKE clean
- $MAKE check TESTS=baz > stdout && { cat stdout; Exit 1; }
 -env TEST_LOGS=baz.log $MAKE -e check > stdout && { cat stdout; exit 1; }
++$MAKE check TESTS=baz > stdout && { cat stdout; exit 1; }
  cat stdout
- grep foo.test stdout && Exit 1
- grep bar.test stdout && Exit 1
+ grep foo.test stdout && exit 1
+ grep bar.test stdout && exit 1
  grep baz.test stdout
  
  $MAKE clean
- $MAKE check TESTS=baz.test > stdout && { cat stdout; Exit 1; }
 -env TESTS=baz.test $MAKE -e check > stdout && { cat stdout; exit 1; }
++$MAKE check TESTS=baz.test > stdout && { cat stdout; exit 1; }
  cat stdout
- grep foo.test stdout && Exit 1
- grep bar.test stdout && Exit 1
+ grep foo.test stdout && exit 1
+ grep bar.test stdout && exit 1
  grep baz.test stdout
  
  :
Simple merge
Simple merge
index 4c01560bee9efb972b7d6cd9ff43cd738095dcf1,1a88ddfcdaf27fa0e81d0770fda34084eba1a5ed..f7aac36a5e96d723a7f40ccbffb0ae01f8bfa2d4
@@@ -20,8 -20,8 +20,8 @@@
  # Actually, this test doesn't ensure that things happen concurrently.
  # It merely serves as demonstration.  :-)
  
 -required='cc native GNUmake'
 +required='cc native'
- . ./defs || Exit 1
+ . ./defs || exit 1
  
  cat >> configure.ac << 'END'
  AC_PROG_CC
index 94b464d5d453ee35c6a6f64be7a8fd0eeab98694,4f46cebe681587778c8bd911e6c3dfec048d5a3d..018964ae0d9f6d15dc0ee7259a36ecb4c99c0f3f
  
  # Check parallel-tests features:
  # - empty TESTS
 -# BSD make will expand '$(TESTS:=.log)' to '.log' unless overridden.
  # See parallel-tests10.test for a similar issue.
  
- . ./defs || Exit 1
+ . ./defs || exit 1
 -cat >> configure.ac << 'END'
 -AC_OUTPUT
 -END
  
- cat >> configure.ac << 'END'
- AC_OUTPUT
 -cat > Makefile.am << 'END'
 -TESTS =
--END
++echo AC_OUTPUT >> configure.ac
 +
- cat > Makefile.am << 'END'
- TESTS =
- END
++echo TESTS = > Makefile.am
  
  $ACLOCAL
  $AUTOCONF
@@@ -39,4 -39,4 +35,4 @@@ for x in TOTAL PASS FAIL XPASS FAIL SKI
    grep "^# $x: *0$" stdout
  done
  
- Exit 0
 -exit 0
++:
index 4f322319a455dc25967873893bf0587d2e9a5f77,3e047598a4a4d6605ef8ec337041506bed5dfa58..6d6bdce5cb62da05d072ff741b3fe85d17830f78
  # 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 parallel-tests features:
 -# - generated distributed tests.
 -# - listing $(srcdir)/ or $(top_srcdir)/ in TESTS doesn't work ATM,
 -#   and is thus diagnosed.
 -
 -# TODO: this test should also ensure that the 'make' implementation
 -#       properly adheres to rules in all cases.  See the Autoconf
 -#       manual for the ugliness in this area, when VPATH comes into
 -#       play.  :-/
 +# Check parallel-tests features: generated distributed tests.
  
- . ./defs || Exit 1
+ . ./defs || exit 1
  
  cat >> configure.ac << 'END'
  AC_OUTPUT
index c33319488bbb3c0e6820501d5c09a937a7516ce7,f099f0224360be5afca6aad68b3899daf91a6116..50558aa3705c87cc2f0bf016fed2a04cd8b11ceb
  # 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 a documented limitation of the Automake's Makefile parser
 -# w.r.t. POSIX variable substitutions used in the name of targets.
 -# See Section "General Operation" in the Automake manual.
 -# If you cause some parts of this test to fail, chances are that you've
 -# improved the Automake parser ;-)
 -# See: <http://lists.gnu.org/archive/html/automake/2010-08/msg00074.html>
 -# or: <http://thread.gmane.org/gmane.comp.sysutils.automake.general/11943/focus=11962>
 +# Automake do not complain about nor messes up pattern rules.
  
- . ./defs || Exit 1
+ . ./defs || exit 1
  
 +echo AC_OUTPUT >> configure.ac
 +
  cat > Makefile.am <<'END'
 -$(FOO:=x): bar
 +foo/%.out: bar/%.in
 +      test -d $(dir $@) || $(MKDIR_P) $(dir $@)
 +      cp $< $@
 +%.sh: %/z
 +      cp $< $@
 +%:
 +      echo True > $@
 +noinst_DATA = foo/one.out
 +noinst_SCRIPTS = two.sh mu.py
  END
  
 +mkdir bar two
 +echo "123456789" > bar/one.in
 +echo "#!/bin/sh" > two/z
 +
  $ACLOCAL
 -AUTOMAKE_fails
 +$AUTOCONF
 +$AUTOMAKE
  
 -grep 'bad characters.*variable name.*\$(FOO' stderr
 -grep ':=.*assignments.*not portable' stderr
 +for vpath in : false; do
 +  if $vpath; then
 +    mkdir build
 +    cd build
 +    srcdir=..
 +  else
 +    srcdir=.
 +  fi
 +  $srcdir/configure
 +  $MAKE
 +  diff $srcdir/bar/one.in ./foo/one.out
 +  diff $srcdir/two/z ./two.sh
 +  test `cat mu.py` = True
 +  cd $srcdir
 +done
  
  :
Simple merge
index fa2dda30f93e8a52cd23f029d92f2e2977602a83,0000000000000000000000000000000000000000..f8b8636923c0a3b2ce23cb7277eb3528df2f0412
mode 100755,000000..100755
--- /dev/null
@@@ -1,96 -1,0 +1,96 @@@
- . ./defs || Exit 1
 +#! /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 <http://www.gnu.org/licenses/>.
 +
 +# Test executable-specific and library-specific flags, both with
 +# and without dependency tracking.
 +
- $FGREP ')-c' $makefiles && Exit 1
++. ./defs || exit 1
 +
 +cat > configure.ac << END
 +AC_INIT([$me], [1.0])
 +AM_INIT_AUTOMAKE([-Wno-extra-portability])
 +AC_CONFIG_FILES([Makefile libMakefile Makefile2 libMakefile2])
 +AC_PROG_CC
 +AM_PROG_CC_C_O
 +AC_PROG_CXX
 +AC_PROG_RANLIB
 +AC_OUTPUT
 +END
 +
 +$ACLOCAL
 +
 +makefiles='Makefile libMakefile Makefile2 libMakefile2'
 +
 +cat > Makefile.am << 'END'
 +bin_PROGRAMS = foo
 +foo_SOURCES = foo.c
 +foo_CFLAGS = -DBAR
 +END
 +
 +cat > libMakefile.am << 'END'
 +lib_LIBRARIES = libfoo.a
 +libfoo_a_SOURCES = foo.c bar.cc
 +libfoo_a_CFLAGS = -DBAR
 +libfoo_a_CXXFLAGS = -DZOT
 +END
 +
 +cat - Makefile.am > Makefile2.am << 'END'
 +AUTOMAKE_OPTIONS = no-dependencies
 +END
 +
 +cat - libMakefile.am > libMakefile2.am << 'END'
 +AUTOMAKE_OPTIONS = no-dependencies
 +END
 +
 +# Make sure 'compile' is required.
 +for m in $makefiles; do
 +  AUTOMAKE_fails $m
 +  $EGREP " required file.* '(compile|\./compile)'" stderr
 +done
 +
 +: > compile
 +$AUTOMAKE
 +
 +# Regression test for missing space.
- $FGREP '.o.o' $makefiles && Exit 1
- $FGREP '.obj.obj' $makefiles && Exit 1
- $FGREP '.$(OBJEXT).$(OBJEXT)' $makefiles && Exit 1
++$FGREP ')-c' $makefiles && exit 1
 +
 +# Regression test for botchedly transformed object names.
- $EGREP '[^-](foo|bar)\.[o$]' $makefiles && Exit 1
++$FGREP '.o.o' $makefiles && exit 1
++$FGREP '.obj.obj' $makefiles && exit 1
++$FGREP '.$(OBJEXT).$(OBJEXT)' $makefiles && exit 1
 +
 +# Watch against non-transformed "foo.$(OBJEXT)", "foo.o" and "foo.obj"
 +# (and similarly for bar).
- grep 'COMPILE. [^-]' $makefiles && Exit 1
- grep 'COMPILE. .[^c]' $makefiles && Exit 1
++$EGREP '[^-](foo|bar)\.[o$]' $makefiles && exit 1
 +
 +# All our programs and libraries have per-target flags, so all
 +# the compilers invocations must use an explicit '-c' option.
++grep 'COMPILE. [^-]' $makefiles && exit 1
++grep 'COMPILE. .[^c]' $makefiles && exit 1
 +
 +$FGREP 'foo-foo.$(OBJEXT)' Makefile.in
 +$FGREP 'foo-foo.$(OBJEXT)' Makefile2.in
 +$FGREP 'libfoo_a-foo.$(OBJEXT)' libMakefile.in
 +$FGREP 'libfoo_a-foo.$(OBJEXT)' libMakefile2.in
 +$FGREP 'libfoo_a-bar.$(OBJEXT)' libMakefile.in
 +$FGREP 'libfoo_a-bar.$(OBJEXT)' libMakefile2.in
 +
 +$FGREP '$(foo_CFLAGS)' Makefile.in
 +$FGREP '$(foo_CFLAGS)' Makefile2.in
 +$FGREP '$(libfoo_a_CFLAGS)' libMakefile.in
 +$FGREP '$(libfoo_a_CFLAGS)' libMakefile2.in
 +
 +:
diff --cc t/phony.sh
Simple merge
diff --cc t/pluseq3.sh
Simple merge
diff --cc t/pluseq5.sh
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
diff --cc t/pr2.sh
Simple merge
diff --cc t/pr224.sh
Simple merge
diff --cc t/pr401.sh
Simple merge
diff --cc t/pr401b.sh
Simple merge
diff --cc t/pr401c.sh
Simple merge
Simple merge
diff --cc t/pr87.sh
Simple merge
diff --cc t/pr9.sh
index 2556b8b80c94ef40c0d3715da721c3fee3f8be7b,ccb0b93cc4feede26063c2b7814245e702fbc4d5..15e8b4b97e4072fbf9ffb4fd3324133b0b6905e2
+++ b/t/pr9.sh
  # == Report ==
  # When AC_CONFIG_AUX_DIR is set (in my case to 'support'), make dist
  # no longer automatically includes config.guess, config.sub, install-sh,
 -# ltconfig, ltmain.sh, mdate-sh, missing, and mkinstalldirs.  In fact,
 -# the entire 'support/' directory is omitted.
 +# ltconfig, ltmain.sh, mdate-sh, and missing.  In fact, the entire
 +# 'support/' directory is omitted.
  
- . ./defs || Exit 1
+ . ./defs || exit 1
  
  cat > configure.ac << END
  AC_INIT([$me], [1.0])
Simple merge
Simple merge
index 92beb097ace130a2421c4a0bfd944c992fe455ef,9596ba801214e92b186dc70e9c10e7aebd5e735c..b57157ab6f646f331181b4b230a918875d1621f7
@@@ -15,8 -15,9 +15,8 @@@
  # along with this program.  If not, see <http://www.gnu.org/licenses/>.
  
  # Check that the "all" target triggers rebuilt of outdated Makefiles.
 -# See also sister test 'remake-all-2.test'.
  
- . ./defs || Exit 1
+ . ./defs || exit 1
  
  mkfile=Makefile
  
@@@ -37,12 -38,14 +37,12 @@@ echo SUBDIRS = sub > $mkfile.a
  : > sub/$mkfile.am
  
  $ACLOCAL
 +$AUTOCONF
  $AUTOMAKE
  
 -$EGREP "^all-am:.* $mkfile( |$)" $mkfile.in sub/$mkfile.in
 -
 -$AUTOCONF
  ./configure
  
- $FGREP "$magic1" mkfile.in && Exit 1 # Sanity check.
+ $FGREP "$magic1" mkfile.in && exit 1 # Sanity check.
  
  # Two code paths in configure.am:
  
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
index 52afc445ff0be042105c3a373499b09cc9fbacf4,24d5c4c0ae3fd3d57872f270bbdc008f3aba9b8f..a2ead759c7db9df1d5f61dbac43c1a7b6f6efbfc
@@@ -20,7 -20,8 +20,7 @@@
  # See also the other similar tests 'remake-subdir*.test', and the
  # related test 'aclocal5.test'
  
- . ./defs || Exit 1
 -required=GNUmake
+ . ./defs || exit 1
  
  magic1='::MagicString::One::'
  magic2='__MagicString__Two__'
Simple merge
index a297b44a6064e65ec52c2330be2a7d301c80c887,5026d16842edbe166b6d2b5ec64008bf9b5e5df0..412630bc0a959710c8bcb18a7ec7016346d5ae66
  # See also the other similar tests 'remake-subdir*.test', and the
  # related test 'aclocal5.test'.
  
- . ./defs || Exit 1
+ . ./defs || exit 1
  
 -if using_gmake; then
 -  remake=$MAKE
 -else
 -  remake="$MAKE Makefile"
 -fi
 -
  magic1='::MagicString::One::'
  magic2='__MagicString__Two__'
  
diff --cc t/remake10a.sh
index 67da954a11a7768e22e933c859946190227be589,830d6ca2bf372e52b5316ed1219ac89cd7a35c36..232c1d5d00af486fccf38ee6fb78bd8437813386
@@@ -92,10 -96,11 +92,10 @@@ for vpath in : false; d
  
    $sleep
    echo "m4_define([my_fingerprint], [DummyValue])" > $top_srcdir/foo.m4
 -  using_gmake || $remake
    $MAKE distcheck
-   $FGREP $magic1 Makefile && Exit 1 # Sanity check.
-   $FGREP $magic2 Makefile && Exit 1 # Likewise.
-   $FGREP $magic3 Makefile && Exit 1 # Likewise.
+   $FGREP $magic1 Makefile && exit 1 # Sanity check.
+   $FGREP $magic2 Makefile && exit 1 # Likewise.
+   $FGREP $magic3 Makefile && exit 1 # Likewise.
  
    $MAKE distclean
  
diff --cc t/remake10b.sh
index c3f573db7a1e37b5a8aa8f81f56080d4197db254,7aeab79162c22f59b8a34e1b5cb7de8423846a5d..fe491993ef80c2457a453e9d3982bc4ccc43acc5
@@@ -91,10 -95,11 +91,10 @@@ for vpath in : false; d
  
    $sleep
    echo "FINGERPRINT = DummyValue" > $top_srcdir/foo.am
 -  using_gmake || $remake
    $MAKE distcheck
-   $FGREP $magic1 Makefile && Exit 1 # Sanity check.
-   $FGREP $magic2 Makefile && Exit 1 # Likewise.
-   $FGREP $magic3 Makefile && Exit 1 # Likewise.
+   $FGREP $magic1 Makefile && exit 1 # Sanity check.
+   $FGREP $magic2 Makefile && exit 1 # Likewise.
+   $FGREP $magic3 Makefile && exit 1 # Likewise.
  
    $MAKE distclean
  
diff --cc t/remake10c.sh
index c94cd982abcd7c6e774849d8250c510ed0ae0a3b,e88c31c2706a7f78e48e384771f70133c5396b5f..739d7a73a5429df25a812028f7ee9167ea1e60dc
@@@ -95,10 -99,11 +95,10 @@@ for vpath in : false; d
    $sleep
    echo "AC_DEFUN([my_fingerprint], [DummyValue])" > $top_srcdir/m4/foo.m4
    echo "AC_DEFUN([AM_UNUSED], [NoSuchMacro])" > $top_srcdir/m4/bar.m4
 -  using_gmake || $remake
    $MAKE distcheck
-   $FGREP $magic1 Makefile && Exit 1 # Sanity check.
-   $FGREP $magic2 Makefile && Exit 1 # Likewise.
-   $FGREP $magic3 Makefile && Exit 1 # Likewise.
+   $FGREP $magic1 Makefile && exit 1 # Sanity check.
+   $FGREP $magic2 Makefile && exit 1 # Likewise.
+   $FGREP $magic3 Makefile && exit 1 # Likewise.
  
    $MAKE distclean
  
diff --cc t/remake12.sh
index dda55503f114e8fc7a3841b64c6421e0fdaead05,02cef718e73a59add6c200d50db84aabd190adb3..15a56cec4023324b3496bf7941725b7c42f5022c
@@@ -83,9 -102,13 +83,9 @@@ check-local: my-chec
  END
  mv -f t zardoz.am
  cat zardoz.am # For debugging.
 -if using_gmake; then
 -  $MAKE nil
 -else
 -  $MAKE zardoz
 -fi
 +$MAKE nil
  $FGREP my-check zardoz # Sanity check.
- $FGREP $magic1 zardoz zardoz.in && Exit 1
+ $FGREP $magic1 zardoz zardoz.in && exit 1
  $FGREP $magic2 zardoz
  $FGREP $magic2 zardoz.in
  
@@@ -100,12 -123,13 +100,12 @@@ sed '/^#H:/d' zardoz.am > quux.a
  echo 'FOO = dummy' >> quux.am
  echo 'BAR = $(BAZ)' > top.in
  echo "BAZ = $magic3" > bot.in
 -is_gmake || $MAKE zardoz
  $MAKE test
  $FGREP my-check zardoz # Sanity check.
- $FGREP $magic3 quux.in && Exit 1
+ $FGREP $magic3 quux.in && exit 1
  $FGREP $magic3 zardoz
- $FGREP $magic1 zardoz && Exit 1
- $FGREP $magic2 zardoz && Exit 1
+ $FGREP $magic1 zardoz && exit 1
+ $FGREP $magic2 zardoz && exit 1
  # After the remake above, the files 'zardoz.am' and 'zardoz.in'
  # should be no more needed.
  echo 'endif' > zardoz.am # Put in a syntax error.
diff --cc t/remake4.sh
Simple merge
diff --cc t/remake5.sh
index be98afd16e79fb50c72bb35c361df30cd5fc6932,b1e8dd8dbf865e5e318cb958b4ecc3c6133ae0a1..1383d0d04a2dd476f643b9c95498ef1ab6d9a210
  # but not all.
  # Report from Ralf Corsepius.
  
- . ./defs || Exit 1
+ . ./defs || exit 1
  
 -if using_gmake; then
 -  remake="$MAKE"
 -else
 -  remake="$MAKE Makefile"
 -fi
 -
  cat >>configure.ac <<'EOF'
  AM_MAINTAINER_MODE
  m4_include([foo.m4])
@@@ -58,8 -64,8 +58,8 @@@ $slee
  grep 'AUTOCONF.*=.*false' Makefile
  : > rebuild_ok
  ./configure --no-create
 -$remake
 +$MAKE
- grep 'AUTOCONF.*=.*false' Makefile && Exit 1
+ grep 'AUTOCONF.*=.*false' Makefile && exit 1
  
  # Make sure rebuild rules do work if --enable-maintainer-mode is given.
  ./configure --enable-maintainer-mode
diff --cc t/remake8a.sh
Simple merge
diff --cc t/remake8b.sh
Simple merge
diff --cc t/remake9a.sh
index f9a2b836770012de9ce00499953091f906314374,3e811b7662281b5ae371e0cb9558ecb5b6536a3f..5678722424db45f42d8b09fd299700cf7819c3cc
@@@ -79,9 -85,9 +79,9 @@@ for vpath in : false; d
    $sleep
    echo 'sed "s/^\\(FINGERPRINT\\)=.*/\\1='$magic2'/"' \
      > $srcdir/tweak-configure-in
 -  remake_
 +  $MAKE nil
    $FGREP FINGERPRINT Makefile # For debugging.
-   $FGREP $magic1 Makefile && Exit 1
+   $FGREP $magic1 Makefile && exit 1
    $FGREP $magic2 Makefile
    test x"$(./foo.sh)" = x"$magic2"
  
    echo cat > $srcdir/tweak-configure-in # Make it a no-op again.
    sed "s/^\\(FINGERPRINT\\)=.*/\\1=DummyValue/" $srcdir/configure.ac >t
    mv -f t $srcdir/configure.ac
 -  using_gmake || remake_
    $MAKE distcheck
-   $FGREP $magic1 Makefile && Exit 1 # Sanity check.
-   $FGREP $magic2 Makefile && Exit 1 # Likewise.
+   $FGREP $magic1 Makefile && exit 1 # Sanity check.
+   $FGREP $magic2 Makefile && exit 1 # Likewise.
  
    $MAKE distclean
  
diff --cc t/remake9b.sh
index 901ebe2c62bc6ebe5abb1d4e9a01a9c38fed7b8b,c90a9820e08e59e1352f5638467286b7133bc0de..262642c7c105a3bbd4b9cabd6de0ab12705e9167
  # Test remake rules when Makefile.am or its prerequisites change.
  # Keep in sync with the other sister tests 'remake9*.test'.
  
- . ./defs || Exit 1
+ . ./defs || exit 1
  
 -if using_gmake; then
 -  remake_() { $MAKE nil; }
 -else
 -  remake_() { $MAKE Makefile && $MAKE foo.sh; }
 -fi
 -
  magic1=::MagicStringOne::
  magic2=__MagicStringTwo__
  
@@@ -81,9 -87,9 +81,9 @@@ for vpath in : false; d
    $sleep
    echo 'sed "s/^\\(FINGERPRINT\\) *=.*/\\1 = '$magic2'/"' \
      > $srcdir/tweak-makefile-am
 -  remake_
 +  $MAKE nil
    $FGREP FINGERPRINT Makefile # For debugging.
-   $FGREP $magic1 Makefile && Exit 1
+   $FGREP $magic1 Makefile && exit 1
    $FGREP $magic2 Makefile
    test x"$(./foo.sh)" = x"$magic2"
  
    echo cat > $srcdir/tweak-makefile-am # Make it a no-op again.
    sed "s/^\\(FINGERPRINT\\) *=.*/\\1 = DummyValue/" $srcdir/Makefile.am >t
    mv -f t $srcdir/Makefile.am
 -  using_gmake || remake_
    $MAKE distcheck
-   $FGREP $magic1 Makefile && Exit 1 # Sanity check.
-   $FGREP $magic2 Makefile && Exit 1 # Likewise.
+   $FGREP $magic1 Makefile && exit 1 # Sanity check.
+   $FGREP $magic2 Makefile && exit 1 # Likewise.
  
    $MAKE distclean
  
diff --cc t/remake9c.sh
index 7ef7ca10d9f42a352843c8dcc8a9599b5f8ab3d9,c39bac1f92f427b0f740b396d8b190b28e2ed0e2..e640593167ef6243d66b8e0156e3371bb31e751f
@@@ -83,18 -89,19 +83,18 @@@ for vpath in : false; d
    $sleep
    echo "echo 'AC_DEFUN([my_fingerprint], [$magic2])'" \
      > $srcdir/tweak-acinclude-m4
 -  remake_
 +  $MAKE nil
    $FGREP FINGERPRINT Makefile # For debugging.
-   $FGREP $magic1 Makefile && Exit 1
+   $FGREP $magic1 Makefile && exit 1
    $FGREP $magic2 Makefile
    test x"$(./foo.sh)" = x"$magic2"
  
    $sleep
    echo : > $srcdir/tweak-acinclude-m4 # Make it a no-op again.
    echo "AC_DEFUN([my_fingerprint], [DummyValue])" > $srcdir/acinclude.m4
 -  using_gmake || remake_
    $MAKE distcheck
-   $FGREP $magic1 Makefile && Exit 1 # Sanity check.
-   $FGREP $magic2 Makefile && Exit 1 # Likewise.
+   $FGREP $magic1 Makefile && exit 1 # Sanity check.
+   $FGREP $magic2 Makefile && exit 1 # Likewise.
  
    $MAKE distclean
  
diff --cc t/remake9d.sh
index 9a4e77796bc5a54d2486d2a6059dfc25b7cc98fc,23441ac5dc2364c5241730a346ae4908c2e8e480..5c8fb2f7a86bbae3e7027d21d355fa41102f8dac
@@@ -83,18 -89,19 +83,18 @@@ for vpath in : false; d
    $sleep
    echo "sed 's/.*dnl *%%%.*/AC_DEFUN([my_fingerprint], [$magic2])/'" \
      > $srcdir/tweak-aclocal-m4
 -  remake_
 +  $MAKE nil
    $FGREP FINGERPRINT Makefile # For debugging.
-   $FGREP $magic1 Makefile && Exit 1
+   $FGREP $magic1 Makefile && exit 1
    $FGREP $magic2 Makefile
    test x"$(./foo.sh)" = x"$magic2"
  
    $sleep
    echo cat > $srcdir/tweak-aclocal-m4 # Make it a no-op again.
    echo 'AC_DEFUN([my_fingerprint], [DummyValue])' >> $srcdir/aclocal.m4
 -  using_gmake || remake_
    $MAKE distcheck
-   $FGREP $magic1 Makefile && Exit 1 # Sanity check.
-   $FGREP $magic2 Makefile && Exit 1 # Likewise.
+   $FGREP $magic1 Makefile && exit 1 # Sanity check.
+   $FGREP $magic2 Makefile && exit 1 # Likewise.
  
    $MAKE distclean
  
index e48a60faa846a6d314c72bec3ceddd87cccf8934,53dc6662f5c12b159cee110c8793fc6a04b6f192..0eea68499f59769e0b11365d2fadeaba449e4fa3
  # Check that automake does not complain on repeated options, nor
  # generate broken or incorrect makefiles.
  
 -required='cc bzip2'
 +required=bzip2
- . ./defs || Exit 1
+ . ./defs || exit 1
  
  cat >configure.ac <<END
  AC_INIT([$me], [1.0])
 -AM_INIT_AUTOMAKE([foreign dist-bzip2 no-dist-gzip no-dist-gzip dist-bzip2])
 -AC_PROG_CC
 -AM_PROG_CC_C_O
 +AM_INIT_AUTOMAKE([foreign foreign dist-bzip2 no-dist-gzip dist-bzip2])
- AC_PROG_CC
  AC_CONFIG_FILES([Makefile])
  AC_OUTPUT
  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
-   || { cat stderr >&2; Exit 1; }
 +$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
  
diff --cc t/reqd.sh
Simple merge
index 7e09fc79b949e7ffa9ded883a062502ee4dfe653,96b831a57f0b7c4eb13c4889c79c8216c1035dfa..2bbe82d81873afbf07dc47573f8ebb9b3ba744b4
@@@ -66,10 -66,10 +66,10 @@@ 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
-           grep "compare-autodiffs" Makefile || Exit 1
-           case $(pwd) in '"$cwd"') : ;; *) Exit 1;; esac'
+          'test ! -d t/_self.dir || exit 1
+           test ! -f t/_self.dir || exit 1
+           test ! -r 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'
  
  :
index 809c519276d663dee9648e9fc3e01fc97a9981d4,95cee71edf2d7c943e4b722e84bfa4092e16dae9..1e7d367bbbcfee976fdbc67a2df9b7f0127b16e0
@@@ -21,9 -21,9 +21,9 @@@ am_create_testdir=empt
  
  hasnt_parallel_tests ()
  {
-   $EGREP -i 'test_suite_log|test_(logs|bases)|\.log.*:' $1 && Exit 1
-   grep 'recheck.*:' $1 && Exit 1
 -  $EGREP 'TEST_SUITE_LOG|TEST_LOGS|\.log.*:' $1 && exit 1
++  $EGREP -i 'test_suite_log|test_(logs|bases)|\.log.*:' $1 && exit 1
+   grep 'recheck.*:' $1 && exit 1
 -  grep '^check-TESTS: \$(TESTS)$' $1
 +  grep '^check-TESTS: \$(am__cooked_tests)$' $1
  }
  
  has_parallel_tests ()
Simple merge
diff --cc t/silent-lex.sh
index a663961f01d3295cf966b98e886ecf0408007f0d,e9c6b555645bf768b02bc44d6f432455976159bd..5b98a1bb66e570533e949a09780e6eb0473f0f42
  # Check silent-rules mode for Lex.
  
  required='cc lex'
- . ./defs || Exit 1
+ . ./defs || exit 1
  
 -mkdir sub
 -
  cat >>configure.ac <<'EOF'
  AM_PROG_CC_C_O
  AC_PROG_LEX
@@@ -53,20 -69,25 +53,20 @@@ $AUTOMAKE --add-missin
  $AUTOCONF
  
  # Ensure per-target rules are used, to ensure their coverage below.
- $FGREP 'foo2-foo.c' Makefile.in || Exit 99
+ $FGREP 'foo2-foo.c' Makefile.in || exit 99
 -$FGREP 'bar2-bar.c' sub/Makefile.in || exit 99
  
  ./configure --enable-silent-rules
  
- $MAKE >stdout || { cat stdout; Exit 1; }
+ $MAKE >stdout || { cat stdout; exit 1; }
  cat stdout
  
- $EGREP ' (-c|-o)' stdout && Exit 1
- $EGREP '(mv|ylwrap) ' stdout && Exit 1
+ $EGREP ' (-c|-o)' stdout && exit 1
+ $EGREP '(mv|ylwrap) ' stdout && exit 1
  
  grep 'LEX .*foo\.' stdout
 -grep 'LEX .*bar\.' stdout
  grep ' CC .*foo\.' stdout
 -grep ' CC .*bar\.' stdout
  grep 'CCLD .*foo1' stdout
 -grep 'CCLD .*bar1' stdout
  grep 'CCLD .*foo2' stdout
 -grep 'CCLD .*bar2' stdout
  
  # Cleaning and then rebuilding with the same V flag (and without
  # removing the generated sources in between) shouldn't trigger a
@@@ -86,9 -109,10 +86,9 @@@ grep 'CCLD .*foo2' stdou
  
  # Ensure a truly clean rebuild.
  $MAKE clean
 -rm -f *foo.c sub/*bar.c
 +rm -f *foo.c
  
- $MAKE V=1 >stdout || { cat stdout; Exit 1; }
+ $MAKE V=1 >stdout || { cat stdout; exit 1; }
  cat stdout
  
  grep ' -c ' stdout
index 1560bc21d8b8f90c19490d66914e45b28c51be87,433aaa62d635e89cf1c9887650cf270d6b335e25..a36948722a3f3ab0e64fc44a11ae46e4828bafa4
@@@ -39,19 -39,24 +39,19 @@@ do_and_check_silent_build (
    mv -f t stdout
    cat stdout
  
-   $EGREP ' (-c|-o)' stdout && Exit 1
-   $EGREP '(mv|ylwrap) ' stdout && Exit 1
+   $EGREP ' (-c|-o)' stdout && exit 1
+   $EGREP '(mv|ylwrap) ' stdout && exit 1
  
 +  grep ' CC .*bar\.'  stdout
    grep 'CXX .*foo1\.' stdout
 -  grep 'CXX .*baz1\.' stdout
 -  grep 'FC .*foo2\.'  stdout
 -  grep 'FC .*baz2\.'  stdout
 +  grep ' FC .*foo2\.' stdout
    grep 'F77 .*foo3\.' stdout
 -  grep 'F77 .*baz3\.' stdout
    grep ' CC .*foo5\.' stdout
 -  grep ' CC .*baz5\.' stdout
    grep ' CC .*foo6\.' stdout
 -  grep ' CC .*baz6\.' stdout
  
    grep 'CXXLD .*foo' stdout
 -  grep 'CCLD .*bar'  stdout
 +  grep ' CCLD .*bar' stdout
    grep 'CXXLD .*baz' stdout
 -  grep 'CCLD .*bla'  stdout
  
    if ! $rebuild; then
      grep 'YACC .*foo6\.' stdout
@@@ -170,9 -196,9 +170,9 @@@ $FGREP am_cv_CC_dependencies_compiler_t
  $FGREP am_cv_CXX_dependencies_compiler_type configure
  # Ensure per-target rules are used, to ensure their coverage below.
  # (We do not do an exhaustive check, that wouldn't be practical).
- $FGREP 'bar-bar.$(OBJEXT)'  Makefile.in || Exit 99
- $FGREP 'baz-foo5.c' Makefile.in || Exit 99
- $FGREP 'baz-foo6.c' Makefile.in || Exit 99
 -$FGREP 'bar-bar.o' Makefile.in
 -$FGREP 'fo2-foo5.c' Makefile.in
 -$FGREP 'fo2-foo6.c' Makefile.in
++$FGREP 'bar-bar.$(OBJEXT)'  Makefile.in || exit 99
++$FGREP 'baz-foo5.c' Makefile.in || exit 99
++$FGREP 'baz-foo6.c' Makefile.in || exit 99
  
  # Force gcc ("fast") depmode.
  depmodes="am_cv_CC_dependencies_compiler_type=gcc \
index 05fd6111e52fa02c6085fb19c13c69509faa79e8,0837a5da6657dc39f8cfd89c5b60385beab95ae0..eb1010cdabfd0e74dbc26ed673546d5740a985a2
@@@ -40,19 -40,24 +40,19 @@@ do_and_check_silent_build (
    mv -f t stdout
    cat stdout
  
-   $EGREP ' (-c|-o)' stdout && Exit 1
-   $EGREP '(mv|ylwrap) ' stdout && Exit 1
+   $EGREP ' (-c|-o)' stdout && exit 1
+   $EGREP '(mv|ylwrap) ' stdout && exit 1
  
 +  grep ' CC .*bar\.'  stdout
    grep 'CXX .*foo1\.' stdout
 -  grep 'CXX .*baz1\.' stdout
 -  grep 'FC .*foo2\.'  stdout
 -  grep 'FC .*baz2\.'  stdout
 +  grep ' FC .*foo2\.' stdout
    grep 'F77 .*foo3\.' stdout
 -  grep 'F77 .*baz3\.' stdout
    grep ' CC .*foo5\.' stdout
 -  grep ' CC .*baz5\.' stdout
    grep ' CC .*foo6\.' stdout
 -  grep ' CC .*baz6\.' stdout
  
    grep 'CXXLD .*foo' stdout
 -  grep 'CCLD .*bar'  stdout
 +  grep ' CCLD .*bar' stdout
    grep 'CXXLD .*baz' stdout
 -  grep 'CCLD .*bla'  stdout
  
    if ! $rebuild; then
      grep 'YACC .*foo6\.' stdout
@@@ -197,9 -223,9 +197,9 @@@ $AUTOCON
  
  # Ensure per-target rules are used, to ensure their coverage below.
  # (We do not do an exhaustive check, that wouldn't be practical).
- $FGREP 'bar-bar.$(OBJEXT)'  Makefile.in || Exit 99
- $FGREP 'baz-foo5.c' Makefile.in || Exit 99
- $FGREP 'baz-foo6.c' Makefile.in || Exit 99
 -$FGREP 'bar-bar.o' Makefile.in
 -$FGREP 'fo2-foo5.c' Makefile.in
 -$FGREP 'fo2-foo6.c' Makefile.in
++$FGREP 'bar-bar.$(OBJEXT)'  Makefile.in || exit 99
++$FGREP 'baz-foo5.c' Makefile.in || exit 99
++$FGREP 'baz-foo6.c' Makefile.in || exit 99
  
  # Force dependency tracking explicitly, so that slow dependency
  # extractors are not rejected.  Try also with dependency tracking
index 0a6bb4880d967405a2d7d4bb8e3e284267f265a4,0000000000000000000000000000000000000000..1640e0e6b57d9c18db185e9aa40695a8cfcec068
mode 100755,000000..100755
--- /dev/null
@@@ -1,85 -1,0 +1,85 @@@
- . ./defs || Exit 1
 +#!/bin/sh
 +# Copyright (C) 2009-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 <http://www.gnu.org/licenses/>.
 +
 +# Check texinfo rules in silent-rules mode.
 +
 +required='makeinfo tex texi2dvi dvips'
-   stdout stderr && Exit 1
++. ./defs || exit 1
 +
 +echo AC_OUTPUT >> configure.ac
 +
 +cat > Makefile.am <<'EOF'
 +info_TEXINFOS = foo.texi sub/zardoz.texi
 +EOF
 +
 +cat > foo.texi <<'EOF'
 +\input texinfo
 +@setfilename foo.info
 +@settitle foo manual
 +@bye
 +EOF
 +
 +mkdir sub
 +cat > sub/zardoz.texi <<'EOF'
 +\input texinfo
 +@setfilename zardoz.info
 +@settitle zardoz manual
 +@bye
 +EOF
 +
 +$ACLOCAL
 +$AUTOMAKE --add-missing
 +$AUTOCONF
 +
 +./configure --disable-silent-rules
 +
 +# Silent mode output.
 +st=0
 +$MAKE V=0 dvi html info ps pdf >stdout 2>stderr || st=$?
 +cat stdout
 +cat stderr >&2
 +test $st -eq 0
 +grep '^  DVIPS    foo\.ps$'         stdout
 +grep '^  MAKEINFO foo\.html$'       stdout
 +grep '^  MAKEINFO foo\.info$'       stdout
 +grep '^  TEXI2DVI foo\.dvi$'        stdout
 +grep '^  TEXI2PDF foo\.pdf$'        stdout
 +grep '^  DVIPS    sub/zardoz.ps$'   stdout
 +grep '^  MAKEINFO sub/zardoz.html$' stdout
 +grep '^  MAKEINFO sub/zardoz.info$' stdout
 +grep '^  TEXI2DVI sub/zardoz.dvi$'  stdout
 +grep '^  TEXI2PDF sub/zardoz.pdf$'  stdout
 +# No make recipe is displayed before being executed.
 +$EGREP 'texi2(dvi|pdf)|dvips|makeinfo|(rm|mv) ' \
-   stdout stderr && Exit 1
++  stdout stderr && exit 1
 +# No verbose output from TeX nor dvips.
 +$EGREP '(zardoz|foo)\.log|3\.14|Copyright|This is|[Oo]utput ' \
- $MAKE clean || Exit 1
- $MAKE V=1 dvi html info ps pdf >output 2>&1 || { cat output; Exit 1; }
++  stdout stderr && exit 1
 +
 +# Verbose mode output.
- $EGREP '(DVIPS|MAKEINFO|TEXI2(PDF|DVI)) ' output && Exit 1
++$MAKE clean || exit 1
++$MAKE V=1 dvi html info ps pdf >output 2>&1 || { cat output; exit 1; }
 +cat output
++$EGREP '(DVIPS|MAKEINFO|TEXI2(PDF|DVI)) ' output && exit 1
 +# Verbose output from TeX.
 +grep '[Oo]utput .*foo\.pdf' output
 +grep '[Oo]utput .*zardoz\.pdf' output
 +$FGREP 'foo.log' output
 +$FGREP 'zardoz.log' output
 +# Verbose output from dvips.
 +$FGREP ' dvips' output
 +
 +:
index 9a075fccda1ca3cfbf032ecc40fa2ce0e923cd6a,779f498346d0109d619ea3bbaf59b672ad45ee00..e68d38e0737b63508b1aa912ecfd3704e396962c
  # Keep this in sync with sister test 'silent-yacc-gcc.test'.
  
  required='cc yacc'
- . ./defs || Exit 1
+ . ./defs || exit 1
  
 -mkdir sub
 -
  cat >>configure.ac <<'EOF'
  AM_PROG_CC_C_O
  AC_PROG_YACC
@@@ -51,42 -66,50 +51,42 @@@ $AUTOMAKE --add-missin
  $AUTOCONF
  
  # Ensure per-target rules are used, to ensure their coverage below.
- $FGREP 'foo2-foo.c' Makefile.in || Exit 99
+ $FGREP 'foo2-foo.c' Makefile.in || exit 99
 -$FGREP 'bar2-bar.c' sub/Makefile.in || exit 99
  
  ./configure --enable-silent-rules
  
- $MAKE >stdout || { cat stdout; Exit 1; }
+ $MAKE >stdout || { cat stdout; exit 1; }
  cat stdout
  
- $EGREP ' (-c|-o)' stdout && Exit 1
- $EGREP '(mv|ylwrap) ' stdout && Exit 1
+ $EGREP ' (-c|-o)' stdout && exit 1
+ $EGREP '(mv|ylwrap) ' stdout && exit 1
  
  grep 'YACC .*foo\.' stdout
 -grep 'YACC .*bar\.' stdout
 -grep ' CC .*foo\.' stdout
 -grep ' CC .*bar\.' stdout
 -grep 'CCLD .*foo1' stdout
 -grep 'CCLD .*bar1' stdout
 -grep 'CCLD .*foo2' stdout
 -grep 'CCLD .*bar2' stdout
 +grep '  CC .*foo\.' stdout
 +grep 'CCLD .*foo1'  stdout
 +grep 'CCLD .*foo2'  stdout
  
  # Cleaning and then rebuilding with the same V flag (and without
  # removing the generated sources in between) shouldn't trigger a
  # different set of rules.
  $MAKE clean
  
- $MAKE >stdout || { cat stdout; Exit 1; }
+ $MAKE >stdout || { cat stdout; exit 1; }
  cat stdout
  
- $EGREP ' (-c|-o)' stdout && Exit 1
- $EGREP '(mv|ylwrap) ' stdout && Exit 1
+ $EGREP ' (-c|-o)' stdout && exit 1
+ $EGREP '(mv|ylwrap) ' stdout && exit 1
  
  # Don't look for YACC, as probably yacc hasn't been re-run.
 -grep ' CC .*foo\.' stdout
 -grep ' CC .*bar\.' stdout
 -grep 'CCLD .*foo1' stdout
 -grep 'CCLD .*bar1' stdout
 -grep 'CCLD .*foo2' stdout
 -grep 'CCLD .*bar2' stdout
 +grep '  CC .*foo\.' stdout
 +grep 'CCLD .*foo1'  stdout
 +grep 'CCLD .*foo2'  stdout
  
  # Ensure a truly clean rebuild.
  $MAKE clean
 -rm -f *foo.[ch] sub/*bar.[ch]
 +rm -f *foo.[ch]
  
- $MAKE V=1 >stdout || { cat stdout; Exit 1; }
+ $MAKE V=1 >stdout || { cat stdout; exit 1; }
  cat stdout
  
  grep ' -c ' stdout
diff --cc t/silent.sh
index f736c3ba707970730a2d3aea5f0efe83e2dd51c0,633cdd8a8167d6698517a2e0c8278c155f45fbbd..59e09d361a4a0a9602171ed001a37ea36e5b07f9
@@@ -46,24 -59,24 +46,24 @@@ $AUTOMAKE --add-missin
  $AUTOCONF
  
  ./configure --enable-silent-rules
- $MAKE >stdout || { cat stdout; Exit 1; }
+ $MAKE >stdout || { cat stdout; exit 1; }
  cat stdout
- $EGREP ' (-c|-o)|(mv|mkdir) '   stdout && Exit 1
 -$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  *foo\.o'             stdout
 +grep ' CC  *bar-bar\.o'         stdout
 +grep ' CC  *sub/baz\.o'         stdout
 +grep ' CC  *sub/sub_bla-bla\.o' stdout
 +grep ' CCLD  *foo'              stdout
 +grep ' CCLD  *bar'              stdout
 +grep ' CCLD  *sub/baz'          stdout
 +grep ' CCLD  *sub/bla'          stdout
  
  $MAKE clean
- $MAKE V=1 >stdout || { cat stdout; Exit 1; }
+ $MAKE V=1 >stdout || { cat stdout; exit 1; }
  cat stdout
  grep ' -c' stdout
  grep ' -o foo' stdout
- $EGREP '(CC|LD) ' stdout && Exit 1
 +grep ' -o sub/baz' stdout
+ $EGREP '(CC|LD) ' stdout && exit 1
  
  :
diff --cc t/silent2.sh
index a7f0207d4fe76a5c672c1d6ef826cb8cc1db0510,1d67f7e0f4fb8107b3fe517aee4565bec1f67bc5..11e83496e151f4b1131eeb0036b98103eb645067
@@@ -47,24 -60,24 +47,24 @@@ $AUTOMAKE --add-missin
  $AUTOCONF
  
  ./configure am_cv_CC_dependencies_compiler_type=gcc --enable-silent-rules
- $MAKE >stdout || { cat stdout; Exit 1; }
+ $MAKE >stdout || { cat stdout; exit 1; }
  cat stdout
- $EGREP ' (-c|-o)|(mv|mkdir) '   stdout && Exit 1
 -$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  *foo\.o'             stdout
 +grep ' CC  *bar-bar\.o'         stdout
 +grep ' CC  *sub/baz\.o'         stdout
 +grep ' CC  *sub/sub_bla-bla\.o' stdout
 +grep ' CCLD  *foo'              stdout
 +grep ' CCLD  *bar'              stdout
 +grep ' CCLD  *sub/baz'          stdout
 +grep ' CCLD  *sub/bla'          stdout
  
  $MAKE clean
- $MAKE V=1 >stdout || { cat stdout; Exit 1; }
+ $MAKE V=1 >stdout || { cat stdout; exit 1; }
  cat stdout
  grep ' -c' stdout
  grep ' -o foo' stdout
- $EGREP '(CC|LD) ' stdout && Exit 1
 +grep ' -o sub/baz' stdout
+ $EGREP '(CC|LD) ' stdout && exit 1
  
  :
diff --cc t/silent3.sh
index 325c7e7dbbe6bcdc562762916d29eb63da476190,fe27ae40b9c75dbe488d250ef6a7c38e5a4b1b05..dd9cc8df55209d372186382fe4052b257d02050f
@@@ -50,25 -62,25 +50,25 @@@ $AUTOMAKE --add-missin
  $AUTOCONF
  
  ./configure --enable-silent-rules
- $MAKE >stdout || { cat stdout; Exit 1; }
+ $MAKE >stdout || { cat stdout; exit 1; }
  cat stdout
- $EGREP ' (-c|-o)|(mv|mkdir) '             stdout && Exit 1
 -$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; }
+ $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
+ sed 's/--tag=[^ ]*/--tag=x/g' stdout | $EGREP '(CC|LD) ' && exit 1
  
  :
diff --cc t/silent4.sh
index eccb341b8fa90dd119d19736ff554ccc195b87b9,88049f16f53ce6f2753c61ca7d93d166755b1920..562d0c8784d87f3814d52be56569e31f52f3652c
@@@ -51,25 -63,25 +51,25 @@@ $AUTOMAKE --add-missin
  $AUTOCONF
  
  ./configure am_cv_CC_dependencies_compiler_type=gcc --enable-silent-rules
- $MAKE >stdout || { cat stdout; Exit 1; }
+ $MAKE >stdout || { cat stdout; exit 1; }
  cat stdout
- $EGREP ' (-c|-o)|(mv|mkdir) '             stdout && Exit 1
 -$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; }
+ $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
+ sed 's/--tag=[^ ]*/--tag=x/g' stdout | $EGREP '(CC|LD) ' && exit 1
  
  :
diff --cc t/silent6.sh
Simple merge
diff --cc t/silent9.sh
index 6c23c9f8e38d287a467b1e1c619f3f763ddf6d8d,c2868b50077aded2b4d122b8f8b382a8d8ba3e1b..ddc48cfe5957b89b535a0f3c6629302071d64b43
@@@ -50,25 -62,25 +50,25 @@@ $AUTOMAKE --add-missin
  $AUTOCONF
  
  ./configure --disable-dependency-tracking --enable-silent-rules
- $MAKE >stdout || { cat stdout; Exit 1; }
+ $MAKE >stdout || { cat stdout; exit 1; }
  cat stdout
- $EGREP ' (-c|-o)|(mv|mkdir) '             stdout && Exit 1
 -$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; }
+ $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
+ sed 's/--tag=[^ ]*/--tag=x/g' stdout | $EGREP '(CC|LD) ' && exit 1
  
  :
index 35f01be50935af1d16910593b0fd8b96f640a23c,903378c64d73a4efb9664efc54c684c9a33d2516..6417b6b0b9270f2ff2228e93a0184142dde73c30
@@@ -65,24 -73,20 +65,24 @@@ for config_args in 
    am_cv_CXX_dependencies_compiler_type=gcc
  do
    ./configure $config_args --enable-silent-rules
-   $MAKE >stdout || { cat stdout; Exit 1; }
+   $MAKE >stdout || { cat stdout; exit 1; }
    cat stdout
  
-   $EGREP ' (-c|-o)' stdout && Exit 1
-   grep 'mv ' stdout && Exit 1
+   $EGREP ' (-c|-o)' stdout && exit 1
+   grep 'mv ' stdout && exit 1
  
 -  grep 'CXX .*foo\.'  stdout
 -  grep 'CXX .*baz\.'  stdout
 -  grep 'CXX .*quux\.' stdout
 -  grep 'CXX .*bar\.'  stdout
 -  grep 'CXXLD .*foo1' stdout
 -  grep 'CXXLD .*bar1' stdout
 -  grep 'CXXLD .*foo2' stdout
 -  grep 'CXXLD .*bar2' stdout
 +  grep ' CXX  *foo\.o'          stdout
 +  grep ' CXX  *baz\.o'          stdout
 +  grep ' CXX  *quux\.o'         stdout
 +  grep ' CXX  *foo2-foo\.o'     stdout
 +  grep ' CXX  *foo2-baz\.o'     stdout
 +  grep ' CXX  *foo2-quux\.o'    stdout
 +  grep ' CXX  *sub/bar\.o'      stdout
 +  grep ' CXX  *sub/bar2-bar\.o' stdout
 +  grep ' CXXLD  *foo1'          stdout
 +  grep ' CXXLD  *bar1'          stdout
 +  grep ' CXXLD  *foo2'          stdout
 +  grep ' CXXLD  *bar2'          stdout
  
    # Ensure a clean rebuild.
    $MAKE clean
    cat stdout
  
    grep ' -c ' stdout
 -  grep ' -o ' stdout
 +  grep ' -o quux' stdout
 +  grep ' -o bar2' stdout
  
-   $EGREP '(CC|CXX|LD) ' stdout && Exit 1
+   $EGREP '(CC|CXX|LD) ' stdout && exit 1
  
    # Ensure a clean reconfiguration/rebuild.
    $MAKE clean
diff --cc t/silentcxx.sh
index e3507265924fa1e811365876ee6b0f4f6963ead0,a3c375a22b1032a856e14a295c5782b31b40402a..be24509ba643c98605b5dfc42ac8fccea87e0dff
@@@ -65,24 -74,20 +65,24 @@@ for config_args in 
    --enable-dependency-tracking --disable-dependency-tracking
  do
    ./configure $config_args --enable-silent-rules
-   $MAKE >stdout || { cat stdout; Exit 1; }
+   $MAKE >stdout || { cat stdout; exit 1; }
    cat stdout
  
-   $EGREP ' (-c|-o)' stdout && Exit 1
-   grep 'mv ' stdout && Exit 1
+   $EGREP ' (-c|-o)' stdout && exit 1
+   grep 'mv ' stdout && exit 1
  
 -  grep 'CXX .*foo\.'  stdout
 -  grep 'CXX .*baz\.'  stdout
 -  grep 'CXX .*quux\.' stdout
 -  grep 'CXX .*bar\.'  stdout
 -  grep 'CXXLD .*foo1' stdout
 -  grep 'CXXLD .*bar1' stdout
 -  grep 'CXXLD .*foo2' stdout
 -  grep 'CXXLD .*bar2' stdout
 +  grep ' CXX  *foo\.o'          stdout
 +  grep ' CXX  *baz\.o'          stdout
 +  grep ' CXX  *quux\.o'         stdout
 +  grep ' CXX  *foo2-foo\.o'     stdout
 +  grep ' CXX  *foo2-baz\.o'     stdout
 +  grep ' CXX  *foo2-quux\.o'    stdout
 +  grep ' CXX  *sub/bar\.o'      stdout
 +  grep ' CXX  *sub/bar2-bar\.o' stdout
 +  grep ' CXXLD  *foo1'          stdout
 +  grep ' CXXLD  *bar1'          stdout
 +  grep ' CXXLD  *foo2'          stdout
 +  grep ' CXXLD  *bar2'          stdout
  
    # Ensure a clean rebuild.
    $MAKE clean
    cat stdout
  
    grep ' -c ' stdout
 -  grep ' -o ' stdout
 +  grep ' -o quux' stdout
 +  grep ' -o bar2' stdout
  
-   $EGREP '(CXX|LD) ' stdout && Exit 1
+   $EGREP '(CXX|LD) ' stdout && exit 1
  
    # Ensure a clean reconfiguration/rebuild.
    $MAKE clean
diff --cc t/silentf77.sh
index 0b8846e8c36d3563552aadcd1ef60405ad7da4f7,a50c69eaae50a698a278e35b7611210d1b28aaeb..aaaa9d8551603903edccd6b1046e5c4166ed8487
@@@ -57,19 -65,17 +57,19 @@@ sed '/^NOTICE:/d' stdout > 
  mv -f t stdout
  cat stdout
  
- $EGREP ' (-c|-o)' stdout && Exit 1
- grep 'mv ' stdout && Exit 1
+ $EGREP ' (-c|-o)' stdout && exit 1
+ grep 'mv ' stdout && exit 1
  
 -grep 'F77 .*foo\.'  stdout
 -grep 'F77 .*bar\.'  stdout
 -grep 'F77LD .*foo1' stdout
 -grep 'F77LD .*bar1' stdout
 -grep 'F77LD .*foo2' stdout
 -grep 'F77LD .*bar2' stdout
 +grep ' F77  *foo\.'          stdout
 +grep ' F77  *foo2-foo\.'     stdout
 +grep ' F77  *sub/bar\.'      stdout
 +grep ' F77  *sub/bar2-bar\.' stdout
 +grep ' F77LD  *foo1'         stdout
 +grep ' F77LD  *foo2'         stdout
 +grep ' F77LD  *sub/bar1'     stdout
 +grep ' F77LD  *bar2'         stdout
  
- $EGREP '(FC|FCLD) ' stdout && Exit 1
+ $EGREP '(FC|FCLD) ' stdout && exit 1
  
  # Ensure a clean rebuild.
  $MAKE clean
diff --cc t/silentf90.sh
index 3466b8af1da9cd9858958e89e8c3ea56f6122baa,78bbce9ffa8044ae4c2dc4c172a5b32d9d2b1e86..3561674df05c95c8ee1facd0882430862bf5a8f0
@@@ -57,19 -65,17 +57,19 @@@ sed '/^NOTICE:/d' stdout > 
  mv -f t stdout
  cat stdout
  
- $EGREP ' (-c|-o)' stdout && Exit 1
- grep 'mv ' stdout && Exit 1
+ $EGREP ' (-c|-o)' stdout && exit 1
+ grep 'mv ' stdout && exit 1
  
 -grep 'FC .*foo\.'  stdout
 -grep 'FC .*bar\.'  stdout
 -grep 'FCLD .*foo1' stdout
 -grep 'FCLD .*bar1' stdout
 -grep 'FCLD .*foo2' stdout
 -grep 'FCLD .*bar2' stdout
 +grep ' FC  *foo\.'          stdout
 +grep ' FC  *foo2-foo\.'     stdout
 +grep ' FC  *sub/bar\.'      stdout
 +grep ' FC  *sub/bar2-bar\.' stdout
 +grep ' FCLD  *foo1'         stdout
 +grep ' FCLD  *foo2'         stdout
 +grep ' FCLD  *sub/bar1'     stdout
 +grep ' FCLD  *bar2'         stdout
  
- $EGREP '(F77|F77LD) ' stdout && Exit 1
+ $EGREP '(F77|F77LD) ' stdout && exit 1
  
  # Ensure a clean rebuild.
  $MAKE clean
Simple merge
diff --cc t/specflg6.sh
Simple merge
diff --cc t/spell.sh
index 790739d158b9efa74029d90b36ba418e4a4c2d38,18abba24553234cba5c75008cb911b049528a48f..99466917db736059f065498c94ebc44be85ac14b
  
  # Test to make sure misspellings in _SOURCES variables cause failure.
  
- . ./defs || Exit 1
 +required=cc
+ . ./defs || exit 1
  
 +cat >> configure.ac << 'END'
 +AC_PROG_CC
 +AC_OUTPUT
 +END
 +
  cat > Makefile.am << 'END'
  bin_PROGRAMS = zardoz foo
  zardoz_SOURCES = x.c
  boo_SOURCES = y.c
  END
  
 +echo 'int main (void) { return 0; }' > x.c
 +echo 'int main (void) { return 0; }' > y.c
 +
  $ACLOCAL
 -AUTOMAKE_fails
 -grep 'Makefile.am:3:.*boo' stderr
 +$AUTOCONF
 +$AUTOMAKE
 +
 +./configure
- $MAKE 2>stderr && { cat stderr >&2; Exit 1; }
++$MAKE 2>stderr && { cat stderr >&2; exit 1; }
 +cat stderr >&2
 +
 +LC_ALL=C sed 's/^Makefile:[0-9][0-9]*: //' stderr > got
 +
 +cat > exp << 'END'
 +variable 'boo_SOURCES' is defined but no program
 +  or library has 'boo' as canonical name
 +*** Some Automake-NG error occurred.  Stop.
 +END
 +
 +diff exp got
 +
 +:
diff --cc t/spell2.sh
index dead9c1180a501a1753ca16436789927ba1a1825,c468b2b06c53a1c33011b4fdd1dbd5071ac37a94..6bc7e11e1bbb5f3c1c51723b6a1b310c783784e2
  # You should have received a copy of the GNU General Public License
  # along with this program.  If not, see <http://www.gnu.org/licenses/>.
  
 -# Test to make sure misspellings in _SOURCES variables cause failure.
 +# Test to make sure misspellings in _LDADD variable cause failure.
  
- . ./defs || Exit 1
 +required=cc
+ . ./defs || exit 1
  
 -echo AC_PROG_CC >> configure.ac
 +cat >> configure.ac << 'END'
 +AC_PROG_CC
 +AC_OUTPUT
 +END
  
  cat > Makefile.am << 'END'
  bin_PROGRAMS = zardoz
  zardoz_SOURCES = x.c
 -qardoz_LDADD = -ljoe
 +qardoz_LDADD = -lm
  END
  
 +echo 'int main (void) { return 0; }' > x.c
 +
  $ACLOCAL
 -AUTOMAKE_fails
 -grep 'Makefile.am:3:.*qardoz' stderr
 +$AUTOCONF
 +$AUTOMAKE
 +
 +./configure
 +
- $MAKE 2>stderr && { cat stderr >&2; Exit 1; }
++$MAKE 2>stderr && { cat stderr >&2; exit 1; }
 +cat stderr >&2
 +
 +LC_ALL=C sed 's/^Makefile:[0-9][0-9]*: //' stderr > got
 +
 +cat > exp << 'END'
 +variable 'qardoz_LDADD' is defined but no program
 +  or library has 'qardoz' as canonical name
 +*** Some Automake-NG error occurred.  Stop.
 +END
 +
 +diff exp got
 +
 +:
index 4326745d66d54876f1fa716e73e35d0be3d8ab95,0000000000000000000000000000000000000000..99f506e34b5a778862da6ca8651df4f58885d29c
mode 100755,000000..100755
--- /dev/null
@@@ -1,58 -1,0 +1,58 @@@
- . ./defs || Exit 1
 +#! /bin/sh
 +# Copyright (C) 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 <http://www.gnu.org/licenses/>.
 +
 +# Verify that our expectations on the behaviour of (some) GNU make
 +# automatic variables are correct.
 +# This test is quite incomplete, and should be filled out whenever
 +# we want to start assuming and using a further behaviour of
 +# automatic variables of GNU make.
 +
 +am_create_testdir=empty
++. ./defs || exit 1
 +
 +cat > Makefile <<'END'
 +foo:
 +      test $@ = foo
 +      test $(@D) = .
 +      test $(@F) = foo
 +./bar:
 +      test $@ = ./bar || test $@ = bar
 +      test $(@D) = .
 +      test $(@F) = bar
 +../baz:
 +      test $@ = ../baz
 +      test $(@D) = ..
 +      test $(@F) = baz
 +1/2/3:
 +      test $@ = 1/2/3
 +      test $(@D) = 1/2
 +      test $(@F) = 3
 +/abs/path:
 +      test $@ = /abs/path
 +      test $(@D) = /abs
 +      test $(@F) = path
 +END
 +
 +$MAKE foo
 +$MAKE ./foo
 +$MAKE bar
 +$MAKE ./bar
 +$MAKE ../baz
 +$MAKE 1/2/3
 +$MAKE ./1/2/3
 +$MAKE /abs/path
 +
 +:
index b2bb25d9663ece9cfa70464c3efc3f79509f629d,30a18c0d74345b10d6d55083fbe8ed3a260525ff..c1e0c7926938951fb74955c43881a557ecad0a8d
  # You should have received a copy of the GNU General Public License
  # along with this program.  If not, see <http://www.gnu.org/licenses/>.
  
 -# Test to make sure Automake supports implicit rules "confusing"
 -# extensions.  Inspired by a mail from Alex Hornby.
 +# Check that, if we have two pattern rules from which the same file (or
 +# set of files) can be built, and both are applicable, the first one wins.
 +# This is used at least in our 'parallel-tests' support.
  
- . ./defs || Exit 1
 +am_create_testdir=empty
+ . ./defs || exit 1
  
 -cat > Makefile.am << 'END'
 -SUFFIXES = .idl S.cpp C.h
 -SUFFIXES += C.cpp S.h
 -.idlC.cpp:
 +cat > Makefile <<'END'
 +default:
 +
 +%.foo: %
 +      cp $< $@
 +%.foo: %.x
        cp $< $@
 +
 +%.bar: %.x
 +      cp $< $@
 +%.bar: %
 +
 +%.mu %.fu: %.1
 +      cp $< $*.mu && cp $< $*.fu
 +%.mu %.fu: %.2
 +      cp $< $*.mu && cp $< $*.fu
  END
  
 -$ACLOCAL
 -$AUTOMAKE
 +echo one > all
 +echo two > all.x
 +$MAKE all.foo all.bar
 +diff all all.foo
 +diff all.x all.bar
  
 -# Make sure Automake has NOT recognized .cpp and .idlC as two new
 -# extensions.
 -grep 'SUFFIXES.* \.cpp' Makefile.in && exit 1
 -grep 'SUFFIXES.* \.idlC' Makefile.in && exit 1
 +echo one > x.1
 +echo two > x.2
 +$MAKE x.mu
 +diff x.mu x.1
 +diff x.fu x.1
  
  :
diff --cc t/spy-phony.sh
index 4e428193f10a4c369f9a089d1298cffef668d868,dd918a14d5481ff8e0908b9e2aacf8f5403b220e..a1f9d15c043f6b5708689b852abbe1f4dc9d5a9f
  # You should have received a copy of the GNU General Public License
  # along with this program.  If not, see <http://www.gnu.org/licenses/>.
  
 -# Make sure libtool is removed.
 -# Report from Kevin Dalley.
 +# Check that the '.PHONY' semantics we expect truly hold.
  
 -required=libtool
 +am_create_testdir=empty
- . ./defs || Exit 1
+ . ./defs || exit 1
  
 -cat >> configure.ac << 'END'
 -AC_LIBTOOL_DLOPEN
 -AC_DISABLE_SHARED
 -AC_PROG_LIBTOOL
 -AC_SUBST([LIBTOOL_DEPS])
 +cat > Makefile <<'END'
 +.PHONY: pdir pfile
 +pdir rdir:
 +      echo foo > $@/foo
 +pfile rfile:
 +      echo bar >$@
 +.PHONY: other
 +other:
 +      echo baz >> dummy
 +indirect: other
 +      echo run > $@
  END
  
 -: > Makefile.am
 -
 -: > ltmain.sh
 -: > config.guess
 -: > config.sub
 -
 -$ACLOCAL
 -$AUTOMAKE
 -
 -grep 'rm -f libtool' Makefile.in
 +: > rfile
 +mkdir rdir
 +$MAKE rdir rfile
 +test ! -s rfile
 +test ! -f rdir/foo
 +
 +: > pfile
 +mkdir pdir
 +$MAKE pdir pfile
 +test "`cat pfile`" = bar
 +test "`cat pdir/foo`" = foo
 +
 +$MAKE other
 +test "`cat dummy`" = baz
 +$MAKE other
 +test "`cat dummy`" = "baz${nl}baz"
 +
 +echo not run > indirect
 +$MAKE indirect
 +test "`cat indirect`" = run
 +test "`cat dummy`" = "baz${nl}baz${nl}baz"
  
  :
index cc5d720088cd456f94f77341546a323a1b35218d,0000000000000000000000000000000000000000..07e67677a519dcec1a757c38d38953f83785b2c3
mode 100755,000000..100755
--- /dev/null
@@@ -1,72 -1,0 +1,72 @@@
- . ./defs || Exit 1
 +#! /bin/sh
 +# Copyright (C) 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 <http://www.gnu.org/licenses/>.
 +
 +# Check that GNU make line-continuation with backslash-newline has the
 +# semantic we expect.
 +
 +am_create_testdir=empty
- $MAKE rule1 && Exit 1
++. ./defs || exit 1
 +
 +cat > Makefile << 'END'
 +default:
 +
 +hash = \#
 +ok: ; true :--$(hash)--:
 +
 +var1 = \
 +rule1:
 +
 +rule2: \
 +; echo ok > sentinel
 +
 +# The backslash doesn't cause we to continue to read after
 +# the fist blank line.
 +rule3: \
 +
 +var2 = ok
 +
 +# Ditto.
 +var3 = a \
 +
 +b:
 +
 +# The backslash will cause the next line to be a comment as well \
 +$(error comment not continued)
 +
 +var4 = foo \
 +# not seen
 +
 +.PHONY: test
 +test:
 +      test $(var1) = rule1:
 +      test $(var2) = ok
 +      test $(var3) = a
 +      test $(var4) = foo
 +      test -z '$(var5)'
 +
 +var5 = \
 +END
 +
 +$MAKE
 +$MAKE ok
 +$MAKE ok | grep ':--#--:'
++$MAKE rule1 && exit 1
 +$MAKE rule2
 +test -f sentinel
 +$MAKE rule3
 +$MAKE test
 +
 +:
index b7d614f4ee40b113029abe0dcf9177b8746eac49,0000000000000000000000000000000000000000..ac8cc52564e8aeea9600dd1d4e63e7b331d14c45
mode 100755,000000..100755
--- /dev/null
@@@ -1,57 -1,0 +1,57 @@@
- . ./defs || Exit 1
 +#! /bin/sh
 +# Copyright (C) 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 <http://www.gnu.org/licenses/>.
 +
 +# GNU make allows us to append to undefined variables.
 +# Also, if we override a variable definition from the command line,
 +# any '+=' appending to it gets overridden as well.
 +
 +am_create_testdir=empty
-   $MAKE "$@" 2>stderr && test ! -s stderr || { cat stderr >&2; Exit 1; }
++. ./defs || exit 1
 +
 +cat > Makefile << 'END'
 +var0 += foo
 +
 +var1 += bar
 +var1 += baz
 +
 +var2 = a
 +var2 += b
 +
 +var3 := x
 +var3 += y
 +
 +.PHONY: test1 test2
 +test1:
 +      test x'$(var0)' = x'foo'
 +      test x'$(var1)' = x'bar baz'
 +      test x'$(var2)' = x'a b'
 +      test x'$(var3)' = x'x y'
 +test2:
 +      test x'$(var0)' = x'mu'
 +      test x'$(var1)' = x
 +      test x'$(var2)' = x'two'
 +      test x'$(var3)' = x'three'
 +END
 +
 +checkit ()
 +{
++  $MAKE "$@" 2>stderr && test ! -s stderr || { cat stderr >&2; exit 1; }
 +}
 +
 +checkit test1
 +checkit test2 var0=mu var1= var2=two var3=three
 +
 +:
index b5dd58904eb59fa078855f04e619426971cea5ff,0000000000000000000000000000000000000000..3e70fea2a21f89d2d457db9907e8dd5ac07cf48b
mode 100755,000000..100755
--- /dev/null
@@@ -1,150 -1,0 +1,150 @@@
- . ./defs || Exit 1
 +#! /bin/sh
 +# Copyright (C) 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 <http://www.gnu.org/licenses/>.
 +
 +# Check that the automatic variable '$<' always undergoes VPATH rewrite.
 +# We use that assumption in some of our rules, so it better explicitly
 +# check that it truly holds.
 +
-     test ! -f $srcdir/bar && test ! -d $srcdir/bar || Exit 1
-     test ! -f $srcdir/he && test ! -d $srcdir/he || Exit 1
++. ./defs || exit 1
 +
 +ocwd=`pwd` || fatal_ "couldn't get current working directory"
 +
 +mkdir src
 +cd src
 +
 +cat > mk <<'END'
 +.SUFFIXES:
 +.SUFFIXES: .a .b .a2 .b2 .a3 .b3 .a4 .b4
 +
 +empty =
 +source = $<
 +
 +all: one.b two.b2 three.b3 four.b4
 +all: www.d xxx.d2 yyy.d3 zzz.d4
 +all: bar/mu.x is.ok zardoz
 +all: here here2 he/re
 +
 +.a.b:
 +      cp $< $@
 +
 +.a2.b2:
 +      cp '$<' $@
 +
 +.a3.b3:
 +      cp $(empty)$<$(empty) $@
 +
 +.a4.b4:
 +      cp $(source) $@
 +
 +%.d: %.c
 +      cp $< $@
 +
 +%.d2: %.c2
 +      cp '$(source)' $@
 +
 +%.d3: %.c3 %.cc
 +      cp `echo '$<'` $@
 +
 +%.d4: %.c4 ignore-me
 +      orig=x$(<)x && orig=`expr "$$orig" : 'x\(.*\)x$$'` && cp $$orig $@
 +
 +bar/%: foo/%
 +      mkdir $(dir $@)
 +      cp $< $@
 +
 +%.ok: zap/%
 +      cp "$<" $@
 +
 +%: zap/sub/%
 +      cp '$<' $@
 +
 +here: there
 +      cp $< $@
 +
 +here2: there2 ignore-me
 +      cp '$<' $@
 +
 +he/re: the/re
 +      mkdir $(dir $@)
 +      cp "$(source)" $@
 +END
 +
 +mkdir foo zap zap/sub the
 +for file in \
 +  one.a \
 +  two.a2 \
 +  three.a3 \
 +  four.a4 \
 +  www.c \
 +  xxx.c2 \
 +  yyy.c3 \
 +  zzz.c4 \
 +  foo/mu.x \
 +  zap/is \
 +  zap/sub/zardoz \
 +  there \
 +  there2 \
 +  the/re \
 +; do
 +  echo $file > $file
 +done
 +touch yyy.cc ignore-me
 +
 +do_test ()
 +{
 +  srcdir=$1
 +  cp $srcdir/mk Makefile
 +  $MAKE -k all VPATH=$srcdir
 +  if test "$srcdir" != "."; then
++    test ! -f $srcdir/bar && test ! -d $srcdir/bar || exit 1
++    test ! -f $srcdir/he && test ! -d $srcdir/he || exit 1
 +  fi
 +  diff $srcdir/one.a one.b
 +  diff $srcdir/two.a2 two.b2
 +  diff $srcdir/three.a3 three.b3
 +  diff $srcdir/four.a4 four.b4
 +  diff $srcdir/www.c www.d
 +  diff $srcdir/xxx.c2 xxx.d2
 +  diff $srcdir/yyy.c3 yyy.d3
 +  diff $srcdir/zzz.c4 zzz.d4
 +  diff $srcdir/foo/mu.x bar/mu.x
 +  diff $srcdir/zap/is is.ok
 +  diff $srcdir/zap/sub/zardoz zardoz
 +  diff $srcdir/there here
 +  diff $srcdir/the/re he/re
 +}
 +
 +cd "$ocwd"
 +mkdir build
 +cd build
 +do_test ../src
 +
 +cd "$ocwd"
 +mkdir build2
 +cd build2
 +do_test "$ocwd"/src
 +
 +cd "$ocwd"
 +cd src
 +mkdir build
 +cd build
 +do_test ..
 +
 +cd "$ocwd"
 +cd src
 +do_test .
 +
 +:
index 83ebde78ddb9f886c6d73372e04cd93ce779154b,6df427f3001f3960ec78649cba750d836c921c4c..9a8e47dafc352881a5fa7257fd2ace1e281cdffe
  # You should have received a copy of the GNU General Public License
  # along with this program.  If not, see <http://www.gnu.org/licenses/>.
  
 -# Test that := definitions produce warnings, but otherwise work.
 +# Check that the behaviour of the $(wildcard) builtin in corner cases
 +# matches the assumptions done in our recipes.
  
- . ./defs || Exit 1
+ . ./defs || exit 1
  
 -cat > Makefile.am << 'END'
 -ICONS := $(wildcard *.xbm)
 -END
 +mkdir dir
 +echo dummy > file
  
 -$ACLOCAL
 -AUTOMAKE_fails
 -grep ':=.*not portable' stderr
 +cat > Makefile <<'END'
 +.PHONY: test
 +test:
 +      test x'$(wildcard dir)'    = x'dir'
 +      test x'$(wildcard file)'   = x'file'
 +      test x'$(wildcard dir/)'   = x'dir/'
 +      test x'$(wildcard file/.)' = x''
 +END
  
 -$AUTOMAKE -Wno-portability
 -grep '^ICONS *:= *\$(wildcard \*\.xbm) *$' Makefile.in
 +$MAKE test
  
  :
index 159cda589594821ccc3927ea8119d5788d2d8418,5d7694fe18b97ab70caaf45b79e56338ee6cc635..afeb1fd3c8e6062d3a02b26bda4422b0a61b1cb1
  # You should have received a copy of the GNU General Public License
  # along with this program.  If not, see <http://www.gnu.org/licenses/>.
  
 -# Test to make sure .info-less @setfilename works.
 +# Check that automake rules do not use repeated "-I $(srcdir)" in the
 +# compiler invocation.
  
 -required='makeinfo tex texi2dvi'
 +required=cc
- . ./defs || Exit 1
+ . ./defs || exit 1
  
  cat >> configure.ac << 'END'
 +AC_PROG_CC
  AC_OUTPUT
  END
  
@@@ -32,21 -40,14 +32,21 @@@ $ACLOCA
  $AUTOCONF
  $AUTOMAKE --add-missing
  
 -grep '^INFO_DEPS.*textutils$' Makefile.in
 -
 -# We should not use single suffix inference rules (with separate
 -# dependencies), this confuses Solaris make.
 -grep '^\.texi:$' Makefile.in && exit 1
 -grep 'textutils: *textutils\.texi' Makefile.in
 -
 +# Test with $builddir != $srcdir
 +mkdir build
 +cd build
 +../configure
- $MAKE V=1 > stdout || { cat stdout; Exit 1; }
++$MAKE V=1 > stdout || { cat stdout; exit 1; }
 +cat stdout
 +grep '.*-I *\. .*-I *\.\. ' stdout
- grep '.*-I *\. .*-I *\. ' stdout && Exit 1
++grep '.*-I *\. .*-I *\. ' stdout && exit 1
 +cd ..
 +
 +# Test with $builddir = $srcdir
  ./configure
- $MAKE V=1 > stdout || { cat stdout; Exit 1; }
 -$MAKE distcheck
++$MAKE V=1 > stdout || { cat stdout; exit 1; }
 +cat stdout
 +grep '.*-I *\.  ' stdout
- grep '.*-I *\..*-I *\.' stdout && Exit 1
++grep '.*-I *\..*-I *\.' stdout && exit 1
  
  :
diff --cc t/subdir.sh
index 2ce68b86b6a4338bd2f0e35fb4b0c4cc585dc56a,249481aa3a2d93650e5d456eea5f9739370241d6..fb1e2469c04de932103131d1525d414ef75b67ca
  # You should have received a copy of the GNU General Public License
  # along with this program.  If not, see <http://www.gnu.org/licenses/>.
  
 -# Test to make sure install-sh and mkinstalldirs correctly found in
 -# subdirs.
 +# Test to make sure install-sh is correctly found in subdirs.
  
- . ./defs || Exit 1
+ . ./defs || exit 1
  
  mkdir zot
  
diff --cc t/subobj-c.sh
index 0bbeb2bb02de2a24cc4fc9e2aa73e54685dcdd7b,0000000000000000000000000000000000000000..eafecaf75ef62c2424423f83299e77f7191af726
mode 100755,000000..100755
--- /dev/null
@@@ -1,118 -1,0 +1,118 @@@
- . ./defs || Exit 1
 +#! /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 <http://www.gnu.org/licenses/>.
 +
 +# Test subdir objects with C, building both a library and an executable.
 +# Keep in sync with sister test 'subobj-cxx.sh'.
 +
 +required=cc
- $AUTOMAKE --add-missing 2>stderr || { cat stderr >&2; Exit 1; }
++. ./defs || exit 1
 +
 +cat >> configure.ac << 'END'
 +AC_PROG_CC
 +AM_PROG_CC_C_O
 +AM_PROG_AR
 +AC_PROG_RANLIB
 +AC_OUTPUT
 +END
 +
 +cat > Makefile.am << 'END'
 +bin_PROGRAMS = progs/wish
 +lib_LIBRARIES = libs/libhope.a
 +progs_wish_SOURCES = generic/a.c generic/b.c
 +libs_libhope_a_SOURCES = sub/sub2/foo.c
 +
 +.PHONY: remake-single-object
 +remake-single-object:
 +      rm -rf generic
 +      $(MAKE) generic/a.$(OBJEXT)
 +      test -f generic/a.$(OBJEXT)
 +      test ! -f generic/b.$(OBJEXT)
 +      rm -rf generic
 +      $(MAKE) generic/b.$(OBJEXT)
 +      test ! -f generic/a.$(OBJEXT)
 +      test -f generic/b.$(OBJEXT)
 +      rm -rf sub generic
 +      $(MAKE) sub/sub2/foo.$(OBJEXT)
 +      test -f sub/sub2/foo.$(OBJEXT)
 +      test ! -d generic
 +END
 +
 +mkdir generic sub sub/sub2
 +
 +cat > generic/a.c <<END
 +int main (void)
 +{
 +  extern int i;
 +  return i;
 +}
 +END
 +echo 'int i = 0;' > generic/b.c
 +
 +cat > sub/sub2/foo.c <<'END'
 +int answer (void)
 +{
 +  return 42;
 +}
 +END
 +
 +$ACLOCAL
- $EGREP '[^/](a|b|foo)\.\$(OBJEXT)' Makefile.in && Exit 1
++$AUTOMAKE --add-missing 2>stderr || { cat stderr >&2; exit 1; }
 +cat stderr >&2
 +
 +# Make sure compile is installed, and that Automake says so.
 +grep 'install.*compile' stderr
 +test -f compile
 +
++$EGREP '[^/](a|b|foo)\.\$(OBJEXT)' Makefile.in && exit 1
 +
 +$AUTOCONF
 +
 +mkdir build
 +cd build
 +../configure
 +$MAKE
 +
 +test -d progs
 +test -d libs
 +test -d generic
 +test -d sub/sub2
 +
 +if test -f progs/wish; then
 +  EXEEXT=
 +elif test -f progs/wish.exe; then
 +  EXEEXT=.exe
 +else
 +  fatal_ "couldn't determine extension of executables"
 +fi
 +
 +# The libraries and executables are not uselessly remade.
 +: > xstamp
 +$sleep
 +echo dummy > progs/change-dir-timestamp
 +echo dummy > libs/change-dir-timestamp
 +echo dummy > generic/change-dir-timestamp
 +echo dummy > sub/change-dir-timestamp
 +echo dummy > sub/sub2/change-dir-timestamp
 +$MAKE
 +is_newest xstamp progs/wish$EXEEXT libs/libhope.a
 +
 +$MAKE remake-single-object
 +
 +# Must work also with dependency tracking disabled.
 +# Also sanity check the distribution.
 +$MAKE distcheck DISTCHECK_CONFIGURE_FLAGS=--disable-dependency-tracking
 +
 +:
Simple merge
Simple merge
index 1a03b16f04106cc86fd671ab1a3bb05f173d98f7,646c6cf2ccb6aa638fbc241d5b7c05f71d3286da..b1f6980b6a47300f7b1e29fdb4ba057486c5149e
  # You should have received a copy of the GNU General Public License
  # along with this program.  If not, see <http://www.gnu.org/licenses/>.
  
 -# Test of subdir objects with C++.
 +# Grepping checks on the use of subdir objects with C++.
 +# See relate test 't/subobj-cxx-grep.sh' for semantic checks.
  
- . ./defs || Exit 1
+ . ./defs || exit 1
  
 -cat >> configure.ac << 'END'
 -AC_PROG_CXX
 -END
 +echo AC_PROG_CXX >> configure.ac
  
  cat > Makefile.am << 'END'
 -AUTOMAKE_OPTIONS = subdir-objects
  bin_PROGRAMS = wish
  wish_SOURCES = generic/a.cc generic/b.cxx
  END
@@@ -30,8 -32,7 +30,8 @@@ $ACLOCA
  $AUTOMAKE
  
  $FGREP 'generic/a.$(OBJEXT)' Makefile.in
 -grep '[^/]a\.\$(OBJEXT)' Makefile.in && exit 1
 -grep '.*-c -o' Makefile.in
 +$FGREP 'generic/b.$(OBJEXT)' Makefile.in
- grep '[^/][ab]\.\$(OBJEXT)' Makefile.in && Exit 1
- grep '.*-c -o' Makefile.in
++grep '[^/][ab]\.\$(OBJEXT)' Makefile.in && exit 1
++grep '.* -c -o ' Makefile.in
  
  :
diff --cc t/subobj-cxx.sh
index ccb9e77167de58f6029141b40ab8eea11bc29b94,0000000000000000000000000000000000000000..e72a4e7964dc8f6de8fabb7195807b09810c0bbc
mode 100755,000000..100755
--- /dev/null
@@@ -1,121 -1,0 +1,121 @@@
- . ./defs || Exit 1
 +#! /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 <http://www.gnu.org/licenses/>.
 +
 +# Test subdir objects with C++, building both a library and an executable.
 +# Keep in sync with sister test 'subobj-c.sh'.
 +
 +required=c++
- $EGREP '[^/](a|b|foo)\.\$(OBJEXT)' Makefile.in && Exit 1
++. ./defs || exit 1
 +
 +cat >> configure.ac << 'END'
 +AC_PROG_CXX
 +AM_PROG_AR
 +AC_PROG_RANLIB
 +AC_OUTPUT
 +END
 +
 +cat > Makefile.am << 'END'
 +bin_PROGRAMS = progs/wish
 +lib_LIBRARIES = libs/libhope.a
 +progs_wish_SOURCES = generic/a.cc generic/b.c++
 +libs_libhope_a_SOURCES = sub/sub2/foo.cxx
 +
 +.PHONY: remake-single-object
 +remake-single-object:
 +      rm -rf generic
 +      $(MAKE) generic/a.$(OBJEXT)
 +      test -f generic/a.$(OBJEXT)
 +      test ! -f generic/b.$(OBJEXT)
 +      rm -rf generic
 +      $(MAKE) generic/b.$(OBJEXT)
 +      test ! -f generic/a.$(OBJEXT)
 +      test -f generic/b.$(OBJEXT)
 +      rm -rf sub generic
 +      $(MAKE) sub/sub2/foo.$(OBJEXT)
 +      test -f sub/sub2/foo.$(OBJEXT)
 +      test ! -d generic
 +END
 +
 +mkdir generic sub sub/sub2
 +
 +cat > generic/a.cc <<END
 +using namespace std; // Make this valid C++ but invalid C.
 +extern int b (void);
 +int main (void)
 +{
 +  return b ();
 +}
 +END
 +
 +cat > generic/b.c++ <<END
 +using namespace std; // Make this valid C++ but invalid C.
 +int b (void)
 +{
 +  return 0;
 +}
 +END
 +
 +cat > sub/sub2/foo.cxx <<'END'
 +using namespace std; // Make this valid C++ but invalid C.
 +int answer (void)
 +{
 +  return 42;
 +}
 +END
 +
 +$ACLOCAL
 +$AUTOMAKE -a
 +test ! -f compile # This is not needed by C++ support.
++$EGREP '[^/](a|b|foo)\.\$(OBJEXT)' Makefile.in && exit 1
 +
 +$AUTOCONF
 +
 +mkdir build
 +cd build
 +../configure
 +$MAKE
 +
 +test -d progs
 +test -d libs
 +test -d generic
 +test -d sub/sub2
 +
 +if test -f progs/wish; then
 +  EXEEXT=
 +elif test -f progs/wish.exe; then
 +  EXEEXT=.exe
 +else
 +  fatal_ "couldn't determine extension of executables"
 +fi
 +
 +# The libraries and executables are not uselessly remade.
 +: > xstamp
 +$sleep
 +echo dummy > progs/change-dir-timestamp
 +echo dummy > libs/change-dir-timestamp
 +echo dummy > generic/change-dir-timestamp
 +echo dummy > sub/change-dir-timestamp
 +echo dummy > sub/sub2/change-dir-timestamp
 +$MAKE
 +is_newest xstamp progs/wish$EXEEXT libs/libhope.a
 +
 +$MAKE remake-single-object
 +
 +# Must work also with dependency tracking disabled.
 +# Also sanity check the distribution.
 +$MAKE distcheck DISTCHECK_CONFIGURE_FLAGS=--disable-dependency-tracking
 +
 +:
index fc9f8c7e148738c7c26bed3b97f98c2961bed208,0000000000000000000000000000000000000000..940e872a9aa228c06239aa2511b6362a9f9c72db
mode 100755,000000..100755
--- /dev/null
@@@ -1,94 -1,0 +1,94 @@@
- . ./defs || Exit 1
 +#! /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 <http://www.gnu.org/licenses/>.
 +
 +# Test of subdir objects with libtool.
 +
 +required='cc libtoolize'
- $AUTOMAKE --add-missing 2>stderr || { cat stderr >&2; Exit 1; }
++. ./defs || exit 1
 +
 +cat >> configure.ac << 'END'
 +AC_PROG_CC
 +AM_PROG_CC_C_O
 +AM_PROG_AR
 +AC_PROG_LIBTOOL
 +AC_OUTPUT
 +END
 +
 +cat > Makefile.am << 'END'
 +noinst_LTLIBRARIES = libs/libfoo.la
 +libs_libfoo_la_SOURCES = generic/1.c generic/2.c sub/subsub/3.c
 +
 +.PHONY: remake-single-object
 +remake-single-object:
 +      rm -rf generic
 +      $(MAKE) generic/1.lo
 +      test -f generic/1.lo
 +      test ! -f generic/2.lo
 +      rm -rf generic
 +      $(MAKE) generic/2.lo
 +      test ! -f generic/1.lo
 +      test -f generic/2.lo
 +      rm -rf sub generic
 +      $(MAKE) sub/subsub/3.lo
 +      test -f sub/subsub/3.lo
 +      test ! -d generic
 +END
 +
 +mkdir generic sub sub/subsub
 +echo 'int one (void) { return 1; }' > generic/1.c
 +echo 'int two (void) { return 2; }' > generic/2.c
 +echo 'int three (void) { return 3; }' > sub/subsub/3.c
 +
 +libtoolize
 +$ACLOCAL
 +
- grep '[^/][123]\.lo' Makefile.in && Exit 1
++$AUTOMAKE --add-missing 2>stderr || { cat stderr >&2; exit 1; }
 +cat stderr >&2
 +
 +# Make sure compile is installed, and that Automake says so.
 +grep 'install.*compile' stderr
 +test -f compile
 +
++grep '[^/][123]\.lo' Makefile.in && exit 1
 +
 +$AUTOCONF
 +
 +mkdir build
 +cd build
 +../configure
 +$MAKE
 +
 +test -d libs
 +test -d generic
 +test -d sub/subsub
 +
 +# The libraries and executables are not uselessly remade.
 +: > xstamp
 +$sleep
 +echo dummy > libs/change-dir-timestamp
 +echo dummy > generic/change-dir-timestamp
 +echo dummy > sub/change-dir-timestamp
 +echo dummy > sub/subsub/change-dir-timestamp
 +$MAKE
 +is_newest xstamp libs/libfoo.la
 +
 +$MAKE remake-single-object
 +
 +# VPATH builds must work also with dependency tracking disabled.
 +# Also sanity check the distribution.
 +$MAKE distcheck DISTCHECK_CONFIGURE_FLAGS=--disable-dependency-tracking
 +
 +:
diff --cc t/subobj10.sh
index e1d911ada16daaaa3447911dffc4bc6d489eac9b,cefb0ab0652e1af0f402cd8e25fcda0fff24fc51..55776a7228cb391f69ee21cb84634802698c290b
  # You should have received a copy of the GNU General Public License
  # along with this program.  If not, see <http://www.gnu.org/licenses/>.
  
 -# PR 492: Test asm subdir-objects.
 +# PR 492: Test asm subdir objects.
  
  required=gcc
- . ./defs || Exit 1
+ . ./defs || exit 1
  
 -cat > configure.ac << END
 -AC_INIT([$me], [1.0])
 -AM_INIT_AUTOMAKE([subdir-objects])
 -
 +cat >> configure.ac << 'END'
  AM_PROG_AS
  AM_PROG_AR
  AC_PROG_RANLIB
diff --cc t/subobj11a.sh
index 6fea19a55f9720b17e5cafa6e3198354cfe15d94,474ed82fca423cd2db255aef0916e774fb9d21ba..25603cef6e1b9a814925e1ad224a32b498dbe50a
  # You should have received a copy of the GNU General Public License
  # along with this program.  If not, see <http://www.gnu.org/licenses/>.
  
 -# Test that automake works around a bug of Solaris Make. The bug is the
 -# following.  If we have a Makefile containg a file inclusion like this:
 +# If we have a Makefile containing a file inclusion like this:
 +#
  #   include .//foo.mk
 -# Solaris make fails with a message like:
 +#
 +# Solaris 10 make fails with a message like:
 +#
  #   make: ... can't find '/foo.mk': No such file or directory
  #   make: fatal error ... read of include file '/foo.mk' failed
 -# (even if the file 'foo.mk' exists). The error disappear by collapsing
 -# the repeated slash '/' characters into a single one.
  #
 -# See also sister "grepping" test 'subobj11b.test', and related test
 -# 'subobj11c.test'.
 +# (even if the file 'foo.mk' exists).  Our dependency tracking support
 +# code used to generate include directives like that sometimes, thus
 +# causing spurious failures.
 +#
 +# GNU make shouldn't suffer from that Solaris make bug, but we check
 +# the problematic setup anyway -- better safe than sorry.
 +#
  
  required=cc
- . ./defs || Exit 1
+ . ./defs || exit 1
  
  cat >> configure.ac << 'END'
  AC_PROG_CC
diff --cc t/subobj5.sh
Simple merge
diff --cc t/subobj8.sh
index 6ab39d34672013a7380671b235b4b8988fd4139a,58b1e41f39f233861eee04254d76c207c9ccbe23..cd25f66924c2ffcb66fd47b96a38e0df5af1a609
  # You should have received a copy of the GNU General Public License
  # along with this program.  If not, see <http://www.gnu.org/licenses/>.
  
 -# Make sure 'compile' is included when subdir-objects is used in a subdir.
 +# Make sure 'compile' is included when subdir objects are used in a
 +# subdir.
  
- . ./defs || Exit 1
+ . ./defs || exit 1
  
  cat > configure.ac << END
  AC_INIT([$me], [1.0])
diff --cc t/subobj9.sh
index 3743bc30b8589ad499fe8c9ab3cd59cab202914b,2d8f8fbe26bf09ac1a755af1283bbe19276f16cb..4b3c4d5fb1402da9bfa5dd9c7234b40faa768619
  # forgets '.../<file>.o'.
  
  required='c++ libtoolize'
- . ./defs || Exit 1
+ . ./defs || exit 1
  
 -cat > configure.ac << END
 -AC_INIT([$me], [1.0])
 -AM_INIT_AUTOMAKE([subdir-objects])
 +cat >> configure.ac << END
  AC_PROG_CXX
  AM_PROG_AR
  AM_PROG_LIBTOOL
index 022e6533b488881125c10891d6762d5da0f973d4,3d107cfb81b81e33bb57f1e235bbd78d086dbfaf..52b896b837c051d91f98e13de3de7682aa98aff4
  # properly, when a subpackage is involved.
  
  required='cc yacc'
- . ./defs || Exit 1
+ . ./defs || exit 1
  
 -cat >>configure.ac <<'END'
 +cat > configure.ac <<'END'
 +AC_INIT([suya], [0.5a], [automake-ng@gnu.org])
 +AM_INIT_AUTOMAKE([foreign -Wall])
  AC_PROG_CC
 +AC_CONFIG_FILES([GNUmakefile])
  AC_CONFIG_SUBDIRS([lib])
  AC_OUTPUT
  END
diff --cc t/subpkg.sh
index 18d3e20bbe5599647e6879dd0267c87962b33b73,72fcb0ac791f5f3024afb54bfe2d425652a9e7d9..4f86072f973806817f850ef6b3ccc302478afcea
@@@ -107,10 -104,7 +107,10 @@@ $AUTOHEADE
  $AUTOMAKE -Wno-override --add-missing
  cd ..
  
- ./configure >stdout || { cat stdout; Exit 1; }
 -./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.
diff --cc t/substref.sh
index 6e9bb6f6afe511e329aa984eee521d019c5817f2,4ea39e602a293d0b4d61685f89681e5c18386fd2..d24bf13821c3152a61410ab5279a11b45024c527
@@@ -47,8 -47,8 +47,8 @@@ $MAKE tes
  
  # This is unrelated to the rest of this test.  But while we are
  # at it, make sure we don't use am__helldl_SOURCES_DIST here, since
 -# it's not needed.  DIST_SOURCES should contain $(helldl_SOURCES).
 +# it's not needed.  am__dist_sources should contain $(helldl_SOURCES).
- grep am__helldl_SOURCES_DIST Makefile && Exit 1
+ grep am__helldl_SOURCES_DIST Makefile && exit 1
 -grep 'DIST_SOURCES.*\$(helldl_SOURCES)' Makefile
 +grep 'am__dist_sources.*\$(helldl_SOURCES)' Makefile
  
  :
index e1f96b2f6dce14165f55e4732f1ff4a8415fbf22,535e36e8637f444597e205f267be4df30ad4759d..7ac4997f61618025557109f874e78a8305daf62c
  # See automake bug#7824 and bug#7670.
  
  required=cc
- . ./defs || Exit 1
+ . ./defs || exit 1
  
 -plan_ 8
 -
  cat >> configure.ac <<'END'
  AC_PROG_CC
  AC_OUTPUT
index 0bc7295244d98a681c1ba7d2910b31148d2b341c,0000000000000000000000000000000000000000..1736921d0be0b2a7dd932a3a98c18cb108adb5b3
mode 100755,000000..100755
--- /dev/null
@@@ -1,70 -1,0 +1,70 @@@
- . ./defs || Exit 1
 +#! /bin/sh
 +# Copyright (C) 2002-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 <http://www.gnu.org/licenses/>.
 +
 +# Interaction between user-defined extensions for files in _SOURCES
 +# and the use of AM_DEFAULT_SOURCE_EXT.
 +
 +required=c++
++. ./defs || exit 1
 +
 +cat >> configure.ac <<'END'
 +AC_PROG_CXX
 +AC_OUTPUT
 +END
 +
 +cat > Makefile.am <<'END'
 +AM_DEFAULT_SOURCE_EXT = .cc
 +bin_PROGRAMS = foo bar baz qux
 +%.cc: %.zoo
 +      sed 's/INTEGER/int/g' $< >$@
 +EXTRA_DIST = $(addsuffix .zoo,$(bin_PROGRAMS))
 +generated_cc_sources = $(addsuffix .cc,$(bin_PROGRAMS))
 +CLEANFILES = $(generated_cc_sources)
 +# We don't want the generated C++ files to be distributed, and this
 +# is the best workaround we've found so far.  Not very clean, but it
 +# works.
 +dist-hook:
 +      rm -f $(addprefix $(distdir)/,$(generated_cc_sources))
 +END
 +
 +# This is deliberately valid C++, but invalid C.
 +cat > foo.zoo <<'END'
 +using namespace std;
 +INTEGER main (void)
 +{
 +  return 0;
 +}
 +END
 +cp foo.zoo bar.zoo
 +cp foo.zoo baz.zoo
 +cp foo.zoo qux.zoo
 +
 +$ACLOCAL
 +$AUTOMAKE
 +$AUTOCONF
 +
 +./configure
 +
 +$MAKE all
 +$MAKE distdir
 +ls -l $distdir
 +test ! -f $distdir/foo.cc
 +test ! -f $distdir/bar.cc
 +test ! -f $distdir/baz.cc
 +test ! -f $distdir/qux.cc
 +$MAKE distcheck
 +
 +:
index 1a3c0134bbb84bcf7054272563a2752679bf29c3,0000000000000000000000000000000000000000..8b1e505118b2f08acdf709ad967258931ac909b0
mode 100755,000000..100755
--- /dev/null
@@@ -1,74 -1,0 +1,74 @@@
- . ./defs || Exit 1
 +#! /bin/sh
 +# Copyright (C) 2002-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 <http://www.gnu.org/licenses/>.
 +
 +# Check that Automake support entries with user-defined extensions of
 +# files in _SOURCES, and we can override the choice of a link in case
 +# the Automake default (C linker) would be inappropriate.
 +
 +required=c++
++. ./defs || exit 1
 +
 +cat >> configure.ac <<'END'
 +AC_PROG_CXX
 +AC_OUTPUT
 +END
 +
 +cat > Makefile.am <<'END'
 +%.$(OBJEXT): %.xt
 +## Creative quoting to plase maintainer checks.
 +      sed -e 's/@/o/g' -e 's/!/;/g' -e 's/<-/<''</g' $< >$*-t.cc \
 +        && $(CXX) -c $*-t.cc \
 +        && rm -f $*-t.cc \
 +        && mv -f $*-t.$(OBJEXT) $@
 +bin_PROGRAMS = foo
 +foo_SOURCES = 1.xt 2.xt
 +foo_LINK = $(CXX) -o $@
 +END
 +
 +cat > 1.xt <<'END'
 +#include <cstdlib>
 +void say_hell@ (v@id)!
 +int main (v@id)
 +{
 +   say_hell@ ()!
 +   std::exit(0)!
 +}
 +END
 +
 +cat > 2.xt <<'END'
 +#include <i@stream>
 +void say_hell@ (v@id)
 +{
 +  using namespace std!
 +  c@ut <- "Hell@, W@rld\n" <- endl!
 +}
 +END
 +
 +$ACLOCAL
 +$AUTOMAKE
 +$AUTOCONF
 +
 +./configure
 +
 +$MAKE all
 +if cross_compiling; then :; else
 +  ./foo
 +  ./foo | grep 'Hello, World'
 +fi
 +
 +$MAKE distcheck
 +
 +:
index 254ab7907d3bfe1a53f5f9797775c98e668c7b66,22ec98520e0b46db8333c3a71ac8853044774858..070be7439f820ce522962240ab455f99470be1a3
  # You should have received a copy of the GNU General Public License
  # along with this program.  If not, see <http://www.gnu.org/licenses/>.
  
 -# Tests that Automake understands suffix rules with subdir objects.
 -# Reported by John Ratliff.
 +# Tests that pattern rules with subdir objects are understood.
 +# Originally reported by John Ratliff against suffix rules.
  
  required=cc
- . ./defs || Exit 1
+ . ./defs || exit 1
  
  cat >>configure.ac <<EOF
  AC_PROG_CC
index 158be9c668184a8bf7dcac2126c33bbff1e7d791,0000000000000000000000000000000000000000..53c8167b880ae2fc603b5e8a443b8643b6b13c78
mode 100755,000000..100755
--- /dev/null
@@@ -1,106 -1,0 +1,106 @@@
- . ./defs || Exit 1
 +#! /bin/sh
 +# Copyright (C) 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 <http://www.gnu.org/licenses/>.
 +
 +# Check that Automake support entries with user-defined extensions of
 +# files in _SOURCES, if there is a rule to turn files with that
 +# extension in object files.
 +# See also related test 'suffix-custom-go.sh' for a check using a
 +# real-world third party compiler (Go from Google).
 +
 +required=cc
- AC_DEFINE([EXIT_OK], [0], [Exit status for success])
- AC_DEFINE([EXIT_KO], [1], [Exit status for failure])
++. ./defs || exit 1
 +
 +cat >> configure.ac <<'END'
 +AC_CONFIG_HEADERS([config.h])
++AC_DEFINE([EXIT_OK], [0], [The exit status for success])
++AC_DEFINE([EXIT_KO], [1], [The exit status for failure])
 +AC_PROG_CC
 +AC_OUTPUT
 +END
 +
 +cat > Makefile.am <<'END'
 +AM_DEFAULT_SOURCE_EXT = .my-c
 +MY_CFLAGS = $(if $(filter .,$(srcdir)),,-I $(srcdir)) $(CPPFLAGS)
 +%.$(OBJEXT): %.my-c
 +      sed -e 's/@/o/g' -e 's/~/0/g' $< >$*-t.c \
 +        && $(CC) $(MY_CFLAGS) -c $*-t.c \
 +        && rm -f $*-t.c \
 +        && mv -f $*-t.$(OBJEXT) $@
 +bin_PROGRAMS = foo
 +bin_PROGRAMS += zardoz
 +zardoz_SOURCES = main.c protos.h greet.my-c cleanup.my-c
 +END
 +
 +cat > foo.my-c <<'END'
 +#include <stdi@.h>
 +#include <stdlib.h>
 +int main (v@id)
 +{
 +   printf ("Dummy\n");
 +   exit (~);
 +}
 +END
 +
 +cat > protos.h << 'END'
 +void greet (void);
 +int cleanup (void);
 +#include <stdio.h>
 +END
 +
 +cat > greet.my-c << 'END'
 +#include "pr@t@s.h"
 +void greet (v@id)
 +{
 +    printf ("Hell@, ");
 +}
 +END
 +
 +cat > cleanup.my-c << 'END'
 +#include "pr@t@s.h"
 +int cleanup (v@id)
 +{
 +  return (fcl@se (std@ut) == ~);
 +}
 +END
 +
 +cat > main.c <<'END'
 +#include <config.h>
 +#include "protos.h"
 +int main (void)
 +{
 +  greet ();
 +  puts ("W@rld!\n");
 +  return (cleanup () ? EXIT_OK : EXIT_KO);
 +}
 +END
 +
 +$ACLOCAL
 +$AUTOHEADER
 +$AUTOMAKE
 +$AUTOCONF
 +
 +./configure
 +
 +$MAKE all
 +if cross_compiling; then :; else
 +  ./foo
 +  ./zardoz
 +  ./zardoz | grep 'Hello, W@rld!'
 +fi
 +
 +$MAKE distcheck
 +
 +:
diff --cc t/suffix-hdr.sh
index 67c7034c6926a6e8e69f8a878b83f8083328fbcd,0000000000000000000000000000000000000000..aced454a81d3aef92523b5bd2f0dc41b518902b6
mode 100755,000000..100755
--- /dev/null
@@@ -1,82 -1,0 +1,82 @@@
- . ./defs || Exit 1
 +#! /bin/sh
 +# Copyright (C) 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 <http://www.gnu.org/licenses/>.
 +
 +# Use of "custom" headers (with custom suffix).
 +
 +required='cc native'
++. ./defs || exit 1
 +
 +cat >> configure.ac << 'END'
 +AC_PROG_CC
 +AC_OUTPUT
 +END
 +
 +cat > Makefile.am << 'END'
 +noinst_PROGRAMS = zardoz
 +nodist_zardoz_SOURCES = foo.c
 +EXTRA_DIST = bar.my-h foo.my-c
 +BUILT_SOURCES = bar.h
 +%.c: %.my-c
 +      sed 's/INTEGER/int/' $< >$@
 +%.h: %.my-h
 +      sed 's/SUBSTITUTE/#define/' $< >$@
 +CLEANFILES = $(nodist_zardoz_SOURCES) $(BUILT_SOURCES)
 +END
 +
 +cat > foo.my-c << 'END'
 +#include "bar.h"
 +INTEGER main (void)
 +{
 +  printf ("Hello, %s!\n", PLANET);
 +  return 0;
 +}
 +END
 +
 +cat > bar.my-h << 'END'
 +#include <stdio.h>
 +SUBSTITUTE PLANET "Mars"
 +END
 +
 +$ACLOCAL
 +$AUTOCONF
 +$AUTOMAKE --add-missing
 +
 +./configure --enable-dependency-tracking
 +
 +$MAKE
 +./zardoz
 +test "$(./zardoz)" = 'Hello, Mars!'
 +
 +$sleep
 +$PERL -npi -e 's/\bMars\b/Jupiter/' bar.my-h
 +
 +$MAKE
 +./zardoz
 +test "$(./zardoz)" = 'Hello, Jupiter!'
 +
 +$MAKE distdir
 +test -f $distdir/foo.my-c
 +test -f $distdir/bar.my-h
 +test ! -f $distdir/foo.c
 +test ! -f $distdir/bar.h
 +
 +$MAKE clean
 +test ! -f foo.c
 +test ! -f bar.h
 +
 +$MAKE distcheck
 +
 +:
diff --cc t/suffix-obj.sh
index 41d70eec71a0d901c6c5a4f19f1af2a6182bda65,7500543d15ac4a78289cafdb0b443815e4219b52..38bf38faa601b624b58d3faedbb2793ddb4d358c
@@@ -15,8 -15,9 +15,8 @@@
  # along with this program.  If not, see <http://www.gnu.org/licenses/>.
  
  # Test to make sure that '.o' and '.obj' are handled like '.$(OBJEXT)'.
 -# See also related "grepping" test suffix6.test.
  
- . ./defs || Exit 1
+ . ./defs || exit 1
  
  cat >> configure.ac << 'END'
  # $(LINK) is not defined automatically by Automake, since the *_SOURCES
index 8de64ce547740fcf65370c6e2fe7224341bc3a38,d9db4aad1e2af5654c8c790e2c151b0c9f9e44f3..c0dd3d5dc531c47edba23bf126b9f9a246f66501
  # You should have received a copy of the GNU General Public License
  # along with this program.  If not, see <http://www.gnu.org/licenses/>.
  
 -# Make sure libtool clean targets exist.
 -# Report from Eric Magnien.
 +# Automake-NG still accepts old-fashioned suffix rules.
  
- . ./defs || Exit 1
 -required=libtoolize
+ . ./defs || exit 1
  
  cat >> configure.ac << 'END'
 -AC_PROG_CC
 -AM_PROG_AR
 -AC_PROG_LIBTOOL
  AC_CONFIG_FILES([sub/Makefile])
  AC_OUTPUT
  END
diff --cc t/suffix.sh
Simple merge
diff --cc t/suffix10.sh
index 243ed2331549360e6de8fd3a37d04960283ad7f5,a65092415dd332b3e50cdcdd9d6af666a4802c5c..6f95391c94badde70d3cb1207ac04981c3e4208a
  # (related to PR/37)
  
  required='cc libtoolize yacc'
- . ./defs || Exit 1
+ . ./defs || exit 1
  
 -plan_ 7
 -
  cat >>configure.ac <<EOF
  AC_PROG_CC
  AC_PROG_YACC
diff --cc t/suffix13.sh
index 7917838effb22b6ae4002180dd597749740e1408,bcdbc9a0b489b7749af38e9876984632a73d3358..83e677dd36974b1ad6ff432fc0f216a6da921d88
  # You should have received a copy of the GNU General Public License
  # along with this program.  If not, see <http://www.gnu.org/licenses/>.
  
 -# Tests that Automake understands suffix rules with renamed objects
 -# and subdir objects.
 -# Reported by Florian Briegel.
 +# Tests that Automake understands suffix-based pattern rules with
 +# renamed objects and subdir objects.  Reported by Florian Briegel.
  
  required=cc
- . ./defs || Exit 1
+ . ./defs || exit 1
  
  cat >>configure.ac <<EOF
  AC_PROG_CC
diff --cc t/suffix2.sh
index aa23b719960fb4b412f8c8181b0d56222e9ccc25,8ac0431c05ab7f716fc0aa33004f9f2bad7e0bdb..98d05e66ab1c4d5cde9c1459170d00d4806792b8
  # You should have received a copy of the GNU General Public License
  # along with this program.  If not, see <http://www.gnu.org/licenses/>.
  
 -# Make sure proper suffix rules for C compilation are produced,
 +# Make sure proper pattern rules for C compilation are produced,
  # and only once, even for libtool libraries.
  # See also related test 'suffix.test'.
 -required=libtoolize
  
- . ./defs || Exit 1
+ . ./defs || exit 1
  
  cat >> configure.ac << 'END'
  AC_PROG_CC
diff --cc t/suffix3.sh
index bdf22cd5909a0a6c7e8f4b5c19cf2bac885a9685,0000000000000000000000000000000000000000..f569c528c11733340676779f2ac55dcfdc0dd2a9
mode 100755,000000..100755
--- /dev/null
@@@ -1,69 -1,0 +1,69 @@@
- . ./defs || Exit 1
 +#! /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 <http://www.gnu.org/licenses/>.
 +
 +# Test to make sure that suffix rules chain.
 +
 +required=c++
- $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
++. ./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
 +
 +:
diff --cc t/suffix5.sh
Simple merge
diff --cc t/suffix8.sh
index f4920ea47b7a5354bff0996638528d6387ee299d,fdaf08714a8cf86a75e0d4bf979260fcce4d5fe9..30bb6e4c2ef18dd30894f292c010b33199e95062
  # From PR/37.
  
  required='cc libtoolize'
- . ./defs || Exit 1
+ . ./defs || exit 1
  
 -plan_ 10
 -
  cat >>configure.ac <<'END'
  AM_PROG_AR
  AM_PROG_LIBTOOL
diff --cc t/suffix9.sh
Simple merge
index 7c6aed0b731405d41f22adc89c66fce7799eef5c,abc4ec8c08f07081932fbeb4c28e4d707a0ab50e..74f7facbb1db6fcfa552cda056c7646d257103a9
@@@ -44,7 -44,7 +44,7 @@@ not o
  ok
  END
  
- $MAKE check TESTS=all.test >stdout && { cat stdout; Exit 1; }
 -TESTS=all.test $MAKE -e check >stdout && { cat stdout; exit 1; }
++$MAKE check TESTS=all.test >stdout && { cat stdout; exit 1; }
  cat stdout
  count_test_results total=14 pass=6 fail=5 xpass=1 xfail=1 skip=1 error=0
  
Simple merge
index cfa6eeee208f8a66f1251d95a9ecf0b740732fed,d0d3096a459955ffae399ee07b940a88e44daad4..2612cd24a323318b9d3f31a158dd84bfc0934be3
@@@ -50,7 -50,8 +50,7 @@@ ERROR: b.test - Bail out
  ERROR: c.test - Bail out! FUBAR!
  END
  
- $MAKE TESTS='a.test b.test c.test' check >stdout && { cat stdout; Exit 1; }
 -TESTS='a.test b.test c.test' $MAKE -e check >stdout \
 -  && { cat stdout; exit 1; }
++$MAKE TESTS='a.test b.test c.test' check >stdout && { cat stdout; exit 1; }
  cat stdout
  
  count_test_results total=5 pass=1 fail=0 xpass=0 xfail=0 skip=1 error=3
index f9f0062d2d4096eda41cb981ca9fe9bdb72b7f7b,cd9aa146b89d8bd6d60851e89439d8fa2528e59d..50739590c95b69ed36ddb87e9314dd1351299813
@@@ -52,8 -52,8 +52,8 @@@ ok 
  ok 3
  END
  
 -TESTS='foo.test bar.test baz.test' $MAKE -e check >stdout \
 +$MAKE TESTS='foo.test bar.test baz.test' check >stdout \
-   && { cat stdout; Exit 1; }
+   && { cat stdout; exit 1; }
  cat stdout
  
  count_test_results total=5 pass=1 fail=0 xpass=0 xfail=0 skip=1 error=3
index d07d6c324dd6362d58bfe109394f6622d0a9e199,91dfd2442866fe1398801825c3f104e966ea8132..d8c606507756141aff656866e02618447fb55d5a
@@@ -118,8 -118,8 +118,8 @@@ echo "ERROR: e.test - Bail out!" >> ex
  # Doing the sums above, we have:
  test_counts='total=12 pass=3 fail=1 xpass=1 xfail=1 skip=1 error=5'
  
 -TESTS='a.test b.test c.test d.test e.test' $MAKE -e check >stdout \
 +$MAKE TESTS='a.test b.test c.test d.test e.test' check >stdout \
-   && { cat stdout; Exit 1; }
+   && { cat stdout; exit 1; }
  cat stdout
  
  count_test_results $test_counts
diff --cc t/tap-basic.sh
index ad67f6524989e1af03daba1f0237b4f2ff611a1a,b3b79de89892a8cd7b80d65eeed42d1c270ee7b7..cf923002abe7784e0264eeb902ef975e89dcdfae
@@@ -134,7 -127,7 +134,7 @@@ Bail out
  ok 1
  END
  
- $MAKE TESTS=bail.test check >stdout && { cat stdout; Exit 1; }
 -TESTS=bail.test $MAKE -e check >stdout && { cat stdout; exit 1; }
++$MAKE TESTS=bail.test check >stdout && { cat stdout; exit 1; }
  cat stdout
  
  count_test_results total=1 pass=0 fail=0 xpass=0 xfail=0 skip=0 error=1
@@@ -144,16 -137,16 +144,16 @@@ test -f bail.lo
  test -f test-suite.log
  
  grep '^ERROR: bail\.test - Bail out!' stdout
- grep '^PASS:' stdout && Exit 1
+ grep '^PASS:' stdout && exit 1
  test $($FGREP -c ': bail.test' stdout) -eq 1
- $FGREP 'success.test' stdout && Exit 1
+ $FGREP 'success.test' stdout && exit 1
  
 -# Override TEST_LOGS from the command line, making it point to a test
 +# Override TESTS from the command line, making it point to a test
  # (ok.test) that has to be generated at make time.
  
  rm -f *.log *.test
  
- $MAKE TESTS=ok check >stdout || { cat stdout; Exit 1; }
 -TEST_LOGS=ok.log $MAKE -e check >stdout || { cat stdout; exit 1; }
++$MAKE TESTS=ok check >stdout || { cat stdout; exit 1; }
  cat stdout
  
  count_test_results total=3 pass=1 fail=0 xpass=0 xfail=1 skip=1 error=0
diff --cc t/tap-color.sh
index 6773b2800fb37ae572418afd7cfcaff1d3b532c6,2fa45d18475c2e0759a940419bcfa35b873827c1..f60cc57b8b77337ac91cac05519ba04645f0d956
@@@ -117,22 -117,48 +117,22 @@@ test_color (
  
  test_no_color ()
  {
 -  # With make implementations that, like Solaris make, in case of errors
 -  # print the whole failing recipe on standard output, we should content
 -  # ourselves with a laxer check, to avoid false positives.
 -  # Keep this in sync with lib/am/check.am:$(am__color_tests).
 -  if $FGREP '= Xalways; then' stdout; then
 -    # Extra verbose make, resort to laxer checks.
 -    # But we also want to check that the testsuite summary is not unduly
 -    # colorized.
 -    (
 -      set +e # In case some grepped regex below isn't matched.
 -      # Not a useless use of cat; see above comments "grep-nonprinting"
 -      # requirement in 'test-init.sh'.
 -      cat stdout | grep "TOTAL.*:"
 -      cat stdout | grep "PASS.*:"
 -      cat stdout | grep "FAIL.*:"
 -      cat stdout | grep "SKIP.*:"
 -      cat stdout | grep "XFAIL.*:"
 -      cat stdout | grep "XPASS.*:"
 -      cat stdout | grep "ERROR.*:"
 -      cat stdout | grep "^#"
 -      cat stdout | grep 'test.*expected'
 -      cat stdout | grep 'test.*not run'
 -      cat stdout | grep '===='
 -      cat stdout | grep '[Ss]ee .*test-suite\.log'
 -      cat stdout | grep '[Tt]estsuite summary'
 -    ) | grep "$esc" && exit 1
 -    : For shells with broken 'set -e'
 -  else
 -    cat stdout | grep "$esc" && exit 1
 -    : For shells with broken 'set -e'
 -  fi
 +  # Not a useless use of cat; see above comments "grep-nonprinting"
 +  # requirement in 'test-init.sh'.
-   cat stdout | grep "$esc" && Exit 1
-   :
++  cat stdout | grep "$esc" && exit 1
++  : For 'set -e'.
  }
  
 +# It should be possible to override AM_COLOR_TESTS also from the
 +# environment.
  # Forced colorization should take place also with non-ANSI terminals;
  # hence the "TERM=dumb" definition.
--TERM=dumb AM_COLOR_TESTS=always $MAKE check >stdout \
-   && { cat stdout; Exit 1; }
++AM_COLOR_TESTS=always $MAKE TERM=dumb check >stdout \
+   && { cat stdout; exit 1; }
  cat stdout
  test_color
  
- $MAKE check TERM=ansi >stdout && { cat stdout; Exit 1; }
 -TERM=ansi $MAKE -e check >stdout \
 -  && { cat stdout; exit 1; }
++$MAKE check TERM=ansi >stdout && { cat stdout; exit 1; }
  cat stdout
  test_no_color
  
index f76ce3b08fea7446213ca02dbe3b7aea45edfb66,6bf168e1a8c93e21545d87822621a01192ade3a4..32a474a4f16cd075a0a41d4c8b312fcca07f6166
  
  # Auxiliary test to set up common data used by many tests on TAP support.
  
- . ./defs || Exit 1
+ . ./defs || exit 1
  
 -cat >> configure.ac << END
 -AC_OUTPUT
 -END
 +echo AC_OUTPUT >> configure.ac
  
  cat > Makefile.am << 'END'
  TEST_LOG_DRIVER = $(srcdir)/tap-driver
diff --cc t/tap-deps.sh
index 9e52b79bcf5f07211fdb3f2e34a044ee0c17de27,ee76e938f0c65cb1a32017bf69edc8b19823a509..60997b46654691880af03d1ffe510b333be5893e
  # Basic TAP test protocol support:
  #  - dependencies between test scripts
  
- . ./defs || Exit 1
+ . ./defs || exit 1
  
  cat > Makefile.am << 'END'
 -# The tests are *deliberately* listed in inversed order here.
 +# The tests are *deliberately* listed in inverted order here.
  TESTS = c.test b.test a.test
  b.log: a.log
  c.log: b.log
Simple merge
index 058757cdf056a075c7af1c81c4dd5fccb8015546,10b4f5b013ccfdabec34a6a19c123784fb21e6b8..340d69a33624f50a0a7ef676b0c7147e280ee167
@@@ -52,9 -52,9 +52,9 @@@ PASS: all.test 4 - zardo
  # all.test: Shell metacharacters here: $metacharacters
  END
  
- $MAKE check >stdout || { cat stdout; Exit 1; }
+ $MAKE check >stdout || { cat stdout; exit 1; }
  cat stdout
- $EGREP "#.*all\\.test|a comment|(Tests|Shell) " stdout && Exit 1
 -$EGREP -i "#.*all\\.test|a comment|(Tests|Shell) " stdout && exit 1
++$EGREP "#.*all\\.test|a comment|(Tests|Shell) " stdout && exit 1
  count_test_results total=4 pass=2 fail=0 xpass=0 xfail=1 skip=1 error=0
  
  echo 'AM_TEST_LOG_DRIVER_FLAGS = --comments' >> Makefile
@@@ -66,10 -66,10 +66,10 @@@ cat go
  diff exp got
  count_test_results total=4 pass=2 fail=0 xpass=0 xfail=1 skip=1 error=0
  
 -TEST_LOG_DRIVER_FLAGS="--no-comments" $MAKE -e check >stdout \
 +$MAKE check TEST_LOG_DRIVER_FLAGS="--no-comments" >stdout \
-   || { cat stdout; Exit 1; }
+   || { cat stdout; exit 1; }
  cat stdout
- $EGREP "#.*all\\.test|a comment|(Tests|Shell) " stdout && Exit 1
 -$EGREP -i "#.*all\\.test|a comment|(Tests|Shell) " stdout && exit 1
++$EGREP "#.*all\\.test|a comment|(Tests|Shell) " stdout && exit 1
  count_test_results total=4 pass=2 fail=0 xpass=0 xfail=1 skip=1 error=0
  
  # The "#"-prepended lines here shouldn't be parsed as test results.
diff --cc t/tap-doc.sh
Simple merge
diff --cc t/tap-doc2.sh
index f42a687a754c49d589de96bf6156a913a94b38f9,c2f0fa3f41b8bddcd7bf06ea5aec469ce62538d7..9ce91c6c0556a34fe8c4184d926d5a86e3e8adee
@@@ -78,7 -80,10 +78,7 @@@ cp "$am_scriptdir"/tap-driver.sh build-
  
  case $MAKE in *\ -j*) skip_ "can't work easily with concurrent make";; esac
  
- $MAKE check >stdout && { cat stdout; Exit 1; }
 -# Prevent Sun Distributed Make from trying to run in parallel.
 -DMAKE_MODE=serial; export DMAKE_MODE
 -
+ $MAKE check >stdout && { cat stdout; exit 1; }
  cat stdout
  
  cat > exp <<'END'
@@@ -101,10 -106,10 +101,10 @@@ diff exp go
  
  grep '^Please report to bug-automake@gnu\.org$' stdout
  
 -env \
 +$MAKE check \
    TESTS='foo.test baz.test' \
    TEST_LOG_DRIVER_FLAGS='--comments --ignore-exit' \
-     > stdout || { cat stdout; Exit 1; }
 -  $MAKE -e check >stdout || { cat stdout; exit 1; }
++    > stdout || { cat stdout; exit 1; }
  
  cat > exp <<'END'
  PASS: foo.test 1 - Swallows fly
index 3d4663ce82e5c87fc738de3165eb28d40178764c,85db2cb34993d58a641da584dcaf88a478fcda53..9fd851e20e2c944ed806849ddfe7f776bc5766f7
@@@ -102,10 -102,10 +102,10 @@@ cat > skipall.test << 'END
  END
  
  # We don't care about the exit status of "make check" here.
 -TESTS="$(echo *.test)" $MAKE -e check || :
 +$MAKE TESTS="$(echo *.test)" check || :
  cat test-suite.log
  
- grep ':.*ok|not seen' test-suite.log && Exit 1
+ grep ':.*ok|not seen' test-suite.log && exit 1
  
  for s in skip todo fail xpass bail error; do
    $FGREP "::$s::" test-suite.log
index e5ca64b560fbd45ac94fb736ab5e5ccf41006b1d,ba232c3b3fd70193db32bfccae2d8fa415eaede9..9d695648ebc50625540d13b52704ac9651cc50f5
@@@ -140,7 -140,7 +140,7 @@@ EN
  
  tests=$(echo *.test) # Also required later.
  
- $MAKE TESTS="$tests" check >stdout && { cat stdout; Exit 1; }
 -TESTS="$tests" $MAKE -e check >stdout && { cat stdout; exit 1; }
++$MAKE TESTS="$tests" check >stdout && { cat stdout; exit 1; }
  cat stdout
  
  # Dirty trick required here.
@@@ -149,7 -149,7 +149,7 @@@ for tst in $(echo " $tests " | sed 's/\
  done
  
  rm -f test-suite.log
- $MAKE TESTS="$tests" test-suite.log && Exit 1
 -TESTS="$tests" $MAKE -e test-suite.log && exit 1
++$MAKE TESTS="$tests" test-suite.log && exit 1
  cat test-suite.log
  
  have_rst_section ()
index 408646a8550e5abeeb50a3cd844616194c55d33b,e774f731002c93542611ef69ce3356d7851e2dc9..44befac01fb9ffb7ae8b3e7d0b8632f440f9dece
  # You should have received a copy of the GNU General Public License
  # along with this program.  If not, see <http://www.gnu.org/licenses/>.
  
 -# TAP support:
 -# - RECHECK_LOGS
 +# TAP support: AM_LAZY_CHECK
  
- . ./defs || Exit 1
+ . ./defs || exit 1
  
  cat > Makefile.am << 'END'
  TEST_LOG_COMPILER = cat
@@@ -57,14 -58,14 +57,14 @@@ grep_summary (
    grep '^# ERROR: *1$' stdout
  }
  
- $MAKE check && Exit 1
 -$MAKE -e check && exit 1
++$MAKE check && exit 1
  test -f foo.log
  test -f bar.log
  test -f baz.log
  
  rm -f foo.log bar.log
  
- $MAKE AM_LAZY_CHECK=yes check > stdout && { cat stdout; Exit 1; }
 -env RECHECK_LOGS= $MAKE -e check > stdout && { cat stdout; exit 1; }
++$MAKE AM_LAZY_CHECK=yes check > stdout && { cat stdout; exit 1; }
  cat stdout
  test -f foo.log
  test -f bar.log
@@@ -79,7 -80,7 +79,7 @@@ touch foo.tes
  # We re-run only a successful test, but the tests that failed in the
  # previous run should still be taken into account, and cause an overall
  # failure.
- $MAKE AM_LAZY_CHECK=yes check > stdout && { cat stdout; Exit 1; }
 -env RECHECK_LOGS= $MAKE -e check > stdout && { cat stdout; exit 1; }
++$MAKE AM_LAZY_CHECK=yes check > stdout && { cat stdout; exit 1; }
  cat stdout
  grep '^PASS: foo\.test 1$' stdout
  grep '^PASS: foo\.test 2$' stdout
@@@ -89,18 -90,29 +89,18 @@@ grep_summar
  
  $sleep
  touch zardoz
- $MAKE AM_LAZY_CHECK=yes check > stdout && { cat stdout; Exit 1; }
 -env RECHECK_LOGS= $MAKE -e check > stdout && { cat stdout; exit 1; }
++$MAKE AM_LAZY_CHECK=yes check > stdout && { cat stdout; exit 1; }
  cat stdout
  grep '^ERROR: baz\.test' stdout
- $EGREP '(foo|bar)\.test' stdout && Exit 1
+ $EGREP '(foo|bar)\.test' stdout && exit 1
  is_newest baz.log zardoz
  grep_summary
  
  # Now, explicitly retry with all test logs already updated, and ensure
  # that the summary is still displayed.
- $MAKE AM_LAZY_CHECK=yes check > stdout && { cat stdout; Exit 1; }
 -env RECHECK_LOGS= $MAKE -e check > stdout && { cat stdout; exit 1; }
++$MAKE AM_LAZY_CHECK=yes check > stdout && { cat stdout; exit 1; }
  cat stdout
- $EGREP '(foo|bar|baz)\.test' stdout && Exit 1
+ $EGREP '(foo|bar|baz)\.test' stdout && exit 1
  grep_summary
  
 -# The following should re-run foo.test (and only foo.test), even if its
 -# log file is up-to-date.
 -: > older
 -env RECHECK_LOGS=foo.log $MAKE -e check > stdout && { cat stdout; exit 1; }
 -cat stdout
 -grep '^PASS: foo\.test 1$' stdout
 -grep '^PASS: foo\.test 2$' stdout
 -grep 'ba[rz]\.test' stdout && exit 1
 -is_newest foo.log older
 -grep_summary
 -
  :
diff --cc t/tap-log.sh
index c5bcf0c88dbd1e1b7f6f4f13fd89a8be0791c0cf,4a4f7e6bf8ffe283a52bc620bef6f0dbfd2e110e..d5f113ed3d87b41956706e703a161027ece17c0f
@@@ -85,7 -85,7 +85,7 @@@ EN
  
  chmod a+x *.test
  
- $MAKE check TEST_SUITE_LOG=my.log && Exit 1
 -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
index 6b9995a40748b5d82bf1d6ea58fb9154cb2d5114,1fe4b85634b982918a87c232c0c6e1ff6d3ec117..38a5f74b84455de651428cc5ff0bc55be532f7e5
@@@ -60,8 -60,8 +60,8 @@@ count_test_results total=2 pass=1 fail=
  
  # See that the option '--no-merge' can override the effect of '--merge'.
  
 -TEST_LOG_DRIVER_FLAGS=--no-merge $MAKE -e check >stdout \
 +$MAKE check TEST_LOG_DRIVER_FLAGS=--no-merge >stdout \
-   || { cat stdout; Exit 1; }
+   || { cat stdout; exit 1; }
  cat stdout
  
  count_test_results total=1 pass=1 fail=0 xpass=0 xfail=0 skip=0 error=0
diff --cc t/tap-more.sh
Simple merge
diff --cc t/tap-more2.sh
Simple merge
index 09b232f2f8e811caad54f7f271d0199da61bbf2e,cf8918c74ba174000d0dcfd3b48d8d0fabc8df1c..2faf679f5624ffa9f85ddc17fe8b12db7b1bcdcf
@@@ -26,7 -26,7 +26,7 @@@
  echo 'Bail out! 0' > a.test
  echo 'Bail out! 0.0' > b.test
  
- $MAKE TESTS='a.test b.test' check >stdout && { cat stdout; Exit 1; }
 -TESTS='a.test b.test' $MAKE -e check >stdout && { cat stdout; exit 1; }
++$MAKE TESTS='a.test b.test' check >stdout && { cat stdout; exit 1; }
  cat stdout
  
  count_test_results total=2 pass=0 fail=0 xpass=0 xfail=0 skip=0 error=2
index c965ab2430baf5ddd89f7748b239eeb1b88de581,7602affb19ded220cbaf91faf5374dfb2d33012b..7502a462ab092356b74a5614d79941bc6b463a59
@@@ -25,7 -25,7 +25,7 @@@
  echo '1..0 # SKIP 0' > a.test
  echo '1..0 # SKIP 0.0' > b.test
  
- $MAKE TESTS='a.test b.test' check >stdout || { cat stdout; Exit 1; }
 -TESTS='a.test b.test' $MAKE -e check >stdout || { cat stdout; exit 1; }
++$MAKE TESTS='a.test b.test' check >stdout || { cat stdout; exit 1; }
  cat stdout
  
  count_test_results total=2 pass=0 fail=0 xpass=0 xfail=0 skip=2 error=0
index eec90b3ec47b41bd9a0c11bf4a9ee2bdd405c568,e884a1e0793f9113e7b029f0d2d11357f1dabd96..0e3ffb20335d920c8a597479a16a2f997b982110
@@@ -57,8 -57,8 +57,8 @@@ ok 1
  ok 17
  END
  
 -TESTS='a.test b.test c.test d.test' $MAKE -e check >stdout \
 +$MAKE TESTS='a.test b.test c.test d.test' check >stdout \
-   && { cat stdout; Exit 1; }
+   && { cat stdout; exit 1; }
  cat stdout
  
  count_test_results total=17 pass=8 fail=0 xpass=0 xfail=1 skip=0 error=8
index a397252258806247c62f4638adcdd516b64c4ac2,7b800d5bc262befbe4afd99801f482f83ce38fa8..617f89cddfcb20b65a1c4dbde774de2e5203e240
@@@ -52,7 -52,7 +52,7 @@@ for e in $exit_statuses; d
    done
  done
  
 -env TEST_LOG_DRIVER_FLAGS='--ignore-exit' $MAKE -e check
 +$MAKE check TEST_LOG_DRIVER_FLAGS='--ignore-exit'
- $FGREP ".test - exited with status" *.log && Exit 1
+ $FGREP ".test - exited with status" *.log && exit 1
  
  :
index 77bb2f0d98d04da55bff3ded9feebb69ec6eaf92,993e750e803b18cdd123667e71168b294022d5ed..380548f270f21e79c62713bb8c6371c93bafdce1
@@@ -46,7 -46,7 +46,7 @@@ ok # SKIP who cares
  $weirdchars
  END
  
- $MAKE TESTS=ok.test check || { cat ok.log; Exit 1; }
 -TESTS=ok.test $MAKE -e check || { cat ok.log; exit 1; }
++$MAKE TESTS=ok.test check || { cat ok.log; exit 1; }
  cat ok.log
  
  for rx in \
index fcd26a5b57b48512db05defaf48932136aaffffd,86ba401e8a5509b17080d8c2e8f8341dc0b39675..044258e387c0340672ec3b72873b1ea6d5f0153f
@@@ -36,8 -36,8 +36,8 @@@ ok 
  END
  
  for pos in leading trailing; do
 -  TESTS="$pos-repeated.test" $MAKE -e check >stdout \
 +  $MAKE TESTS="$pos-repeated.test" check >stdout \
-     && { cat stdout; Exit 1; }
+     && { cat stdout; exit 1; }
    cat stdout
    count_test_results total=2 pass=1 fail=0 xpass=0 xfail=0 skip=0 error=1
    grep "^ERROR: $pos-repeated\\.test - multiple test plans$" stdout
@@@ -59,8 -59,8 +59,8 @@@ ok 
  1..2
  END
  
 -env TESTS="leading-repeated.test trailing-repeated.test" \
 -  $MAKE -e check >stdout && { cat stdout; exit 1; }
 +$MAKE TESTS="leading-repeated.test trailing-repeated.test" check >stdout \
-   && { cat stdout; Exit 1; }
++  && { cat stdout; exit 1; }
  cat stdout
  count_test_results total=6 pass=3 fail=0 xpass=0 xfail=0 skip=0 error=3
  grep "^ERROR: leading-repeated\\.test - multiple test plans$" stdout
@@@ -90,8 -90,8 +90,8 @@@ cat > 4.test <<EN
  1..0 # SKIP
  END
  
 -env TESTS="1.test 2.test 3.test 4.test" \
 -  $MAKE -e check >stdout && { cat stdout; exit 1; }
 +$MAKE TESTS="1.test 2.test 3.test 4.test" check >stdout \
-   && { cat stdout; Exit 1; }
++  && { cat stdout; exit 1; }
  cat stdout
  count_test_results total=8 pass=0 fail=0 xpass=0 xfail=0 skip=4 error=4
  for i in 1 2 3 4; do
@@@ -112,7 -112,7 +112,7 @@@ ok 
  ok 5
  END
  
- $MAKE check >stdout && { cat stdout; Exit 1; }
 -$MAKE -e check >stdout && { cat stdout; exit 1; }
++$MAKE check >stdout && { cat stdout; exit 1; }
  cat stdout
  count_test_results total=8 pass=5 fail=0 xpass=0 xfail=0 skip=0 error=3
  
@@@ -143,7 -143,7 +143,7 @@@ ok 
  ok 3
  END
  
- $MAKE check >stdout && { cat stdout; Exit 1; }
 -$MAKE -e check >stdout && { cat stdout; exit 1; }
++$MAKE check >stdout && { cat stdout; exit 1; }
  cat stdout
  count_test_results total=5 pass=2 fail=0 xpass=0 xfail=0 skip=0 error=3
  
@@@ -174,7 -174,7 +174,7 @@@ ok 
  ok 5
  END
  
- $MAKE check >stdout && { cat stdout; Exit 1; }
 -$MAKE -e check >stdout && { cat stdout; exit 1; }
++$MAKE check >stdout && { cat stdout; exit 1; }
  cat stdout
  count_test_results total=7 pass=3 fail=0 xpass=0 xfail=0 skip=0 error=4
  
index a3b78a5c57f8b24967a308e3cb3bc421e3812ce2,84047a664cc4b0537a91214b59e7be6a3eecefe2..ce6477db1e69b5a7963574a4e57aad6ef8baef52
@@@ -47,8 -47,8 +47,8 @@@ done >> d.tes
  echo 1..00 > e.test
  echo '1..000 # SKIP' > f.test
  
 -env TESTS='a.test b.test c.test d.test e.test f.test' \
 -  $MAKE -e check >stdout || { cat stdout; exit 1; }
 +$MAKE TESTS='a.test b.test c.test d.test e.test f.test' check >stdout \
-   || { cat stdout; Exit 1; }
++  || { cat stdout; exit 1; }
  cat stdout
  
  count_test_results total=115 pass=113 xfail=0 skip=2 fail=0 xpass=0 error=0
index 274b07c858d19a85f35ee7f3c307fb0ae5826f38,68a0f474f1b24c3d2accf932dcca024697e1b23c..b89aa940991ad8bb2b470ce5f7c762a99a9ad552
@@@ -47,7 -47,7 +47,7 @@@ EN
  
  tests_list=$(echo *.test)
  
- $MAKE TESTS="$tests_list" check >stdout && { cat stdout; Exit 1; }
 -TESTS="$tests_list" $MAKE -e check >stdout && { cat stdout; exit 1; }
++$MAKE TESTS="$tests_list" check >stdout && { cat stdout; exit 1; }
  cat stdout
  
  count_test_results total=9 pass=2 fail=0 xpass=0 xfail=2 skip=0 error=5
index b3b2cef77f213478ec77e5a600c3d7b06470b82e,77f16a74ac2b42eff5e78b65916aff8b9b84d6dd..253862340cfcc9af6c7121530f839c1be91fb18e
@@@ -73,8 -73,8 +73,8 @@@ EN
  tests=$(echo *.test)
  
  for tap_flags in "" "--comments"; do
 -  env TEST_LOG_DRIVER_FLAGS="$tap_flags" TESTS="$tests" \
 -    $MAKE -e check >stdout || { cat stdout; exit 1; }
 +  $MAKE check TEST_LOG_DRIVER_FLAGS="$tap_flags" TESTS="$tests" >stdout \
-     || { cat stdout; Exit 1; }
++    || { cat stdout; exit 1; }
    cat stdout
    count_test_results total=12 pass=7 xfail=2 skip=3 fail=0 xpass=0 error=0
  done
index b1c1f2f93dbff1622fa92bfd8361abcda69d1307,106cad0786ef13da893b0f6738685dde3aec9407..122ff2f08d7e20375b953ed6a3410b92ca209d87
@@@ -32,7 -32,7 +32,7 @@@ cat > bar.test <<EN
  ok 1
  END
  
- $MAKE TESTS='foo.test bar.test' check >stdout || { cat stdout; Exit 1; }
 -TESTS='foo.test bar.test' $MAKE -e check >stdout || { cat stdout; exit 1; }
++$MAKE TESTS='foo.test bar.test' check >stdout || { cat stdout; exit 1; }
  cat stdout
  
  count_test_results total=3 pass=3 fail=0 error=0 xpass=0 xfail=0 skip=0
diff --cc t/tap-plan.sh
index 5a707fa47bcead0fec86053739554bc595ecda27,40fc8c30de24f6c410c6e79857c125bd44d568a0..810625191abfda891410a7399109fb76e5a41030
@@@ -41,8 -41,8 +41,8 @@@ o
  END
  
  for tap_flags in "" "--comments"; do
 -  env TEST_LOG_DRIVER_FLAGS="$tap_flags" TESTS='top.test bot.test' \
 -    $MAKE -e check >stdout || { cat stdout; exit 1; }
 +  $MAKE TEST_LOG_DRIVER_FLAGS="$tap_flags" TESTS="top.test bot.test" \
-         check >stdout || { cat stdout; Exit 1; }
++        check >stdout || { cat stdout; exit 1; }
    cat stdout
    count_test_results total=7 pass=5 xfail=1 skip=1 fail=0 xpass=0 error=0
  done
index ce79129499806f25ccb002308273091e2b7f4d1e,7c1e017b942214e19e6660658329db3cd74bb509..3b999d1b646b3488590f62bb51308e8dd0bda067
@@@ -45,8 -45,8 +45,8 @@@ an early non-TAP lin
  a later non-TAP line
  END
  
 -TESTS='foo.test foo2.test bar.test' $MAKE -e check >stdout \
 +$MAKE TESTS='foo.test foo2.test bar.test' check >stdout \
-   || { cat stdout; Exit 1; }
+   || { cat stdout; exit 1; }
  cat stdout
  
  count_test_results total=3 pass=0 fail=0 xpass=0 xfail=0 skip=3 error=0
index f278e3d4ce3080b219a0a7e90d433179a53af249,a67712b8d8fe68434f07e28e1b7d69fb2930d33a..61f1ea0c466ef2990f44ef89410d7678d282ce2f
@@@ -32,7 -32,7 +32,7 @@@ for c4 in p P; d
    echo "1..0 # $c1$c2$c3$c4 foobar" > $j.test
  done; done; done; done
  
- $MAKE TESTS="$(echo *.test)" check >stdout || { cat stdout; Exit 1; }
 -TESTS="$(echo *.test)" $MAKE -e check >stdout || { cat stdout; exit 1; }
++$MAKE TESTS="$(echo *.test)" check >stdout || { cat stdout; exit 1; }
  cat stdout
  
  count_test_results total=16 pass=0 fail=0 xpass=0 xfail=0 skip=16 error=0
index 6f73bc2e76cf449cd761e4349ada444e94be6f34,af337336aff28dd616e9659361b1c784df188efc..50d74a925be883919e47c57fed44b82f12e9bd43
@@@ -32,7 -32,7 +32,7 @@@ cat > bar.test <<EN
  1..0
  END
  
- $MAKE TESTS='foo.test bar.test' check >stdout || { cat stdout; Exit 1; }
 -TESTS='foo.test bar.test' $MAKE -e check >stdout || { cat stdout; exit 1; }
++$MAKE TESTS='foo.test bar.test' check >stdout || { cat stdout; exit 1; }
  cat stdout
  
  grep '^SKIP: foo\.test .* from the last line$' stdout
index bebd398774f76653cd88744330edcd1814596595,2ce46863cee38f7b3e9bf5640d8b374329b1ffd9..98dd349be1df53fdf2312272f5374bb840f164f9
@@@ -32,7 -32,7 +32,7 @@@ ok 1 # SKI
  1..0 # SKIP
  END
  
- $MAKE TESTS='foo.test bar.test' check >stdout && { cat stdout; Exit 1; }
 -TESTS='foo.test bar.test' $MAKE -e check >stdout && { cat stdout; exit 1; }
++$MAKE TESTS='foo.test bar.test' check >stdout && { cat stdout; exit 1; }
  cat stdout
  
  count_test_results total=5 pass=0 fail=0 xpass=0 xfail=0 skip=2 error=3
index 5822911235d2d8e1bfc0df3dfb94e5a01983e03a,d9c54963e250a71cf2957bffab37c521e5c02616..ca29d1ab36c85ed080c19d29b86b12187d9dc066
@@@ -34,8 -34,8 +34,8 @@@ cat > baz.test <<EN
  1..0 #  SKIP${tab}  Strip${tab}external  preserve ${tab}middle  ${tab}${sp}
  END
  
 -TESTS='foo.test bar.test baz.test' $MAKE -e check > stdout \
 +$MAKE TESTS='foo.test bar.test baz.test' check > stdout \
-   || { cat stdout; Exit 1; }
+   || { cat stdout; exit 1; }
  cat stdout
  
  count_test_results total=3 pass=0 fail=0 error=0 xpass=0 xfail=0 skip=3
index b76224537e43b17b4b3e1f6983e17f18cde827aa,9e6704b28c336a1582c60ae8893f0b6406c2847d..b160e48582e728752517c05615fa1f702b2640c9
@@@ -56,8 -56,8 +56,8 @@@ cat > mu.test <<EN
  1..0 # SKIP $weirdchars
  END
  
 -env TESTS='foo.test bar.test baz.test wget.test curl.test mu.test' \
 -  $MAKE -e check >stdout || { cat stdout; exit 1; }
 +$MAKE TESTS='foo.test bar.test baz.test wget.test curl.test mu.test' \
-       check >stdout || { cat stdout; Exit 1; }
++      check >stdout || { cat stdout; exit 1; }
  cat stdout
  
  count_test_results total=6 pass=0 fail=0 xpass=0 xfail=0 skip=6 error=0
Simple merge
Simple merge
Simple merge
index 7eb5e2ef073f1918a13e67a92e417922897c525e,c085da0c9ff4320781244b91e2bc69bdc986b9f9..e611edcc17143c706ea3e985849e77f43902ba22
@@@ -70,8 -70,8 +70,8 @@@ cat > e.test <<EN
  ok 0 # TODO
  END
  
 -TESTS='a.test b.test c.test d.test e.test' $MAKE -e check >stdout \
 +$MAKE TESTS='a.test b.test c.test d.test e.test' check >stdout \
-   && { cat stdout; Exit 1; }
+   && { cat stdout; exit 1; }
  cat stdout
  
  count_test_results total=5 pass=0 fail=0 xpass=0 xfail=0 skip=0 error=5
Simple merge
index ac7a266cdbdbe5de30720788069dd433afb1d611,e00e4b89a84e1c5c99d411808174842510402adc..262c8012fe10288c20953b2528fbfc5e0eb70d1c
@@@ -53,7 -53,7 +53,7 @@@ ok 
  not ok 4
  ok 5 # SKIP
  END
- $MAKE XFAIL_TESTS=all.test check >stdout && { cat stdout; Exit 1; }
 -XFAIL_TESTS=all.test $MAKE -e check >stdout && { cat stdout; exit 1; }
++$MAKE XFAIL_TESTS=all.test check >stdout && { cat stdout; exit 1; }
  cat stdout
  count_test_results total=6 pass=0 fail=0 xpass=0 xfail=1 skip=1 error=4
  grep '^ERROR: all\.test - too many tests run (expected 2, got 5)$' stdout
Simple merge
Simple merge
Simple merge
index 00be33d60597f1bdca228b973e0d0256879c1fc0,eab6aacc8e409875cd7d15425f7ba97801f372aa..fa5feee9a94f43eb917235481d8d3a26025bbf36
  
  # Custom test drivers: try the "recheck" functionality with test protocols
  # that allow multiple testcases in a single test script.  In particular,
 -# check that this still works when we override $(TESTS) and $(TEST_LOGS)
 -# at make runtime.
 -# See also related tests 'test-driver-custom-multitest-recheck.test' and
 -# 'parallel-tests-recheck-override.test'.
 +# check that this still works when we override $(TESTS) at make runtime.
 +# See also related tests 'test-driver-custom-multitest-recheck.test'.
  
- . ./defs || Exit 1
+ . ./defs || exit 1
  
  cp "$am_testauxdir"/trivial-test-driver . \
    || fatal_ "failed to fetch auxiliary script trivial-test-driver"
@@@ -67,9 -69,9 +67,10 @@@ chmod a+x *.tes
  
  $ACLOCAL
  $AUTOCONF
 -$AUTOMAKE
 +$AUTOMAKE -a
  
  for vpath in : false; do
++
    if $vpath; then
      mkdir build
      cd build
  
    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 ! -r a.run
 -    test ! -r b.run
 -    test ! -r c.run
 -  done
 -  unset var
 +  : An empty '$(TESTS)' means that no test should be run.
-   $MAKE TESTS= recheck >stdout || { cat stdout; Exit 1; }
++  $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
  
    : a.test was successful the first time, no need to re-run it.
-   $MAKE TESTS=a.test recheck >stdout || { cat stdout; Exit 1; }
 -  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
  
    : b.test failed, it should be re-run.  And make it pass this time.
    echo OK > b.ok
-   $MAKE TESTS=b recheck >stdout || { cat stdout; Exit 1; }
 -  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 -f b.run
    rm -f *.run
  
    : No need to re-run a.test or b.test anymore.
-   $MAKE TESTS=b recheck >stdout || { cat stdout; Exit 1; }
 -  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
-   $MAKE TESTS='a.test b.test' recheck >stdout || { cat stdout; Exit 1; }
 -  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
    # 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
-   $MAKE TESTS='a.test c' recheck >stdout && { cat stdout; Exit 1; }
 -  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
    : This time, make it pass
    # Use 'echo', not ':'; see comments above for why.
    echo dummy > c.ok
-   $MAKE TESTS='c.test a.test' recheck >stdout || { cat stdout; Exit 1; }
 -  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
index ed65c299637a35d03cdac5bbcc2e17bfcb01221d,da8a88fc9da211830c60290db8368564708dbdee..8d5c31a20ae88b3088c7339ebac7523c7bcdc9ec
@@@ -167,8 -158,8 +167,8 @@@ for vpath in : false; d
    grep '%% pass-xpass-fail-xfail-skip-error %%' test-suite.log
    test $(grep -c '%% ' test-suite.log) -eq 4
  
 -  TESTS='pass.t pass3-skip2-xfail.t' $MAKE -e check >stdout \
 +  $MAKE TESTS='pass.t pass3-skip2-xfail.t' check >stdout \
-     || { cat stdout; cat test-suite.log; Exit 1; }
+     || { cat stdout; cat test-suite.log; exit 1; }
    cat test-suite.log
    cat stdout
    count_test_results total=7 pass=4 fail=0 skip=2 xfail=1 xpass=0 error=0
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
index d7f78db5f1d8d51ed5f47965528847e145383e12,dda019333f08bec807a59b3e23d64939092d26d2..73f617b70c826ea4ebf1f618fe90193d86c33e06
  # You should have received a copy of the GNU General Public License
  # along with this program.  If not, see <http://www.gnu.org/licenses/>.
  
 -# Expose bug in conditional definition of TEST_EXTENSIONS.
 +# Conditional definition of TEST_EXTENSIONS is supported.
  
- . ./defs || Exit 1
+ . ./defs || exit 1
  
  cat >> configure.ac << 'END'
 -AM_CONDITIONAL([COND], [:])
 -AM_CONDITIONAL([COND2], [:])
 +AC_CONFIG_FILES([sub/Makefile])
 +AM_CONDITIONAL([COND1], [test x"$cond1" = x"yes"])
 +AM_CONDITIONAL([COND2], [test x"$cond2" = x"yes"])
 +AC_OUTPUT
  END
  
 -$ACLOCAL
 +mkdir sub
  
 -cat > 1.am << 'END'
 -TESTS =
 -if COND
 -## lineno 4
 -TEST_EXTENSIONS = .foo
 +cat > Makefile.am << 'END'
 +SUBDIRS = sub
 +TESTS = foo.sh bar.test
 +if COND1
 +TEST_EXTENSIONS = .sh
  endif
  END
  
index e2dbc7d33b634402b333611b3fc41a31b6961bb1,0000000000000000000000000000000000000000..b04dccab1f567b8f4a87150a8610ddafe151081d
mode 100755,000000..100755
--- /dev/null
@@@ -1,94 -1,0 +1,94 @@@
- . ./defs || Exit 1
 +#! /bin/sh
 +# Copyright (C) 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 <http://www.gnu.org/licenses/>.
 +
 +# TEST_EXTENSIONS with contents dynamically determined at make time
 +
++. ./defs || exit 1
 +
 +cat >> configure.ac << 'END'
 +AC_SUBST([suf], [.tap])
 +AC_CONFIG_FILES([sub/Makefile])
 +AC_OUTPUT
 +END
 +
 +mkdir sub
 +
 +cat > Makefile.am << 'END'
 +SUBDIRS = sub
 +TESTS = foo.sh bar.test baz.t1 mu.t1.t2 zardoz.tap
 +TEST_EXTENSIONS = .test @suf@ $(foreach i,1 2,.t$(i))
 +TEST_EXTENSIONS += $(subst &,.,$(call am__tolower,&SH))
 +END
 +
 +cat > sub/Makefile.am << 'END'
 +TESTS = 1.sh 2.bar 3
 +TEST_EXTENSIONS = $(suffix $(TESTS))
 +END
 +
 +cat > foo.sh << 'END'
 +#!/bin/sh
 +exit 0
 +END
 +chmod a+x foo.sh
 +
 +cp foo.sh bar.test
 +cp foo.sh baz.t1
 +cp foo.sh mu.t1.t2
 +cp foo.sh zardoz.tap
 +cp foo.sh sub/1.sh
 +cp foo.sh sub/2.bar
 +cp foo.sh sub/3
 +
 +do_setup ()
 +{
 +  $MAKE check ${1+"$@"}
 +  ls -l . sub
 +}
 +
 +do_clean ()
 +{
 +  $MAKE clean
 +  test "$(find . -name '*.log')" = ./config.log
 +}
 +
 +$ACLOCAL
 +$AUTOCONF
 +$AUTOMAKE -a
 +./configure
 +
 +do_setup
 +test -f foo.log
 +test -f bar.log
 +test -f baz.log
 +test -f mu.t1.log
 +test -f zardoz.log
 +test -f sub/1.log
 +test -f sub/2.log
 +test -f sub/3.log
 +
 +do_clean
 +
 +do_setup TEST_EXTENSIONS='.sh .t2 $(subst o,e,.tost) ${suf}'
 +test -f foo.log
 +test -f bar.log
 +test -f baz.t1.log
 +test -f mu.t1.log
 +test -f zardoz.log
 +test -f sub/1.log
 +test -f sub/2.bar.log
 +test -f sub/3.log
 +
 +:
index e016112cb5c2c5aecb0ae06069641cfa2ee0b8f7,0000000000000000000000000000000000000000..5abc31d077e0c79f0d44ad8c87518e9968b15baf
mode 100755,000000..100755
--- /dev/null
@@@ -1,132 -1,0 +1,132 @@@
- . ./defs || Exit 1
 +#! /bin/sh
 +# Copyright (C) 2011-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 <http://www.gnu.org/licenses/>.
 +
 +# Make sure that Automake can handle "funny chars" in TEST_EXTENSIONS,
 +# as long as they can be used in GNU make variable names.
 +
- grep 'Hello Zardoz' zardoz.log && Exit 1
- test $st -eq 0 || Exit 1
++. ./defs || exit 1
 +
 +fetch_tap_driver
 +
 +echo AC_OUTPUT >> configure.ac
 +
 +cat >> Makefile.am <<'END'
 +TEST_EXTENSIONS = .@ .2 .f-o-o .l!Nu.x
 +TESTS = foo.@ bar.f-o-o baz.2 zardoz.l!Nu.x
 +XFAIL_TESTS = zardoz.l!Nu.x
 +@_LOG_COMPILER = $(SHELL)
 +2_LOG_COMPILER = $(SHELL)
 +F-O-O_LOG_DRIVER = $(srcdir)/tap-driver
 +L!NU.X_LOG_COMPILER = false
 +EXTRA_DIST = $(TESTS) tap-driver
 +END
 +
 +touch foo.@ bar.f-o-o zardoz.l!Nu.x \
 +  || skip_ "your file system doesn't support funny characters"
 +
 +# Try to ensure this file fails if executed directly.
 +cat > foo.@ << 'END'
 +#! /bin/false
 +echo @K @K @K
 +exit 0
 +END
 +cp foo.@ baz.2
 +# We don't want them to be executable, either.  So do this for
 +# extra safety.
 +chmod a-x foo.@ baz.2
 +
 +cat > bar.f-o-o << 'END'
 +#! /bin/sh
 +echo 1..4
 +echo "ok - good"
 +echo "ok 2 # SKIP"
 +echo "not ok 3 # TODO"
 +echo ok
 +END
 +chmod a+x bar.f-o-o
 +
 +cat > zardoz.l!Nu.x << 'END'
 +#! /bin/sh
 +echo Hello Zardoz
 +exit 0
 +END
 +chmod a+x zardoz.l!Nu.x
 +
 +count_all ()
 +{
 +  count_test_results total=7 pass=4 fail=0 skip=1 xfail=2 xpass=0 error=0
 +  grep '^PASS: foo\.@$'                 stdout
 +  grep '^PASS: baz\.2$'                 stdout
 +  grep '^XFAIL: zardoz.l!Nu\.x$'        stdout
 +  grep '^PASS: bar\.f-o-o 1 - good'     stdout
 +  grep '^SKIP: bar\.f-o-o 2 # SKIP'     stdout
 +  grep '^XFAIL: bar\.f-o-o 3 # TODO'    stdout
 +  grep '^PASS: bar\.f-o-o 4$'           stdout
 +}
 +
 +$ACLOCAL
 +$AUTOCONF
 +$AUTOMAKE -a
 +
 +./configure
 +
 +st=0; $MAKE check >stdout || st=$?
 +cat stdout
 +ls -l
 +cat test-suite.log
 +cat foo.log
 +grep '@K @K @K' foo.log
 +cat baz.log
 +grep '@K @K @K' baz.log
 +cat bar.log
 +cat zardoz.log
- test $st -gt 0 || Exit 1
++grep 'Hello Zardoz' zardoz.log && exit 1
++test $st -eq 0 || exit 1
 +count_all
 +
 +$MAKE clean
 +test ! -f test-suite.log
 +test ! -f foo.log
 +test ! -f bar.log
 +test ! -f baz.log
 +test ! -f zardoz.log
 +
 +st=0
 +$MAKE check TESTS=zardoz L!NU.X_LOG_COMPILER=/bin/sh >stdout || st=$?
 +cat stdout
 +count_test_results total=1 pass=0 fail=0 skip=0 xfail=0 xpass=1 error=0
 +cat test-suite.log
 +test ! -f foo.log
 +test ! -f bar.log
 +test ! -f baz.log
 +cat zardoz.log
 +grep 'Hello Zardoz' zardoz.log
- $MAKE recheck >stdout || { cat stdout; Exit 1; }
++test $st -gt 0 || exit 1
 +
- $MAKE recheck >stdout || { cat stdout; Exit 1; }
++$MAKE recheck >stdout || { cat stdout; exit 1; }
 +cat stdout
 +count_test_results total=1 pass=0 fail=0 skip=0 xfail=1 xpass=0 error=0
 +grep '^XFAIL: zardoz.l!Nu\.x$' stdout
 +
- $MAKE distcheck >stdout || { cat stdout; Exit 1; }
++$MAKE recheck >stdout || { cat stdout; exit 1; }
 +cat stdout
 +count_test_results total=0 pass=0 fail=0 skip=0 xfail=0 xpass=0 error=0
 +
++$MAKE distcheck >stdout || { cat stdout; exit 1; }
 +cat stdout
 +count_all
 +
 +:
index 74058c6bd18274ac593a14032e63af0988332dc2,98db0a6cdd8b16d24429ec8a97f2193ef594c3b8..ebc3c75ea7af49b56a0d466c5a885a558027e954
  # 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 that 'acconfig.h' is automatically distributed if it exists
 -# (at automake runtime).
 -# Related to automake bug#7819.
 +# Make sure that invalid entries in TEST_EXTENSIONS are diagnosed at
 +# make runtime.  See automake bug#9400.
  
- . ./defs || Exit 1
+ . ./defs || exit 1
  
 -cat >> configure.ac <<END
 -AC_OUTPUT
 -END
 +echo AC_OUTPUT >> configure.ac
  
 -cat > Makefile.am <<'END'
 -.PHONY: test
 -test: distdir
 -      ls -l $(distdir)
 -      echo ' ' $(DIST_COMMON) ' ' | grep '[ /]acconfig\.h '
 -      test -f $(distdir)/acconfig.h
 +cat > Makefile.am << 'END'
 +TESTS =
 +TEST_EXTENSIONS = mu x1 .foo _ x2
  END
  
 -: > acconfig.h
 -
  $ACLOCAL
 -$AUTOMAKE
  $AUTOCONF
 +$AUTOMAKE -a
  
  ./configure
 -$MAKE test
 +
- $MAKE 2>stderr && { cat stderr >&2; Exit 1; }
++$MAKE 2>stderr && { cat stderr >&2; exit 1; }
 +cat stderr >&2
 +for suf in mu x1 _ x2; do
 +  $FGREP "invalid test extension: '$suf'" stderr
 +done
 +
 +# Verify that we don't report valid suffixes, even if intermixed
 +# with invalid ones.
- grep 'invalid.*extension.*foo' stderr && Exit 1
++grep 'invalid.*extension.*foo' stderr && exit 1
  
  :
diff --cc t/test-log.sh
index d0ed987fca00cdfdf9b9ea1ae917b2a9516a0a51,b622ee70f202c701ce4d720d09d81a41009b91a7..6d453d83c054a474d9d12bbc53fc99c53dce4216
@@@ -88,7 -88,7 +88,7 @@@ $AUTOMAKE -
  
  ./configure
  
- $MAKE TEST_SUITE_LOG=my.log check && Exit 1
 -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
Simple merge
index 9633dbd8cbbcb005bd15162b289b0b196fe5e140,8b6a3c8e28129f8a5d8d5ec9dc53ddd62047e3cd..c93c2c81dc4f560438be9c5f7f2bb7d451badfb8
@@@ -135,14 -122,7 +135,14 @@@ cat > zar-doz.x << 'END
  :test-result: XFAIL
  END
  
- $MAKE check && Exit 1
 +cat > mu << 'END'
 +:test-result: PASS
 +:global-test-result: XFAIL
 +:test-result: PASS
 +:test-result: PASS
 +END
 +
+ $MAKE check && exit 1
  cat test-suite.log
  
  have_result <<END
@@@ -167,9 -142,8 +167,9 @@@ cat > foo.test << 'END
  :test-result: ERROR
  END
  : > zar-doz.x
 +: > mu
  
- $MAKE check && Exit 1
+ $MAKE check && exit 1
  cat test-suite.log
  
  have_result <<END
Simple merge
index 6fcdbb396128f019abe46433af9292fa8271017e,2410e03fadae34e35fcb1ab726b2c2c196cdb64b..4435658853b1fcf3fcb877712b47fb58c8a36245
@@@ -116,10 -115,10 +116,10 @@@ cat > foo.test <<EN
  :test-global-result: SKIP
  :test-result: FAIL
  END
 -cat > bar.test <<END
 +cat > bar <<END
  :test-global-result: PASS
  END
- mk_check && Exit 1
+ mk_check && exit 1
  count_test_results total=1 pass=0 fail=1 xpass=0 xfail=0 skip=0 error=0
  
  cat > foo.test <<END
@@@ -147,12 -146,12 +147,12 @@@ cat > foo.test <<EN
  :test-result: XPASS
  :test-result: ERROR
  END
 -: > bar.test
 +: > bar
- mk_check && Exit 1
+ mk_check && exit 1
  count_test_results total=6 pass=1 fail=1 xpass=1 xfail=1 skip=1 error=1
  
 -cp foo.test bar.test
 +cp foo.test bar
- mk_check && Exit 1
+ mk_check && exit 1
  count_test_results total=12 pass=2 fail=2 xpass=2 xfail=2 skip=2 error=2
  
  # Check that we are liberal w.r.t. whitespace use.
@@@ -166,11 -165,11 +166,11 @@@ for RESULT in PASS FAIL XPASS XFAIL SKI
      |:test-result:$RESULT  $tab|
      |:test-result:$tab$tab  $RESULT$tab  $tab |
  END
 -  echo "  $tab $tab$tab   :test-result: $RESULT" >> bar.test
 +  echo "  $tab $tab$tab   :test-result: $RESULT" >> bar
  done
  cat foo.test # For debugging.
 -cat bar.test # Likewise.
 +cat bar # Likewise.
- mk_check && Exit 1
+ mk_check && exit 1
  count_test_results total=30 pass=5 fail=5 xpass=5 xfail=5 skip=5 error=5
  
  :
index 115aed93acdac1c90e09aecbbb981c9fb75f1e9e,441a83894e32650d69f692ddca767f0afdf4e3fe..12bb22980897ff87afe892bd5eee373bbbd29f60
  # You should have received a copy of the GNU General Public License
  # along with this program.  If not, see <http://www.gnu.org/licenses/>.
  
 -# parallel-tests:
 -#  - non-existent scripts listed in TESTS get diagnosed
 -# See also related test 'test-missing2.test'.
 +# parallel-tests: non-existent scripts listed in TESTS get diagnosed.
  
- . ./defs || Exit 1
+ . ./defs || exit 1
  
  cat >> configure.ac << 'END'
  AC_OUTPUT
@@@ -35,21 -37,23 +35,21 @@@ $AUTOMAKE -
  
  ./configure
  
- $MAKE check >stdout 2>stderr && { cat stdout; cat stderr >&2; Exit 1; }
 -$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
  
- $MAKE TESTS='zardoz2.test' check 2>stderr && { cat stderr >&2; Exit 1; }
 -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
  
- $MAKE TESTS='zardoz3' check 2>stderr && { cat stderr >&2; Exit 1; }
 -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
  
  # The errors should persist even after 'test-suite.log'
@@@ -59,9 -63,9 +59,9 @@@
  $MAKE check
  rm -f zardoz.test
  
- $MAKE check 2>stderr && { cat stderr >&2; Exit 1; }
 -$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
  
  :
Simple merge
index fd8d1831263860781a8b3360a78fef20fde9e17c,474e05fa2e9613efa2531032b159b68f9b5ef3dc..bc8b51de22d04a4b6ca6eb3c2e9c1c1d3a4c47dd
  # 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 that 'acconfig.h' is *not* automatically distributed when
 -# placed in a subdirectory.
 -# Related to automake bug#7819.
 +# Check parallel harness features:
 +#  - recovery from deleted '.log' and '.trs' files, with parallel make
  
- . ./defs || Exit 1
+ . ./defs || exit 1
  
 -cat >> configure.ac <<END
 -AC_CONFIG_FILES([sub/Makefile])
 -AC_OUTPUT
 -END
 +all= log= trs=
 +for i in 1 2 3 4 5 6 7 8 9 10 11 12; do
 +  all="$all $i" log="$log $i" trs="$trs $i"
 +done
  
 -cat > Makefile.am <<'END'
 -SUBDIRS = sub
 -sub/acconfig.h:
 -      echo target $@ should not be built >&2; exit 1
 -check-local: distdir
 -      ls -l $(distdir)/sub
 -      test ! -f $(distdir)/sub/acconfig.h
 -END
 +echo AC_OUTPUT >> configure.ac
 +echo TESTS = > Makefile.am
  
 -mkdir sub
 +for i in $all; do
 +  echo TESTS += $i.test >> Makefile.am
 +  (echo "#!/bin/sh" && echo "mkdir $i.d") > $i.test
 +  chmod a+x $i.test
 +done
  
 -cat > sub/Makefile.am <<'END'
 -acconfig.h:
 -      echo target $@ should not be built >&2; exit 1
 -check-local:
 -      echo $(DISTFILES) | grep 'acconfig\.h' && exit 1; :
 -      echo $(DIST_COMMON) | grep 'acconfig\.h' && exit 1; :
 -END
 -
 -: > sub/acconfig.h
 +ls -l # For debugging.
  
  $ACLOCAL
 -$AUTOMAKE
  $AUTOCONF
 +$AUTOMAKE -a
  
  ./configure
 +
 +: Create the required log files.
  $MAKE check
  
 +for n in 1 2 5 7 12; do
 +  for suf in log trs; do
 +    rmdir *.d
 +    rm -f *.$suf
 +    $MAKE -j$n check
 +    for f in $all; do
 +      test -f $f.log
 +      test -f $f.trs
 +    done
 +  done
 +done
 +
  :
index e09d7f86641290d0bf6ea377eeb04931153871b0,9247b1e317df9a126b53ec6b56380b24ca707fff..77635e88ac6f01de5e4b541bce8c9255af94fdb7
@@@ -153,7 -153,7 +153,7 @@@ test -f baz.tr
  rm -f foo.trs
  update_stamp
  touch bar.test
- $MAKE AM_LAZY_CHECK=yes check >stdout || { cat stdout; Exit 1; }
 -RECHECK_LOGS= $MAKE -e check >stdout || { cat stdout; exit 1; }
++$MAKE AM_LAZY_CHECK=yes check >stdout || { cat stdout; exit 1; }
  cat stdout
  # Check that make has updated what it needed to, but no more.
  test -f foo.trs
index 85049be511bf4698a4678f8408620ef146768c78,1851226ac8b3bf7eeedffcbe1adfdd0f25139bad..5b84c17c5d2c2792a42e8d15b66ad1a1403b4ccf
@@@ -50,7 -50,7 +50,7 @@@ cat stdou
  grep '^See \./my_test_suite\.log$' stdout
  
  mkdir bar
- $MAKE TEST_SUITE_LOG=bar/bar.log check >stdout && { cat stdout; Exit 1; }
 -TEST_SUITE_LOG=bar/bar.log $MAKE -e check >stdout && { cat stdout; exit 1; }
++$MAKE TEST_SUITE_LOG=bar/bar.log check >stdout && { cat stdout; exit 1; }
  cat stdout
  grep '^See \./bar/bar\.log$' stdout
  
@@@ -80,7 -80,7 +80,7 @@@ cat stdou
  grep '^See sub/test-suite\.log$' stdout
  cd ..
  
- $MAKE TEST_SUITE_LOG=foo.log check >stdout && { cat stdout; Exit 1; }
 -TEST_SUITE_LOG=foo.log $MAKE -e check >stdout && { cat stdout; exit 1; }
++$MAKE TEST_SUITE_LOG=foo.log check >stdout && { cat stdout; exit 1; }
  cat stdout
  grep '^See sub/foo\.log$' stdout
  
diff --cc t/transform3.sh
Simple merge
index dd4d6335a9e5e8b69b7a9f56f36c0a0de1f312f0,0000000000000000000000000000000000000000..9b609bd9bc4264a5b36e72769bc9c29f7a4ed2c2
mode 100755,000000..100755
--- /dev/null
@@@ -1,164 -1,0 +1,164 @@@
- . ./defs || Exit 1
 +#! /bin/sh
 +# Copyright (C) 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 <http://www.gnu.org/licenses/>.
 +
 +# Texinfo input files using @include directives.  Check both in-tree
 +# and VPATH builds, and both top-level and subdir input.
 +
 +required='makeinfo tex texi2dvi'
++. ./defs || exit 1
 +
 +echo AC_OUTPUT >> configure.ac
 +
 +cat > Makefile.am << 'END'
 +info_TEXINFOS = main.texi sub/more.texi
 +main_TEXINFOS = one.texi two.texi three.texi
 +sub_more_TEXINFOS = sub/one.texi sub/two.texi
 +END
 +
 +cat > main.texi << 'END'
 +\input texinfo
 +@setfilename main.info
 +@settitle main
 +@ifnottex
 +@node Top
 +@top GNU dummy.
 +@menu
 +* one::   Chapter one
 +* two::   Chapter two
 +* three:: Chapter three
 +@end menu
 +@end ifnottex
 +@include one.texi
 +@include two.texi
 +@include three.texi
 +@bye
 +END
 +
 +cat > one.texi << 'END'
 +@node one
 +@chapter Chapter one
 +Foo bar, baz.
 +END
 +
 +cat > two.texi << 'END'
 +@node two
 +@chapter Chapter two
 +Blah Blah Blah.
 +END
 +
 +cat > three.texi << 'END'
 +@node three
 +@chapter Chapter two
 +GNU's Not Unix.
 +END
 +
 +mkdir sub
 +
 +cat > sub/more.texi << 'END'
 +\input texinfo
 +@setfilename more.info
 +@settitle main
 +@ifnottex
 +@node Top
 +@top GNU more.
 +@menu
 +* desc:: Description of this program
 +* hist:: History of this program
 +@end menu
 +@end ifnottex
 +@include one.texi
 +@include two.texi
 +@bye
 +END
 +
 +cat > sub/one.texi << 'END'
 +@node desc
 +@chapter Description of this program
 +It does something, really.
 +END
 +
 +cat > sub/two.texi << 'END'
 +@node hist
 +@chapter History of this program
 +It was written somehow.
 +END
 +
 +cat > exp << 'END'
 +./main.info
 +./sub/more.info
 +END
 +
 +check_info_contents ()
 +{
 +  srcdir=${1-.}
 +  $FGREP "Foo bar, baz."                        $srcdir/main.info
 +  $FGREP "Blah Blah Blah."                      $srcdir/main.info
 +  $FGREP "GNU's Not Unix."                      $srcdir/main.info
 +  $FGREP 'It does something, really.'           $srcdir/sub/more.info
 +  $FGREP 'It was written somehow.'              $srcdir/sub/more.info
 +}
 +
 +get_info_names ()
 +{
 +  find ${1-.} -type f -name '*.info' | LC_ALL=C sort > got
 +}
 +
 +check_expected ()
 +{
 +  cat exp
 +  cat got
 +  diff exp got
 +}
 +
 +$ACLOCAL
 +$AUTOMAKE --add-missing
 +$AUTOCONF
 +
 +./configure
 +
 +$MAKE info
 +get_info_names
 +check_expected
 +
 +check_info_contents
 +
 +$MAKE dvi
 +test -f main.dvi
 +test -f sub/more.dvi
 +
 +$MAKE maintainer-clean
 +test ! -f main.dvi
 +test ! -f sub/more.dvi
 +test ! -f main.info
 +test ! -f sub/more.info
 +
 +mkdir build
 +cd build
 +../configure
 +$MAKE all dvi
 +
 +get_info_names ..
 +sed 's|^\./|../|' ../exp > exp
 +check_expected
 +
 +test -f main.dvi
 +test -f sub/more.dvi
 +
 +check_info_contents ..
 +
 +$MAKE distcheck
 +
 +:
index c35ce9afaa4077fffc0b80046f99d64914953b48,97770f4ce30ae97f4435c5965a69104d553d5ad8..12e8a84fc5d6706c97b0cda5475e1fe44c1cddc0
  # You should have received a copy of the GNU General Public License
  # along with this program.  If not, see <http://www.gnu.org/licenses/>.
  
 -# Make sure we only create texinfo-related targets once.
 +# Some grepping checks on Texinfo support.
  
- . ./defs || Exit 1
+ . ./defs || exit 1
  
 -cat > Makefile.am << 'END'
 -info_TEXINFOS = maude.texi liver.txi heart.texinfo
 -END
 +echo AC_OUTPUT >> configure.ac
 +
 +$ACLOCAL
  
 -echo '@setfilename maude.info' > maude.texi
 -echo '@setfilename liver.info' > liver.txi
 -echo '@setfilename heart.info' > heart.texinfo
  : > texinfo.tex
  
 -$ACLOCAL
 +echo info_TEXINFOS = main.texi other.texi sub/x.texi > Makefile.am
 +mkdir sub
 +echo @setfilename main.info > main.texi
 +echo @setfilename other.info > other.texi
 +echo @setfilename sub/x.info > sub/x.texi
  $AUTOMAKE
 +$EGREP '\.(info|pdf|ps|dvi|html|texi)' Makefile.in # For debugging.
 +test $(grep -c '^%\.info: %\.texi$' Makefile.in) -eq 1
 +test $(grep -c '^%\.html: %\.texi$' Makefile.in) -eq 1
 +test $(grep -c '^%\.dvi: %\.texi$'  Makefile.in) -eq 1
 +test $(grep -c '^%\.pdf: %\.texi$'  Makefile.in) -eq 1
 +test $(grep -c '^%\.ps: %\.dvi$'    Makefile.in) -eq 1
  
 -# These are just examples -- basically for many targets in texinfos.am
 -# we only want them to appear once.  But grepping them all would be
 -# overkill.
  for t in info dist-info dvi-am install-html uninstall-pdf-am; do
 -  $EGREP "(^| )$t*.:" Makefile.in # For debugging.
 -  test $($EGREP -c "(^| )$t(:| *.:)" Makefile.in) -eq 1
 +  $FGREP $t Makefile.in # For debugging.
 +  test $(grep -c "^$t *:" Makefile.in) -eq 1
  done
  
  :
index aef97a9fe94f26c7dd7668f96867f0c8fed9d501,139545d184713daeaba79289f275092a4fb969b4..ac52e4ad16e2b68ae6263a4a4271b1234f0e263b
  # You should have received a copy of the GNU General Public License
  # along with this program.  If not, see <http://www.gnu.org/licenses/>.
  
 -# Make sure backslash-newline-hash combinations are diagnosed as
 -# comments following a trailing backslash, even when the combination
 -# follows a variable assignment that is preceded by a comment.
 +# Test that automake complains properly when texinfo input files
 +# specify output info files with an invalid extension.
  
- . ./defs || Exit 1
+ . ./defs || exit 1
  
  cat > Makefile.am << 'END'
 -# initial comment
 -variable = value-before-comment \
 -#
 -
 -# comment
 -SUBDIRS = foo \
 -# bar
 -
 +info_TEXINFOS = foo.texi bar.texi baz.texi
  END
  
 -mkdir foo
 +echo '@setfilename foo.inf'     > foo.texi
 +echo '@setfilename bar'         > bar.texi
 +echo '@setfilename baz.texi'    > baz.texi
 +: > texinfo.tex
  
  $ACLOCAL
  AUTOMAKE_fails
diff --cc t/txinfo.sh
Simple merge
diff --cc t/txinfo17.sh
index f7438531b83eda45800db7f6134520ff54fcc2d6,d21676920846af2303141d42db1872b64853e85c..20c7ecc04779daf2b05a48ef888425f155c83a3d
@@@ -35,7 -35,5 +35,7 @@@ EN
  $ACLOCAL
  $AUTOMAKE --add-missing
  
- grep 'foobar' Makefile.in && Exit 1
 -grep 'example' Makefile.in && exit 1
 -grep 'texinfo:' Makefile.in
++grep 'foobar' Makefile.in && exit 1
 +grep 'texinfo\.info:' Makefile.in
 +
 +:
diff --cc t/txinfo2.sh
Simple merge
diff --cc t/txinfo20.sh
index 98c044ee4a9c5a243e52aeb07f4c6c7d52d61429,4add0c26076fabbae753f9d0ad9d86a0ea99e31e..45acc7504954950c6b4f875496f89c5a01e9aab9
@@@ -62,17 -62,15 +62,17 @@@ cat > main.texi << 'END
  END
  
  # makeinfo will bail out, but we should conserve the old info files.
- $MAKE && Exit 1
+ $MAKE && exit 1
 -test -f main
 -test -f main-1
 +test -f main.info
 +test -f main.info-1
  
  # Restore main.texi, and break sub/main.texi.
  cp main.texi sub/main.texi
  mv main.old main.texi
- $MAKE && Exit 1
+ $MAKE && exit 1
 -test -f main
 -test ! -f main-1
 -test -f sub/main
 -test -f sub/main-1
 +test -f main.info
 +test ! -f main.info-1
 +test -f sub/main.info
 +test -f sub/main.info-1
 +
 +:
diff --cc t/txinfo21.sh
Simple merge
diff --cc t/txinfo21b.sh
index 2860cde7d2c5117cbeee123577da1fac5b99e5e7,0000000000000000000000000000000000000000..2172d7e0f50119d5bab4a68e7916a08d00085686
mode 100755,000000..100755
--- /dev/null
@@@ -1,181 -1,0 +1,181 @@@
- . ./defs || Exit 1
 +#! /bin/sh
 +# Copyright (C) 2003-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 <http://www.gnu.org/licenses/>.
 +
 +# Test support for building HTML documentation, and the many
 +# install-DOC flavors, in VPATH builds.
 +# Keep in sync with sister test 'txinfo21.sh'.
 +# FIXME: in the long term, the best thing to do is probably to
 +# FIXME: convert this test and the sister test 'txinfo21.sh' to
 +# FIXME: TAP, and merge them.
 +
 +required='makeinfo tex texi2dvi'
++. ./defs || exit 1
 +
 +cat >>configure.ac <<\EOF
 +AC_CONFIG_FILES([rec/Makefile])
 +
 +# At the time of writing, Autoconf does not supplies any of these
 +# definitions (and those below are purposely not those of the standard).
 +AC_SUBST([dvidir],  ['${datadir}/${PACKAGE}/dvi'])
 +AC_SUBST([htmldir], ['${datadir}/${PACKAGE}/html'])
 +AC_SUBST([pdfdir],  ['${datadir}/${PACKAGE}/pdf'])
 +AC_SUBST([psdir],   ['${datadir}/${PACKAGE}/ps'])
 +
 +AC_OUTPUT
 +EOF
 +
 +cat > Makefile.am << 'END'
 +SUBDIRS = rec
 +info_TEXINFOS = main.texi sub/main2.texi
 +END
 +
 +cat > main.texi << 'END'
 +\input texinfo
 +@setfilename main.info
 +@settitle main
 +@node Top
 +Hello walls.
 +@bye
 +END
 +
 +mkdir sub
 +cat > sub/main2.texi << 'END'
 +\input texinfo
 +@setfilename main2.info
 +@settitle main2
 +@node Top
 +Hello walls.
 +@bye
 +END
 +
 +mkdir rec
 +cat > rec/main3.texi << 'END'
 +\input texinfo
 +@setfilename main3.info
 +@settitle main3
 +@node Top
 +Hello walls.
 +@bye
 +END
 +
 +cat > rec/Makefile.am << 'END'
 +info_TEXINFOS = main3.texi
 +
 +install-pdf-local:
 +      @$(MKDIR_P) "$(pdfdir)"
 +      :> "$(pdfdir)/hello"
 +uninstall-local:
 +      rm -f "$(pdfdir)/hello"
 +END
 +
 +$ACLOCAL
 +$AUTOMAKE --add-missing
 +$AUTOCONF
 +
 +mkdir build
 +cd build
 +../configure
 +
 +$MAKE
 +
 +$sleep
 +# Test production of split-per-node HTML.
 +$MAKE html
 +test -d main.html
 +test -d sub/main2.html
 +test -d rec/main3.html
 +
 +# Rebuilding main.html should cause its timestamp to be updated.
 +is_newest main.html ../main.texi
 +$sleep
 +touch ../main.texi
 +$MAKE html
 +is_newest main.html ../main.texi
 +
 +$MAKE clean
 +test ! -d main.html
 +test ! -d sub/main2.html
 +test ! -d rec/main3.html
 +
 +# Test production of a single HTML file.
 +$MAKE MAKEINFOFLAGS=--no-split html
 +test -f main.html
 +test -f sub/main2.html
 +test -f rec/main3.html
 +$MAKE clean
 +test ! -f main.html
 +test ! -f sub/main2.html
 +test ! -f rec/main3.html
 +
 +# Make sure AM_MAKEINFOHTMLFLAGS is supported, and override AM_MAKEINFO.
 +cat >> ../Makefile.am <<\EOF
 +AM_MAKEINFOHTMLFLAGS = --no-headers --no-split
 +AM_MAKEINFOFLAGS = --unsupported-option
 +EOF
 +../configure --prefix "`pwd`"
 +$MAKE html
 +test -f main.html
 +test -f sub/main2.html
 +test -d rec/main3.html
 +$MAKE clean
 +test ! -f main.html
 +test ! -f sub/main2.html
 +test ! -d rec/main3.html
 +
 +$MAKE install-html
 +test -f share/$me/html/main.html
 +test -f share/$me/html/main2.html
 +test -d share/$me/html/main3.html
 +$MAKE uninstall
 +test ! -f share/$me/html/main.html
 +test ! -f share/$me/html/main2.html
 +test ! -d share/$me/html/main3.html
 +
 +$MAKE install-dvi
 +test -f share/$me/dvi/main.dvi
 +test -f share/$me/dvi/main2.dvi
 +test -f share/$me/dvi/main3.dvi
 +$MAKE uninstall
 +test ! -f share/$me/dvi/main.dvi
 +test ! -f share/$me/dvi/main2.dvi
 +test ! -f share/$me/dvi/main3.dvi
 +
 +dvips --help || skip_ "dvips is missing"
 +
 +$MAKE install-ps
 +test -f share/$me/ps/main.ps
 +test -f share/$me/ps/main2.ps
 +test -f share/$me/ps/main3.ps
 +$MAKE uninstall
 +test ! -f share/$me/ps/main.ps
 +test ! -f share/$me/ps/main2.ps
 +test ! -f share/$me/ps/main3.ps
 +
 +pdfetex --help || pdftex --help \
 +  || skip_ "pdftex and pdfetex are both missing"
 +
 +$MAKE install-pdf
 +test -f share/$me/pdf/main.pdf
 +test -f share/$me/pdf/main2.pdf
 +test -f share/$me/pdf/main3.pdf
 +test -f share/$me/pdf/hello
 +$MAKE uninstall
 +test ! -f share/$me/pdf/main.pdf
 +test ! -f share/$me/pdf/main2.pdf
 +test ! -f share/$me/pdf/main3.pdf
 +test ! -f share/$me/pdf/hello
 +
 +:
diff --cc t/txinfo8.sh
Simple merge
index 6ab728c04a6385dbb9e05b5b212731b5922ca69d,8f160c88677f77ccdfb9277eb5514503dfe39cf7..14e3219dbd2e1d3e10874fbf6961a1144e50f346
@@@ -62,8 -62,8 +62,8 @@@ mkdir $inst $inst/shar
  : > $inst/share/foobar.txt
  
  chmod a-w $inst/share
- $MAKE uninstall 2>stderr && { cat stderr >&2; Exit 1; }
 -$MAKE uninstall >output 2>&1 && { cat output; exit 1; }
 -cat output
++$MAKE uninstall 2>stderr && { cat stderr >&2; exit 1; }
 +cat stderr >&2
  if test $rm_f_is_silent_on_error = yes; then
    : "rm -f" is silent on errors, skip the grepping of make output
  else
@@@ -73,8 -73,8 +73,7 @@@ f
  chmod a-rwx $inst/share
  (cd $inst/share) && skip_ "cannot make directories fully unreadable"
  
- $MAKE uninstall 2>stderr && { cat stderr >&2; Exit 1; }
- cat stderr >&2
 -$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:
index 2e1b5be411ca58135969f56925533845d13b9917,c86c4e616ad2f8fecc65334e1042e1057b41a127..6c9a569b85e4cb725bb86fc45d9de92cbe844fb7
@@@ -16,8 -16,8 +16,8 @@@
  
  # Test to make sure compiling Vala code really works with recursive make.
  
 -required="pkg-config valac gcc GNUmake"
 +required="pkg-config valac gcc"
- . ./defs || Exit 1
+ . ./defs || exit 1
  
  cat >> configure.ac << 'END'
  AC_PROG_CC
diff --cc t/vala-libs.sh
index 567d5b3b075362899f37908b6608109932126637,f6a7ba9b30b4d974fc57836ff9d76dd2910e5357..0eab4feb03dc33199765d1ef42e2e961d8cd9359
@@@ -17,8 -17,8 +17,8 @@@
  # Building libraries (libtool and static) from Vala sources.
  # And use of vapi files to call C code from Vala.
  
 -required="valac cc pkg-config libtoolize GNUmake"
 +required="valac cc pkg-config libtoolize"
- . ./defs || Exit 1
+ . ./defs || exit 1
  
  cat >> configure.ac << 'END'
  AC_PROG_CC
diff --cc t/vala-mix.sh
index 8f522de065fcf5ee2ebd2f6a60e726fc57935b21,2580bd07493be74e4c807c0547c6578a941e9c07..e16c02cd24fcad93394efbb228a2b4b6a5675946
@@@ -16,8 -16,8 +16,8 @@@
  
  # Vala sources and C sources in the same program.  Functional test.
  
 -required='valac cc GNUmake'
 +required='valac cc'
- . ./defs || Exit 1
+ . ./defs || exit 1
  
  cat >> configure.ac <<'END'
  AC_PROG_CC
diff --cc t/vala-mix2.sh
index 7c793bfbbbf269869ed8bd533da2db2747d3546f,e1dbb5d480e0f5976272660e3e2151a441876572..7a2d32449771591dbc3d7b40a8ae2466a0995dca
@@@ -17,8 -17,8 +17,8 @@@
  # Vala sources, C and C++ sources and C and C++ headers in the same
  # program.  Functional test.  See automake bug#10894.
  
 -required='valac cc c++ GNUmake'
 +required='valac cc c++'
- . ./defs || Exit 1
+ . ./defs || exit 1
  
  cat >> configure.ac <<'END'
  AC_PROG_CC
index d52209336c548e056bf37f684b523f5576f1f3a8,3b659a88dee9008de52a76efd2bfd88839edf80e..526c4f6c6049364efb1d115dbff1a20b63638041
@@@ -16,8 -16,8 +16,8 @@@
  
  # Vala support with parallel make.
  
 -required='valac cc GNUmake'
 +required='valac cc'
- . ./defs || Exit 1
+ . ./defs || exit 1
  
  cat >> configure.ac <<'END'
  AC_PROG_CC
diff --cc t/vala-vapi.sh
index 2e14eb77a6b7291474d4fe36123e69d5f2d94068,1862b71bc61e6ed0cd0549e54fe0d42c13f5cfe9..dedf0427ac00747bd3a18f91f31f4e157511abe7
@@@ -16,8 -16,8 +16,8 @@@
  
  # Test and that vapi files are correctly handled by Vala support.
  
 -required='valac cc GNUmake'
 +required='valac cc'
- . ./defs || Exit 1
+ . ./defs || exit 1
  
  cat >> configure.ac <<'END'
  AC_PROG_CC
diff --cc t/vala-vpath.sh
index 514d0e6d8298add281a8b53b8ede4fe31404b3ba,9a7ff768748c662d1462e68c5f0c7bf7a7f59ed0..117d08634da9ee74c25fe6c8c62543a99e754be6
@@@ -17,8 -17,8 +17,8 @@@
  # Test to make sure vala support handles from-scratch VPATH builds.
  # See automake bug#8753.
  
 -required="cc valac GNUmake"
 +required="cc valac"
- . ./defs || Exit 1
+ . ./defs || exit 1
  
  cat >> configure.ac << 'END'
  AC_CONFIG_SRCDIR([hello.vala])
diff --cc t/vala2.sh
index cfbffc1b388b884863965e77dee9198265749d98,1c5bdb9e1603c672220902fa1552f99e06cce275..a392a7a4e4748cdcd1fddf0310b52d53bc8c6dee
@@@ -16,8 -16,8 +16,8 @@@
  
  # Test to make sure compiling Vala code really works with recursive make.
  
 -required="pkg-config valac gcc GNUmake"
 +required="pkg-config valac gcc"
- . ./defs || Exit 1
+ . ./defs || exit 1
  
  mkdir src
  
diff --cc t/vala3.sh
index 6de68f8da0a1a828fcd3b168bb6ee39dd9e280a2,48181506084b5e44aa670bd3763d1ec808c5dd47..1de29726d6b4dc0242c9271d31c956479928106b
@@@ -16,8 -16,8 +16,8 @@@
  
  # Test to make sure compiling Vala code really works with non-recursive make.
  
 -required="pkg-config valac gcc GNUmake"
 +required="pkg-config valac gcc"
- . ./defs || Exit 1
+ . ./defs || exit 1
  
  mkdir src
  
diff --cc t/vala5.sh
index 4a37d8fb3650e58e10a758d9e9fa51613bffed12,3c55cf170e39a7dda1ecffd231111af99f3d5256..4e4a4047f01b48877ea037c85a24e9372073d296
@@@ -16,8 -16,8 +16,8 @@@
  
  # Test per-target flags.
  
 -required="pkg-config valac gcc GNUmake"
 +required="pkg-config valac gcc"
- . ./defs || Exit 1
+ . ./defs || exit 1
  
  mkdir src
  
index f59bacca11e11ce4f1bd7dde29b38b6d892e3278,0000000000000000000000000000000000000000..28ca29999576a877ecb006bf8f575f08d42271f0
mode 100755,000000..100755
--- /dev/null
@@@ -1,100 -1,0 +1,100 @@@
- . ./defs || Exit 1
 +#! /bin/sh
 +# Copyright (C) 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 <http://www.gnu.org/licenses/>.
 +
 +# Automake should allow us top append to undefined variables, for
 +# consistency with GNU make.  For the same reason, if we override
 +# a variable definition from the command line, any '+=' appending
 +# to it should get overridden as well.
 +# See also "spy" test 'spy-var-append.sh'.
 +
-   $MAKE "$@" 2>stderr && test ! -s stderr || { cat stderr >&2; Exit 1; }
++. ./defs || exit 1
 +
 +cat >> configure.ac << 'END'
 +AM_CONDITIONAL([COND_NO], [false])
 +AM_CONDITIONAL([COND_YES], [:])
 +AM_CONDITIONAL([COND_YES2], [:])
 +AC_OUTPUT
 +END
 +
 +cat > Makefile.am << 'END'
 +var0 += foo0
 +
 +if COND_NO
 +var00 += foo00
 +endif
 +
 +if COND_YES
 +if COND_YES2
 +var000 += foo000
 +endif
 +endif
 +
 +if COND_NO
 +var1 = oops
 +endif
 +var1 += bar
 +if COND_YES
 +var1 += baz
 +endif
 +if COND_NO
 +var1 += oops
 +endif
 +
 +if COND_YES
 +var2 = a
 +endif
 +var2 += b
 +
 +if COND_YES
 +var3 := c
 +endif
 +var3 += d
 +
 +var4 = cuckoo
 +var4 += nightingale
 +
 +.PHONY: test1 test2
 +test1:
 +      test x'$(var0)' = x'foo0'
 +      test x'$(var00)' = x''
 +      test x'$(var000)' = x'foo000'
 +      test x'$(var1)' = x'bar baz'
 +      test x'$(var2)' = x'a b'
 +      test x'$(var3)' = x'c d'
 +        test x'$(var4)' = x'cuckoo nightingale'
 +test2:
 +      test x'$(var0)' = x
 +      test x'$(var1)' = x'one'
 +      test x'$(var2)' = x'two'
 +      test x'$(var3)' = x'three'
 +      test x'$(var4)' = x''
 +END
 +
 +$ACLOCAL
 +$AUTOMAKE
 +$AUTOCONF
 +
 +./configure
 +
 +checkit ()
 +{
++  $MAKE "$@" 2>stderr && test ! -s stderr || { cat stderr >&2; exit 1; }
 +}
 +
 +checkit test1
 +checkit test2 var0= var1=one var2=two var3=three var4=
 +
 +:
index 120118f838b1446a3d59fc3840119432f02e0c99,0795f93814afa91c338eccc51313d927436eedeb..36d3dc7367a961a654d28f710900b0511597893f
  # 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 for _AM_OUTPUT_DEPENDENCY_COMMANDS grouping bug,
 -# reported by Markus Duft.
 +# Automake do not complain about nor messes up GNU make specific
 +# variable assignments (":=" and "?=").
  
- . ./defs || Exit 1
+ . ./defs || exit 1
  
 -cat >>configure.ac << END
 -AC_PROG_CC
 -AC_OUTPUT
 -END
 +echo AC_OUTPUT >> configure.ac
  
 -cat > Makefile.am << END
 -bin_PROGRAMS = foo
 -foo_SOURCES = foo.c foo.h
 -END
 +unset PREFOO FOO BAR BAZ XFOO XBAZ || :
 +
 +cat > Makefile.am <<'END'
 +PREFOO = bar
 +FOO := foo$(PREFOO)$(XFOO)
 +XFOO = fail
 +BAR ?= barbar
  
 -cat >foo.c << END
 -#include "foo.h"
 +.PHONY: test1 test2
 +test1:
 +      test $(FOO) = foobar
 +      test $(BAR) = barbar
 +test2:
 +      test $(FOO) = foobar
 +      test $(BAR) = rabrab
  END
 -: >foo.h
  
  $ACLOCAL
 -$AUTOMAKE
  $AUTOCONF
 -./configure --disable-dependency-tracking 2>stderr || {
 -  stat=$?; cat stderr >&2; exit $stat;
 -}
 -cat stderr >&2
 -grep shift stderr && exit 1
 +$AUTOMAKE
 +./configure
 +$MAKE test1
 +PREFOO=notseen FOO=notseen BAR=rabrab $MAKE test2
  
  :
diff --cc t/vartar.sh
index d5ddf6531b79edc973896c3d2b0874c829c59e34,1c9dc3bed038388205201af558539cf3bf91f7d4..91d8fb9b0ca83a6bcd67667e0768de1b83993e07
  
  # Targets and macros are two different name spaces.
  
- . ./defs || Exit 1
+ . ./defs || exit 1
  
  cat > Makefile.am << 'END'
 -install = install
 -install:
 -      $(install) install
 +xinstall = xinstall
 +xinstall:
 +      $(xinstall) xinstall
  END
  
  $ACLOCAL
index 212b29a34b59a02996c2f2adf14d608757a0fc84,0000000000000000000000000000000000000000..8ba3792258d35ce72e22627fd88db5fb53136e2d
mode 100755,000000..100755
--- /dev/null
@@@ -1,103 -1,0 +1,103 @@@
- . ./defs || Exit 1
 +#! /bin/sh
 +# Copyright (C) 2010-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 <http://www.gnu.org/licenses/>.
 +
 +# Make sure we warn about possible variable typos for the
 +# *_DEPENDENCIES when we should, and do not warn about them
 +# when we should not.
 +
- $MAKE 2>stderr && { cat stderr >&2; Exit 1; }
++. ./defs || exit 1
 +
 +subdirs='ok1 ok2 ko1 ko2'
 +mkdir $subdirs
 +
 +errgrep ()
 +{
 +  grep "variable '${1}_DEPENDENCIES' is defined" stderr
 +  grep "'$1' as canonical name" stderr
 +}
 +
 +cat >> configure.ac <<END
 +AC_CONFIG_FILES([$(for d in $subdirs; do echo $d/Makefile; done)])
 +AC_OUTPUT
 +END
 +
 +cat > Makefile.am <<'END'
 +AM_LDFLAGS = unused
 +ETAGS_ARGS = --unused
 +TAGS_DEPENDENCIES = foo.c
 +CONFIG_STATUS_DEPENDENCIES = cvs-version.sh
 +CONFIGURE_DEPENDENCIES = cvs-version.sh
 +foo.c:
 +      echo 'int main (void) { return 0; }' > $@
 +END
 +
 +: > cvs-version.sh
 +
 +cat > ok1/Makefile.am <<'END'
 +TESTS = unused ignored.test
 +LOG_DEPENDENCIES = unused
 +TEST_LOG_DEPENDENCIES = unused
 +END
 +
 +cat > ok2/Makefile.am <<'END'
 +TESTS = ignored.sh notseen.tap
 +TEST_EXTENSIONS = .sh .tap
 +LOG_DEPENDENCIES = unused
 +SH_LOG_DEPENDENCIES = unused
 +TAP_LOG_DEPENDENCIES = unused
 +END
 +
 +cat > ko1/Makefile.am <<'END'
 +LOG_DEPENDENCIES =
 +TEST_LOG_DEPENDENCIES =
 +END
 +
 +cat > ko2/Makefile.am <<'END'
 +TESTS = unused ignored.test
 +TEST_LOG_DEPENDENCIES =
 +LOG_DEPENDENCIES =
 +SH_LOG_DEPENDENCIES =
 +CONFIGSTATUS_DEPENDENCIES =
 +CONFIG_DEPENDENCIES =
 +END
 +
 +$ACLOCAL
 +$AUTOCONF
 +$AUTOMAKE -a
 +
 +./configure
 +
 +$MAKE
 +(cd ok1 && $MAKE)
 +(cd ok2 && $MAKE)
 +
 +cd ko1
- $MAKE 2>stderr && { cat stderr >&2; Exit 1; }
++$MAKE 2>stderr && { cat stderr >&2; exit 1; }
 +cat stderr >&2
 +errgrep LOG
 +errgrep TEST_LOG
 +cd ..
 +
 +cd ko2
- $EGREP "'(TEST_)?LOG" stderr && Exit 1
++$MAKE 2>stderr && { cat stderr >&2; exit 1; }
 +cat stderr >&2
 +errgrep SH_LOG
 +errgrep CONFIG
 +errgrep CONFIGSTATUS
++$EGREP "'(TEST_)?LOG" stderr && exit 1
 +cd ..
 +
 +:
index 7c718b2dce9a32b3b09e70f3236b650621b1f892,0000000000000000000000000000000000000000..e886fc3607d43a0bccc16242b1046c8be96e50d7
mode 100755,000000..100755
--- /dev/null
@@@ -1,109 -1,0 +1,109 @@@
- . ./defs || Exit 1
 +#! /bin/sh
 +# Copyright (C) 2010-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 <http://www.gnu.org/licenses/>.
 +
 +# Make sure we allow the use to whitelist false positives in our
 +# detection of variable typos.  Inspired by the GNU coreutils (8.17)
 +# build system.
 +
 +required=cc
- $MAKE AM_VARTYPOS_WHITELIST= 2>stderr && { cat stderr; Exit 1; }
++. ./defs || exit 1
 +
 +cat >> configure.ac << 'END'
 +AC_PROG_CC
 +AM_PROG_AR
 +AC_PROG_RANLIB
 +AC_SUBST([LIBSELINUX], ["$l_selinux"])
 +AC_OUTPUT
 +END
 +
 +l_selinux=; export l_selinux=
 +
 +cat > Makefile.am <<'END'
 +bin_PROGRAMS = cp mv rm
 +noinst_LIBRARIES = libremove.a libcopy.a
 +remove_LDADD = libremove.a
 +copy_LDADD = libcopy.a
 +copy_LDADD += @LIBSELINUX@
 +cp_LDADD = $(copy_LDADD)
 +rm_LDADD = $(remove_LDADD)
 +mv_LDADD = $(copy_LDADD) $(remove_LDADD)
 +AM_VARTYPOS_WHITELIST = copy_LDADD remove_LDADD
 +EXTRA_DIST = libcopy.h libremove.h
 +END
 +
 +echo 'extern void cu_copy (void);' > libcopy.h
 +echo 'extern void cu_remove (void);' > libremove.h
 +
 +cat > libcopy.c << 'END'
 +#include "libcopy.h"
 +void cu_copy (void) { return; }
 +END
 +
 +cat > libremove.c << 'END'
 +#include "libremove.h"
 +void cu_remove (void) { return; }
 +END
 +
 +cat > cp.c <<'END'
 +#include "libcopy.h"
 +int main (void)
 +{
 +  cu_copy ();
 +  return 0;
 +}
 +END
 +
 +cat > rm.c <<'END'
 +#include "libremove.h"
 +int main (void)
 +{
 +  cu_remove ();
 +  return 0;
 +}
 +END
 +
 +cat > mv.c <<'END'
 +#include "libremove.h"
 +#include "libcopy.h"
 +int main (void)
 +{
 +  cu_copy ();
 +  cu_remove ();
 +  return 0;
 +}
 +END
 +
 +$ACLOCAL
 +$AUTOCONF
 +$AUTOMAKE -a
 +
 +./configure
 +$MAKE
 +
 +# If we remove the whitelisting, failure ensues.
- $MAKE AM_VARTYPOS_WHITELIST=remove_LDADD 2>stderr && { cat stderr; Exit 1; }
++$MAKE AM_VARTYPOS_WHITELIST= 2>stderr && { cat stderr; exit 1; }
 +cat stderr >&2
 +grep "'copy_LDADD' is defined but no program" stderr
 +grep "'remove_LDADD' is defined but no program" stderr
- grep "remove_LDADD" stderr && Exit 1
++$MAKE AM_VARTYPOS_WHITELIST=remove_LDADD 2>stderr && { cat stderr; exit 1; }
 +cat stderr >&2
 +grep "'copy_LDADD' is defined but no program" stderr
++grep "remove_LDADD" stderr && exit 1
 +
 +# Sanity check the distribution.
 +$MAKE distcheck
 +
 +:
diff --cc t/vartypos.sh
index cf9b31e86ca996a6ee7edca5e0af0b57580c3052,16317fb32e7b7cbdaed04b48fccde4c5557a8715..9048c20fcc2ebc931d0124c791ad8335b2dff0e9
  
  # Make sure we warn about possible variable typos when we should.
  
- . ./defs || Exit 1
+ . ./defs || exit 1
  
 -cat >>configure.ac <<'END'
 +: > ltmain.sh
 +
 +cat >> configure.ac <<'END'
 +m4_define([AC_PROG_RANLIB], [AC_SUBST([RANLIB],  [who-cares])])
 +m4_define([AM_PROG_AR],     [AC_SUBST([AR],      [who-cares])])
 +m4_define([LT_INIT],        [AC_SUBST([LIBTOOL], [who-cares])])
 +LT_INIT
 +AM_PROG_AR
  AC_PROG_RANLIB
  AC_OUTPUT
  END
@@@ -82,28 -41,49 +82,28 @@@ nihil
  END
  
  $ACLOCAL
 -AUTOMAKE_fails -Wno-extra-portability
 -# The expected diagnostic is:
 -# automake: warnings are treated as errors
 -# Makefile.am:2: warning: variable 'nodist_foo_SOURCES' is defined but no program or
 -# Makefile.am:2: library has 'foo' as canonical name (possible typo)
 -# Makefile.am:1: warning: variable 'foo_SOURCES' is defined but no program or
 -# Makefile.am:1: library has 'foo' as canonical name (possible typo)
 -# Makefile.am:9: warning: variable 'libfoo_a_SOURCES' is defined but no program or
 -# Makefile.am:9: library has 'libfoo_a' as canonical name (possible typo)
 -# Makefile.am:10: warning: variable 'nodist_libfoo_a_SOURCES' is defined but no program or
 -# Makefile.am:10: library has 'libfoo_a' as canonical name (possible typo)
 -# Makefile.am:11: warning: variable 'EXTRA_libfoo_a_SOURCES' is defined but no program or
 -# Makefile.am:11: library has 'libfoo_a' as canonical name (possible typo)
 -# Makefile.am:3: warning: variable 'EXTRA_foo_SOURCES' is defined but no program or
 -# Makefile.am:3: library has 'foo' as canonical name (possible typo)
 -# Makefile.am:12: warning: variable 'libfoo_a_LIBADD' is defined but no program or
 -# Makefile.am:12: library has 'libfoo_a' as canonical name (possible typo)
 -# Makefile.am:4: warning: variable 'foo_LDADD' is defined but no program or
 -# Makefile.am:4: library has 'foo' as canonical name (possible typo)
 -# Makefile.am:5: warning: variable 'foo_LDFLAGS' is defined but no program or
 -# Makefile.am:5: library has 'foo' as canonical name (possible typo)
 -# Makefile.am:14: warning: variable 'EXTRA_libfoo_a_DEPENDENCIES' is defined but no program or
 -# Makefile.am:14: library has 'libfoo_a' as canonical name (possible typo)
 -# Makefile.am:7: warning: variable 'EXTRA_foo_DEPENDENCIES' is defined but no program or
 -# Makefile.am:7: library has 'foo' as canonical name (possible typo)
 -# Makefile.am:6: warning: variable 'foo_DEPENDENCIES' is defined but no program or
 -# Makefile.am:6: library has 'foo' as canonical name (possible typo)
 -# Makefile.am:13: warning: variable 'libfoo_a_DEPENDENCIES' is defined but no program or
 -# Makefile.am:13: library has 'libfoo_a' as canonical name (possible typo)
 -
 -grep 'as canonical' stderr | grep -v ' .foo. ' | grep -v ' .libfoo_a. ' \
 -  && exit 1
 -test $(grep -c 'variable.*is defined but' stderr) -eq 13
 -
 -# If we add a global -Wnone, all warnings should disappear.
 -$AUTOMAKE -Wnone
 -
 -# Likewise, if matching programs or libraries are defined.
 -cat >>Makefile.am <<'END'
 +$AUTOCONF
 +$AUTOMAKE -a
 +
 +./configure
- $MAKE nihil 2>stderr && { cat stderr >&2; Exit 1; }
++$MAKE nihil 2>stderr && { cat stderr >&2; exit 1; }
 +cat stderr >&2
 +
 +$FGREP 'as canonical' stderr \
-   | $EGREP -v " '(foo|libfoo_a|libbar_la)' " && Exit 1
++  | $EGREP -v " '(foo|libfoo_a|libbar_la)' " && exit 1
 +test 36 -eq $(grep -c 'variable.*is defined but' stderr)
 +
 +# If matching programs or libraries are defined, all errors should
 +# disappear.
 +cat >> Makefile.am <<'END'
  bin_PROGRAMS = foo
  lib_LIBRARIES = libfoo.a
 +lib_LTLIBRARIES = libbar.la
  END
  
 -$AUTOMAKE -Wno-extra-portability
 +# FIXME!  We have to remake the Makefile by hand!  This is unacceptable.
 +$AUTOMAKE Makefile
 +./config.status Makefile
 +$MAKE nihil
  
  :
diff --cc t/verbatim.sh
index f0f6b7469f8ed165856fccd1a988ce66ebbc93d8,0000000000000000000000000000000000000000..eb12959ee4c03903dbe39593591c501ef2de9130
mode 100755,000000..100755
--- /dev/null
@@@ -1,161 -1,0 +1,161 @@@
- . ./defs || Exit 1
 +#! /bin/sh
 +# Copyright (C) 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 <http://www.gnu.org/licenses/>.
 +
 +# A line starting with '!' used in our internal .am fragments is
 +# passed verbatim to the output Makefile, and in the right place
 +# too.  Yes, this test is hacky ... as is the behaviour it tests
 +# after all ;-)
 +
- grep '^!' Makefile.in | grep -v '^!unmodified!$' && Exit 1
++. ./defs || exit 1
 +
 +echo AC_OUTPUT >> configure.ac
 +
 +long1=long
 +long2="$long1 $long1"
 +long4="$long2 $long2"
 +long8="$long4 $long4"
 +long16="$long8 $long8"
 +long32="$long16 $long16"
 +long64="$long32 $long32"
 +long128="$long64 $long64"
 +long256="$long128 $long128"
 +long512="$long256 $long265"
 +
 +# Sanity check.
 +case $long512 in
 +  *' long long '*) ;;
 +  *) fatal_ 'defining $long512' ;;
 +esac
 +
 +mkdir am
 +cp "$am_amdir"/*.am ./am
 +
 +echo pkgdata_DATA = configure.ac > Makefile.am
 +
 +# The '.am' file are read-only when this test is run under
 +# "make distcheck", so we need to unlink any of them we want
 +# to overwrite.
 +rm -f am/data.am
 +cat > am/data.am << 'END'
 +include 0.am
 +include 1.am
 +include 2.am
 +include 3.am
 +END
 +
 +echo "!x = $long256" > am/0.am
 +
 +cat >> am/1.am << 'END'
 +!## unmodified
 +!xyz = \
 +rule:
 +      @echo Go Custom Rule
 +!!unmodified!
 +.PHONY: test-xyz
 +test-xyz:
 +      test '$(xyz)' = '!unmodified!'
 +END
 +
 +cat > am/2.am << 'END'
 +!badrule1: ; @echo "'$@' unexpectedly won over 'all'!"; exit 1
 +!badrule2:
 +!     @echo "'$@' unexpectedly won over 'all'!"; exit 1
 +all-local: verbatim-rule
 +      test -f $<.ok
 +!verbatim-rule:
 +!ifeq (ok,ok)
 +!     @echo $@ run correctly
 +!     : > $@.ok
 +!else
 +!     echo $@ failure; exit 1
 +!endif
 +# We want this deliberately after verbatim-rule.
 +x = ok
 +END
 +
 +cat > am/3.am << 'END'
 +x1 := 1
 +x2 := 2
 +
 +foo = .
 +
 +!ifndef FOO
 +!foo += $(x1)
 +!else
 +!foo += $(x2)
 +!endif
 +
 +!ifeq ($(BAR),1)
 +!bar = aaa
 +!else
 +!ifeq "$(BAR)" "2"
 +!bar = lol
 +!else
 +!bar = default
 +!endif # this comment should be comment ignored
 +!endif
 +
 +check-var:
 +      test '$($(var))' = '$(val)'
 +END
 +
 +# Avoid interferences from the environment.
 +FOO= BAR=; unset FOO BAR
 +
 +$ACLOCAL
 +$AUTOMAKE --libdir=.
 +
- $MAKE | grep 'Custom Rule' && Exit 1
++grep '^!' Makefile.in | grep -v '^!unmodified!$' && exit 1
 +
 +# Use perl, to avoid possible issues with regex length in vendor greps.
 +$PERL -e "
 +  while (<>) { exit (0) if (/^x = $long256$/); }
 +  exit (1);
 +" Makefile.in
 +
 +grep '^!unmodified!$' Makefile.in
 +test $(grep -c '^!unmodified!$' Makefile.in) -eq 1
 +grep '^## unmodified$' Makefile.in
 +grep '^xyz = \\$' Makefile.in
 +
 +$EGREP 'foo|bar' Makefile.in # For debugging.
 +test `grep -c '^foo +=' Makefile.in` -eq 2
 +test `grep -c '^bar =' Makefile.in` -eq 3
 +
 +$AUTOCONF
 +./configure
 +
 +# The created makefile is not broken.
 +$MAKE -n
 +
 +$MAKE rule
 +test ! -f verbatim-rule.ok
 +$MAKE
 +test -f verbatim-rule.ok
++$MAKE | grep 'Custom Rule' && exit 1
 +$MAKE test-xyz
 +
 +$MAKE check-var var=foo val='. 1'
 +$MAKE check-var var=foo val='. 1' FOO=''
 +$MAKE check-var var=foo val='. 2' FOO=yes
 +$MAKE check-var var=foo val='. 2' FOO=' who cares!'
 +
 +$MAKE check-var var=bar val=default
 +$MAKE check-var var=bar val=aaa     BAR=1
 +$MAKE check-var var=bar val=lol     BAR=2
 +$MAKE check-var var=bar val=default BAR=3
 +
 +:
diff --cc t/version7.sh
Simple merge
index 1f470736a89cab9f6e10eb6d49c5b2be6839e8b7,0000000000000000000000000000000000000000..e6d961f34329f20d1c2ff422fed58cc029d177e4
mode 100755,000000..100755
--- /dev/null
@@@ -1,73 -1,0 +1,73 @@@
- . ./defs || Exit 1
 +#! /bin/sh
 +# Copyright (C) 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 <http://www.gnu.org/licenses/>.
 +
 +# In a VPATH build, a target starting with $(srcdir) is triggered to
 +# build a source with the same name but without the $(srcdir).
 +
 +required=cc
++. ./defs || exit 1
 +
 +ocwd=`pwd` || fatal_ "couldn't get current working directory"
 +
 +cat >> configure.ac <<'END'
 +AC_PROG_CC
 +AC_OUTPUT
 +END
 +
 +cat > Makefile.am <<'END'
 +noinst_PROGRAMS = p1 p2 p3 tp1 tp2 tp3
 +
 +write-it = echo 'int main (void) { return 0; }' >$@
 +
 +# We keep all the targets on separate lines to make sure the dumb
 +# Automake parser actually sees them all.
 +$(srcdir)/p1.c:
 +      $(write-it)
 +${srcdir}/p2.c:
 +      $(write-it)
 +@srcdir@/p3.c:
 +      $(write-it)
 +$(top_srcdir)/tp1.c:
 +      $(write-it)
 +${top_srcdir}/tp2.c:
 +      $(write-it)
 +@top_srcdir@/tp3.c:
 +      $(write-it)
 +END
 +
 +$ACLOCAL
 +$AUTOCONF
 +$AUTOMAKE
 +
 +mkdir build
 +cd build
 +../configure
 +$MAKE all
 +
 +cd "$ocwd"
 +rm -f *.c
 +mkdir -p sub1/sub2/sub3
 +cd sub1/sub2/sub3
 +"$ocwd"/configure --disable-dependency-tracking
 +$MAKE all
 +
 +cd "$ocwd"
 +rm -f *.c
 +./configure
 +$MAKE all
 +$MAKE distcheck
 +
 +:
index 0d2db6cbc40b92dde9fe3bf6a15921d5f4fbd0f1,0000000000000000000000000000000000000000..61fb2e6853ecc8e6f856031f11140a035b64aebe
mode 100755,000000..100755
--- /dev/null
@@@ -1,100 -1,0 +1,100 @@@
- . ./defs || Exit 1
 +#! /bin/sh
 +# Copyright (C) 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 <http://www.gnu.org/licenses/>.
 +
 +# Test Automake-provided internal make macros to deal with VPATH rewrites.
 +
++. ./defs || exit 1
 +
 +echo AC_OUTPUT >> configure.ac
 +
 +cat > Makefile.am << END
 +bsub:
 +      mkdir \$@
 +bsub/foo: bsub
 +      mkdir \$@
 +bsub/foo/bar: bsub/foo
 +      mkdir \$@
 +bsub/mu.c++: bsub/foo
 +      touch \$@
 +bsub/foo/pu.cxx: bsub/foo
 +      touch \$@
 +
 +clean-local:
 +      rm -rf bsub
 +
 +## Yes, I'm a lazy typist.
 +vr = \$(am__vpath_rewrite)
 +
 +test-common: bsub/foo/bar bsub/mu.c++ bsub/foo/pu.cxx
 +      test '\$(call vr,Makefile)'             = Makefile
 +      test '\$(call vr,$tab config.status  )' = config.status
 +      test '\$(call vr,.)'                    = .
 +## FIXME: These two do not work apparently :-(  Such use cases are not
 +## FIXME: required presently though, so this is not a big deal.
 +      : test '\$(call vr, bsub$tab  )'        = bsub
 +      : test '\$(call vr,bsub)'               = bsub
 +      test '\$(call vr,bsub/.)'               = bsub/.
 +      test '\$(call vr,bsub/mu.c++)'          = bsub/mu.c++
 +      test '\$(call vr,bsub/foo/pu.cxx)'      = bsub/foo/pu.cxx
 +      test '\$(call vr,bsub/foo )'            = bsub/foo
 +      test '\$(call vr,bsub/foo/bar)'         = bsub/foo/bar
 +      test '\$(call vr,nonesuch)'             = \$(srcdir)/nonesuch
 +      test '\$(call vr, $tab  nonesuch2  )'   = \$(srcdir)/nonesuch2
 +      test '\$(call vr, sub/none)'            = \$(srcdir)/sub/none
 +
 +test-vpath: test-common
 +      test '\$(call vr,ssub)'                   = \$(srcdir)/ssub
 +      test '\$(call vr,ssub/foo )'              = \$(srcdir)/ssub/foo
 +      test '\$(call vr, ssub/foo/bar)'          = \$(srcdir)/ssub/foo/bar
 +      test '\$(call vr,Makefile.in )'           = \$(srcdir)/Makefile.in
 +      test '\$(call vr,zap/paz.c)'              = \$(srcdir)/zap/paz.c
 +      test '\$(call vr,configure $tab)'         = \$(srcdir)/configure
 +      test '\$(call vr,    configure.ac$tab  )' = \$(srcdir)/configure.ac
 +
 +test-intree: test-common
 +      test '\$(call vr,ssub)'                   = ssub
 +      test '\$(call vr,ssub/foo )'              = ssub/foo
 +      test '\$(call vr, ssub/foo/bar)'          = ssub/foo/bar
 +      test '\$(call vr,Makefile.in )'           = Makefile.in
 +      test '\$(call vr,zap/paz.c)'              = zap/paz.c
 +      test '\$(call vr,configure $tab)'         = configure
 +      test '\$(call vr,    configure.ac$tab  )' = configure.ac
 +END
 +
 +$ACLOCAL
 +$AUTOMAKE
 +$AUTOCONF
 +
 +mkdir zap ssub ssub/foo ssub/foo/bar
 +: > zap/paz.c
 +
 +./configure
 +$MAKE test-intree
 +$MAKE distclean
 +
 +mkdir build
 +cd build
 +../configure
 +$MAKE test-vpath
 +cd ..
 +
 +ocwd=`pwd` || fatal_ "couldn't get current working directory"
 +mkdir build2 build2/subbuild
 +cd build2/subbuild
 +"$ocwd"/configure
 +$MAKE test-vpath
 +
 +:
diff --cc t/vpath.sh
index f20ebf84023de55c2c61ec779436cbb042bec58c,dcb08ffb00f23e295688fb273cebe3f886ee47cd..20908104e75ecec966eba9ee282cbb9ec9fa8ebc
  # Test to make sure VPATH can be overridden.
  # Report from Anthony Green.
  
- . ./defs || Exit 1
+ . ./defs || exit 1
  
 +echo AC_OUTPUT >> configure.ac
 +
  cat > Makefile.am << 'END'
  VPATH = zardoz
 +%.bar: %.foo
 +      cp $< $@
  END
  
  $ACLOCAL
 +$AUTOCONF
  $AUTOMAKE
  
 -grep VPATH Makefile.in # For debugging.
 -grep '^VPATH = zardoz$' Makefile.in
 -grep 'VPATH.*@srcdir@' Makefile.in && exit 1
 +mkdir build
 +cd build
 +mkdir zardoz
 +../configure
 +
 +echo OK > zardoz/file.foo
 +echo KO > ../file.foo
 +$MAKE file.bar
 +test "$(cat file.bar)" = OK
 +rm -f file.bar zardoz/file.foo
- $MAKE file.bar && Exit 1
++$MAKE file.bar && exit 1
 +test ! -f file.bar
  
  :
diff --cc t/vtexi.sh
Simple merge
diff --cc t/vtexi2.sh
Simple merge
diff --cc t/vtexi3.sh
Simple merge
diff --cc t/vtexi4.sh
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
diff --cc t/warnopts.sh
index 887f73a5e357f80aa796dc5c7a2f7260e8fa0cf8,68ceb2a847324fda07c1e474d15e8444f43770c0..c3be6179851b11ba3a59038eb464a20eff04ce2f
  
  # Make sure that we can enable or disable warnings on a per-file basis.
  
- . ./defs || Exit 1
+ . ./defs || exit 1
  
 -cat >>configure.ac <<END
 +cat >> configure.ac << 'END'
 +AC_PROG_CC
  AC_CONFIG_FILES([sub/Makefile])
 +AM_CONDITIONAL([COND_FALSE], [false])
  AC_OUTPUT
  END
  
@@@ -52,16 -44,22 +52,16 @@@ EN
  $ACLOCAL
  AUTOMAKE_fails
  # The expected diagnostic is
 -#   Makefile.am:3: warning: variable 'foo_SOURCES' is defined but no program or
 -#                           library has 'foo' as canonical name (possible typo)
 -#   sub/Makefile.am:2: warning: 'INCLUDES' is the old name for 'AM_CPPFLAGS'
 -grep '^Makefile.am:.*foo_SOURCES' stderr
 -grep '^sub/Makefile.am:.*INCLUDES' stderr
 -grep '^sub/Makefile.am:.*foo_SOURCES' stderr && exit 1
 -grep '^Makefile.am:.*INCLUDES' stderr && exit 1
 -# Only three lines of warnings.
 -test $(grep -v 'warnings are treated as errors' stderr | wc -l) -eq 3
 +#   automake: warnings are treated as errors
 +#   Makefile.am:6: warning: compiling 'sub/foo.c' in subdir requires 'AM_PROG_CC_C_O' in 'configure.ac'
 +#   sub/Makefile.am:1: warning: 'AUTOMAKE_OPTIONS' cannot have conditional contents
 +grep '^Makefile\.am:.*sub/foo\.c.*AM_PROG_CC_C_O' stderr
 +grep '^sub/Makefile.am:.*AUTOMAKE_OPTIONS' stderr
- grep '^sub/Makefile\.am:.*AM_PROG_CC_C_O' stderr && Exit 1
- grep '^Makefile\.am:.*AUTOMAKE_OPTIONS' stderr && Exit 1
++grep '^sub/Makefile\.am:.*AM_PROG_CC_C_O' stderr && exit 1
++grep '^Makefile\.am:.*AUTOMAKE_OPTIONS' stderr && exit 1
 +# Only two lines of warnings.
 +test $(grep -v 'warnings are treated as errors' stderr | wc -l) -eq 2
  
 -# On fast machines the autom4te.cache created during the above run of
 -# $AUTOMAKE is likely to have the same time stamp as the configure.ac
 -# created below; thus causing traces for the old configure.ac to be
 -# used.  We could do '$sleep', but it's faster to erase the
 -# directory.  (Erase autom4te*.cache, not autom4te.cache, because some
 -# bogus installations of Autoconf use a versioned cache).
  rm -rf autom4te*.cache
  
  # If we add a global -Wnone, all warnings should disappear.
diff --cc t/werror.sh
index 7407e00de9a17ec261b23a0fbe916e79b298b59d,01d76fc036bcf5e7fe2cbfafdb16fa628ee6f00f..d6c6587c1118b9d579c760d2daa4d1a5c58f0006
  
  # Test to make sure -Werror and --add-missing work together.
  
- . ./defs || Exit 1
 +am_create_testdir=empty
+ . ./defs || exit 1
  
 -: > Makefile.am
 -
 -rm -f install-sh depcomp missing mkinstalldirs
 +cat > configure.ac <<END
 +AC_INIT([$me], [1.0])
 +AM_INIT_AUTOMAKE
 +AC_CONFIG_FILES([Makefile])
 +END
  
 +: > Makefile.am
 +test ! -f install-sh    # Sanity check.
  $ACLOCAL
  $AUTOMAKE -Werror --add-missing
 +test -f install-sh      # Sanity check.
 +
 +:
diff --cc t/werror2.sh
index e77a85b6e73fda793e4cae27ffb79f83351c8913,52ec1811ae4cf0ff34647b9ffa0e2e202d38f69f..8b42833adaf9d02a7bda866019abc8e2a0533d09
@@@ -19,9 -19,9 +19,9 @@@
  # succeed if make is run a second time immediately afterwards.
  # Report from Harlan Stenn.
  
- . ./defs || Exit 1
+ . ./defs || exit 1
  
 -echo AC_OUTPUT>>configure.ac
 +echo AC_OUTPUT >> configure.ac
  
  : > Makefile.am
  
diff --cc t/xsource.sh
Simple merge
Simple merge
diff --cc t/yacc-basic.sh
Simple merge
Simple merge
Simple merge
diff --cc t/yacc-cxx.sh
Simple merge
Simple merge
diff --cc t/yacc-d-cxx.sh
Simple merge
index c5b69f652d8f6aaba310aa8457ce88b5a1a2285e,70f3f14cc81a5cadb8aefe3adfc9b5271c66f4ce..281dcd2769323a134ef9b0d28ad89e41c2fbecba
  # along with this program.  If not, see <http://www.gnu.org/licenses/>.
  
  # Make sure depcomp does not needlessly update headers and objects
 -# for yacc rules.  This test still fails with FreeBSD make (but passes
 -# with NetBSD make).
 +# for yacc rules.
  
  required='cc yacc'
- . ./defs || Exit 1
+ . ./defs || exit 1
  
  cat >> configure.ac << 'END'
  AC_PROG_CC
index 174d704fe8baf4bf608371d921e885967db11da4,850b027b96c5dcd794fec80bbd57a35ffcf5f32f..7dc5b8b5d57457927b54380470e47068d676a663
  # along with this program.  If not, see <http://www.gnu.org/licenses/>.
  
  # Check that VPATH builds and "make distcheck" works with packages
 -# using yacc and the automake 'subdir-objects' option.
 -# Exposes automake bug#8485.
 +# using yacc sources in a subdir option.  Exposes automake bug#8485.
  
  required='cc yacc'
- . ./defs || Exit 1
+ . ./defs || exit 1
  
 -# This test is bounded to fail for any implementation that
 -# triggers automake bug#7884.
 -useless_vpath_rebuild && skip_ "would trip on automake bug#7884"
 -
  cat >> configure.ac << 'END'
  AC_PROG_CC
  AM_PROG_CC_C_O
@@@ -79,10 -85,9 +79,10 @@@ chmod u+w 
  # Try to enable dependency tracking even with slow dependency
  # extractors, to improve coverage.
  ../configure --enable-dependency-tracking YACC=false
 -$MAKE
 +
 +$MAKE all YACC=false
- ls -l sub/*.[ch] && Exit 1
+ ls -l sub/*.[ch] && exit 1
  
 -env DISTCHECK_CONFIGURE_FLAGS='YACC=false' $MAKE distcheck
 +$MAKE distcheck YACC=false DISTCHECK_CONFIGURE_FLAGS='YACC=false'
  
  :
index 04c887ff43f0ee035198dd5037b5aebaecbd2d0d,40b8332453b47d4c01c068daad51f32fe46a9332..45cb10916a472bf1dc58d7fd5028c93c67c2a3fe
@@@ -83,8 -83,8 +83,8 @@@ chmod a-w $distdi
  mkdir build2
  cd build2
  ../$distdir/configure
- $MAKE 2>stderr && { cat stderr >&2; Exit 1; }
 -$MAKE >out 2>&1 && { cat out; exit 1; }
 -cat out
 -$FGREP parse.c out
++$MAKE 2>stderr && { cat stderr >&2; exit 1; }
 +cat stderr >&2
 +$FGREP parse.c stderr
  
  :
index e9548a54c02127b31f99abe519c9f54c53150953,0000000000000000000000000000000000000000..e669cbc5f08d29c040a93a6a564743f9d0e0969e
mode 100755,000000..100755
--- /dev/null
@@@ -1,116 -1,0 +1,116 @@@
- . ./defs || Exit 1
 +#! /bin/sh
 +# Copyright (C) 2011-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 <http://www.gnu.org/licenses/>.
 +
 +# Yacc + C++ support for a program built only from yacc sources.
 +# Lex + C++ support for a program built only from lex sources.
 +
 +required='c++ yacc'
-   echo b | ./foo && Exit 1
++. ./defs || exit 1
 +
 +cat >> configure.ac << 'END'
 +AC_PROG_CXX
 +AC_PROG_LEX
 +AC_PROG_YACC
 +AC_OUTPUT
 +END
 +
 +cat > Makefile.am << 'END'
 +bin_PROGRAMS = foo bar
 +foo_SOURCES = foo.yy
 +bar_SOURCES = bar.lxx
 +
 +.PHONY: check-dist
 +check-dist: distdir
 +      echo ' ' $(am__dist_common) ' ' | grep '[ /]foo\.cc'
 +      echo ' ' $(am__dist_common) ' ' | grep '[ /]bar\.cxx'
 +      ls -l $(distdir)
 +      test -f $(distdir)/foo.cc
 +      test -f $(distdir)/bar.cxx
 +END
 +
 +cat > foo.yy << 'END'
 +%{
 +// Valid C++, but deliberately invalid C.
 +#include <cstdio>
 +#include <cstdlib>
 +// "std::" qualification required by Sun C++ 5.9.
 +int yylex (void) { return std::getchar (); }
 +void yyerror (const char *s) { return; }
 +%}
 +%%
 +a : 'a' { exit(0); };
 +%%
 +int main (void)
 +{
 +  yyparse ();
 +  return 1;
 +}
 +END
 +
 +cat > bar.lxx << 'END'
 +%{
 +#define YY_NO_UNISTD_H 1
 +int isatty (int fd) { return 0; }
 +%}
 +%%
 +"x" return EOF;
 +.
 +%%
 +// Valid C++, but deliberately invalid C.
 +#include <cstdlib>
 +int main (void)
 +{
 +  /* We don't use a 'while' loop here (like a real lexer would do)
 +     to avoid possible hangs. */
 +  if (yylex () == EOF)
 +    std::exit (0);
 +  else
 +    std::exit (1);
 +}
 +
 +/* Avoid possible link errors. */
 +int yywrap (void) { return 1; }
 +END
 +
 +$ACLOCAL
 +$AUTOCONF
 +$AUTOMAKE -a
 +
 +./configure
 +
 +$MAKE
 +
 +# The Yacc-derived and Lex-derived C++ sources must be created, and not
 +# removed once compiled (i.e., not treated like "intermediate files" in
 +# the GNU make sense).
 +test -f foo.cc
 +test -f bar.cxx
 +
 +if cross_compiling; then :; else
 +  echo a | ./foo
-   echo y | ./bar && Exit 1
++  echo b | ./foo && exit 1
 +  echo x | ./bar
++  echo y | ./bar && exit 1
 +  : # Don't trip on 'set -e'.
 +fi
 +
 +# The Yacc-derived and Lex-derived C++ sources must be shipped.
 +$MAKE check-dist
 +
 +# Sanity check on distribution.
 +$MAKE distcheck
 +
 +:
diff --cc t/yacc-line.sh
index 1d536eec63df96f3d505e57204dc46f7d5ba5223,4ef2c011fbcf66b49888d6f5ddf40eb60a438aac..fab905ef9bfd127c8f4634ef7f2e46cf3e93a2b3
  # See also sister test 'lex-line.test'.
  
  required='cc yacc'
- . ./defs || Exit 1
+ . ./defs || exit 1
  
  cat >> configure.ac << 'END'
 -AC_CONFIG_FILES([sub/Makefile])
  AC_PROG_CC
  AM_PROG_CC_C_O
  AC_PROG_YACC
@@@ -78,23 -97,25 +78,23 @@@ for vpath in : false; d
    $EGREP 'line|\.y' $c_outputs
  
    # Adjusted "#line" should not contain reference to the builddir.
-   grep '#.*line.*build.*\.y' $c_outputs && Exit 1
+   grep '#.*line.*build.*\.y' $c_outputs && exit 1
    # Adjusted "#line" should not contain reference to the absolute
    # srcdir.
-   $EGREP '#.*line *"?/.*\.y' $c_outputs && Exit 1
+   $EGREP '#.*line *"?/.*\.y' $c_outputs && exit 1
    # Adjusted "#line" should not contain reference to the default
    # output file names, e.g., 'y.tab.c' and 'y.tab.h'.
-   grep '#.*line.*y\.tab\.' $c_outputs && Exit 1
+   grep '#.*line.*y\.tab\.' $c_outputs && exit 1
    # Look out for a silly regression.
-   grep "#.*\.y.*\.y" $c_outputs && Exit 1
+   grep "#.*\.y.*\.y" $c_outputs && exit 1
    if $vpath; then
      grep '#.*line.*"\.\./zardoz\.y"' zardoz.c
 -    grep '#.*line.*"\.\./dir/quux\.y"' bar-quux.c
 -    grep '#.*line.*"\.\./\.\./sub/zardoz\.y"' sub/foo-zardoz.c
 -    grep '#.*line.*"\.\./\.\./sub/dir/quux\.y"' sub/dir/quux.c
 +    grep '#.*line.*"\.\./zardoz\.y"' baz-zardoz.c
 +    grep '#.*line.*"\.\./dir/quux\.y"' dir/quux.c
    else
      grep '#.*line.*"zardoz\.y"' zardoz.c
 -    grep '#.*line.*"dir/quux\.y"' bar-quux.c
 -    grep '#.*line.*"zardoz\.y"' sub/foo-zardoz.c
 -    grep '#.*line.*"dir/quux\.y"' sub/dir/quux.c
 +    grep '#.*line.*"zardoz\.y"' baz-zardoz.c
 +    grep '#.*line.*"dir/quux\.y"' dir/quux.c
    fi
  
    cd $srcdir
Simple merge
Simple merge
index e0c415fda871c69c0f1de4144e3b361bde5419b2,0000000000000000000000000000000000000000..81c11aa63a06d96661ba976b34986ec4c0f03710
mode 100755,000000..100755
--- /dev/null
@@@ -1,71 -1,0 +1,71 @@@
- . ./defs || Exit 1
 +#! /bin/sh
 +# Copyright (C) 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 <http://www.gnu.org/licenses/>.
 +
 +# Ensure subdirs for subdir parsers are generated when subdir objects
 +# are used, even when dependency tracking is disabled.
 +
 +required='cc yacc'
++. ./defs || exit 1
 +
 +cat >configure.ac <<END
 +AC_INIT([$me], [1.0])
 +AM_INIT_AUTOMAKE([no-dependencies])
 +AC_CONFIG_FILES([Makefile])
 +AC_PROG_CC
 +AM_PROG_CC_C_O
 +AC_PROG_YACC
 +AC_OUTPUT
 +END
 +
 +cat >Makefile.am <<END
 +bin_PROGRAMS = p1 p2
 +p1_SOURCES = sub1/s1.y
 +p2_SOURCES = sub2/s2.y
 +p2_CPPFLAGS = -DWHATEVER
 +END
 +
 +mkdir sub1 sub2
 +
 +cat >sub1/s1.y <<END
 +%{
 +int yylex () { return 0; }
 +void yyerror (char *s) { return; }
 +int main (void) { yyparse (); return 1; }
 +%}
 +%%
 +foobar : 'f' 'o' 'o' 'b' 'a' 'r' {};
 +END
 +
 +cp sub1/s1.y sub2/s2.y
 +
 +$ACLOCAL
 +$AUTOCONF
 +$AUTOMAKE -a
 +mkdir build
 +cd build
 +
 +# Sanity check.
 +../configure --help # For debugging.
 +../configure --help | $EGREP '(dis|en)able-depend' \
 +  && fatal_ "couldn't disable dependency tracking support globally"
 +
 +../configure
 +$MAKE sub1/s1.c
 +$MAKE sub2/s2.c
 +rm -rf sub1 sub2
 +$MAKE
 +
 +:
diff --cc t/yacc5.sh
index b24dcd3cdb40d1d669f2edb9fa0b01488024c638,4382ded62e636d089754c2b4087ce82b8cea1ba7..9a8d8da29ba34b7b84ffea3774bdd34174405891
@@@ -31,25 -46,34 +31,25 @@@ cat > Makefile.am << 'END
  bin_PROGRAMS = maude
  maude_SOURCES = sub/maude.y
  END
 -
 -$ACLOCAL
  $AUTOMAKE -a
 -
  # No rule needed, the default .y.c: inference rule is enough
  # (but there may be an additional dependency on a dirstamp file).
- grep '^sub/maude\.c:.*maude\.y' Makefile.in && Exit 1
+ grep '^sub/maude\.c:.*maude\.y' Makefile.in && exit 1
  
 -
  ## Try again with per-exe flags.
  
  cat > Makefile.am << 'END'
  bin_PROGRAMS = maude
  maude_SOURCES = sub/maude.y
 -## A particularly trickey case.
 +## A particularly tricky case.
  maude_YFLAGS = -d
  END
 -
 -$ACLOCAL
  $AUTOMAKE -a
 -
 +grep '^sub/maude-maude\.c:.*sub/maude\.y' Makefile.in
  # Rule should use maude_YFLAGS.
- grep 'AM_YFLAGS.*maude' Makefile.in && Exit 1
+ grep 'AM_YFLAGS.*maude' Makefile.in && exit 1
 -
  # Silly regression.
- grep 'maudec' Makefile.in && Exit 1
+ grep 'maudec' Makefile.in && exit 1
 -
  # Make sure the .o file is required.
  grep '^am_maude_OBJECTS.*maude' Makefile.in
  
diff --cc t/yacc8.sh
Simple merge
Simple merge
diff --cc t/yflags.sh
Simple merge
diff --cc t/yflags2.sh
Simple merge