Imported Upstream version 1.15.1 upstream/1.15.1
authorsk7.park <sk7.park@samsung.com>
Thu, 30 Nov 2017 06:36:52 +0000 (15:36 +0900)
committersk7.park <sk7.park@samsung.com>
Thu, 30 Nov 2017 06:36:52 +0000 (15:36 +0900)
1659 files changed:
AUTHORS
ChangeLog
GNUmakefile
HACKING
INSTALL
Makefile.am
Makefile.in
NEWS
PLANS/README [new file with mode: 0644]
PLANS/obsolete-removed/am-prog-mkdir-p.txt [new file with mode: 0644]
PLANS/obsolete-removed/configure.in.txt [new file with mode: 0644]
PLANS/rm-f-without-args.txt [new file with mode: 0644]
PLANS/subdir-objects.txt [new file with mode: 0644]
PLANS/texi/drop-split-info-files.txt [new file with mode: 0644]
PLANS/texi/warnings-for-automake-ng-compatibility.txt [new file with mode: 0644]
THANKS
aclocal.m4
bin/Makefile.inc [new file with mode: 0644]
bin/aclocal.in [moved from aclocal.in with 81% similarity]
bin/automake.in [moved from automake.in with 85% similarity]
bin/gen-perl-protos [new file with mode: 0755]
bootstrap [moved from bootstrap.sh with 82% similarity]
configure
configure.ac
contrib/check-html.am
contrib/multilib/config-ml.in
contrib/multilib/multi.m4
contrib/multilib/multilib.am
contrib/multilib/symlink-tree
contrib/t/Makefile.inc [new file with mode: 0644]
contrib/t/help-multilib.sh [moved from t/help-multilib.sh with 82% similarity]
contrib/t/multilib.sh [moved from t/multlib.sh with 92% similarity]
contrib/t/parallel-tests-html-recursive.sh [new file with mode: 0755]
contrib/t/parallel-tests-html.sh [moved from t/parallel-tests2.sh with 74% similarity]
contrib/tap-driver.pl [moved from lib/tap-driver.pl with 97% similarity]
doc/Makefile.inc [new file with mode: 0644]
doc/amhello-1.0.tar.gz
doc/amhello/Makefile.am
doc/amhello/configure.ac
doc/amhello/src/Makefile.am
doc/amhello/src/main.c
doc/automake-history.info
doc/automake-history.texi
doc/automake.info
doc/automake.info-1
doc/automake.info-2
doc/automake.info-3 [deleted file]
doc/automake.texi
doc/fdl.texi
doc/help2man
doc/stamp-vti
doc/version.texi
gen-testsuite-part
lib/Automake/ChannelDefs.pm
lib/Automake/Channels.pm
lib/Automake/Condition.pm
lib/Automake/Config.in
lib/Automake/Configure_ac.pm
lib/Automake/DisjConditions.pm
lib/Automake/FileUtils.pm
lib/Automake/General.pm
lib/Automake/Getopt.pm
lib/Automake/Item.pm
lib/Automake/ItemDef.pm
lib/Automake/Language.pm [new file with mode: 0644]
lib/Automake/Location.pm
lib/Automake/Makefile.inc [new file with mode: 0644]
lib/Automake/Options.pm
lib/Automake/Rule.pm
lib/Automake/RuleDef.pm
lib/Automake/VarDef.pm
lib/Automake/Variable.pm
lib/Automake/Version.pm
lib/Automake/Wrap.pm
lib/Automake/XFile.pm
lib/INSTALL
lib/Makefile.inc [new file with mode: 0644]
lib/am/Makefile.inc [new file with mode: 0644]
lib/am/check.am
lib/am/check2.am
lib/am/clean-hdr.am
lib/am/clean.am
lib/am/compile.am
lib/am/configure.am
lib/am/data.am
lib/am/dejagnu.am
lib/am/depend.am
lib/am/depend2.am
lib/am/distdir.am
lib/am/footer.am
lib/am/header-vars.am
lib/am/header.am
lib/am/inst-vars.am
lib/am/install.am
lib/am/java.am
lib/am/lang-compile.am
lib/am/lex.am
lib/am/library.am
lib/am/libs.am
lib/am/libtool.am
lib/am/lisp.am
lib/am/ltlib.am
lib/am/ltlibrary.am
lib/am/mans-vars.am
lib/am/mans.am
lib/am/program.am
lib/am/progs.am
lib/am/python.am
lib/am/remake-hdr.am
lib/am/scripts.am
lib/am/subdirs.am
lib/am/tags.am
lib/am/texi-vers.am
lib/am/texibuild.am
lib/am/texinfos.am
lib/am/vala.am
lib/am/yacc.am
lib/ar-lib
lib/compile
lib/config.guess
lib/config.sub
lib/depcomp
lib/elisp-comp [deleted file]
lib/gendocs.sh [new file with mode: 0755]
lib/gendocs_template [new file with mode: 0644]
lib/gitlog-to-changelog
lib/gnupload
lib/install-sh
lib/mdate-sh
lib/missing
lib/mkinstalldirs
lib/py-compile
lib/tap-driver.sh
lib/test-driver
lib/texinfo.tex
lib/update-copyright
lib/ylwrap
m4/Makefile.inc [new file with mode: 0644]
m4/amversion.in
m4/amversion.m4
m4/ar-lib.m4
m4/as.m4
m4/auxdir.m4
m4/ccstdc.m4 [deleted file]
m4/cond-if.m4
m4/cond.m4
m4/depend.m4
m4/depout.m4
m4/dmalloc.m4
m4/extra-recurs.m4 [new file with mode: 0644]
m4/gcj.m4
m4/header.m4 [deleted file]
m4/init.m4
m4/install-sh.m4
m4/internal/ac-config-macro-dirs.m4 [new file with mode: 0644]
m4/lead-dot.m4
m4/lex.m4
m4/lispdir.m4
m4/maintainer.m4
m4/make.m4
m4/minuso.m4 [deleted file]
m4/missing.m4
m4/mkdirp.m4
m4/obsol-gt.m4 [deleted file]
m4/obsol-lt.m4 [deleted file]
m4/obsolete.m4
m4/options.m4
m4/prog-cc-c-o.m4 [new file with mode: 0644]
m4/protos.m4 [deleted file]
m4/python.m4
m4/runlog.m4
m4/sanity.m4
m4/silent.m4
m4/strip.m4
m4/substnot.m4
m4/tar.m4
m4/upc.m4
m4/vala.m4
maintainer/am-ft [new file with mode: 0755]
maintainer/am-xft [moved from t/extra3.sh with 70% similarity]
maintainer/maint.mk [new file with mode: 0644]
maintainer/rename-tests [new file with mode: 0755]
maintainer/syntax-checks.mk [moved from syntax-checks.mk with 51% similarity]
old/ChangeLog-tests
old/ChangeLog.00
old/ChangeLog.01
old/ChangeLog.02
old/ChangeLog.03
old/ChangeLog.04
old/ChangeLog.09
old/ChangeLog.11
old/ChangeLog.96
old/ChangeLog.98
old/TODO
t/CheckListOfTests.am
t/Makefile.inc [new file with mode: 0644]
t/README
t/ac-output-old.tap [changed mode: 0755->0644]
t/aclocal-I-and-install.sh [moved from t/acloca10.sh with 82% similarity, mode: 0644]
t/aclocal-I-order-1.sh [moved from t/aclocal9.sh with 93% similarity, mode: 0644]
t/aclocal-I-order-2.sh [moved from t/acloca11.sh with 90% similarity, mode: 0644]
t/aclocal-I-order-3.sh [moved from t/acloca12.sh with 83% similarity, mode: 0644]
t/aclocal-acdir.sh [changed mode: 0755->0644]
t/aclocal-amflags.sh [new file with mode: 0644]
t/aclocal-autoconf-version-check.sh [moved from t/missing6.sh with 87% similarity, mode: 0644]
t/aclocal-comments-respected.sh [moved from t/acloca21.sh with 93% similarity, mode: 0644]
t/aclocal-deleted-header-aclocal-amflags.sh [moved from t/ccnoco2.sh with 51% similarity, mode: 0644]
t/aclocal-deleted-header.sh [moved from t/acloca22.sh with 80% similarity, mode: 0644]
t/aclocal-deps-subdir.sh [moved from t/aclocal5.sh with 74% similarity, mode: 0644]
t/aclocal-deps.sh [moved from t/aclocal4.sh with 93% similarity, mode: 0644]
t/aclocal-dirlist-abspath.sh [moved from t/dirlist-abspath.sh with 86% similarity, mode: 0644]
t/aclocal-dirlist-globbing.sh [moved from t/dirlist2.sh with 82% similarity, mode: 0644]
t/aclocal-dirlist.sh [moved from t/dirlist.sh with 79% similarity, mode: 0644]
t/aclocal-install-absdir.sh [changed mode: 0755->0644]
t/aclocal-install-fail.sh [changed mode: 0755->0644]
t/aclocal-install-mkdir.sh [changed mode: 0755->0644]
t/aclocal-m4-include-are-scanned-aclocal-amflags.sh [moved from t/acloca14.sh with 85% similarity, mode: 0644]
t/aclocal-m4-include-are-scanned.sh [new file with mode: 0644]
t/aclocal-m4-sinclude.sh [moved from t/acloca13.sh with 82% similarity, mode: 0644]
t/aclocal-macrodir.tap [new file with mode: 0644]
t/aclocal-macrodirs.tap [new file with mode: 0644]
t/aclocal-missing-macros.sh [moved from t/aclocal3.sh with 89% similarity, mode: 0644]
t/aclocal-no-extra-scan.sh [moved from t/acloca16.sh with 87% similarity, mode: 0644]
t/aclocal-no-force.sh [moved from t/aclocal7.sh with 63% similarity, mode: 0644]
t/aclocal-no-install-no-mkdir.sh [changed mode: 0755->0644]
t/aclocal-no-symlinked-overwrite.sh [moved from t/acloca20.sh with 93% similarity, mode: 0644]
t/aclocal-no-unused-required.sh [moved from t/aclocal8.sh with 84% similarity, mode: 0644]
t/aclocal-path-install-serial.sh [changed mode: 0755->0644]
t/aclocal-path-install.sh [changed mode: 0755->0644]
t/aclocal-path-nonexistent.sh [changed mode: 0755->0644]
t/aclocal-path-precedence.sh [changed mode: 0755->0644]
t/aclocal-path.sh [changed mode: 0755->0644]
t/aclocal-pr450.sh [moved from t/acloca19.sh with 80% similarity, mode: 0644]
t/aclocal-print-acdir.sh [changed mode: 0755->0644]
t/aclocal-remake-misc.sh [moved from t/aclocal6.sh with 94% similarity, mode: 0644]
t/aclocal-req.sh [moved from t/req.sh with 77% similarity, mode: 0644]
t/aclocal-scan-configure-ac-pr319.sh [moved from t/acloca15.sh with 85% similarity, mode: 0644]
t/aclocal-serial.sh [moved from t/acloca18.sh with 90% similarity, mode: 0644]
t/aclocal-underquoted-defun.sh [moved from t/acloca23.sh with 83% similarity, mode: 0644]
t/aclocal-verbose-install.sh [changed mode: 0755->0644]
t/aclocal.sh [changed mode: 0755->0644]
t/acsilent.sh [changed mode: 0755->0644]
t/acsubst.sh [changed mode: 0755->0644]
t/acsubst2.sh [changed mode: 0755->0644]
t/add-missing-install-sh.sh [moved from t/instsh.sh with 86% similarity, mode: 0644]
t/add-missing-multiple.sh [moved from t/reqd.sh with 94% similarity, mode: 0644]
t/add-missing.tap [changed mode: 0755->0644]
t/all.sh [changed mode: 0755->0644]
t/all2.sh [changed mode: 0755->0644]
t/alloca.sh [changed mode: 0755->0644]
t/alloca2.sh [changed mode: 0755->0644]
t/alpha.sh [changed mode: 0755->0644]
t/alpha2.sh [changed mode: 0755->0644]
t/am-config-header.sh [new file with mode: 0644]
t/am-default-source-ext.sh [moved from t/specflg10.sh with 96% similarity, mode: 0644]
t/am-include-only-one-generated-fragment.sh [moved from t/cygnus-requires-maintainer-mode.sh with 59% similarity, mode: 0644]
t/am-macro-not-found.sh [moved from t/ammissing.sh with 86% similarity, mode: 0644]
t/am-missing-prog.sh [new file with mode: 0644]
t/am-prog-cc-c-o.sh [new file with mode: 0644]
t/am-prog-cc-stdc.sh [new file with mode: 0644]
t/am-tests-environment.sh [changed mode: 0755->0644]
t/amassign.sh [changed mode: 0755->0644]
t/amhello-binpkg.sh [changed mode: 0755->0644]
t/amhello-cflags.sh [changed mode: 0755->0644]
t/amhello-cross-compile.sh [changed mode: 0755->0644]
t/aminit-moreargs-deprecation.sh [changed mode: 0755->0644]
t/aminit-trailing-dnl-comment-pr16841.sh [new file with mode: 0644]
t/amopt.sh [changed mode: 0755->0644]
t/amopts-location.sh [changed mode: 0755->0644]
t/amopts-variable-expansion.sh [changed mode: 0755->0644]
t/amsubst.sh [changed mode: 0755->0644]
t/ansi2knr-no-more.sh [changed mode: 0755->0644]
t/ar-lib-w.sh [changed mode: 0755->0644]
t/ar-lib.sh [changed mode: 0755->0644]
t/ar-lib2.sh [changed mode: 0755->0644]
t/ar-lib3.sh [changed mode: 0755->0644]
t/ar-lib4.sh [changed mode: 0755->0644]
t/ar-lib5a.sh [changed mode: 0755->0644]
t/ar-lib5b.sh [changed mode: 0755->0644]
t/ar-lib6a.sh [changed mode: 0755->0644]
t/ar-lib6b.sh [changed mode: 0755->0644]
t/ar-lib7.sh [changed mode: 0755->0644]
t/ar.sh [changed mode: 0755->0644]
t/ar2.sh [changed mode: 0755->0644]
t/ar3.sh [changed mode: 0755->0644]
t/ar4.sh [changed mode: 0755->0644]
t/ar5.sh [changed mode: 0755->0644]
t/asm.sh [changed mode: 0755->0644]
t/asm2.sh [changed mode: 0755->0644]
t/asm3.sh [changed mode: 0755->0644]
t/autodist-acconfig-no-subdir.sh [changed mode: 0755->0644]
t/autodist-acconfig.sh [changed mode: 0755->0644]
t/autodist-aclocal-m4.sh [changed mode: 0755->0644]
t/autodist-config-headers.sh [changed mode: 0755->0644]
t/autodist-configure-no-subdir.sh [changed mode: 0755->0644]
t/autodist-no-duplicate.sh [changed mode: 0755->0644]
t/autodist-stamp-vti.sh [changed mode: 0755->0644]
t/autodist-subdir.sh [changed mode: 0755->0644]
t/autodist.sh [changed mode: 0755->0644]
t/autohdr-subdir-pr12495.sh [new file with mode: 0644]
t/autohdr.sh [changed mode: 0755->0644]
t/autohdr3.sh [changed mode: 0755->0644]
t/autohdr4.sh [changed mode: 0755->0644]
t/autohdrdry.sh [changed mode: 0755->0644]
t/automake-cmdline.tap [changed mode: 0755->0644]
t/auxdir-autodetect.sh [changed mode: 0755->0644]
t/auxdir-cc-pr15981.sh [new file with mode: 0644]
t/auxdir-computed.tap [changed mode: 0755->0644]
t/auxdir-misplaced.sh [changed mode: 0755->0644]
t/auxdir-nonexistent.sh [changed mode: 0755->0644]
t/auxdir-pr15981.sh [new file with mode: 0644]
t/auxdir-pr19311.sh [moved from t/remake2.sh with 63% similarity, mode: 0644]
t/auxdir-unportable.tap [changed mode: 0755->0644]
t/auxdir.sh [changed mode: 0755->0644]
t/auxdir6.sh [changed mode: 0755->0644]
t/auxdir7.sh [changed mode: 0755->0644]
t/auxdir8.sh [changed mode: 0755->0644]
t/ax/am-test-lib.sh [moved from defs with 57% similarity]
t/ax/cc-no-c-o.in [moved from t/info.sh with 50% similarity, mode: 0644]
t/ax/deltree.pl [moved from t/fo.sh with 58% similarity, mode: 0644]
t/ax/depcomp.sh
t/ax/distcheck-hook-m4.am
t/ax/extract-testsuite-summary.pl
t/ax/is
t/ax/is_newest [new file with mode: 0755]
t/ax/plain-functions.sh [deleted file]
t/ax/runtest.in [new file with mode: 0644]
t/ax/shell-no-trail-bslash.in [new file with mode: 0644]
t/ax/tap-functions.sh
t/ax/tap-setup.sh
t/ax/tap-summary-aux.sh
t/ax/test-defs.in [moved from defs-static.in with 64% similarity]
t/ax/test-init.sh [moved from t/backsl.sh with 61% similarity, mode: 0644]
t/ax/test-lib.sh [new file with mode: 0644]
t/ax/testsuite-summary-checks.sh
t/ax/trivial-test-driver
t/backcompat-acout.sh [moved from t/backcompat4.sh with 95% similarity, mode: 0644]
t/backcompat.sh [changed mode: 0755->0644]
t/backcompat2.sh [changed mode: 0755->0644]
t/backcompat3.sh [changed mode: 0755->0644]
t/backcompat5.sh [deleted file]
t/backcompat6.sh [changed mode: 0755->0644]
t/backsl2.sh [deleted file]
t/backslash-before-trailing-whitespace.sh [moved from t/backsl4.sh with 94% similarity, mode: 0644]
t/backslash-issues.sh [moved from t/backsl3.sh with 62% similarity, mode: 0644]
t/badline.sh [changed mode: 0755->0644]
t/badopt.sh [changed mode: 0755->0644]
t/badprog.sh [changed mode: 0755->0644]
t/built-sources-check-w.sh [new file with mode: 0644]
t/built-sources-check.sh [moved from t/check3.sh with 67% similarity, mode: 0644]
t/built-sources-cond.sh [new file with mode: 0644]
t/built-sources-fork-bomb.sh [new file with mode: 0644]
t/built-sources-install.sh [new file with mode: 0644]
t/built-sources-subdir.sh [moved from t/subdirbuiltsources.sh with 72% similarity, mode: 0644]
t/built-sources.sh [new file with mode: 0644]
t/c-demo.sh [new file with mode: 0644]
t/candist.sh [changed mode: 0755->0644]
t/canon-name.sh [changed mode: 0755->0644]
t/canon.sh [changed mode: 0755->0644]
t/canon2.sh [changed mode: 0755->0644]
t/canon3.sh [changed mode: 0755->0644]
t/canon4.sh [changed mode: 0755->0644]
t/canon5.sh [changed mode: 0755->0644]
t/canon6.sh [changed mode: 0755->0644]
t/canon7.sh [changed mode: 0755->0644]
t/canon8.sh [changed mode: 0755->0644]
t/ccnoco-deps.sh [new file with mode: 0755]
t/ccnoco-lib.sh [new file with mode: 0755]
t/ccnoco-lt.sh [new file with mode: 0755]
t/ccnoco.sh [changed mode: 0755->0644]
t/ccnoco3.sh [changed mode: 0755->0644]
t/ccnoco4.sh [new file with mode: 0644]
t/check-concurrency-bug9245.sh [changed mode: 0755->0644]
t/check-exported-srcdir-w.sh [changed mode: 0755->0644]
t/check-exported-srcdir.sh [changed mode: 0755->0644]
t/check-fd-redirect-w.sh [changed mode: 0755->0644]
t/check-fd-redirect.sh [changed mode: 0755->0644]
t/check-no-test-driver.sh [changed mode: 0755->0644]
t/check-subst-prog-w.sh [changed mode: 0755->0644]
t/check-subst-prog.sh [changed mode: 0755->0644]
t/check-subst-w.sh [changed mode: 0755->0644]
t/check-subst.sh [changed mode: 0755->0644]
t/check-tests-in-builddir-w.sh [changed mode: 0755->0644]
t/check-tests-in-builddir.sh [changed mode: 0755->0644]
t/check-w.sh [changed mode: 0755->0644]
t/check.sh [changed mode: 0755->0644]
t/check10.sh [changed mode: 0755->0644]
t/check11-w.sh [changed mode: 0755->0644]
t/check11.sh [changed mode: 0755->0644]
t/check12-w.sh [changed mode: 0755->0644]
t/check12.sh [changed mode: 0755->0644]
t/check2-w.sh [changed mode: 0755->0644]
t/check2.sh [changed mode: 0755->0644]
t/check4-w.sh [changed mode: 0755->0644]
t/check4.sh [changed mode: 0755->0644]
t/check5-w.sh [changed mode: 0755->0644]
t/check5.sh [changed mode: 0755->0644]
t/check6-w.sh [changed mode: 0755->0644]
t/check6.sh [changed mode: 0755->0644]
t/check7-w.sh [changed mode: 0755->0644]
t/check7.sh [changed mode: 0755->0644]
t/check8-w.sh [changed mode: 0755->0644]
t/check8.sh [changed mode: 0755->0644]
t/checkall.sh [changed mode: 0755->0644]
t/clean.sh [changed mode: 0755->0644]
t/colneq.sh [changed mode: 0755->0644]
t/colneq2.sh [changed mode: 0755->0644]
t/colneq3.sh [changed mode: 0755->0644]
t/colon.sh [changed mode: 0755->0644]
t/colon2.sh [changed mode: 0755->0644]
t/colon3.sh [changed mode: 0755->0644]
t/colon4.sh [changed mode: 0755->0644]
t/colon5.sh [changed mode: 0755->0644]
t/colon6.sh [changed mode: 0755->0644]
t/colon7.sh [changed mode: 0755->0644]
t/color-tests-opt.sh [moved from t/version.sh with 64% similarity, mode: 0644]
t/color-tests-w.sh [moved from t/color-w.sh with 52% similarity, mode: 0644]
t/color-tests.sh [moved from t/color.sh with 79% similarity, mode: 0644]
t/color-tests2-w.sh [moved from t/check3-w.sh with 51% similarity, mode: 0644]
t/color-tests2.sh [moved from t/color2.sh with 78% similarity, mode: 0644]
t/color2-w.sh [deleted file]
t/commen10.sh [changed mode: 0755->0644]
t/commen11.sh [changed mode: 0755->0644]
t/comment-block.sh [moved from t/block.sh with 84% similarity, mode: 0644]
t/comment.sh [changed mode: 0755->0644]
t/comment2.sh [changed mode: 0755->0644]
t/comment3.sh [changed mode: 0755->0644]
t/comment4.sh [changed mode: 0755->0644]
t/comment5.sh [changed mode: 0755->0644]
t/comment6.sh [changed mode: 0755->0644]
t/comment7.sh [changed mode: 0755->0644]
t/comment8.sh [changed mode: 0755->0644]
t/comment9.sh [changed mode: 0755->0644]
t/comments-in-var-def.sh [changed mode: 0755->0644]
t/compile-w.sh [changed mode: 0755->0644]
t/compile.sh [changed mode: 0755->0644]
t/compile2-w.sh [changed mode: 0755->0644]
t/compile2.sh [changed mode: 0755->0644]
t/compile3-w.sh [changed mode: 0755->0644]
t/compile3.sh [changed mode: 0755->0644]
t/compile4-w.sh [changed mode: 0755->0644]
t/compile4.sh [changed mode: 0755->0644]
t/compile5-w.sh [changed mode: 0755->0644]
t/compile5.sh [changed mode: 0755->0644]
t/compile6-w.sh [changed mode: 0755->0644]
t/compile6.sh [changed mode: 0755->0644]
t/compile7-w.sh [moved from t/instsh3-w.sh with 53% similarity, mode: 0644]
t/compile7.sh [new file with mode: 0644]
t/compile_f90_c_cxx.sh [changed mode: 0755->0644]
t/compile_f_c_cxx.sh [changed mode: 0755->0644]
t/cond-basic.sh [changed mode: 0755->0644]
t/cond.sh [changed mode: 0755->0644]
t/cond10.sh [changed mode: 0755->0644]
t/cond11.sh [changed mode: 0755->0644]
t/cond13.sh [changed mode: 0755->0644]
t/cond14.sh [changed mode: 0755->0644]
t/cond15.sh [changed mode: 0755->0644]
t/cond16.sh [changed mode: 0755->0644]
t/cond17.sh [changed mode: 0755->0644]
t/cond18.sh [changed mode: 0755->0644]
t/cond19.sh [changed mode: 0755->0644]
t/cond20.sh [changed mode: 0755->0644]
t/cond21.sh [changed mode: 0755->0644]
t/cond22.sh [changed mode: 0755->0644]
t/cond23.sh [changed mode: 0755->0644]
t/cond24.sh [changed mode: 0755->0644]
t/cond25.sh [changed mode: 0755->0644]
t/cond26.sh [changed mode: 0755->0644]
t/cond27.sh [changed mode: 0755->0644]
t/cond28.sh [changed mode: 0755->0644]
t/cond3.sh [changed mode: 0755->0644]
t/cond30.sh [changed mode: 0755->0644]
t/cond31.sh [changed mode: 0755->0644]
t/cond32.sh [changed mode: 0755->0644]
t/cond33.sh [changed mode: 0755->0644]
t/cond34.sh [changed mode: 0755->0644]
t/cond35.sh [changed mode: 0755->0644]
t/cond36.sh [changed mode: 0755->0644]
t/cond37.sh [changed mode: 0755->0644]
t/cond38.sh [changed mode: 0755->0644]
t/cond39.sh [changed mode: 0755->0644]
t/cond4.sh [changed mode: 0755->0644]
t/cond40.sh [changed mode: 0755->0644]
t/cond41.sh [changed mode: 0755->0644]
t/cond42.sh [changed mode: 0755->0644]
t/cond43.sh [changed mode: 0755->0644]
t/cond44.sh [changed mode: 0755->0644]
t/cond45.sh [changed mode: 0755->0644]
t/cond46.sh [changed mode: 0755->0644]
t/cond5.sh [changed mode: 0755->0644]
t/cond6.sh [changed mode: 0755->0644]
t/cond7.sh [changed mode: 0755->0644]
t/cond8.sh [changed mode: 0755->0644]
t/cond9.sh [changed mode: 0755->0644]
t/condd.sh [changed mode: 0755->0644]
t/condhook.sh [changed mode: 0755->0644]
t/condhook2.sh [changed mode: 0755->0644]
t/condinc.sh [changed mode: 0755->0644]
t/condinc2.sh [changed mode: 0755->0644]
t/condlib.sh [changed mode: 0755->0644]
t/condman2.sh [changed mode: 0755->0644]
t/condman3.sh [changed mode: 0755->0644]
t/confdeps.sh [changed mode: 0755->0644]
t/conff.sh [changed mode: 0755->0644]
t/conff2.sh [changed mode: 0755->0644]
t/conffile-leading-dot.sh [changed mode: 0755->0644]
t/confh-subdir-clean.sh [moved from t/subdir6.sh with 85% similarity, mode: 0644]
t/confh.sh [changed mode: 0755->0644]
t/confh4.sh [changed mode: 0755->0644]
t/confh5.sh [changed mode: 0755->0644]
t/confh6.sh [changed mode: 0755->0644]
t/confh7.sh [changed mode: 0755->0644]
t/confh8.sh [changed mode: 0755->0644]
t/configure.sh [changed mode: 0755->0644]
t/confincl.sh [changed mode: 0755->0644]
t/conflnk.sh [changed mode: 0755->0644]
t/conflnk2.sh [changed mode: 0755->0644]
t/conflnk3.sh [changed mode: 0755->0644]
t/conflnk4.sh [changed mode: 0755->0644]
t/confsub.sh [changed mode: 0755->0644]
t/confvar.sh [changed mode: 0755->0644]
t/confvar2.sh [changed mode: 0755->0644]
t/copy.sh [changed mode: 0755->0644]
t/cscope.tap [changed mode: 0755->0644]
t/cscope2.sh [changed mode: 0755->0644]
t/cscope3.sh [changed mode: 0755->0644]
t/cxx-demo.sh [new file with mode: 0644]
t/cxx-lt-demo.sh [new file with mode: 0644]
t/cxx.sh [changed mode: 0755->0644]
t/cxx2.sh [changed mode: 0755->0644]
t/cxxcpp.sh [changed mode: 0755->0644]
t/cxxlibobj.sh [changed mode: 0755->0644]
t/cxxlink.sh [changed mode: 0755->0644]
t/cxxnoc.sh [changed mode: 0755->0644]
t/cxxo.sh [deleted file]
t/cygnus-dependency-tracking.sh [deleted file]
t/cygnus-imply-foreign.sh [deleted file]
t/cygnus-no-dist.sh [deleted file]
t/cygnus-no-installinfo.sh [deleted file]
t/cygnus-no-more.sh [moved from t/cygnus-deprecation.sh with 61% similarity, mode: 0644]
t/cygwin32.sh [changed mode: 0755->0644]
t/dash.sh [changed mode: 0755->0644]
t/defun.sh [changed mode: 0755->0644]
t/defun2.sh [changed mode: 0755->0644]
t/dejagnu-absolute-builddir.sh [changed mode: 0755->0644]
t/dejagnu-relative-srcdir.sh [changed mode: 0755->0644]
t/dejagnu-siteexp-append.sh [changed mode: 0755->0644]
t/dejagnu-siteexp-extend.sh [changed mode: 0755->0644]
t/dejagnu-siteexp-useredit.sh [changed mode: 0755->0644]
t/dejagnu.sh [changed mode: 0755->0644]
t/dejagnu2.sh [changed mode: 0755->0644]
t/dejagnu3.sh [changed mode: 0755->0644]
t/dejagnu4.sh [changed mode: 0755->0644]
t/dejagnu5.sh [changed mode: 0755->0644]
t/dejagnu6.sh [changed mode: 0755->0644]
t/dejagnu7.sh [changed mode: 0755->0644]
t/deleted-am.sh [changed mode: 0755->0644]
t/deleted-m4.sh [changed mode: 0755->0644]
t/depacl2.sh [changed mode: 0755->0644]
t/depcomp-auto.tap [changed mode: 0755->0644]
t/depcomp-cpp.tap [changed mode: 0755->0644]
t/depcomp-dashmstdout.tap [changed mode: 0755->0644]
t/depcomp-disabled.tap [changed mode: 0755->0644]
t/depcomp-gcc.tap [changed mode: 0755->0644]
t/depcomp-implicit-auxdir.sh [moved from t/subdir4.sh with 92% similarity, mode: 0644]
t/depcomp-lt-auto.tap [changed mode: 0755->0644]
t/depcomp-lt-cpp.tap [changed mode: 0755->0644]
t/depcomp-lt-dashmstdout.tap [changed mode: 0755->0644]
t/depcomp-lt-disabled.tap [changed mode: 0755->0644]
t/depcomp-lt-gcc.tap [changed mode: 0755->0644]
t/depcomp-lt-makedepend.tap [changed mode: 0755->0644]
t/depcomp-lt-msvcmsys.tap [changed mode: 0755->0644]
t/depcomp-lt-msvisualcpp.tap [changed mode: 0755->0644]
t/depcomp-makedepend.tap [changed mode: 0755->0644]
t/depcomp-msvcmsys.tap [changed mode: 0755->0644]
t/depcomp-msvisualcpp.tap [changed mode: 0755->0644]
t/depcomp.sh [changed mode: 0755->0644]
t/depcomp2.sh [changed mode: 0755->0644]
t/depcomp8a.sh [changed mode: 0755->0644]
t/depcomp8b.sh [changed mode: 0755->0644]
t/depdist.sh [changed mode: 0755->0644]
t/depend.sh [changed mode: 0755->0644]
t/depend3.sh [changed mode: 0755->0644]
t/depend4.sh [changed mode: 0755->0644]
t/depend5.sh [changed mode: 0755->0644]
t/depend6.sh [changed mode: 0755->0644]
t/deprecated-acinit.sh [changed mode: 0755->0644]
t/destdir.sh [changed mode: 0755->0644]
t/dir-named-obj-is-bad.sh [moved from t/subdir7.sh with 66% similarity, mode: 0644]
t/discover.sh [changed mode: 0755->0644]
t/dist-auxdir-many-subdirs.sh [changed mode: 0755->0644]
t/dist-auxfile-2.sh [changed mode: 0755->0644]
t/dist-auxfile.sh [changed mode: 0755->0644]
t/dist-formats.tap [changed mode: 0755->0644]
t/dist-included-parent-dir.sh [changed mode: 0755->0644]
t/dist-install-sh.sh [moved from t/insh2.sh with 93% similarity, mode: 0644]
t/dist-lzma.sh [moved from t/lzma.sh with 89% similarity, mode: 0644]
t/dist-missing-am.sh [changed mode: 0755->0644]
t/dist-missing-included-m4.sh [changed mode: 0755->0644]
t/dist-missing-m4.sh [changed mode: 0755->0644]
t/dist-pr109765.sh [changed mode: 0755->0644]
t/dist-readonly.sh [changed mode: 0755->0644]
t/dist-repeated.sh [changed mode: 0755->0644]
t/dist-shar.sh [new file with mode: 0644]
t/dist-tarZ.sh [new file with mode: 0644]
t/dist-with-unreadable-makefile-fails.sh [moved from t/install2.sh with 92% similarity, mode: 0644]
t/distcheck-configure-flags-am.sh [changed mode: 0755->0644]
t/distcheck-configure-flags-subpkg.sh [changed mode: 0755->0644]
t/distcheck-configure-flags.sh [changed mode: 0755->0644]
t/distcheck-hook.sh [changed mode: 0755->0644]
t/distcheck-hook2.sh [changed mode: 0755->0644]
t/distcheck-missing-m4.sh [changed mode: 0755->0644]
t/distcheck-no-prefix-or-srcdir-override.sh [new file with mode: 0644]
t/distcheck-outdated-m4.sh [changed mode: 0755->0644]
t/distcheck-override-infodir.sh [changed mode: 0755->0644]
t/distcheck-pr10470.sh [changed mode: 0755->0644]
t/distcheck-pr18286.sh [new file with mode: 0644]
t/distcheck-pr9579.sh [changed mode: 0755->0644]
t/distcheck-writable-srcdir.sh [changed mode: 0755->0644]
t/distcleancheck.sh [changed mode: 0755->0644]
t/distcom-subdir.sh [changed mode: 0755->0644]
t/distcom2.sh [changed mode: 0755->0644]
t/distcom3.sh [changed mode: 0755->0644]
t/distcom4.sh [changed mode: 0755->0644]
t/distcom5.sh [changed mode: 0755->0644]
t/distdir.sh [changed mode: 0755->0644]
t/disthook.sh [changed mode: 0755->0644]
t/distlinks.sh [changed mode: 0755->0644]
t/distlinksbrk.sh [changed mode: 0755->0644]
t/distname.sh [changed mode: 0755->0644]
t/dmalloc.sh [changed mode: 0755->0644]
t/doc-parsing-buglets-colneq-subst.sh [changed mode: 0755->0644]
t/doc-parsing-buglets-tabs.sh [changed mode: 0755->0644]
t/dollar.sh [changed mode: 0755->0644]
t/dollarvar.sh [changed mode: 0755->0644]
t/dollarvar2.sh [changed mode: 0755->0644]
t/double.sh [changed mode: 0755->0644]
t/dup2.sh [changed mode: 0755->0644]
t/else.sh [changed mode: 0755->0644]
t/empty-data-primary.sh [moved from t/empty.sh with 88% similarity, mode: 0644]
t/empty-sources-primary.tap [moved from t/empty4.sh with 58% similarity, mode: 0644]
t/empty2.sh [deleted file]
t/empty3.sh [deleted file]
t/exdir.sh [changed mode: 0755->0644]
t/exdir2.sh [changed mode: 0755->0644]
t/exdir3.sh [changed mode: 0755->0644]
t/exeext.sh [changed mode: 0755->0644]
t/exeext2.sh [changed mode: 0755->0644]
t/exeext3.sh [changed mode: 0755->0644]
t/exeext4-w.sh [changed mode: 0755->0644]
t/exeext4.sh [changed mode: 0755->0644]
t/ext.sh [changed mode: 0755->0644]
t/ext2.sh [changed mode: 0755->0644]
t/ext3.sh [changed mode: 0755->0644]
t/extra-data.sh [moved from t/txinfo6.sh with 66% similarity, mode: 0644]
t/extra-deps-lt.sh [moved from t/extradep2.sh with 81% similarity, mode: 0644]
t/extra-deps.sh [moved from t/extradep.sh with 83% similarity, mode: 0644]
t/extra-dist-dirs-and-subdirs.sh [moved from t/extra6.sh with 94% similarity, mode: 0644]
t/extra-dist-vpath-dir-merge.sh [moved from t/extra7.sh with 95% similarity, mode: 0644]
t/extra-dist-vpath-dir.sh [moved from t/extra5.sh with 92% similarity, mode: 0644]
t/extra-dist-wildcards-gnu.sh [moved from t/extra11.sh with 96% similarity, mode: 0644]
t/extra-dist-wildcards-vpath.sh [moved from t/extra12.sh with 94% similarity, mode: 0644]
t/extra-dist-wildcards.sh [moved from t/extra10.sh with 84% similarity, mode: 0644]
t/extra-portability.sh [changed mode: 0755->0644]
t/extra-portability2.sh [changed mode: 0755->0644]
t/extra-portability3.sh [changed mode: 0755->0644]
t/extra-programs-and-libs.sh [moved from t/extra9.sh with 92% similarity, mode: 0644]
t/extra-programs-empty.sh [changed mode: 0755->0644]
t/extra-programs-misc.sh [moved from t/extra8.sh with 92% similarity, mode: 0644]
t/extra-sources-no-spurious.sh [moved from t/extra2.sh with 79% similarity, mode: 0644]
t/extra-sources.sh [moved from t/exsource.sh with 90% similarity, mode: 0644]
t/extra.sh [changed mode: 0755->0644]
t/extra4.sh [deleted file]
t/f90only.sh [changed mode: 0755->0644]
t/flavor.sh [changed mode: 0755->0644]
t/flibs.sh [changed mode: 0755->0644]
t/fn99.sh [changed mode: 0755->0644]
t/fn99subdir.sh [changed mode: 0755->0644]
t/fnoc.sh [changed mode: 0755->0644]
t/fonly.sh [changed mode: 0755->0644]
t/forcemiss.sh [changed mode: 0755->0644]
t/forcemiss2.sh [changed mode: 0755->0644]
t/fort1.sh [changed mode: 0755->0644]
t/fort2.sh [changed mode: 0755->0644]
t/fort4.sh [changed mode: 0755->0644]
t/fort5.sh [changed mode: 0755->0644]
t/fortdep.sh [changed mode: 0755->0644]
t/gcj.sh [changed mode: 0755->0644]
t/gcj2.sh [changed mode: 0755->0644]
t/gcj3.sh [changed mode: 0755->0644]
t/gcj4.sh [changed mode: 0755->0644]
t/gcj5.sh [changed mode: 0755->0644]
t/gcj6.sh [changed mode: 0755->0644]
t/get-sysconf.sh [changed mode: 0755->0644]
t/gettext-basics.sh [new file with mode: 0644]
t/gettext-config-rpath.sh [new file with mode: 0644]
t/gettext-external-pr338.sh [moved from t/gettext2.sh with 87% similarity, mode: 0644]
t/gettext-intl-subdir.sh [moved from t/gettext3.sh with 94% similarity, mode: 0644]
t/gettext-macros.sh [changed mode: 0755->0644]
t/gettext-pr381.sh [moved from t/remake3.sh with 60% similarity, mode: 0644]
t/gettext.sh [deleted file]
t/gnits.sh [changed mode: 0755->0644]
t/gnits2.sh [changed mode: 0755->0644]
t/gnits3.sh [changed mode: 0755->0644]
t/gnumake.sh [changed mode: 0755->0644]
t/gnuwarn.sh [changed mode: 0755->0644]
t/gnuwarn2.sh [changed mode: 0755->0644]
t/hdr-vars-defined-once.sh [changed mode: 0755->0644]
t/header.sh [changed mode: 0755->0644]
t/help-depend.sh [changed mode: 0755->0644]
t/help-depend2.sh [changed mode: 0755->0644]
t/help-dmalloc.sh [changed mode: 0755->0644]
t/help-init.sh [changed mode: 0755->0644]
t/help-lispdir.sh [changed mode: 0755->0644]
t/help-python.sh [changed mode: 0755->0644]
t/help-silent.sh [changed mode: 0755->0644]
t/help-upc.sh [changed mode: 0755->0644]
t/help.sh [changed mode: 0755->0644]
t/help2.sh [changed mode: 0755->0644]
t/help3.sh [changed mode: 0755->0644]
t/help4.sh [changed mode: 0755->0644]
t/hfs.sh [changed mode: 0755->0644]
t/implicit.sh [changed mode: 0755->0644]
t/init.sh [changed mode: 0755->0644]
t/init2.sh [changed mode: 0755->0644]
t/install-info-dir.sh [changed mode: 0755->0644]
t/install-sh-option-C-w.sh [moved from t/missing-w.sh with 50% similarity, mode: 0644]
t/install-sh-option-C.sh [moved from t/instsh3.sh with 91% similarity, mode: 0644]
t/install-sh-unittests-w.sh [new file with mode: 0644]
t/install-sh-unittests.sh [moved from t/instsh2.sh with 51% similarity, mode: 0644]
t/installdir.sh [changed mode: 0755->0644]
t/instdat.sh [changed mode: 0755->0644]
t/instdat2.sh [changed mode: 0755->0644]
t/instdir-cond.sh [changed mode: 0755->0644]
t/instdir-cond2.sh [changed mode: 0755->0644]
t/instdir-java.sh [changed mode: 0755->0644]
t/instdir-lisp.sh [changed mode: 0755->0644]
t/instdir-ltlib.sh [changed mode: 0755->0644]
t/instdir-no-empty.sh [changed mode: 0755->0644]
t/instdir-prog.sh [changed mode: 0755->0644]
t/instdir-python.sh [changed mode: 0755->0644]
t/instdir-texi.sh [changed mode: 0755->0644]
t/instdir.sh [changed mode: 0755->0644]
t/instdir2.sh [changed mode: 0755->0644]
t/instexec.sh [changed mode: 0755->0644]
t/instfail-info.sh [changed mode: 0755->0644]
t/instfail-java.sh [changed mode: 0755->0644]
t/instfail-libtool.sh [changed mode: 0755->0644]
t/instfail.sh [changed mode: 0755->0644]
t/insthook.sh [changed mode: 0755->0644]
t/instman.sh [changed mode: 0755->0644]
t/instman2.sh [changed mode: 0755->0644]
t/instmany-mans.sh [changed mode: 0755->0644]
t/instmany-python.sh [changed mode: 0755->0644]
t/instmany.sh [changed mode: 0755->0644]
t/instsh2-w.sh [deleted file]
t/instspc.tap [changed mode: 0755->0644]
t/interp.sh [changed mode: 0755->0644]
t/interp2.sh [changed mode: 0755->0644]
t/java-check.sh [changed mode: 0755->0644]
t/java-clean.sh [changed mode: 0755->0644]
t/java-compile-install.sh [changed mode: 0755->0644]
t/java-compile-run-flat.sh [changed mode: 0755->0644]
t/java-compile-run-nested.sh [changed mode: 0755->0644]
t/java-empty-classpath.sh [changed mode: 0755->0644]
t/java-extra.sh [changed mode: 0755->0644]
t/java-mix.sh [changed mode: 0755->0644]
t/java-no-duplicate.sh [changed mode: 0755->0644]
t/java-nobase.sh [changed mode: 0755->0644]
t/java-noinst.sh [changed mode: 0755->0644]
t/java-rebuild.sh [changed mode: 0755->0644]
t/java-sources.sh [changed mode: 0755->0644]
t/java-uninstall.sh [changed mode: 0755->0644]
t/java.sh [changed mode: 0755->0644]
t/java2.sh [changed mode: 0755->0644]
t/java3.sh [changed mode: 0755->0644]
t/javadir-undefined.sh [changed mode: 0755->0644]
t/javaflags.sh [changed mode: 0755->0644]
t/javaprim.sh [changed mode: 0755->0644]
t/javasubst.sh [changed mode: 0755->0644]
t/ldadd.sh [changed mode: 0755->0644]
t/ldflags.sh [changed mode: 0755->0644]
t/lex-clean-cxx.sh [changed mode: 0755->0644]
t/lex-clean.sh [changed mode: 0755->0644]
t/lex-depend-cxx.sh [changed mode: 0755->0644]
t/lex-depend-grep.sh [changed mode: 0755->0644]
t/lex-depend.sh [changed mode: 0755->0644]
t/lex-header.sh [new file with mode: 0644]
t/lex-lib-external.sh [changed mode: 0755->0644]
t/lex-lib.sh [changed mode: 0755->0644]
t/lex-libobj.sh [changed mode: 0755->0644]
t/lex-line.sh [changed mode: 0755->0644]
t/lex-multiple.sh [new file with mode: 0644]
t/lex-nodist.sh [changed mode: 0755->0644]
t/lex-noyywrap.sh [changed mode: 0755->0644]
t/lex-pr204.sh [changed mode: 0755->0644]
t/lex-subobj-nodep.sh [changed mode: 0755->0644]
t/lex.sh [changed mode: 0755->0644]
t/lex2.sh [changed mode: 0755->0644]
t/lex3.sh [changed mode: 0755->0644]
t/lex5.sh [changed mode: 0755->0644]
t/lexcpp.sh [changed mode: 0755->0644]
t/lexvpath.sh [changed mode: 0755->0644]
t/lflags-cxx.sh [moved from t/lflags2.sh with 76% similarity, mode: 0644]
t/lflags.sh [changed mode: 0755->0644]
t/libexec.sh [changed mode: 0755->0644]
t/libobj-basic.sh [changed mode: 0755->0644]
t/libobj10.sh [changed mode: 0755->0644]
t/libobj12.sh [changed mode: 0755->0644]
t/libobj13.sh [changed mode: 0755->0644]
t/libobj14.sh [changed mode: 0755->0644]
t/libobj15a.sh [changed mode: 0755->0644]
t/libobj15b.sh [changed mode: 0755->0644]
t/libobj15c.sh [changed mode: 0755->0644]
t/libobj16a.sh [changed mode: 0755->0644]
t/libobj16b.sh [changed mode: 0755->0644]
t/libobj17.sh [changed mode: 0755->0644]
t/libobj18.sh [changed mode: 0755->0644]
t/libobj19.sh [changed mode: 0755->0644]
t/libobj2.sh [changed mode: 0755->0644]
t/libobj20a.sh [changed mode: 0755->0644]
t/libobj20b.sh [changed mode: 0755->0644]
t/libobj20c.sh [changed mode: 0755->0644]
t/libobj3.sh [changed mode: 0755->0644]
t/libobj4.sh [changed mode: 0755->0644]
t/libobj5.sh [changed mode: 0755->0644]
t/libobj7.sh [changed mode: 0755->0644]
t/library.sh [changed mode: 0755->0644]
t/library2.sh [changed mode: 0755->0644]
t/library3.sh [changed mode: 0755->0644]
t/libtoo10.sh [changed mode: 0755->0644]
t/libtoo11.sh [changed mode: 0755->0644]
t/libtool-macros.sh [changed mode: 0755->0644]
t/libtool.sh [changed mode: 0755->0644]
t/libtool2.sh [changed mode: 0755->0644]
t/libtool3.sh [changed mode: 0755->0644]
t/libtool4.sh [changed mode: 0755->0644]
t/libtool5.sh [changed mode: 0755->0644]
t/libtool6.sh [changed mode: 0755->0644]
t/libtool7.sh [changed mode: 0755->0644]
t/libtool8.sh [changed mode: 0755->0644]
t/libtool9.sh [changed mode: 0755->0644]
t/license.sh [changed mode: 0755->0644]
t/license2.sh [changed mode: 0755->0644]
t/link_c_cxx.sh [changed mode: 0755->0644]
t/link_cond.sh [changed mode: 0755->0644]
t/link_dist.sh [changed mode: 0755->0644]
t/link_f90_only.sh [changed mode: 0755->0644]
t/link_f_only.sh [changed mode: 0755->0644]
t/link_fc.sh [changed mode: 0755->0644]
t/link_fccxx.sh [changed mode: 0755->0644]
t/link_fcxx.sh [changed mode: 0755->0644]
t/link_override.sh [changed mode: 0755->0644]
t/lisp-flags.sh [moved from t/python7.sh with 62% similarity, mode: 0644]
t/lisp-loadpath.sh [new file with mode: 0644]
t/lisp-pr11806.sh [moved from t/specflg3.sh with 63% similarity, mode: 0644]
t/lisp-subdir-mix.sh [new file with mode: 0644]
t/lisp-subdir.sh [new file with mode: 0644]
t/lisp-subdir2.sh [new file with mode: 0644]
t/lisp2.sh [changed mode: 0755->0644]
t/lisp3.sh [changed mode: 0755->0644]
t/lisp4.sh [changed mode: 0755->0644]
t/lisp5.sh [changed mode: 0755->0644]
t/lisp6.sh [changed mode: 0755->0644]
t/lisp7.sh [changed mode: 0755->0644]
t/lisp8.sh [changed mode: 0755->0644]
t/lispdry.sh [changed mode: 0755->0644]
t/list-of-tests.mk
t/listval.sh [changed mode: 0755->0644]
t/location.sh [changed mode: 0755->0644]
t/longlin2.sh [changed mode: 0755->0644]
t/longline.sh [changed mode: 0755->0644]
t/ltcond.sh [changed mode: 0755->0644]
t/ltcond2.sh [changed mode: 0755->0644]
t/ltconv.sh [changed mode: 0755->0644]
t/ltdeps.sh [changed mode: 0755->0644]
t/ltinit.sh [changed mode: 0755->0644]
t/ltinstloc.sh [changed mode: 0755->0644]
t/ltlibobjs.sh [changed mode: 0755->0644]
t/ltlibsrc.sh [changed mode: 0755->0644]
t/ltorder.sh [changed mode: 0755->0644]
t/m4-inclusion.sh [changed mode: 0755->0644]
t/maintclean-vpath.sh [changed mode: 0755->0644]
t/maintclean.sh [changed mode: 0755->0644]
t/maintmode-configure-msg.sh [changed mode: 0755->0644]
t/make-dryrun.tap [changed mode: 0755->0644]
t/make-is-gnu.sh [new file with mode: 0644]
t/make-keepgoing.tap [new file with mode: 0644]
t/make.sh [changed mode: 0755->0644]
t/makefile-deps.sh [changed mode: 0755->0644]
t/makej.sh [changed mode: 0755->0644]
t/makej2.sh [changed mode: 0755->0644]
t/maken.sh [changed mode: 0755->0644]
t/maken3-w.sh [changed mode: 0755->0644]
t/maken3.sh [changed mode: 0755->0644]
t/makevars.sh [changed mode: 0755->0644]
t/man.sh [changed mode: 0755->0644]
t/man2.sh [changed mode: 0755->0644]
t/man3.sh [changed mode: 0755->0644]
t/man4.sh [deleted file]
t/man5.sh [changed mode: 0755->0644]
t/man6.sh [changed mode: 0755->0644]
t/man7.sh [changed mode: 0755->0644]
t/man8.sh [changed mode: 0755->0644]
t/mdate.sh [changed mode: 0755->0644]
t/mdate2.sh [changed mode: 0755->0644]
t/mdate3.sh [changed mode: 0755->0644]
t/mdate4.sh [changed mode: 0755->0644]
t/mdate5-w.sh [changed mode: 0755->0644]
t/mdate5.sh [changed mode: 0755->0644]
t/mdate6-w.sh [changed mode: 0755->0644]
t/mdate6.sh [changed mode: 0755->0644]
t/missing-auxfile-stops-makefiles-creation.sh [changed mode: 0755->0644]
t/missing-version-mismatch-w.sh [new file with mode: 0644]
t/missing-version-mismatch.sh [new file with mode: 0644]
t/missing.sh [deleted file]
t/missing2-w.sh [deleted file]
t/missing2.sh [deleted file]
t/missing3-w.sh [changed mode: 0755->0644]
t/missing3.sh [changed mode: 0755->0644]
t/missing5-w.sh [deleted file]
t/missing5.sh [deleted file]
t/mkdir_p.sh [moved from t/clean2.sh with 62% similarity, mode: 0644]
t/mkdirp-deprecation.sh [changed mode: 0755->0644]
t/mkinst2.sh [changed mode: 0755->0644]
t/mkinst3-w.sh [changed mode: 0755->0644]
t/mkinst3.sh [changed mode: 0755->0644]
t/mkinstall.sh [changed mode: 0755->0644]
t/mmode.sh [changed mode: 0755->0644]
t/mmodely.sh [changed mode: 0755->0644]
t/no-extra-c-stuff.sh [new file with mode: 0644]
t/no-extra-makefile-code.sh [changed mode: 0755->0644]
t/no-outdir-option.sh [deleted file]
t/no-spurious-install-recursive.sh [moved from t/bsource.sh with 87% similarity, mode: 0644]
t/nobase-libtool.sh [changed mode: 0755->0644]
t/nobase-nodist.sh [changed mode: 0755->0644]
t/nobase-python.sh [changed mode: 0755->0644]
t/nobase.sh [changed mode: 0755->0644]
t/nodef.sh [changed mode: 0755->0644]
t/nodef2.sh [changed mode: 0755->0644]
t/nodep.sh [changed mode: 0755->0644]
t/nodep2.sh [changed mode: 0755->0644]
t/nodepcomp.sh [changed mode: 0755->0644]
t/nodist.sh [changed mode: 0755->0644]
t/nodist2.sh [changed mode: 0755->0644]
t/nodist3.sh [changed mode: 0755->0644]
t/noinst.sh [changed mode: 0755->0644]
t/noinstdir.sh [changed mode: 0755->0644]
t/nolink.sh [changed mode: 0755->0644]
t/nostdinc.sh [changed mode: 0755->0644]
t/notrans.sh [changed mode: 0755->0644]
t/number.sh [changed mode: 0755->0644]
t/objc-basic.sh [changed mode: 0755->0644]
t/objc-deps.sh [changed mode: 0755->0644]
t/objc-flags.sh [changed mode: 0755->0644]
t/objc-megademo.sh [changed mode: 0755->0644]
t/objc-minidemo.sh [changed mode: 0755->0644]
t/objcxx-basic.sh [changed mode: 0755->0644]
t/objcxx-deps.sh [changed mode: 0755->0644]
t/objcxx-flags.sh [changed mode: 0755->0644]
t/objcxx-minidemo.sh [changed mode: 0755->0644]
t/objext-pr10128.sh [changed mode: 0755->0644]
t/obsolete.sh [deleted file]
t/oldvars.sh [changed mode: 0755->0644]
t/order.sh [changed mode: 0755->0644]
t/output-order.sh [changed mode: 0755->0644]
t/output.sh [changed mode: 0755->0644]
t/output10.sh [changed mode: 0755->0644]
t/output11.sh [changed mode: 0755->0644]
t/output12.sh [changed mode: 0755->0644]
t/output13.sh [changed mode: 0755->0644]
t/output2.sh [changed mode: 0755->0644]
t/output3.sh [changed mode: 0755->0644]
t/output4.sh [changed mode: 0755->0644]
t/output5.sh [changed mode: 0755->0644]
t/output6.sh [changed mode: 0755->0644]
t/output7.sh [changed mode: 0755->0644]
t/output8.sh [changed mode: 0755->0644]
t/output9.sh [changed mode: 0755->0644]
t/override-conditional-1.sh [changed mode: 0755->0644]
t/override-conditional-2.sh [changed mode: 0755->0644]
t/override-conditional-pr13940.sh [new file with mode: 0644]
t/override-html.sh [changed mode: 0755->0644]
t/override-suggest-local.sh [changed mode: 0755->0644]
t/parallel-am.sh [changed mode: 0755->0644]
t/parallel-am2.sh [changed mode: 0755->0644]
t/parallel-am3.sh [changed mode: 0755->0644]
t/parallel-tests-basics.sh [moved from t/parallel-tests.sh with 71% similarity, mode: 0644]
t/parallel-tests-cmdline-override.sh [changed mode: 0755->0644]
t/parallel-tests-concurrency-2.sh [moved from t/parallel-tests5.sh with 95% similarity, mode: 0644]
t/parallel-tests-concurrency.sh [moved from t/parallel-tests3.sh with 82% similarity, mode: 0644]
t/parallel-tests-console-output.sh [changed mode: 0755->0644]
t/parallel-tests-driver-install.sh [changed mode: 0755->0644]
t/parallel-tests-dry-run-1.sh [changed mode: 0755->0644]
t/parallel-tests-dry-run-2.sh [changed mode: 0755->0644]
t/parallel-tests-empty-testlogs.sh [changed mode: 0755->0644]
t/parallel-tests-empty.sh [moved from t/parallel-tests6.sh with 83% similarity, mode: 0644]
t/parallel-tests-exeext.sh [changed mode: 0755->0644]
t/parallel-tests-exit-status-reported.sh [new file with mode: 0644]
t/parallel-tests-exit-statuses.sh [changed mode: 0755->0644]
t/parallel-tests-extra-programs.sh [changed mode: 0755->0644]
t/parallel-tests-fd-redirect-exeext.sh [changed mode: 0755->0644]
t/parallel-tests-fd-redirect.sh [changed mode: 0755->0644]
t/parallel-tests-fork-bomb.sh [changed mode: 0755->0644]
t/parallel-tests-generated-and-distributed.sh [moved from t/parallel-tests8.sh with 94% similarity, mode: 0644]
t/parallel-tests-harderror.sh [changed mode: 0755->0644]
t/parallel-tests-interrupt.tap [changed mode: 0755->0644]
t/parallel-tests-log-compiler-1.sh [changed mode: 0755->0644]
t/parallel-tests-log-compiler-2.sh [changed mode: 0755->0644]
t/parallel-tests-log-compiler-example.sh [changed mode: 0755->0644]
t/parallel-tests-log-override-1.sh [changed mode: 0755->0644]
t/parallel-tests-log-override-2.sh [changed mode: 0755->0644]
t/parallel-tests-log-override-recheck.sh [changed mode: 0755->0644]
t/parallel-tests-many.sh [deleted file]
t/parallel-tests-no-color-in-log.sh [changed mode: 0755->0644]
t/parallel-tests-no-spurious-summary.sh [changed mode: 0755->0644]
t/parallel-tests-once.sh [changed mode: 0755->0644]
t/parallel-tests-recheck-depends-on-all.sh [changed mode: 0755->0644]
t/parallel-tests-recheck-pr11791.sh [new file with mode: 0644]
t/parallel-tests-recheck.sh [moved from t/parallel-tests9.sh with 73% similarity, mode: 0644]
t/parallel-tests-reset-term.sh [changed mode: 0755->0644]
t/parallel-tests-subdir.sh [changed mode: 0755->0644]
t/parallel-tests-suffix-prog.sh [changed mode: 0755->0644]
t/parallel-tests-suffix.sh [changed mode: 0755->0644]
t/parallel-tests-trailing-bslash.sh [deleted file]
t/parallel-tests-trailing-whitespace.sh [moved from t/parallel-tests10.sh with 92% similarity, mode: 0644]
t/parallel-tests-unreadable.sh [changed mode: 0755->0644]
t/parse.sh [changed mode: 0755->0644]
t/per-target-flags.sh [new file with mode: 0644]
t/percent.sh [changed mode: 0755->0644]
t/percent2.sh [changed mode: 0755->0644]
t/perf/cond.sh
t/perf/testsuite-recheck.sh
t/perf/testsuite-summary.sh
t/phony.sh [changed mode: 0755->0644]
t/pkg-config-macros.sh [new file with mode: 0644]
t/pluseq.sh [changed mode: 0755->0644]
t/pluseq10.sh [changed mode: 0755->0644]
t/pluseq11.sh [changed mode: 0755->0644]
t/pluseq2.sh [changed mode: 0755->0644]
t/pluseq3.sh [changed mode: 0755->0644]
t/pluseq4.sh [changed mode: 0755->0644]
t/pluseq5.sh [changed mode: 0755->0644]
t/pluseq6.sh [changed mode: 0755->0644]
t/pluseq7.sh [changed mode: 0755->0644]
t/pluseq8.sh [changed mode: 0755->0644]
t/pluseq9.sh [changed mode: 0755->0644]
t/pm/Cond2.pl
t/pm/Cond3.pl
t/pm/Condition-t.pl
t/pm/Condition.pl
t/pm/DisjCon2.pl
t/pm/DisjCon3.pl
t/pm/DisjConditions-t.pl
t/pm/DisjConditions.pl
t/pm/Version.pl
t/pm/Version2.pl
t/pm/Version3.pl
t/pm/Wrap.pl
t/posixsubst-data.sh [changed mode: 0755->0644]
t/posixsubst-extradist.sh [changed mode: 0755->0644]
t/posixsubst-ldadd.sh [changed mode: 0755->0644]
t/posixsubst-libraries.sh [changed mode: 0755->0644]
t/posixsubst-ltlibraries.sh [changed mode: 0755->0644]
t/posixsubst-programs.sh [changed mode: 0755->0644]
t/posixsubst-scripts.sh [changed mode: 0755->0644]
t/posixsubst-sources.sh [changed mode: 0755->0644]
t/posixsubst-tests-w.sh [changed mode: 0755->0644]
t/posixsubst-tests.sh [changed mode: 0755->0644]
t/postproc.sh [changed mode: 0755->0644]
t/ppf77.sh [changed mode: 0755->0644]
t/pr2.sh [changed mode: 0755->0644]
t/pr211.sh [changed mode: 0755->0644]
t/pr220.sh [changed mode: 0755->0644]
t/pr224.sh [changed mode: 0755->0644]
t/pr229.sh [changed mode: 0755->0644]
t/pr243.sh [changed mode: 0755->0644]
t/pr266.sh [changed mode: 0755->0644]
t/pr279-2.sh [changed mode: 0755->0644]
t/pr279.sh [changed mode: 0755->0644]
t/pr287.sh [changed mode: 0755->0644]
t/pr300-lib.sh [changed mode: 0755->0644]
t/pr300-ltlib.sh [changed mode: 0755->0644]
t/pr300-prog.sh [changed mode: 0755->0644]
t/pr307.sh [changed mode: 0755->0644]
t/pr401.sh [changed mode: 0755->0644]
t/pr401b.sh [changed mode: 0755->0644]
t/pr401c.sh [changed mode: 0755->0644]
t/pr72.sh [changed mode: 0755->0644]
t/pr87.sh [changed mode: 0755->0644]
t/pr9.sh [changed mode: 0755->0644]
t/precious.sh [moved from t/autohdr2.sh with 65% similarity, mode: 0644]
t/prefix.sh [changed mode: 0755->0644]
t/preproc-basics.sh [new file with mode: 0644]
t/preproc-c-compile.sh [new file with mode: 0644]
t/preproc-demo.sh [new file with mode: 0644]
t/preproc-errmsg.sh [new file with mode: 0644]
t/primary-prefix-couples-documented-valid.sh [changed mode: 0755->0644]
t/primary-prefix-couples-force-valid.sh [changed mode: 0755->0644]
t/primary-prefix-invalid-couples.tap [changed mode: 0755->0644]
t/primary-prefix-valid-couples.sh [changed mode: 0755->0644]
t/primary.sh [changed mode: 0755->0644]
t/primary2.sh [changed mode: 0755->0644]
t/primary3.sh [changed mode: 0755->0644]
t/print-libdir.sh [changed mode: 0755->0644]
t/proginst.sh [changed mode: 0755->0644]
t/programs-primary-rewritten.sh [changed mode: 0755->0644]
t/py-compile-basedir.sh [changed mode: 0755->0644]
t/py-compile-basic.sh [changed mode: 0755->0644]
t/py-compile-basic2.sh [deleted file]
t/py-compile-destdir.sh [changed mode: 0755->0644]
t/py-compile-env.sh [changed mode: 0755->0644]
t/py-compile-option-terminate.sh [changed mode: 0755->0644]
t/py-compile-usage.sh [changed mode: 0755->0644]
t/python-am-path-iftrue.sh [moved from t/python8.sh with 59% similarity, mode: 0644]
t/python-dist.sh [changed mode: 0755->0644]
t/python-missing.sh [new file with mode: 0644]
t/python-pr10995.sh [changed mode: 0755->0644]
t/python-too-old.sh [moved from t/python5b.sh with 58% similarity, mode: 0644]
t/python-vars.sh [changed mode: 0755->0644]
t/python-virtualenv.sh [changed mode: 0755->0644]
t/python.sh [changed mode: 0755->0644]
t/python10.sh [changed mode: 0755->0644]
t/python11.sh [changed mode: 0755->0644]
t/python12.sh [changed mode: 0755->0644]
t/python2.sh [changed mode: 0755->0644]
t/python3.sh [changed mode: 0755->0644]
t/python4.sh [deleted file]
t/python5.sh [deleted file]
t/python6.sh [deleted file]
t/python9.sh [deleted file]
t/recurs-user-deeply-nested.sh [new file with mode: 0644]
t/recurs-user-indir.sh [new file with mode: 0644]
t/recurs-user-keep-going.sh [new file with mode: 0644]
t/recurs-user-many.sh [new file with mode: 0644]
t/recurs-user-no-subdirs.sh [new file with mode: 0644]
t/recurs-user-no-top-level.sh [moved from t/cygnus-check-without-all.sh with 60% similarity, mode: 0644]
t/recurs-user-override.sh [new file with mode: 0644]
t/recurs-user-phony.sh [new file with mode: 0644]
t/recurs-user-wrap.sh [new file with mode: 0644]
t/recurs-user.sh [new file with mode: 0644]
t/recurs-user2.sh [new file with mode: 0644]
t/relativize.tap [changed mode: 0755->0644]
t/remake-aclocal-version-mismatch.sh [moved from t/missing4.sh with 74% similarity, mode: 0644]
t/remake-after-acinclude-m4.sh [moved from t/remake9c.sh with 87% similarity, mode: 0644]
t/remake-after-aclocal-m4.sh [moved from t/remake9d.sh with 87% similarity, mode: 0644]
t/remake-after-configure-ac.sh [moved from t/remake9a.sh with 86% similarity, mode: 0644]
t/remake-after-makefile-am.sh [moved from t/remake9b.sh with 87% similarity, mode: 0644]
t/remake-all-1.sh [changed mode: 0755->0644]
t/remake-all-2.sh [changed mode: 0755->0644]
t/remake-am-pr10111.sh [changed mode: 0755->0644]
t/remake-config-status-dependencies.sh [new file with mode: 0644]
t/remake-configure-dependencies.sh [new file with mode: 0644]
t/remake-deeply-nested.sh [moved from t/remake11.sh with 79% similarity, mode: 0644]
t/remake-deleted-am-2.sh [changed mode: 0755->0644]
t/remake-deleted-am-subdir.sh [changed mode: 0755->0644]
t/remake-deleted-am.sh [changed mode: 0755->0644]
t/remake-deleted-m4-file.sh [changed mode: 0755->0644]
t/remake-fail.sh [moved from t/remake7.sh with 87% similarity, mode: 0644]
t/remake-gnulib-add-acsubst.sh [changed mode: 0755->0644]
t/remake-gnulib-add-header.sh [changed mode: 0755->0644]
t/remake-gnulib-remove-header.sh [changed mode: 0755->0644]
t/remake-include-aclocal.sh [moved from t/remake10c.sh with 80% similarity, mode: 0644]
t/remake-include-configure.sh [moved from t/remake10a.sh with 81% similarity, mode: 0644]
t/remake-include-makefile.sh [moved from t/remake10b.sh with 80% similarity, mode: 0644]
t/remake-m4-pr10111.sh [changed mode: 0755->0644]
t/remake-macrodir.sh [new file with mode: 0644]
t/remake-maintainer-mode.sh [moved from t/remake5.sh with 93% similarity, mode: 0644]
t/remake-makefile-intree.sh [moved from t/remake8a.sh with 85% similarity, mode: 0644]
t/remake-makefile-vpath.sh [moved from t/remake8b.sh with 85% similarity, mode: 0644]
t/remake-mild-stress.sh [moved from t/remake12.sh with 94% similarity, mode: 0644]
t/remake-moved-m4-file.sh [changed mode: 0755->0644]
t/remake-not-after-make-dist.sh [moved from t/remake4.sh with 94% similarity, mode: 0644]
t/remake-recurs-user.sh [new file with mode: 0644]
t/remake-renamed-am.sh [changed mode: 0755->0644]
t/remake-renamed-m4-file.sh [changed mode: 0755->0644]
t/remake-renamed-m4-macro-and-file.sh [changed mode: 0755->0644]
t/remake-renamed-m4-macro.sh [changed mode: 0755->0644]
t/remake-subdir-from-subdir.sh [changed mode: 0755->0644]
t/remake-subdir-gnu.sh [changed mode: 0755->0644]
t/remake-subdir-grepping.sh [moved from t/remake.sh with 83% similarity, mode: 0644]
t/remake-subdir-long-time.sh [changed mode: 0755->0644]
t/remake-subdir-no-makefile.sh [moved from t/remake3a.sh with 92% similarity, mode: 0644]
t/remake-subdir-only.sh [moved from t/remake1a.sh with 89% similarity, mode: 0644]
t/remake-subdir.sh [changed mode: 0755->0644]
t/remake-subdir2.sh [changed mode: 0755->0644]
t/remake-subdir3.sh [moved from t/remake6.sh with 73% similarity, mode: 0644]
t/remake-timing-bug-pr8365.sh [moved from t/pr8365-remake-timing.sh with 96% similarity, mode: 0644]
t/repeated-options.sh [changed mode: 0755->0644]
t/reqd2.sh [changed mode: 0755->0644]
t/rm-f-probe.sh [new file with mode: 0644]
t/rulepat.sh [changed mode: 0755->0644]
t/sanity.sh [changed mode: 0755->0644]
t/scripts.sh [deleted file]
t/seenc.sh [changed mode: 0755->0644]
t/self-check-cc-no-c-o.sh [moved from t/acloca17.sh with 54% similarity, mode: 0644]
t/self-check-cleanup.tap [deleted file]
t/self-check-configure-help.sh [changed mode: 0755->0644]
t/self-check-dir.tap [changed mode: 0755->0644]
t/self-check-env-sanitize.tap [deleted file]
t/self-check-exit.tap [changed mode: 0755->0644]
t/self-check-explicit-skips.sh [changed mode: 0755->0644]
t/self-check-is-blocked-signal.tap [changed mode: 0755->0644]
t/self-check-is_newest.tap [changed mode: 0755->0644]
t/self-check-me.tap [changed mode: 0755->0644]
t/self-check-reexec.tap [deleted file]
t/self-check-report.sh [changed mode: 0755->0644]
t/self-check-sanity.sh [deleted file]
t/self-check-seq.tap [changed mode: 0755->0644]
t/self-check-shell-no-trail-bslash.sh [new file with mode: 0644]
t/self-check-tap.sh [deleted file]
t/self-check-unindent.tap [changed mode: 0755->0644]
t/serial-tests.sh [changed mode: 0755->0644]
t/silent-amopts.sh [deleted file]
t/silent-c.sh [moved from t/silent.sh with 60% similarity, mode: 0644]
t/silent-configsite.sh [changed mode: 0755->0644]
t/silent-custom.sh [new file with mode: 0644]
t/silent-cxx.sh [moved from t/silentcxx.sh with 81% similarity, mode: 0644]
t/silent-f77.sh [moved from t/silentf77.sh with 81% similarity, mode: 0644]
t/silent-f90.sh [moved from t/silentf90.sh with 81% similarity, mode: 0644]
t/silent-gen.sh [moved from t/silent7.sh with 55% similarity, mode: 0644]
t/silent-lex.sh [changed mode: 0755->0644]
t/silent-lt.sh [moved from t/silent3.sh with 60% similarity, mode: 0644]
t/silent-many-gcc.sh [deleted file]
t/silent-many-languages.sh [moved from t/silent-many-generic.sh with 84% similarity, mode: 0644]
t/silent-nested-vars.sh [changed mode: 0755->0644]
t/silent-nowarn.sh [deleted file]
t/silent-texi.sh [new file with mode: 0644]
t/silent-yacc-headers.sh [changed mode: 0755->0644]
t/silent-yacc.sh [changed mode: 0755->0644]
t/silent2.sh [deleted file]
t/silent4.sh [deleted file]
t/silent6.sh [deleted file]
t/silent8.sh [deleted file]
t/silent9.sh [deleted file]
t/silentcxx-gcc.sh [deleted file]
t/sourcefile-in-subdir.sh [moved from t/subdir3.sh with 90% similarity, mode: 0644]
t/space.sh [changed mode: 0755->0644]
t/specflg-dummy.sh [changed mode: 0755->0644]
t/specflg2.sh [deleted file]
t/specflg6.sh [changed mode: 0755->0644]
t/specflg7.sh [changed mode: 0755->0644]
t/specflg8.sh [changed mode: 0755->0644]
t/specflg9.sh [changed mode: 0755->0644]
t/spell.sh [changed mode: 0755->0644]
t/spell2.sh [changed mode: 0755->0644]
t/spell3.sh [changed mode: 0755->0644]
t/spelling.sh [changed mode: 0755->0644]
t/spy-double-colon.sh [moved from t/spy.sh with 95% similarity, mode: 0644]
t/spy-rm.tap [changed mode: 0755->0644]
t/src-acsubst.sh [moved from t/srcsub2.sh with 53% similarity, mode: 0644]
t/srcsub.sh [deleted file]
t/stamph2.sh [changed mode: 0755->0644]
t/stdinc.sh [changed mode: 0755->0644]
t/stdlib.sh [changed mode: 0755->0644]
t/stdlib2.sh [changed mode: 0755->0644]
t/strictness-override.sh [changed mode: 0755->0644]
t/strictness-precedence.sh [changed mode: 0755->0644]
t/strip.sh [changed mode: 0755->0644]
t/strip2.sh [changed mode: 0755->0644]
t/strip3.sh [changed mode: 0755->0644]
t/subdir-ac-subst.sh [moved from t/subcond3.sh with 83% similarity, mode: 0644]
t/subdir-add-pr46.sh [moved from t/subdir5.sh with 86% similarity, mode: 0644]
t/subdir-add2-pr46.sh [moved from t/subdir8.sh with 71% similarity, mode: 0644]
t/subdir-am-cond.sh [moved from t/subcond2.sh with 84% similarity, mode: 0644]
t/subdir-cond-err.sh [moved from t/cond2.sh with 92% similarity, mode: 0644]
t/subdir-cond-gettext.sh [moved from t/subcond.sh with 87% similarity, mode: 0644]
t/subdir-distclean.sh [new file with mode: 0644]
t/subdir-env-interference.sh [moved from t/subdir10.sh with 92% similarity, mode: 0644]
t/subdir-keep-going-pr12554.sh [new file with mode: 0644]
t/subdir-order.sh [new file with mode: 0644]
t/subdir-subsub.sh [moved from t/subdir2.sh with 86% similarity, mode: 0644]
t/subdir-with-slash.sh [moved from t/subdir9.sh with 89% similarity, mode: 0644]
t/subdir.sh [changed mode: 0755->0644]
t/subobj-clean-lt-pr10697.sh [new file with mode: 0644]
t/subobj-clean-pr10697.sh [new file with mode: 0644]
t/subobj-indir-pr13928.sh [moved from t/specflg.sh with 52% similarity, mode: 0644]
t/subobj-vpath-pr13928.sh [new file with mode: 0644]
t/subobj.sh [changed mode: 0755->0644]
t/subobj10.sh [changed mode: 0755->0644]
t/subobj11a.sh [changed mode: 0755->0644]
t/subobj11b.sh [changed mode: 0755->0644]
t/subobj11c.sh [changed mode: 0755->0644]
t/subobj2.sh [changed mode: 0755->0644]
t/subobj4.sh [changed mode: 0755->0644]
t/subobj5.sh [changed mode: 0755->0644]
t/subobj6.sh [changed mode: 0755->0644]
t/subobj7.sh [changed mode: 0755->0644]
t/subobj8.sh [changed mode: 0755->0644]
t/subobj9.sh [changed mode: 0755->0644]
t/subobjname.sh [changed mode: 0755->0644]
t/subpkg-macrodir.sh [new file with mode: 0644]
t/subpkg-yacc.sh [changed mode: 0755->0644]
t/subpkg.sh [changed mode: 0755->0644]
t/subpkg2.sh [changed mode: 0755->0644]
t/subpkg3.sh [changed mode: 0755->0644]
t/subpkg4.sh [changed mode: 0755->0644]
t/subst-no-trailing-empty-line.sh [changed mode: 0755->0644]
t/subst.sh [changed mode: 0755->0644]
t/subst3.sh [changed mode: 0755->0644]
t/subst4.sh [changed mode: 0755->0644]
t/subst5.sh [changed mode: 0755->0644]
t/substre2.sh [changed mode: 0755->0644]
t/substref.sh [changed mode: 0755->0644]
t/substtarg.sh [changed mode: 0755->0644]
t/suffix-chain.tap [changed mode: 0755->0644]
t/suffix-custom-pr14441.sh [new file with mode: 0644]
t/suffix-custom-subobj-and-specflg.sh [moved from t/suffix13.sh with 84% similarity, mode: 0644]
t/suffix-custom-subobj.sh [moved from t/suffix12.sh with 92% similarity, mode: 0644]
t/suffix-extra-c-stuff-pr14560.sh [moved from t/yacc.sh with 62% similarity, mode: 0644]
t/suffix.sh [changed mode: 0755->0644]
t/suffix10.tap [changed mode: 0755->0644]
t/suffix11.tap [changed mode: 0755->0644]
t/suffix2.sh [changed mode: 0755->0644]
t/suffix3.tap [changed mode: 0755->0644]
t/suffix4.sh [changed mode: 0755->0644]
t/suffix5.sh [changed mode: 0755->0644]
t/suffix6.sh [changed mode: 0755->0644]
t/suffix6b.sh [changed mode: 0755->0644]
t/suffix6c.sh [changed mode: 0755->0644]
t/suffix7.sh [changed mode: 0755->0644]
t/suffix8.tap [changed mode: 0755->0644]
t/suffix9.sh [changed mode: 0755->0644]
t/symlink.sh [changed mode: 0755->0644]
t/symlink2.sh [changed mode: 0755->0644]
t/syntax.sh [changed mode: 0755->0644]
t/tags-pr12372.sh [new file with mode: 0644]
t/tags.sh [changed mode: 0755->0644]
t/tags2.sh [changed mode: 0755->0644]
t/tagsub.sh [changed mode: 0755->0644]
t/tap-ambiguous-directive-w.sh [deleted file]
t/tap-ambiguous-directive.sh [changed mode: 0755->0644]
t/tap-autonumber-w.sh [deleted file]
t/tap-autonumber.sh [changed mode: 0755->0644]
t/tap-bad-prog-w.tap [deleted file]
t/tap-bad-prog.tap [changed mode: 0755->0644]
t/tap-bailout-and-logging-w.sh [deleted file]
t/tap-bailout-and-logging.sh [changed mode: 0755->0644]
t/tap-bailout-leading-space.sh [changed mode: 0755->0644]
t/tap-bailout-suppress-badexit-w.sh [deleted file]
t/tap-bailout-suppress-badexit.sh [changed mode: 0755->0644]
t/tap-bailout-suppress-later-diagnostic-w.sh [deleted file]
t/tap-bailout-suppress-later-diagnostic.sh [changed mode: 0755->0644]
t/tap-bailout-suppress-later-errors-w.sh [deleted file]
t/tap-bailout-suppress-later-errors.sh [changed mode: 0755->0644]
t/tap-bailout-w.sh [deleted file]
t/tap-bailout.sh [changed mode: 0755->0644]
t/tap-basic-w.sh [deleted file]
t/tap-basic.sh [changed mode: 0755->0644]
t/tap-color-w.sh [deleted file]
t/tap-color.sh [changed mode: 0755->0644]
t/tap-common-setup.sh [changed mode: 0755->0644]
t/tap-deps-w.sh [deleted file]
t/tap-deps.sh [changed mode: 0755->0644]
t/tap-diagnostic-custom-w.sh [deleted file]
t/tap-diagnostic-custom.sh [changed mode: 0755->0644]
t/tap-diagnostic-w.sh [deleted file]
t/tap-diagnostic.sh [changed mode: 0755->0644]
t/tap-doc-w.sh [deleted file]
t/tap-doc.sh [changed mode: 0755->0644]
t/tap-doc2.sh [changed mode: 0755->0644]
t/tap-driver-stderr-w.sh [deleted file]
t/tap-driver-stderr.sh [changed mode: 0755->0644]
t/tap-empty-diagnostic-w.sh [deleted file]
t/tap-empty-diagnostic.sh [changed mode: 0755->0644]
t/tap-empty-w.sh [deleted file]
t/tap-empty.sh [changed mode: 0755->0644]
t/tap-escape-directive-2-w.sh [deleted file]
t/tap-escape-directive-2.sh [changed mode: 0755->0644]
t/tap-escape-directive-w.sh [deleted file]
t/tap-escape-directive.sh [changed mode: 0755->0644]
t/tap-exit-w.sh [deleted file]
t/tap-exit.sh [changed mode: 0755->0644]
t/tap-fancy-w.sh [deleted file]
t/tap-fancy.sh [changed mode: 0755->0644]
t/tap-fancy2-w.sh [deleted file]
t/tap-fancy2.sh [changed mode: 0755->0644]
t/tap-global-log-w.sh [deleted file]
t/tap-global-log.sh [changed mode: 0755->0644]
t/tap-global-result-w.sh [deleted file]
t/tap-global-result.sh [changed mode: 0755->0644]
t/tap-log-w.sh [deleted file]
t/tap-log.sh [changed mode: 0755->0644]
t/tap-merge-stdout-stderr-w.sh [deleted file]
t/tap-merge-stdout-stderr.sh [changed mode: 0755->0644]
t/tap-missing-plan-and-bad-exit-w.sh [deleted file]
t/tap-missing-plan-and-bad-exit.sh [changed mode: 0755->0644]
t/tap-more-w.sh [deleted file]
t/tap-more.sh [changed mode: 0755->0644]
t/tap-more2-w.sh [deleted file]
t/tap-more2.sh [changed mode: 0755->0644]
t/tap-msg0-bailout-w.sh [deleted file]
t/tap-msg0-bailout.sh [changed mode: 0755->0644]
t/tap-msg0-directive-w.sh [deleted file]
t/tap-msg0-directive.sh [changed mode: 0755->0644]
t/tap-msg0-misc-w.sh [deleted file]
t/tap-msg0-misc.sh [changed mode: 0755->0644]
t/tap-msg0-planskip-w.sh [deleted file]
t/tap-msg0-planskip.sh [changed mode: 0755->0644]
t/tap-msg0-result-w.sh [deleted file]
t/tap-msg0-result.sh [changed mode: 0755->0644]
t/tap-negative-numbers-w.sh [deleted file]
t/tap-negative-numbers.sh [changed mode: 0755->0644]
t/tap-no-disable-hard-error-w.sh [deleted file]
t/tap-no-disable-hard-error.sh [changed mode: 0755->0644]
t/tap-no-merge-stdout-stderr-w.sh [deleted file]
t/tap-no-merge-stdout-stderr.sh [changed mode: 0755->0644]
t/tap-no-spurious-numbers-w.sh [deleted file]
t/tap-no-spurious-numbers.sh [changed mode: 0755->0644]
t/tap-no-spurious-summary-w.sh [deleted file]
t/tap-no-spurious-summary.sh [changed mode: 0755->0644]
t/tap-no-spurious-w.sh [deleted file]
t/tap-no-spurious.sh [changed mode: 0755->0644]
t/tap-not-ok-skip-w.sh [deleted file]
t/tap-not-ok-skip.sh [changed mode: 0755->0644]
t/tap-number-wordboundary-w.sh [deleted file]
t/tap-number-wordboundary.sh [changed mode: 0755->0644]
t/tap-numbers-leading-zero-w.sh [deleted file]
t/tap-numbers-leading-zero.sh [changed mode: 0755->0644]
t/tap-numeric-description-w.sh [deleted file]
t/tap-numeric-description.sh [changed mode: 0755->0644]
t/tap-out-of-order-w.sh [deleted file]
t/tap-out-of-order.sh [changed mode: 0755->0644]
t/tap-passthrough-exit-w.sh [deleted file]
t/tap-passthrough-exit.sh [changed mode: 0755->0644]
t/tap-passthrough-w.sh [deleted file]
t/tap-passthrough.sh [changed mode: 0755->0644]
t/tap-plan-corner-w.sh [deleted file]
t/tap-plan-corner.sh [changed mode: 0755->0644]
t/tap-plan-errors-w.sh [deleted file]
t/tap-plan-errors.sh [changed mode: 0755->0644]
t/tap-plan-leading-zero-w.sh [deleted file]
t/tap-plan-leading-zero.sh [changed mode: 0755->0644]
t/tap-plan-malformed-w.sh [deleted file]
t/tap-plan-malformed.sh [changed mode: 0755->0644]
t/tap-plan-middle-w.sh [deleted file]
t/tap-plan-middle.sh [changed mode: 0755->0644]
t/tap-plan-w.sh [deleted file]
t/tap-plan-whitespace-w.sh [deleted file]
t/tap-plan-whitespace.sh [changed mode: 0755->0644]
t/tap-plan.sh [changed mode: 0755->0644]
t/tap-planskip-and-logging-w.sh [deleted file]
t/tap-planskip-and-logging.sh [changed mode: 0755->0644]
t/tap-planskip-badexit-w.sh [deleted file]
t/tap-planskip-badexit.sh [changed mode: 0755->0644]
t/tap-planskip-bailout-w.sh [deleted file]
t/tap-planskip-bailout.sh [changed mode: 0755->0644]
t/tap-planskip-case-insensitive-w.sh [deleted file]
t/tap-planskip-case-insensitive.sh [changed mode: 0755->0644]
t/tap-planskip-late-w.sh [deleted file]
t/tap-planskip-late.sh [changed mode: 0755->0644]
t/tap-planskip-later-errors-w.sh [deleted file]
t/tap-planskip-later-errors.sh [changed mode: 0755->0644]
t/tap-planskip-unplanned-corner-w.sh [deleted file]
t/tap-planskip-unplanned-corner.sh [changed mode: 0755->0644]
t/tap-planskip-unplanned-w.sh [deleted file]
t/tap-planskip-unplanned.sh [changed mode: 0755->0644]
t/tap-planskip-w.sh [deleted file]
t/tap-planskip-whitespace-w.sh [deleted file]
t/tap-planskip-whitespace.sh [changed mode: 0755->0644]
t/tap-planskip.sh [changed mode: 0755->0644]
t/tap-realtime-w.sh [deleted file]
t/tap-realtime.sh [deleted file]
t/tap-recheck-logs-w.sh [deleted file]
t/tap-recheck-logs.sh [changed mode: 0755->0644]
t/tap-recheck-w.sh [deleted file]
t/tap-recheck.sh [changed mode: 0755->0644]
t/tap-result-comment-w.sh [deleted file]
t/tap-result-comment.sh [changed mode: 0755->0644]
t/tap-signal-w.tap [deleted file]
t/tap-signal.tap [changed mode: 0755->0644]
t/tap-summary-color.sh [changed mode: 0755->0644]
t/tap-summary.sh [changed mode: 0755->0644]
t/tap-test-number-0-w.sh [deleted file]
t/tap-test-number-0.sh [changed mode: 0755->0644]
t/tap-todo-skip-together-w.sh [deleted file]
t/tap-todo-skip-together.sh [changed mode: 0755->0644]
t/tap-todo-skip-w.sh [deleted file]
t/tap-todo-skip-whitespace-w.sh [deleted file]
t/tap-todo-skip-whitespace.sh [changed mode: 0755->0644]
t/tap-todo-skip.sh [changed mode: 0755->0644]
t/tap-unplanned-w.sh [deleted file]
t/tap-unplanned.sh [changed mode: 0755->0644]
t/tap-whitespace-normalization-w.sh [deleted file]
t/tap-whitespace-normalization.sh [changed mode: 0755->0644]
t/tap-with-and-without-number-w.sh [deleted file]
t/tap-with-and-without-number.sh [changed mode: 0755->0644]
t/tap-xfail-tests-w.sh [deleted file]
t/tap-xfail-tests.sh [changed mode: 0755->0644]
t/tar-opts-errors.sh [moved from t/tar3.sh with 80% similarity, mode: 0644]
t/tar-override.sh [changed mode: 0755->0644]
t/tar-pax.sh [moved from t/tar2.sh with 78% similarity, mode: 0644]
t/tar-ustar-id-too-high.sh [new file with mode: 0644]
t/tar-ustar.sh [moved from t/tar.sh with 78% similarity, mode: 0644]
t/target-cflags.sh [changed mode: 0755->0644]
t/targetclash.sh [changed mode: 0755->0644]
t/test-driver-acsubst.sh [changed mode: 0755->0644]
t/test-driver-cond.sh [changed mode: 0755->0644]
t/test-driver-create-log-dir.sh [changed mode: 0755->0644]
t/test-driver-custom-multitest-recheck.sh [changed mode: 0755->0644]
t/test-driver-custom-multitest-recheck2.sh [changed mode: 0755->0644]
t/test-driver-custom-multitest.sh [changed mode: 0755->0644]
t/test-driver-custom-no-extra-driver.sh [changed mode: 0755->0644]
t/test-driver-custom-xfail-tests.sh [changed mode: 0755->0644]
t/test-driver-custom.sh [changed mode: 0755->0644]
t/test-driver-fail.sh [changed mode: 0755->0644]
t/test-driver-is-distributed.sh [changed mode: 0755->0644]
t/test-driver-strip-vpath.sh [changed mode: 0755->0644]
t/test-driver-trs-suffix-registered.sh [changed mode: 0755->0644]
t/test-extensions-cond.sh [changed mode: 0755->0644]
t/test-extensions.sh [changed mode: 0755->0644]
t/test-harness-vpath-rewrite.sh [changed mode: 0755->0644]
t/test-log.sh [changed mode: 0755->0644]
t/test-logs-repeated.sh [changed mode: 0755->0644]
t/test-metadata-global-log.sh [changed mode: 0755->0644]
t/test-metadata-global-result.sh [changed mode: 0755->0644]
t/test-metadata-recheck.sh [changed mode: 0755->0644]
t/test-metadata-results.sh [changed mode: 0755->0644]
t/test-missing.sh [changed mode: 0755->0644]
t/test-missing2.sh [changed mode: 0755->0644]
t/test-trs-basic.sh [changed mode: 0755->0644]
t/test-trs-recover.sh [changed mode: 0755->0644]
t/test-trs-recover2.sh [changed mode: 0755->0644]
t/tests-environment-and-log-compiler.sh [changed mode: 0755->0644]
t/tests-environment-backcompat.sh [changed mode: 0755->0644]
t/tests-environment-fd-redirect.sh [changed mode: 0755->0644]
t/tests-environment.sh [changed mode: 0755->0644]
t/testsuite-part.am
t/testsuite-summary-color.sh [changed mode: 0755->0644]
t/testsuite-summary-count-many.sh [changed mode: 0755->0644]
t/testsuite-summary-count.sh [changed mode: 0755->0644]
t/testsuite-summary-reference-log.sh [changed mode: 0755->0644]
t/transform.sh [changed mode: 0755->0644]
t/transform2.sh [changed mode: 0755->0644]
t/transform3.sh [changed mode: 0755->0644]
t/txinfo-absolute-srcdir-pr408.sh [moved from t/txinfo26.sh with 79% similarity, mode: 0644]
t/txinfo-add-missing-and-dist.sh [moved from t/txinfo8.sh with 95% similarity, mode: 0644]
t/txinfo-bsd-make-recurs.sh [moved from t/txinfo32.sh with 90% similarity, mode: 0644]
t/txinfo-builddir.sh [new file with mode: 0644]
t/txinfo-clean.sh [moved from t/txinfo33.sh with 78% similarity, mode: 0644]
t/txinfo-dvi-recurs.sh [moved from t/txinfo10.sh with 93% similarity, mode: 0644]
t/txinfo-include.sh [new file with mode: 0644]
t/txinfo-info-in-srcdir.sh [moved from t/txinfo16.sh with 92% similarity, mode: 0644]
t/txinfo-makeinfo-error-no-clobber.sh [moved from t/txinfo20.sh with 81% similarity, mode: 0644]
t/txinfo-many-output-formats-vpath.sh [new file with mode: 0644]
t/txinfo-many-output-formats.sh [moved from t/txinfo21.sh with 63% similarity, mode: 0644]
t/txinfo-no-clutter.sh [changed mode: 0755->0644]
t/txinfo-no-extra-dist.sh [moved from t/txinfo2.sh with 56% similarity, mode: 0644]
t/txinfo-no-installinfo.sh [moved from t/txinfo27.sh with 88% similarity, mode: 0644]
t/txinfo-no-repeated-targets.sh [moved from t/txinfo9.sh with 79% similarity, mode: 0644]
t/txinfo-nodist-info.sh [new file with mode: 0644]
t/txinfo-other-suffixes.sh [new file with mode: 0644]
t/txinfo-override-infodeps.sh [moved from t/txinfo29.sh with 90% similarity, mode: 0644]
t/txinfo-override-texinfo-tex.sh [moved from t/txinfo22.sh with 86% similarity, mode: 0644]
t/txinfo-setfilename-repeated.sh [moved from t/txinfo17.sh with 84% similarity, mode: 0644]
t/txinfo-setfilename-suffix-strip.sh [moved from t/txinfo31.sh with 77% similarity, mode: 0644]
t/txinfo-subdir-pr343.sh [moved from t/txinfo13.sh with 77% similarity, mode: 0644]
t/txinfo-tex-dist.sh [moved from t/txinfo.sh with 93% similarity, mode: 0644]
t/txinfo-unrecognized-extension.sh [changed mode: 0755->0644]
t/txinfo-unrecognized-info-suffix.sh [moved from t/txinfo4.sh with 92% similarity, mode: 0644]
t/txinfo-vtexi.sh [moved from t/vtexi.sh with 95% similarity, mode: 0644]
t/txinfo-vtexi2.sh [moved from t/vtexi2.sh with 91% similarity, mode: 0644]
t/txinfo-vtexi3.sh [moved from t/vtexi3.sh with 91% similarity, mode: 0644]
t/txinfo-vtexi4.sh [moved from t/vtexi4.sh with 76% similarity, mode: 0644]
t/txinfo-without-info-suffix.sh [moved from t/txinfo3.sh with 83% similarity, mode: 0644]
t/txinfo19.sh [changed mode: 0755->0644]
t/txinfo23.sh [changed mode: 0755->0644]
t/txinfo24.sh [changed mode: 0755->0644]
t/txinfo25.sh [changed mode: 0755->0644]
t/txinfo28.sh [changed mode: 0755->0644]
t/txinfo30.sh [deleted file]
t/txinfo5.sh [deleted file]
t/txinfo5b.sh [deleted file]
t/txinfo7.sh [deleted file]
t/uninstall-fail.sh [changed mode: 0755->0644]
t/uninstall-pr9578.sh [changed mode: 0755->0644]
t/unused.sh [changed mode: 0755->0644]
t/upc.sh [changed mode: 0755->0644]
t/upc2.sh [changed mode: 0755->0644]
t/upc3.sh [changed mode: 0755->0644]
t/vala-configure.sh [new file with mode: 0644]
t/vala-grepping.sh [moved from t/vala.sh with 88% similarity, mode: 0644]
t/vala-headers.sh [changed mode: 0755->0644]
t/vala-libs.sh [changed mode: 0755->0644]
t/vala-mix.sh [changed mode: 0755->0644]
t/vala-mix2.sh [changed mode: 0755->0644]
t/vala-non-recursive-setup.sh [moved from t/vala3.sh with 89% similarity, mode: 0644]
t/vala-parallel.sh [changed mode: 0755->0644]
t/vala-per-target-flags.sh [moved from t/vala5.sh with 84% similarity, mode: 0644]
t/vala-recursive-setup.sh [moved from t/vala2.sh with 88% similarity, mode: 0644]
t/vala-vapi.sh [changed mode: 0755->0644]
t/vala-vpath.sh [changed mode: 0755->0644]
t/vala4.sh [deleted file]
t/var-recurs.sh [moved from t/recurs.sh with 87% similarity, mode: 0644]
t/var-recurs2.sh [moved from t/recurs2.sh with 91% similarity, mode: 0644]
t/vars.sh [changed mode: 0755->0644]
t/vars3.sh [changed mode: 0755->0644]
t/vartar.sh [changed mode: 0755->0644]
t/vartypo2.sh [changed mode: 0755->0644]
t/vartypos.sh [changed mode: 0755->0644]
t/version2.sh [deleted file]
t/version3.sh [changed mode: 0755->0644]
t/version4.sh [changed mode: 0755->0644]
t/version6.sh [changed mode: 0755->0644]
t/version7.sh [changed mode: 0755->0644]
t/version8.sh [changed mode: 0755->0644]
t/vpath.sh [changed mode: 0755->0644]
t/warning-groups-win-over-strictness.sh [changed mode: 0755->0644]
t/warnings-obsolete-default.sh [new file with mode: 0644]
t/warnings-override.sh [changed mode: 0755->0644]
t/warnings-precedence.sh [changed mode: 0755->0644]
t/warnings-strictness-interactions.sh [changed mode: 0755->0644]
t/warnings-unknown.sh [changed mode: 0755->0644]
t/warnings-win-over-strictness.sh [changed mode: 0755->0644]
t/warnopts.sh [changed mode: 0755->0644]
t/werror.sh [changed mode: 0755->0644]
t/werror2.sh [changed mode: 0755->0644]
t/werror3.sh [changed mode: 0755->0644]
t/werror4.sh [changed mode: 0755->0644]
t/whoami.sh [changed mode: 0755->0644]
t/wrap/aclocal.in
t/wrap/automake.in
t/xsource.sh [changed mode: 0755->0644]
t/yacc-auxdir.sh [changed mode: 0755->0644]
t/yacc-basic.sh [changed mode: 0755->0644]
t/yacc-bison-skeleton-cxx.sh [changed mode: 0755->0644]
t/yacc-bison-skeleton.sh [changed mode: 0755->0644]
t/yacc-clean-cxx.sh [changed mode: 0755->0644]
t/yacc-clean.sh [changed mode: 0755->0644]
t/yacc-cxx-grepping.sh [moved from t/yaccpp.sh with 84% similarity, mode: 0644]
t/yacc-cxx.sh [changed mode: 0755->0644]
t/yacc-d-basic.sh [changed mode: 0755->0644]
t/yacc-d-cxx.sh [changed mode: 0755->0644]
t/yacc-d-vpath.sh [changed mode: 0755->0644]
t/yacc-deleted-headers.sh [changed mode: 0755->0644]
t/yacc-depend.sh [changed mode: 0755->0644]
t/yacc-depend2.sh [changed mode: 0755->0644]
t/yacc-dist-nobuild-subdir.sh [changed mode: 0755->0644]
t/yacc-dist-nobuild.sh [changed mode: 0755->0644]
t/yacc-dry.sh [moved from t/yaccdry.sh with 92% similarity, mode: 0644]
t/yacc-grepping.sh [moved from t/yacc2.sh with 74% similarity, mode: 0644]
t/yacc-grepping2.sh [moved from t/yacc5.sh with 74% similarity, mode: 0644]
t/yacc-headers-and-dist-pr47.sh [moved from t/yacc7.sh with 92% similarity, mode: 0644]
t/yacc-line.sh [changed mode: 0755->0644]
t/yacc-misc.sh [moved from t/yacc4.sh with 88% similarity, mode: 0644]
t/yacc-mix-c-cxx.sh [changed mode: 0755->0644]
t/yacc-nodist.sh [changed mode: 0755->0644]
t/yacc-pr204.sh [changed mode: 0755->0644]
t/yacc-subdir.sh [moved from t/yacc8.sh with 91% similarity, mode: 0644]
t/yacc-vpath.sh [moved from t/yaccvpath.sh with 93% similarity, mode: 0644]
t/yacc-weirdnames.sh [changed mode: 0755->0644]
t/yflags-cmdline-override.sh [changed mode: 0755->0644]
t/yflags-conditional.sh [changed mode: 0755->0644]
t/yflags-cxx.sh [moved from t/yflags2.sh with 75% similarity, mode: 0644]
t/yflags-d-false-positives.sh [changed mode: 0755->0644]
t/yflags-force-conditional.sh [changed mode: 0755->0644]
t/yflags-force-override.sh [changed mode: 0755->0644]
t/yflags-var-expand.sh [changed mode: 0755->0644]
t/yflags.sh [changed mode: 0755->0644]

diff --git a/AUTHORS b/AUTHORS
index e63f8b7..a3c5c01 100644 (file)
--- a/AUTHORS
+++ b/AUTHORS
@@ -19,3 +19,9 @@ Alexandre Duret-Lutz
 Ralf Wildenhues
   Random breakage.
   Maintenance since 2006.
+
+Stefano Lattarini
+  Testsuite overhaul.
+  TAP support and custom testsuite drivers.
+  Random breakage.
+  De-facto maintenance since 2012.
index 43cea18..82a11a9 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
+2017-06-18  Mathieu Lirzin  <mthl@gnu.org>
+
+       version 1.15.1
+
+       * configure.ac (AC_INIT): Bump version number to 1.15.1.
+       * m4/amversion.m4: Likewise (auto-updated by "make bootstrap").
+
+2017-06-18  Mathieu Lirzin  <mthl@gnu.org>
+
+       maint: Update 'git-tag-release' rule
+
+       * maintainer/maint.mk (git-tag-release): Use a Git tag message similar
+       to what the 'do-release-commit-and-tag' script from Gnulib do.
+
+2017-06-18  Mathieu Lirzin  <mthl@gnu.org>
+
+       maint: Update files from upstream with 'make fetch'
+
+       * lib/config.guess: Update.
+       * lib/config.sub: Likewise.
+       * lib/texinfo.tex: Likewise.
+
+2017-06-18  Mathieu Lirzin  <mthl@gnu.org>
+
+       maint: Update NEWS
+
+       * NEWS: Announce important bug fixes.
+
+2017-05-20  Mathieu Lirzin  <mthl@gnu.org>
+
+       bootstrap: Add a rationale for the bootstrap process.
+
+       * bootstrap: Explain why we can't simply run 'autoreconf -i'.
+
+2017-05-20  Mathieu Lirzin  <mthl@gnu.org>
+
+       bootstrap: Rename 'bootstrap.sh' to 'bootstrap'.
+
+       Follow Gnulib's convention of using either "bootstrap" or "autogen.sh"
+       file names for development bootstrap scripts.
+
+       * bootstrap.sh: Rename to ...
+       * bootstrap: ... this.
+       * GNUmakefile (bootstrap): Adapt.
+       * HACKING: Likewise.
+       * Makefile.am (EXTRA_DIST): Likewise.
+       * doc/automake.texi (Future of aclocal)
+       (Error required file ltmain.sh not found): Likewise.
+       * maintainer/maint.mk (autodiffs, update-copyright): Likewise.
+
+2017-05-20  Mathieu Lirzin  <mthl@gnu.org>
+
+       automake: Update 'read_am_file' docstring.
+
+       * bin/automake.in (read_am_file): Update docstring which was referring
+       to a non existent '%contents' variable.
+
+2017-04-16  Bruno Haible  <bruno@clisp.org>
+
+       tests: Never invoke gettextize.
+
+       This change fixes automake bug#26514.
+
+       * t/gettext-macros.sh: Never invoke gettextize.
+
+2017-04-13  Mathieu Lirzin  <mthl@gnu.org>
+
+       tests: Update "t/txinfo-no-clutter.sh".
+
+       This is workaround to a regression introduced by
+       48107579abadbe857c8299c38d2ca0a3f8f354c8.  With current
+       "lib/texinfo.tex", 'texi2dvi' is not able to produce a valid output
+       for a Texinfo document containing a @synindex command.  As a
+       consequence the test "t/txinfo-no-clutter.sh" was failing.
+
+       * t/txinfo-no-clutter.sh: Remove use of @synindex command.
+
+2017-03-05  Mathieu Lirzin  <mthl@gnu.org>
+
+       maint: Update "lib/texinfo.tex".
+
+       This fixes a regression in 48107579abadbe857c8299c38d2ca0a3f8f354c8
+       where 'texi2dvi' was not able to produce a valid output for a Texinfo
+       document without text.  As a consequence the test "t/silent-texi.sh"
+       was failing.
+
+       * lib/texinfo.tex: Update to 2017-03-05.09.
+
+2017-03-02  Mathieu Lirzin  <mthl@gnu.org>
+
+       maint: Update copyright years to 2017.
+
+       This update has been made with 'make update-copyright'.
+
+2017-03-02  Mathieu Lirzin  <mthl@gnu.org>
+
+       maint: Update files from upstream with 'make fetch'.
+
+       * lib/INSTALL: Update.
+       * lib/config.guess: Likewise.
+       * lib/config.sub: Likewise.
+       * lib/gendocs.sh: Likewise.
+       * lib/gendocs_template: Likewise.
+       * lib/gitlog-to-changelog: Likewise.
+       * lib/gnupload: Likewise.
+       * lib/texinfo.tex: Likewise.
+       * lib/update-copyright: Likewise.
+
+2017-03-02  Mathieu Lirzin  <mthl@gnu.org>
+
+       maint: Update fetch URLs.
+
+       * maintainer/maint.mk (SV_CVS, SV_GIT_AC): Remove.
+       (SV_GIT_CF, SV_GIT_GL): Use https for Savannah Git repositories.
+       (FETCHFILES): Use Gnulib repository as the source of "texinfo.tex",
+       "gendocs.sh", and "gendocs_template" files.
+
+2017-02-23  Mathieu Lirzin  <mthl@gnu.org>
+
+       doc: fix typo "requited" => "required"
+
+       This change fixes automake bug#25413.
+
+       * doc/automake.texi (Serial Test Harness): Fix typo.
+
+2016-09-09  Jim Meyering  <meyering@fb.com>
+
+       automake: do not emit rule with two dependents
+
+       On a system using our replacement alloca, make would emit
+       this warning:
+         target '.deps/alloca.Po' given more than once in the same rule
+       That arose because automake would emit a rule depending on both
+       ./.deps/alloca.Po and .deps/alloca.Po. Normally, duplicate
+       dependents are avoided by virtue of their names being keys in
+       the %dep_files hash, but in this case, that particular file
+       was specified in two different ways.
+       * bin/automake.in (handle_ALLOCA): When the $dir prefix is empty,
+       make it './', to ensure that when we add ./.deps/alloca.Po
+       it is deduped.
+       See: http://bugs/gnu/org/22702
+
+2016-04-21  Paul Eggert  <eggert@cs.ucla.edu>
+
+       python: add python3.5, python3.4
+
+       * m4/python.m4 (AM_PATH_PYTHON): Add python3.5, python3.4.
+
+2016-04-01  Paul Eggert  <eggert@cs.ucla.edu>
+
+       automake: port to Perl 5.22 and later
+
+       Without this change, Perl 5.22 complains "Unescaped left brace in
+       regex is deprecated" and this is planned to become a hard error in
+       Perl 5.26.  See:
+       http://search.cpan.org/dist/perl-5.22.0/pod/perldelta.pod#A_literal_%22{%22_should_now_be_escaped_in_a_pattern
+       * bin/automake.in (substitute_ac_subst_variables): Escape left brace.
+
+2016-03-29  Paul Eggert  <eggert at>
+
+       automake: port better to future gzip
+
+       * lib/am/distdir.am (dist-gzip, dist-shar, distcheck):
+       Port better to future versions of gzip, which are planned to
+       deprecate the GZIP environment variable (Bug#20132).
+
+2016-01-12  Paul Eggert  <eggert@cs.ucla.edu>
+
+       maint: port time-stamp-time-zone to strict POSIX
+
+       Set time-stamp-time-zone to "UTC0", not to "UTC", as POSIX defines
+       TZ="UTC0" not TZ="UTC".
+
+2015-11-24  Jonathan L Peyton  <jonathan.l.peyton@intel.com>  (tiny change)
+
+       compile: add icl to compile wrapper script
+
+       * lib/compile: Have icl be treated similarly to cl
+       (scriptversion): Update.
+       * t/ax/am-test-lib.sh (require_tool): Handle icl.
+       * t/compile7.sh: Add new test file for icl...
+       * t/list-of-tests.mk (handwritten_TESTS): ...and use it.
+       * NEWS: Update.
+       * THANKS: Update.
+
+2015-01-06  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       tests: fix a typo-induced bug
+
+       * t/subobj-vpath-pr13928.sh: Here; we were using $FGREP instead of
+       $EGREP, oops.
+
+2015-01-06  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       NEWS: fix a typo
+
+2015-01-05  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       maint: update copyright years to 2015 (branch 'micro')
+
+2015-01-05  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       sync: update third-part files from upstream
+
+       * lib/config.sub: This.
+       * lib/INSTALL, lib/config.guess, lib/gitlog-to-changelog, lib/gnupload,
+       lib/update-copyright: And this (but only for copyright year update, no
+       real semantic change)
+
+2015-01-05  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       maint: fix typo in error message of a maintainer-only rule
+
+       * maintainer/maint.mk (web-manual-update): Here.
+
+2015-01-05  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       Merge branch 'minor' into micro after 1.15 release
+
+       And bump version number: 1.15 -> 1.15.0a
+
+       * minor:
+         release: stable minor release 1.15
+         NEWS: minor improvements and fixed some typos and grammaros
+         docs: "make distcheck" implementation details are not to be abused
+         NEWS: improve and adjust in light of the oncoming 1.15 release
+         Fix dumb logic error preventing $install_sh from being be overridden
+         Expose automake bug#19311
+         build: fix race in parallel builds
+         init: ensure $ac_aux_dir is defined before being used
+         plans: enabling subdir-object by default is blocked on bug#13928
+         maint: update copyright years
+         maint: sync files from upstream ("make fetch")
+         Typofixes in warning messages and manual
+         NEWS: a typofix, and better word wrapping
+         parallel-tests: avoid possible implicit "make all" in test-suite.log rule
+         Allow user to extend .PRECIOUS target
+         cosmetics: remove a couple of extra trailing white spaces
+         tests: fix a spurious failure on Mac OS X
+         docs: make clear the JAVA primary is frozen
+         install-sh: a slightly better diagnostic, and tests enhancements
+         install-sh: be stricter in catching invalid usages
+         tests: more significant names for some tests
+         tests: some cosmetic fixes
+         tests: more significant names for a test
+         docs: drop a few obsolescent FIXME/TODO comments, and associated text
+         testsuite harness: report test exit status in log file
+         TAP driver: no need to invoke AC_PROG_AWK directly
+         TAP driver: remove perl implementation (move it into contrib/)
+         NEWS: stop reporting "new" Automake versioning scheme
+         cosmetics: untabify the install-sh script
+         install-sh: assume that "set -f" and "set +f" work...
+         install-sh: assume ${var:-value} works as expected
+         install-sh: assume 'dirname' is available and working correctly
+         post-release: micro version bump (1.14a)
+
+2014-12-31  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       release: stable minor release 1.15
+
+       * configure.ac (AC_INIT): Bump version number to 1.15.
+       * m4/amversion.m4: Likewise (auto-updated by "make bootstrap").
+
+2014-12-31  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       NEWS: minor improvements and fixed some typos and grammaros
+
+2014-12-30  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       docs: "make distcheck" implementation details are not to be abused
+
+       * doc/automake.texi: State explicitly and in detail that the exact location
+       and the exact structure of the subdirectory used by "make distcheck" is to
+       be considered an implementation detail, which can change at any time.
+
+2014-12-30  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       NEWS: improve and adjust in light of the oncoming 1.15 release
+
+2014-12-30  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       Merge branch 'micro' into minor
+
+       * micro:
+         shell-no-trail-bslash: improve diagnostic in case of failure
+
+2014-12-30  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       shell-no-trail-bslash: improve diagnostic in case of failure
+
+       * t/ax/shell-no-trail-bslash.in: Here, by fixing a typo in a
+       variable name and a logic error.
+       * t/self-check-shell-no-trail-bslash.sh: Enhance to catch the
+       issue.
+
+2014-12-28  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       Merge branch 'micro' into minor
+
+       * micro:
+         tests: make script 'shell-no-trail-bslash' simpler and more robust
+
+2014-12-28  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       tests: make script 'shell-no-trail-bslash' simpler and more robust
+
+       This solves spurious failure in the 'check-no-trailing-backslash-in-recipes'
+       target for Automake-NG.
+
+       This is basically a backport of Automake-NG commit v1.14.1-1010-g85aae58;
+       the point is to minimize the amount of spurious diffs between the mainline
+       Automake and the Automake-NG source trees.
+
+       * t/ax/shell-no-trail-bslash.in: Simplify and fortify.
+       * t/self-check-shell-no-trail-bslash.sh: Enhance.
+
+2014-12-27  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       Merge branch 'micro' into minor
+
+       * micro:
+         tests: fix spurious failure in test on TEXINFO_TEX overriding
+         tests: avoid some spurious failures on AIX 7.1
+
+2014-12-27  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       tests: fix spurious failure in test on TEXINFO_TEX overriding
+
+       * t/txinfo-override-texinfo-tex.sh: Here.  The issue was pre-existing, but
+       has been only recently exposed by the fix for automake bug#18286 "distcheck
+       fails to detect missing files" (see commit v1.14.1-4-g01a7a4a) and by the
+       BSD make semantics.  To convince yourself this change actually makes sense
+       semantically, see https://sourceware.org/ml/binutils/2012-06/msg00004.html
+
+2014-12-27  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       Merge branch 'aix-testsuite-failures' into micro
+
+       * aix-testsuite-failures:
+         tests: avoid some spurious failures on AIX 7.1
+
+2014-12-27  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       tests: avoid some spurious failures on AIX 7.1
+
+       * t/lex-noyywrap.sh: Here.
+       * t/instmany-mans.sh: And here.
+       * t/instmany-python.sh: And here.
+       * t/instmany.sh: And here.
+       * t/parallel-tests-concurrency.sh: And here.
+
+2014-12-23  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       Merge branch 'micro' into minor
+
+       * micro:
+         dist: fix bug#18286 "distcheck fails to detect missing files"
+         tests: expose automake bug#18286 "distcheck fails to detect missing files"
+         include: fix bug in handling of user-defined makefile fragments generation
+         tests: expose bug in handling of user-defined makefile fragments generation
+
+2014-12-23  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       Merge branch 'distcheck-pr18286' into micro
+
+       * distcheck-pr18286:
+         dist: fix bug#18286 "distcheck fails to detect missing files"
+         tests: expose automake bug#18286 "distcheck fails to detect missing files"
+
+2014-12-23  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       dist: fix bug#18286 "distcheck fails to detect missing files"
+
+       BTW, this issue had been already reported in the past:
+       http://lists.gnu.org/archive/html/automake/2006-09/msg00008.html
+       http://lists.gnu.org/archive/html/automake/2013-01/msg00049.html
+
+       "make distcheck" could sometimes fail to detect missing files in the
+       distribution tarball, especially in those cases where both the generated
+       files and their dependencies are explicitly in $(srcdir).  An important
+       example of this are *generated* makefile fragments included at Automake
+       time in Makefile.am.  A basic example:
+
+           # -*- Makefile.am -*-
+
+           $(srcdir)/fragment.am: $(srcdir)/data.txt $(srcdir)/preproc.sh
+               cd $(srcdir) && $(SHELL) preproc.sh <data.txt >fragment.am
+
+           include $(srcdir)/fragment.am
+
+           ...
+
+       If the use forgot to add data.txt and/or preproc.sh in the distribution
+       tarball, "make distcheck" would have erroneously succeeded!
+
+       The reason is that, while $(srcdir)/data.txt does not exist, make also
+       looks in $(srcdir)/$(srcdir)/data.txt, and in the distcheck-issued
+       VPATH build where $(srcdir) is '..', that file exists, as it is
+       part of the original development directory.
+
+       * t/distdir.am (distcheck): Adjust to have the build directory be
+       '$(distdir)/_build/sub' rather than just '$(distdir)/_build'.  Thanks
+       Nicola Fontana for the suggestion.
+       * t/distcheck-pr18286.sh: Enhance and tighten a little.
+       * t/list-of-tests.mk (XFAIL_TESTS): Remove 't/distcheck-pr18286.sh',
+       as it's now passing.
+       * t/subdir-am-cond.sh: Adjust to avoid a fully spurious failure due
+       to the new distcheck semantics.
+       * t/subdir-ac-subst.sh: Likewise.
+       * t/dejagnu-relative-srcdir.sh: Likewise.
+       * t/txinfo-builddir.sh: Likewise.
+       * NEWS: Update.
+
+       Helped-by: Nicola Fontana <ntd@entidi.it>
+       Helped-by: Peter Johansson <trojkan@gmail.com>
+
+2014-12-23  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       tests: expose automake bug#18286 "distcheck fails to detect missing files"
+
+       * t/distcheck-pr18286.sh: New test, still XFAILing.
+       * t/list-of-tests.mk: Add it.
+
+2014-12-23  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       Merge branch 'am-deps' into micro
+
+       * am-deps:
+         include: fix bug in handling of user-defined makefile fragments generation
+         tests: expose bug in handling of user-defined makefile fragments generation
+
+2014-12-23  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       include: fix bug in handling of user-defined makefile fragments generation
+
+       If a user defined one single Makefile fragment to be included (via Automake
+       includes) in his main Makefile.am, and gave a rule to generate that file
+       from other data, Automake used to spuriously complain about with something
+       like "overrides Automake target '$(srcdir)/foo.am".  This change remove that
+       spurious error (via a simple hack rather than a systematic change, but oh
+       well).
+
+       * lib/am/configure.am (%MAKEFILE-IN-DEPS%) [?HAVE-MAKEFILE-IN-DEPS?]: Add
+       a trailing "$(am__empty)" to the list of targets, which is enough to trick
+       Automake into not complaining about "duplicated targets" in case the
+       '%MAKEFILE-IN-DEPS%' list expands to a single target that is also declared
+       in some user-defined rule.
+       * t/list-of-tests.mk (XFAIL_TESTS): Remove now-passing test
+       't/am-include-only-one-generated-fragment.sh'.
+       * NEWS: Update.
+
+2014-12-23  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       tests: expose bug in handling of user-defined makefile fragments generation
+
+       If a user defines one single Makefile fragment to be included (via Automake
+       includes) in his main Makefile.am, and givse a rule to generate that file
+       from other data, Automake will spuriously complain about with something
+       like "overrides Automake target '$(srcdir)/foo.am".
+
+       * t/am-include-only-one-generated-fragment.sh: Expose the bug (this test
+       is still XFAILing).
+       * t/list-of-tests.mk: Add the new test.
+
+2014-12-22  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       Merge branch 'micro' into minor
+
+       * micro:
+         cleanup: refactor code to initialize DIST_COMMON
+         dist: ordering of files in DIST_COMMON is deterministic now
+         tests: refactor some tests on DIST_COMMON
+         maint: make output of 'gen-testsuite-part' deterministic
+         When computing lispdir, don't load emacs site wide init file.
+         PATH: quote $(PATH_SEPARATOR) as well
+         Improve detection of GNU make, avoiding "Arg list too long" errors.
+
+2014-12-22  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       cleanup: refactor code to initialize DIST_COMMON
+
+       There is not need to make that an Automake variable early,
+       only to later get and munge its contents, and use the new
+       content to redefine the variable.
+
+       * bin/automake.in (@dist_common): New global variable.
+       (push_dist_common, handle_dist): Use it.
+       (handle_dist): Define am__DIST_COMMON instead of DIST_COMMON
+       directly.
+       (initialize_per_input): Reset it to empty.
+       ($configure_dist_common): Turn this scalar variable ...
+       (@configure_dist_common): ... into this array variable.
+       (handle_dist): Adjust.
+       (required_file_check_or_copy): Update and wrap some comments.
+       * lib/am/distdir.am (DIST_COMMON): Append $(am__DIST_COMMON).
+       * t/distcom2.sh: Tighten a little.
+
+2014-12-22  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       dist: ordering of files in DIST_COMMON is deterministic now
+
+       It had likely stopped being deterministic due to the new perl behavior
+       of having non-deterministic order of numerating hash keys:
+       <http://search.cpan.org/dist/perl-5.18.0/pod/perldelta.pod#Hash_randomization>
+       <http://onionstand.blogspot.ie/2012/12/are-you-relying-on-hash-keys-being.html>
+       See also similar commit v1.14-19-g52e6404, albeit in this case the issue
+       is likely coming from autom4te/autoconf, not from automake itself.
+
+       Fixes automake bug http://debbugs.gnu.org/17908
+
+       * bin/automake.in (handle_dist): Sort @dist_common.
+       (print_autodist_files): Swap invocations of 'sort' and 'uniq', for
+       consistency with the new code in 'handle_dist' and to get rid of a
+       minor hack.
+       * NEWS: Update.
+
+2014-12-22  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       tests: refactor some tests on DIST_COMMON
+
+       So that they prefer checking the semantics of the generated Makefiles,
+       rather than grepping their content.  This will be useful in an upcoming
+       refactoring.
+
+       * t/distcom-subdir.sh: Adjust this test.
+       * t/distcom2.sh: And this.
+       * t/distcom3.sh: And this.
+       * t/distcom4.sh: And this.
+       * t/distcom5.sh: And this.
+
+2014-12-22  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       maint: make output of 'gen-testsuite-part' deterministic
+
+       So that diffs displayed by the 'compare-autodiffs' target are
+       less spurious and more useful.
+
+       * gen-testsuite-part: Sort keys of %deps_extractor, %wrapper_setups
+       and %depmodes before iterating on them.
+
+2014-12-19  Andrew Burgess  <andrew.burgess@embecosm.com>  (tiny change)
+
+       When computing lispdir, don't load emacs site wide init file.
+
+       When computing the lispdir emacs was previously invoked with the '-q'
+       option to avoid loading the users initialisation files, however, the
+       site wide initialisation file was still loaded, in some cases this can
+       cause emacs to hang, with the result that a configure can also hang.
+
+       The lisp code that aclocal causes to be executed reduces the load-path
+       list (in emacs) to empty.  The load-path is used by emacs to find
+       packages which it wants to load.  Currently, if emacs tries to auto
+       load a package during shut down, and the package is not found, then
+       emacs will hang.  This does seem like an emacs bug, but protecting
+       against this in aclocal is simply a case of not loading the site wide
+       initialisation file.
+
+       In this patch then the '-q' option to emacs is replaced with '-Q',
+       this has the same, the '-Q' option is similar to '-q --no-site-file
+       --no-splash'.
+
+       * doc/automake.texi (Hard-Coded Install Paths): Update explanation of
+       emacs code used to get lispdir.
+       * m4/lispdir.m4 (AM_PATH_LISPDIR): Update emacs flags.
+
+2014-12-19  KO Myung-Hun  <komh78@gmail.com>  (tiny change)
+
+       PATH: quote $(PATH_SEPARATOR) as well
+
+       On OS/2, $(PATH_SEPARATOR) is ';'. Without quote, it is recognized as
+       a mark of end of sentence.
+
+       * Makefile.am: quote $(PATH_SEPARATOR) as well.
+       * t/Makefile.inc: Likewise.
+
+2014-12-19  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       Improve detection of GNU make, avoiding "Arg list too long" errors.
+
+       Such errors could take place when the main makefile included too many
+       sub-makefiles, making $(MAKEFILE_LIST) too long and causing the
+       recipes $(am__is_gnu_make) to exceed the shell's command-line length
+       limits.  This is not a theoretical issue: it could happen for projects
+       having lots of C/C++ sources and using automatic dependency tracking,
+       which created an included .Po sub-makefile for each of such sources.
+
+       Fixes http://debbugs.gnu.org/18744
+
+       * lib/am/header-vars.am (am__is_gnu_make): Fix the logic to avoid
+       the use of $(MAKEFILE_LIST).
+       * NEWS: Update.
+
+2014-12-19  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       Merge branch 'micro' into minor
+
+       * micro:
+         Fix stupid typo in test, causing spurious failure
+
+2014-12-19  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       Fix stupid typo in test, causing spurious failure
+
+       * t/aminit-trailing-dnl-comment-pr16841.sh: s/greop/grep/
+
+2014-12-19  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       Merge branch 'micro' into minor
+
+       * micro:
+         sync: update third-part files from upstream
+         Make sure AM_INIT_AUTOMAKE has a trailing newline
+         dist: adjust warning messages about shar and tarZ deprecation
+         docs: improve description of ${PACKAGE}, ${VERSION}, and similar variables
+
+2014-12-19  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       Merge branch 'pr16841' into micro
+
+       * pr16841:
+         Make sure AM_INIT_AUTOMAKE has a trailing newline
+
+2014-12-19  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       sync: update third-part files from upstream
+
+       * lib/config.guess: This.
+       * lib/config.sub: And this.
+       * lib/gitlog-to-changelog: And this.
+       * lib/gnupload: And this.
+       * lib/update-copyright: And this.
+
+2014-12-19  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       Make sure AM_INIT_AUTOMAKE has a trailing newline
+
+       This used to be the case until Automke 1.13, but we broke it in
+       Automake 1.14 (see commit v1.13.1-71-gf78b0f0).  This caused
+       issues like http://debbugs.gnu.org/16841
+
+       * m4/init.m4 (AM_INIT_AUTOMAKE): Adjust.
+       * t/aminit-trailing-dnl-comment-pr16841.sh: New test.
+       * t/list-of-tests.mk: Add it.
+       * NEWS, THANKS: Update.
+
+2014-12-19  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       Merge branches 'dist-warn-pr19108' and 'docs-pr16623' into micro
+
+       * dist-warn-pr19108:
+         dist: adjust warning messages about shar and tarZ deprecation
+
+       * docs-pr16623:
+         docs: improve description of ${PACKAGE}, ${VERSION}, and similar variables
+
+2014-12-19  Aharon Robbins  <arnold@skeeve.com>
+
+       dist: adjust warning messages about shar and tarZ deprecation
+
+       They were swapped.  Reported in http://debbugs.gnu.org/19108.
+
+2014-12-18  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       docs: improve description of ${PACKAGE}, ${VERSION}, and similar variables
+
+       In particular, suggesting that $PACKAGE and $VERSION should be aliases of
+       the $PACKAGE_TARNAME and $PACKAGE_VERSION definitions coming from AC_INIT,
+       and not be defined via an obsolete 2-argument invocation of AM_INIT_AUTOMAKE;
+       and why that is the best default, given all our historical baggage.
+
+       See discussion in http://debbugs.gnu.org/16623 for more information and
+       background.
+
+       * doc/automake.texi: Adjust.
+       * THANKS: Update.
+
+2014-12-17  Thomas Jahns  <jahns@dkrz.de>
+
+       Fix dumb logic error preventing $install_sh from being be overridden
+
+       * m4/install-sh.m4: Here.
+       * THANKS: Update.
+
+2014-12-17  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       Merge branches 'pr19311' and 'micro' into minor
+
+       * pr19311:
+         Expose automake bug#19311
+         build: fix race in parallel builds
+
+       * micro:
+         Automake docs: fix typos and use of British English
+         build: fix race in parallel builds
+
+2014-12-17  Karl Berry  <karl@freefriends.org>
+
+       Automake docs: fix typos and use of British English
+
+       * doc/automake.texi: Here.
+
+2014-12-17  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       Expose automake bug#19311
+
+       AC_PROG_CC called before AC_CONFIG_AUX_DIR can silently force wrong
+       $ac_aux_dir definition.
+
+       * t/auxdir-pr19311.sh: New.
+       * t/list-of-tests.mk: Add it as an XFAIL test.
+
+2014-12-17  Paul Eggert  <eggert@cs.ucla.edu>
+
+       build: fix race in parallel builds
+
+       Reported by Friedrich Beckmann in: http://bugs.gnu.org/18301
+       * lib/am/texi-vers.am (?DIRSTAMP?): Put the process-ID into the
+       temporary file name.  Use a similar temporary in the source dir.
+
+2014-08-23  Paul Eggert  <eggert@cs.ucla.edu>
+
+       build: fix race in parallel builds
+
+       Reported by Friedrich Beckmann in: http://bugs.gnu.org/18301
+       * lib/am/texi-vers.am (?DIRSTAMP?): Put the process-ID into the
+       temporary file name.  Use a similar temporary in the source dir.
+
+2014-04-22  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       init: ensure $ac_aux_dir is defined before being used
+
+       Since we use '$ac_aux_dir' to define '$am_aux_dir', we need
+       to ensure the former has been initialized before we try to
+       define the latter, otherwise the definition:
+
+          am_aux_dir=`cd $ac_aux_dir && pwd`
+
+       will set '$am_aux_dir' to '$HOME', likely causing weird and
+       unexpected behaviours.
+
+       This change fixes automake bug#15981.
+
+       * m4/auxdir.m4 (AM_AUX_DIR_EXPAND): AC_REQUIRE expansion
+       of 'AC_CONFIG_AUX_DIR_DEFAULT'. Fix redundant comment and
+       AC_PREREQ, add extra quoting around '$ac_aux_dir'.
+       * t/auxdir-pr15981.sh: New test.
+       * t/auxdir-cc-pr15981.sh: Likewise.
+       * t/list-of-tests.mk (handwritten_TESTS): Add them.
+       * THANKS, NEWS: Update.
+       * bin/automake.in: Fix a harmless typo in comments, that
+       I happened to notice while writing this patch.
+
+2014-04-21  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       plans: enabling subdir-object by default is blocked on bug#13928
+
+2014-04-21  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       maint: update copyright years
+
+       We've been in 2014 already for few months now...
+
+2014-04-21  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       maint: sync files from upstream ("make fetch")
+
+2014-04-21  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       Typofixes in warning messages and manual
+
+       Fixes automake bug#16827 and bug#16997.
+
+2014-04-21  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       Merge branch 'micro' into minor
+
+       * micro:
+         doc: fix encoding error with UTF-8 characters
+
+2014-01-04  Paul Eggert  <eggert@cs.ucla.edu>
+
+       doc: fix encoding error with UTF-8 characters
+
+       * doc/automake.texi: Specify @documentencoding and
+       @documentlanguage, to prevent encoding errors for parts of this
+       input file that are UTF-8.  This also causes the .info output to
+       use curly quotes, which is easier to read though it does assume
+       UTF-8 support.
+
+2013-12-31  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       NEWS: a typofix, and better word wrapping
+
+2013-12-30  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       parallel-tests: avoid possible implicit "make all" in test-suite.log rule
+
+       This change fixes automake bug#16302.
+
+       * lib/am/check.am ($(TEST_SUITE_LOG)): Avoid running "make $redo_logs"
+       when $redo_logs expands to empty, since in that case we are actually
+       ending up invoking a full "make all".  That shouldn't be required, and
+       can cause slowdowns for people implementing their extra "laziness
+       wrappers" around check-TESTS (automake bug#16302).
+       * NEWS: Update.
+
+2013-12-26  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       Allow user to extend .PRECIOUS target
+
+       References:
+       <http://lists.freedesktop.org/archives/systemd-devel/2013-July/012155.html>
+       <http://lists.gnu.org/archive/html/automake/2013-07/msg00011.html>
+
+       * bin/automake.in: Adjust to ensure we handle '.PRECIOUS' the same way
+       we do for '.PHONY' and '.MAKE'.
+       * lib/Automake/Rule.pm: Likewise.
+       * t/precious.sh: New test.
+       * t/list-of-tests.mk: Add it.
+       * t/phony.sh: Enhance a little while at it.
+       * NEWS: Update.
+       * THANKS: Likewise.
+
+       Reported-by: Holger Hans Peter Freyther <holger@freyther.de>
+
+2013-12-26  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       cosmetics: remove a couple of extra trailing white spaces
+
+2013-12-26  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       tests: fix a spurious failure on Mac OS X
+
+       This change fixes bug#14706.
+
+       * lib/depcomp2.sh: Also cater to spurious diagnostic from GNU rm,
+       not only from Apple's rm.
+
+2013-12-26  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       docs: make clear the JAVA primary is frozen
+
+       * doc/automake.texi: Here.  The JAVA primary is broken in several ways,
+       and will no longer be developed, not even for bug fixes.
+
+       See also automake bugs #9088, #8662 and #8540.
+
+2013-12-26  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       Merge branch 'install-sh-improvements' into minor
+
+       * install-sh-improvements:
+         install-sh: a slightly better diagnostic, and tests enhancements
+         install-sh: be stricter in catching invalid usages
+
+2013-12-26  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       install-sh: a slightly better diagnostic, and tests enhancements
+
+       * lib/install-sh: When called with no non-option arguments and the '-t'
+       option with an argument that is not an existing directory, have the
+       diagnostic output complain about the lack of required arguments rather
+       than about the bad argument passed to '-t'.
+       * t/install-sh-unittests.sh: Enhance to also check diagnostic printed
+       in cases of expected failure.
+
+2013-12-26  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       install-sh: be stricter in catching invalid usages
+
+       Such usages (which are rejected by GNU install as well) are:
+
+         - options -d and -t used together;
+
+         - argument passed to option -t must be a directory;
+
+         - if there are two or more SOURCEFILE arguments, the
+           DESTINATION argument must be a directory.
+
+       Note that we still allow the use of options -d and -T together, by
+       making -d take the precedence; this is for compatibility with GNU
+       install.
+
+       This change fixes, among other things, automake bug#15376.
+
+       * lib/install-sh: Adjust.
+       * t/install-sh-unittests.sh: Enhance.
+       * NEWS: Update.
+       * THANKS: Add reporter of bug#15376.
+
+       Helped-by: Tobias Hansen <thansen@debian.org>
+
+2013-12-25  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       tests: more significant names for some tests
+
+       * t/insh2.sh: Rename...
+       * t/dist-install-sh.sh: ... like this.
+       * t/instsh.sh: Rename...
+       * t/add-missing-install-sh.sh: ... like this.
+       * t/instsh2.sh: Rename...
+       * t/install-sh-unittests.sh: ... like this.
+       * t/instsh3.sh: Rename...
+       * t/install-sh-option-C.sh: ... like this.
+       * t/list-of-tests.mk: Adjust.
+
+2013-12-25  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       tests: some cosmetic fixes
+
+       * t/instdat.sh: Here.
+       * t/instdat2.sh: And here.
+       * t/instsh.sh: And here.
+       * t/instsh3.sh: And here.
+
+2013-12-25  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       tests: more significant names for a test
+
+       * t/install2.sh: Rename...
+       * t/dist-with-unreadable-makefile-fails.sh: ... like this.
+       * t/list-of-tests.mk: Adjust.
+
+2013-12-25  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       Merge branches 'fix-pr11814' and 'drop-perl-tap-driver' into minor
+
+       * fix-pr11814:
+         docs: drop a few obsolescent FIXME/TODO comments, and associated text
+         testsuite harness: report test exit status in log file
+
+       * drop-perl-tap-driver:
+         TAP driver: remove perl implementation (move it into contrib/)
+
+2013-12-24  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       docs: drop a few obsolescent FIXME/TODO comments, and associated text
+
+2013-12-24  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       testsuite harness: report test exit status in log file
+
+       The exit status of a test should be reported in the test logs, so
+       that one can see at a glance whether the test has succeeded or failed,
+       without having to look also into the corresponding .trs file.
+
+       This fixes automake bug#11814.
+
+       * lib/test-driver: Also report the test script exit status in the
+       test log (as the last line).
+       * t/check-exit-status-reported.sh: Test this new behaviour.
+       * t/list-of-tests.mk: Add the new test.
+       * t/ax/test-lib.sh( am_exit_trap): No longer log the test exit status;
+       this has been made redundant by the change to 'test-driver'.  While at
+       it, fix an imperfect quoting.
+
+2013-12-24  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       TAP driver: no need to invoke AC_PROG_AWK directly
+
+       It is already required by AM_INIT_AUTOMAKE anyway.
+
+       * doc/automake.texi: Adjust examples.
+       * t/tap-doc2.sh: Adjust documentation-tracking test.
+       * m4/init.m4 (AM_INIT_AUTOMAKE): Explicitly tell that the AC_PROG_AWK
+       requirement is also needed whenever the TAP driver is used.
+
+2013-12-24  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       TAP driver: remove perl implementation (move it into contrib/)
+
+       That implementation was only meant as a standard against which the
+       portable awk+shell implementation was to be measured.  Now, since
+       Automake 1.12, the latter implementation is fully functional and
+       already used in the wild, and in fact feature-par with the perl
+       implementation.  So the perl implementation is now just slowing
+       down and complicating our testsuite.  Let's move it to 'contrib/'
+       (we don't want to remove it, in case someone is actually using it
+       in the wild).
+
+       * lib/tap-driver.pl: Move it ...
+       * contrib/tap-driver.pl: ... here.  While at it, convert quoting
+       `like this' to quoting 'like this', and remove an obsolescent FIXME
+       comment.
+       * lib/Makefile.inc (dist_script_DATA): Drop '%D%/tap-driver.pl'.
+       * Makefile.am (EXTRA_DIST): Add 'contrib/tap-driver.pl'.
+       * doc/automake.texi: Remove one stray reference to 'tap-driver.pl',
+       and reference 'tap-driver.sh' instead, as intended.
+       * t/ax/am-test-lib.sh ($am_tap_implementation): Delete definition and
+       uses.
+       (fetch_tap_driver): Simplify to unconditionally assume the shell+awk
+       implementation of the TAP driver is used.
+       (get_shell_script): Make more flexible so that it can cater to the
+       needs of 'fetch_tap_driver()'.
+       * t/tap-bad-prog.tap: Likewise.
+       * t/tap-bailout-leading-space.sh: Likewise.
+       * t/tap-signal.tap: Likewise.
+       * t/tap-test-number-0.sh: Likewise.
+       * t/test-driver-cond.sh: Use 'tap-driver.sh' instead of 'tap-driver.pl'.
+       * gen-testsuite-part (%test_generators): Do not generate sister tests
+       that use the perl TAP driver rather than the shell+awk one.
+       * NEWS: Update.
+
+2013-12-24  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       NEWS: stop reporting "new" Automake versioning scheme
+
+       It's actually old news by now.
+
+2013-12-24  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       Merge branch 'micro' into minor
+
+       * micro:
+         post-release: micro version bump to 1.14.1a devel version
+         release: stable micro release 1.14.1
+         HACKING: minor clarification
+         tests: make install-info-dir.sh print more debugging info
+         tests: remove too-brittle test tap-realtime.sh
+         maintainer: am-ft: add option to cater to clock skews
+         sync: update INSTALL, config.guess and config.sub from upstream
+         TAP driver: cosmetic fixes
+
+2013-12-24  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       post-release: micro version bump to 1.14.1a devel version
+
+       * configure.ac (AC_INIT): Bump version number to 1.14.1a.
+       * m4/amversion.m4: Likewise (auto-updated by "make bootstrap").
+
+2013-12-24  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       release: stable micro release 1.14.1
+
+       * configure.ac (AC_INIT): Bump version number to 1.14.1.
+       * m4/amversion.m4: Likewise (auto-updated by "make bootstrap").
+
+2013-12-24  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       HACKING: minor clarification
+
+2013-12-23  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       tests: make install-info-dir.sh print more debugging info
+
+       With the hope that this will shed more light on bug#14601
+
+2013-12-23  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       tests: remove too-brittle test tap-realtime.sh
+
+       * t/tap-realtime.sh: Delete.  It has always been brittle, but now
+       it's also causing spurious failures when mawk is used as the awk
+       implementation in tap-driver.sh (see bug#14601).
+       * t/list-of-tests.mk: Adjust.
+
+2013-12-23  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       maintainer: am-ft: add option to cater to clock skews
+
+       * maintainer/am-ft: Add option '-S', giving a number of seconds to sleep
+       after copying the tarball to the remote system and before unpacking,
+       building and testing it.  This is to cater to situations where the clock
+       of the remote system is skewed (in the past) w.r.t. the clock the local
+       system the tarball has been built on.
+
+2013-12-23  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       sync: update INSTALL, config.guess and config.sub from upstream
+
+2013-12-23  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       TAP driver: cosmetic fixes
+
+       * lib/tap-driver.sh: Quote 'like this', not `like this'.  Remove an
+       obsolete FIXME.  Correctly mark another comment as a TODO rather
+       than as a FIXME.
+
+2013-11-02  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       Merge branch 'modernize-install-sh' into minor
+
+       * modernize-install-sh:
+         cosmetics: untabify the install-sh script
+         install-sh: assume that "set -f" and "set +f" work...
+         install-sh: assume ${var:-value} works as expected
+         install-sh: assume 'dirname' is available and working correctly
+
+2013-11-02  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       Merge branch 'micro' into minor
+
+       * micro:
+         cosmetics: fix typo in a user-facing message in tests
+         automake: account for perl hash order randomization
+         tests: avoid use of intervals to capitalize letters
+         distcheck: don't allow overriding of --prefix and --srcdir by the user
+         tests: expose bug#14991 (relates to 'distcheck')
+
+2013-11-02  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       cosmetics: fix typo in a user-facing message in tests
+
+       * t/lex-header.sh: A "skip" message in this test, precisely.
+
+2013-11-01  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       Merge branches 'fix-pr14991' and 'fix-pr14891' into micro
+
+       * fix-pr14991:
+         distcheck: don't allow overriding of --prefix and --srcdir by the user
+         tests: expose bug#14991 (relates to 'distcheck')
+
+       * fix-pr14891:
+         automake: account for perl hash order randomization
+         tests: avoid use of intervals to capitalize letters
+
+2013-10-31  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       automake: account for perl hash order randomization
+
+       Try to explicitly order the keys of some perl hashes when looping
+       on them to do sanity/correctness checks and possibly display warning
+       messages; this should ensure a more reproducible output.  Not really
+       a big deal, but I prefer to keep the order of such output reproducible
+       if possible.
+
+       Issue revealed by spurious testsuite failures with perl 5.18, as
+       reported in automake bug#14891.  See also:
+       <http://search.cpan.org/dist/perl-5.18.0/pod/perldelta.pod#Hash_randomization>
+       <http://onionstand.blogspot.ie/2012/12/are-you-relying-on-hash-keys-being.html>
+
+       * lib/Automake/Variable.pm (variables): Explicitly order the values of
+       the returned Automake::Variable instances.
+       (variables_dump): Simplify, using the knowledge that 'variables()' now
+       sorts its output.
+       * t/preproc-errmsg.sh: Adjust.
+
+2013-10-31  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       tests: avoid use of intervals to capitalize letters
+
+       It was causing spurious failures with with Solaris 8 'tr'.
+       See automake bug#14891.
+
+       * t/test-extensions.sh: Adjust.
+
+2013-10-31  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       cosmetics: untabify the install-sh script
+
+       * lib/install-sh: Here, plus a couple of related formatting tweaks.
+
+2013-10-31  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       install-sh: assume that "set -f" and "set +f" work...
+
+       ... and disable/enable shell globbing, respectively.  This is
+       mandated by POSIX, and supported even by Solaris 9 /bin/sh (one
+       of the most braindead shells we still support).
+
+       * lib/install.sh: Adjust.
+       * NEWS: Update.
+
+2013-10-30  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       install-sh: assume ${var:-value} works as expected
+
+       The Autoconf manual says it is OK these days.
+
+       * lib/install.sh: Adjust.
+       * NEWS: Update.
+
+2013-10-30  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       install-sh: assume 'dirname' is available and working correctly
+
+       Really, we no longer care about hosts so outdated/broken to miss
+       fundamental utilities like basename or dirname.
+
+       * lib/install.sh: Adjust.
+       * NEWS, THANKS: Update.
+
+       Suggested-by: Philipp A. Hartmann <philipp.hartmann@offis.de>
+
+2013-10-30  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       distcheck: don't allow overriding of --prefix and --srcdir by the user
+
+       Not through AM_DISTCHECK_FLAGS, nor through DISTCHECK_FLAGS.  Apparently,
+       some packages got in the habit of relaying all the options passed to the
+       original ./configure invocation through to the configure invocations
+       in "make distcheck".  This was causing problems, because it also passed
+       through the original --srcdir and --prefix options.
+
+       Fixes: expose bug#14991 (relates to 'distcheck')
+
+       * lib/am/distdir.am (distcheck): Pass the hard-coded --srcdir and
+       --prefix options *after* both the developer-defined options in
+       $(AM_DISTCHECK_FLAGS) and the user-defined options in $(DISTCHECK_FLAGS).
+       * t/list-of-tests.mk (XFAIL_TESTS): Remove the now-passing test
+       'distcheck-no-destdist-or-srcdir-override.sh'.
+       * doc/automake.texi (Checking the Distribution): Update.
+       * NEWS: Likewise.
+
+2013-10-30  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       tests: expose bug#14991 (relates to 'distcheck')
+
+       * t/distcheck-no-prefix-or-srcdir-override.sh: New, expose the bug.
+       * t/list-of-tests.mk (handwritten_TESTS, XFAIL_TESTS): Add it.
+
+2013-10-30  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       Merge branch 'micro' into minor
+
+       * micro:
+         tests: fix spurious failure when zip is present but unzip is not
+         tests: fix spurious failure due to localization issues
+         NEWS: update with the changes since v1.14
+         docs: correct typos in the fix-timestamp.sh script
+         python: byte-compile nobase_*_PYTHON files only once
+         cosmetics: typofix in the 'missing' script
+         test: avoid false positives in 'cc-no-c-o' script
+         test harness: improve catching of usage errors in script 'test-driver'
+         tests: fix a spurious failure on NetBSD-current
+         am-ft: make the environment available earlier
+         NEWS: post-release tweaks (for 1.14.x series)
+         tests: avoid a spurious failure on MacOS X 10.6.8
+         tests: don't risk hanging on the 'cl' requirement
+
+2013-10-30  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       tests: fix spurious failure when zip is present but unzip is not
+
+       Fixes automake bug#15181.
+
+       * t/dist-formats.tap (have_compressor): When checking that zip(1), also
+       check for unzip(1), otherwise "make distcheck" will be unable to extract
+       the zip tarball it creates, which will cause spurious failures.  While
+       at it, reorganize the existing code a bit.
+       * THANKS, NEWS: Update.
+
+2013-10-30  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       tests: fix spurious failure due to localization issues
+
+       Fixes automake bug#15237.
+
+       * t/autohdr-subdir-pr12495.sh: Ensure make is run in the C locale, so that
+       we can expect error messages in English when grepping its output.
+       * THANKS, NEWS: Update.
+
+2013-10-30  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       NEWS: update with the changes since v1.14
+
+2013-10-29  Peter Breitenlohner  <peb@mppmu.mpg.de>  (tiny change)
+
+       docs: correct typos in the fix-timestamp.sh script
+
+       * doc/automake.texi: Here.  The original version of this example script
+       makes no sense at all, using 'configure' instead of the intended 'touch'
+       in few key places.
+
+2013-10-28  Benoit Sigoure  <tsunanet@gmail.com>  (tiny change)
+
+       python: byte-compile nobase_*_PYTHON files only once
+
+       * lib/am/python.am: Here. Byte-compiling was occurring inside of
+       a loop, causing an O(n^2) number of byte-compilations instead of
+       O(n).
+
+2013-10-28  Václav Zeman  <vhaisman@gmail.com>  (tiny change)
+
+       cosmetics: typofix in the 'missing' script
+
+       * lib/missing: Here, in a message printed to the user.
+       * THANKS: Update.
+
+2013-07-23  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       Merge branch 'fix-pr14911' into micro
+
+       * fix-pr14911:
+         test: avoid false positives in 'cc-no-c-o' script
+
+2013-07-23  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       Merge branch 'fix-half-pr14760' into micro
+
+       * fix-half-pr14760:
+         tests: fix a spurious failure on NetBSD-current
+
+2013-07-23  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       test: avoid false positives in 'cc-no-c-o' script
+
+       Fixes automake bug#14911.
+
+       * t/ax/cc-no-c-o.in: Be more careful in determining whether both the
+       '-c' and '-o' options have been passed on the command line to the
+       compiler.  In particular, do not spuriously complain in the face of
+       options like '-compatibility_version' or '-current_version' (seen on
+       Mac OS X 10.7).
+       * THANKS: Update.
+
+2013-07-21  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       test harness: improve catching of usage errors in script 'test-driver'
+
+       Fixes automake bug#14840.
+
+       * lib/test-driver: Catch and report usage errors where the caller has
+       forgotten to specify one of the mandatory options (--test-name,
+       --log-file, --trs-file) or has not passed any non-option argument.
+       Also, be sure to work correctly even when no '--' special argument
+       is passed to separate option from non-options arguments.
+       * THANKS: Update.
+
+2013-07-07  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       tests: fix a spurious failure on NetBSD-current
+
+       Reported in automake bug#14760.
+
+       * tests/silent-custom.sh: Be prepared to handle creative
+       quoting in the output of the shell run for the make recipes
+       when the shell traces are active ("set -x").
+
+2013-06-28  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       am-ft: make the environment available earlier
+
+       So that, with a PATH that is updated earlier, we can find the 'xz'
+       program even on systems where it isn't in the default PATH.
+
+       * maintainer/am-ft: Adjust accordingly.
+
+2013-06-27  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       NEWS: post-release tweaks (for 1.14.x series)
+
+2013-06-27  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       tests: avoid a spurious failure on MacOS X 10.6.8
+
+       Fixes automake bug#14706.
+
+       * t/depcomp2.sh: Strip, from the redirected ./configure stderr, the
+       possible error message "rm: conftest.dSYM: is a directory", generated
+       by cleanup code that doesn't cater to the existence of *.dSYM
+       directories sometimes created by the compiler on MacOS X.  This
+       "massaging" of ./configure stderr is legitimate, since the spurious
+       error message is due not to automake-related code, but to a know
+       buglet/limitation of either Autoconf or Mac OS X bundles gcc:
+       <http://lists.gnu.org/archive/html/bug-autoconf/2007-11/msg00017.html>
+       Actually, from that link it appears that the original Autoconf issue
+       had been fixed, but it must have been re-introduced in the meantime :-(
+
+2013-06-27  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       tests: don't risk hanging on the 'cl' requirement
+
+       On the GNU/Linux boxes of some users that run our testsuite there
+       is a '/usr/local/bin/cl' executable, from the IRAF package:
+
+           <http://iraf.noao.edu/>
+
+       The test 'compile4.sh' (and other tests) try to invoke the 'cl'
+       command to check whether it's a Microsoft compiler; the IRAF cl
+       is an interactive program, so it hangs on such invocation.  In
+       conclusion, the testsuite hangs for those users which have the
+       IRAF cl early in PATH.
+
+       Fix the issue by redirecting the input of cl from /dev/null when
+       invoking it, which is enough to prevent the cl program from IRAF
+       from hanging, and should have no effect on the behaviour of the
+       Microsoft compiler.
+
+       This change fixes automake bug#14707.
+
+       * t/ax/am-test-lib.sh (require_tool): Adjust the handling of
+       the 'cl' requirement.
+
+2013-06-21  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       Merge branch 'micro' into minor
+
+       * micro:
+         post-release: micro version bump (1.14.0a)
+
+2013-06-21  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       post-release: micro version bump (1.14a)
+
+       * configure.ac: Bump version: 1.14 -> 1.14a
+       * m4/amversion.m4: Likewise (auto-updated by "make bootstrap").
+
+2013-06-21  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       post-release: micro version bump (1.14.0a)
+
+       * configure.ac: Bump version: 1.14 -> 1.14.0a
+       * m4/amversion.m4: Likewise (auto-updated by "make bootstrap").
+
+2013-06-21  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       Merge branch 'maint' into micro
+
+       * maint:
+         release: stable minor release 1.14
+         NEWS: one more minor fixlet
+         maint: port check-minimal-autoconf to VPATH builds
+         tests: avoid spurious failures in Linux -> MinGW cross-compilation mode
+         tests: simplify checks for some expected variables values in Makefiles
+         NEWS: improve and update wording
+         tests: fix/improve few heading comments
+         coverage: new test on Texinfo @include support
+         tests: tighten a grepping check
+         tests: more significant names for some tests
+         rename-tests: rework some code for clarity and safety
+         tests: cosmetic changes in t/extra-sources.sh
+         rename-tests: inform the user about the pre-filled commit msg
+         typofix: in comments in 'maintainer/rename-tests'
+         rename-tests: also "git add" list-of-tests.mk
+         tests: rename t/exsource.sh -> t/extra-sources.sh
+         tests: some improvements to Gettext tests
+         maint: version bump after beta release 1.13b
+         release: beta release 1.13b (will become 1.14)
+         automake: assume we can always pass '-o' to the C compiler
+         NEWS: fix typo
+         NEWS: on assuming "rm -f" without arguments work
+         docs: AM_PROG_CC_C_O: correct imprecise statements about it
+         NEWS: document deprecation of 'shar' and 'compress' dist formats
+         m4: rename minuso.m4 -> prog-cc-c-o.m4
+         tests: some tests make no sense if "$CC -c -o" doesn't work
+         AM_PROG_CC_C_O: don't rely on AC_PROG_CC_C_O, re-implement similar logic
+         compile: rewrite AC_PROG_CC with AM_PROG_CC_C_O contents
+         tests: avoid few lingering $MAKE redirections
+         tests: fix a spurious failure on NetBSD 5.1
+         texi: build version.texi and stamp-vti in srcdir
+         tests: fix a botched heading comment
+         tests: fix another spurious with FreeBSD make
+         tests: fix a spurious failure with FreeBSD make
+         tests: remove remaining exec bits ('maint' branch)
+         PLANS: subdir-objects: various updates
+         THANKS: update Akim's e-mail address
+         tests: less uses of "make -e"; avoid spurious failures in 'check-cc-no-c-o'
+         build: be more respectful of user-specified verbosity
+         check-cc-no-c-o: unify initializations in a single place
+         check-cc-no-c-o: avoid a spurious failure
+         build: fixup for building in a VPATH setup
+         Use AC_DEFUN_ONCE to define AM_PROG_CC_C_O
+         compile: avoid AC_PROG_CC messy rewrite
+         options: tiny simplification in dealing with incompatible versions
+         options: try to report as much errors as possible
+         refactor: fix few "inverted boolean" usages
+         options: better name for an internal function
+         options: more consistency in use of return statuses to report errors
+         options: tiny simplification in dealing with erroneous opts
+         options: consistently use return statuses to report errors
+         options: re-enable some sanity checks
+         THANKS: update Eric Blake's e-mail address
+         NEWS: typofix
+         news: document new 'subdir-objects' warning
+         PLANS: one minor fixlet (mostly cosmetic)
+         PLANS: we have already dropped support for split info files in master
+         NEWS: fix a reference to Automake 1.14 where Automake 2.0 was intended
+         PLANS: fix reference to non-existent 'next' branch
+         PLANS: fix botched version reference
+         maintcheck: fix two references to old location of aclocal and automake
+         dist: deprecated shar and tar+compress formats
+         am: prefer a shorter idiom where possible
+         maint: re-run "make update-copyright" ...
+         tests: avoid spurious failure with older flex (2.5.4)
+         build: move automake and aclocal in 'bin' subdir
+         build: break up monolithic Makefile.am in subdir-specific fragments
+         maint branch: we are going to become Automake 1.14
+         tests: typofixes in comments in t/preproc-c-compile.sh
+         tests: remove bashism from a test
+         tests: rename some with more descriptive names
+         typofix: in comments in t/extra2.sh
+         tests: fix botched cross-reference in a heading comment
+         automake: refactoring: factor out common cpp-like flags
+         NEWS (mint): reflect new Automake versioning scheme
+         maintcheck: avoid spurious failure
+         perl: perl subroutine prototypes are problematic, don't use them
+         maint: more adjustments to the new versioning scheme
+         cosmetics: fix some "docstring-like" comments in automake
+         style: call perl functions 'like_this()', not '&like_this()'
+         preproc: enhance and extend tests
+         preproc: add support for relative names in included fragments
+         maint: use more perl subroutines prototypes in the automake script
+         build: auto-generate perl subroutines prototypes for automake and aclocal
+         refactor: rip module Automake::Language out of automake script
+         tests: more information about Lex and Yacc programs
+         lint: fix spurious failure for 'sc_rm_minus_f' syntax check
+         maint: bump version 1.13.1a -> 1.13.2a
+         plans: we are not going to remove AM_PROG_MKDIR_P in Automake 1.14
+         init.m4: add probe to check "rm -f" without args work
+         subdir-objects: complain if it isn't enabled
+         plans: update w.r.t. latest changes
+         ywrap: remove an obsolete FIXME comment
+         ywrap: style fixes (no semantic change intended)
+         convenience: "make lint" as an alias for "make maintainer-check"
+         docs: typofix in manual
+         coverage: using multiple lexers in a single program
+         tests: remove most uses of the AM_PROG_CC_C_O obsolete macro
+         coverage: obsolete macro AM_PROG_CC_C_O should cause no warning nor errors
+         INSTALL: update copyright years
+         ithreads: use runtime (not configure time) detection of perl threads
+         copyright: add few missing copyright notices
+         maint: files in PLANS are to be exempted from copyright notice
+         maint: consistently honor the UPDATE_COPYRIGHT_YEAR environment variable
+         copyright: update some copyright years
+         compile: use 'compile' script when "-c -o" is used with losing compilers
+         HACKING: suggest more checks before releasing
+         tests: can fake a compiler not grasping "-c -o" -- globally in all tests
+         sync: update files from upstream with "make fetch"
+         typofix: in comments in GNUmakefile
+         Rename 'maint/' -> 'maintainer/', for Git's sake
+         HACKING: minor typofix
+         HACKING: bug-tracker, the PLANS directory, and how to plan "big" changes
+         HACKING: rewindable branches should live in the 'experimental/*' namespace
+         HACKING: fixlets about git branch rewinding policy
+         HACKING: commit messages are not to follow GCS ChangeLog rules too strongly
+         HACKING: "detailed explanation" in commit messages is almost mandatory
+         HACKING: we use "merge --log" even when merging master
+         HACKING: typofix
+         depend2.am: fix comments on verbosity of compilation rules
+         depend2.am: improve comments a little
+         plans: automake 1.14 is to assume "rm -f" with no args is OK
+         plans: we want to active subdir-objects unconditionally in automake 1.14
+         tests: adjust stale references to old test names
+         tests: rename the last aclocal test with dumb name
+         tests: fix an old botched change to an aclocal test
+         tests: fix some botched inter-test references in heading comments
+         coverage: compile rules used "-c -o" also with losing compilers
+         texi: remove extra verbosity in creation of dirstamp directory
+         coverage: user can avoid distributing '.info' pages
+         plans: add some on-going plans (already registered on the bug tracker)
+         docs: mention dist-hook help for EXTRA_DIST
+         texi: remove workaround for older Texinfo (4.1)
+         NEWS: improve wordings in entry deprecating suffix-less info files
+         build: don't enable 'color-tests' automake option explicitly
+         build: enable all warnings as fatal in our own build system
+         texi: Texinfo sources and CLEANFILES definition should co-exist peacefully
+         tests: make two new test executable
+         runtest: better command line API
+         tests: move runtest.in away from the top-lever directory
+         maint: move more maintainer files in the 'maint/' subdir
+         plans: add the "PLANS" directory
+         tests: more significant names for some tests
+         maint: add some of my maintainer-specific scripts
+         texi: deprecate hack about info files in CLEANFILES variables
+         texi: info files can be generated in the builddir
+
+2013-06-20  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       release: stable minor release 1.14
+
+       * configure.ac (AC_INIT): Bump version number to 1.14.
+       * m4/amversion.m4: Likewise (auto-updated by "make bootstrap").
+
+2013-06-20  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       NEWS: one more minor fixlet
+
+2013-06-19  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       maint: port check-minimal-autoconf to VPATH builds
+
+       * maintainer/maint.mk (check-minimal-autoconf): Here.
+
+2013-06-19  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       tests: avoid spurious failures in Linux -> MinGW cross-compilation mode
+
+       * t/ccnoc-deps.sh: Here.
+       * t/preproc-demo.sh: And here.
+
+2013-06-19  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       tests: simplify checks for some expected variables values in Makefiles
+
+       Do so by using our custom 'is' auxiliary script rather than grepping
+       the output from make.  This is more natural, more robust, and often
+       shorter to write.
+
+       Unfortunately, we can't do that in all cases: sometimes we really need
+       to match the content of a variable against a regular expressions, and
+       we can't know nor are interested in its exact value.
+
+       This is basically a follow-up on commit v1.11-1830-g96401cb of
+       2012-02-08 (tests: better way to compare lists in Makefile rules).
+
+       * t/subst-no-trailing-empty-line.sh: Adjust.
+       * t/pluseq10.sh: Likewise.
+       * t/check5.sh: Likewise, and enhance a little while at it.
+       * t/check7.sh: Likewise.
+       * t/exeext.sh: Likewise.
+
+2013-06-19  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       NEWS: improve and update wording
+
+2013-06-19  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       tests: fix/improve few heading comments
+
+       * t/lflags.sh: Here.
+       * t/lflags-cxx.sh: And here.
+       * t/yflags.sh: And here.
+       * t/yflags-cxx.sh: And here.
+
+2013-06-19  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       coverage: new test on Texinfo @include support
+
+       Backported from the Automake-NG testsuite.
+
+       * t/txinfo-include.sh: New test.
+       * t/list-of-tests.mk: Add it.
+
+2013-06-19  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       tests: tighten a grepping check
+
+       * t/yflags-force-override.sh: Here, by being sure to correctly
+       match an expected literal dot.
+
+2013-06-19  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       tests: more significant names for some tests
+
+       * t/extra2.sh: Rename...
+       * t/extra-sources-no-spurious.sh: ... like this.
+       * t/yflags2.sh: Rename...
+       * t/yflags-cxx.sh: ... like this.
+       * t/lflags2.sh: Rename...
+       * t/lflags-cxx.sh: ... like this.
+
+2013-06-19  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       rename-tests: rework some code for clarity and safety
+
+2013-06-19  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       tests: cosmetic changes in t/extra-sources.sh
+
+       * t/extra-sources.sh: Do not create unneeded C sources.  Add
+       trailing ':' command.
+
+2013-06-19  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       rename-tests: inform the user about the pre-filled commit msg
+
+2013-06-19  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       typofix: in comments in 'maintainer/rename-tests'
+
+2013-06-19  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       rename-tests: also "git add" list-of-tests.mk
+
+2013-06-19  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       tests: rename t/exsource.sh -> t/extra-sources.sh
+
+       * t/exsource.sh: Rename ...
+       * t/extra-sources.sh: ... like this.
+       * t/list-of-tests.mk: Adjust.
+
+2013-06-16  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       Merge branch 'gettext-tests' into maint
+
+       * gettext-tests:
+         tests: some improvements to Gettext tests
+
+2013-06-16  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       tests: some improvements to Gettext tests
+
+       Mostly to bring them more in sync with the ones in Automake-NG.
+       See also commit v1.12.2-824-g5468d52 of 2012-08-10([ng] tests:
+       reorganize gettext tests a bit) in Automake-NG.
+
+       * t/gettext.sh: Rename ...
+       * t/gettext-basics.sh: ... like this, enhance a little, and
+       move checks on requirement of 'config.rpath' out into ...
+       * t/gettext-config-rpath.sh: ... into this new test, and move
+       checks about PR/381...
+       * t/gettext-pr381.sh: ... into this new test.
+       * t/gettext2.sh: Rename ...
+       * t/gettext-external-pr338.sh: ... like this, and enhance a
+       little.
+       * t/gettext3.sh: Rename ...
+       * t/gettext-intl-subdir.sh: ... like this, and add trailing
+       ':' command.
+
+2013-06-14  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       Merge branch 'micro' into maint
+
+       * micro:
+         post-release: micro version bump (1.13.4a)
+         release: stable micro release 1.13.4
+         sync: update config.guess
+
+2013-06-14  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       post-release: micro version bump (1.13.4a)
+
+       * configure.ac: Bump version: 1.13.4 -> 1.13.4a
+       * m4/amversion.m4: Likewise (auto-updated by "make bootstrap").
+
+2013-06-14  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       release: stable micro release 1.13.4
+
+       * configure.ac (AC_INIT): Bump version number to 1.13.4.
+       * m4/amversion.m4: Likewise (auto-updated by "make bootstrap").
+
+2013-06-14  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       sync: update config.guess
+
+       * lib/config.guess: This.  Actually, only the timestamp has been
+       updated (apparently, it was mistakenly not updated in the previous
+       real change to the script).
+
+2013-06-12  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       Merge branch 'micro' into maint
+
+       * micro:
+         THANKS: update e-mall address for Ralf Corsepius
+         lang, suffix rules: don't require C stuff needlessly
+         tests: expose automake bug#14560
+
+2013-06-12  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       Merge branch 'fix-pr14560' into micro
+
+       * fix-pr14560:
+         lang, suffix rules: don't require C stuff needlessly
+         tests: expose automake bug#14560
+
+2013-06-12  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       THANKS: update e-mall address for Ralf Corsepius
+
+2013-06-12  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       lang, suffix rules: don't require C stuff needlessly
+
+       This change fixes automake bug#14560: when two or more user-defined suffix
+       rules were present in a single Makefile.am, automake would needlessly
+       include definition of some make variables related to C compilation in the
+       generated Makefile.in.
+
+       * automake.in (handle_languages): Fix logic to decide whether or not to
+       include definitions of C compilation related variables in the generated
+       Makefile.in: instead of doing so when two or more user-defined suffix
+       rules are seen (which is a completely bogus criterion), do so when two
+       or more compiled languages are used.
+       * lib/Automake/Rule.pm (suffix_rules_count): Remove as no longer used.
+       (@EXPORT): Adjust.
+       * t/list-of-tests.mk (XFAIL_TESTS): No longer list the test script
+       'suffix-extra-c-stuff-pr14560.sh', which now passes.
+       * NEWS: Update.
+
+2013-06-12  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       tests: expose automake bug#14560
+
+       Automake needlessly generates definition of make variables related
+       to C compilation when two or more user-defined suffix rules are
+       present in a single Makefile.am.
+
+       * t/suffix-extra-c-stuff-pr14560.sh: New test, exposing the bug.
+       This test is still xfailing.
+       * t/no-extra-c-stuff.sh: New test, check for a potential related
+       regression.  This regression is not actually present here (so this
+       test passes), but it still took place in our first attempt at
+       fixing bug#14560 -- so this test has proven to be actually useful.
+       * t/no-extra-makefile-code.sh: Improve comments, and tighten the
+       grepping checks a little.
+       * t/list-of-tests.mk (handwritten_TESTS): Add the new tests.
+       (XFAIL_TESTS): Add the new xfailing test.
+
+2013-06-09  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       Merge branch 'micro' into maint
+
+       * micro:
+         maint: add a missing copyright notice
+         sync: update config.guess from upstream
+         tests: expose automake bug#13928
+         comments: fix some out-of-sync refs to test scripts
+         tests: expose automake bug#13940
+
+2013-06-09  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       maint: add a missing copyright notice
+
+       * t/ax/deltree.pl: Here.  Issue revealed by "make update-copyright".
+
+2013-06-09  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       sync: update config.guess from upstream
+
+       * lib/config.guess: Here.
+
+2013-06-08  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       tests: expose automake bug#13928
+
+       * t/subobj-indir-pr13928.sh: New test, still xfailing.
+       * t/subobj-vpath-pr13928.sh: Likewise.
+       * t/list-of-tests.mk (XFAIL_TESTS, handwritten_TESTS): Update.
+
+2013-06-08  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       comments: fix some out-of-sync refs to test scripts
+
+       Those script has been renamed since those comments where written.
+
+       * lib/Automake/Rule.pm: Adjust.
+       * lib/am/distdir.am: Likewise.
+
+2013-06-08  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       tests: expose automake bug#13940
+
+       * t/override-conditional-pr13940.sh: New test, still xfailing.
+       * t/list-of-tests.mk (XFAIL_TESTS, handwritten_TESTS): Add it.
+
+2013-06-03  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       Merge branch 'micro' into maint
+
+       * micro:
+         configure: remove an obsolete TODO comment
+         post-release: micro version bump (1.13.3a)
+         release: stable micro release 1.13.3
+         typofix: fix grammaro in comments in t/tags-pr12372.sh
+
+2013-06-03  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       configure: remove an obsolete TODO comment
+
+       * configure.ac: Here.
+
+2013-06-03  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       post-release: micro version bump (1.13.3a)
+
+       * configure.ac: Bump version: 1.13.3 -> 1.13.3a
+       * m4/amversion.m4: Likewise (auto-updated by "make bootstrap").
+
+2013-06-03  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       release: stable micro release 1.13.3
+
+       * configure.ac (AC_INIT): Bump version number to 1.13.3.
+       * m4/amversion.m4: Likewise (auto-updated by "make bootstrap").
+
+2013-06-03  Peter Rosin  <peda@lysator.liu.se>
+
+       typofix: fix grammaro in comments in t/tags-pr12372.sh
+
+2013-06-03  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       Merge branch 'micro' into maint
+
+       * micro:
+         NEWS: minor fixlets, re-wording, and better text wrapping
+         tests: slightly stricter checks in t/cxx-demo.sh
+         tests: fix spurious failure when 'etags' program is Exuberant Ctags
+         tests: fix spurious failure due to missing sleeps
+
+2013-06-03  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       NEWS: minor fixlets, re-wording, and better text wrapping
+
+2013-06-03  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       tests: slightly stricter checks in t/cxx-demo.sh
+
+       This is a follow-up to the commit fixing automake bug#14493.
+
+       * t/cxx-demo.sh: Also check that the built program returns the
+       correct (i.e., zero) exit status when run.  And improve comments
+       a little while at it.
+
+2013-06-03  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       tests: fix spurious failure when 'etags' program is Exuberant Ctags
+
+       Fixes automake bug#14517.
+
+       * t/tags-pr12372.sh: If the 'etags' program in use supports the
+       '--langmap' option, use it.  That is required to avoid spurious
+       failures with Exuberant Ctags (at least version 5.8), which by
+       default do not generate any tags for file extensions it doesn't
+       recognize.
+
+2013-06-03  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       tests: fix spurious failure due to missing sleeps
+
+       Fixes automake bug#14528.
+
+       * THANKS: Give credit to that bug's original reporter.
+
+       * t/remake-configure-dependencies.sh: Add few missing '$sleep'
+       invocations.  I thought that the sleeps implicit in the configure
+       invocation were enough, but they were not, actually.  Here is what
+       can happen:
+
+         1. The config.status script is generated by a configure run.
+         2. ./config.status and make are run.
+         3. The 'print-version' script is modified.
+         4. Since that script is listed in $(CONFIGURE_DEPENDENCIES),
+            autoconf is re-run.
+         5. On a fast-enough machine, the three steps 2-4 above, even
+            combined, might have taken less than a second to run;
+         6. If the filesystem doesn't have a sub-second timestamp
+            resolution, that means the newly-generated configure has
+            the same timestamp of the old config.status;
+         7. So, config.status is not re-run, and the Makefiles are
+            not updated.
+         8. Spurious failure!
+
+       So we really need more explicit sleeps.
+
+2013-05-31  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       maint: version bump after beta release 1.13b
+
+       * configure.ac (AC_INIT): Bump version number to 1.13c.
+       * m4/amversion.m4: Likewise (auto-updated by "make bootstrap").
+
+2013-05-31  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       release: beta release 1.13b (will become 1.14)
+
+       * configure.ac (AC_INIT): Bump version number to 1.13b.
+       * m4/amversion.m4: Likewise (auto-updated by "make bootstrap").
+
+2013-05-30  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       Merge branch 'micro' into maint
+
+       * micro:
+         maint: support new Automake versioning scheme in tagging/uploading rules
+         announcement: can be generated from development snapshots as well
+         announcement: can be generated from development snapshots as well
+         announcement: be less strict in the paring of NEWS
+         maint: version bump after beta release 1.13.2b
+         release: beta release 1.13.2b (will become 1.13.3)
+         sync: update config.guess from upstream
+
+2013-05-30  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       maint: support new Automake versioning scheme in tagging/uploading rules
+
+       * maint.mk (base_version_rx: Drop.
+       (rx-0, rx-1): New.
+       (stable_major_version_rx, stable_minor_version_rx, beta_version_rx):
+       Update.
+       (stable_micro_version_rx, alpha_version_rx: New.
+       (determine_release_type): Adjust.
+       (web-manual-update): Likewise.
+
+2013-05-30  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       announcement: can be generated from development snapshots as well
+
+       And not only from checkouts corresponding exactly from a beta
+       or stable release.  That was only getting in the way of proper
+       testing for the 'announcement' recipe.
+
+       * maint.mk (determine_release_type): If the make variable
+       DEVEL_SNAPSHOT is set, do not error out if the current version
+       denotes a development snapshot (e.g., "1.13.2c" or "1.99a").
+       (announcement): Relax, by also accepting to run from development
+       snapshots, not only stable or beta releases.  Do so by defining
+       the target-specific variable DEVEL_SNAPSHOT to "yes".
+       (print-release-type): Micro enhancement while at it.
+
+2013-05-30  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       announcement: can be generated from development snapshots as well
+
+       And not only from checkouts corresponding exactly from a beta
+       or stable release.  That was only getting in the way of proper
+       testing for the 'announcement' recipe.
+
+       * maint.mk (determine_release_type): If the make variable
+       DEVEL_SNAPSHOT is set, do not error out if the current version
+       denotes a development snapshot (e.g., "1.13.2c" or "1.99a").
+       (announcement): Relax, by also accepting to run from development
+       snapshots, not only stable or beta releases.  Do so by defining
+       the target-specific variable DEVEL_SNAPSHOT to "yes".
+
+2013-05-30  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       announcement: be less strict in the paring of NEWS
+
+       So that the file generated by "make announcement" is correct also
+       for beta releases.
+
+       * maint.mk (announcement): Relax the awk program processing NEWS a
+       little.
+
+2013-05-30  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       maint: version bump after beta release 1.13.2b
+
+       * configure.ac (AC_INIT): Bump version number to 1.13.2c.
+       * m4/amversion.m4: Likewise (autoupdated by "make bootstrap").
+
+2013-05-30  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       release: beta release 1.13.2b (will become 1.13.3)
+
+       * configure.ac (AC_INIT): Bump version number to 1.13.2b.
+       * m4/amversion.m4: Likewise (auto-updated by "make bootstrap").
+
+2013-05-30  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       sync: update config.guess from upstream
+
+2013-05-30  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       Merge branch 'micro' into maint
+
+       * micro:
+         NEWS: document recent testsuite fixes (MinGW/MSYS related)
+         depcomp: avoid trailing backslash in depfile for depmode=msvc7
+         tests: prune some weed in a non-POSIX test
+         tests: avoid a spurious failure on MSYS
+
+2013-05-30  Peter Rosin  <peda@lysator.liu.se>
+
+       automake: assume we can always pass '-o' to the C compiler
+
+       It is assumed that we can pass -c -o to the C compiler, so remove
+       some special casing and always do that.
+
+       This change is similar in spirit to v1.13.1d-217-g7299c4d "depend: assume
+       we can always pass '-o' to the C compiler"
+
+       This change also happen to fix a testsuite failure
+       (t/silent-many-languages.sh) when mixing MSVC and GNU fortran, which
+       have different default object file extensions (.obj vs. .o). This
+       difference in object file extension is not handled well and caused
+       Automake to look for MSVC objects with .o extension. Always using -o
+       makes MSVC create .o object files and linking succeeds. Not that
+       anybody recommends mixing toolchains or anything.
+
+       * bin/automake.in (handle_languages): Remove conditional modification
+       of 'output_flag' entry for 'c'.
+       (register_language ('name' => 'c')): Add 'output_flag' entry set to '-o'.
+
+2013-05-30  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       NEWS: document recent testsuite fixes (MinGW/MSYS related)
+
+2013-05-30  Peter Rosin  <peda@lysator.liu.se>
+
+       depcomp: avoid trailing backslash in depfile for depmode=msvc7
+
+       When compiling a file without any dependencies (no #includes), the
+       msvc7 depmode (and consequently msvc7msys) generates a depfile
+       Makefile fragment with the last line ending with a backslash. This
+       is less robust than needed.
+
+       Fixes automake bug#14501.
+
+       * lib/depcomp (msvc7): Finish off the depfile Makefile fragment with
+       an empty line.
+       (scriptversion): Update.
+
+2013-05-29  Peter Rosin  <peda@lysator.liu.se>
+           Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       tests: prune some weed in a non-POSIX test
+
+       Fixes automake bug#14494.
+
+       * t/distcheck-pr10470.sh: Make sure the test-driver is installed. Adjust
+       to run_make changes. Adjust grep pattern to match new output.
+
+2013-05-29  Peter Rosin  <peda@lysator.liu.se>
+
+       tests: avoid a spurious failure on MSYS
+
+       Fixes automake bug#14493.
+
+       * t/cxx-demo.sh: Strip CR characters from the program output.
+
+2013-05-29  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       Merge branch 'micro' into maint
+
+       * micro:
+         t/README: document "run_make", discourage "make -e"
+         cosmetics: tiny whitespace fixlets
+         tests: avoid a spurious failure with MSVC
+         tests: avoid a spurious failure on non-POSIX systems
+
+2013-05-29  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       t/README: document "run_make", discourage "make -e"
+
+2013-05-29  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       cosmetics: tiny whitespace fixlets
+
+2013-05-29  Peter Rosin  <peda@lysator.liu.se>
+
+       tests: avoid a spurious failure with MSVC
+
+       Fixes automake bug#14498.
+
+       * t/yacc-bison-skeleton.sh: inline was not standardized prior to C99.
+
+2013-05-29  Peter Rosin  <peda@lysator.liu.se>
+
+       tests: avoid a spurious failure on non-POSIX systems
+
+       Fixes automake bug#14495.
+
+       * t/lex-header.sh: Make sure unistd.h isn't included.
+
+2013-05-29  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       Merge branch 'micro' into maint
+
+       * micro:
+         NEWS: fix typos and grammaros
+         NEWS: document fix for bug#14441
+         Automake::Rule: consistently prepend underscore to private variables
+         Automake::Rule: rename: suffix_rule() -> next_in_suffix_chain()
+         Automake::Rule: adjust comments and POD according to previous changes
+         Automake::Rule: make private variables lexically scoped
+         suffix rules: better distinction between builtin and user-derived
+         Automake::Rule: expose suffix rules as a function, not a scalar
+         tests: expose automake bug#14441
+
+2013-05-29  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       NEWS: fix typos and grammaros
+
+       Reported-by: Peter Rosin <peda@lysator.liu.se>
+
+2013-05-28  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       Merge branch 'suffix-rules-work' into micro
+
+       * suffix-rules-work:
+         NEWS: document fix for bug#14441
+         Automake::Rule: consistently prepend underscore to private variables
+         Automake::Rule: rename: suffix_rule() -> next_in_suffix_chain()
+         Automake::Rule: adjust comments and POD according to previous changes
+         Automake::Rule: make private variables lexically scoped
+         suffix rules: better distinction between builtin and user-derived
+         Automake::Rule: expose suffix rules as a function, not a scalar
+         tests: expose automake bug#14441
+
+2013-05-28  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       NEWS: fix typo
+
+       Reported-by: Peter Rosin <peda@lysator.liu.se>
+
+2013-05-28  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       Merge branch 'micro' into maint
+
+       * micro:
+         NEWS: report recent documentation fix about AM_PROG_MKDIR_P
+         NEWS: Automake 2.0 will assume "rm -f" without args work
+         NEWS: fix a couple of typos in older entries
+
+2013-05-28  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       NEWS: report recent documentation fix about AM_PROG_MKDIR_P
+
+2013-05-28  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       NEWS: Automake 2.0 will assume "rm -f" without args work
+
+2013-05-28  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       NEWS: on assuming "rm -f" without arguments work
+
+2013-05-28  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       NEWS: fix a couple of typos in older entries
+
+2013-05-28  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       Merge branch 'micro' into maint
+
+       * micro:
+         docs: AM_PROG_MKDIR_P: will not be removed in 2.0 release of Automake
+         maint: sanity checks in 'check-minimal-autoconf' convenience target
+         maint: test minimal supported autoconf through convenience target
+         maint: install minimal supported autoconf through convenience targets
+         test-lib: typofix in comments
+
+2013-05-28  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       docs: AM_PROG_MKDIR_P: will not be removed in 2.0 release of Automake
+
+       See the 'PLANS/obsolete-removed/am-prog-mkdir-p.txt' file in the 'maint'
+       branch (as of commit v1.13.2-201-gd99e3f3) for details.
+
+       * doc/automake.texi: Adjust.
+
+2013-05-28  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       docs: AM_PROG_CC_C_O: correct imprecise statements about it
+
+       * doc/automake.texi: Here.
+
+2013-05-28  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       maint: sanity checks in 'check-minimal-autoconf' convenience target
+
+       * maint.mk (check-minimal-autoconf): Here, check that autoconf seems
+       to be locally installed, and that such local install refers to the
+       correct expected minimal version.
+
+2013-05-28  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       maint: test minimal supported autoconf through convenience target
+
+       * maint.mk (check-minimal-autoconf): New convenience target.
+
+2013-05-28  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       maint: install minimal supported autoconf through convenience targets
+
+       To make testing of Automake in conjunction with it easier and more
+       reproducible.  It might be nice to also have convenience targets to
+       actually automatically run the Automake testsuite with such autoconf
+       version, but that is left to later patches.
+
+       * configure.ac: AC_SUBST the definition of $required_autoconf_version.
+       * maint.mk (WGET): Move definition earlier.
+       (gnu-ftp, ac-v, ac-n, ac-p, ac-t, ac-l, ac-d): New auxiliary variables.
+       (fetch-minimal-autoconf, build-minimal-autoconf): New convenience
+       targets.
+       * .gitignore: Update.
+
+2013-05-28  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       NEWS: document fix for bug#14441
+
+2013-05-28  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       Automake::Rule: consistently prepend underscore to private variables
+
+       * lib/Automake/Rule.pm (%suffix_rules): Rename ...
+       (%_suffix_rules): ... like this.
+       (%suffix_rules_builtin): Rename ...
+       (%_suffix_rules_builtin): ... like this.
+       (reset, next_in_suffix_chain, register_suffix_rule, suffix_rules_count):
+       Adjust.
+
+2013-05-28  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       Automake::Rule: rename: suffix_rule() -> next_in_suffix_chain()
+
+       * lib/Automake/Rule.pm (suffix_rule): Rename ...
+       (next_in_suffix_chain): ... like this.
+       (%suffix_rules): Adjust comments.
+       (@EXPORT): Adjust.
+       * automake.in (derive_suffix): Likewise.
+
+2013-05-28  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       Automake::Rule: adjust comments and POD according to previous changes
+
+       * lib/Automake/Rule.pm: Here, in several places.
+       * automake.in (register_language): And a tiny adjustment here as well.
+
+2013-05-28  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       Automake::Rule: make private variables lexically scoped
+
+       * lib/Automake/Rule.pm (@_known_extensions_list): This one.
+       (@_suffixes): And this one.
+       (%_rule_dict): And this one.
+
+2013-05-28  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       suffix rules: better distinction between builtin and user-derived
+
+       Fixes automake bug#14441.
+
+       * lib/Automake/Rule.pm ($_suffix_rules_default): Remove, superseded by ...
+       (%suffix_rules_builtin): ... this lexical variable.
+       ($suffix_rules): Remove, superseded by ...
+       (%suffix_rules): ... this lexical variable.
+       (suffix_rules, suffix_rules_count): Adjust.
+       (register_suffix_rule): Update '%suffix_rules_builtin' rather than
+       '%suffix_rules' if the location (as passed by the '$where' argument)
+       is an "internal" one (doesn't come from user-provided Makefile.am).
+       (reset): Simplify resetting of '%suffix_rules' to the default ones
+       accordingly.
+       * t/list-of-tests.mk (XFAIL_TESTS): Drop test 'suffix-custom-pr14441.sh'.
+
+2013-05-28  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       Automake::Rule: expose suffix rules as a function, not a scalar
+
+       This is just a preparatory refactoring in view of future patches.
+       No semantic change is intended.
+
+       * lib/Automake/Rule.pm ($suffix_rules): Turn from a package-level
+       variable to a lexical variable.
+       (suffix_rule): New function, expose the details of $suffix_rules
+       that are actually required by code outside thus modules --- and
+       only those details, no more.
+       (@EXPORT): Adjust.
+       * automake.in (derive_suffix): Likewise.
+
+2013-05-27  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       tests: expose automake bug#14441
+
+       * t/suffix-custom-pr14441.sh: New test, still failing.
+       * t/list-of-tests.mk (handwritten_TESTS, XFAIL_TESTS): Add it.
+
+       Helped-by: Felix Salfelder <felix@salfelder.org>
+
+2013-05-26  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       test-lib: typofix in comments
+
+       * t/ax/am-test-lib.sh: In here.
+
+2013-05-26  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       Merge branch 'micro' into maint
+
+       * micro:
+         tests: remove an "unworthy" FIXME comment
+         tests: remove one obsolete workaround for long-lifted limitations
+         tests: couple of minor tweaks in demo tests in C++ and Libtool
+
+2013-05-26  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       tests: remove an "unworthy" FIXME comment
+
+       * t/location.sh: Here.
+
+2013-05-26  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       tests: remove one obsolete workaround for long-lifted limitations
+
+       * t/silent-many-languages.sh: Here.
+
+2013-05-26  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       tests: couple of minor tweaks in demo tests in C++ and Libtool
+
+       * t/cxx-lt-demo.sh: Here.
+
+2013-05-26  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       Merge branch 'micro' into maint
+
+       * micro:
+         tests: adjust or remove some obsolete comments
+         tests: remove some useless 'unset' of variables
+
+2013-05-26  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       NEWS: document deprecation of 'shar' and 'compress' dist formats
+
+2013-05-26  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       Merge branch 'prog-cc-c-o-work' into maint
+
+       * prog-cc-c-o-work:
+         tests: some tests make no sense if "$CC -c -o" doesn't work
+         AM_PROG_CC_C_O: don't rely on AC_PROG_CC_C_O, re-implement similar logic
+         compile: rewrite AC_PROG_CC with AM_PROG_CC_C_O contents
+
+2013-05-26  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       m4: rename minuso.m4 -> prog-cc-c-o.m4
+
+       The new name is much clearer.
+
+       * m4/minuso.m4: Rename ...
+       * m4/prog-cc-c-o.m4: ... like this.
+       * m4/Makefile.in (dist_automake_DATA): Adjust.
+
+2013-05-26  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       tests: adjust or remove some obsolete comments
+
+       * t/ax/am-test-lib.sh: Here.
+       * t/distcheck-configure-flags.sh: And here.
+
+2013-05-26  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       tests: remove some useless 'unset' of variables
+
+       They are redundant, now that we no longer call "make -e".
+
+       * t/javaflags.sh: Don't unset JAVAC.
+       * t/lflags.sh: Don't unset LEX.
+       * t/lflags2.sh: Likewise.
+
+2013-05-26  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       Merge branch 'micro' into maint
+
+       * micro:
+         tests: avoid a couple of extra sleep with GNU make
+         NEWS: document testsuite work for 1.13.3
+         lint: remove a couple of obsolete syntax checks
+         lint: cosmetics: use #-comments, not ##-comments
+         lint: cosmetics: some reordering
+         lint: recipes of syntax check require GNU grep; ensure it is used
+         lint: better name for a syntax check
+         tests: rename $am_make_rc_got -> $am_make_rc
+         tests: ensure $required is not set too late
+
+2013-05-26  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       tests: avoid a couple of extra sleep with GNU make
+
+       They are only required by BSD make in order to avoid spurious failures.
+
+       * t/deleted-am.sh: Here.
+       * t/parallel-tests-recheck-pr11791.sh: And here.
+
+2013-05-26  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       NEWS: document testsuite work for 1.13.3
+
+2013-05-25  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       lint: remove a couple of obsolete syntax checks
+
+       * syntax-checks.mk (sc_obsolete_requirements_rules): Remove
+       definition of this variable.
+       (modern-requirement.texi2dvi-o): Likewise.
+       (modern-requirement.makeinfo-html): Likewise.
+       ($(sc_obsolete_requirements_rules)): Remove these obsolete
+       syntax checks.
+
+2013-05-25  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       lint: cosmetics: use #-comments, not ##-comments
+
+       * syntax-checks.mk: Here.  This makes sense because this file is
+       not meant to be processed by Automake, so the ##-comments are not
+       treated specially.
+
+2013-05-25  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       lint: cosmetics: some reordering
+
+       * syntax-checks.mk: Here.
+
+2013-05-25  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       lint: recipes of syntax check require GNU grep; ensure it is used
+
+       * syntax-checks.mk (sc_sanity_gnu_grep): New.
+       ($(syntax_check_rules)): Depend on it.
+
+2013-05-25  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       lint: better name for a syntax check
+
+       * syntax-checks.mk (sc_tests_make_without_am_makeflags): Rename ...
+       (sc_make_without_am_makeflags): ... like this.
+       (syntax_check_rules): Adjust.
+
+2013-05-24  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       tests: rename $am_make_rc_got -> $am_make_rc
+
+       The latter is more natural  More importantly, I keep misspelling
+       the former over and over.
+
+       * t/ax/am-test-lib.sh (run_make): Update.
+       * t/ax/tap-summary-aux.sh: Adjust.
+       * t/ax/testsuite-summary-checks.sh: Likewise.
+       * t/parallel-tests-exit-statuses.sh: Likewise.
+       * t/parallel-tests-extra-programs.sh: Likewise.
+       * t/parallel-tests-fd-redirect-exeext.sh: Likewise.
+       * t/parallel-tests-fd-redirect.sh: Likewise.
+       * t/parallel-tests-fork-bomb.sh: Likewise.
+       * t/parallel-tests-no-spurious-summary.sh: Likewise.
+       * t/parallel-tests-recheck-pr11791.sh: Likewise.
+       * t/parallel-tests-reset-term.sh: Likewise.
+       * t/tap-signal.tap: Likewise.
+       * t/test-driver-acsubst.sh: Likewise.
+       * t/test-driver-cond.sh: Likewise.
+
+2013-05-24  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       tests: some tests make no sense if "$CC -c -o" doesn't work
+
+       So just skip them, to avoid spurious failures when running
+       "make check-no-cc-c-o".
+
+       * t/ax/am-test-lib.sh (require_tool): New requirement '-c-o'.
+       * t/subobj10.sh ($required): Add it.
+       * gen-testsuite-part (%depmodes): Adjust so that tests that
+       use 'makedepend' will be skipped if the compiler is being
+       forced not to grasp "-c -o".
+
+2013-05-24  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       AM_PROG_CC_C_O: don't rely on AC_PROG_CC_C_O, re-implement similar logic
+
+       ** Theoretical problems of AC_PROG_CC_C_O:
+
+         Both cc and $CC are checked to see if they support the '-c' and '-o'
+         options together.
+         This behaviour is highly inconsistent with that of the other macros
+         related to C compiler checks -- which test only $CC.
+         It can also cause unwarranted uses of the 'compile' script on systems
+         where the default 'cc' is inferior, but the user is compiling with a
+         proper, different compiler (e.g., gcc).
+
+       ** Practical problems with our previous implementation of C support m4
+          macros in Automake:
+
+         - AM_PROG_AR must now be called *before* AC_PROG_CC; this wasn't the
+           case before, and it turns out there are packages in the wild that
+           relied on the old behaviour.
+
+         - The cross-referenced requirements and macro rewrites juggled among
+           AC_PROG_CC, AC_PROG_CC_C_O and AM_PROG_CC_C_O caused warnings in
+           autoconf; for example, in our test 't/libobj3.sh', we could see
+           warnings like these (here slightly tweaked for legibility):
+
+               configure.ac:5: AC_REQUIRE: `AC_PROG_CC' expanded before required
+               autoconf/c.m4:567: AC_PROG_CC_C_O is expanded from...
+               autoconf/c.m4:429: AC_LANG_COMPILER(C) is expanded from...
+               autoconf/lang.m4:329: AC_LANG_COMPILER_REQUIRE is expanded from...
+               autoconf/general.m4:2606: AC_COMPILE_IFELSE is expanded from...
+               m4sugar/m4sh.m4:639: AS_IF is expanded from...
+               autoconf/general.m4:2031: AC_CACHE_VAL is expanded from...
+               autoconf/general.m4:2052: AC_CACHE_CHECK is expanded from...
+               aclocal.m4:70: AM_PROG_AR is expanded from...
+               configure.ac:5: the top level
+
+       ** Fix all of that:
+
+       We fix all of the described issues with a new internal m4 macro
+       _AM_PROG_CC_C_O (inspired to, but not based on, AC_PROG_CC_C_O) that
+       gets tacked on to AC_PROG_CC automatically (this is done in the
+       Automake-generated aclocal.m4) and that takes care of checking and
+       adjusting '$CC' for "-c -o" support.
+
+       The macro AM_PROG_CC_C_O is still present, but is now just a thin
+       wrapper around such Automake-enhanced AC_PROG_CC.
+
+       It is worth noting that the present patch causes three slight
+       *backward-incompatibilities*:
+
+         1. The name cache variable used by AM_PROG_CC_C_O is no longer
+            computed (at configure runtime!) from the content of '$CC',
+            but is statically defined as 'am_cv_prog_cc_c_o'.
+
+         2. 'cc' is no longer checked by AM_PROG_CC_C_O, only '$CC' is.
+
+         3. AM_PROG_CC_C_O no longer AC_DEFINE the C preprocessor symbol
+            'NO_MINUS_C_MINUS_O'.
+
+       Given however that the third change can easily be worked around, that
+       the first two changes can be legitimately seen as bug fixes, and that
+       the new semantics introduced by such changes will simplify the transition
+       to Automake 2.0 (when the 'subdir-objects' will always be enabled
+       unconditionally), we believe they are acceptable to be shipped with
+       Automake 1.14.
+
+       With this patch, we also revert some of the testsuite adjustments done
+       in previous commit v1.13.2-178-g9877109 of 2013-05-24 (compile: rewrite
+       AC_PROG_CC with AM_PROG_CC_C_O contents).  Such adjustments are no longer
+       needed.
+
+       * m4/minuso.m4 (_AM_PROG_CC_C_O): New internal macro, basically and
+       adjusted version of a merge between Autoconf-provided AC_PROG_CC_C_O
+       and our old implementation of AM_PROG_CC_C_O.
+       (AM_PROG_CC_C_O): Redefine as a simple wrapper around AC_PROG_CC.
+       * m4/init.m4 (AC_PROG_CC): Append _AM_PROG_CC_C_O, not AM_PROG_CC_C_O,
+       to the pre-existing expansion of this macro.
+       * m4/ar-lib.m4 (AM_PROG_AR): No longer require it to be expanded after
+       AC_PROG_CC.
+       * t/aclocal-deps.sh: Move AC_PROG_CC invocation after AC_PROG_RANLIB
+       and AM_PROG_AR invocations.  Things should work this way too (as they
+       used to).
+       * t/subobj-clean-lt-pr10697.sh: Likewise.
+       * t/alloca.sh: Move AC_PROG_CC invocation after AM_PROG_AR invocation.
+       * t/condlib.sh: Likewise.
+       * t/aclocal-deps.sh: Move AC_PROG_CC invocation after LT_INIT and
+       AM_PROG_AR invocations.  Make autoconf and autoheader warnings fatal.
+       * t/am-prog-cc-c-o.sh: Adjust to the new semantics, enhance a  little,
+       and reduce code duplication.
+       * t/ccnoco.sh: Make autoconf warnings fatal.
+       * t/subpkg.sh: Likewise.
+       * t/ccnoco-lib.sh: Likewise, and fix a comment.
+       * t/link_cond.sh: Enhance a couple of error messages.
+       * configure.ac: Drop "nullification" of AM_PROG_CC_C_O.
+       * NEWS: Adjust.
+
+2013-05-24  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       compile: rewrite AC_PROG_CC with AM_PROG_CC_C_O contents
+
+       This is a much simpler rewrite than the one we attempted in the past,
+       and that was later removed by commit 'v1.13.1d-137-g32eb770' of
+       2013-05-11 (compile: avoid AC_PROG_CC messy rewrite).
+
+       Not only this change simplifies the code a little, but has the welcome
+       collateral effect of making automatic dependency tracking work better
+       with compilers that doesn't grasp the '-c' and '-o' options together.
+       Issues in that setup have been caught by several failures in the target
+       'check-no-cc-c-o'.
+
+       Unfortunately, this change has less welcome collateral effects:
+
+         1. AM_PROG_AR must now be called *after* AC_PROG_CC;
+
+         2. Autoconf emits extra warnings when used with Automake-generated
+            aclocal.m4.
+
+       These are unacceptable regressions for a release, but since we are
+       going to fix them soon enough in a follow-up patch (surely to be
+       applied before Automake 1.14 is released) we don't worry too much.
+
+       * m4/init.m4: Redefine AC_PROG_CC early, to automatically invoke
+       AM_PROG_CC_C_O as well.  Accordingly, drop now-unneeded "automagical"
+       AM_PROG_CC_C_O expansion at later time (which took place thanks to
+       a AC_CONFIG_COMMANDS_PRE call).
+       * m4/minuso.m4 (AM_PROG_CC_C_O): Ensure the expansion of the body
+       of this macro takes place with C as "current Autoconf language" (use
+       AC_LANG_PUSH/AC_LANG_POP).
+       * m4/ar-lib.m4 (AM_PROG_AR): Likewise.  Also, require this macro to
+       be expanded *after* AC_PROG_CC (so that any rewrite of $CC, if required,
+       has already taken place).
+       * t/add-missing.tap: Adjust to avoid spurious failures.
+       * t/aclocal-deps.sh: Likewise, by having AM_PROG_AR called *after*
+       AC_PROG_CC.
+       * t/subobj-clean-lt-pr10697.sh: Likewise.
+       * t/alloca.sh: Likewise.
+       * t/condlib.sh: Likewise.
+       * t/discover.sh: Likewise.
+       * t/objc-megademo.sh: Likewise.
+       * t/ccnoco.sh: Extend a little.
+       * t/ccnoco-deps.sh: New test.
+       * t/ccnoco-lib.sh: Likewise.
+       * t/ccnoco-lt.sh: Likewise.
+       * t/list-of-tests.mk: Add them.
+
+2013-05-24  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       tests: ensure $required is not set too late
+
+       And do so in a safer way, with a runtime check rather than a brittle
+       static maintainer check.
+
+       * t/ax/test-init.sh: Set the 'required' variable to readonly.
+       * syntax-checks.mk (sc_tests_required_after_defs): Remove.
+       (syntax_check_rules): No longer list it.
+
+2013-05-24  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       Merge branch 'micro' into maint
+
+       * micro:
+         tests: use append mode to capture parallel make output
+         tests: new convenience target 'check-parallel'
+
+2013-05-24  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       tests: use append mode to capture parallel make output
+
+       This will allow us to run the Automake testsuite forcing all the make
+       invocations in the test cases to run in parallel mode [1], but without
+       hitting the spurious failure reported in automake bug#11413.
+
+       See also:
+       <http://lists.gnu.org/archive/html/bug-make/2013-05/msg00135.html>
+
+       The make invocations in the test cases can be forced to run in parallel
+       mode by, e.g., invoking "make check" like this:
+
+             make check AM_TESTSUITE_MAKE="make -j16"
+
+       The possible spurious failures hinted above are due to the fact that
+       the redirected output of parallel make can racily lose lines.  For
+       example, if GNU make (3.82) is run with -j10 on a Makefile like this:
+
+           all = 0 1 2 3 4 5 6 7 8 9
+           default: $(all)
+           $(all):
+                   @sleep 0.$$(($RANDOM % 10)); echo $@
+
+       and has its standard output redirected in overwrite-mode to a regular
+       file, it looses a line of that output every 15 runs or so on a Fedora
+       17 system with 64 ppc64 cores.  Redirection in append mode does not
+       suffer of this problem, as explained here:
+       <http://lists.gnu.org/archive/html/automake-patches/2009-03/msg00073.html>
+
+       See also previous commits v1.12-63-g45c1fcd of 2012-05-05 (tests: use
+       append mode to capture parallel make output) and Release-1-10-280-g6426999
+       of 2009-03-10 (Use append mode to capture parallel test output).
+
+       * t/ax/am-test-lib.sh (run_make): Adjust and enhance.
+       * t/lisp8.sh: Take advantage of the enhancement, nd stop doing output
+       redirection for $MAKE by hand.
+       * t/tap-more.sh: Likewise.
+       * t/parallel-tests-concurrency.sh: Likewise.
+
+2013-05-24  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       tests: new convenience target 'check-parallel'
+
+       To force the test scripts to invoke make in parallel mode.  This should
+       enhance coverage of use cases (make concurrency) that are becoming more
+       and more important with today multicore fast machines.
+
+       * Makefile.am (check-parallel): New .PHONY target.
+
+2013-05-23  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       tests: avoid few lingering $MAKE redirections
+
+       These were present in the 'maint' branch, but not in the 'micro' branch.
+       Their occurrences has been found by the 'sc_tests_no_run_make_redirect'
+       maintainer check.
+
+       * t/fort2.sh: Adjust.
+       * t/preproc-demo.sh: Likewise.
+
+2013-05-23  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       Merge branch 'micro' into maint
+
+       * micro:
+         tests: avoid '$MAKE' redirections, use 'run_make' instead
+         tests: avoid use of redirected 'run_make' invocations
+         lint: warn against redirected 'run_make' invocations
+         comments: next GNU make release 4.0, not 3.83
+         tests: fix a potential spurious failure due to global config.site
+         HACKING: it's OK to do testsuite refactoring in a micro version
+
+2013-05-23  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       tests: avoid '$MAKE' redirections, use 'run_make' instead
+
+       The use 'run_make' with  the -E, -O and -M option, it is more
+       idiomatic now.  Also, this way, centralized fixes and improvements
+       done in 'run_make' will automatically propagate through most of
+       the testsuite.
+
+       * syntax-checks.mk (sc_tests_no_run_make_redirect): Also check against
+       '$MAKE' invocations that uses output redirections (and not only against
+       'run_make' invocation that do so).
+       * Several tests: Adjust (and few minor cosmetic changes as well, while
+       at it).
+
+2013-05-22  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       tests: avoid use of redirected 'run_make' invocations
+
+       Instead, properly use the -E, -O, or -M options of run_make.
+       The occurrences of the 'run_make' invocations using output
+       redirection has been found by the recently-introduced maintainer
+       check 'sc_tests_no_run_make_redirect'.
+
+       * t/ax/tap-summary-aux.sh: Adjust.
+       * t/ax/testsuite-summary-checks.sh: Likewise.
+       * Several other tests: Likewise.
+
+2013-05-22  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       lint: warn against redirected 'run_make' invocations
+
+       The testsuite shell function 'run_make()' has the three options
+       -E, -O and -M to perform the various kind of output redirections,
+       so the test scripts should use them instead of redirecting the
+       output "by hand":
+
+           run_make ARGS >stdout           =>  run_make -O ARGS
+           run_make ARGS >stderr           =>  run_make -E ARGS
+           run_make ARGS >stdout 2>stderr  =>  run_make -O -E ARGS
+           run_make ARGS >output 2>&1      =>  run_make -M ARGS
+
+       See the commit message of v1.13.2-13-gc7cfa09, 2013-05-22
+       (tests: run_make: options to do command redirection) for an
+       explanation of why this is a good idea.
+
+       It's worth noting that the present patch only introduced a new
+       static maintainer check looking against the undesired idioms,
+       but doesn't yet remove usages of such idioms from the testsuite.
+       That will be done by follow-up patch(es).
+
+       * syntax-checks.mk (sc_tests_no_run_make_redirect): New check.
+       (syntax_check_rules): List it.
+
+2013-05-22  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       comments: next GNU make release 4.0, not 3.83
+
+       See: <http://lists.gnu.org/archive/html/bug-make/2013-05/msg00093.html>
+
+       * lib/am/header-vars.am (am__make_running_with_option): Adjust
+       comments.
+
+2013-05-22  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       tests: fix a potential spurious failure due to global config.site
+
+       * t/instdir-no-empty.sh: Here.
+
+2013-05-22  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       HACKING: it's OK to do testsuite refactoring in a micro version
+
+       Reported-by: Peter Rosin <peda@lysator.liu.se>
+
+2013-05-22  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       Merge branch 'micro' into maint
+
+       * micro:
+         tests: remove some code duplication
+         cosmetics: remove a couple of extra whitespaces in tests
+         tests: two minor fixups
+
+2013-05-22  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       tests: remove some code duplication
+
+       * t/ax/am-test-lib (null_install): New function.
+       * t/instdir-java.sh: Use it instead of copied & pasted code.
+       * t/instdir-lisp.sh: Likewise.
+       * t/instdir-ltlib.sh: Likewise.
+       * t/instdir-prog.sh: Likewise.
+       * t/instdir-python.sh: Likewise.
+       * t/instdir-texi.sh: Likewise.
+       * t/instdir.sh: Likewise.
+       * t/instdir2.sh: Likewise.
+
+2013-05-22  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       cosmetics: remove a couple of extra whitespaces in tests
+
+       * t/instdir.sh: Here.
+       * t/instdir2.sh: And here.
+
+2013-05-22  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       tests: two minor fixups
+
+       * t/make-keepgoing.tap: Here.
+       * t/parallel-tests-exit-statuses.sh: And here.
+
+2013-05-22  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       Merge branch 'micro' into maint
+
+       * micro:
+         tests: run_make: options to do command redirection
+         tests: only activate 'unset' alias if required
+         tests: better idiom to override make macro defs on the cmdline
+         test-lib: minor style changes
+         test-lib: fix botched function name in an error message
+
+2013-05-22  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       tests: run_make: options to do command redirection
+
+       Let's improve the API of the 'run_make()' helper shell function by
+       adding three new options:
+
+         -O   Save the standard output from make on disk, in a regular file
+              named 'stdout'.
+
+         -E   Save the standard error from make on disk, in a regular file
+              named 'stderr'.
+
+         -M   Save both the standard output and standard error from make on
+              disk, in a regular file named 'output'. This option supersedes
+              both the '-O' and '-E' options.
+
+       This new API has two main advantages.
+
+         1. Its use will allow us to get rid of more cumbersome idioms
+            like, e.g.,
+
+              $MAKE check >stdout && { cat stdout; exit 1; }
+              cat stdout
+
+            That can now be substituted with a simpler one:
+
+              run_make -e FAIL -O check
+
+         2. More importantly, using the new API we will prevent any extra output
+            from the shell traces of the code in run_make to be redirected along
+            with the make stderr (where that was redirected).  This problem was
+            present in usages like, e.g.,
+
+              run_make TESTS=foo.test check 2>stderr && exit 1
+              grep 'expected error message' stderr
+
+            Such usages are now to be rewritten as follows:
+
+              run_make -e FAIL -E TESTS=foo.test check
+              grep 'expected error message' stderr
+
+            ensuring that 'stderr' won't end up containing unrelated stuff.
+
+       Note that we do not convert in bulk the old idioms and the use of
+       redirected 'run_make' invocations with this patch.  We only convert
+       some occurrences, to ensure that the new implementation of 'run_make'
+       is sound enough.  More sweeping conversions will likely be done in
+       follow-up patches.
+
+       * t/ax/am-test-lib.sh (run_make): Enhance and implement the extended API.
+       * t/tap-xfail-tests.sh: Use the new 'run_make' API.
+       * t/test-driver-cond.sh: Likewise.
+       * t/tests-environment-fd-redirect.sh: Likewise.
+       * t/uninstall-fail.sh: Likewise.
+       * t/yacc-dist-nobuild.sh: Likewise.
+
+2013-05-22  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       tests: only activate 'unset' alias if required
+
+       This makes the test logs easier to read for most shells (which do not
+       actually require that alias).  This is especially important now that
+       'unset' is used in the new 'run_make()' function, and that function is
+       likely going to be used more and more in the future.
+
+       * t/ax/test-lib.sh (_am_unset, unset): Only define this function and
+       alias if "unset VAR" returns a non-zero exit status when VAR is already
+       unset.
+
+2013-05-22  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       tests: better idiom to override make macro defs on the cmdline
+
+       We now do so with a new wrapper shell function 'run_make()', which
+       relies on the use of AM_MAKEFLAGS, avoiding the use of the '-e' make
+       option.  The use of that option (that causes the environment variables
+       to take precedence over the macro definitions in the Makefile) has
+       proved to be quite brittle in the past, causing annoying and sometimes
+       problematic spurious failures.  This has worsened in some still
+       unpublished work going on in development branches.  It's time to solve
+       the issue once and for all.
+
+       Note that we do not convert all uses of $MAKE in the testsuite right
+       away; we might do so in follow-up changes, with leisure, to avoid a
+       "patch bomb" effect (this commit is already too much of a bomb itself).
+       What we do in this commit is to get rid of all "$MAKE -e" invocations.
+
+       We admit that the implementation and feature-set of 'run_make()' are
+       far from perfect, but good enough for our current purposes.  We'll
+       improve 'run_make()' if and when the need arises.
+
+       * syntax-checks.mk (sc_tests_no_make_e): New syntax check, guard against
+       the use of "$MAKE -e".
+       (syntax_check_rules): Add it.
+       (sc_tests_overriding_macros_on_cmdline): Adjust.
+       (lint): New, alias for 'maintainer-check', for lazy typists.  Idea
+       backported from the 'maint' branch (Automake 1.13a).
+       * t/ax/am-test-lib.sh (run_make): New function.  Run $MAKE with the
+       given command-line arguments, handling command-line override of variable
+       definitions in a smart way (using AM_MAKEFLAGS if a non-GNU make
+       implementation is detected to be in use).
+       (useless_vpath_rebuild): Adjust to use 'run_make', to avoid a spurious
+       maintainer check failure.
+       (yl_distcheck): Use 'run_make' rather than bare '$MAKE'.
+       (single_quote, append_single_quoted, is_valid_varname): New auxiliary
+       function, used, directly or indirectly, by it.
+       * Many tests: Adjust to avoid the use of "$MAKE -e", and prefer the
+       use of 'run_make' in few other contexts as well, where it makes sense.
+       Other minor fixlets while at it.
+
+2013-05-20  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       test-lib: minor style changes
+
+       * t/ax/am-test-lib.sh (require_tool): Here.
+
+2013-05-20  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       test-lib: fix botched function name in an error message
+
+       * t/ax/am-test-lib.sh (useless_vpath_rebuild): Here.
+
+2013-05-20  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       Merge branch 'micro' into maint
+
+       * micro:
+         maintcheck: minor tweaks and fixlets
+
+2013-05-20  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       maintcheck: minor tweaks and fixlets
+
+       * syntax-checks.mk: Here.
+
+2013-05-19  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       tests: fix a spurious failure on NetBSD 5.1
+
+       * t/dist-shar.sh ($required): Also require the 'unshar' program.
+       Apparently, NetBSD has a 'shar' program but not the corresponding
+       'unshar' one.
+
+2013-05-19  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       texi: build version.texi and stamp-vti in srcdir
+
+       Do so even when the 'info-in-builddir' option is present, or when
+       the corresponding '*.info' files are listed in $(CLEANFILES) or in
+       $(DISTCLEANFILES).
+
+       This fixes failures in the following tests, when they are run with
+       $MAKE pointing to FreeBSD make:
+
+           - txinfo-nodist-info.sh
+           - txinfo23.sh
+           - txinfo24.sh
+           - txinfo28.sh
+           - txinfo25.sh
+
+       BTW, notice that the test 'txinfo-builddir.sh' fails with FreeBSD make
+       as well, but that is due to a known FreeBSD make VPATH issue (the same
+       described in automake bug#7884).  But that is not a regression, since
+       the 'info-in-builddir' option will be new in Automake 1.14.  Moreover,
+       we already warn in the manual that the use of that option can indeed
+       cause problems with VPATH builds done by non-GNU make.
+
+       * bin/automake.in (handle_texinfo_helper): New local variable
+       '$soutdir'.  Use it instead of '$outdir' where appropriate (in
+       particular, in the transform used on file 'texi-vers.am'.
+       * t/txinfo-builddir.sh: Adjust to avoid spurious failures.
+
+2013-05-19  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       tests: fix a botched heading comment
+
+       * t/parallel-tests-recheck-pr11791.sh: Here.
+
+2013-05-19  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       tests: fix another spurious with FreeBSD make
+
+       * t/parallel-tests-recheck-pr11791.sh: Here.
+
+2013-05-19  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       tests: fix a spurious failure with FreeBSD make
+
+       Failures due to known VPATH support issues in that make implementation
+       (the same issues that have been causing the long-standing bug#7884).
+
+       * t/lex-multiple.sh: Adjust.
+
+2013-05-18  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       Merge branch 'micro' into maint
+
+       * micro:
+         lisp: fix a failure with Solaris /usr/xpg4/bin/sh
+         tests: sanitize 'unset' usages
+         tests: fix some botched/outdated comments
+         tests: use perl, not find+rm, to remove temporary directories
+
+2013-05-18  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       lisp: fix a failure with Solaris /usr/xpg4/bin/sh
+
+       * lib/am/lisp.am (.el.elc): By initializing the 'am__dir' properly
+       here.  For most shells, the lacking initialization, while technically
+       incorrect, didn't cause any issue in practice, because in those shells
+       "test -d" returns an exit status of 0. But with /usr/xpg4/bin/sh, the
+       shell complains like this: "test: argument expected", and returns a
+       non-zero exit status.  This caused testsuite failures in several lisp
+       tests.
+       Also, while we are at it, use more proper quoting in the recipe, to
+       ensure a missing initialization to now be caught by more forgiving
+       shells as well.
+       * NEWS: Update.
+
+2013-05-17  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       tests: sanitize 'unset' usages
+
+       In some shells (e.g., Solaris 10 /bin/ksh, or NetBSD 5.1 /bin/sh),
+       "unset VAR" returns a non-zero exit status in case the VAR variable
+       is already unset.  This doesn't interact well with our usage of
+       "set -e" in the testsuite.  So far, we've avoided spurious failures
+       by either explicitly ignoring the exit status from unset:
+
+           unset VAR || :
+
+       or explicitly ensuring that a variable is set, before trying to
+       unset it:
+
+           VAR=; unset VAR
+
+       But we can do better, by aliasing the 'unset' command to a custom
+       function that will take care of these details for us.  This will
+       avoid us annoying spurious failures in the future, failures that
+       have already bitten us too much times.  For an example, refer to
+       commit 'v1.12.2-88-g5b1dae5' of 2012-08-05 (tests: avoid tons of
+       spurious failures on NetBSD).
+
+       * t/ax/test-lib.sh (_am_unset): New function.
+       (unset): New alias to it.
+       (_am_exit): Adjust comments.
+       * t/ax/am-test-lib.sh: No need to temporary disable the 'errexit'
+       shell flag when unsetting variables that are potentially already
+       unset.
+       (am_process_requirements): Adjust to remove a now-useless
+       workaround related to unset.
+       * t/aclocal-macrodir.tap: Likewise.
+       * t/aclocal-macrodirs.tap: Likewise.
+       * t/auxdir-autodetect.sh: Likewise.
+       * t/ax/am-test-lib.sh: Likewise.
+       * t/ax/test-lib.sh: Likewise.
+       * t/check-tests-in-builddir.sh: Likewise.
+       * t/dist-formats.tap: Likewise.
+       * t/distcheck-configure-flags-am.sh: Likewise.
+       * t/distcheck-configure-flags.sh: Likewise.
+       * t/java-empty-classpath.sh: Likewise.
+       * t/javaflags.sh: Likewise.
+       * t/lflags.sh: Likewise.
+       * t/lflags2.sh: Likewise.
+       * t/lisp-flags.sh: Likewise.
+       * t/lisp6.sh: Likewise.
+       * t/missing-auxfile-stops-makefiles-creation.sh: Likewise.
+       * t/parallel-am.sh: Likewise.
+       * t/parallel-am2.sh: Likewise.
+       * t/parallel-am3.sh: Likewise.
+       * t/parallel-tests-log-override-recheck.sh: Likewise.
+       * t/pkg-config-macros.sh: Likewise.
+       * t/python-missing.sh: Likewise.
+       * t/python-too-old.sh: Likewise.
+       * t/python11.sh: Likewise.
+       * t/self-check-dir.tap: Likewise.
+       * t/self-check-report.sh: Likewise.
+       * t/self-check-seq.tap: Likewise.
+       * t/silent-configsite.sh: Likewise.
+       * t/suffix6c.sh: Likewise.
+       * t/tar-override.sh: Likewise.
+       * t/tests-environment-and-log-compiler.sh: Likewise.
+       * t/vala-configure.sh: Likewise.
+       * t/werror3.sh: Likewise.
+       * t/yflags-cmdline-override.sh: Likewise.
+       * t/yflags.sh: Likewise.
+       * t/yflags2.sh: Likewise.
+
+2013-05-17  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       tests: fix some botched/outdated comments
+
+       * t/ax/test-defs.in: Here.  Also, fix a couple of grammaros while at it.
+
+2013-05-16  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       tests: use perl, not find+rm, to remove temporary directories
+
+       The File::Path::rmtree function from perl, if used right, is
+       more reliable and more portable of our past idiom:
+
+           find $dirs -type d ! -perm -700 -exec chmod u+rwx {} ';';
+           rm -rf $$dirs || exit 1
+
+       at least of the face of unreadable dirs/files and other similar
+       permission issues (and we have those in our test directories).
+
+       In fact, this change fixes some spurious failures seen in
+       "make distcheck" on Solaris 10.
+
+       * t/ax/deltree.pl: New.
+       * Makefile.am (EXTRA_DIST): Add it.
+       (clean-local-check): Use it.
+       * t/ax/test-lib.sh (rm_rf_): Use it.
+
+2013-05-16  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       tests: remove remaining exec bits ('maint' branch)
+
+       The executable bit gives the impression that the tests are directly
+       runnable, as with "./t/foo.sh", but it has been a while since that
+       was the case.  Today, tests are runnable only through "make check"
+       or "./runtest".
+
+       This change is for the 'maint' branch (automake 1.13a), and is a
+       follow-up to commit 'v1.13.2-3-g74017b5', done on the 'micro' branch
+       (automake 1.13.2a).  It will soon be followed by a similar patch
+       for the 'master' branch (automake 1.99a).
+
+       * t/am-prog-cc-c-o.sh: Remove executable bit.
+       * t/ccnoco4.sh: Likewise.
+       * t/dist-shar.sh: Likewise.
+       * t/dist-tarZ.sh: Likewise.
+       * t/lex-multiple.sh: Likewise.
+       * t/preproc-basics.sh: Likewise.
+       * t/preproc-c-compile.sh: Likewise.
+       * t/preproc-demo.sh: Likewise.
+       * t/preproc-errmsg.sh: Likewise.
+       * t/rm-f-probe.sh: Likewise.
+       * t/self-check-cc-no-c-o.sh: Likewise.
+       * t/txinfo-builddir.sh: Likewise.
+       * t/txinfo-nodist-info.sh: Likewise.
+
+2013-05-16  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       Merge branch 'micro' into maint
+
+       * micro:
+         tests: remove exec bit from all of them ('micro' branch)
+         maint: tests no longer need to have executable bit set
+
+2013-05-16  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       tests: remove exec bit from all of them ('micro' branch)
+
+       It gives the impression that they are directly runnable, as with
+       "./t/foo.sh", but it has been a while since that was the case.  Today,
+       tests are runnable only through "make check" or "./runtest".
+
+       This change is for the 'micro' branch (automake 1.13.2a).  It will
+       soon be followed by similar patches for the 'maint' branch (automake
+       1.13a) and the 'master' branch (automake 1.99a).
+
+       * t/*.sh, t/*.tap: Remove executable bit.
+       * maint.mk (sc_tests_executable): Remove.
+       (syntax_check_rules): Adjust.
+       * gen-testsuite-part: Set permissions of generated tests to
+       '444' (-r--r--r--), rather than 555 (-r-xr-xr-x).
+
+2013-05-16  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       maint: tests no longer need to have executable bit set
+
+       It has been a while since they are runnable only through "make check"
+       or "./runtest", and not directly.
+
+       * HACKING: Adjust.
+       * t/README: Likewise, and updated the surrounding text to get rid of
+       obsolete statements and advices.
+
+2013-05-16  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       PLANS: subdir-objects: various updates
+
+2013-05-15  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       Merge branch 'micro' into maint
+
+       * micro:
+         post-release: micro version bump (1.13.2a)
+         release: stable micro release 1.13.2
+         vala tests: skip in a cross compiler setup
+         HACKING: miscellaneous fixes, updates and enhancements
+         NEWS: minor improvements to wording (about new versioning scheme)
+
+2013-05-15  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       post-release: micro version bump (1.13.2a)
+
+       * configure.ac, m4/amversion.m4: Bump version: 1.13.2 -> 1.13.2a
+
+2013-05-15  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       release: stable micro release 1.13.2
+
+       * configure.ac (AC_INIT): Bump version number to 1.13.2.
+       * m4/amversion.m4: Likewise (auto-updated by "make bootstrap").
+
+2013-05-15  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       vala tests: skip in a cross compiler setup
+
+       The "vala + pkg-config" doesn't interact well with cross-compilation:
+       <https://mail.gnome.org/archives/vala-list/2012-September/msg00094.html>
+
+       That is causing annoying failures in our testsuite when it's run in
+       cross-compilation mode.  It's not worth trying too be overly smart and
+       work around these problems; just skip the affected tests instead.
+
+       * t/ax/am-test-lib.sh (require_tool): A new requirement 'valac', telling
+       that the test needs to compile Vala-generated C files.  In particular,
+       this causes the test to be skipped when using a cross-compiler.
+
+2013-05-15  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       HACKING: miscellaneous fixes, updates and enhancements
+
+2013-05-15  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       NEWS: minor improvements to wording (about new versioning scheme)
+
+2013-05-15  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       THANKS: update Akim's e-mail address
+
+2013-05-15  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       tests: less uses of "make -e"; avoid spurious failures in 'check-cc-no-c-o'
+
+       That is, when the testsuite is run using a fake C compiler that doesn't
+       grasp the '-c' and '-o' options together.
+
+       * t/instdir-prog.sh: Adjust.
+       * t/instdir-ltlib.sh: Likewise.
+       * t/python-virtualenv.sh: Likewise.
+
+2013-05-14  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       build: be more respectful of user-specified verbosity
+
+       * t/Makefile.in (check-cc-no-c-o, check-no-trailing-backslash-in-recipes,
+       installcheck-testsuite, perf): Here.
+
+2013-05-14  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       check-cc-no-c-o: unify initializations in a single place
+
+       * t/ax/test-defs.in: That is, by setting CC and GNU_CC here, in accord
+       with the value of the variable 'AM_TESTSUITE_SIMULATING_NO_CC_C_O'.
+       * t/Makefile.in (check-cc-no-c-o) : No need to reset CC and GNU_CC any
+       longer in the recursive "make check" invocation.
+
+2013-05-14  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       check-cc-no-c-o: avoid a spurious failure
+
+       * t/am-prog-cc-c-o.sh: In this test, by relying on the knowledge
+       that we are running under the aegis of the 'check-cc-no-c-o'
+       maintainer-specific target, knowledge given us by ...
+       * t/Makefile.in (check-cc-no-c-o) : ... the new environment
+       variable 'AM_TESTSUITE_SIMULATING_NO_CC_C_O', set to a value
+       of "yes" by this rule.
+       * t/ax/test-defs.in: Initialize the new variable to "no" by
+       default, and add an explanatory comment.
+
+2013-05-14  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       build: fixup for building in a VPATH setup
+
+       * bin/Makefile.inc (%D%/automake, %D%/aclocal): Make sure that the
+       directory where the targets scripts are going to be built exists,
+       before trying to create said scripts.
+
+2013-05-11  Nick Bowler  <nbowler@elliptictech.com>  (tiny change)
+
+       Use AC_DEFUN_ONCE to define AM_PROG_CC_C_O
+
+       If AM_PROG_CC_C_O is expanded multiple times, and the compiler does not
+       support -c and -o together, each expansion of the macro will prepend
+       the compile script to CC.  This can result in the compile script
+       invoking the compile script, which at best pointless and silly.
+       Fortunately, there does not appear to be any serious problems as the
+       first compile invocation strips out -o options, causing subsequent
+       invocations of the script to merely exec their arguments.
+
+       Other than fixing the above, this should not normally cause any changes
+       to the resulting configure script, except in the (hopefully rare) case
+       where AM_PROG_CC_C_O is directly expanded (i.e., *not* using AC_REQUIRE)
+       in the body of a macro defined with AC_DEFUN.  In that case, the use of
+       AC_DEFUN_ONCE may cause the expansion of AM_PROG_CC_C_O to appear
+       earlier in the configure script.
+
+       * m4/minuso.m4: Change the definition of AM_PROG_CC_C_O to use
+       AC_DEFUN_ONCE, avoiding problems caused by multiple expansions.
+
+2013-05-11  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       compile: avoid AC_PROG_CC messy rewrite
+
+       Instead, add an hook to AC_OUTPUT to have AM_PROG_CC_C_O invoked
+       automatically.
+
+       See also the long-winded discussion about automake bug#13378.
+
+       * m4/minuso.m4 (AM_PROG_CC_C_O): Bring back the old implementation,
+       from commit v1.13.1-55-g1ab8fb6.
+       * m4/init.m4 (AC_PROG_CC): Remove this horrible, hacky re-write.
+       * (AM_INIT_AUTOMAKE): Arrange for AM_PROG_CC_C_O to be called if
+       necessary.
+       * t/am-prog-cc-c-o.sh: Adjust to avoid spurious failure.
+       * t/subobj.sh: Likewise.
+
+       Suggested-by: Nick Bowler <nbowler@elliptictech.com>
+
+2013-05-11  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       options: tiny simplification in dealing with incompatible versions
+
+       * lib/Automake/Options.pm (_process_option_list): Here, when an
+       incompatible version number option is detected, there's no need
+       to call error() with the "uniq_scope => US_GLOBAL" switch.
+       In fact, if the same incompatible version number is specified in
+       AUTOMAKE_OPTIONS in both (say) 'Makefile.am' and 'sub/Makefile.am',
+       we want each such erroneous usage reported separately, rather than
+       just the first time it is encountered (as we'd expect to happen
+       when "uniq_scope => US_GLOBAL" is used).
+       Ideally, this change should have been folded into the similar
+       commit 'v1.13.1d-129-gf7ef16f', but we noticed that too late.
+       Oh well.
+
+2013-05-11  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       options: try to report as much errors as possible
+
+       For example, if two invalid options are used in AUTOMAKE_OPTIONS, don't
+       report just the first one, but both of them.
+
+       * lib/Automake/Options.pm (_process_option_list): Do so by avoiding
+       early returns in here.
+
+2013-05-11  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       Merge branch 'branch-1.13.2' into maint
+
+       * branch-1.13.2:
+         warns: don't tell AM_PROG_MKDIR_P is going to be removed
+
+2013-05-10  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       warns: don't tell AM_PROG_MKDIR_P is going to be removed
+
+       That is no longer true.  For a more extended rationale, see file
+       'PLANS/obsolete-removed/am-prog-mkdir-p.txt' in the maint branch
+       (as of commit v1.13.1d-132-g90ec3fe).
+
+       * automake.in (scan_autoconf_traces): So adjust the warning message
+       here.
+
+2013-05-10  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       refactor: fix few "inverted boolean" usages
+
+       In some subroutines, we used a return value of 0 to indicate success,
+       and a return status of 1 to indicate failure.  That was not very
+       consistent with the perl interpretation of 0 as a false value and 1 as
+       a true value.  So we now invert the meaning of the exit statuses.
+
+       * lib/Automake/Options.pm (_process_option_list): Here.
+       (process_global_option_list, process_option_list): And by reflex,
+       here as well.
+       * bin/automake.in (handle_options): And here.
+       (generate_makefile, scan_autoconf_traces): Adjust.
+
+2013-05-10  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       options: better name for an internal function
+
+       * lib/Automake/Options.pm (_option_must_be_from_configure): Rename ...
+       (_option_is_from_configure): ... like this.
+
+2013-05-10  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       options: more consistency in use of return statuses to report errors
+
+       * lib/Automake/Options.pm (_option_must_be_from_configure): By giving
+       a proper return status here.
+       (_process_option_list): And using it here.
+
+2013-05-10  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       options: tiny simplification in dealing with erroneous opts
+
+       * lib/Automake/Options.pm (_process_option_list): Here, when an
+       invalid option is detected, there's no need to call &error with
+       the "uniq_scope => US_GLOBAL" switch.  In fact, if the same
+       erroneous option is specified in AUTOMAKE_OPTIONS in both (say)
+       'Makefile.am' and 'sub/Makefile.am', we want each such erroneous
+       usage reported separately, rather than just the first time it is
+       encountered (as happens when "uniq_scope => US_GLOBAL" is used).
+
+2013-05-10  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       options: consistently use return statuses to report errors
+
+       * lib/Automake/Options.pm (_process_option_list): Here.
+       (process_option_list, process_global_option_list): Remove
+       redundant use of 'return'.
+
+2013-05-10  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       options: re-enable some sanity checks
+
+       They had been unwittingly disabled by a slightly incorrect
+       code ordering.
+
+       * lib/Automake/Options.pm (process_option_list): Here.
+       (process_global_option_list): And here.
+
+2013-05-10  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       THANKS: update Eric Blake's e-mail address
+
+2013-05-10  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       NEWS: typofix
+
+       Reported-by: Eric Blake <eblake@redhat.com>
+
+2013-05-10  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       news: document new 'subdir-objects' warning
+
+       * NEWS: Automake 1.14 will warn if a subdir source file is
+       specified but the 'subdir-objects' option is not given.  This
+       is done to smooth the transition to Automake 2.0, which will
+       unconditionally assume the behaviour now given only with the
+       'subdir-objects' option.
+
+2013-05-10  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       PLANS: one minor fixlet (mostly cosmetic)
+
+2013-05-10  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       PLANS: we have already dropped support for split info files in master
+
+2013-05-10  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       NEWS: fix a reference to Automake 1.14 where Automake 2.0 was intended
+
+2013-05-10  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       PLANS: fix reference to non-existent 'next' branch
+
+       * PLANS/obsolete-removed/configure.in.txt: Here.  We should refer
+       to the 'master' branch instead.
+
+2013-05-10  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       PLANS: fix botched version reference
+
+       * PLANS/rm-f-without-args.txt: Here.  The probe checking that "rm -f"
+       without arguments works will be introduced in Automake 1.14, not in
+       Automake 1.13.2.
+
+2013-05-10  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       maintcheck: fix two references to old location of aclocal and automake
+
+       * maintainer/syntax-checks.mk (sc_perl_at_substs): Here: it should
+       refer to 'bin/automake' and 'bin/aclocal', not 'automake' and
+       'alocal'.
+
+2013-05-10  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       dist: deprecated shar and tar+compress formats
+
+       See also discussion about automake wishlist bug#13324.
+
+       * lib/Automake/Options.pm: Give proper warnings in the 'obsolete'
+       category if the 'dist-shar' or 'dist-tarZ' options are used.
+       * lib/distdir.am: When the 'dist-tarZ' or 'dist-shar' targets are
+       invoked, make them give a non-fatal warning.
+       * doc/automake.texi: Report the new deprecations.
+       * t/dist-shar.sh: New test.
+       * t/dist-tarZ.sh: Likewise.
+       * t/lzma.sh: While at it, rename ...
+       * t/dist-lzma.sh: ... like this, and tweak it to keep more in
+       sync with the new tests.
+       * t/dist-formats.tap: Remove references to deprecated formats.
+       * t/list-of-tests.mk: Adjust.
+
+2013-05-10  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       Merge branch 'dog-feeding' into maint
+
+       * dog-feeding:
+         build: move automake and aclocal in 'bin' subdir
+         build: break up monolithic Makefile.am in subdir-specific fragments
+
+2013-05-10  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       Merge branch 'branch-1.13.2' into maint
+
+       * branch-1.13.2:
+         automake: typofix in comments: s/AC_CONFIG_HEADER/AC_CONFIG_HEADERS/
+
+2013-05-10  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       automake: typofix in comments: s/AC_CONFIG_HEADER/AC_CONFIG_HEADERS/
+
+2013-05-10  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       am: prefer a shorter idiom where possible
+
+       That is, prefer:
+
+           test -f FILE || do_action
+
+       over:
+
+           if test ! -f FILE; then do_action; else :; fi
+
+       * lib/am/remake-hdr.am (%CONFIG_H%): Here.
+
+2013-05-10  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       Merge branch 'branch-1.13.2' into maint
+
+       * branch-1.13.2:
+         cosmetics: fix few typos, grammaros and missing whitespace
+         fixup: remove an obsolete comment
+         docs: we still don't have the promised better Java interface
+
+2013-05-10  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       cosmetics: fix few typos, grammaros and missing whitespace
+
+       * lib/am/*.am: In comments in some of these files.
+
+2013-05-10  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       fixup: remove an obsolete comment
+
+       * lib/am/header-vars.am (am__make_running_with_option): Here.
+
+2013-05-09  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       docs: we still don't have the promised better Java interface
+
+       Reported by Michael Zucchi:
+       <http://lists.gnu.org/archive/html/automake/2013-05/threads.html>
+
+       See also automake bug#9088.
+
+       * doc/automake.texi (Java): Adjust and clarify.
+       * THANKS: Update.
+
+       Reported-by: Michael Zucchi <notzed@gmail.com>
+
+2013-05-09  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       maint: re-run "make update-copyright" ...
+
+       * t/lex-multiple.sh: ... which updates the copyright years
+       of this test (they were somehow not bumped in the past).
+
+2013-05-09  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       tests: avoid spurious failure with older flex (2.5.4)
+
+       That old version is unfortunately still relevant, being the one
+       installed on NetBSD 5.1.
+
+       * t/lex-multiple.sh: Use the '-o' option rather than the longer
+       equivalent '--outfile'.  The latter is not supported by older
+       versions of flex (e.g., flex 2.5.4).
+
+2013-05-09  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       Merge branch 'branch-1.13.2' into maint
+
+       * branch-1.13.2:
+         announcement: cater to more flexible NEWS format
+
+2013-05-09  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       announcement: cater to more flexible NEWS format
+
+       * maint.mk (announcement): Here, be prepared to handle the case
+       in which the first section of the NEWS file is dedicated to report
+       future backward-incompatibilities and/or other warnings.
+
+2013-05-09  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       build: move automake and aclocal in 'bin' subdir
+
+       * automake.in: Rename ...
+       * bin/automake.in: ... like this.
+       * aclocal.in: Rename ...
+       * bin/aclocal.in: ... like this.
+       * Makefile.am: Move parts that dealt with the building/distribution
+       of aclocal and Automake ..
+       * bin/Makefile.inc): ... in this new included fragment.  Adjust as
+       needed, and make deliberate use of the '%D%' substitution.
+       * lib/gen-perl-protos: Move ...
+       * bin/gen-perl-protos: ... here.
+       * bootstrap.sh, configure.ac, maintainer/rename-tests,
+       t/wrap/aclocal.in, t/wrap/automake.in, doc/Makefile.inc,
+       t/ax/tap-setup.sh, .gitignore: Adjust.
+       * maintainer/syntax-checks.mk: Likewise, and enhance a little.
+
+2013-05-09  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       build: break up monolithic Makefile.am in subdir-specific fragments
+
+       This is convenient to do, now that we have improved "relative directory"
+       support with the '%reladir%' (a.k.a. '%D%') and '%canon_reladir%' (a.k.a.
+       '%C%') Automake-time substitutions for included makefile fragments.
+
+       This move also satisfy our philosophy of using new Automake features in
+       our own build system, as a way of facilitating early discovery of possible
+       bugs or interface warts.
+
+       * Makefile.am: Break up ...
+       * doc/Makefile.inc, lib/Automake/Makefile.inc, lib/Makefile.inc,
+       lib/am/Makefile.inc, m4/Makefile.inc, t/Makefile.inc): ... in this
+       new included fragments.  Adjust as needed, and make deliberate use
+       of the '%D%' substitution.
+       * contrib/t/local.am: Rename ...
+       * contrib/t/Makefile.inc: ... like this.
+
+2013-05-05  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       maint branch: we are going to become Automake 1.14
+
+       * configure.ac (AC_INIT): So adjust beta version in here, from
+       1.13.2a to 1.13a.
+       * m4/amversion.m4: Regenerate.
+
+2013-05-05  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       Merge branch 'branch-1.13.2' into maint
+
+       * branch-1.13.2:
+         maint: version bump after beta release 1.13.1d
+         release: beta release 1.13.1d (will become 1.13.2)
+         NEWS: document more robust handling/recognition of make options
+
+2013-05-05  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       maint: version bump after beta release 1.13.1d
+
+       * configure.ac (AC_INIT): Bump version number to 1.13.1e.
+       * m4/amversion.m4: Likewise (autoupdated by "make bootstrap").
+
+2013-05-04  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       release: beta release 1.13.1d (will become 1.13.2)
+
+       * configure.ac (AC_INIT): Bump version number to 1.13.1d.
+       * m4/amversion.m4: Likewise (auto-updated by "make bootstrap").
+
+2013-05-04  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       NEWS: document more robust handling/recognition of make options
+
+2013-05-04  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       tests: typofixes in comments in t/preproc-c-compile.sh
+
+2013-05-04  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       tests: remove bashism from a test
+
+       * t/preproc-c-compile.sh (Makefile.am): Use "test foo = bar", not the
+       bash-specific "test foo == bar".
+
+2013-05-04  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       Merge branch 'branch-1.13.2' into maint
+
+       * branch-1.13.2:
+         maint: targets and recipes to simplify testing on real-world packages
+         build: preparatory refactoring
+         build: tiny reduction in code duplication
+         make flags analysis: handle more options with args
+         make flags analysis: use simpler variable names
+         make flags analysis: whitespace changes
+         make flags analysis: embed in a subshell
+         make flags analysis: be more robust
+         make flags analysis: cater to GNU make 3.83 (still unreleased as of now)
+         tests: expose weaknesses in make flags analysis
+         tests: improve debugging output in checks on make flags analysis
+         make flags analysis: refactor, to reduce code duplication
+         tests: avoid one tricky use of "make -e"
+         tests: avoid a spurious error with Solaris make
+         subdirs: don't return false positives for the '-k' option's presence
+         header-vars: recognize more make flags ('-k' in particular)
+         header-vars: simplify how make flags are determined
+         tests: remove dead code from t/make-dryrun.tap
+         header-vars: new variable $(am__running_with_option)
+         tests: expose bug#12554 (false positives for presence of '-k' make option)
+
+2013-05-04  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       Merge 'better-makeflags-recognition' and 'testing-work' into branch-1.13.2
+
+       * better-makeflags-recognition:
+         make flags analysis: handle more options with args
+         make flags analysis: use simpler variable names
+         make flags analysis: whitespace changes
+         make flags analysis: embed in a subshell
+         make flags analysis: be more robust
+         make flags analysis: cater to GNU make 3.83 (still unreleased as of now)
+         tests: expose weaknesses in make flags analysis
+         tests: improve debugging output in checks on make flags analysis
+         make flags analysis: refactor, to reduce code duplication
+
+       * testing-work:
+         maint: targets and recipes to simplify testing on real-world packages
+         build: preparatory refactoring
+         build: tiny reduction in code duplication
+
+2013-05-04  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       maint: targets and recipes to simplify testing on real-world packages
+
+       We introduce a new section in the maintainer-specific makefile that
+       contains recipes to test the build system of some well-known GNU
+       packages with the current development version of Automake.  Not the
+       cleanest way to do so, but good enough for the moment.  We'll revisit
+       the matter after the 1.13.2 release (which we now hope will happen
+       soon).
+
+       * maint.mk (git-sv-host): New.
+       (SV_GIT_CF, SV_GIT_AC, SV_GIT_GL): Use it to reduce code duplication.
+       (ALL_PACKAGES, FEW_PACKAGES): New, lists of GNU packages to try out.
+       (ttp-check, ttp-check-all): New targets, do the checking with said
+       packages.
+       (ttp): New, alias for 'ttp-check'.
+       (ttp-all): New, alias for 'ttp-check-all'.
+
+2013-05-03  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       build: preparatory refactoring
+
+       No semantic change intended.  This change will be required
+       by a later patch.
+
+       * Makefile.am (setup_autotools_paths): New.
+       ($(srcdir)/doc/amhello-1.0.tar.gz): Use it.
+
+2013-05-03  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       build: tiny reduction in code duplication
+
+       The code was only duplicated two times, but we are soon going to
+       need a third occurrence, and that would be one to much.
+
+       * Makefile.am (extend_path): New.
+       (update_mans): Use it instead of copying & pasting its contents.
+       ($(srcdir)/doc/amhello-1.0.tar.gz): Likewise, and minor related
+       adjustments.
+
+2013-05-03  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       make flags analysis: handle more options with args
+
+       That is, not only -I, but also -O (for upcoming GNU make 3.83),
+       -l (GNU make), -d, -E, -D, -m (BSD make), -J, -T (NetBSD make).
+
+       * lib/am/header-vars.am (am__make_running_with_option): Extend
+       and adjust, both code and comments.
+
+2013-05-03  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       make flags analysis: use simpler variable names
+
+       * lib/am/header-vars.am (am__make_running_with_option): Here.  Now
+       that we expect to be run in a subshell, we don't have to worry about
+       being namespace-safe.  And '$foo' is much more pleasant to read than
+       '$am__foo' -- and pleasant code tends to be more correct.
+       (am__make_dryrun, am__make_keepgoing): Adjust.
+
+2013-05-03  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       make flags analysis: whitespace changes
+
+       * lib/am/header-vars.am (am__make_running_with_option): Here.
+       No semantic change is intended.
+
+2013-05-03  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       make flags analysis: embed in a subshell
+
+       So that we won't have to worry about leaking temporary variables,
+       and similar stuff.
+
+       * lib/am/header-vars.am (am__make_dryrun, am__make_keepgoing): Here.
+       (am__make_running_with_option): Minor adjustments.
+
+2013-05-02  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       make flags analysis: be more robust
+
+       In particular, catering to option-with-argument bundled together
+       with options-without-arguments, as in:
+
+          # With GNU make 3.82:
+          $ make -f- <<<'all:; echo "$$MFLAGS"' -s -k -I none
+          -skiI none
+
+          # With development version of GNU make (Git commit b5ea49b):
+          $ make -f- <<<'all:; @echo "$$MFLAGS"' -I none
+          -skiI none
+
+       This fixes some lingering failures in the testsuite; precisely, in
+       tests 'make-dryrun.tap' and 'make-keepgoing.tap'.
+
+       * t/header-vars.am (am__make_running_with_option): Enhance.
+
+2013-05-02  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       make flags analysis: cater to GNU make 3.83 (still unreleased as of now)
+
+       The current development version of GNU make (that is planned to become
+       GNU make 3.83, sooner or later) has changed the format its $(MFLAGS)
+       variable slightly, removing the space between an option and its argument:
+
+          # With GNU make 3.82, compiled from official tarball:
+          $ make -f- <<<'all:; @echo "$$MFLAGS"' -I none
+          -I none
+
+          # With development version of GNU make (Git commit b5ea49b):
+          $ make -f- <<<'all:; @echo "$$MFLAGS"' -I none
+          -Inone
+
+       This was done on purpose, in order to support more easily the new
+       option '-O', which takes an optional argument; see:
+
+         <http://lists.gnu.org/archive/html/bug-make/2013-05/msg00001.html>
+
+       So Just adapt to the new format as well.
+
+       * t/header-vars.am (am__make_running_with_option): Adjust to cater
+       to the new GNU make behaviour.
+
+2013-05-02  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       tests: expose weaknesses in make flags analysis
+
+       This introduces some failures in the testsuite, that will be fixed
+       soon enough by follow-up patches.
+
+       * t/make-dryrun.tap: Enhance and extend.
+       * t/make-keepgoing.tap: Likewise.
+
+2013-05-02  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       tests: improve debugging output in checks on make flags analysis
+
+       * t/make-dryrun.tap: Here.
+       * t/make-keepgoing.tap: And here.
+
+2013-05-01  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       make flags analysis: refactor, to reduce code duplication
+
+       And make it a little more reliable.
+
+       * t/header-vars.am (am__make_running_with_option): Here.
+
+2013-05-01  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       tests: avoid one tricky use of "make -e"
+
+       Which was causing a spurious failure on FreeBSD.  Not particularly
+       surprising, given how brittle "make -e" is in general ...
+
+       * t/cxx-lt-demo.sh: Instead of forcing $(CC) to be 'false' by
+       exporting "CC=false" in the environment and then passing the '-e'
+       option to make, do so by passing "CC=false" on the make command
+       line, both directly and using AM_MAKEFLAGS.
+
+2013-04-30  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       Merge branch 'fix-pr12554' into branch-1.13.2
+
+       * fix-pr12554:
+         tests: avoid a spurious error with Solaris make
+         subdirs: don't return false positives for the '-k' option's presence
+         header-vars: recognize more make flags ('-k' in particular)
+         header-vars: simplify how make flags are determined
+         tests: remove dead code from t/make-dryrun.tap
+         header-vars: new variable $(am__running_with_option)
+         tests: expose bug#12554 (false positives for presence of '-k' make option)
+
+2013-04-30  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       Merge branch 'branch-1.13.2' into maint
+
+       * branch-1.13.2:
+         cosmetics: remove few trailing whitespace occurrences
+         typofix: in NEWS (extra whitespace)
+
+2013-04-30  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       cosmetics: remove few trailing whitespace occurrences
+
+2013-04-30  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       typofix: in NEWS (extra whitespace)
+
+2013-04-30  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       Merge branch 'branch-1.13.2' into maint
+
+       * branch-1.13.2:
+         sync: update files from upstream with "make fetch"
+         maintcheck: remove outdated whitelisting
+         tar: format 'ustar' cannot support UID/GID longer than 21 bits
+
+2013-04-30  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       Merge branch 'fix-pr13588-pax-hangs' into branch-1.13.2
+
+       * fix-pr13588-pax-hangs:
+         tar: format 'ustar' cannot support UID/GID longer than 21 bits
+
+2013-04-29  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       tests: avoid a spurious error with Solaris make
+
+       * t/make-keepgoing.tap (Makefile.am): Here.
+
+2013-04-29  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       subdirs: don't return false positives for the '-k' option's presence
+
+       This change fixes automake bug#12554.
+
+       The old implementation of the code descending into $(SUBDIRS)
+       entries used the following snippet to decide whether make is running
+       with the '-k' a.k.a. '--keep-going' option, and thus whether a failure
+       in a subdirectory should prevent the descent in the following ones:
+
+           fail= failcom='exit 1'; \
+           for f in x $$MAKEFLAGS; do \
+             case $$f in \
+               *=* | --[!k]*);; \
+               *k*) failcom='fail=yes';; \
+             esac; \
+           done
+
+       It's clear that the second pattern in the 'case' construct could possibly
+       match false positives, for examples in these two cases:
+
+           make check TESTS="x.test k.test"
+           make -I /usr/local/kool-fragments
+
+       which are somewhat unusual, but not invalid.  So we need a more resilient
+       implementation, as we did for the detection of the '-n' flag.
+
+       This implementation is now provided by the new private macro
+       '$(am__make_keepgoing)' (introduced in recent commits); so we can
+       just us that to fix the bug.
+
+       * lib/am/subdirs.am ($(am__recursive_targets)): Use '$(am__make_keepgoing)'
+       instead of ad-hoc and more brittle checks.
+       * t/list-of-tests.mk (XFAIL_TESTS): Remove the now-passing test case
+       't/subdir-keep-going-pr12554.sh'.
+
+       Reported-by: Michael Daniels <mdaniels@rim.com>
+
+2013-04-29  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       header-vars: recognize more make flags ('-k' in particular)
+
+       * lib/am/header-vars.am (am__running_with_option): Here.
+       Few improvements to comments, while at it.
+       (am__make_keepgoing): New, tell whther make is being runt with
+       the '-k' option.
+       * t/make-keepgoing.tap: New test.
+       * t/list-of-tests.mk: Add it.
+       * t/make-dryrun.tap: Minor edits to keep it more in sync with
+       the new test.
+
+2013-04-29  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       sync: update files from upstream with "make fetch"
+
+       * lib/config.guess: Likewise.
+       * lib/config.sub: Likewise.
+
+2013-04-29  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       maintcheck: remove outdated whitelisting
+
+       * syntax-checks.mk (sc_tests_overriding_macros_on_cmdline): Here.
+       The test 'make-dryrun.sh' has been since long rewritten as the TAP
+       test 'make-dryrun.tap', and no longer spuriously triggers this
+       maintainer check.
+
+2013-04-29  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       header-vars: simplify how make flags are determined
+
+       Actually, son far only the '-n' option ("dry mode") was detected,
+       but this change will allow us to soon detect more options.
+
+       * lib/am/header-vars.am (am__running_with_option): Even when $MAKEFLAGS
+       appears to contain definition of variables with embedded whitespace,
+       use simple textual pre-processing over $MAKEFLAGS rather than tricky
+       recursive invocations of make to determine whether the '-n' option was
+       given.  This is enough to correctly handle all the tricky usages covered
+       in the testsuite.
+       * t/nodep.sh: Adjust to avoid a spurious failure.
+
+2013-04-29  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       tests: remove dead code from t/make-dryrun.tap
+
+2013-04-29  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       header-vars: new variable $(am__running_with_option)
+
+       This is a preparatory refactoring, needed by later patches.
+       No semantic change is intended.
+
+       * lib/am/header-vars.am (am__running_with_option): New, contains
+       shell code that determines whether the current make instance is
+       running with a given one-letter option (e.g., -k, -n) that takes
+       no argument.  Actually, the only supported option at the moment
+       is '-n' (support for '-k' will be added soon).
+       (am__make_dryrun): Rewrite as a thin wrapper around
+       '$(am__make_running_with_option)'.
+
+2013-04-29  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       tests: expose bug#12554 (false positives for presence of '-k' make option)
+
+       The current implementation of the code descending into $(SUBDIRS)
+       entries uses the following snippet to decide whether make is running
+       with the '-k' a.k.a. '--keep-going' option, and thus whether a failure
+       in a subdirectory should prevent the descent in the following ones:
+
+           fail= failcom='exit 1'; \
+           for f in x $$MAKEFLAGS; do \
+             case $$f in \
+               *=* | --[!k]*);; \
+               *k*) failcom='fail=yes';; \
+             esac; \
+           done
+
+       It's clear that the second pattern in the 'case' construct can possibly
+       match false positives, for examples in these two cases:
+
+           make check TESTS="x.test k.test"
+           make -I /usr/local/kool-fragments
+
+       which are somewhat unusual, but not invalid.  So we need a more resilient
+       implementation, as we did for the detection of the '-n' flag.
+
+       But alas, such an implementation seems quite tricky to obtain in portable
+       make.  So for the moment we content ourselves with exposing the bug, with
+       the hope of being able to fix soon enough.
+
+       * t/subdir-keep-going-pr12554.sh: New test.
+       * t/list-of-tests.mk (handwritten_TESTS, XFAIL_TESTS): Add it.
+       * THANKS: Update
+
+       Reported-by: Michael Daniels <mdaniels@rim.com>
+
+2013-04-28  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       tar: format 'ustar' cannot support UID/GID longer than 21 bits
+
+       See automake bug#8343 and bug#13588.
+
+       POSIX 1988 'ustar' format is defined with *fixed-size* fields. There
+       is notably a 21 bits limit (2097151) for the UID and the GID.
+
+       Tom Rini tom_rini@mentor.com says (in bug#8343):
+
+           When the user has a UID or GID that is larger than the ustar format
+           supports, pax does not error out gracefully in some cases (FC13).
+
+       Marc Herbert <marc.herbert@intel.com> adds (in bug#8343):
+
+           When "configure" is run by a user with an UID bigger than 21 bits,
+           BSD pax 3.4 aborts when trying to create the 'conftest.tar' test
+           archive and leaves an empty or corrupted conftest.tar file behind.
+           In the next step, pax tries to extract this incomplete or corrupted
+           archive and this *** hangs the whole ./configure script ***.
+
+           Note: GNU cpio 2.9 pretends to pass the test but it is a LIE: it
+           silently truncates any big UID to its lower 21 bits. I don't know
+           what can be the consequences of this lie.
+
+           I think there is currently a design issue in automake/m4/tar.m4
+           considering that a ustar archive should should *never* succeed when
+           ./configure is run from a big user ID.
+
+       Months later, Petr Hracek <phracek@redhat.com> reports a similar issue
+       (in bug#13588) for Fedora 17:
+
+           I am trying to solve problem in case a user is created with big
+           UID and during configuration pax hangs with message
+
+               ATTENTION! pax archive volume change required.
+               Ready for archive volume: 1
+               Input archive name or "." to quit pax.
+               Archive name >
+
+           and needs user interaction.
+
+           Reference: <https://bugzilla.redhat.com/show_bug.cgi?id=843376>
+
+       Time to fix this issue, on the line of a preliminary patch provided by
+       Petr Hracek in bug#13588.  The final patch ended up being remarkably
+       different from that original proposition, though.
+
+       * m4/tar.m4 (_AM_PROG_TAR): If the UID or GID of the current user is
+       too high (> 2097151), the 'ustar' format cannot work.  Adjust checks
+       accordingly.  Some related code reordering and clean-up.
+       * t/tar-ustar-id-too-high.sh: New test.
+       * t/list-of-tests.mk: Add it.
+       * t/tar.sh: While at it, tweak and enhance a little.
+       * t/tar2.sh: Likewise.
+       * t/tar3.sh: Likewise.
+       * t/tar-override.sh: Likewise.
+       * NEWS: Update.
+       * THANKS: Likewise.
+
+       Helped-by: Pavel Raiskup <praiskup@redhat.com>
+       Helped-by: Petr Hracek <phracek@redhat.com>
+       Helped-by: Marc Herbert <marc.herbert@intel.com>
+       Helped-by: Tom Rini <tom_rini@mentor.com>
+
+2013-04-26  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       Merge branch 'branch-1.13.2' into maint
+
+       * branch-1.13.2:
+         docs: issues with configure substitutions in TESTS
+         tests: avoid possible autotools caching issues (automake bug#13832)
+         docs: add myself and Ralf Wildenhues as authors
+         authors: add myself
+         dry-run: don't get confused by '-I' option
+         tests: avoid a spurious failure with the Korn Shell
+         dry-run: with GNU make, prefer $(MFLAGS) over $(MAKEFLAGS)
+         header vars: can determine whether we are running under GNU make
+         NEWS: improve wording for automake bug#13514 fix
+         NEWS: document fix for automake bug#13514
+
+2013-04-26  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       Merge few bug-fixing branches into branch-1.13.2
+
+       * fix-part-pr13832:
+         tests: avoid possible autotools caching issues (automake bug#13832)
+
+       * fix-pr13760:
+         dry-run: don't get confused by '-I' option
+         dry-run: with GNU make, prefer $(MFLAGS) over $(MAKEFLAGS)
+         header vars: can determine whether we are running under GNU make
+
+       * fix-doc-pr14019:
+         docs: issues with configure substitutions in TESTS
+
+       * news-wording-improve:
+         NEWS: improve wording for automake bug#13514 fix
+
+2013-04-26  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       docs: issues with configure substitutions in TESTS
+
+       Motivated by automake bug#14019.
+
+       * doc/automake.texi: Currently, when the parallel test harness is in use,
+       configure substitutions in TESTS definitions can only work if they expand
+       to tests that ends with a suffix listed in TEST_EXTENSIONS.  Document this
+       limitation.
+
+2013-04-26  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       tests: avoid possible autotools caching issues (automake bug#13832)
+
+       * t/ar-lib4.sh: Here, by removing the autom4te cache before editing
+       configure.ac and re-running the autotools.
+
+2013-04-25  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       tests: rename some with more descriptive names
+
+       * t/tar3.sh: Rename ...
+       * t/tar-opts-errors.sh: ... like this.
+       * t/tar2.sh: Rename...
+       * t/tar-pax.sh: ... like this.
+       * t/tar.sh: Rename ...
+       * t/tar-ustar.sh: ... like this.
+       * t/list-of-tests.mk: Adjust.
+
+2013-04-25  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       docs: add myself and Ralf Wildenhues as authors
+
+       * doc/automake.texi: Here.
+
+2013-04-25  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       authors: add myself
+
+2013-04-23  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       dry-run: don't get confused by '-I' option
+
+       Fixes automake bug#13760 for non-GNU make implementations that still
+       support the option '-I'.  So far, the only such make implementation
+       are FreeBSD (8.x) make and NetBSD (5.x) make.
+
+       * lib/am/header-vars.am (am__make_dryrun): If a non-GNU make is being
+       used, try to handle the '-I' option in $MAKEFLAGS correctly.  For GNU
+       make, that is already done by the proper use of the $MFLAGS variable.
+
+2013-04-22  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       tests: avoid a spurious failure with the Korn Shell
+
+       * t/list-flags.sh: Ensure the EMACS variable is set before unsetting it.
+
+2013-04-22  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       dry-run: with GNU make, prefer $(MFLAGS) over $(MAKEFLAGS)
+
+       Fixes automake bug#13760 for GNU make.
+
+       * lib/am/header-vars.am (am__make_dryrun): If GNU make is being used, rely
+       on the contents of the $(MFLAGS) variable rather than of the $(MAKEFLAGS)
+       to decide whther make is being executed in "dry run" mode.  Not only this
+       makes the code possibly faster and less brittle, but also fixes automake
+       bug#13760 (at least when GNU make is in use).
+       * t/make-dryrun.tap: Adjust: some tests that were xfailing now pass.
+
+2013-04-22  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       header vars: can determine whether we are running under GNU make
+
+       This is mostly a preparatory patch in view of future changes.
+
+       * lib/am/header-vars.am (am__is_gnu_make): New, contains shell code that
+       determines whether we are running under GNU make.
+       * t/make-is-gnu.sh: New test.
+       * t/list-of-tests.mk: Add it.
+
+2013-04-22  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       NEWS: improve wording for automake bug#13514 fix
+
+       Helped-by: Jack Kelly <jack@jackkelly.name>
+
+2013-04-21  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       NEWS: document fix for automake bug#13514
+
+       It was fixed by commit v1.13.1b-5-g7a3d7ce.
+
+2013-04-20  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       Merge branch 'branch-1.13.2' into maint
+
+       * branch-1.13.2:
+         INSTALL: regen
+         sync: update files from upstream with "make fetch"
+         tests: tweaks and minimal improvements to t/insthook.sh
+
+2013-04-20  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       INSTALL: regen
+
+2013-04-20  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       sync: update files from upstream with "make fetch"
+
+       * lib/INSTALL: Update.
+       * lib/config.guess: Likewise.
+       * lib/config.sub: Likewise.
+       * lib/gendocs.sh: Likewise.
+       * lib/gendocs_template: Likewise.
+       * lib/gitlog-to-changelog: Likewise.
+       * lib/gnupload: Likewise.
+       * lib/texinfo.tex: Likewise.
+       * lib/update-copyright: Likewise.
+
+2013-04-20  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       tests: tweaks and minimal improvements to t/insthook.sh
+
+2013-04-20  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       typofix: in comments in t/extra2.sh
+
+2013-04-20  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       tests: fix botched cross-reference in a heading comment
+
+       * t/extra-dist-wildcards.sh: Here.
+
+2013-04-19  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       automake: refactoring: factor out common cpp-like flags
+
+       * automake.in (@cpplike_flags): In this new variable...
+       (C, C++, Objective C, Objective C++, Unified Parallel C, Preprocessed
+       Assembler, Preprocessed Fortran, Preprocessed Fortran 77): ... to be
+       used by registration (with the 'register_language' subroutine) of these
+       languages.
+
+       This is a refactoring meant to simplify future changes; no semantic
+       change is intended.
+
+2013-04-19  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       NEWS (mint): reflect new Automake versioning scheme
+
+       The next minor Automake version will be 1.14, and *not* 1.13.2 -- that
+       will be the next bug-fixing version.
+
+2013-04-19  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       Merge branch 'branch-1.13.2' into maint
+
+       * branch-1.13.2:
+         Add missing '$' for variable expansion in depout.m4
+         fixup: one stray reference to older versioning scheme
+
+2013-04-19  Gavin Smith  <gavinsmith0123@gmail.com>  (tiny change)
+
+       Add missing '$' for variable expansion in depout.m4
+
+       * m4/depout.m4: "am__include" appeared where "$am__include" was meant.
+
+       Reference:
+       <http://lists.gnu.org/archive/html/automake-patches/2013-04/msg00000.html>
+
+2013-04-19  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       Merge branch 'preproc' into maint
+
+       * preproc:
+         maintcheck: avoid spurious failure
+
+2013-04-19  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       maintcheck: avoid spurious failure
+
+       * t/preproc-errmsg.sh: Here, breaking up a sed command to avoid spuriously
+       triggering a failure in the 'sc_tests_logs_duplicate_prefixes' maintainer
+       check.
+
+2013-04-19  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       Merge branch 'no-perl-protos' into maint
+
+       * no-perl-protos:
+         perl: perl subroutine prototypes are problematic, don't use them
+
+2013-04-19  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       perl: perl subroutine prototypes are problematic, don't use them
+
+       Basically, in perl, "subroutine prototypes" are not prototypes at all;
+       rather, they are a trick to allow user-defined subroutines that behave
+       like perl built-in functions.  For example, prototyped subroutines can
+       be called without parentheses, and can impose context on their arguments.
+
+       Such semantics can be useful in some selected situations, but might also
+       easily cause unexpected and harmful behaviours and side effects if we
+       try to use perl prototypes as we would use C prototypes.
+
+       See the excellent article "Far More than Everything You've Ever Wanted
+       to Know about Prototypes in Perl" by Tom Christiansen for more detailed
+       information:
+
+           <http://www.perlmonks.org/?node_id=861966>
+           <http://web.archive.org/web/20080421062920/\
+            library.n0i.net/programming/perl/articles/fm_prototypes>
+
+       It is important to note that modern perl allows a non-predeclared
+       subroutine to be called without the '&' character, as long as its
+       call uses proper parentheses:
+
+           foo 'str', 2;   # will trigger errors if foo is not predeclared
+           foo('str', 2);  # ok even if foo is not predeclared
+           &foo('str', 2); # ditto; but the '&' is old-style and redundant
+
+       Note also that the prototype indicating "no argument":
+
+           sub func() { ... }
+
+       can actually be useful, and has no discernible downsides, so we'll
+       keep using it where it makes sense.
+
+       Also, in few, selected cases, we *want* to have subroutines behave like
+       perl builtins (e.g., we want the 'append_exeext' function to be able
+       to take a code block as first argument).  In such cases, we will of
+       course continue to make use of perl subroutine prototypes.
+
+       Let's finally see an example that might clarify the kind of problems the
+       use of subroutine prototypes in perl can cause.  This is just scratching
+       the surface; there are several other aspects, typically subtler and more
+       dangerous, that are not touched here.
+
+       If you have the prototyped subroutine definition:
+
+           sub foo ($@)
+           {
+               my $s = shift;
+               print "SCALAR: $s\n";
+               print "ARRAY: @_\n";
+           }
+
+       and call 'foo' in code like:
+
+           @list = (-1, 0, 1);
+           foo(@list);
+
+       you won't get a compile-time nor a runtime error (as a naive interpretation
+       of the "prototype" characterization would let you think).  Rather, the
+       prototype will cause the array '@list' will be coerced into scalar context
+       before being passed too 'foo', which means that its *length* (3) will be
+       passed to 'foo' as first argument; and since no further arguments are
+       present after '@list', that *void* will be coerced to an empty list before
+       being passed to 'foo'.
+
+       So code above will have the result of printing:
+
+         SCALAR: 3
+         ARRAY:
+
+       Quite tricky, and definitely a behaviour we don't want to rely on.
+
+       * automake.in: Delete most subroutine prototypes.  Fix few of the
+       remaining ones.  Related minor simplifications and adjustments.
+       * lib/gen-perl-protos: Adjust.
+
+2013-03-05  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       Merge branch 'preproc' into maint
+
+       * preproc:
+         preproc: enhance and extend tests
+         preproc: add support for relative names in included fragments
+
+2013-02-21  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       fixup: one stray reference to older versioning scheme
+
+       * lib/Automake/Options.pm: Here, in a FIXME comment: reference
+       "Automake 3.0" rather than "Automake 1.15".
+
+2013-02-21  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       Merge branch 'branch-1.13.2' into maint
+
+       * branch-1.13.2:
+         aclocal: fix for more-than-once specified directories
+         aclocal: just warn if the primary local m4 dir doesn't exist (don't error)
+
+2013-02-21  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       maint: more adjustments to the new versioning scheme
+
+       This is a follow-up to commit 'v1.13.1b-11-g97aaf12'.
+
+       * automake.in: Adjust a comment.
+       * PLANS: Adjust several files in here.
+
+2013-02-21  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       Merge branch 'fix-pr13514' into branch-1.13.2
+
+       * fix-pr13514:
+         aclocal: fix for more-than-once specified directories
+         aclocal: just warn if the primary local m4 dir doesn't exist (don't error)
+
+2013-02-21  Pavel Raiskup  <praiskup@redhat.com>
+
+       aclocal: fix for more-than-once specified directories
+
+       Related to automake bug#13514.
+
+       Do not consider directories for extra m4 files multiple times in
+       'aclocal'.  Doing so caused problems on older packages that specify
+
+           configure.ac:  AC_CONFIG_MACRO_DIRS([m4])
+           Makefile.am:   ACLOCAL_AMFLAGS = -I m4
+
+       if the 'm4' directory does not exist when aclocal is called the first
+       time by autoreconf.
+
+       See:
+       <http://lists.gnu.org/archive/html/bug-automake/2013-01/msg00115.html>
+
+       * aclocal.in (scan_m4_files): Remove duplicates in @user_includes.
+       * t/aclocal-macrodir.tap: Extend.
+       * t/aclocal-macrodirs.tap: Likewise.
+
+2013-02-20  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       Merge branch 'docstrings-tweaks' into maint
+
+       * docstrings-tweaks:
+         cosmetics: fix some "docstring-like" comments in automake
+
+2013-02-20  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       Merge branch 'branch-1.13.2' into maint
+
+       * branch-1.13.2:
+         coverage: expose automake bug#13760
+         tests: refactor/enhance tests about make dry-run mode
+         maint: describe new versioning and branching scheme, and adjust to it
+
+2013-02-20  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       Merge branch 'new-versioning-scheme' into branch-1.13.2
+
+       * new-versioning-scheme:
+         maint: describe new versioning and branching scheme, and adjust to it
+
+2013-02-20  Pavel Raiskup  <praiskup@redhat.com>
+
+       aclocal: just warn if the primary local m4 dir doesn't exist (don't error)
+
+       Related to automake bug#13514.
+
+       Every package which does not need to have the local m4 macro
+       directory pre-existing in the version control system (because
+       e.g., it does not have nor need any private m4 macros) would
+       fail during the "autoreconf -vfi" phase if AC_CONFIG_MACRO_DIRS([m4])
+       is specified in configure.ac (it could be to instruct tools like
+       'autopoint' and 'libtoolize' to use 'm4' as the local directory
+       where to install definitions of their m4 macros, and to instruct
+       aclocal to look into it).  The failure would go like this:
+
+         autoreconf: Entering directory `.'
+         autoreconf: running: aclocal --force
+         aclocal: error: couldn't open directory 'm4': No such file or directory
+         autoreconf: aclocal failed with exit status: 1
+
+       The problem is that when 'aclocal' is run for the first time during
+       'autoreconf', the directory 'm4' does not exist yet.  It will be
+       created by e.g., 'libtoolize' or 'autopoint' later on.  During the
+       second 'aclocal' run, the 'm4' directory exists and aclocal does not
+       complain.
+
+       To work around this issue, we degrade the error to a simple warning.
+       The warning is still quite useful when aclocal is run by hand - so
+       we are not removing completely.
+
+       See also:
+       <http://lists.gnu.org/archive/html/bug-automake/2013-01/msg00115.html>
+       <http://lists.gnu.org/archive/html/automake-patches/2010-02/msg00030.html>
+       <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=565663>
+       <https://bugzilla.redhat.com/show_bug.cgi?id=901333>
+
+       * aclocal.in (SCAN_M4_DIRS_SILENT, SCAN_M4_DIRS_WARN)
+       (SCAN_M4_DIRS_ERROR): New constants.
+       (scan_m4_dirs): Change the second parameter name to $ERR_LEVEL to
+       better reflect new semantic. Use new constants.
+       (scan_m4_files): Adjust to reflect the new 'scan_m4_dirs' semantics.
+       * t/aclocal-macrodir.tap: Adjust.
+       * t/aclocal-macrodirs.tap: Likewise.
+       * THANKS: Update.
+       * NEWS: Likewise.
+
+       Suggested-by: Ben Pfaff <blp@cs.stanford.edu>
+
+2013-02-20  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       coverage: expose automake bug#13760
+
+       * t/make-dryrun.tap: Here.
+       * THANKS: Update with the name of the bug reporter.
+
+2013-02-20  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       tests: refactor/enhance tests about make dry-run mode
+
+       * t/make-dryrun.tap: Here.
+
+2013-02-17  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       maint: describe new versioning and branching scheme, and adjust to it
+
+       See discussion about automake bug#13578 for more details and background.
+
+       Basically, for the versioning scheme:
+
+         - micro versions only for bug and regression fixing;
+         - minor versions for new backward-compatible features, and new
+           non-fatal deprecations;
+         - major versions for backward-incompatibilities, complex new
+           features, and major refactoring.
+
+       And for the git branching scheme:
+
+         + branch 'next' is for the upcoming major version;
+         + branch 'master' is now for the upcoming minor version;
+         + branch 'maint' is for the upcoming micro (bug-fixing) version;
+         + the merging hierarchy is: 'maint' -> 'master' -> 'next'.
+
+       * HACKING (Automake versioning and compatibility scheme): New.
+       (Working with git): Adjust.
+       * NEWS: Update and fix.
+       * aclocal.in: Adjust some "FIXME" messages.
+       * automake.in: Likewise.
+       * m4/mkdirp.m4: Likewise.
+       * t/aclocal-acdir.sh: Likewise.
+       * t/aclocal-macrodir.tap: Likewise.
+       * t/aclocal-macrodirs.tap: Likewise.
+       * lib/Automake/Options.pm: Likewise.
+       * m4/internal/ac-config-macro-dirs.m4: Likewise.
+
+2013-02-17  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       cosmetics: fix some "docstring-like" comments in automake
+
+       * automake.in: Here.  And remove some redundant ones.
+
+2013-02-16  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       Merge branch 'perl-sub-protos' into maint
+
+       * perl-sub-protos:
+         style: call perl functions 'like_this()', not '&like_this()'
+         maint: use more perl subroutines prototypes in the automake script
+         build: auto-generate perl subroutines prototypes for automake and aclocal
+         refactor: rip module Automake::Language out of automake script
+
+2013-02-15  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       Merge branch 'branch-1.13.2' into maint
+
+       * branch-1.13.2:
+         typofix: in comments in 't/ax/test-lib.sh'
+         tests on TAP: don't run the driver with perl unconditionally
+         typofix: in comments in 'automake.in'
+         tests: remove obsolete (and now wrong) comment
+         typofix: in diagnostic in test 't/tap-realtime.sh'
+         automake: fix reference to relevant tests in comments
+         NEWS: we no longer plan to drop $(INCLUDES) support in next major version
+
+2013-02-15  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       typofix: in comments in 't/ax/test-lib.sh'
+
+2013-02-14  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       style: call perl functions 'like_this()', not '&like_this()'
+
+       We can do so now that our build rules auto-generate a list of
+       prototypes for all functions ins our scripts.
+
+       * automake.in: Adjust throughout.
+       * HACKING: Adjust advises.
+
+2013-02-14  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       preproc: enhance and extend tests
+
+       * t/preproc-demo.sh: New test, a "demo" of how the new pre-processing
+       feature could be used in a real-world package.
+       * t/preproc-errmsg.sh: New test, check that error messages remain
+       useful when the new pre-processing features are involved.
+       * t/preproc-reldir.sh: Split up ...
+       * t/preproc-basics.sh, t/preproc-c-compile.sh: ... into these two
+       tests, with some refactorings, clean-up and enhancements.
+       * t/list-of-tests.mk: Adjust.
+
+2013-02-14  Peter Rosin  <peda@lysator.liu.se>
+           Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       preproc: add support for relative names in included fragments
+
+       The rationale for this change is that it is annoying to have
+       to repeat the directory name when including a Makefile fragment.
+       For deep directory structures these repeats can generate a lot
+       of bloat.  It also hinders reuse and easy directory restructuring
+       if all Makefile fragments have to know exactly where they live.
+
+       Suggested by Bob Friesenhahn, and later discussed in bug#13524.
+
+       In the course of discussion, the following notations were rejected:
+       &{reldir}& - to hard to type, {reldir} - interferes with ${reldir},
+       {am_reldir} - short form {D} interferes with ${D}, @am_reldir@ - short
+       form @D@ interferes with AC_SUBST([D]) as well as invading the
+       config.status turf. Other notations were also suggested...
+
+       * automake.in (read_am_file): Add third argument specifying the
+       relative directory of this Makefile fragment compared to the
+       main Makefile.  Replace %reldir% and %canon_reldir% in the
+       fragment with this relative directory (with slashes etc, or
+       canonicalized).
+       (read_main_am_file): Adjust.
+       * t/preproc-reldir.sh: New test.
+       * t/list-of-tests.mk: Augment.
+       * doc/automake.texi (Include): Document the new feature.
+       NEWS: Add new feature.
+
+2013-02-14  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       tests on TAP: don't run the driver with perl unconditionally
+
+       * t/ax/tap-setup.sh: When a 'Makefile.am' was pre-existent in the
+       test directory at the moment the client test script sourced this
+       file, said 'Makefile.am' was tweaked to provide it with a proper
+       definition of TEST_LOG_DRIVER.  However, there was an error in this
+       automatic definition, since it caused the TAP test driver to be
+       unconditionally invoked with perl.  This wasn't an issue in most
+       situations, since perl is smart enough to re-execute a given script
+       with the proper interpreter if it sees a she-bang line that doesn't
+       seem to point to perl itself.  Still, there is no reason to do
+       something blatantly wrong even if our tools correct the dumb mistake
+       for us.  So fix the TEST_LOG_DRIVER definition.
+
+2013-02-14  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       typofix: in comments in 'automake.in'
+
+2013-02-14  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       tests: remove obsolete (and now wrong) comment
+
+       * t/ax/am-test-lib.sh: Here.
+
+2013-02-14  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       typofix: in diagnostic in test 't/tap-realtime.sh'
+
+2013-02-13  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       maint: use more perl subroutines prototypes in the automake script
+
+       * automake.in: Throughout this file.  Note that these new prototypes
+       are not much useful, since many subroutine calls still use the old
+       '&foo' form; but we'll take care of that in later patches.
+       * lib/Automake/Language.pm (target_hook): Call the '_target_hook'
+       of the given language in a more modern form, avoiding '&'.
+
+2013-02-13  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       build: auto-generate perl subroutines prototypes for automake and aclocal
+
+       This will allow us to avoid either using the '&foo' invocation form when
+       invoking a subroutine before its definition, or having to maintain the
+       list of prototypes by hand (with the risk of having it become incomplete
+       or fall out-of-sync when future edits to the automake and aclocal scripts
+       are done).
+
+       * Makefile.am (automake, aclocal): Automatically generate a list of
+       prototypes by looking at the subroutines definitions.
+       * bootstrap.sh: Likewise, when generating the temporary automake and
+       aclocal scripts used for bootstrapping.
+       * automake.in: Add a placeholder that will be tracked by the new recipes
+       and substituted with the computed prototypes.  Remove existing prototypes,
+       that are now superfluous. Some adjustments required by the new, more
+       comprehensive prototypes declarations.
+       * aclocal.in: Likewise.
+       * maintainer/syntax-checks.mk (sc_diff_automake, sc_diff_aclocal): Adjust.
+
+2013-02-04  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       refactor: rip module Automake::Language out of automake script
+
+       This is just a preparatory patch in view of future changes.
+
+       * lib/Automake/Language.pm: New module, ripped out from ...
+       * automake.in: ... here.  Related adjustments.
+       * Makefile.am (dist_perllib_DATA): List the new module.
+
+2013-02-03  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       automake: fix reference to relevant tests in comments
+
+       Some of those tests had been renamed in recent or less-recent changes.
+
+2013-02-03  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       NEWS: we no longer plan to drop $(INCLUDES) support in next major version
+
+       For a rationale and related discussion, see:
+       <http://lists.gnu.org/archive/html/automake/2013-02/msg00001.html>
+
+       And note that support for INCLUDES has not been re-introduced in the
+       master branch yet, at the moment of writing; but we plan to definitely
+       do so before the next major release.
+
+2013-01-28  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       Merge branch 'branch-1.13.2' into maint
+
+       * branch-1.13.2:
+         NEWS: IRIX is still supported; only SGI C compiler depcomp no longer is
+         maint: version bump after beta release 1.13.1b
+         NEWS: typofix
+         release: beta release 1.13.1b (will become 1.13.2)
+
+2013-01-28  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       NEWS: IRIX is still supported; only SGI C compiler depcomp no longer is
+
+       This change is for the maint branch.
+
+       The only IRIX-specific support that is going to actually be removed in
+       the next major Automake versions is the depcomp support for the SGI
+       compiler.  That means that automatic dependency tracking will no
+       longer work with that compiler, but "normal" compilation should still
+       work, at least until the compiler is supported by Autoconf.
+
+       So there is no point in alarming our users by stating in the NEWS file
+       that "support for IRIX and the SGI compilers is going to be removed";
+       after all, while we don't test on nor particularly care about IRIX
+       anymore, that doesn't mean we are deliberately breaking it, and the
+       likelihood of an intended breakage there is very low.
+
+       See:
+       <http://lists.gnu.org/archive/html/automake-patches/2013-01/msg00164.html>
+       <http://lists.gnu.org/archive/html/automake-patches/2013-01/msg00165.html>
+
+       * NEWS (Future backward-incompatibilities: Adjust.  Improve explanation
+       of our rationale for dropping SGI support. Fix an unrelated typo while
+       at it.
+
+       Suggested-by: Peter Rosin <peda@lysator.liu.se>
+
+2013-01-23  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       maint: version bump after beta release 1.13.1b
+
+       * configure.ac (AC_INIT): Bump version number to 1.13.1c.
+       * m4/amversion.m4: Likewise (autoupdated by "make bootstrap").
+
+2013-01-23  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       NEWS: typofix
+
+2013-01-23  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       release: beta release 1.13.1b (will become 1.13.2)
+
+       * configure.ac (AC_INIT): Bump version number to 1.13.1b.
+       * m4/amversion.m4: Likewise (auto-updated by "make bootstrap").
+
+2013-01-22  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       Merge branch 'branch-1.13.2' into maint
+
+       * branch-1.13.2:
+         docs: '.txi' and '.texinfo' extensions are deprecated
+         NEWS: document recent documentation improvements
+         docs: more precise cross reference
+         docs: 'dist-shar' and 'dist-tarZ' are obsolescent today
+         docs: improve documentation of 'dist-*' targets slightly
+         docs: make even clearer 'dist-gzip' is the default.
+         docs: document 'dist-xz' together with the other 'dist-*' options
+         docs: 'no-define' option and AM_INIT_AUTOMAKE three-args usage: fixlets
+         warn: correct broken hyperlink in warning message
+
+2013-01-22  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       docs: '.txi' and '.texinfo' extensions are deprecated
+
+       And Automake will warn about them (since commit 'v1.13.1-6-ge1ed314').
+
+       * doc/automake.texi (Texinfo): Adjust.
+
+2013-01-22  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       NEWS: document recent documentation improvements
+
+2013-01-22  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       docs: more precise cross reference
+
+       See automake bug#13520.
+
+       * doc/automake.texi (The Types of Distributions): Here,
+       cross-reference "List of Automake options" rather then
+       the more generic node "Options".  Improve wording while
+       at it.
+
+2013-01-22  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       docs: 'dist-shar' and 'dist-tarZ' are obsolescent today
+
+       Both the options and the formats; and they might be deprecated
+       and removed in future automake versions (see discussion on
+       automake bug#13324).
+
+       In any case, it's better if the documentation starts advising
+       against their use right now.
+
+       * doc/automake.texi (The Types of Distributions): Here.
+       (List of Automake options): And here.
+
+2013-01-22  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       docs: improve documentation of 'dist-*' targets slightly
+
+       * doc/automake.texi (The Types of Distributions): Here.
+
+2013-01-22  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       docs: make even clearer 'dist-gzip' is the default.
+
+       See automake bug#13520.
+
+       * doc/automake.texi (The Types of Distributions): Here.
+
+2013-01-22  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       docs: document 'dist-xz' together with the other 'dist-*' options
+
+       See automake bug#13520.
+
+       * doc/automake.texi (List of Automake options): Here.
+
+2013-01-22  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       docs: 'no-define' option and AM_INIT_AUTOMAKE three-args usage: fixlets
+
+       See automake bug#13519.
+
+       * doc/automake.texi: Adjust.
+
+2013-01-22  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       warn: correct broken hyperlink in warning message
+
+       * automake.in (scan_autoconf_traces): Here, when an use of the
+       deprecated two- and three-arguments forms of AM_INIT_AUTOMAKE
+       is detected.
+
+       Fixes automake bug#13519.
+
+2013-01-21  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       tests: more information about Lex and Yacc programs
+
+       * t/get-sysconf.sh: Try to also get the version of '$LEX' and '$YACC'.
+       This will help debugging of user-reported problems.
+
+2013-01-21  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       lint: fix spurious failure for 'sc_rm_minus_f' syntax check
+
+       * maintainer/syntax-checks.mk (sc_rm_minus_f): Also exempt
+       file 't/rm-f-probe.sh'.
+
+2013-01-21  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       maint: bump version 1.13.1a -> 1.13.2a
+
+       The 1.13.2 bug-fixing release will ship from the 'branch-1.13.2' git
+       branch, not from the 'maint' one, since the latter contains changes
+       that are non-trivial and hasn't cooked enough yet.  The 'maint' branch
+       will give rise to the 1.13.3 release instead, eventually.  Adjust the
+       version number to match.
+
+       * configure.ac (AC_INIT): Bump version number to 1.13.2b.
+       * m4/amversion.m4: Likewise (auto-updated by "make bootstrap").
+
+2013-01-21  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       Merge branch 'branch-1.13.2' into maint
+
+       That branch is for the "emergency" bug-fixing release 1.13.2.
+
+       * branch-1.13.2:
+         maint: update copyright in files generated by automake and aclocal
+         tests: avoid a spurious failure when running inside Emacs
+         tests: make two new test executable
+         m4: rename an m4 file to a more appropriate name
+         NEWS: update w.r.t. recent documentation fixes
+         compat: reinstate AM_CONFIG_HEADER and AM_PROG_CC_STDC
+         docs: parallel-tests is no longer experimental
+         docs: serial-tests are not deprecated, just discouraged
+         NEWS: we are not going to remove AM_PROG_MKDIR_P in Automake 1.14
+
+2013-01-21  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       maint: update copyright in files generated by automake and aclocal
+
+       * bootstrap.sh ($RELEASE_YEAR): Bump top 2013.
+       * configure.ac ($RELEASE_YEAR): Likewise.
+
+2013-01-21  Thien-Thi Nguyen  <ttn@gnuvola.org>  (tiny change)
+
+       tests: avoid a spurious failure when running inside Emacs
+
+       Some versions of Emacs set the environment variable 'EMACS' to 't'
+       for child processes.  Thus, when running from inside Emacs, "$(MAKE) -e"
+       erroneously allows the 't' to override the one in the Makefile.
+
+       * t/lisp-flags.sh: Unset var 'EMACS', fixing the issue.
+
+2013-01-19  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       tests: make two new test executable
+
+       * t/backslash-issues.sh: This.
+       * t/extra-data.sh: And this.
+
+       Issue revealed by the 'sc_tests_executable' maintainer check.
+
+2013-01-19  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       m4: rename an m4 file to a more appropriate name
+
+       * m4/obsolete-err.m4: Rename ...
+       * m4/obsolete.m4: ... like this.
+       * Makefile.am (dist_automake_ac_DATA): Adjust.
+       * t/ansi2knr-no-more.sh: Likewise.
+
+2013-01-19  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       NEWS: update w.r.t. recent documentation fixes
+
+2013-01-19  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       compat: reinstate AM_CONFIG_HEADER and AM_PROG_CC_STDC
+
+       Make them give runtime warnings in the obsolete category, but apart
+       from that, make them behave as they did in Automake 1.12.x and earlier.
+
+       While removing those macros seemed quite harmless, because it didn't put
+       a real burden on the developers (requiring them just to do a quick edit
+       to configure.ac), it turned out to place an unsustainable burden (or at
+       least, a burden perceived as such) on distro packagers who use the latest
+       Automake to bootstrap existing packages.  Many of those packages, while
+       having likely updated to AC_CONFIG_HEADERS in their development version,
+       still used AM_CONFIG_HEADER in their existing released versions, and the
+       removal of this macro would have thus forced the Fedora packagers to
+       patch all of them.  References:
+
+         <http://www.mail-archive.com/devel@lists.fedoraproject.org/msg52840.html>
+         <http://www.spinics.net/lists/fedora-devel/msg175922.html>
+         <http://blog.flameeyes.eu/2013/01/autotools-mythbuster-automake-pains>
+
+       In addition, the Fedora packagers have already decided to patch their
+       Automake 1.13.1 to reinstate the AM_CONFIG_HEADER and AM_PROG_CC_STDC
+       macros (plus other macros that I don't believe it's worth worrying about):
+
+         <http://www.spinics.net/lists/fedora-devel/msg176098.html>
+         <http://www.mail-archive.com/devel@lists.fedoraproject.org/msg53030.html>
+         <http://pkgs.fedoraproject.org/cgit/automake.git/commit/?id=ffe6bc39>
+
+       So, rather than having one more incompatibility floating around, we
+       better mirror that change (or, actually, its relevant parts) in the
+       upstream.
+
+       * m4/obsolete-err.m4 (AM_CONFIG_HEADER, AM_PROG_CC_STDC): Revert to the
+       older semantics, plus a runtime warning in the 'obsolete' category.
+       * t/backcompat6.sh: Use AM_CONFIG_HEADER once again.
+       * t/am-config-header-no-more.sh: Rename ...
+       * t/am-config-header.sh: ... like this, and adjust.
+       * t/am-prog-cc-stdc-no-more.sh: Rename ...
+       * t/am-prog-cc-stdc.sh: ... like this, and adjust.
+       * t/list-of-tests.mk: Adjust.
+       * NEWS: Update.
+
+2013-01-18  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       Merge branch 'rm-f-probe' into maint
+
+       * rm-f-probe:
+         init.m4: add probe to check "rm -f" without args work
+
+2013-01-18  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       docs: parallel-tests is no longer experimental
+
+       So don't declare it as such in the documentation.
+
+       Reported by Brandon Black:
+       <http://lists.gnu.org/archive/html/automake/2013-01/msg00052.html>
+
+       * doc/automake.texi: Adjust.
+       * THANKS: Update.
+
+2013-01-18  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       docs: serial-tests are not deprecated, just discouraged
+
+       We don't plan to remove support for them, nor to have the serial-tests
+       option give any kind of runtime warning, so don't alarm the users
+       still using serial tests with pointless "deprecation" or "obsolescence"
+       warnings.
+
+       Fixes automake bug#13478.
+
+       See also:
+       <http://lists.gnu.org/archive/html/automake/2013-01/msg00058.html>
+
+       * doc/automake.texi: Adjust.
+       * THANKS: Update.
+
+2013-01-18  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       plans: we are not going to remove AM_PROG_MKDIR_P in Automake 1.14
+
+       See commit v1.13.1-109-g030ecb4 of 2013-01-16, "compat: restore
+       AM_PROG_MKDIR, again", for the rationale; that rationale is now
+       also copied...
+
+       * PLANS/obsolete-removed/am-prog-mkdir-p.txt: ... here.
+
+2013-01-18  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       NEWS: we are not going to remove AM_PROG_MKDIR_P in Automake 1.14
+
+       See commit v1.13.1-109-g030ecb4 of 2013-01-16, "compat: restore
+       AM_PROG_MKDIR, again", for the rationale.
+
+2013-01-16  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       init.m4: add probe to check "rm -f" without args work
+
+       See automake bug#10828.
+
+       POSIX will say in a future version that running "rm -f" with no argument
+       is OK: <http://austingroupbugs.net/view.php?id=542>).
+
+       We want to be able to make that assumption in our Makefile recipes.
+       So we introduce an aggressive probe to check that the usage we want is
+       actually supported "in the wild" to an acceptable degree.
+
+       * m4/init.m4 (AM_INIT_AUTOMAKE): Implement the probe.  To make any issue
+       more visible, cause the running configure to be aborted by default if
+       the 'rm' program in use doesn't match our expectations; the user can
+       still override this though, by setting the ACCEPT_INFERIOR_RM_PROGRAM
+       environment variable to "yes".
+
+       * t/spy-rm.tap: Update heading comments.
+       * t/rm-f-probe.sh: New test.
+       * t/list-of-tests.mk: Add it.
+       * PLANS/rm-f-without-args.txt: Adjust.
+
+2013-01-13  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       subdir-objects: complain if it isn't enabled
+
+       Since the next major automake version will make the behaviour so far
+       only activated with the 'subdir-object' option mandatory, it's better
+       if we start warning users not using that option.
+
+       As suggested by Peter Johansson, we strive to avoid the warning when
+       it would be irrelevant, i.e., if all source files sit in "current"
+       directory.
+
+       See automake bug#13378.
+
+       * automake.in (handle_single_transform): Print the warning when
+       necessary.
+       * t/subobj.sh: Enhance.
+       * t/ax/depcomp.sh: Adjust.
+       * t/cscope.tap: Likewise.
+       * t/depcomp8a.sh: Likewise.
+       * t/depcomp8b.sh: Likewise.
+       * t/ext2.sh: Likewise.
+       * t/extra-portability.sh: Likewise.
+       * t/fort2.sh: Likewise.
+       * t/fort4.sh: Likewise.
+       * t/fort5.sh: Likewise.
+       * t/lex-line.sh: Likewise.
+       * t/libtool3.sh: Likewise.
+       * t/ltinstloc.sh: Likewise.
+       * t/ltlibsrc.sh: Likewise.
+       * t/ltorder.sh: Likewise.
+       * t/parallel-tests-suffix-prog.sh: Likewise.
+       * t/sourcefile-in-subdir.sh: Likewise.
+       * t/specflg9.sh: Likewise.
+       * t/subobj4.sh: Likewise.
+       * t/subobj7.sh: Likewise.
+       * t/subpkg-yacc.sh: Likewise.
+       * t/subpkg.sh: Likewise.
+       * t/suffix-custom-subobj-and-specflg.sh: Likewise.
+       * t/vala-libs.sh: Likewise.
+       * t/vala-non-recursive-setup.sh: Likewise.
+       * t/yacc-grepping2.sh: Likewise.
+       * t/yacc-line.sh: Likewise.
+
+2013-01-12  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       plans: update w.r.t. latest changes
+
+2013-01-12  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       ywrap: remove an obsolete FIXME comment
+
+       If it were still relevant, somebody would have complained by now.
+
+2013-01-12  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       ywrap: style fixes (no semantic change intended)
+
+2013-01-12  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       convenience: "make lint" as an alias for "make maintainer-check"
+
+       * maintainer/syntax-checks.mk (lint): Here.  I'm a lazy typist ...
+
+2013-01-12  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       docs: typofix in manual
+
+       * doc/automake.texi (Yacc and Lex): Here, don't write "automake -i"
+       where "automake -a" is actually intended.  Re-wrap some text while
+       at it.
+
+2013-01-12  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       coverage: using multiple lexers in a single program
+
+       Using Flex and Automake built-in support for lex, that is possible.
+       A little tricky, but not difficult.
+
+       See:
+       <http://lists.gnu.org/archive/html/automake/2010-10/msg00081.html>
+       <http://lists.gnu.org/archive/html/automake/2009-03/msg00061.html>
+
+       * t/lex-multiple.sh: New test.
+       * t/list-of-tests.mk: Add it.
+
+2013-01-12  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       tests: remove most uses of the AM_PROG_CC_C_O obsolete macro
+
+       Our NEWS file says its use will no longer be required in Automake
+       1.13, so better make sure that is actually the case.
+
+       * Several tests: Adjust.
+
+2013-01-12  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       coverage: obsolete macro AM_PROG_CC_C_O should cause no warning nor errors
+
+       Suggested by Eric Blake.
+
+       * t/am-prog-cc-c-o.sh: New test.
+       * t/list-of-tests.mk: Add it.
+
+2013-01-12  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       INSTALL: update copyright years
+
+2013-01-12  Mike Frysinger  <vapier@gentoo.org>  (tiny change)
+
+       ithreads: use runtime (not configure time) detection of perl threads
+
+       I can't imagine the runtime checks being a big runtime penalty, so there
+       shouldn't be a need to do the checks at configure check and hardcode the
+       result in the generated automake.
+
+       With the current system, it means if you change your perl config (build
+       perl w/threads, build automake, build perl w/out threads), or deploy a
+       compiled automake package on a different system (build had threads, but
+       deployed system does not), you get errors when trying to run automake.
+
+       So take the logic from configure.ac and move it to the one place where
+       PERL_THREADS is used (lib/Automake/Config.in) and do the version/config
+       checking at runtime.
+
+       * bootstrap.sh (PERL_THREADS): Delete assignment and use in sed.
+       * configure.ac (am_cv_prog_PERL_ithreads, PERL_THREADS): Delete all code
+       related to these two variables.
+       * lib/Automake/Config.in (perl_threads): Initialize to 0, and only set to
+       1 if the perl version is at least 5.007_002, and useithreads is in Config.
+
+2013-01-12  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       copyright: add few missing copyright notices
+
+       Issue revealed by warnings from "make update-copyright".
+
+       * maintainer/am-ft: Add copyright notice.
+       * maintainer/am-xft: Likewise.
+       * maintainer/rename-tests: Likewise.
+
+2013-01-12  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       maint: files in PLANS are to be exempted from copyright notice
+
+       * maintainer/maint.mk (update-copyright): Adjust.
+
+2013-01-12  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       maint: consistently honor the UPDATE_COPYRIGHT_YEAR environment variable
+
+       * maintainer/maint.mk (update-copyright): Here.  The 'lib/update-copyright'
+       already honoured it, but some parts of our recipe didn't.  This has caused
+       the incomplete copyright bump that was fixed by the previous patch.
+
+2013-01-12  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       copyright: update some copyright years
+
+       With "make update-copyright".  Apparently they were missed in the
+       last bump.
+
+       * bootstrap.sh, configure.ac, t/txinfo-builddir.sh: In these files.
+
+2013-01-11  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       compile: use 'compile' script when "-c -o" is used with losing compilers
+
+       Do so seen when only source files in the "current" directory are present.
+
+       This commit is part of a series of related changes addressing automake
+       bug#13378 (see also the plan 'PLANS/subdir-objects.txt').
+
+       Before this change, Automake-generated C compilation rules mistakenly
+       passed the "-c -o" options combination unconditionally (even to losing
+       compiler) when the 'subdir-objects' was used but sources were only
+       present in the top-level directory.  Issue spotted by Nick Bowler:
+
+         <http://debbugs.gnu.org/cgi/bugreport.cgi?bug=13378#35>
+         <http://debbugs.gnu.org/cgi/bugreport.cgi?bug=13378#44>
+
+       We fix this by having Automake redefine AC_PROG_CC to take over the role
+       of AM_PROG_CC_C_O and to require the 'compile' script unconditionally
+       (albeit that will continue to be invoked only when inferior compilers
+       are detected).
+
+       Among other things, this means AM_PROG_CC_C_O explicitly is no longer
+       required; that macro is still supported for backward-compatibility, but
+       calling it is basically a no-op now.
+
+       This change has some pros and some cons (obviously, we believe the former
+       outweighs the latter).  Here are the most relevant ones:
+
+       + Pros 1:
+         Some logic in the Automake script has been simplified.
+       + Pros 2:
+         That simplification has automatically fixed an actual bug (see
+         Nick's mails referenced above; admittedly, that was present only in
+         corner-case situations, but still); the test 't/ccnoco4.sh', which
+         demonstrated the bug and has been failing so far, now passes.
+       + Pros 3:
+         Things works more "automagically" now (no need to manually add the
+         AM_PROG_CC_C_O macro to configure.ac anymore).
+
+       * Cons 1:
+         The 'compile' script will be required in all projects using C
+         compilation; this will only be a problem for packages not using
+         '--add-missing'.  However, such packages are definitely more rare
+         than the ones using '--add-missing', and adjusting them will be
+         trivial -- just copy the compile script over from the new Automake
+         installation.
+       * Cons 2:
+         The copy & paste of autoconf internals hack this change has introduced
+         in our "rewrite" of AC_PROG_CC is really an egregious abomination.  It
+         can only be justified with the fact that we expect future versions of
+         autoconf to implement the semantics we need directly in AC_PROG_CC, so
+         that we'll be able to leverage that (since Automake 1.14 will require
+         the latest Autoconf version released).
+
+       Now, the detailed list of file-by-file changes ...
+
+       * automake.in ($seen_cc_c_o): Remove this global variable.
+       (scan_autoconf_traces): Don't set it, and do not trace the
+       'AM_PROG_CC_C_O' m4 macro.
+       (lang_c_rewrite): Remove, no longer needed.
+       * doc/automake.texi: Adjust expected "autoreconf --install" output
+       in the amhello example.  Remove statements about the need for the
+       AM_PROG_CC_C_O macro.  Report it is obsolete now.
+       * m4/init.m4: Re-write AC_PROG_CC to append checks about whether the
+       C compiler supports "-c -o" together.  These checks have basically
+       been ripped out (with adaptations) from the 'AC_PROG_CC_C_O' macro
+       of Autoconf and ...
+       * m4/minuso.m4 (AM_PROG_CC_C_O): ... this macro of ours, which has
+       thus basically become a no-op.
+       * t/ax/am-test-lib.sh (am_setup_testdir): Also copy the 'compile'
+       script in the test directory; if we don't do so, every test using
+       AC_PROG_CC should call automake with the "--add-missing" option, or
+       copy the 'compile' script itself.
+       * t/cond11.sh: No need to create a dummy 'compile' script: that is
+       already brought in by 'am_setup_testdir()', that is automatically
+       invoked when 'test-lib.sh' is sourced.
+       * t/add-missing.tap: Adjust: we expect the 'compile' script to be
+       required by a mere AC_PROG_CC call now.
+       * t/dist-auxdir-many-subdirs.sh: Likewise.
+       * t/specflg6.sh: Likewise.
+       * t/subobj4.sh: Likewise.
+       * t/cxx-lt-demo.sh: Likewise, and update comments to match.
+       * t/distcom2.sh: Enhance a little.
+       * t/dollarvar2.sh: Adjust.
+       * t/extra-portability.sh: Likewise.
+       * t/libobj19.sh: Likewise.
+       * t/per-target-flags.sh: Likewise.
+       * t/repeated-options.sh: Likewise.
+       * t/subobj.sh: Likewise, and enhance a little.
+       * t/ccnoco2.sh: Remove as obsolete.
+       * t/list-of-tests.mk (handwritten_TESTS): Adjust.
+       (XFAIL_TESTS): Remove 't/ccnoco4.sh'.
+       * NEWS: Update.
+
+2013-01-11  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       HACKING: suggest more checks before releasing
+
+       In particular, "make check-no-trailing-backslash-in-recipes",
+       "make check-cc-no-c-o" and "make maintainer-check" should also
+       be run.
+
+2013-01-11  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       tests: can fake a compiler not grasping "-c -o" -- globally in all tests
+
+       The ability to easily do so will be quite important in upcoming changes
+       about C compilation handling and semantics of the 'subdir-objects'
+       option.  Refer to the extensive discussion about automake bug#13378 for
+       more details: <http://debbugs.gnu.org/cgi/bugreport.cgi?bug=13378>.
+
+       See also commit 'v1.13.1-34-g744cd57' of 2013-01-08, "coverage: compile
+       rules used "-c -o" also with losing compilers".
+
+       * t/ax/cc-no-c-o.in: New, a "C compiler" that chokes when the '-c' and
+       '-o' options are passed together to it on the command line.
+       * Makefile.am (t/ax/cc-no-c-o): Generate this script from it.
+       (noinst_SCRIPTS, CLEANFILES): Add it.
+       (EXTRA_DIST): Add 't/ax/cc-no-c-o.in'.
+       (check-cc-no-c-o): New target, runs the whole testsuite with 'cc-no-c-o'
+       as the C compiler (bot GNU and non-GNU).
+       * .gitignore: Update.
+       * t/ccnoco.sh: Use the new script instead of duplicating it.
+       * t/ccnoco3.sh: Likewise.
+       * t/ccnoco4.sh: Likewise.
+       * t/self-check-cc-no-c-o.sh: New testsuite self-check.
+       * t/list-of-tests.mk: Adjust.
+
+2013-01-11  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       sync: update files from upstream with "make fetch"
+
+       * lib/INSTALL: Update.
+       * lib/config.guess: Likewise.
+       * lib/config.sub: Likewise.
+       * lib/gendocs_template: Likewise.
+       * lib/gitlog-to-changelog: Likewise.
+       * lib/gnupload: Likewise.
+       * lib/texinfo.tex: Likewise.
+       * lib/update-copyright: Likewise.
+
+2013-01-10  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       typofix: in comments in GNUmakefile
+
+2013-01-10  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       Rename 'maint/' -> 'maintainer/', for Git's sake
+
+       Otherwise, Git gets confused by the fact that a directory ('maint')
+       is named like a branch, and forces me to tweak the command line to
+       resolve the ambiguity for it.
+
+       * maint/: Rename ...
+       * maintainer/: ... like this.
+       * Makefile.am, GNUmakefile: Adjust.
+
+2013-01-10  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       HACKING: minor typofix
+
+2013-01-10  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       HACKING: bug-tracker, the PLANS directory, and how to plan "big" changes
+
+2013-01-10  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       HACKING: rewindable branches should live in the 'experimental/*' namespace
+
+2013-01-10  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       HACKING: fixlets about git branch rewinding policy
+
+2013-01-10  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       HACKING: commit messages are not to follow GCS ChangeLog rules too strongly
+
+2013-01-10  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       HACKING: "detailed explanation" in commit messages is almost mandatory
+
+2013-01-10  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       HACKING: we use "merge --log" even when merging master
+
+2013-01-10  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       HACKING: typofix
+
+2013-01-09  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       depend2.am: fix comments on verbosity of compilation rules
+
+       The situation and decisions described on those comments have become
+       quite outdated since the introduction of the silent-rules support.
+       Today, the general idea is to have nice, terse output if silent rules
+       are enabled, and complete, faithful, very verbose output if they are
+       not -- without trying to "massage" this verbose output in a more
+       pleasant form if that would cause complication in the affected code.
+
+       So it's better to just drop the obsolescent comments.
+
+       Note that we don't start simplifying the existing rules according
+       to this new philosophy; that will only be done when touching some
+       existing code (for the 'depend2.am' code, that will probably happen
+       on the master branch).
+
+2013-01-09  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       depend2.am: improve comments a little
+
+       * lib/am/depend2.am: The "fastdep" mode is supported not only for
+       gcc 3.x, but for gcc 3.x or later, in particular, for all gcc in
+       the 4.x series (at the time of writing, the latest release is 4.72).
+       Adjust the comments to match, and re-wrap them while at it.
+
+2013-01-09  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       plans: automake 1.14 is to assume "rm -f" with no args is OK
+
+       See automake bug#10828.
+
+       * PLANS/rm-f-without-args.txt: New.
+
+2013-01-09  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       plans: we want to active subdir-objects unconditionally in automake 1.14
+
+       See automake bug#13378.
+
+       * PLANS/subdir-objects.txt: New.
+       * t/ccnoco4.sh: Improve heading comments a little.
+
+2013-01-08  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       tests: adjust stale references to old test names
+
+       * t/remake-renamed-m4-macro-and-file.sh: Adjust to reflect to old
+       "acloca22 -> t/aclocal-deleted-header.sh" test rename.
+       * t/aclocal-pr450.sh (configure.ac): Use '$me' in the AC_INIT call,
+       instead of hard-coding the old name of this test, i.e., "acloca19".
+
+2013-01-08  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       tests: rename the last aclocal test with dumb name
+
+       * t/acloca10.sh: Rename ...
+       * t/aclocal-I-install.sh: ... to this saner and slightly more
+       self-explanatory name.
+       * t/list-of-tests.mk: Adjust.
+
+2013-01-08  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       tests: fix an old botched change to an aclocal test
+
+       * t/acloca10.sh (configure.ac): Here, invoke the m4 macro 'MACRO2'
+       before the macro 'MACRO1' (the related test 't/aclocal-I-order-2.sh'
+       does the opposite).  This reverts a botched edit done (by myself,
+       oops) in commit 'v1.11-1335-gefdc3e1' of 2011-09-11, "tests: minor
+       optimizations/simplifications in some aclocal tests", and makes the
+       behaviour of the test match once again what is stated in the
+       heading comments.  While at it, improve those same heading comments
+       a little.
+
+2013-01-08  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       tests: fix some botched inter-test references in heading comments
+
+       * t/aclocal-I-order-2.sh: Here.
+       * t/aclocal-I-order-2.sh: And here.
+
+2013-01-08  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       coverage: compile rules used "-c -o" also with losing compilers
+
+       If the 'subdir-objects' option is used, Automake-generated rules for
+       C compilation pass both the "-c" and "-o" options to the C compiler,
+       *unconditionally*.  There are some compilers that choke on such an
+       usage, but the AM_PROG_CC_C_O macro takes care of them (it does so by
+       redefining $CC to use the Automake-provided 'compile' wrapper script
+       automatically, if a losing compiler is detected at configure runtime).
+
+       Unfortunately, in case the 'subdir-objects' option is specified in a
+       Makefile.am, but all the source files resided anyway in the top-level
+       directory (relative to the Makefile.am), Automake do *not* complain
+       if AM_PROG_CC_C_O wasn't invoked in 'configure.ac' -- all the while
+       still passing "-c -o" to the compiler invocations.  This could cause
+       compilation failures with losing compilers if the user forget to call
+       AM_PROG_CC_C_O in 'configure.ac' (and Automake would not warn him of
+       the issue).
+
+       Expose this bug in the testsuite.
+
+       Issue identified by Nick Bowler in the discussion on automake bug#13378:
+       <http://debbugs.gnu.org/cgi/bugreport.cgi?bug=13378#35>
+       <http://debbugs.gnu.org/cgi/bugreport.cgi?bug=13378#44>
+
+       * t/ccnoco4.sh: New test.
+       * t/list-of-tests.mk (XFAIL_TESTS, handwritten_TESTS): List it.
+
+2013-01-05  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       texi: remove extra verbosity in creation of dirstamp directory
+
+       * lib/am/texi-vers.am (%STAMPVTI%): Here.
+
+2013-01-05  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       coverage: user can avoid distributing '.info' pages
+
+       Can be done like this:
+
+               AUTOMAKE_OPTIONS = info-in-builddir
+               dist-info:
+                   @:
+
+       Note that this usage is not yet documented: we might decide to go
+       for a fully-fledged 'no-dist-info' flag, or something like that, in
+       future automake version (this is not yet decided); in which case,
+       it's better not to have people start to rely on the hack above.
+       Still, there's no good reason to break it gratuitously, hence this
+       test coverage.
+
+       * t/txinfo-nodist-info.sh: New test.
+       * t/list-of-tests.mk: Add it.
+
+2013-01-04  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       Merge branch 'plans' into maint
+
+       * plans:
+         plans: add some on-going plans (already registered on the bug tracker)
+
+2013-01-04  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       plans: add some on-going plans (already registered on the bug tracker)
+
+2013-01-04  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       Merge branch 'plans' into maint
+
+       * plans:
+         plans: add the "PLANS" directory
+
+
+       Conflicts:
+               Makefile.am
+
+2013-01-04  Karl Berry  <karl@gnu.org>
+
+       docs: mention dist-hook help for EXTRA_DIST
+
+       * automake.texi (Basics of Distribution): mention dist-hook
+       as working around the problems of whole directories in EXTRA_DIST.
+
+2013-01-03  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       texi: remove workaround for older Texinfo (4.1)
+
+       * lib/am/texibuild.am: Here, in the rules generating HTML output.
+       We can do so because, since Automake 1.13, we require Texinfo >= 4.9
+       anyway.
+
+       Basically a backport of Automake-NG commit '1.12.2-879-ge6caf5e'.
+
+2013-01-03  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       NEWS: improve wordings in entry deprecating suffix-less info files
+
+2013-01-03  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       build: don't enable 'color-tests' automake option explicitly
+
+       It's enabled by default since commit 'v1.12.2-136-g2d5571e' (this
+       change appeared in Automake 1.13).
+
+       * configure.ac (AM_INIT_AUTOMAKE): Drop 'color-tests'.
+
+2013-01-03  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       build: enable all warnings as fatal in our own build system
+
+       Automake should of course be able to bootstrap itself in a
+       warning-free manner w.r.t. the Autotools.  So make any failure
+       to do so fatal.  Not doing so caused the regression fixed by
+       previous commit 'v1.13.1-22-ga790fae' to go unnoticed.
+
+       * configure.ac (AM_INIT_AUTOMAKE): Add '-Werror' and '-Wall'.
+       * bootstrap.sh: Pass the '-Wall -Werror' options to aclocal,
+       automake and autoconf invocations.
+
+2013-01-03  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       texi: Texinfo sources and CLEANFILES definition should co-exist peacefully
+
+       But they don't now, due to a regression introduced in commit
+       'v1.13.1-4-gc1a8f56'.  Fix it.  The regression was hitting our
+       own build system!
+
+       * automake.in (handle_texinfo_helper): Only complain if the
+       'info-in-builddir' is not active and a '.info' file (not any
+       random file!) is listed in CLEANFILES or DISTCLEANFILES.
+
+2013-01-03  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       tests: make two new test executable
+
+       * t/backslash-issues.sh: This.
+       * t/extra-data.sh: And this.
+
+       Issue revealed by the 'sc_tests_executable' maintainer check.
+
+2013-01-03  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       Merge branch 'info-in-builddir' into maint
+
+       * info-in-builddir:
+         texi: deprecate hack about info files in CLEANFILES variables
+         texi: info files can be generated in the builddir
+
+2013-01-03  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       runtest: better command line API
+
+       * t/ax/runtest.in: Accept options '-k' and '--keep-testdirs' (same
+       as exporting '$keep_testdirs' to "yes").  To improve compatibility
+       with the "make check" interface, allow environment variables to be
+       passes on the command line.  Minor adjustments while at it.
+
+2013-01-03  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       tests: move runtest.in away from the top-lever directory
+
+       Not only this leaves the top-lever directory less cluttered, but
+       helps in keeping the testsuite-related files more "centralized".
+
+       * runtest.in: Move ...
+       * t/ax/runtest.in: ... here.  While at it, add customary
+       '@configure_input@' comment line.
+       * Makefile.am (runtest, EXTRA_DIST): Adjust.
+
+2013-01-03  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       maint: move more maintainer files in the 'maint/' subdir
+
+       * maint.mk: Move ...
+       * maint/maint.mk: ... here.
+       * syntax-checks.mk: Move ...
+       * maint/syntax-checks.mk: ... here.
+       * Makefile.am: Adjust.
+       * GNUmakefile: Likewise.
+
+2013-01-03  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       plans: add the "PLANS" directory
+
+       Individual files or sub-directories about future and on-going
+       development plans in Automake will be added in follow-up commits.
+
+       This new set of documents is meant to help ensure a more controlled
+       and smooth development and evolution for Automake, in several ways.
+
+        - Having the plans clearly spelled out should will avoid messy
+          roadmaps with no clear way forward or with muddy or ill-defined
+          aims or purposes; a trap this is too easy to fall into.
+
+        - Keeping planned changes cooking and re-hashed for a while should
+          ensure rough edges are smoothed up, transitions are planned in a
+          proper way (hopefully avoiding debacles like the AM_MKDIR_PROG_P
+          deprecation and the AM_CONFIG_HEADER too-abrupt removal), and
+          "power users" have more chances of getting informed in due time,
+          thus having all the time to prepare for the changes or raise
+          objections against them.
+
+        - Having the plans clearly stated and registered in a "centralized"
+          location should make it more difficult to them to slip through
+          the cracks, getting forgotten or (worse) only half-implemented.
+
+        - Even for discussions and plans registered on the Bug Tracker
+          as well, a corresponding entry in the PLANS directory can help
+          in keeping main ideas summarized, and consensus and/or objections
+          registered and easily compared.
+
+       Motivation:
+       <http://blog.flameeyes.eu/2013/01/autotools-mythbuster-automake-pains>
+       Not a flatting picture for us (and maybe a little too harsh), but
+       basically true and even spot-on in some regards.
+
+       * PLANS/README: New.
+       * Makefile.am (EXTRA_DIST): Distribute the whole PLANS directory.
+
+2013-01-02  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       tests: more significant names for some tests
+
+       * t/spy.sh: Rename...
+       * t/spy-double-colon.sh: ... like this.
+       * t/yacc4.sh: Rename...
+       * t/yacc-misc.sh: ... like this.
+       * t/yaccdry.sh: Rename...
+       * t/yacc-dry.sh: ... like this.
+       * t/yaccpp.sh: Rename...
+       * t/yacc-cxx-grepping.sh: ... like this.
+       * t/yaccvpath.sh: Rename...
+       * t/yacc-vpath.sh: ... like this.
+
+2013-01-02  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       maint: add some of my maintainer-specific scripts
+
+       They are likely not general enough for widespread use, but they
+       are useful nonetheless.
+
+       In the best-case scenario, they will start to be used by other
+       people, and thus accordingly improved and made more general and
+       flexible.
+
+       In the worst case scenario, well, I still get to keep them in a
+       centralized, blessed place, simplifying the deployment and use
+       of them; so still a win for me :-)
+
+       * maint/am-ft: New script.
+       * maint/am-xft: Likewise.
+       * maint/rename-tests: Likewise.
+       * Makefile.am (EXTRA_DIST): Add them.
+
+2013-01-02  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       tests: reorganize tests on backslash issues
+
+       * t/backsl.sh, t/backsl2.sh, t/backsl3.sh: Merge ...
+       * t/backslash-issues.sh: ... into this test.
+       * t/backsl4.sh: Rename ...
+       * t/backslash-before-trailing-whitespace.sh: ... like this.
+       * t/list-of-tests.mk: Adjust.
+
+2013-01-02  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       style: add trailing ':' to some test cases
+
+2013-01-02  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       tests: tweak tests on obsolete EXTRA_DATA variable
+
+       * t/extra3.sh, t/extra4.sh: Merge ....
+       * t/extra-data.sh: ... into this, with updated comments.
+       * t/list-of-tests.mk: Adjust.  Also Tweak the order in
+       which some other tests are listed.
+
+2013-01-02  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       tests: more significant names for some tests
+
+       * t/extra5.sh: Rename ....
+       * t/extra-dist-vpath-dir.sh: ... like this.
+       * t/extra6.sh: Rename ....
+       * t/extra-dist-dirs-and-subdirs.sh: ... like this.
+       * t/extra7.sh: Rename ....
+       * t/extra-dist-vpath-dir-merge.sh: ... like this.
+       * t/extra8.sh: Rename ....
+       * t/extra-programs-misc.sh: ... like this.
+       * t/extra9.sh: Rename ....
+       * t/extra-programs-and-libs.sh: ... like this.
+       * t/extra10.sh: Rename ....
+       * t/extra-dist-wildcards.sh: ... like this.
+       * t/extra11.sh: Rename ....
+       * t/extra-dist-wildcards-gnu.sh: ... like this.
+       * t/extra12.sh: Rename ....
+       * t/extra-dist-wildcards-vpath.sh: ... like this.
+       * t/extradep.sh: Rename ....
+       * t/extra-deps.sh: ... like this, and adjust heading comments.
+       * t/extradep2.sh: Rename ....
+       * t/extra-deps-lt.sh: ... like this, and adjust heading comments.
+       * t/list-of-tests.mk: Adjust.
+
+2013-01-02  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       cosmetics: remove few occurrences of trailing whitespace
+
+2013-01-02  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       docs: re-introduce mention of two-args AM_INIT_AUTOMAKE invocation
+
+       Albeit obsolescent and raising warnings in the 'obsolete' category,
+       that usage is still supported, and will need to be until Autoconf
+       improves its handling of configure-time-generated package version
+       numbers.  So it's better to explicitly document it again, stating
+       that it is obsoleted but still working (and why), rather then leaving
+       it as Yet Another Undocumented Feature (that will mysteriously and
+       suddenly break some random day in the future).
+
+       It's worth giving some background about how we ended up in the
+       situation that this patch fixes.
+
+       We had originally removed support for the long-deprecated two-args
+       AM_INIT_AUTOMAKE invocation (see commit v1.12-67-ge186355).  Before
+       that removal could land in a released Automake version, Bob Friesenhahn
+       made a quite compelling point that the two-args AM_INIT_AUTOMAKE
+       invocation could still be useful for modern, maintained packages like
+       GraphicsMagick, at least until Autoconf is fixed to offer better support
+       for "dynamic" package versions (see commit v1.12.2-245-g2abe183 for more
+       in-depth rationales and references).  However, in that commit we didn't
+       revert the removal of the *documentation* for this two-arguments
+       AM_INIT_AUTOMAKE invocation (and no rationale for not doing so was given
+       in the commit message).  Time to remedy that.
+
+       Indirectly suggested by Diego Elio Pattenò:
+       <http://blog.flameeyes.eu/2013/01/autotools-mythbuster-automake-pains>
+
+       * doc/automake.texi: Adjust.
+       * NEWS: Update.
+       * THANKS: Likewise.
+
+2013-01-02  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       texi: warn against '.txi' and '.texinfo' input suffixes
+
+       The warning being in the 'obsolete' category.  This is mostly to
+       ease transition to Automake-NG (see commit v1.12.1-416-gd5459b9),
+       and to discourage use of seldom-tested setups.
+
+       * automake.in (handle_texinfo_helper): Warn against Texinfo input
+       files with '.txi' or '.texinfo' suffixes.
+       * NEWS: Update.
+       * t/txinfo-other-suffixes.sh: Adjust and enhance.
+       * t/txinfo-no-repeated-targets.sh: No longer use '.txi' and
+       '.texinfo' extensions.
+
+2013-01-02  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       cleanup: remove two lines of dead code in automake
+
+       * automake.in (scan_texinfo_file): Here, the definition and
+       munging of '$infobase'.
+
+2013-01-02  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       texi: warn against suffix-less info files
+
+       The warning being in the 'obsolete' category.  This is mostly to
+       ease transition to Automake-NG (see commit v1.12.1-392-ga0c7b6a),
+       and to discourage use of seldom-tested setups.
+
+       * automake.in (scan_texinfo_file): Warn against '@setfilename'
+       directives that specify suffix-less output info files.
+       * t/txinfo-without-info-suffix.sh: Adjust and enhance.
+       * t/txinfo-makeinfo-error-no-clobber.sh: No longer use suffix-less
+       info files in '@setfilename' directives.
+       * t/primary-prefix-valid-couples.sh: Likewise.
+       * t/txinfo-setfilename-repeated.sh: Likewise.
+       * t/txinfo-vtexi2.sh : Likewise.
+       * t/mdate2.sh: Likewise.
+       * NEWS: Update.
+
+2013-01-02  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       texi: deprecate hack about info files in CLEANFILES variables
+
+       For quite a long time, Automake has been implementing an undocumented
+       hack which ensured that '.info' files which appeared to be cleaned (by
+       e.g. being listed in the CLEANFILES or DISTCLEANFILES variables) were
+       built in the builddir rather than in the srcdir; this hack was introduced
+       to ensure better backward-compatibility with packages such as Texinfo,
+       which did things like:
+
+           info_TEXINFOS = texinfo.txi info-stnd.texi info.texi
+           DISTCLEANFILES = texinfo texinfo-* info*.info*
+           # Do not create info files for distribution.
+           dist-info:
+               @:
+
+       in order not to distribute .info files.
+
+       Now that we have the 'info-in-builddir' option that explicitly causes
+       generated '.info' files to be placed in the builddir, this hack should
+       be longer necessary, so we deprecate it with runtime warnings.  It is
+       scheduled to be removed altogether in Automake 1.14.
+
+       * automake.in (handle_texinfo_helper): Raise proper runtime warnings
+       if the hack is triggered.
+       * NEWS: Update.
+       * t/txinfo28.sh: Adjust.
+       * t/txinfo23.sh: Likewise.
+       * t/txinfo25.sh: Adjust and extend.
+       * t/txinfo24.sh: Likewise.
+
+2013-01-01  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       texi: info files can be generated in the builddir
+
+       User can now ask info files to be built in the $(builddir), rather than
+       the $(srcdir), by specifying the Automake option 'info-in-builddir'.
+       This feature was requested by the developers of GCC, GDB, GNU binutils
+       and the GNU bfd library.  See the extensive discussion about automake
+       bug#11034 for more details.
+
+       OK, to be honest, having '.info' files built in the builddir was
+       *already* possible, but only using ugly and undocumented hacks involving
+       definition of the CLEANFILES and/or DISTCLEANFILES.  For example, the
+       binutils project did something like this in the relevant 'Makefile.am':
+
+           # Automake 1.9 will only build info files in the objdir if they are
+           # mentioned in DISTCLEANFILES.  It doesn't have to be unconditional,
+           # though, so we use a bogus condition.
+           if GENINSRC_NEVER
+           DISTCLEANFILES = binutils.info
+           endif
+
+       See also the extensive discussion about automake bug#11034; in
+       particular, the following messages:
+       <http://debbugs.gnu.org/cgi/bugreport.cgi?bug=11034#65>
+       <http://debbugs.gnu.org/cgi/bugreport.cgi?bug=11034#80>
+       <http://debbugs.gnu.org/cgi/bugreport.cgi?bug=11034#86>
+       <http://debbugs.gnu.org/cgi/bugreport.cgi?bug=11034#101>
+
+       * lib/Automake/Options.pm (_is_valid_easy_option): Recognize the
+       new 'info-in-builddir' option.
+       * automake.in (handle_texinfo_helper): If that option is set,
+       initialize '$insrc' to '0', so that info files will be generated
+       in the builddir.  Adjust comments to match.
+       * t/txinfo-builddir.sh: New test.
+       * t/list-of-tests.mk: Add it.
+       * NEWS: Update.
+       * doc/automake.texi: Document the new options.
+
+2013-01-01  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       build: respect silent rules in generation of "amhello" example tarball
+
+       * Makefile.am ($(srcdir)/doc/amhello-1.0.tar.gz): Here.
+
+2013-01-01  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       NEWS: fixlets and updates
+
+2013-01-01  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       post-release: minor version bump (1.13.1a)
+
+       * configure.ac, m4/amversion.m4: Bump version to 1.13.1a.
+
+2013-01-01  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       release: stable minor release 1.13.1
+
+       * configure.ac (AC_INIT): Bump version number to 1.13.1.
+       * m4/amversion.m4: Likewise (auto-updated by "make bootstrap").
+
+2013-01-01  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       tests: don't always look for a C++ compiler named 'RCC'
+
+       On MacOS X (10.8), since the file system is case-insensitive, RCC
+       can point to the "Resource Compiler" of the Qt4 Toolkit:
+
+           <http://doc.qt.digia.com/4.2/rcc.html>
+
+       That mismatch causes our configure script to erroneously think that
+       no working C++ compiler is present, and that is thus necessary to
+       skip all the test cases requiring such a compiler.
+
+       So only look for a compiler named 'RCC' if the file system is
+       case-sensible.
+
+       Issue spotted analyzing the testsuite logs reported in bug#13317.
+
+       * configure.ac: Adjust.
+
+2013-01-01  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       tests: fix bug in pkg-config-macros.sh, could cause spurious SKIPs
+
+       Issue spotted perusing the testsuite logs reported in bug#13317.
+
+       * t/pkg-config-macros.sh: Don't use (uninitialized) '$dir' where '$d'
+       should have been used instead.  Set IFS to ':' before looping on the
+       $PATH expansion.  Fix typo: 'alocal' instead of 'aclocal'.  These
+       issues were causing the location in PATH of the 'pkg-config' program
+       not to be found even when the program was present.
+       * THANKS: Update.
+
+2013-01-01  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       docs: autom4te cache can break CONFIGURE_DEPENDENCIES
+
+       In fact, the new test 'remake-configure-dependencies.sh' only
+       works because it disables the autom4te cache :-(  That is more
+       of an AUtotools design issue than an Automake bug, so better
+       just document it ...
+
+       * doc/automake.texi (Rebuilding): ... here.
+
+2013-01-01  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       coverage: test CONFIGURE_DEPENDENCIES
+
+       * t/remake-configure-dependencies.sh: New test.
+       * t/list-of-tests.mk: Add it.
+       * doc/automake.texi: Reference it in comments.
+
+2013-01-01  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       coverage: test CONFIG_STATUS_DEPENDENCIES
+
+       * t/remake-config-status-dependencies.sh: New test.
+       * t/list-of-tests.mk: Add it.
+       * doc/automake.texi: Reference it in comments.
+
+2012-12-31  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       tests: fix reference to related tests in some comments
+
+       * t/acloca10.sh: Here.
+       * t/check2.sh: And here.
+       * t/remake-deleted-m4-file.sh: And here.
+
+2012-12-31  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       tests: some enhancements to texinfo tests (from Automake-NG)
+
+       * t/txinfo-many-output-formats.sh: Backport improvements, almost verbatim,
+       from Automake-NG commit 'v1.13-768-gb434acc' (plus minor tweaks for the
+       sake of non-GNU make implementation).
+       * t/txinfo-many-output-formats-vpath.sh: New test, backported almost
+       verbatim from that same Automake-NG commit (again, with minor tweaks for
+       the sake of non-GNU make implementations).
+       * t/lsit-of-tests.mk: Adjust.
+
+2012-12-31  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       tests: fix reference to sister tests in two heading comments
+
+       * t/color-tests.sh: Here.
+       * t/color-tests2.sh: And here.
+
+2012-12-31  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       maint: update copyright year for 2013 (in branch maint)
+
+2012-12-31  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       docs: adjust comment w.r.t. recent tests renaming
+
+2012-12-31  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       tests: some more renames for texinfo tests
+
+       * t/txinfo.sh: Rename ...
+       * t/txinfo-tex-dist.sh: ... like this.
+       * t/txinfo10.sh: Rename ...
+       * t/txinfo-dvi-recurs.sh: ... like this.
+       * t/txinfo20.sh: Rename ...
+       * t/txinfo-makeinfo-error-no-clobber.sh: ... like this.
+       * t/txinfo-setfilename-suffix-match.sh: Rename ...
+       * t/txinfo-setfilename-suffix-strip.sh: ... like this.
+       * t/txinfo-suffix-less-info.sh: Rename ...
+       * t/txinfo-without-info-suffix.sh: ... like this.
+       * t/vtexi.sh: Rename ...
+       * t/txinfo-vtexi.sh: ... like this.
+       * t/vtexi2.sh: Rename ...
+       * t/txinfo-vtexi2.sh: ... like this.
+       * t/vtexi3.sh: Rename ...
+       * t/txinfo-vtexi3.sh: ... like this, and adjust heading comments.
+       * t/vtexi4.sh: Rename ...
+       * t/txinfo-vtexi4.sh: ... like this, and adjust heading comments.
+       * t/list-of-tests.mk: Adjust.
+
+2012-12-31  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       tests: enhance and tweak some texinfo tests
+
+       * t/txinfo-subdir-pr343.sh: Move the tests checking that '.info.bak'
+       files in subdirs are not unduly distributed into ...
+       * t/txinfo-no-extra-dist.sh: ... in here.  Enhance a little while
+       at it.
+       * t/txinfo-other-suffixes.sh: Also check that the '.texinfo' suffix
+       is accepted and works.
+       * t/txinfo-setfilename-suffix-match.sh: Remove useless call to
+       autoconf, enhance a little.
+
+2012-12-31  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       tests: remove a redundant texinfo test
+
+       * t/txinfo-add-missing.sh: This one, its checks being already covered
+       by the more extensive 't/add-missing.tap' test.
+       * t/txinfo-add-missing2.sh: Rename ...
+       * t/txinfo-add-missing-and-dist.sh: Like this.
+       * t/list-of-tests.mk: Adjust.
+
+2012-12-31  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       tests: don't list a removed tests in XFAIL_TESTS
+
+       * t/list-of-tests.mk (XFAIL_TESTS): No longer list 't/txinfo5.sh' here,
+       it has been removed together with the Cygnus support.
+
+2012-12-31  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       tests: more explicative names for some tests
+
+       Do so for several Texinfo-related tests.  Note that some of such tests
+       with suboptimal names are *not* renamed; that's because they are going
+       to be removed in the master branch anyway (since they check from some
+       soon-to-be-removed features), so renaming them would be wasted work,
+       and could even create useless merge conflicts.
+
+       * t/txinfo2.sh: Rename ...
+       * t/txinfo-no-extra-dist.sh: ... like this.
+       * t/txinfo3.sh: Rename ...
+       * t/txinfo-suffix-less-info.sh: ... like this.
+       * t/txinfo4.sh: Rename ...
+       * t/txinfo-unrecognized-info-suffix.sh: ... like this.
+       * t/txinfo6.sh: Rename ...
+       * t/txinfo-other-suffixes.sh: ... like this.
+       * t/txinfo7.sh: Rename ...
+       * t/txinfo-add-missing.sh: ... like this.
+       * t/txinfo8.sh: Rename ...
+       * t/txinfo-add-missing2.sh: ... like this.
+       * t/txinfo9.sh: Rename ...
+       * t/txinfo-no-repeated-targets.sh: ... like this.
+       * t/txinfo17.sh: Rename ...
+       * t/txinfo-setfilename-repeated.sh: ... like this.
+       * t/txinfo13.sh: Rename ...
+       * t/txinfo-subdir-pr343.sh: ... like this.
+       * t/txinfo16.sh: Rename ...
+       * t/txinfo-info-in-srcdir.sh: ... like this.
+       * t/txinfo21.sh: Rename ...
+       * t/txinfo-many-output-formats.sh: ... like this.
+       * t/txinfo22.sh: Rename ...
+       * t/txinfo-override-texinfo-tex.sh: ... like this.
+       * t/txinfo26.sh: Rename ...
+       * t/txinfo-absolute-srcdir-pr408.sh: ... like this.
+       * t/txinfo27.sh: Rename ...
+       * t/txinfo-no-installinfo.sh: ... like this.
+       * t/txinfo29.sh: Rename ...
+       * t/txinfo-override-infodeps.sh: ... like this.
+       * t/txinfo31.sh: Rename ...
+       * t/txinfo-setfilename-suffix-match.sh: ... like this.
+       * t/txinfo32.sh: Rename ...
+       * t/txinfo-bsd-make-recurs.sh: ... like this.
+       * t/txinfo33.sh: Rename ...
+       * t/txinfo-clean.sh: ... like this.
+       * t/list-of-tests.mk: Adjust.
+
+2012-12-31  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       cleanup: drop a redundant %?FIRST% transform
+
+       * lib/am/texinfos.am: Here: this file is only included one time
+       per Makefile by Automake.
+
+       Cherry picked from Automake-NG commit 'v1.12.2-864-g5c580b0'.
+
+2012-12-31  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       maint: state when compatibility cruft should be removed or warned about
+
+       * automake.in: Here.
+       * lib/Automake/Options.pm: And here.
+       * m4/obsolete-err.m4: And here.
+
+2012-12-30  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       fixup: copyright yars in two recent tests
+
+2012-12-30  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       obsolete: fixup: don't use AU_DEFUN where AC_DEFUN is required
+
+       * m4/obsolete-err.m4: Here, for the definition of 'AM_PROG_CC_STDC'
+
+2012-12-30  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       NEWS: minor fixup
+
+2012-12-30  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       obsolete: better error message if AM_PROG_CC_STDC is used
+
+       In Automake 1.13, the long-deprecated (since 2002) macro AM_PROG_CC_STDC
+       has been removed.  Such a removal, albeit sensible and justified, was
+       probably done in a too-abrupt way, since it didn't turn the pre-existing
+       warning messages into fatal error messages, but simply dropped the macro
+       definition, so that remaining usages of it would cause unclear error
+       messages, e.g.:
+
+           configure.ac:4: warning: macro 'AM_PROG_CC_STDC' not found in library
+
+       from aclocal, and:
+
+           configure.ac:4: error: possibly undefined macro: AM_PROG_CC_STDC
+             If this token and others are legitimate, please use m4_pattern_allow.
+             See the Autoconf documentation.
+
+       from autoconf.
+
+       In an attempt to mitigate this issue, we re-add an AM_PROG_CC_STDC
+       definition that simply raises a *clear* error message when the macro
+       is used.
+
+       * t/am-prog-cc-stdc-no-more.sh: New test.
+       * t/list-of-tests.mk: Add it.
+       * m4/obsolete-err.m4: Add the new "error-raising" definition for
+       AM_PROG_CC_STDC; the error message is a variation of the one already
+       present in the older version of this macro, before it got removed in
+       commit 'v1.12-15-gd2ca168'.
+       * NEWS: Update.
+
+2012-12-30  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       obsolete: better error message if AM_CONFIG_HEADER is used
+
+       In Automake 1.13, the long-deprecated macro AM_CONFIG_HEADER (deprecated
+       since 2002) has been removed in favour of AC_CONFIG_HEADERS.  However,
+       the removal was done without a proper deprecation period, and that
+       caused packages upgrading to Automake 1.13 to fail with very unclear
+       error messages, e.g.:
+
+           configure.ac:4: warning: macro 'AM_CONFIG_HEADER' not found in library
+
+       from aclocal, and:
+
+           configure.ac:4: error: possibly undefined macro: AM_CONFIG_HEADER
+             If this token and others are legitimate, please use m4_pattern_allow.
+             See the Autoconf documentation.
+
+       from autoconf.
+
+       In an attempt to mitigate this issue, we re-add an AM_CONFIG_HEADER
+       definition that simply raises a *clear* error message when the macro
+       is used.
+
+       Report by Paolo Bonzini:
+       <http://lists.gnu.org/archive/html/automake/2012-12/msg00039.html>
+
+       * t/am-config-header-no-more.sh: New test.
+       * t/list-of-tests.mk: Add it.
+       * m4/obsolete-err.m4: New file, contain the new AM_CONFIG_HEADER
+       "error-raising" definition, as well as the definition of the
+       similarly obsolete macros 'AM_C_PROTOTYPES' and 'fp_C_PROTOTYPES',
+       moved in from ...
+       * m4/protos.m4: ... this file, which has thus been removed.
+       * Makefile.am (dist_automake_ac_DATA): Adjust.
+       * t/ansi2knr-no-more.sh: Likewise.
+       * NEWS: Update.
+
+2012-12-29  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       sync: update files from upstream with "make fetch"
+
+       * lib/config.sub: Update.
+       * lib/config.guess: Likewise.
+
+2012-12-29  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       tests: better names for temporary configure.ac files
+
+       When editing a pre-existent 'configure.ac' file in a test script, name
+       the temporary file 'configure.tmp' rather than 'configure.int'; the
+       latter was a relict of the times when we used 'configure.in' as the
+       default name for the Autoconf input files throughout the testsuite.
+
+       * t/cond43.sh: Adjust.
+       * t/depcomp8a.sh: Likewise.
+       * t/depcomp8b.sh: Likewise.
+       * t/gettext.sh: Likewise.
+       * t/mmode.sh: Likewise.
+       * t/pr401.sh: Likewise.
+       * t/pr401b.sh: Likewise.
+       * t/pr401c.sh: Likewise.
+       * t/python11.sh: Likewise.
+       * t/cond42.sh: Likewise.  Also, while at it, rename ...
+       (edit_configure_in): ... this function ...
+       (edit_configure_ac): ... like this.
+
+2012-12-28  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       post-release: minor version bump
+
+       This is for the maint branch.
+
+       * configure.ac, m4/amversion.m4: Bump version to 1.13.0a.
+
+2012-12-28  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       release: stable major release 1.13
+
+       * configure.ac (AC_INIT): Bump version number to 1.13.
+       * m4/amversion.m4 (AM_AUTOMAKE_VERSION): Likewise (regenerated
+       by "make bootstrap").
+
+2012-12-24  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       news: fix botched URL
+
+2012-12-21  Akim Demaille  <akim@lrde.epita.fr>
+
+       ylwrap: various fixes
+
+       Rename properly header guards in generated header files, instead of
+       leaving Y_TAB_H.
+
+       Convert header guards in implementation files.  Because ylwrap failed
+       to rename properly #include in the implementation files, current
+       versions of Bison (e.g., 2.7) duplicate the generated header file in
+       the implementation file.  The header guard then protects the
+       implementation file from duplicate definitions from the header file.
+
+       Generate header guards with a single '_' for series of non alphabetic
+       characters, instead of several.  This is what Bison does.
+
+       Makes the test t/yacc-d-basic.sh pass again.
+
+       * lib/ylwrap (guard): Properly honor $1 to rename properly the
+       header guards.
+       Keep a single _ instead of several.
+       (rename_sed): Rename as...
+       (sed_fix_filenames): this.
+       Suggested by Stefano Lattarini.
+       (sed_fix_header_guards): New.
+       Use it.
+
+2012-12-21  Akim Demaille  <akim@lrde.epita.fr>
+
+       tests: strengthen the ylwrap tests
+
+       * t/yacc-d-basic.sh: Comment changes.
+       (generated): New.
+       Use it to factor various tests.
+       Check that Y_TAB_H is not issued.
+
+2012-12-19  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       NEWS: we plan to ditch MS-DOS/DJGPP support in future Automake versions
+
+2012-12-19  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       maint: typofixes in makefile comments
+
+       * maint.mk (git-upload-release): Here.
+
+2012-12-19  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       maint: remove extra verbosity from a maintainer rule
+
+       * maint.mk (git-upload-release): Here, by adding a forgotten
+       '@' recipe modifier.
+
+2012-12-19  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       NEWS: fix grammaro
+
+2012-12-19  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       maint: version bump after beta release
+
+       * configure.ac (AC_INIT): Bump version number to 1.12c, as per
+       HACKING suggestion.
+       * m4/amversion.m4: Likewise (autoupdated by "make bootstrap").
+
+2012-12-19  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       release: beta release 1.12b (will become 1.13)
+
+       * configure.ac (AC_INIT): Bump version number to 1.12b.
+       * m4/amversion.m4: Likewise (auto-updated by "make bootstrap").
+
+2012-12-19  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       cosmetics: comments fixlets in our Makefile
+
+       * Makefile.am: Prefer '#' comments over '##' ones where it makes sense.
+       Other minor style tweaks to comments about "updated later" variables.
+
+2012-12-19  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       cosmetics: consistency changes in some make recipes
+
+       * Makefile.am (install-exec-hook, uninstall-hook): Don't use extra
+       quoting in variable assignments.  More consistent use of whitespace.
+
+2012-12-18  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       tests: avoid a spurious failure on NetBSD
+
+       * t/tags-pr12372.sh (configure.ac): AC_SUBST the LINK variable to a
+       dummy invocation, to avoid possible errors from make or the linker;
+       errors we do not care about in the least in this test.
+       (Makefile.am, sub/Makefile.am): Remove LINK definitions; simply
+       inherit that in configure.ac.
+
+2012-12-18  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       tests: re-enable some checks disabled by mistake ...
+
+       * t/subpkg-macrodir.sh: ... in this test.  And fix some typos that would
+       have caused the newly re-enabled check to spuriously fail.  Issue revealed
+       by the lack of '.PHONY' support in Solaris CCS make (yes, so we've been
+       actually *helped* by that make implementation once, at last.  Scary ;-)
+
+2012-12-18  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       tests: avoid a "grep -E" portability issue
+
+       As stated in the Autoconf manual, the empty alternative is not portable
+       with "grep -E".  For example, while with GNU grep we have:
+
+           $ echo b | grep -E '(|a)b'; echo status = $?
+           b
+           status = 0
+
+       with Solaris 10 /usr/xpg4/bin/grep we have:
+
+           $ echo b | grep -E '(|a)b'; echo status = $?
+           1
+           status = 1
+
+       * t/silent-texi.sh: That was causing a spurious failure here.  Fix it
+       by simply using '?' instead (as suggested by the Autoconf manual).
+
+2012-12-18  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       tests: avoid a spurious failure due to a Clang bug
+
+       This version of clang:
+
+           clang version 3.2 (trunk 163574)
+           Target: powerpc64-unknown-linux-gnu
+           Thread model: posix
+
+       caused the test 't/ltcond2.sh' to spuriously fail due to what
+       appeared like a clang bug.  Here is a part of the diagnostic (trimmed
+       down for better clarity):
+
+           clang: .../cfarm/llvm/lib/MC/MCAsmStreamer.cpp:338: \
+             virtual void {anonymous}::MCAsmStreamer::EmitLabel(llvm::MCSymbol*): \
+             Assertion `Symbol->isUndefined() && "Cannot define a symbol twice!"' \
+             failed.
+           ...
+           7  clang  0x0000000012a459c4 llvm::AsmPrinter::EmitGlobalVariable\
+             (llvm::GlobalVariable const*) + 18446744073680468044
+           8  clang  0x0000000012a490a8 llvm::AsmPrinter::doFinalization\
+             (llvm::Module&) + 18446744073680481840
+           ...
+           Stack dump:
+           0.  Program arguments: .../opt/cfarm/clang-2012.09.10/bin/clang \
+                 -cc1 -triple powerpc64-unknown-linux-gnu -S -disable-free \
+                 ...
+           1.  <eof> parser at end of file
+           2.  Code generation
+           3.  Running pass 'Function Pass Manager' on module 'hello-generic.c'.
+           clang: error: unable to execute command: Aborted
+           clang: error: clang frontend command failed due to signal (use -v to \
+                  see invocation)
+           clang version 3.2 (trunk 163574)
+           Target: powerpc64-unknown-linux-gnu
+           Thread model: posix
+
+       So tweak the affected test case to avoid triggering this bug.  This is
+       the easiest way for us to keep the testsuite result clean and meaningful
+       on our main Clang test bed.
+
+       * t/ltcond2.sh: Prefer using "extern const char *" variables rather
+       than functions returning a statically allocated "const char *" variable.
+
+2012-12-16  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       NEWS: start preparing for the 1.13 release
+
+       * NEWS: Here.  In particular, list (some of) the planned future
+       backward-incompatibilities that will take place in Automake 1.14.
+
+2012-12-16  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       Merge branch 'maint'
+
+       * maint:
+         tests: typofix in the shebang line of 't/py-compile-destdir.sh'
+         HACKING: release process: fixlets about the announcement
+         maint: post-release minor version bump
+         release: stable release 1.12.5
+         tests: avoid errors due to underquoted third-party macros
+         maintcheck: also consider contrib tests for syntax checks
+         cosmetics: whitespace fixlets in syntax-checks.mk
+         maint: prefer $(MKDIR_P) over $(mkinstalldirs) in maintainer rules
+
+2012-12-15  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       tests: typofix in the shebang line of 't/py-compile-destdir.sh'
+
+2012-12-15  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       HACKING: release process: fixlets about the announcement
+
+       * HACKING: The announcement should be generate *before* bumping
+       the version number to the next alpha number.  Also, only an
+       abridged version of the announcement should be copied on the
+       Savannah news feed (a link to the complete announcement should
+       be linked from there, though).
+
+2012-12-15  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       maint: post-release minor version bump
+
+       * configure.ac (AC_INIT): Bump version number to 1.12.6a.
+       * m4/amversion.m4: Likewise (automatically regenerated by
+       "make bootstrap").
+
+2012-12-15  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       release: stable release 1.12.5
+
+       * configure.ac (AC_INIT): Bump version number to 1.12.5.
+       * m4/amversion.m4: Likewise (auto-updated by "make bootstrap").
+
+2012-12-14  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       tests: avoid errors due to underquoted third-party macros
+
+       * t/pkg-config-macros.sh: Call aclocal with the warnings in the
+       "syntax" category disabled.
+
+2012-12-14  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       maintcheck: also consider contrib tests for syntax checks
+
+       * syntax-checks.mk (xtests): By listing them here.
+
+2012-12-14  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       cosmetics: whitespace fixlets in syntax-checks.mk
+
+2012-12-14  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       maint: prefer $(MKDIR_P) over $(mkinstalldirs) in maintainer rules
+
+       * maint.mk (check-coverage-run, recheck-coverage-run): Here.  This
+       is especially useful since $(mkinstalldirs) is no longer available
+       in Automake-NG.
+
+2012-12-14  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       Merge branch 'maint'
+
+       * maint:
+         sync: update files from upstream with "make fetch"
+         gitignore: align with recent changes
+         fixup: add dummy rule for ChangeLog generation in Makefile.am
+         maint: no longer use AM_MAKEFLAGS in maintainer rules
+         maint: use more GNU make features in maintainer rules
+         maint: move maintainer make rules in maint.mk
+
+2012-12-14  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       sync: update files from upstream with "make fetch"
+
+       * lib/gnupload: Update.  See:
+       <http://lists.gnu.org/archive/html/bug-gnulib/2012-12/msg00050.html>
+
+2012-12-14  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       gitignore: align with recent changes
+
+2012-12-14  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       fixup: add dummy rule for ChangeLog generation in Makefile.am
+
+       So that automake won't complain about the missing ChangeLog.
+       The real rule for ChangeLog generation is now in maint.mk (as
+       it is maintainer-specific).
+
+       * Makefile.am (ChangeLog): Dummy.
+
+2012-12-14  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       maint: no longer use AM_MAKEFLAGS in maintainer rules
+
+       They are not required with GNU make.
+
+       * maint.mk: Adjust accordingly.
+
+2012-12-14  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       maint: use more GNU make features in maintainer rules
+
+       * maint.mk: Here, throughout the file.  Other minor cleanups
+       and refactorings while at it.
+
+2012-12-14  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       maint: move maintainer make rules in maint.mk
+
+       This is done for two reasons:
+
+         1. It will enable us to take advantage of more GNU make
+            features in our maintainer-specific recipes, if we
+            want to (and we probably will).
+
+         2. The Makefile.am won't have to be modified each time a
+            maintainer rule needs to be changed or tweaked; this
+            will prevent useless remaking of (in particular) the
+            't/testsuite-part.am' file.
+
+       * maint.mk: New, several recipes, rules and variables for
+       maintainer-specific tasks, extracted (with some tweaks)
+       from ...
+       * Makefile.am: ... this file.
+       (EXTRA_DIST): Add 'maint.mk'.
+       * GNUmakefile: Include 'maint.mk' after 'Makefile'.
+
+2012-12-14  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       fixup: source 'test-init.sh', not './defs', in a test
+
+       * t/pkg-config-macros.sh: Here.
+
+2012-12-14  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       Merge branch 'maint'
+
+       * maint:
+         docs: fixlet about xz compression levels and command line options
+         maint: more files excluded in 'update-copyright'
+         maint: adapt 'update-copyright' recipe to the new $(FETCHFILES) format
+         HACKING: update instructions to update the manuals at www.gnu.org
+         maint: add an explicative comment in Makefile
+         maint: factor out the name of the dir where web manuals are generated
+         maint: rename rules to build/upload web manuals
+         cosmetic: minor variable and rules reordering in Makefile.am
+         docs: build the web manuals for CVS in the builddir, not in the srcdir
+         release: automate uploading of web manuals in CVS
+         docs: AM_CFLAGS: remove reference to non-existing "more detailed" desc
+         tests: avoid two spurious failures on FreeBSD
+         tests: improve 'pkg-config' requirement
+
+2012-12-14  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       Merge branch 'improve-release-process' into maint
+
+       * improve-release-process:
+         HACKING: update instructions to update the manuals at www.gnu.org
+         maint: add an explicative comment in Makefile
+         maint: factor out the name of the dir where web manuals are generated
+         maint: rename rules to build/upload web manuals
+         cosmetic: minor variable and rules reordering in Makefile.am
+         docs: build the web manuals for CVS in the builddir, not in the srcdir
+         release: automate uploading of web manuals in CVS
+         docs: AM_CFLAGS: remove reference to non-existing "more detailed" desc
+         tests: avoid two spurious failures on FreeBSD
+
+2012-12-14  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       Merge branch 'pkgconfing-tests-requirement' into maint
+
+       * pkgconfing-tests-requirement:
+         tests: improve 'pkg-config' requirement
+
+2012-12-14  Patrick Welche  <prlw1@cam.ac.uk>  (tiny change)
+
+       docs: fixlet about xz compression levels and command line options
+
+       * doc/automake.texi (The types of distributions): To display a
+       progress bar, xz takes "-v" for verbose.
+
+2012-12-13  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       maint: more files excluded in 'update-copyright'
+
+       This will avoid the following spurious warnings when
+       "make update-copyright" is run:
+
+           .autom4te.cfg: warning: copyright statement not found
+           .git-log-fix: warning: copyright statement not found
+           .gitattributes: warning: copyright statement not found
+           .gitignore: warning: copyright statement not found
+           AUTHORS: warning: copyright statement not found
+           THANKS: warning: copyright statement not found
+           contrib/README: warning: copyright statement not found
+           contrib/multilib/README: warning: copyright statement not found
+           doc/amhello/README: warning: copyright statement not found
+           lib/install-sh: warning: copyright statement not found
+           lib/mkinstalldirs: warning: copyright statement not found
+           m4/acdir/README: warning: copyright statement not found
+           t/README: warning: copyright statement not found
+
+       * Makefile.am (files_without_copyright): New.
+       (update-copyright): Use it when computing '$exclude_list'.
+       Also, skip any README file.
+
+2012-12-13  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       maint: adapt 'update-copyright' recipe to the new $(FETCHFILES) format
+
+       This is a fixup for commit v1.12.5-27-g71ce1b4 of 2012-12-09, "fetch:
+       improve, and reduce code duplication".
+
+       * Makefile.am (update-copyright): Adjust.
+
+2012-12-13  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       HACKING: update instructions to update the manuals at www.gnu.org
+
+2012-12-13  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       maint: add an explicative comment in Makefile
+
+       * Makefile.am (web-manual-update): Here, about a slightly tricky
+       feature of rsync(1) used in the recipe.
+
+2012-12-13  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       maint: factor out the name of the dir where web manuals are generated
+
+       Just a minor refactoring to reduce duplication; no semantic change is
+       intended.
+
+       * Makefile.am (web_manual_dir): New.
+       (web-manual, web-manual-update, clean-web-manual): Use it.
+
+2012-12-13  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       maint: rename rules to build/upload web manuals
+
+       The new names are the same used by the similar-purpose rules provided by
+       the 'top/maint.mk' makefile in gnulib (as of commit v0.0-7741-g4a8c422).
+       No need to have gratuitous incompatibilities.
+
+       * Makefile.am (web-manuals): Rename ...
+       (web-manual): ... like this.
+       (upload-web-manuals): Rename ...
+       (web-manual-update): ... like this.
+       (clean-web-manuals): Rename ...
+       (clean-web-manual): ... like this.
+
+2012-12-13  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       cosmetic: minor variable and rules reordering in Makefile.am
+
+2012-12-13  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       docs: build the web manuals for CVS in the builddir, not in the srcdir
+
+       We can do so using the '-I' option of the gendocs.sh script.
+
+       Inspired by the 'web-manual' rule in the 'top/maint.mk' file provided
+       by gnulib (as of commit v0.0-7741-g4a8c422) as customized by Bison in
+       its 'cfg.mk' file (as of commit v2.6.5-1007-gf5fceda).
+
+       * Makefile.am (web-manuals): Modify and simplify to take advantage
+       of gendocs.sh's  '-I' option.
+       (upload-we-manuals): Accordingly adjust sanity checks and the rsync
+       invocation in the recipe.
+       (clean_texinfo_clutter_cmd): Delete this variable, it's no longer
+       required.
+       (clean-texinfo-clutter): Delete this phony target, it's no longer
+       required.
+       (clean-local): Don't depend on it.
+       * configure.ac: Invoke AC_PROG_LN_S, since we want to use $(LN_S)
+       in the new 'web-manuals' recipe.
+
+2012-12-13  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       release: automate uploading of web manuals in CVS
+
+       This is partly inspired to the 'gnu-web-doc-update' script from
+       gnulib.  Unfortunately, we can't use that script directly, because
+       as of now it assumes a build system integrated with gnulib.
+
+       * Makefile.am (upload-web-manuals): New .PHONY rule.
+       (RSYNC, CVS, CVSU, CVS_USER, WEBCVS_ROOT): New variables, used by
+       the new rule.
+
+2012-12-13  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       docs: AM_CFLAGS: remove reference to non-existing "more detailed" desc
+
+       * doc/automake.texi (Program variables): Here.  Reported by NightStrike:
+       <http://lists.gnu.org/archive/html/automake/2012-12/msg00012.html>
+
+2012-12-13  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       tests: avoid two spurious failures on FreeBSD
+
+       Due to the FreeBSD make bug that causes of the well-known automake
+       bug#7884, two of our bison-requiring tests were failing on FreeBSD.
+       To avoid this, simply skip the part of these tests affected by that
+       bug.
+
+       * t/yacc-bison-skeleton.sh: Here, using the 'yl_distcheck' function.
+       * t/yacc-bison-skeleton-cxx.sh: Likewise.
+       * t/yacc-nodist.sh: While at it, use the 'yl_distcheck' here
+       as well, instead of running "$MAKE distcheck" only when $MAKE
+       is GNU make.
+
+2012-12-13  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       tests: improve 'pkg-config' requirement
+
+       This improves (and unifies among different tests) the detection of
+       both the 'pkg-config' program and m4 macros provided by it; they are
+       needed in particular by tests on Vala support.
+
+       Before this, some Vala-related tests were failing spuriously when the
+       pkg-config program was available but the macros from pkg.m4 were not
+       made explicitly available in ACLOCAL_PATH.  These tests were:
+
+           vala-mix vala-mix2 vala-parallel vala-vapi vala-vpath
+
+       See also similar commit 'v1.11-581-gb7d67d5' of 2011-12-22,
+       "tests: better handling of gettext and libtool requirements".
+
+       * t/ax/am-test-lib.sh (process_requirements): If a requirement
+       matches the 'pkg-config*' wildcard, try to make available to it
+       the pkg-config m4 macros, and skip it if it's not possible.
+       This is done by sourcing the 'get.sh' fragment generated by ...
+       * t/pkg-config-macros.sh: ... this new test, which looks in
+       advance for the 'pkg-config' program and the m4 macros that
+       comes with it.
+       * t/list-of-tests.mk: Add the new test.
+       * gen-testsuite-part (%deps_extractor): Tests requiring pkg-config
+       will need the m4 macros coming with it; so these tests should be
+       run after the 'pkg-config-macros.sh' test.  Automatically generate
+       proper declarations for such dependencies.
+       * t/vala-header.sh: No need to explicitly check that the macro
+       PKG_CHECK_MODULES has been expanded by autoconf.
+       * t/vala-libs.sh: Likewise.
+       * t/vala-non-recursive-setup.sh: Likewise.
+       * t/vala-per-target-flags.sh: Likewise.
+       * t/vala-recursive-setup.sh: Likewise.
+
+2012-12-09  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       Merge branch 'maint'
+
+       * maint:
+         docs: AM_CFLAGS: remove reference to non-existing "more detailed" desc
+         maintcheck: prefer '$(am__cd)' over plain 'cd'
+         fetch: improve, and reduce code duplication
+         docs: add rule to generate manuals for www.gnu.org
+         docs: copy the 'gendocs.sh' script from Texinfo CVS repository
+         sync: update files from upstream with "make fetch"
+         release: generate a stub for the release announcement
+         release: distinguish major and minor releases
+         tests: avoid two spurious failures on FreeBSD
+
+2012-12-09  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       Merge branch 'improve-release-process' into maint
+
+       * improve-release-process:
+         maintcheck: prefer '$(am__cd)' over plain 'cd'
+         fetch: improve, and reduce code duplication
+         docs: add rule to generate manuals for www.gnu.org
+         docs: copy the 'gendocs.sh' script from Texinfo CVS repository
+         sync: update files from upstream with "make fetch"
+         release: generate a stub for the release announcement
+         release: distinguish major and minor releases
+
+2012-12-09  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       docs: AM_CFLAGS: remove reference to non-existing "more detailed" desc
+
+       * doc/automake.texi (Program variables): Here.  Reported by NightStrike:
+       <http://lists.gnu.org/archive/html/automake/2012-12/msg00012.html>
+
+2012-12-09  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       maintcheck: prefer '$(am__cd)' over plain 'cd'
+
+       In a couple of rules in out own build system, as suggested by the
+       maintainer check 'sc_cd_relative_dir'.
+
+       * Makefile.am (web-manuals, clean_texinfo_clutter_cmd): Adjust.
+
+2012-12-09  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       fetch: improve, and reduce code duplication
+
+       * Makefile.am (WGET_SV_CVS, WGET_SV_GIT_CF, WGET_SV_GIT_AC,
+       WGET_SV_GIT_GL): Delete.
+       (SV_CVS, SV_GIT_CF, SV_GIT_AC, SV_GIT_GL): New.
+       (fetch): Simplify and enhance.
+       (update-copyright): Adjust.
+
+2012-12-09  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       docs: add rule to generate manuals for www.gnu.org
+
+       Less clerical work to do by hand.
+
+       * Makefile.am (web-manuals): New rule.
+       (clean_texinfo_clutter): New macro.
+       * clean-web-manuals, clean-texinfo-clutter: New cleaning
+       rules.
+       (clean-local): Depend on them.
+       * .gitignore: Update.
+       * HACKING: Adjust instructions for generation of manuals.
+
+2012-12-08  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       docs: copy the 'gendocs.sh' script from Texinfo CVS repository
+
+       As well as the 'gendocs_template' file.  And enhance the "make fetch"
+       target to keep them synced.  It's better than having to fetch these
+       files by hand each time a release is to be made.
+
+       * Makefile.am (FETCHFILES): List 'gendocs.sh' and 'gendocs_template'.
+       (fetch): Fetch them, into 'lib/'.
+       (EXRA_DIST): Distribute them.
+       * HACKING: Adjust instructions for generation of manuals.
+
+2012-12-08  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       sync: update files from upstream with "make fetch"
+
+       * lib/config.sub: Update.
+
+2012-12-08  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       release: generate a stub for the release announcement
+
+       It's much better than having to write it my hand each time; after all,
+       most of it is either boilerplate or a cope of NEWS entries.
+
+       * Makefile.am (determine_release_type): Also set the shell variable
+       '$announcement_type' appropriately.
+       (print-release-type): Print the value of this new variable as well.
+       (announcement): New phony target, generate a files with the same name.
+       The recipe uses the shell variable '$announcement_type'.
+       (CLEANFILES): Clean it.
+       (PACKAGE_MAILINGLIST): New make macro, used when generating the
+       'announcement' file.
+       * HACKING: Explain how to take advantage of the new convenience
+       target.
+       * .gitignore: Ignore the 'announcement' file.
+
+2012-12-08  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       release: distinguish major and minor releases
+
+       This is mostly a preparatory change, in view of future
+       improvements in our release process.
+
+       * Makefile.am (determine_release_type): Also distinguish
+       between major and minor releases, with the help of ...
+       (stable_major_version_rx, stable_minor_version_rx): ... these
+       new macros.
+       (stable_version_rx): Remove, it's obsolete now.
+       (version_rx): Rename ...
+       (base_version_rx): ... like this, and adjust.
+       (print-release-type): New target; helps in debugging the code
+       that determines the release type.
+
+2012-11-30  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       tests: avoid two spurious failures on FreeBSD
+
+       Due to the FreeBSD make bug that causes of the well-known automake
+       bug#7884, two of our bison-requiring tests were failing on FreeBSD.
+       To avoid this, simply skip the part of these tests affected by that
+       bug.
+
+       * t/yacc-bison-skeleton.sh: Here, using the 'yl_distcheck' function.
+       * t/yacc-bison-skeleton-cxx.sh: Likewise.
+       * t/yacc-nodist.sh: While at it, use the 'yl_distcheck' here
+       as well, instead of running "$MAKE distcheck" only when $MAKE
+       is GNU make.
+
+2012-11-27  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       Merge branch 'depcomp-work'
+
+       * depcomp-work:
+         depcomp: remove 'icc' depmode, add 'tcc' one
+         news: update w.r.t. recent depcomp changes
+         tests: fix spurious failures with tcc
+         depcomp: improve comments about tcc support
+         depcomp: remove last relics of libtool 1.4 support
+         depcomp: remove an unused variable
+         depcomp: rewrite a sed invocation for less quoting
+         depcomp: whitespace fixes
+         depcomp: shell code style changes
+         depcomp: make some code more self-documenting
+         depcomp: less duplication between AIX and Tru64 modes
+         depcomp: avoid an extra fork when possible
+         depcomp: reduce code duplication
+         depcomp: don't rely on character ranges working as in C locale
+         depcomp: cosmetic fixlets to a comment
+         depcomp: safer quoting in variable expansion
+         depcomp: correctly propagate exit status in exit trap
+         depcomp: use "rmdir", not "rm -rf", to remove the empty lock directory
+         depcomp: remove useless quoting in variable definitions
+         depcomp: be more idiomatic in checking for zero exit statuses
+
+2012-11-27  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       Merge branch 'maint'
+
+       * maint:
+         news: we'll remove AM_PROG_MKDIR in 1.14, not 1.13
+         tests: give few vala tests more significant names
+         vala tests: don't use the 'posix' profile, it's no longer supported
+         news: fixup: bug#8847 is fixed in 1.12.6, not in 1.12.5
+         news: document the fix for automake bug#10227
+         tests: fix a spurious testsuite failure on Solaris
+         python: make installed modules find by default on Debian and Ubuntu
+
+2012-11-26  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       news: we'll remove AM_PROG_MKDIR in 1.14, not 1.13
+
+       See also commit v1.12.4-158-gdf23daf.
+
+       * NEWS (Future backward-incompatibilities): Adjust accordingly.
+
+2012-11-26  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       tests: give few vala tests more significant names
+
+       * t/vala.sh: Rename ...
+       * t/vala-grepping.sh: ... like this.
+       * t/vala2.sh: Rename ...
+       * t/vala-recursive-setup.sh: ... like this.
+       * t/vala3.sh: Rename ...
+       * t/vala-non-recursive-setup.sh: ... like this.
+       * t/vala4.sh: Rename ...
+       * t/vala-configure.sh: ... like this.
+       * t/vala5.sh: Rename ...
+       * t/vala-per-target-flags.sh: ... like this, and slightly
+       improve heading comments.
+       * t/list-of-tests.mk: Adjust.
+
+2012-11-26  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       vala tests: don't use the 'posix' profile, it's no longer supported
+
+       Fixes automake bug#12934 a.k.a. bug#12522.
+
+       Some of automake's Vala tests used to rely on "valac --profile posix"
+       (which makes it not use glib).  However, the posix profile was removed
+       in August 2012, and is no longer present in the GNOME 3.6.2 version
+       of valac (see commit ca020bf0 in the vala Git repository).
+
+
+       * t/vala-libs.sh: Adjust to avoid using the posix profile.
+       * t/vala-mix.sh: Likewise.
+       * t/vala-mix2.sh: Likewise.
+       * t/vala-parallel.sh: Likewise.
+       * t/vala-vapi.sh: Likewise.
+       * t/vala-vpath.sh: Likewise.
+       * NEWS: Update and adjust.
+
+2012-11-26  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       news: fixup: bug#8847 is fixed in 1.12.6, not in 1.12.5
+
+       * NEWS (Bugs fixed in 1.12.5): So move it from here ...
+       (Bugs fixed in 1.12.6): ... to here.
+
+2012-11-26  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       news: document the fix for automake bug#10227
+
+       This is a follow-up commit for v1.12.5-14-g1f113f6.
+
+       * NEWS: Update.
+
+2012-11-26  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       Merge branch 'python-fix-pr10227' into maint
+
+       * python-fix-pr10227:
+         python: make installed modules find by default on Debian and Ubuntu
+
+2012-11-26  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       tests: fix a spurious testsuite failure on Solaris
+
+       Reported in automake bug#11524.
+
+       * t/amhello-binpkg.sh: When non-GNU tar is in use, relax grepping of
+       "tar cvf ..." output a little more.
+
+2012-11-25  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       tests: give few aclocal tests more significant names
+
+       * t/dirlist-abspath.sh: Rename ...
+       * t/aclocal-dirlist-abspath.sh: ... like this.
+       * t/dirlist.sh: Rename ...
+       * t/aclocal-dirlist.sh: ... like this.
+       * t/dirlist2.sh: Rename ...
+       * t/aclocal-dirlist-globbing.sh: ... like this.
+       * t/list-of-tests.mk: Adjust.
+
+2012-11-24  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       tests: remove a redundant workaround for a testsuite weakness
+
+       * t/warnings-unknown.sh: Here, since we have improved our wrapper
+       scripts for aclocal and automake enough to make that workaround
+       unneeded.
+
+2012-11-24  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       depcomp: remove 'icc' depmode, add 'tcc' one
+
+       According to the comments in the now-removed test 'depcomp5.test' (removed
+       by commit 'v1.11-1829-g5066c1b' of 2012-02-08, "tests: improve and rework
+       tests on dependency tracking") "icc 8.0 and greater understand gcc options,
+       so depmode is set to gcc".  According to Wikipedia, the 8.0 version of the
+       Intel C compiler has been released in December 2003, that is, almost nine
+       yeas ago.  So we can remove explicit support for icc 7.x from the depcomp
+       script.
+
+       Since our support for tcc has so far been relied on the icc depmode, we
+       must write a new explicit 'tcc' depmode.  That is easy to do, since we can
+       rely on the simpler and better-specified format of tcc-specified makefiles;
+       for more info, see:
+       <http://lists.gnu.org/archive/html/automake/2012-10/msg00043.html>
+
+       * lib/depcomp (icc): Remove.
+       (tcc): New.
+       * NEWS: Update.
+
+2012-11-24  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       news: update w.r.t. recent depcomp changes
+
+       * NEWS: Here.
+
+2012-11-24  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       tests: fix spurious failures with tcc
+
+       * t/depcomp8a.sh, t/depcomp8b.sh: Here, by avoiding initialization of
+       global 'extern' variables, preferring functions definitions instead.
+
+2012-11-24  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       depcomp: improve comments about tcc support
+
+       * lib/depcomp (icc): Here.  See also tcc commit 0394caf7 "Emit spaces
+       for -MD" and automake commit v1.11-768-gb96263 "depcomp: support tcc
+       (Tiny C Compiler)".
+
+2012-11-24  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       depcomp: remove last relics of libtool 1.4 support
+
+       * lib/depcomp (tru64): Here.
+
+2012-11-24  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       depcomp: remove an unused variable
+
+       * lib/depcomp ($alnum): This.
+
+2012-11-24  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       depcomp: rewrite a sed invocation for less quoting
+
+       * lib/depcomp (dashmstdout): Here.
+
+2012-11-24  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       depcomp: whitespace fixes
+
+       * lib/depcomp: We indent by two spaces, and without using tabs.
+
+2012-11-24  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       depcomp: shell code style changes
+
+       * lib/depcomp: Here, in comments and line continuations.
+
+2012-11-24  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       depcomp: make some code more self-documenting
+
+       * lib/depcomp (make_dummy_makefile): With the help of this function.
+       Use it throughout.
+
+2012-11-24  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       depcomp: less duplication between AIX and Tru64 modes
+
+       * lib/depcomp (tru64, aix): In these entries of the big 'case'
+       switch, with the help of ...
+       (aix_post_process_depfile): ... this new function.
+
+2012-11-24  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       depcomp: avoid an extra fork when possible
+
+       * lib/depcomp (set_dir_from): Here.
+
+2012-11-24  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       depcomp: reduce code duplication
+
+       * lib/depcomp: Here, when we have to get the directory and basename
+       components of objects or source files; do so with the help of ...
+       (set_dir_from, set_base_from): ... these new shell functions.
+
+2012-11-24  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       depcomp: don't rely on character ranges working as in C locale
+
+       * lib/depcomp (pgcc): Here.
+       Related reorganization, with the unconditional definition of ...
+       ($upper, $lower, $digits, $alnum, $alpha): ... these shell variables.
+
+2012-11-24  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       depcomp: cosmetic fixlets to a comment
+
+       * lib/depcomp (pgcc): Here, as that's unportable according to the
+       autoconf manual.  In fact, there's no need to re-trap the signals
+       just before exiting, since at that point a signal would cause at
+       most a useless but harmless attempt to remove the
+
+2012-11-24  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       depcomp: safer quoting in variable expansion
+
+       * lib/depcomp (pgcc): Here.  Probably not needed, but since the
+       rest of the script seems to employ proper quoting, better to be
+       consistent.
+
+2012-11-24  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       depcomp: correctly propagate exit status in exit trap
+
+       * lib/depcomp (pgcc): Here.
+
+2012-11-24  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       depcomp: use "rmdir", not "rm -rf", to remove the empty lock directory
+
+       * lib/depcomp (pgcc): Here.
+
+2012-11-24  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       depcomp: remove useless quoting in variable definitions
+
+       * lib/depcomp (pgcc): Here.
+
+2012-11-24  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       depcomp: be more idiomatic in checking for zero exit statuses
+
+       * lib/depcomp: Prefer "if test $stat -ne 0; then ..." over the longer
+       "if test $stat -eq 0; then :; else ...".
+
+2012-11-24  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       tests: give some tests more significant names
+
+       * t/req.sh: Rename ...
+       * t/aclocal-req.sh: ... like this.
+       * t/reqd.sh: Rename ...
+       * t/add-missing-multiple.sh: ... like this.
+       * t/block.sh: Rename ...
+       * t/comment-block.sh: ... like this.
+       * t/list-of-tests.mk: Adjust.
+
+2012-11-24  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       Merge branch 'maint'
+
+       * maint:
+         tests: fix a spurious failure with older flex versions
+
+2012-11-24  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       python: make installed modules find by default on Debian and Ubuntu
+
+       This change fixes automake bug#10227.
+
+       The code used to get the python package directory was wrong for Python 3,
+       at least on Debian and Ubuntu distributions.  In the case the installation
+       was using the default prefix "/usr/local", python modules were incorrectly
+       installed in the directory
+
+           /usr/local/lib/python3/dist-packages
+
+       (which is *not* searched by default), rather than in a directory like
+
+           /usr/local/lib/python3.x/dist-packages
+
+       which is searched by default.
+
+       * m4/python.m4 (AM_PATH_PYTHON): Try to use the 'sysconfig' module if
+       possible, for better interactions with python 3.x.
+
+       Helped-by: Reuben Thomas <rrt@sc3d.org>
+       Helped-by: Roumen Petrov <bugtrack@roumenpetrov.info>
+
+2012-11-24  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       tests: fix a spurious failure with older flex versions
+
+       See automake bug#11524 and bug#12836.
+
+       * t/lex-header.sh: Here, we use flex option '--header-file',
+       but that option is not supported by some older flex versions.
+       Simply skip this test if such an old flex version is detected.
+
+2012-11-23  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       tests: avoid a failure due to m4 builtin 'sinclude' in package name
+
+       Even with Autoconf 2.69, AC_INIT is not very robust when to package
+       names that contain some selected m4 builtins; for example:
+
+           $ echo 'AC_INIT([sinclude], [1.0])' | autoconf -o/dev/null -
+           stdin:1: warning: file `' included several times
+
+           $ echo 'AC_INIT([dnl], [1.0])' | autoconf -o/dev/null -
+           /usr/bin/m4:stdin:1: excess arguments to builtin `m4_define' ignored
+           autom4te: /usr/bin/m4 failed with exit status: 1
+
+       Reference:
+       <http://lists.gnu.org/archive/html/bug-autoconf/2012-11/msg00005.html>
+
+       * t/aclocal-m4-sinclude.sh (configure.ac): Use 'm4sinclude' as package
+       name in the AC_INIT invocation, to avoid tickling the just-described
+       bug.
+
+2012-11-21  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       Merge branch 'maint'
+
+       * maint:
+         tests: fix a spurious failure when $PYTHON is in the environment
+         python tests: support PEP-3147 installation layout
+         python: uninstall cater to PEP-3147
+         tests: improve a comment
+         tests: honour $PYTHON override
+         tests: typofix in message
+         news: document fix for bug#8847 (PEP-3147, __pycache__)
+         python: improve support for modern python (CPython 3.2 and PyPy)
+
+2012-11-21  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       Merge branch 'python-pep-3147' into maint
+
+       * python-pep-3147:
+         tests: fix a spurious failure when $PYTHON is in the environment
+         python tests: support PEP-3147 installation layout
+         python: uninstall cater to PEP-3147
+         tests: improve a comment
+         tests: honour $PYTHON override
+         tests: typofix in message
+         news: document fix for bug#8847 (PEP-3147, __pycache__)
+         python: improve support for modern python (CPython 3.2 and PyPy)
+
+2012-11-19  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       tests: fix a spurious failure when $PYTHON is in the environment
+
+       * t/python11.sh: This test doesn't interact well with user-overrides of
+       $PYTHON; and, given its particular nature, neither should it be expected
+       to honour that override.  Just unset that $PYTHON variable and live
+       happy.
+
+2012-11-19  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       python tests: support PEP-3147 installation layout
+
+       This fixes several spurious testsuite failures with python >= 3.2,
+       introduced by recent commit v1.12.4-43-ge0e99ed, "python: improve
+       support for modern python (CPython 3.2 and PyPy)".
+
+       * t/ax/am-test-lib.sh (python_has_pep3147, pyc_location, py_installed):
+       New functions.
+       ($am_pep3147_tag): New variable.
+       * t/py-compile-basic2.sh: Deleted, too difficult to adapt for the
+       gain it would offer; move the still relevant parts ...
+       * t/py-compile-basic.sh: ... here.  Adapt and adjust the rest of
+       the test as well.
+       * t/nobase-python.sh: Adapt and adjust.
+       * t/py-compile-basedir.sh: Likewise.
+       * t/py-compile-destdir.sh: Likewise.
+       * t/py-compile-option-terminate.sh: Likewise.
+       * t/python-pr10995.sh: Likewise.
+       * t/python-virtualenv.sh: Likewise.
+       * t/python10.sh: Likewise.
+       * t/python12.sh: Likewise.
+       * t/python3.sh: Likewise.
+       * t/list-of-tests.mk: Adjust list of tests.
+
+2012-11-19  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       python: uninstall cater to PEP-3147
+
+       After recent commit commit v1.12.4-43-ge0e99ed, "python: improve
+       support for modern python (CPython 3.2 and PyPy)", the python install
+       rules have been made smart enough to install "*.pyc" byte-compiled
+       files according to PEP-3147 with modern (post-3.2) pythons.  However,
+       the uninstall rules hadn't been updated accordingly, causing leftover
+       files to remain around after "make uninstall", as well as failures in
+       "make distcheck".
+
+       * lib/am/python.am (am__pep3147_tweak): New internal macro, used
+       in ...
+       (uninstall-%DIR%PYTHON): ... the recipe of this target, which has
+       been adjusted to cater to PEP-3147
+
+2012-11-19  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       tests: more explicative names for few aclocal tests
+
+       * t/aclocal3.sh: Rename ...
+       * t/aclocal-missing-macros.sh: ... like this.
+       * t/aclocal4.sh: Rename ...
+       * t/aclocal-deps.sh: ... like this.
+       * t/aclocal5.sh: Rename ...
+       * t/aclocal-deps-subdir.sh: ... like this.
+       * t/aclocal6.sh: Rename ...
+       * t/aclocal-remake-misc.sh: ... like this.
+       * t/aclocal7.sh: Rename ...
+       * t/aclocal-no-force.sh: ... like this.
+       * t/acloca8.sh: Rename ...
+       * t/aclocal-no-unused-required.sh: ... like this.
+       * t/acloca9.sh: Rename ...
+       * t/aclocal-I-order-1.sh: ... like this.
+       * t/acloca11.sh: Rename ...
+       * t/aclocal-I-order-2.sh: ... like this, and update heading comments.
+       * t/acloca12.sh: Rename ...
+       * t/aclocal-I-order-3.sh: ... like this, and update heading comments.
+       * t/acloca13.sh: Rename ...
+       * t/aclocal-m4-sinclude.sh: ... like this, and update heading comments.
+       * t/acloca14.sh: Rename ...
+       * t/aclocal-m4-include-are-scanned.sh: ... like this.
+       * t/acloca14.sh: Rename ...
+       * t/aclocal-m4-include-are-scanned-aclocal-amflags.sh: ... like this,
+       and update heading comments.
+       * t/acloca15.sh: Rename ...
+       * t/aclocal-scan-configure-ac-pr319.sh: ... like this.
+       * t/acloca16.sh: Rename ...
+       * t/aclocal-no-extra-scan.sh: ... like this, and enhance slightly.
+       * t/acloca18.sh: Rename ...
+       * t/aclocal-serial.sh: ... like this.
+       * t/acloca19.sh: Rename ...
+       * t/aclocal-pr450.sh: ... like this.
+       * t/acloca20.sh: Rename ...
+       * t/aclocal-no-symlinked-overwrite.sh: ... like this.
+       * t/acloca21.sh: Rename ...
+       * t/aclocal-comments-respected.sh: ... like this.
+       * t/acloca22.sh: Rename ...
+       * t/aclocal-deleted-header.sh: ... like this.
+       * t/acloca22b.sh: Rename ...
+       * t/aclocal-deleted-header-aclocal-amflags.sh: ... like this.
+       * t/acloca23.sh: Rename ...
+       * t/aclocal-underquoted-defun.sh: ... like this.
+       * t/list-of-tests.mk: Update.
+
+2012-11-18  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       tests: improve coverage on Texinfo + silent rules
+
+       * t/silent-texi.sh: Here, by basic importing the version of the
+       test that is the 'ng/master' branch (that of Automake-NG), plus
+       a minor tweak to avoid a spurious failure with NetBSD make.
+
+2012-11-17  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       Merge branch 'maint'
+
+       * maint:
+         build: fix rebuild rules for Makefile.in and aclocal.m4
+         hacking: release procedure: fix order of some steps
+         maint: post-release minor version bump
+         release: stable release 1.12.5
+
+2012-11-17  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       build: fix rebuild rules for Makefile.in and aclocal.m4
+
+       They have been broken after our removal of the 'perllibdir' hack
+       in yesterday's commit v1.12.4-45-g4872dfe.
+
+       * configure.ac: Rather then redefining AUTOMAKE and ACLOCAL to
+       explicitly override the perllibdir, the acdir and the libdir, use
+       the ready-made t/wrap/{aclocal,automake}-$APIVERSION scripts.
+       * NEWS: Document the fix.
+
+2012-11-17  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       hacking: release procedure: fix order of some steps
+
+       * HACKING (Release procedure): The manuals should be rebuilt and
+       uploaded at at www.gnu.org *before* bumping the version number to
+       the next alpha release.
+
+2012-11-17  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       maint: post-release minor version bump
+
+       * configure.ac (AC_INIT): Bump version number to 1.12.5a.
+       * m4/amversion.m4: Likewise (automatically regenerated by
+       "make bootstrap").
+
+2012-11-17  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       release: stable release 1.12.5
+
+       * configure.ac (AC_INIT): Bump version number to 1.12.5.
+       * m4/amversion.m4: Likewise (auto-updated by "make bootstrap").
+
+2012-11-16  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       Merge branch 'maint'
+
+       * maint:
+         maintcheck: avoid failures, sync with 'ng/master' more
+         maintcheck: remove 'sc_perl_syntax'
+         sync: update files from upstream with "make fetch"
+         maint: get rid of $perllibdir environment variable hack
+         configure: respect the '-q' option better
+         cosmetics: de-tabify configure.ac
+
+2012-11-16  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       maintcheck: avoid failures, sync with 'ng/master' more
+
+       * syntax-checks.mk (sc_diff_aclocal_in_aclocal,
+       sc_diff_automake_in_automake): Rename ...
+       (sc_diff_aclocal, sc_diff_automake): ... respectively to these, rewrite
+       to use static pattern rules and 'diff -u' instead of bare 'diff'.  This
+       makes the rules more robust in the face of edits to 'automake.in' and
+       'aclocal.in', and get them in sync with the corresponding checks in the
+       'ng/master' branch.
+       (syntax_check_rules): Adjust.
+
+2012-11-16  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       maintcheck: remove 'sc_perl_syntax'
+
+       It is quite useless, since a "make bootstrap" or "make check" would
+       immediately catch a breakage in the 'aclocal' or 'automake' scripts
+       anyway.  In addition, the recent removal of the 'perllibdir' environment
+       variable hack has broken this check.
+
+       * syntax-checks.mk (sc_perl_syntax): Remove.
+       (syntax_check_rules): No longer list it.
+
+2012-11-16  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       sync: update files from upstream with "make fetch"
+
+       * lib/texinfo.tex, lib/config.sub: Update.
+
+2012-11-16  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       maint: get rid of $perllibdir environment variable hack
+
+       That was needed when the automake-$APIVERSION and aclocal-$APIVERSION
+       wrapper scripts used by the testsuite were shell script, rather than
+       perl scripts acting as a thin layers.
+
+       * aclocal.in (BEGIN): Update @INC based on the contents of the array
+       '@Aclocal::perl_libdirs', rather than of the environment variable
+       'perllibdir'.
+       * t/wrap/aclocal.in (BEGIN): Initialize '@Aclocal::perl_libdirs'
+       rather than $ENV{'perllibdir'}.
+       * automake.in (BEGIN): Update @INC based on the contents of the array
+       '@Automake::perl_libdirs', rather than of the environment variable
+       'perllibdir'.
+       * t/wrap/automake.in (BEGIN): Initialize '@Automake::perl_libdirs'
+       rather than $ENV{'perllibdir'}.
+       * NEWS: Update.
+
+2012-11-16  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       configure: respect the '-q' option better
+
+       * configure.ac: Here, by avoiding to print the warnings about
+       using a non-stable Automake version if the '$silent' variable
+       is set to "yes".
+
+2012-11-16  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       cosmetics: de-tabify configure.ac
+
+2012-11-15  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       fixup: Automake installation works again
+
+       By renaming 'dist_automake_ac_DATA' to 'nobase_dist_automake_ac_DATA' in
+       a recent patch, we have broken the Automake installation, since m4 files
+       that were expected to be installed in '${prefix}/aclocal-${APIVERSION}'
+       are now being installed in '${prefix}/aclocal-${APIVERSION}/m4' instead.
+       Fix this mess.
+
+       * Makefile.am (nobase_dist_automake_ac_DATA): Rename ...
+       (dist_automake_ac_DATA): ... like this.  And move
+       'm4/internal/ac-config-macro-dirs.m4' ...
+       (dist_automake_internal_ac_DATA): ... here.
+       (automake_internal_acdir): New, simply defined to
+       '$(automake_acdir)/internal'.
+
+2012-11-15  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       Merge branch 'ac-config-macro-dirs'
+
+       * ac-config-macro-dirs:
+         tests: AC_CONFIG_MACRO_DIRS: ignore inevitable failures with old autoconf
+         aclocal: AC_CONFIG_MACRO_DIRS: work around autom4te option parsing bugs
+         aclocal: tracing AC_CONFIG_MACRO_DIRS can work with older autoconf as well
+
+2012-11-15  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       tests: AC_CONFIG_MACRO_DIRS: ignore inevitable failures with old autoconf
+
+       When "older" version of autoconf are used (that is, those before commit
+       v2.69-44-g1ed0548), we have no sane way to prevent the autom4te invocation
+       issued from aclocal to possibly display warnings "MACRO m4_require'd but
+       not m4_defun'd".  That's not a big deal, because that just means that
+       people using pre-2.70 autoconf with cutting-edge automake will see few
+       spurious warnings, but the actual semantics will remain correct.
+
+       However, this blemish was causing a couple of annoying testsuite failures.
+       Solve this by simply skipping the affected tests when older (pre-2.70)
+       autoconf versions are used.
+
+       * t/aclocl-macrodir.tap ("AC_CONFIG_MACRO_DIR interaction with
+       AC_REQUIRE"): Skip when older autoconf is in use.
+       * t/aclocl-macrodirs.tap ("AC_CONFIG_MACRO_DIR interaction with
+       AC_REQUIRE"): Likewise.
+
+2012-11-15  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       recursion: remove _AM_EXTRA_RECURSIVE_TARGETS indirection
+
+       Since automake automatically smashes extra whitespace and newlines
+       in the arguments of the macros it traces, we can remove the extra
+       indirection with the _AM_EXTRA_RECURSIVE_TARGETS.  This doesn't
+       truly simplify the existing code, but make it slightly easier to
+       understand anyway, since leave it with one less indirection.
+
+       * automake.in: Trace AM_EXTRA_RECURSIVE_TARGETS directly, rather
+       than tracing _AM_EXTRA_RECURSIVE_TARGETS.  Remove trailing and
+       leading empty fields in the extracted arguments.
+       * m4/extra-recurs.m4 (_AM_EXTRA_RECURSIVE_TARGETS): Remove, no longer
+       needed.
+       (AM_EXTRA_RECURSIVE_TARGETS): Adjust by making it a simple no-op.
+
+2012-11-15  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       aclocal: AC_CONFIG_MACRO_DIRS: work around autom4te option parsing bugs
+
+       The autom4te program coming with autoconf 2.68 and earlier had a bug
+       which caused the "-" command line argument (with which we tell it to
+       read some input from from standard input) to aways be pushed at the
+       *end* of the command line, regardless of where the user specified it
+       (that bug was fixed by autoconf commit 'v2.68-120-gf4be358', "getopt:
+       new Autom4te::Getopt module").
+
+       This broken semantics conflict with our usage in aclocal, where we
+       need to pass some input to the invoked autom4te program early, and
+       have so far been using the stdin to do so.  Now we start using an
+       external file instead.
+
+       * m4/internal/ac-config-macro-dirs.m4: New file, contain a fallback
+       definition of the AC_CONFIG_MACRO_DIRS macro for older autoconf
+       releases.
+       * aclocal.in (trace_used_macros): When invoking autom4te, use that
+       file instead of "abusing" standard input.
+       * Makefile.am (dist_automake_ac_DATA): Rename ...
+       (nobase_dist_automake_ac_DATA): ... like this.
+       Add 'm4/internal/ac-config-macro-dirs.m4' to it.
+       * t/aclocal-acdir.sh: Adjust to avoid spurious failures.
+
+       Helped-by: Eric Blake <eblake@redhat.com>
+
+2012-11-15  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       aclocal: tracing AC_CONFIG_MACRO_DIRS can work with older autoconf as well
+
+       This will allow our users to interact also with pre-2.70 autoconf without
+       need for the user to add ACLOCAL_AMFLAGS in Makefile.am.  For example,
+       before this change, in order to have aclocal look for macros in 'm4/dir1'
+       and 'm4/dir2' also when (say) autoconf 2.69 was used, our users would
+       have had to add something like:
+
+           ACLOCAL_AMFLAGS = -I m4/dir1 -I m4/dir2
+
+       in Makefile.am, in addition to the
+
+           AC_CONFIG_MACRO_DIRS([m4/dir1 m4/dir2])
+
+       in configure.ac.  Now, the AC_CONFIG_MACRO_DIRS call is enough.
+
+       See the long-winded discussion on automake bug#12845 for more details:
+       <http://debbugs.gnu.org/cgi/bugreport.cgi?bug=12845>
+
+       * aclocal.in ($ac_config_macro_dirs_fallback): New global variable,
+       contains m4 code to issue a fallback definition of AC_CONFIG_MACRO_DIRS
+       as an alias for the private macro _AM_CONFIG_MACRO_DIRS.
+       (trace_used_macros): Handle and trace that macro.  Do some code
+       reorganization and fix related botched indentation while at it.
+       (write_aclocal): Output '$ac_config_macro_dirs_fallback' early in
+       the generated aclocal.m4.
+       * t/aclocal-macrodirs.tap: Run unconditionally, even with older
+       autoconf.
+       * t/subpkg-macrodir.sh: Likewise.
+       * doc/automake.texi: Document only AC_CONFIG_MACRO_DIRS, rather
+       than AC_CONFIG_MACRO_DIR.
+
+2012-11-14  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       Merge branch 'ac-config-macro-dirs'
+
+       * ac-config-macro-dirs:
+         news: we trace AC_CONFIG_MACRO_DIRS
+         aclocal: trace AC_CONFIG_MACRO_DIR_TRACE
+         aclocal: avoid spurious warnings from autom4te with AC_CONFIG_MACRO_DIRS
+         coverage: expose a bug in aclocal (spurious warnings)
+         aclocal: smash newlines in arguments of traced macros
+         tests: better coverage for AC_CONFIG_MACRO_DIRS
+         aclocal: diagnose non-existing directories in AC_CONFIG_MACRO_DIRS better
+         aclocal: multiple local m4 macro dirs with AC_CONFIG_MACRO_DIRS
+
+2012-11-11  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       tests: improve a comment
+
+       * t/ax/am-test-lib.sh (require_tool): Here, about python support
+       for '--version' option.
+
+2012-11-11  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       tests: honour $PYTHON override
+
+       * t/ax/am-test-lib.sh (require_tool): Here.
+       * t/python-too-old.sh: And here.
+       * t/python-vars.sh: And here.
+       * t/python-virtualenv.sh: And here.  Also add some sanity
+       checks while at it.
+
+2012-11-11  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       tests: typofix in message
+
+       * t/python-virtualenv.sh: Here.
+
+2012-11-11  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       news: document fix for bug#8847 (PEP-3147, __pycache__)
+
+       * NEWS (Bugs fixed in 1.12.5): Here.
+
+2012-11-11  Yaakov Selkowitz  <yselkowitz@users.sourceforge.net>  (tiny change)
+
+       python: improve support for modern python (CPython 3.2 and PyPy)
+
+       This fixes automake bug#8847.
+
+       * m4/python.m4 (AM_PATH_PYTHON): Add python3.3 to
+       _AM_PYTHON_INTERPRETER_LIST.
+       * lib/py-compile: Fix compiled filenames for PEP-3147, currently
+       implemented in CPython 3.2 and newer.  Do not create '.pyo' files
+       for PyPy.
+
+2012-11-10  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       news: we trace AC_CONFIG_MACRO_DIRS
+
+       * NEWS (New in 1.13): Update accordingly.
+
+2012-11-10  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       news: improve wording
+
+       * NEWS (New in 1.13): Prefer "no longer" over "not anymore",
+       wherever possible.  Related re-wrapping of text.
+
+2012-11-10  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       aclocal: trace AC_CONFIG_MACRO_DIR_TRACE
+
+       This is now the documented way, and indeed the only correct way, to
+       support AC_CONFIG_MACRO_DIR and AC_CONFIG_MACRO_DIRS in third-party
+       tools.  See autoconf commit v2.69-45-g5269030 of 2012-11-09,
+       "AC_CONFIG_MACRO_DIRS: improve tracing and add sanity checks".
+
+       * aclocal.in (trace_used_macros): Trace 'AC_CONFIG_MACRO_DIR_TRACE'
+       rather than 'AC_CONFIG_MACRO_DIRS'.  We still have to trace
+       'AC_CONFIG_MACRO_DIR' explicitly though, for compatibility with
+       Autoconf versions before 2.70.
+       * t/aclocal-macrodirs.tap: Enhance w.r.t. precedence of arguments
+       in one and several AC_CONFIG_MACRO_DIRS calls.
+
+2012-11-10  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       aclocal: avoid spurious warnings from autom4te with AC_CONFIG_MACRO_DIRS
+
+       When some macro expanded in configure.ac calls AC_REQUIRE on another
+       macro that is defined in one of the local m4 macro dirs specified
+       with AC_CONFIG_MACRO_DIRS, aclocal prints spurious warnings like:
+
+           configure.ac:4: warning: MY_BAR is m4_require'd but not m4_defun'd
+           configure.ac:3: MY_FOO is expanded from...
+
+       Such warnings come from autom4te, and are due to the fact that the
+       *first* autom4te invocation issued by aclocal is not yet able to
+       "see" the m4 macro definitions in the local m4 dirs (because they
+       can be looked for only after the AC_CONFIG_MACRO_DIRS call has been
+       traced, and tracing it requires running autom4te).
+
+       To allow us to work around this issue, autom4te has introduced a new
+       "witness" macro 'm4_require_silent_probe', that, when defined, allows
+       us to silence that particular kind of warnings (and only it).
+
+       Reported by Nick Bowler; see point (4) of:
+       <http://lists.gnu.org/archive/html/autoconf-patches/2012-11/msg00000.html>
+
+       * aclocal.in (trace_used_macros): Pre-define the special macro
+       'm4_require_silent_probe' when invoking autom4te.
+       * t/aclocal-macrodirs.tap ("AC_CONFIG_MACRO_DIR interaction with
+       AC_REQUIRE"): This test passes now: remove the "TODO" directive.
+       * t/aclocal-macrodir.tap ("AC_CONFIG_MACRO_DIRS interaction with
+       AC_REQUIRE"): Likewise.
+       * t/acloca17.sh: Remove.
+       * t/list-of-tests.mk: Adjust.
+
+2012-11-10  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       coverage: expose a bug in aclocal (spurious warnings)
+
+       When some macro expanded in configure.ac calls AC_REQUIRE on another
+       macro that is defined in one of the local m4 macro dirs specified
+       with one of the macros AC_CONFIG_MACRO_DIRS or AC_CONFIG_MACRO_DIR,
+       aclocal prints spurious warnings like:
+
+           configure.ac:4: warning: MY_BAR is m4_require'd but not m4_defun'd
+           configure.ac:3: MY_FOO is expanded from...
+
+       Expose this weakness in our testsuite.
+
+       Reported by Nick Bowler; see point (4) of:
+       <http://lists.gnu.org/archive/html/autoconf-patches/2012-11/msg00000.html>
+
+       * t/aclocal-macrodir.tap ("AC_CONFIG_MACRO_DIR interaction with
+       AC_REQUIRE"): New test, still xfailing.
+       * t/aclocal-macrodirs.tap ("AC_CONFIG_MACRO_DIRS interaction with
+       AC_REQUIRE"): Likewise.
+
+2012-11-10  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       aclocal: smash newlines in arguments of traced macros
+
+       This change fixes the existing issues with AC_CONFIG_MACRO_DIRS
+       containing newlines:
+       <http://lists.gnu.org/archive/html/autoconf-patches/2012-11/msg00000.html>
+
+       Likely, it will also allow a less involved implementation of the
+       AM_EXTRA_RECURSIVE_TARGETS macro (but that is left for potential
+       follow-up patches).
+
+       * aclocal.in (trace_used_macros): When calling autom4te, pass its
+       '--trace' option an argument containing '${::}%' rather than '$1'.
+       According to the autoconf manual (as of version 2.69), that will expand
+       to the concatenation, with the '::' string, of all the arguments passed
+       to a macro, with all newline characters in such arguments smashed.
+       Related adjustments when handling the macro AC_CONFIG_MACRO_DIRS, to
+       ensure leading whitespace in its argument are handled correctly.
+       * t/aclocal-macrodirs.tap ("AC_CONFIG_MACRO_DIRS: extra whitespace"):
+       No longer declare it as an xfailing test.
+
+2012-11-10  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       tests: better coverage for AC_CONFIG_MACRO_DIRS
+
+       Suggested by a report from Nick Bowler:
+       <http://lists.gnu.org/archive/html/autoconf-patches/2012-11/msg00000.html>
+
+       * t/aclocal-macrodirs.tap: Enhance to check use of extra whitespaces
+       and newline characters in the arguments to AC_CONFIG_MACRO_DIRS.  This
+       test currently fails, so mark it as "TODO".  While at it, throw in other
+       minor edits and enhancements.
+
+2012-11-10  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       aclocal: diagnose non-existing directories in AC_CONFIG_MACRO_DIRS better
+
+       This new implementation ensures that any directory (possibly excluding
+       the first one, if the '--install' option is used) that is declared with
+       AC_CONFIG_MACRO_DIRS and that is non-existent will cause an error from
+       aclocal.
+
+       * aclocal.in (scan_m4_dirs): Add a new argument, telling whether it's OK
+       for the scanned directory to be non-existing.  Adjust the implementation
+       accordingly.
+       ($first_user_m4dir): Remove, no more needed.
+       (scan_m4_files): Update 'scan_m4_dirs' invocations so that aclocal will
+       not complain if the first user macro directory is non-existing and the
+       '--install' option is given: such directory will be created later by
+       aclocal itself.
+       * t/aclocal-macrodir.tap: Do not mark the last test as TODO anymore;
+       it now passes.  Make stricter by ensuring a non-existing directory in
+       AC_CONFIG_MACRO_DIRS causes an hard error, not a warning.
+
+2012-11-10  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       aclocal: multiple local m4 macro dirs with AC_CONFIG_MACRO_DIRS
+
+       A new macro 'AC_CONFIG_MACRO_DIRS' has been recently introduced in
+       autoconf (and is expected to appear in the autoconf 2.70 release),
+       allowing us to declare several local m4 macro directories for a
+       package.
+
+       It can be done either passing several arguments to a single invocation:
+
+           AC_CONFIG_MACRO_DIRS([dir1 dir2])
+
+       or issuing more invocations:
+
+           AC_CONFIG_MACRO_DIRS([dir1])
+           AC_CONFIG_MACRO_DIRS([dir2])
+
+       or a combination of the two:
+
+           AC_CONFIG_MACRO_DIRS([dir1 dir2])
+           AC_CONFIG_MACRO_DIRS([dir3])
+
+       This will allow projects to use several m4 macro local dirs, without the
+       need to use ACLOCAL_AMFLAGS (which we want to make obsolete and finally
+       remove).  This is especially important for projects that are used as
+       nested subpackages of larger projects.
+
+       For more information and rationales, refer to these past discussions:
+
+       <http://lists.gnu.org/archive/html/autoconf/2011-12/msg00037.html>
+       <http://lists.gnu.org/archive/html/automake-patches/2012-07/msg00010.html>
+       <http://lists.gnu.org/archive/html/autoconf-patches/2012-07/msg00000.html>
+       <http://lists.gnu.org/archive/html/autoconf-patches/2012-07/msg00012.html>
+       <http://thread.gmane.org/gmane.comp.sysutils.autoconf.patches/8037/>
+       <http://thread.gmane.org/gmane.comp.sysutils.autoconf.patches/8087>
+       <http://thread.gmane.org/gmane.comp.sysutils.automake.patches/8956>
+
+       as well as to Automake commit v1.12.1-165-gcd1a9cc of 2012-07-03,
+       "aclocal: deprecate ACLOCAL_AMFLAGS, trace AC_CONFIG_MACRO_DIR instead",
+       autoconf commit v2.69-42-gd73770f of 2012-10-17, "AC_CONFIG_MACRO_DIRS:
+       new macro, mostly for aclocal".
+
+       * aclocal.in ($ac_config_macro_dir): Turn this global scalar it into ...
+       (@ac_config_macro_dirs): ... this global array.
+       (trace_used_macros): Update '@ac_config_macro_dirs' instead of
+       re-defining '$ac_config_macro_dir'.  Cater to calls the now-preferred
+       macro 'AC_CONFIG_MACRO_DIRS' in addition to the "obsolescent" one
+       AC_CONFIG_MACRO_DIR.
+       (main loop): Append '@ac_config_macro_dirs', not '$ac_config_macro_dir',
+       to '@user_includes'.
+       * t/subpkg-macrodir.sh: New test.
+       * t/aclocal-macrodirs.tap: Likewise.
+       * t/list-of-tests.mk: Add them.
+       * t/aclocal-macrodir.tap: Adjust and extend a little to keep it more in
+       sync with 'aclocal-macrodirs.tap'.
+
+2012-11-07  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       tests: remove an obsolete comment
+
+       * t/silent-yacc.sh: Here.
+
+2012-11-07  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       tests: remove mostly-redundant tests on silent rules
+
+       We used to have several couples of tests named like 'silent-foo-gcc.sh'
+       and 'silent-foo-generic.sh'.  Differently from what the names suggest,
+       the first test in such a couple (that is, "silent-foo-gcc.sh") was not
+       meant to check specific GCC-related features, but rather to check how
+       the silent rules behave in combination with automatic dependency tracking
+       when the 'gcc' depmode (that targets GCC versions before the 3.x and 4.x
+       release series) is forced.
+
+       Such depmode forcing was done exclusively to cover the code paths in
+       'lib/am/depend2.am' that actually invoke the 'depcomp' script, rather
+       than using the inlined, GCC-specific compiler invocation (the so-called
+       "fastdep" mode), which is the default with modern GCC or with other
+       modern compilers that can emulate the GCC command-line interface (e.g.,
+       clang 3.0).
+
+       But whenever we run the silent-*-generic.sh" tests with other supported
+       compilers which have an associated depmode different from 'gcc3', these
+       same "non-fastdep" code paths are covered, since in those tests we run
+       ./configure with the '--enable-dependency-tracking' option, which causes
+       slower depmodes not to be rejected.  Examples of such compilers are the
+       Sun C and C++ compilers (at least since version 5.9, a.k.a. Sun Studio
+       12.1), and the Tiny C Compiler (from version 0.9.26); and I run the
+       Automake testsuite quite regularly with those compilers.
+
+       So, the "silent-*-gcc.sh" test cases don't offer any real coverage
+       enhancements, while still using testsuite runtime and causing some
+       (admittedly minor, but still annoying) synchronization headaches with
+       the sister tests "silent-foo-general.sh" tests.  So let's just remove
+       these "silent-*-gcc.sh" tests.
+
+       * t/silent-c-gcc.sh: Remove.
+       * t/silent-cxx-gcc.sh: Likewise.
+       * t/silent-lt-gcc.sh: Likewise.
+       * t/silent-many-gcc.sh: Likewise.
+       * t/silent-c-generic.sh: Rename ...
+       * t/silent-c.sh: ... like this, and adjust heading comments.
+       * t/silent-cxx-generic.sh: Rename ...
+       * t/silent-cxx.sh: ... like this, and adjust heading comments.
+       * t/silent-lt-generic.sh: Rename ...
+       * t/silent-lt.sh: ... like this, and adjust heading comments.
+       * t/silent-many-generic.sh: Rename ...
+       * t/silent-many-languages.sh: ... like this, and adjust heading
+       comments.
+       * t/list-of-tests.mk: Adjust.
+
+2012-11-07  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       tests: enhance coverage on silent-rules and C compilation rules a little
+
+       * t/silent-c-generic.sh: Here, by trying them also with automatic
+       dependency tracking explicitly disabled.
+
+2012-11-07  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       Merge branch 'maint'
+
+       * maint:
+         tests: new variable $am_testaux_builddir
+         tests: rename $am_testauxdir -> $am_testaux_srcdir
+
+2012-11-07  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       tests: rename few tests (on silent-rules support)
+
+       Either to more informative names, or to names more consistent with the
+       ones of similar/related tests.
+
+       * t/silent.sh: Rename ...
+       * t/silent-c-generic.sh: ... like this, and adjust heading comments.
+       * t/silent2.sh: Rename ...
+       * t/silent-c-gcc.sh: ... like this, and adjust heading comments.
+       * t/silent3.sh: Rename ...
+       * t/silent-lt-generic.sh: ... like this, and adjust heading comments.
+       * t/silent4.sh: Rename ...
+       * t/silent-lt-gcc.sh: ... like this, and adjust heading comments.
+       * t/silentcxx.sh: Rename ...
+       * t/silent-cxx-generic.sh: ... like this, and adjust heading comments.
+       * t/silentcxx-gcc.sh: Rename ...
+       * t/silent-cxx-gcc.sh: ... like this, and adjust heading comments.
+       * t/silentf77.sh: Rename ...
+       * t/silent-f77.sh: ... like this, and adjust heading comments.
+       * t/silentf90.sh: Rename ...
+       * t/silent-f90.sh: ... like this, and adjust heading comments.
+       * t/silent7.sh: Rename ...
+       * t/silent-gen.sh: ... like this, and adjust heading comments.
+       * t/silent6.sh: Rename ...
+       * t/silent-custom.sh: ... like this.
+       * t/silent8.sh: Rename ...
+       * t/silent-texi.sh: ... like this.
+       * t/list-of-tests.mk: Adjust.
+
+2012-11-07  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       tests: merge two tests on silent-rules with libtool
+
+       This helps to reduce code duplication, and also to (marginally)
+       speed up the involved tests.
+
+       Before this change, we had:
+
+         $ diff -u t/silent3.sh t/silent9.sh
+
+         --- t/silent3.sh      2012-11-07 19:38:05.000000000 +0100
+         +++ t/silent9.sh      2012-11-07 19:27:54.000000000 +0100
+         @@ -14,9 +14,9 @@
+          # You should have received a copy of the GNU General Public License
+          # along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+         -# Check silent-rules mode, with libtool, standard depmode case.
+         +# Check silent-rules mode, with libtool, nodep case.
+
+         -# Please keep this file in sync with 'silent4.sh' and 'silent9.sh'.
+         +# Please keep this file in sync with 'silent3.sh' and 'silent4.sh'.
+
+          required='cc libtoolize'
+          . test-init.sh
+         @@ -26,8 +26,8 @@
+          cat >>configure.ac <<'EOF'
+          AC_CONFIG_FILES([sub/Makefile])
+          AC_PROG_CC
+         -AM_PROG_AR
+          AM_PROG_CC_C_O
+         +AM_PROG_AR
+          AC_PROG_LIBTOOL
+          AC_OUTPUT
+          EOF
+         @@ -61,7 +61,7 @@
+          $AUTOMAKE --add-missing
+          $AUTOCONF
+
+         -./configure --enable-silent-rules
+         +./configure --disable-dependency-tracking --enable-silent-rules
+          $MAKE >stdout || { cat stdout; exit 1; }
+          cat stdout
+          $EGREP ' (-c|-o)' stdout && exit 1
+
+       * t/silent9.sh: Remove, merge ...
+       * t/silent3.sh: ... in here.
+       * t/list-of-tests.mk: Adjust.
+
+2012-11-07  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       tests: new variable $am_testaux_builddir
+
+       And a related fix that solves a spurious testsuite failures in
+       VPATH builds.
+
+       * t/ax/test-defs.in ($am_testaux_builddir): New, counterpart of
+       $am_testaux_srcdir, but pointing inside the build directory.
+       * t/self-check-shell-no-trail-bslash.sh: Use $am_testaux_builddir,
+       not $am_testaux_srcdir, when fetching the 'shell-no-trail-bslash'
+       script.
+
+2012-11-07  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       tests: rename $am_testauxdir -> $am_testaux_srcdir
+
+       This is just a preparatory change in view of a future commit.
+
+       * t/ax/test-defs.in: Here.
+       * t/ax/tap-summary-aux.sh: And here.
+       * t/ax/testsuite-summary-checks.sh: And here.
+       * t/distcheck-missing-m4.sh: And here.
+       * t/distcheck-outdated-m4.sh: And here.
+       * t/self-check-shell-no-trail-bslash.sh: And here.
+       * t/test-driver-acsubst.sh: And here.
+       * t/test-driver-cond.sh: And here.
+       * t/test-driver-custom-multitest.sh: And here.
+       * t/test-driver-custom-multitest-recheck.sh: And here.
+       * t/test-driver-custom-multitest-recheck2.sh: And here.
+       * t/testsuite-summary-count-many.sh: And here.
+
+2012-10-31  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       Merge branch 'maint'
+
+       * maint:
+         vala tests: source test-init.sh, not ./defs
+         tests: fix a spurious typo-related failure
+         tests: remove spurious leftover use of 'Exit'
+         tests: can check our recipes avoid trailing backslashes
+         vala: improve comments to AM_PROG_VALAC
+         news: update w.r.t. recent vala changes
+         vala: if no proper compiler found, set $(VALAC) to 'valac'
+         vala: AM_PROG_VALAC should not produce an error for tool-old valac
+         docs: document recent changes to AM_PROG_VALAC
+         tests: enhance tests on AM_PROG_VALAC
+         vala: style fixes in vala.m4
+         vala: add action arguments, for when no proper vala compiler is found
+
+2012-10-31  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       vala tests: source test-init.sh, not ./defs
+
+       This will avoid spurious errors when the new vala tests (introduced
+       in the 'vala-work' branch) will be merged back to master.
+
+       * t/vala-headers.sh: Adjust as said.
+       * t/vala-libs.sh: Likewise.
+       * t/vala-mix.sh: Likewise.
+       * t/vala-mix2.sh: Likewise.
+       * t/vala-parallel.sh: Likewise.
+       * t/vala-vapi.sh: Likewise.
+       * t/vala-vpath.sh: Likewise.
+       * t/vala.sh: Likewise.
+       * t/vala2.sh: Likewise.
+       * t/vala3.sh: Likewise.
+       * t/vala4.sh: Likewise.
+       * t/vala5.sh: Likewise.
+
+2012-10-31  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       tests: fix a spurious typo-related failure
+
+       * t/self-check-shell-no-trail-bslash.sh: Here, due to a mistaken
+       use of "||" instead of "&&".
+
+2012-10-31  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       Merge branch 'vala-work' into maint
+
+       * vala-work:
+         vala: improve comments to AM_PROG_VALAC
+         news: update w.r.t. recent vala changes
+         vala: if no proper compiler found, set $(VALAC) to 'valac'
+         vala: AM_PROG_VALAC should not produce an error for tool-old valac
+         docs: document recent changes to AM_PROG_VALAC
+         tests: enhance tests on AM_PROG_VALAC
+         vala: style fixes in vala.m4
+         vala: add action arguments, for when no proper vala compiler is found
+
+2012-10-31  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       tests: remove spurious leftover use of 'Exit'
+
+       Issue revealed by the 'sc_tests_Exit_not_exit' maintainer check.
+
+       Commit 'v1.12.4-184-g9fed1c8' in master made the same fix basically,
+       but we mistakenly applied it to master only, rather than to maint.
+
+       * t/per-target-flags.sh: Here.
+
+2012-10-31  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       tests: can check our recipes avoid trailing backslashes
+
+       This is related to commit v1.11-1704-g254227b of 2012-05-01,
+       "parallel-tests: avoid trailing backslashes in make recipes",
+       and automake bug#10436.
+
+       Recipes with a trailing backslash character (possibly followed by
+       blank characters only) can cause spurious syntax errors with at
+       least older bash versions (e.g., bash 2.05b), and can be potentially
+       be unportable to other weaker shells.
+
+       So provide a target that runs the testsuite looking for this kind
+       of breakage (without requiring a real bugged shell).
+
+       * t/ax/shell-no-trail-bslash.in: New, a "shell" that chokes on '-c'
+       commands having a trailing '\' (possibly followed by whitespace only).
+       * Makefile (t/ax/shell-no-trail-bslash): Generate this script from it.
+       (noinst_SCRIPTS, CLEANFILES): Add it.
+       (EXTRA_DIST): Add 't/ax/shell-no-trail-bslash.in'.
+       (check-no-trailing-backslash-in-recipes): New target, runs the testsuite
+       with 'shell-no-trail-bslash' as the CONFIG_SHELL, to catch possible
+       recipes having a trailing backslash character (possibly followed by
+       * .gitignore: Update.
+       * t/self-check-shell-no-trail-bslash.sh: New testsuite self-check.
+       * t/parallel-tests-trailing-bslash.sh: Remove as obsolete.
+       * t/list-of-tests.mk: Adjust.
+
+2012-10-27  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       Merge branch 'maint'
+
+       * maint:
+         configure: correctly identify missing GNU compilers as such
+
+2012-10-27  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       configure: correctly identify missing GNU compilers as such
+
+       * configure.ac: Here, instead of mistakenly diagnose them as "botched".
+
+2012-10-27  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       tests: get rid of ./defs, it's no longer used.
+
+       * defs: Delete.
+       * configure.ac (AC_CONFIG_LINKS): No longer link it.
+       * t/ax/tap-setup.sh: Don't look for a file named 'defs' in
+       the grandparent directory of the current test directory to
+       decide whether we're running in the correct directory.
+       * syntax-check.mk (xdefs): Remove '$(srcdir)/defs'.
+
+2012-10-27  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       maintcheck: fix the name of a check
+
+       * (sc_tests_Exit_not_exit): Rename ...
+       (sc_tests_exit_not_Exit): ... like this, which is more faithful
+       to what the check actually does.  Adjust a grammaro in comments
+       while at it.
+       (syntax_check_rules): Adjust.
+
+2012-10-27  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       maintcheck: guard against uses of ./defs in tests
+
+       Now, 'test-init.sh' should be used instead.
+
+       * (sc_tests_no_source_defs): New maintainer check.
+       (syntax_check_rules): Add it.
+
+2012-10-27  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       tests: remove spurious leftover use of 'Exit'
+
+       * t/per-target-flags.sh: Here, and simply use 'exit' instead.
+       Issue revealed by the 'sc_tests_Exit_not_exit' maintainer check.
+
+2012-10-27  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       tests: remove an obsolete, and probably now wrong, comment
+
+       * t/dirlist.sh: Here.
+
+2012-10-27  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       tests: remove obsolescent references to './defs'
+
+       * t/distcom-subdir.sh, t/distcom2.sh, t/ax/depcomp.sh, t/conff2.sh,
+       t/ccnoco3.sh, t/ccnoco.sh, t/self-check-dir.tap, t/self-check-exit.tap,
+       t/self-check-me.tap: Here.  Instead, refer to "am-test-lib.sh",
+       "test-init.sh", or simply "the testsuite setup", as appropriate.
+
+2012-10-27  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       tests: prefer including 'test-init.sh' rather than './defs'
+
+       This is a follow-up to today's commit v1.12.4-22-g0610fc8,
+       "tests: prepare to move ./defs to t/ax/test-init.sh"
+
+       * All tests: To run the common setup, use the command:
+
+           . test-init.sh
+
+       instead of the older, "historical" one:
+
+           . ./defs || exit 1
+
+       Note that the "|| exit 1" wasn't really useful, since the 'errexit'
+       shell flag is in effect in both './defs' and 'test-init.sh', and all
+       the known shells that are good enough to run the automake testsuite
+       do automatically exit with error when a sourced file cannot be found
+       (at least, they do so in non-interactive mode, which is the only
+       mode that concerns us in the testsuite).
+
+       * t/ax/tap-summary-aux.sh, t/ax/testsuite-summary-checks.sh: Likewise.
+
+       * gen-testsuite-part: Do the same in the generated tests.
+
+2012-10-27  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       Merge branch 'maint'
+
+       * maint:
+         tests: merge, tweak and modernize few test scripts
+         tests: move coverage about BUILT_SOURCES
+         tests: more meaningful names for some test cases
+         tests: merge some grepping tests on Yacc support
+
+2012-10-27  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       tests: merge, tweak and modernize few test scripts
+
+       Basically an adjusted-and-improved cherry-pick from Automake-NG
+       commit v1.12.1-343-gff30f83.
+
+       * t/specflg.sh, t/specflg2.sh, t/specflg3.sh: Merged into ...
+       * t/per-target-flags.sh: ... this test.
+       * t/fo.sh: Remove, its weak grepping checks well superseded by
+       the semantic checks in 't/fort4.sh'.
+       * t/cxxo.sh: Remove, its weak grepping checks well superseded
+       by the semantic checks in 't/cxx-demo.sh'.
+       * t/cxxcpp.sh: Enhance a little.
+       * t/empty.sh: Renamed ...
+       * t/empty-data-primary.sh: ... to this.  Add trailing ':' command.
+       * t/empty2.sh, t/empty3.sh, t/empty4.sh: Merged ...
+       * t/empty-sources-primary.tap: ... into this new test.
+       * t/no-outdir-option.sh: Remove.  A test to check than an obsolete
+       and now deleted option ("--output-dir") stays deleted is way too
+       much even for the most test-infected person ;-)
+       * t/list-of-tests.mk: Adjust.
+
+2012-10-27  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       tests: move coverage about BUILT_SOURCES
+
+       Basically a backport of some tests from Automake-NG.
+
+       * t/built-sources-check.sh: Sync it with the version in the ng/master
+       branch.  Accordingly, move part of the checks out ...
+       * t/built-sources-install.sh: ... into this new test, synced from
+       ng/master as well.
+       * t/built-sources-subdir.sh: Minor tweaks and enhancements to sync it
+       with the version in ng/master.
+       * t/built-sources-cond.sh: New test, synced from ng/master.
+       * t/built-sources.sh: Likewise, with minor edits to avoid a spurious
+       failure.
+       * t/built-sources-fork-bomb.sh: Likewise.
+       * t/list-of-tests.mk: Update.
+
+2012-10-27  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       tests: more meaningful names for some test cases
+
+       * t/yacc5.sh: Renamed ...
+       * t/yacc-grepping2.sh: ... like this.
+       * t/yacc7.sh: Renamed ...
+       * t/yacc-headers-and-pr47.sh: ... like this.
+       * t/yacc8.sh: Renamed ...
+       * t/yacc-subdir.sh: ... like this.
+       * t/subdir10.sh: Rename ...
+       * t/subdir-env-interference.sh: ... like this.
+       * t/specflg10.sh: Rename ...
+       * t/am-default-source-ext.sh: ... like this.
+       * t/suffix12.sh: Rename ...
+       * t/suffix-custom-subobj.sh: ... like this.
+       * t/suffix13.sh: Rename ...
+       * t/suffix-custom-subobj-and-specflg.sh: ... like this.
+       * t/check3.sh: Rename ...
+       * t/built-sources-check.sh: ... like this.
+       * t/subdirbuiltsources.sh: Rename ...
+       * t/built-sources-subdir.sh: ... like this.
+       * t/bsource.sh: Rename ...
+       * t/no-spurious-install-recursive.sh: ... like this.
+       * t/list-of-tests.mk: Adjust.
+
+2012-10-27  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       tests: merge some grepping tests on Yacc support
+
+       * t/yacc.sh, t/yacc2.sh: Merge ...
+       * t/yacc-grepping.sh: ... into this test.
+       * t/list-of-tests.mk: Adjust.
+
+2012-10-27  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       Merge branch 'maint'
+
+       * maint:
+         tests: prepare to move ./defs to t/ax/test-init.sh
+
+2012-10-27  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       tests: prepare to move ./defs to t/ax/test-init.sh
+
+       We don't do this in a sweeping passage, because that would cause
+       endless headaches in the synchronization between the maint, master
+       and ng/master branches.  Instead, we setup our framework to allow
+       test scripts to work by sourcing either './defs' or 'test-init.sh',
+       so that we'll be able to make the transition gradual and painless.
+
+       * t/ax/test-init.sh: New, copied from the previous ./defs file.
+       * defs: Simply work by sourcing the new file.
+       * Makefile.am (dist_noinst_DATA): List the new file.
+       * t/README: Adjust to mandate the sourcing of 'test-init.sh' rather
+       than of './defs'.
+       * t/c-demo.sh: Source 'test-init.sh' instead of ./defs.  This is
+       done to verify our new setup actually works.
+       * t/ac-output-old.tap: Likewise.
+
+2012-10-27  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       Merge branch 'maint'
+
+       * maint:
+         depcomp: avoid potential interferences from the environment
+         depcomp: improve comments about the 'gcc' depmode
+         sync: update files from upstream with "make fetch"
+         maintcheck: remove an obsolescent check
+         tests: rename some tests to more expressive names, again
+         tests: remove an obsolescent grepping check
+         tests: merge two tests on automatic remake functionality
+         tests: rename some test to more expressive names
+         news: 'compile' supports libfoo.a naming when wrapping Microsoft tools
+         tests: ensure generation of wrapper tests matching multiple conditions
+         tests: simplify a loop in gen-testsuite-part
+         compile: support libfoo.a naming when wrapping Microsoft tools
+         NEWS: fix wording and grammaros, re-wrap text accordingly
+         cosmetics: fix typo in 'lib/depcomp' comments
+
+2012-10-27  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       depcomp: avoid potential interferences from the environment
+
+       * lib/depcomp (gccflag, dashmflag): By explicitly initializing these
+       variables to the empty string by default.
+
+2012-10-27  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       depcomp: improve comments about the 'gcc' depmode
+
+       It is not only needed by obsolescent gcc compilers (pre-3.x),
+       but also by modern compiler like IBM C/C++.  State that ...
+
+       * lib/depcomp: ... here...
+       * gen-testsuite-part: ... and here, where we generate the
+       'depcomp*.tap' tests.
+
+2012-10-26  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       vala: improve comments to AM_PROG_VALAC
+
+       * m4/vala.m4 (AM_PROG_VALAC): Here.
+
+2012-10-26  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       news: update w.r.t. recent vala changes
+
+       * NEWS: Here.
+
+2012-10-26  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       vala: if no proper compiler found, set $(VALAC) to 'valac'
+
+       This is better than setting it to ':' (as is currently done), because
+       a triggered makefile rule invoking a vala compilation will then clearly
+       fail with an informative error message like "valac: command not found",
+       rather than silently, with the error possibly going unnoticed, or
+       triggering harder-to-diagnose fallout failures in later steps.
+
+       For a precedent of a similar behaviour, see the AC_PROG_YACC macro.
+
+       * m4/valac.m4: Implement the new semantic.
+       * doc/automake.texi (Vala Support): Document it.
+       * t/vala4.sh: Adjust.
+
+2012-10-26  Sébastien Wilmet  <swilmet@gnome.org>  (tiny change)
+           Matthieu Baerts  <matttbe@glx-dock.org>
+           Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       vala: AM_PROG_VALAC should not produce an error for tool-old valac
+
+       This change fixes automake bug#12688.
+
+       In the AM_PROG_VALAC macro, when the optional parameter specifying the
+       minimum release number is not provided, and/or if the Vala compiler is
+       not found, then there is a _warning_ message.
+
+       On the other hand, when the version number is specified and if the Vala
+       compiler is too old, there is an _error_ message.
+
+       This error message is problematic, because for a tarball, the Vala
+       compiler is not required: the generated C code is included in the
+       tarball.  So if a user wants to compile the software, he shouldn't
+       need the valac program with the right version.
+
+       * m4/vala.m4 (AM_PROG_VALAC): Modify to use AC_MSG_WARN instead
+       of AC_MSG_ERROR.
+       * t/vala4.sh: Adjust and enhance.
+       * doc/automake.texi (Vala Support): Likewise.
+       * THANKS: Update.
+
+2012-10-26  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       docs: document recent changes to AM_PROG_VALAC
+
+       * doc/automake.texi (Vala Support): Here.  This is a follow-up to
+       recent commit 'v1.12.4-20-gdf202a3', "vala: add action arguments,
+       for when no proper vala compiler is found".
+
+2012-10-26  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       tests: enhance tests on AM_PROG_VALAC
+
+       * t/vala4.sh: Here.
+
+2012-10-26  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       vala: style fixes in vala.m4
+
+       * m4/vala.m4 (AM_PROG_VALAC): Here.
+
+2012-10-26  Daiki Ueno  <ueno@unixuser.org>  (tiny change)
+
+       vala: add action arguments, for when no proper vala compiler is found
+
+       * m4/vala.m4 (AM_PROG_VALAC): Add optional action arguments to
+       control the behavior if specified version of valac is not found.
+       This emulates the behaviour of AM_PATH_PYTHON.
+       * t/vala4.sh: Enhance.
+
+2012-10-26  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       sync: update files from upstream with "make fetch"
+
+       * lib/config.guess, lib/config.sub: Update.
+
+2012-10-26  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       maintcheck: remove an obsolescent check
+
+       * syntax-checks.mk (sc_test_names): Remove this check, which verified
+       that no test name contained an m4/m4sugar builtin or macro name.  Since
+       most tests use their own name as the first argument to AC_INIT, doing
+       that would have tickled a bug in Autoconf 2.62; but the bug was fixed
+       in Autoconf 2.63 already; and we are going to soon require Autoconf
+       2.65 anyway (in automake 1.13), so this check has become more annoying
+       than useful.
+       (syntax_check_rules): Don't list the removed check.
+
+2012-10-26  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       tests: rename some tests to more expressive names, again
+
+       * t/parallel-tests.sh: Rename ...
+       * t/parallel-tests-basics.sh: ... like this.
+       * t/parallel-tests3.sh: Rename ...
+       * t/parallel-tests-concurrency.sh: ... like this.
+       * t/parallel-tests5.sh: Rename ...
+       * t/parallel-tests-concurrency-2.sh: ... like this.
+       * t/parallel-tests6.sh: Rename ...
+       * t/parallel-tests-empty.sh: ... like this.  Adjust comments.
+       * t/parallel-tests8.sh: Rename ...
+       * t/parallel-tests-generated-and-distributed.sh: ... like this.
+       * t/parallel-tests9.sh: Rename ...
+       * t/parallel-tests-recheck.sh: ... like this.
+       * t/parallel-tests10.sh: Rename ...
+       * t/parallel-tests-trailing-whitespace.sh: ... like this.
+       * t/remake3a.sh: Rename ...
+       * t/remake-subdir-no-makefile.sh: ... like this.
+       * t/remake4.sh: Rename ...
+       * t/remake-not-after-make-dist.sh: ... like this.
+       * t/remake5.sh: Rename ...
+       * t/remake-maintainer-mode.sh: ... like this.
+       * t/remake6.sh: Rename ...
+       * t/remake-subdir3.sh: ... like this.
+       * t/remake7.sh: Rename ...
+       * t/remake-fail.sh: ... like this.
+       * t/remake11.sh: Rename ...
+       * t/remake-deeply-nested.sh: ... like this
+       * t/remake12.sh: Rename ...
+       * t/remake-mild-stress.sh: ... like this
+       * t/pr8365-remake-timing.sh: Rename ...
+       * t/remake-timing-bug-pr8365.sh: ... like this.
+       * t/list-of-tests.mk: Adjust.
+
+2012-10-26  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       tests: remove an obsolescent grepping check
+
+       * t/remake3.sh: This one, superseded by ...
+       * t/remake3a.sh: ... this semantic test, whose comments have been
+       djusted accordingly.
+       * t/list-of-tests.mk: Adjust.
+
+2012-10-26  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       tests: merge two tests on automatic remake functionality
+
+       * t/remake2.sh: Merge ...
+       * t/remake-subdir-grepping.sh: ... in here.
+       * t/list-of-tests.mk: Adjust.
+
+2012-10-26  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       tests: rename some test to more expressive names
+
+       * t/remake.sh: Rename ...
+       * t/remake-subdir-grepping.sh: ... like this.
+       * t/remake8a.sh: Rename ...
+       * t/remake-makefile-intree.sh: ... like this, and adjust comments.
+       * t/remake8b.sh: Rename ...
+       * t/remake-makefile-vpath.sh: ... like this, and adjust comments.
+       * t/remake9a.sh: Rename ...
+       * t/remake-after-configure-ac.sh: ... like this, and adjust comments.
+       * t/remake9b.sh: Rename ...
+       * t/remake-after-makefile-am.sh: ... like this, and adjust comments.
+       * t/remake9c.sh: Rename ...
+       * t/remake-after-acinclude-m4.sh: ... like this, and adjust comments.
+       * t/remake9d.sh: Rename ...
+       * t/remake-after-aclocal-m4.sh: ... like this, and adjust comments.
+       * t/remake10a.sh: Rename ...
+       * t/remake-include-configure.sh: ... like this, and adjust comments.
+       * t/remake10b.sh: Rename ...
+       * t/remake-include-makefile.sh: ... like this, and adjust comments.
+       * t/remake10c.sh: Rename ...
+       * t/remake-include-aclocal.sh: ... like this, and adjust comments.
+       * t/list-of-tests.mk: Adjust.
+
+2012-10-26  Jim Meyering  <jim@meyering.net>
+
+       compat: reinstate AM_PROG_MKDIR_P, for gettext
+
+       Do not remove AM_PROG_MKDIR_P just yet.
+
+       gettext (latest from git) still AC_REQUIRE's AM_PROG_MKDIR_P via its
+       intl.m4 and po.m4 files, which are pulled into *many* projects.
+
+       When I try to build one of those projects (coreutils) using the latest
+       from automake.git/master, I see this failure:
+
+           $ aclocal -I m4
+           configure.ac:477: warning: AM_PROG_MKDIR_P is m4_require'd \
+             but not m4_defun'd
+           m4/po.m4:23: AM_PO_SUBDIRS is expanded from...
+           m4/gettext.m4:57: AM_GNU_GETTEXT is expanded from...
+           configure.ac:477: the top level
+
+       That is because AM_PROG_MKDIR_P was removed (via commit
+       v1.12-20-g8a1c64f) in preparation for the next release of automake.
+
+       * NEWS: Remove the paragraph that announced the removal of
+       AM_PROG_MKDIR_P.
+       * Makefile.am (dist_automake_ac_DATA): Add m4/mkdirp.m4.
+       * m4/mkdirp.m4: Re-add file.
+       * t/mkdirp-deprecation.sh: Likewise.
+       * t/list-of-tests.mk: Add it.
+       * automake.in: Restore removed code, and adjust comments, s/1.13/1.14/
+       to reflect new plan for removal.
+       * doc/automake.texi (Obsolete Macros): Restore the section, but
+       now with only one entry: the one for AM_PROG_MKDIR_P.
+
+2012-10-26  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       news: 'compile' supports libfoo.a naming when wrapping Microsoft tools
+
+       This is a follow-up to commit 'v1.12.4-10-g3c5c939' of 2012-10-04,
+       "compile: support libfoo.a naming when wrapping Microsoft tools".
+
+       * NEWS (Bugs fixed in 1.12.5): Update.
+
+2012-10-26  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       tests: ensure generation of wrapper tests matching multiple conditions
+
+       * gen-testsuite-part: Our old code to generate wrapper tests had a
+       severe limitation, in that if a test matched two or more conditions
+       calling for generation of wrapper tests, still only one wrapper test
+       was generated, instead of the three that would have been expected --
+       that is, one using the setup code triggered by the first condition,
+       one using the setup code triggered by the second condition, and one
+       using both this setup code fragments.
+       Admittedly, this was only a theoretical limitation for the moment,
+       since since so far no test exists that matches two or more conditions
+       for wrapping.  Still, this might change in the future, and easily in
+       an unnoticed way, so better fix the issue now, before it might become
+       a real problem.
+
+2012-10-26  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       tests: simplify a loop in gen-testsuite-part
+
+       * gen-testsuite-part: No need to loop on the (key, value) entries
+       of the %test_generators has: we only use the value, and never the
+       key.  So loop simply on the values.
+
+2012-10-14  Peter Rosin  <peda@lysator.liu.se>
+
+       compile: support libfoo.a naming when wrapping Microsoft tools
+
+       There is a future plan to provide some means to have Automake
+       create static libraries that are named differently depending
+       on the system [1].
+
+       The background is that everyone has always named static libraries
+       libfoo.a, except the Redmond crowd who names them foo.lib, and
+       you have to jump through hoops to have Automake create libraries
+       named foo.lib in the land of non-GNU Windows while still creating
+       libfoo.a everywhere else.
+
+       However, there is probably no sane way to accomplish that system
+       dependent naming discussed in [1] without user intervention,
+       which makes it necessary to support the classic libfoo.a naming
+       when using Microsoft tools in the best possible way, for the
+       benefit of all projects today and for future projects not
+       opting in to whatever scheme is selected for the problem at
+       hand.
+
+       [1] http://lists.gnu.org/archive/html/automake/2012-09/msg00028.html
+
+       * lib/compile (func_cl_dashl): As a last resort, match -lfoo with
+       libfoo.a, if that file exist on the library search path.
+       * t/compile4.sh: Remove obsolescent workaround for the above.
+       * t/compile6.sh: Extend to check that libbaz.a is indeed found
+       when baz.lib and baz.dll.lib does not exist and that bar.lib
+       and bar.dll.lib are preferred over libbar.a.
+
+2012-10-14  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       NEWS: fix wording and grammaros, re-wrap text accordingly
+
+       Reported-by: Peter Rosin <peda@lysator.liu.se>
+
+2012-10-14  Paul Eggert  <eggert@cs.ucla.edu>
+
+       cosmetics: fix typo in 'lib/depcomp' comments
+
+       Fixes automake bug#12578.
+
+2012-10-02  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       Merge branch 'maint'
+
+       * maint:
+         config headers: remove stale comment in makefile fragment
+         NEWS: wording and quoting fixlets in few older entries
+         config headers: don't emit rules for headers not generated by autoheader
+         docs: fix minor typo: s/expending/expanding/
+         sync: update files from upstream with "make fetch"
+         maint: post-release minor version bump
+         maint: typo fixes s/lies into/lies in/
+         release: stable release 1.12.4
+         NEWS: minor fix
+
+2012-10-02  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       config headers: remove stale comment in makefile fragment
+
+       * lib/am/remake-hdr.am: Here.
+
+2012-10-02  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       NEWS: wording and quoting fixlets in few older entries
+
+2012-10-02  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       config headers: don't emit rules for headers not generated by autoheader
+
+       This change fixed automake bug#12495.
+
+       Even if an AC_CONFIG_HEADERS invocation is passed a list of several files
+       as the first argument, only the first one of those file is considered by
+       autoheader for automatic generation of the corresponding '.in' template.
+       This is done on purpose, and is clearly documented in the Autoconf manual,
+       which (as of the 2.69 version) reads something like this:
+
+           The autoheader program searches for the first invocation of
+           AC_CONFIG_HEADERS in configure sources to determine the name of
+           the template.  If the first call of AC_CONFIG_HEADERS specifies
+           more than one input file name, autoheader uses the first one.
+
+       That is, an invocation like:
+
+           AC_CONFIG_HEADERS([config.h config2.h])
+
+       should cause autoheader to generate only a 'config.h.in' template,
+       and not also a 'config2.h.in' one.
+
+       Accordingly, automake, when tracing AC_CONFIG_HEADERS, should generate
+       remake rules only for the template associated to the first input file
+       name passed to that macro.  In some situations, however, automake failed
+       to properly limit itself in this way; for example, with an input like:
+
+           AC_CONFIG_HEADERS([config.h sub/foo.h])
+
+       in configure.ac, and with the 'sub' directory listed in the SUBDIRS
+       variable of the top-level Makefile, automake would erroneously generate
+       in 'sub/Makefile.in' a rule to remake the 'foo.h.in' template by
+       invoking autoheader.
+
+       This issue was likely introduced in commit 'Release-1-8-23-g262bb92'
+       of 2004-01-05.
+
+       * NEWS: Update.
+       * doc/automake.texi (Optional): Improve wording in the description of
+       hat rules automake generates in response to an 'AC_CONFIG_HEADERS'
+       invocation.
+       * lib/am/remake-hdr.am: Only emit autoheader-invoking remake rules for
+       the %CONFIG_HIN% template if that corresponds to the first argument of
+       AC_CONFIG_HEADERS, as explaned above.  Do so using the automake-time
+       conditional %?FIRST-HDR%, that is properly passed ...
+       * automake.in (handle_configure): ... from a 'file_contents' invocation
+       in here.
+       * t/autohdr-subdir-pr12495.sh: New test.
+       * t/list-of-tests.mk: Add it.
+       * THANKS: Update.
+
+       Helped-by: Hib Eris <hib@hiberis.nl>
+
+2012-10-02  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       docs: fix minor typo: s/expending/expanding/
+
+       * doc/automake.texi (Wildcards): Here.  Fixes automake bug#12516.
+
+2012-10-02  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       sync: update files from upstream with "make fetch"
+
+       * lib/texinfo.tex: Update.
+
+2012-10-02  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       maint: post-release minor version bump
+
+       * configure.ac (AC_INIT): Bump version number to 1.12.4a.
+       * m4/amversion.m4: Likewise (automatically regenerated by
+       "make bootstrap").
+
+2012-09-23  Jim Meyering  <meyering@redhat.com>
+
+       maint: typo fixes s/lies into/lies in/
+
+2012-09-17  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       release: stable release 1.12.4
+
+       * configure.ac (AC_INIT): Bump version number to 1.12.4.
+       * m4/amversion.m4: Likewise (auto-updated by "make bootstrap").
+
+2012-09-17  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       NEWS: minor fix
+
+2012-09-12  Jim Meyering  <meyering@redhat.com>
+
+       fix typos in mk-dirp.m4
+
+       * t/gettext-macros.sh: Fix typo in name of macro emitted into
+       mk-dirp.m4: s/AM_MKDIR_P/AM_PROG_MKDIR_P/,
+       and as Stefano Lattarini noted, also fix this typo:
+       s/AC_MKDIR_P/AC_PROG_MKDIR_P/.
+
+2012-09-11  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       tags: automake bug bug#12372 is fixed
+
+       It has been fixed as a side effect of the overhauling of tags support.
+
+       * t/list-of-tests.mk (XFAIL_TESTS): No longer list 'tags-pr12372.sh'.
+       * NEWS: Update.
+
+2012-09-11  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       Merge branch 'maint'
+
+       * maint:
+         coverage: better exposure for automake bug#12372 (tags-related)
+         coverage: expose automake bug#12372 (tags-related)
+
+2012-09-11  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       coverage: better exposure for automake bug#12372 (tags-related)
+
+       Alas, in contrast with what is said in the commit message of previous
+       commit 'v1.12.3-14-g94b7b8e', that bug is still present also in the
+       current maint branch (which will become automake version 1.12.4); it
+       is just that it only triggers when a _SOURCES variable contains only
+       files with custom extension.
+
+       * t/tags-pr12372.sh: Extend.
+       * t/list-of-tests.mk: Add it.
+
+       Suggested-by: Юрий Пухальский <aikipooh@gmail.com>
+
+2012-09-07  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       coverage: expose automake bug#12372 (tags-related)
+
+       That bug is somehow already been fixed in the latest automake
+       version (1.12.4); but exercise it anyway in the testsuite, to
+       ensure we won't regress.
+
+       * t/tags-pr12372.sh: New test.
+       * t/list-of-tests.mk: Add it.
+
+2012-09-05  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       Merge branch 'maint'
+
+       * maint:
+         sync: update files from upstream with "make fetch"
+         news: cygnus will be removed in automake 1.13
+         news: some changes for 1.13 has been "de-planned"
+         news: report that the have seen fixlets after 1.12.3
+         warns: enable category 'obsolete' by default
+
+2012-09-05  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       sync: update files from upstream with "make fetch"
+
+       * lib/texinfo.tex: Update.
+
+2012-09-05  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       news: cygnus will be removed in automake 1.13
+
+       * NEWS (Future backward-incompatibilities): So document it here.
+
+2012-09-05  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       news: some changes for 1.13 has been "de-planned"
+
+       * NEWS (Future backward-incompatibilities): The planned Automake release
+       1.13 already has too much stuff on its plate; so we are not going to
+       In Automake 1.13, we are definitely not going to change the exact order
+       in which the directories in the aclocal macro search path are looked up.
+       Also, experience and user feedback have shown that the "obsolescent"
+       two-arguments invocation for AM_INIT_AUTOMAKE:
+
+           AM_INIT_AUTOMAKE(PACKAGE-NAME, PACKAGE-VERSION)
+
+       is still useful (until at least Autoconf is fixed to offer better support
+       for "dynamically" package versions), so we are not going to remove
+       support for that usage in Automake 1.13.  For more details, see commit
+       v1.12.2-245-g2abe183 of 2012-08-24, "AM_INIT_AUTOMAKE: allow obsolescent
+       two-args invocation once again".
+       (New in 1.12.1): Adjust accordingly.
+
+2012-09-05  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       news: report that the have seen fixlets after 1.12.3
+
+       * NEWS: Here.
+
+2012-09-04  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       warns: enable category 'obsolete' by default
+
+       No surprise that our users were bitten by backward-incompatible changes
+       especially hard: the warnings in the 'obsolete' category, that might
+       have informed them of the upcoming incompatibilities, and help them to
+       prepare for the transition, where not enabled by default!
+
+       * NEWS, doc/automake.texi: Update.
+       * lib/Automake/ChannelDefs.pm: Enable warnings in the category 'obsolete'
+       by default.
+       * t/warnings-obsolete-default.sh: New test.
+       * t/list-of-tests.mk: Add it.
+       * t/backcompat.sh: Use 'configure.ac' rather than 'configure.in' as
+       autoconf input file, to avoid spurious aclocal errors.
+       * t/backcompat2.sh: Likewise.
+       * t/backcompat3.sh: Likewise.
+       * t/backcompat5.sh: Add '-Wno-obsolete' when invoking aclocal.  Adjust
+       heading comments.
+       * t/backcompat6.sh: Likewise.
+       * t/cygnus-imply-foreign.sh:  Add '-Wno-obsolete' when invoking automake.
+
+2012-08-28  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       tests: fix a maintainer-check failure ('Exit' used instead of 'exit')
+
+       * t/lisp-loadpath.sh: Here.
+
+2012-08-28  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       Merge branch 'maint'
+
+       * maint:
+         sync: update files from upstream with "make fetch"
+         automake: don't define many identical 'lang_*_rewrite' subroutines
+         coverage: bugs #8844 and #9933 (already fixed by Akim's work on ylwrap)
+
+2012-08-28  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       sync: update files from upstream with "make fetch"
+
+       * lib/config.guess, lib/config.sub: Update.
+
+2012-08-27  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       automake: don't define many identical 'lang_*_rewrite' subroutines
+
+       This is just a simplifying refactoring, with no semantic change intended.
+
+       Cherry-picked from the Automake-NG commit 'v1.12.1-312-g63aa4a9' of
+       2012-06-07.
+
+2012-08-26  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       coverage: bugs #8844 and #9933 (already fixed by Akim's work on ylwrap)
+
+       * t/flex-header.sh: New test, show that automake bug#8844 and bug#9933
+       have already been fixed by the recent-ish improvements to ylwrap (merged
+       with commit v1.12.2-27-gec5cb49 of 2012-07-16, "Merge branch 'yacc-work'
+       into maint").
+       * t/list-of-tests.mk: Update.
+
+2012-08-26  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       Merge branch 'maint'
+
+       * maint:
+         docs: don't suggest to use recursive makefile setup
+         tests: fix a timestamp race in python tests
+         tests: fixup: make distcheck-override-infodir pass again
+         sync: update files from upstream with "make fetch"
+         maint: post-release minor version bump
+         release: stable release 1.12.3
+         maintcheck: fix spurious warnings
+         docs: fix typo: s/make install-info/make uninstall-info/
+         tests: fixup: make a couple of tests executable
+
+2012-08-24  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       AM_INIT_AUTOMAKE: allow obsolescent two-args invocation once again
+
+       This partially reverts commit 'v1.12-67-ge186355' of 2012-05-25,
+       "init: obsolete usages of AM_INIT_AUTOMAKE not supported anymore"
+
+       Some users still need to be able to define the version number for
+       their package dynamically, at configure runtime.
+
+       Their user case is that, for development snapshots, they want to be
+       able to base the complete version of the package on the VCS revision
+       ID (mostly Git or Mercurial).  They could of course do so by
+       specifying such version dynamically in their call to AC_INIT, as is
+       done by several GNU packages.  But then they would need to regenerate
+       and re-run the configure script before each snapshot, which might be
+       very time-consuming for complex packages, to the point of slowing
+       down and even somewhat impeding development.
+
+       The situation should truly be solved in Autoconf, by allowing a way
+       to specify the version dynamically in a way that doesn't force the
+       configure script to be regenerated and re-run every time the package
+       version changes.  But until Autoconf has been improved to allow
+       this, Automake will have to support the obsolescent two-arguments
+       invocation for AM_INIT_AUTOMAKE, to avoid regressing the suboptimal
+       but working solution for the use case described above.
+
+       See also:
+       <http://lists.gnu.org/archive/html/automake/2012-08/msg00025.html>
+
+       * NEWS: Update.
+       * m4/init.m4 (AM_INIT_AUTOMAKE): Support once again invocation with
+       two or three arguments.
+       * t/aminit-moreargs-no-more.sh: Renamed ...
+       * t/aminit-moreargs-deprecated.sh: ... like this, and updated.
+       * t/nodef.sh: Recovered test, with minor adjustments.
+       * t/backcompat.sh: Likewise.
+       * t/backcompat2.sh: Likewise.
+       * t/backcompat3.sh: Likewise.
+       * t/backcompat6.sh: Likewise.
+       * t/list-of-tests.mk: Adjust.
+
+       Suggested-by: Bob Friesenhahn n<bfriesen@simple.dallas.tx.us>
+
+2012-08-21  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       docs: don't suggest to use recursive makefile setup
+
+       * doc/automake.texi (Introduction): Here, by erroneously telling that
+       "there should generally be one Makefile.am per directory of a project".
+       For reference, see commit 'v1.12.1-25-g61dfb47' of 2012-06-12, "docs:
+       recursive make considered harmful".
+
+2012-08-16  Adam Sampson  <ats@offog.org>  (tiny change)
+           Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       tests: fix a timestamp race in python tests
+
+       Fixes automake bug#12210.
+
+       * t/python-missing.sh: Call aclocal and autoconf with the "--force"
+       option.  We need this because, on fast machines, it's possible for
+       'mypy.m4' and 'aclocal.m4' to end up with the same timestamp as configure,
+       so autoconf (without the "--force" options) wouldn't bother to rebuild it,
+       and would just rerun the previous AM_PATH_PYTHON test, succeeding rather
+       than failing as expected.
+       * t/python-am-path-iftrue.sh: Likewise.
+
+2012-08-14  Peter Rosin  <peda@lysator.liu.se>
+
+       tests: fixup: make distcheck-override-infodir pass again
+
+       Fixes Automake bug#12198.
+
+       * t/distcheck-override-infodir.sh (main.texi): Remove all leading
+       cruft added by commit v1.12.2-96-g133307b "maintcheck: fix spurious
+       warnings".
+
+2012-08-14  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       sync: update files from upstream with "make fetch"
+
+       * lib/config.guess, lib/config.sub, lib/gitlog-to-changelog,
+       lib/texinfo.tex: Update.
+
+2012-08-14  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       maint: post-release minor version bump
+
+       * configure.ac (AC_INIT): Bump version number to 1.12.3a.
+       * m4/amversion.m4: Likewise (automatically regenerated by
+       "make bootstrap").
+
+2012-08-13  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       release: stable release 1.12.3
+
+       * configure.ac (AC_INIT): Bump version number to 1.12.3.
+       * m4/amversion.m4: Likewise (auto-updated by "./bootstrap").
+
+2012-08-13  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       maintcheck: fix spurious warnings
+
+       * t/distcheck-override-infodir.sh: Be sure that valid occurences
+       of the "aclocal" and "automake" strings, which can confuse the
+       'sc_tests_plain_automake' check, are protected by leading "#"
+       characters.
+       * t/ax/test-lib.sh: Always use '$(...)' for command subtitution,
+       to avoid triggering the 'sc_tests_command_subst' check; there was
+       still once place where `...` was used.  While at it, fix a related
+       comment.
+       * t/ax/test-defs.in ($sleep): Use creative quoting to avoid
+       spuriously triggering the 'sc_tests_plain_sleep' check.
+
+2012-08-13  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       docs: fix typo: s/make install-info/make uninstall-info/
+
+       * doc/automake.texi (Texinfo): Here.  And a minor wording improvement
+       while we are at it.
+
+2012-08-13  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       tests: fixup: make a couple of tests executable
+
+       * t/python-am-path-iftrue.sh: This.
+       * t/python-missing.sh: And this.
+
+2012-08-13  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       Merge branch 'maint'
+
+       * maint:
+         tests: rework tests on AM_PATH_PYTHON
+         cosmetics: fix typos and references in comments
+         typofix: in a test diagnostic
+         readme: fixlets to HACKING
+
+2012-08-13  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       tests: rework tests on AM_PATH_PYTHON
+
+       * t/python8.sh, t/python9.sh: Merge into ...
+       * t/python-am-path-iftrue.sh: ... this new test, with minor adjustments.
+       * t/python4.sh, t/python5.sh, t/python6.sh, t/python7.sh: Merge into ...
+       * t/python-missing.sh: ... this new test.
+       * t/python5b.sh: Rename ...
+       * t/python-too-old.sh: ... like this, and adjust/extend.
+       * t/list-of-tests.mk: Adjust.
+
+2012-08-13  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       cosmetics: fix typos and references in comments
+
+       * lib/am/check.am: Here.
+       * doc/automake.texi: And here.
+       * t/*.sh: And in several of these tests.
+
+2012-08-13  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       typofix: in a test diagnostic
+
+       * t/cscope.tap: Here.
+
+2012-08-12  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       readme: fixlets to HACKING
+
+       * HACKING: Use longer "=====" lines to separate different section (this
+       is just eye-candy admittedly, but I prefer it).
+       (Release procedure): Don't tell to "update NEWS"; that should be updated
+       throughout the normal course of development.  Instead, tell to just check
+       it.  Improve description of the re-bootstrapping and rechecking procedure,
+       also suggesting to use "git clean" beforehand (with all due warnings!).
+
+2012-08-12  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       Merge branch 'maint'
+
+       * maint:
+         cleanup: remove stale references to 'lzma' option
+
+2012-08-12  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       cleanup: remove unused transform '%HAVE-MANS%'
+
+       * automake.in (preprocess_file): Here.
+
+2012-08-11  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       cleanup: remove stale references to 'lzma' option
+
+       * automake.in (preprocess_file): Here.
+       (handle_dist): And here.
+
+2012-08-10  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       Merge branch 'maint'
+
+       * maint:
+         automake: remove an unused local variable
+         distcheck: more resilient against possible failures
+         cleanup: remove almost-unused global var 'am_relative_dir'
+
+2012-08-10  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       automake: remove an unused local variable
+
+       * automake.in (handle_dist): Here, the '$extra_dist' variable.
+
+2012-08-10  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       distcheck: more resilient against possible failures
+
+       * lib/am/distdir.am (distcheck): Ensure that a failure in the commands
+       making the just-extracted source tree read-only cause the recipe to fail.
+       While at it, save a fork by creating the '_build' and '_inst' subdir
+       with a single mkdir invocation.
+
+2012-08-10  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       cleanup: remove almost-unused global var 'am_relative_dir'
+
+       Cherry picked from commit v1.12.2-741-g53b5d11 of Automake-NG.
+
+       * automake.in ($am_relative_dir): Delete, it was only used once ...
+       (generate_makefile): ... in here, so it's simpler to inline its
+       expansion.
+       (initialize_per_input): Don't reset the deleted variable.
+
+2012-08-10  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       Merge branch 'maint'
+
+       * maint:
+         cleanup: remove two almost-unused global variables: {am,in}_file_name
+         cleanup: remove almost-unused global var 'topsrcdir'
+         automake: remove an unused variable
+         tests: make a test script more semantic
+         tests: remove an obsolete, no-op test script
+         tests: remove an obsolete test script
+
+2012-08-10  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       cleanup: remove two almost-unused global variables: {am,in}_file_name
+
+       Cherry picked from commit v1.12.2-739-gbf2a8b0 of Automake-NG.
+
+       * automake.in ($am_file_name, $in_file_name): Delete these, which were
+       used only in the 'read_main_am_file' subroutine; instead ...
+       (read_main_am_file): ... modify it to only work from the '$makefile_am'
+       argument (which it was already receiving), and the new '$makefile_in'
+       argument, which is now passed to it ...
+       (generate_makefile): ... from here.
+       (initialize_per_input): Don't reset the two deleted variables anymore.
+
+2012-08-10  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       cleanup: remove almost-unused global var 'topsrcdir'
+
+       Cherry picked from commit v1.12.2-740-ga7f24eb in Automake-NG.
+
+       * automake.in ($topsrcdir): Delete, it was only used once ...
+       (handle_LIBOBJS_or_ALLOCA): ... in here, so it's simpler to inline
+       its expansion.  Improve formatting of immediately surrounding code
+       a little while we are at it.
+       (initialize_per_input): Don't reset the deleted variable.
+
+2012-08-10  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       automake: remove an unused variable
+
+       * automake.in ($canonical_location): This.
+       (scan_autoconf_traces): Don't initialize it.
+
+2012-08-08  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       tests: make a test script more semantic
+
+       This is mostly useful for Automake-NG, that is heavily overhauling the
+       generated Makefiles and thus is prone to break grepping checks (which
+       can sometimes end up causing false negatives in the testsuite, sadly).
+       But this is not a reason not to strengthen the test for mainline
+       Automake as well.
+
+       * t/noinstdir.sh: Add semantic checks.
+
+2012-08-08  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       tests: remove an obsolete, no-op test script
+
+       * t/info.sh: This: it tried to operate by checking the contents of the
+       variable '$(INFOS)', but that is not even defined (and probably has been
+       obsolete for quite a long time).  Since other tests already do thorough
+       testing of the Texinfo support, just remove this test.
+       * t/list-of-tests.mk: Adjust.
+
+2012-08-08  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       tests: remove an obsolete test script
+
+       * t/scripts.sh: This: it used to check that the 'AC_PROG_INSTALL' macro
+       was not uselessly required, but today that macro is AC_REQUIRE'd by
+       'AM_INIT_AUTOMAKE' anyway, so that the test is no more significant.
+       * t/list-of-tests.mk: Adjust.
+
+2012-08-05  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       Merge branch 'maint'
+
+       * maint:
+         tests: avoid spurious failures with older Texinfo
+         tests: avoid tons of spurious failures on NetBSD
+         runtest: avoid spurious failures on NetBSD
+         news: dependency tracking for Portland Group Compilers is now supported
+
+2012-08-05  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       tests: avoid spurious failures with older Texinfo
+
+       * t/distcheck-override-infodir.sh (main.texi): Add explicit calls to
+       '@dircategory' and '@direntry', to ensure a 'dir' file will be created
+       also by 'install-info' coming with Texinfo 4.8.
+
+2012-08-05  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       tests: avoid tons of spurious failures on NetBSD
+
+       * t/ax/am-test-lib.sh (process_requirements): Set the '$am_tool' variable
+       to the empty string before trying to unset it; otherwise, we might be
+       attempting to unset an already-unset variable, which (together with the
+       presence of the 'errexit' shell flag) causes spurious failures at least
+       with the /bin/sh shell from NetBSD 5.1.  This was actually causing the
+       great majority of the Automake tests (all those not using a "required=..."
+       declaration) to fail spuriously on that platform!
+
+2012-08-05  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       runtest: avoid spurious failures on NetBSD
+
+       * runtest.in: Use ${1+"$@"} rather than simply "$@", because the 'set -u'
+       setting used in the script causes the latter to trigger a spurious error
+       with the NetBSD 5.1 /bin/sh ("./runtest: @: parameter not set") if there
+       are no arguments to the test.
+
+2012-08-05  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       news: dependency tracking for Portland Group Compilers is now supported
+
+       * NEWS: So document it here.
+
+2012-08-05  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       Merge branch 'elisp-work'
+
+       * elisp-work:
+         news: document all the recent elisp-related changes and improvements
+         coverage: byte-compiling elisp files in different subdirectories
+         elisp: honour AM_ELCFLAFS and ELCFLAGS in byte-compilation
+         elisp: --batch implies -q, remove -q
+         elisp: support elisp files in subdirectories properly
+         elisp: simplify suffix rules using emacs '-L' option
+         elisp: no need to "absolutize" $(srcdir) and $(builddir) ...
+         elisp: prefer $(builddir) files over $(srcdir) ones
+         elisp: use suffix rules, get rid of 'elisp-comp' script (mostly a rewrite)
+         coverage: elisp path contains $(srcdir) and $(builddir)
+         coverage: emacs lisp files in subdirectories
+
+2012-08-05  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       Merge branch 'maint'
+
+       * maint:
+         tests: cater to OpenSolaris 'zip'
+
+2012-08-05  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       tests: cater to OpenSolaris 'zip'
+
+       * t/dist-formats.tap: Here: OpenSolaris zip do not accept the
+       '--version' option, but accept the '-v' one with a similar
+       meaning (if no further arguments are given).
+
+2012-08-04  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       Merge branch 'maint'
+
+       * maint:
+         tests: fix a spurious XPASS on OpenIndiana
+         tests: avoid spurious failure of 't/vala-vapi.sh' on OpenIndiana
+         tests: avoid spurious failure of 't/uninstall-fail.sh' on OpenIndiana
+         tests: reimplement wrappers for automake and aclocal in perl
+         tests: work around a ksh bug w.r.t. ${1+"$@"}
+         depcomp: style changes to Portland Group Compilers support
+         depcomp: initial support for Portland Group Compilers
+
+2012-08-04  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       tests: fix a spurious XPASS on OpenIndiana
+
+       * t/instspc.tap: Here, by isolating the $(DESTDIR) used by runs with
+       different "problematic strings" to prevent them to unduly interfering
+       with each other.  With this, the Automake testsuite finally run cleanly
+       on the OpenIndiana and Solaris 10 systems I have access to.
+
+2012-08-04  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       tests: avoid spurious failure of 't/vala-vapi.sh' on OpenIndiana
+
+       * t/vala-vapi.sh: Use 'printf', not 'echo', to print strings containing
+       substrings like '\n', that can be interpreted like escape strings.  That
+       because the /bin/sh and the /bin/bash shell from OpenIndiana actually
+       interpret them that way:
+
+         $ /bin/sh -c 'echo "foo\nbar"'
+         foo
+         bar
+         $ /bin/bash -c 'echo "foo\nbar"'
+         foo
+         bar
+
+2012-08-04  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       tests: avoid spurious failure of 't/uninstall-fail.sh' on OpenIndiana
+
+       On current OpenIndiana (based on what once was OpenSolaris 11), the shell
+       /bin/sh (which, differently from what happens on Solaris, is a true POSIX
+       shell, thus worthy of consideration) somehow manages to "eat" the
+       error message from 'rm' when that fails to remove a file due to lacking
+       permission on the parent directory:
+
+         $ /bin/sh -c "cd unwritable-dir || { echo OOPS; exit 1; }; rm -f foo"
+         $ echo rc = $?
+         rc = 1
+         $ /bin/bash -c "cd unwritable-dir || { echo OOPS; exit 1; }; rm -f foo"
+         rm: foo not removed: Permission denied
+         $ echo rc = $?
+         rc = 2
+         $ /bin/sh -c "cd unwritable-dir || { echo OOPS; exit 1; }; env rm -f foo"
+         rm: foo not removed: Permission denied
+         $ echo rc = $?
+         rc = 2
+
+       That is probably due to an improper optimization, that is, the shell tries
+       to be smart and remove the file itself instead of invoking 'rm', but fails
+       spectacularly in the attempt.
+
+       * t/uninstall-fail.sh: The just-described bug was causing a spurious
+       failure in this test case.  Cater to thus situation, by relaxing the
+       test when a faulty shell is detected.  And while at it, fix and improve
+       an unrelated comment.
+
+2012-08-04  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       tests: reimplement wrappers for automake and aclocal in perl
+
+       This will allow us to avoid one extra shell invocation per automake
+       and aclocal invocation in our testsuite, and, more importantly, will
+       allow us not to worry about potential shell portability issues, at
+       least in those wrappers.  For an example of such a portability issue,
+       refer to the recent commit v1.12.2-80-g65dadf6 "tests: work around a
+       ksh bug w.r.t. ${1+"$@"}".
+
+       * t/wrap/automake.in, t/wrap/aclocal.in: Rewritten in perl.
+
+2012-08-04  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       tests: work around a ksh bug w.r.t. ${1+"$@"}
+
+       Fixes automake bug#10898.  See also the older (much older) thread:
+       <http://lists.gnu.org/archive/html/automake-patches/2009-12/msg00036.html>
+
+       At least the AT&T and OpenSolaris versions of the Korn shell, as well
+       as the /bin/sh from OpenIndiana 11, have a strange bug regarding the
+       expansion of ${1+"$@"}: when exactly *one empty* argument is passed to
+       a script run by one of this shells, inside that script ${1+"$@"} will
+       expand to *nothing*, rather than to to the single empty string, as
+       one would expect (OTOH, $# will correctly expand to 1).  This buggy
+       behaviour was causing a spurious failure in our testsuite (test 6 in
+       't/automake-cmdline.tap').  Work around it.
+
+       * t/wrap/automake.in: Here.
+
+2012-08-04  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       news: document all the recent elisp-related changes and improvements
+
+       * NEWS (Elisp byte-compilation): Here.  Also notice that the recent
+       changes have fixed the long-standing (almost two years old!) automake
+       bug#7441.
+
+2012-08-04  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       coverage: byte-compiling elisp files in different subdirectories
+
+       Where a '.el' file in a subdirectory might require a '.el' file in
+       another one.  This does not work out of the box, but can be made to
+       work with a judicious use of $(AM_ELCFLAGS) (just introduced in the
+       previous commit).
+
+       * t/lisp-subdir-mix.sh: New test.
+       * t/list-of-tests.mk: Add it.
+
+2012-08-04  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       elisp: honour AM_ELCFLAFS and ELCFLAGS in byte-compilation
+
+       * lib/am/lisp.am (.el.elc): Add "$(AM_ELCFLAFS) $(ELCFLAGS)"
+       to the emacs command line.
+       * t/lisp-flags.sh: New test.
+       * t/list-of-tests.mk: Add it.
+       * doc/automake.texi (Emacs Lisp): Update.
+
+2012-08-02  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       Merge branch 'depcomp-pgcc' into maint
+
+       * depcomp-pgcc:
+         depcomp: style changes to Portland Group Compilers support
+         depcomp: initial support for Portland Group Compilers
+
+2012-07-30  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       Merge branch 'maint'
+
+       * maint:
+         build: fix build in VPATH setup
+         gen-tests: simplify sourcing of helper shell files
+
+2012-07-30  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       build: fix build in VPATH setup
+
+       * Makefile.am (t/ax/test-defs.sh): Ensure the 't/ax' directory exists,
+       before trying to create 'test-defs.sh' in there.  This is required in
+       VPATH builds.
+
+       Reported-by: Akim Demaille <akim@lrde.epita.fr>
+
+2012-07-26  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       news: fix a couple of minor formatting issues
+
+       * NEWS (New in 1.13): Here.
+
+2012-07-26  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       gen-tests: simplify sourcing of helper shell files
+
+       This is a follow-up on commit v1.12.2-49-g42fb45b, for an occurrence
+       of '. "$am_testauxdir"/foo.sh' that wasn't in a test script, but
+       rather in 'gen-testsuite-part' (ending up in the tests generated by
+       that script).
+
+       * gen-testsuite-part: In the generated 'depcomp*.tap' tests, use
+       simply:
+           . depcomp.sh
+       rather than:
+           . "$am_testauxdir/depcomp.sh"
+
+2012-07-26  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       typofix: in a comment in Makefile.am
+
+2012-07-26  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       Merge branch 'maint'
+
+       * maint: (38 commits)
+         maintcheck: fixup list of files in $(xdefs)
+         tests: never source test-defs.sh directly, source test-lib.sh instead
+         runtest: sanitize test environment
+         tests: remove an obsolescent self test
+         tests: "am_using_tap=yes" -> "am_test_protocol=tap"
+         tests: protect test libs against multiple inclusion
+         configure: testsuite shell can return early from "dot-sourced" files
+         tests: move sanitization and "Bournification" in the generic test lib
+         tests: source test defs in the generic test lib
+         test defs: no need to re-add $srcdir/t/ax to $PATH
+         tests: split test libs into "generic" and "automake-specific"
+         test setup: move actual calling of testsuite setup in ./defs
+         test setup: merge definitions of function for simple tests
+         test init: refactor: new function 'am_test_setup'
+         test init: refactor: move displaying of debugging info later
+         test init: refactor: new function 'am_setup_testdir'
+         test init: refactor: new function 'am_set_exit_traps'
+         configure: testsuite shell set exit traps in shell functions
+         test init: refactor: new function 'am_exit_trap'
+         test init: refactor: new function 'process_requirements'
+         ...
+
+2012-07-26  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       Merge branch 'testsuite-refactor' into maint
+
+       * testsuite-refactor: (33 commits)
+         maintcheck: fixup list of files in $(xdefs)
+         tests: never source test-defs.sh directly, source test-lib.sh instead
+         runtest: sanitize test environment
+         tests: remove an obsolescent self test
+         tests: "am_using_tap=yes" -> "am_test_protocol=tap"
+         tests: protect test libs against multiple inclusion
+         configure: testsuite shell can return early from "dot-sourced" files
+         tests: move sanitization and "Bournification" in the generic test lib
+         tests: source test defs in the generic test lib
+         test defs: no need to re-add $srcdir/t/ax to $PATH
+         tests: split test libs into "generic" and "automake-specific"
+         test setup: move actual calling of testsuite setup in ./defs
+         test setup: merge definitions of function for simple tests
+         test init: refactor: new function 'am_test_setup'
+         test init: refactor: move displaying of debugging info later
+         test init: refactor: new function 'am_setup_testdir'
+         test init: refactor: new function 'am_set_exit_traps'
+         configure: testsuite shell set exit traps in shell functions
+         test init: refactor: new function 'am_exit_trap'
+         test init: refactor: new function 'process_requirements'
+         ...
+
+2012-07-26  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       Merge branch 'fix-pr12041' into maint
+
+       * fix-pr12041:
+         tests: avoid spurious failure when running as root
+
+2012-07-26  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       maintcheck: fixup list of files in $(xdefs)
+
+       syntax-checks.mk (xdefs): Adjust to recent changes: add 't/ax/test-lib.sh'
+       and 't/ax/test-lib.sh', remove the now-deleted 't/ax/test-init.sh'
+
+2012-07-26  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       tests: never source test-defs.sh directly, source test-lib.sh instead
+
+       After the recent re-organization, sourcing 'test-defs.sh' directly might
+       not work well and cause spurious failures or other unexpected behaviours.
+       We should source 'test-lib.sh' instead, which contains not more direct
+       code execution (only definition of shell variables/functions, or sourcing
+       of other '*.sh' with the same property), is protected against multiple
+       inclusions, and sources 'test-defs.sh' automatically in in a proper way.
+
+       * t/testsuite-summary-count.sh, t/tap-summary.sh, t/tap-summary-color.sh,
+       t/testsuite-summary-color.sh: Source 'test-lib.sh', not 'test-defs.sh'.
+       * gen-testsuite-part: Likewise, in the generated wrapper scripts.
+
+2012-07-26  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       runtest: sanitize test environment
+
+       * runtest.in: Here, similarly to what is done by AM_TESTS_ENVIRONMENT
+       in Makefile.am, unset variables that should be under the complete control
+       of the test framework, and that could create havoc if inherited from the
+       environment.  This remove the need to check against possible environment
+       "pollution" ...
+       * t/ax/test-defs.in: ... in here.
+       * Makefile.am (AM_TESTS_ENVIRONMENT): Add a comment about the need of
+       synchronization with 'runtest.in'.
+       * t/self-check-env-sanitize.tap: Remove as obsolete.
+       * t/list-of-tests.mk: Adjust.
+
+2012-07-26  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       tests: remove an obsolescent self test
+
+       * t/self-check-tap.sh: This.  The recent reorganization and code
+       moving between 'test-defs.sh' and 'test-lib.sh' has made it
+       brittle and prone to failures.  Since the usefulness of this self
+       check is extremely limited, it's not worth trying to fix it. Just
+       remove it.
+       * t/list-of-tests.mk: Adjust.
+
+2012-07-26  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       tests: "am_using_tap=yes" -> "am_test_protocol=tap"
+
+       And similarly, "am_using_tap=no" -> "am_test_protocol=none".
+
+       The new '$am_test_protocol' name is clearer, and will allow the easy
+       addition of further test protocols in the future.  This is not truly
+       relevant for automake, but we are trying to make some parts of our
+       testsuite framework as general as possible, in view of a future move
+       to a more generic project like Gnulib.
+
+       * Makefile.am, t/ax/am-test-lib.sh, t/ax/test-defs.in, t/ax/test-lib.sh,
+       t/self-check-env-sanitize.tap, t/self-check-tap.sh: Adjust.
+       * syntax-checks.mk (sc_tests_obsolete_variables): Add 'am_using_tap' to
+       the list of obsolete variables to check against.
+
+2012-07-26  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       tests: protect test libs against multiple inclusion
+
+       * t/ax/test-lib.sh, t/ax/am-test-lib.sh: Return early if already sourced.
+       Use the witness variables '$test_lib_sourced' and '$am_test_lib_sourced',
+       respectively, for this purpose.
+       * runtest.in, Makefile.am (AM_TESTS_ENVIRONMENT): Unset 'test_lib_sourced'
+       and 'am_test_lib_sourced', to avoid interferences from the environment.
+
+2012-07-26  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       configure: testsuite shell can return early from "dot-sourced" files
+
+       * configure.ac: Check that the shell selected to run the test
+       scripts can call 'return' form within a file being sourced
+       with the '.' built-in.
+
+2012-07-26  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       tests: move sanitization and "Bournification" in the generic test lib
+
+       * t/ax/test-defs.sh: From here ...
+       * t/ax/test-lib.sh: ... to here.  Also move the initialization of
+       '$argv0' and '$me'.
+
+2012-07-26  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       tests: source test defs in the generic test lib
+
+       * t/ax/test-lib.sh: That is, here ...
+       * defs: ... rather than here.
+
+2012-07-26  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       test defs: no need to re-add $srcdir/t/ax to $PATH
+
+       * t/ax/test-defs.sh: Here.  That is already done by both 'runtest' and
+       AM_TESTS_ENVIRONMENT, and the presence of '$srcdir/t/ax' in $PATH is
+       anyway required, after the recent changes, for our testsuite framework
+       to work at all.
+
+2012-07-26  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       tests: split test libs into "generic" and "automake-specific"
+
+       This is the first step in the quest to merge the generically useful
+       parts of our test suite framework in a more generic project, like
+       Gnulib.  Time will tell if we'll succeed, and whether the success will
+       be worth the extra hassle.
+
+       * t/ax/test-init.sh: Split out ...
+       * t/ax/am-test-lib.sh, t/ax/test-lib.sh: ... into these two tests.
+       * defs, Makefile.am: Adjust.
+
+2012-07-26  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       test setup: move actual calling of testsuite setup in ./defs
+
+       * t/ax/test-init.sh: Move call to 'am_test_setup' ...
+       * defs: ... here.
+
+2012-07-26  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       test setup: merge definitions of function for simple tests
+
+       * t/ax/plain-functions.sh: Delete, moving the definitions of ...
+       ($stderr_fileno_): ... this variable ...
+       (warn_, fail_, skip_, skip_all_, fatal_, framework_failure_): ... and
+       these functions ...
+       * t/ax/test-init.sh: ... in here.  This allow us to use those functions
+       earlier in this file (instead of having to duplicate their behaviour
+       with inlined code).  The TAP-based tests are still able to override these
+       functions later to their TAP-enhanced equivalents when 'tap-functions.sh'
+       is sourced.
+       * Makefile.am (dist_noinst_DATA): Remove 't/ax/plain-functions.sh'.
+       * t/ax/tap-functions.sh: Adjust a comment.
+
+2012-07-26  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       test init: refactor: new function 'am_test_setup'
+
+       * t/ax/test-init.sh (am_test_setup): Here.
+       Call it from the main code.  Remove other calls of functions and
+       settings that are now duly called by 'am_test_setup'.
+
+2012-07-26  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       test init: refactor: move displaying of debugging info later
+
+       * t/ax/test-init.sh: Here, about the values of $PATH, $am_using_tap
+       and $am_running_installcheck.
+
+2012-07-26  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       test init: refactor: new function 'am_setup_testdir'
+
+       * t/ax/test-init.sh (am_setup_testdir): Here.
+       Use it instead of inlining its contents in the main code.
+
+2012-07-26  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       test init: refactor: new function 'am_set_exit_traps'
+
+       * t/ax/test-init.sh (am_set_exit_traps): Here.
+       (trap): Use it instead of inlining the cleanup/finalization code.
+
+2012-07-26  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       configure: testsuite shell set exit traps in shell functions
+
+       * configure.ac: Check that the shell selected to run the test
+       scripts can set an exit trap in a shell function, without having
+       that trap executed at the termination of the function rather
+       than of the scripts.  According to the Autoconf manual, at least
+       AUX 5.3 /bin/sh suffers of such a bug.
+
+2012-07-26  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       test init: refactor: new function 'am_exit_trap'
+
+       * t/ax/test-init.sh (am_exit_trap): Here.
+       (trap): Use it instead of inlining the cleanup/finialization code.
+
+2012-07-26  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       test init: refactor: new function 'process_requirements'
+
+       * t/ax/test-init.sh (process_requirements): Here.
+       Use it in to check that the tools in $required are present.
+
+2012-07-26  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       test init: refactor: new function 'require_tool'
+
+       * t/ax/test-init.sh (require_tool): Here.
+       Use it in the loop in the prerequisites in $required.
+
+2012-07-26  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       test init: remove a couple of paranoid sanity checks
+
+       * t/ax/test-init.sh: Here, about 'am_top_srcdir' and 'am_top_builddir';
+       the values of those variables are AC_SUBST'd, so it's nigh impossible
+       for the to be wrong or get "messed up".
+
+2012-07-26  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       tests: simplify sourcing of helper shell files
+
+       Now that the early $PATH setup in both 'runtest' and AM_TESTS_ENVIRONMENT
+       allow the '.' built-in to find to-be-sourced shell scripts in the 't/ax/'
+       directory automatically, we can simplify several usages like:
+
+          . "$am_testauxdir"/foo.sh
+
+       to just:
+
+          . foo.sh
+
+       Also, because our test scripts run with the 'errexit' flag active, and
+       because POSIX mandates that, when the '.' built-in is used,
+
+          ... if no readable file is found, a non-interactive shell shall abort ...
+
+       we can further simplify usages like:
+
+           . "$am_testauxdir"/foo.sh || fatal_ "sourcing foo.sh"
+
+       once again to to just:
+
+           . foo.sh
+
+       * ./defs, several tests: Adjusted.
+
+2012-07-26  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       test defs: move in 't/ax/test-defs.sh'
+
+       We can do so with minimal churn, now that the early setup of $PATH in
+       both 'runtest' and AM_TESTS_ENVIRONMENT allow the '.' built-in to find
+       to-be-sourced shell scripts in 't/ax' automatically, both in in-tree
+       and  VPATH builds.
+
+       With this change, we take another step forward a more rational and
+       "segregated" organization of our testsuite framework.
+
+       * defs-static.in: Rename ...
+       * t/ax/test-defs.in: ... like this, and adjust.
+       * Makefile.am, syntax-checks.mk, t/README, gen-testsuite-part,
+       t/tests-init.sh, t/ax/tap-setup.sh, t/tap-summary.sh, .gitignore,
+       t/testsuite-summary-color.sh, t/testsuite-summary-count.sh,
+       t/self-check-tap.sh, defs: Adjust.
+
+2012-07-26  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       tests: update PATH early from AM_TESTS_ENVIRONMENT and runtest
+
+       Because the POSIX standards mandate that sourcing a file with ". FILE"
+       will cause FILE (assuming it is a relative containing no slashes) to be
+       looked for in PATH, such a move will allow us to simplify our sourcing
+       of shell testing libraries like (currently) 't/ax/test-init.sh' and
+       'defs', and to modularize and re-organize them better in the feature,
+       with minimal churn.
+
+       * runtest.in, Makefile.am (AM_TEST_ENVIRONMENT): Prepend $(abs_srcdir)/t/ax
+       and $(abs_builddir)/t/ax (in that order) to PATH; do so avoiding repetition
+       in the common case of non-VPATH builds.
+
+2012-07-26  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       runtest: export $srcdir for use by the test scripts
+
+       This is mostly a preparatory change in view of future ones.  But it
+       also make the behaviour of runtest more similar to that of the test
+       harness used by "make check".
+
+       * runtest.in: Export srcdir (was already defined to '@srcdir@').
+
+2012-07-26  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       gen-tests: $testdir/ax -> $testauxdir
+
+       * gen-testsuite-part ($testauxdir): New, defined to "$testdir/ax".
+       Use it throughout, for better encapsulation and less duplication.
+       ($auxdir): Remove as unneeded.
+
+2012-07-26  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       gen-tests: less hard-coding of 't' as the test directory
+
+       This will make life easier for us in case we decide to rename the
+       testsuite directory in the future (perhaps to something like 'tests',
+       which is somewhat less cryptic than the current 't').
+
+       * gen-testsuite-part ($testdir): New variable, used throughout instead
+       of hard-coding the name of the test directory to 't'.
+       All the script adjusted to make proper use of '$testdir'.
+       ($auxdir): Move its definition earlier, for consistency with the one
+       of '$testdir'.
+
+2012-07-26  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       build: auxiliary testsuite files/scripts built by "make all"
+
+       This will allow the developers to run a tests case by hand out of
+       a newly extracted tarball simply doing:
+
+           $ ./configure && make
+           $ ./runtest t/the-test-case.sh
+
+       while before this change one has to resort to:
+
+           $ ./configure && make && make check TESTS=
+           $ ./runtest t/the-test-case.sh
+
+       or, with some non-GNU makes, even:
+
+           $ ./configure && make && make check TESTS= AM_MAKEFLAGS="TESTS="
+           $ ./runtest t/the-test-case.sh
+
+       This come very handy sometimes, especially when doing one-shot
+       debugging.  Admittedly not a big deal, but one less friction in
+       the build system is always nice.
+
+       * Makefile.am (check_SCRIPTS, dist_check_DATA, nodist_check_DATA):
+       Move their content to ...
+       (noinst_SCRIPTS, dist_noinst_DATA, nodist_noinst_DATA): ... these
+       variables.
+       Adjust comments.
+
+2012-07-26  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       perf tests: reorganize
+
+       * t/list-of-tests.mk (handwritten_TESTS): Don't list ($perf_TESTS) in
+       here anymore.
+       * Makefile.am (EXTRA_DIST): Add them explicitly.
+       (perf): New target, run the performance tests and save the logs of
+       the ones with unexpected results in the file 't/perf/test-suite.log',
+       which is thus ...
+       (PERF_TEST_SUITE_LOG): ... defined in this variable ...
+       (CLEANFILES): ... and added to this.
+       (test_subdirs): Remove 't/perf': the tests in there are no more
+       listed in $(TESTS).
+       * t/ax/test-init.sh: Don't explicitly skip "perf" test here.
+
+2012-07-26  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       runtest: pass *all* the given shell options to the test invocation
+
+       * runtest.in: Here.  This didn't work previously because, in our
+       option parsing loop, we were mistakenly redefining '$shell_opts'
+       each time, instead of appending to it.
+
+2012-07-26  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       runtest: correctly pass shell option also for TAP tests
+
+       * runtest.in: Here.  This required code refactoring not
+       completely trivial.
+
+2012-07-26  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       cosmetics: remove leftover comment fragment from runtest.in
+
+2012-07-25  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       test defs: improve a comment
+
+       * defs-static.in: Here, about the unsetting of CDPATH.
+
+2012-07-25  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       test defs: remove obsolete comment
+
+       * defs-static.in: Here: do not state anymore that this file should execute
+       correctly with any system's /bin/sh shell, as this is not true anymore: the
+       testsuite assumes a POSIX shell throughout these days.
+
+2012-07-25  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       runtest: support option --shell, tell which shell should run the test
+
+       * runtest.in: Here.  The same effect could have been obtained by
+       exporting AM_TEST_RUNNER_SHELL to the desired value, but the new
+       API is simpler and requires less typing and less thinking.
+
+2012-07-25  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       runtest: support passing options over to the shell
+
+       * runtest.in: Here.  Also, support '--help' to display a nice
+       help screen.
+
+2012-07-25  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       tests: avoid spurious failure when running as root
+
+       Fixes automake bug#12041.
+
+       * t/primary-prefix-couples-force-valid.sh: If run as root, don't expect
+       a "test -x" on a non-executable files to fail: for root, all files are
+       executable (as well as readable and writable), and at least on Solaris
+       10 that causes "test -x" to succeed also on non-executable files.
+
+2012-07-24  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       Merge branch 'maint'
+
+       * maint:
+         tests: avoid non-textual output in a '.log' file
+
+2012-07-24  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       tests: avoid non-textual output in a '.log' file
+
+       * t/dist-formats.tap: Here.  Otherwise, some inferior awk implementations,
+       like OpenIndiana /usr/xpg4/bin/awk, could be confused and cause spurious
+       errors in the testsuite harness.
+
+2012-07-24  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       tags: refactor to reduce code duplication (2)
+
+       No semantic change is intended.
+
+       * lib/am/tags.am (am__define_uniq_tagged_files): New variable,
+       factor out some code common to ...
+       (ctags-am, tags-am, ID): ... the recipes of these targets.
+
+2012-07-24  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       tags: refactor to reduce code duplication (1)
+
+       No semantic change is intended.
+
+       * lib/am/tags.am (am__uniquify_input): New variable, factor
+       out some code common to ...
+       (ctags-am, tags-am, ID): ... the recipes of these targets.
+
+2012-07-24  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       Merge branches 'tags-simplify-recursion' and 'color-tests-always'
+
+       * tags-simplify-recursion:
+         tags: unify recursion for tags targets with that of "usual" targets
+
+       * color-tests-always:
+         tests: better name for a couple of tests
+         check: support colorized testsuite output by default
+
+2012-07-23  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       tests: avoid a spurious failure with Solaris /bin/sh
+
+       The /bin/sh shell on Solaris is dumb enough not to set the exit
+       status to 127 after the execution of a non-existing command is
+       attempted:
+
+         $ /bin/sh -c 'nonesuch'; echo stat = $?
+         /bin/sh: nonesuch: not found
+         stat = 1
+
+       This means that the missing script, when run through that shell,
+       cannot discriminate between a real failure of a maintainer tool
+       and a failure due to its absence.  This is not a big deal in
+       practice (especially because all the 'missing' invocations in
+       our Makefiles are done with $(SHELL), and that is almost surely
+       set by configure to a proper POSIX shell), but was causing an
+       annoying failure in our testsuite.  Fix it.
+
+       * t/missing3.sh: If 'missing' is run with a /bin/sh shell suffering
+       from the just-described bug, skip the check that would spuriously
+       fail due to that bug.
+
+2012-07-23  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       tests: fix buglet in t/missing3.sh
+
+       * t/missing3.sh: Be sure to use 'run_cmd' also in the first invocation
+       of 'missing', to ensure the stderr will actually be saved in a file we
+       can later grep.
+
+2012-07-23  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       Merge branch 'maint'
+
+       * maint:
+         self tests: avoid spurious failures on older bash
+         tests: remove t/parallel-tests-many.sh (fixes spurious failure)
+         typofix: in a comment in the automake script
+         news: minor fixlets and reordering
+
+2012-07-23  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       Merge branch 'fix-pr11909' into maint
+
+       * fix-pr11909:
+         self tests: avoid spurious failures on older bash
+
+2012-07-23  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       self tests: avoid spurious failures on older bash
+
+       Fixes automake bug#11909.
+
+       * t/self-check-explicit-skips.sh: Remove or rework few checks for use
+       cases that are no more relevant nor supported now that we've got rid
+       of the need to use the 'Exit' function explicitly.  Make the other
+       existing checks stricter.
+
+2012-07-23  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       tests: remove t/parallel-tests-many.sh (fixes spurious failure)
+
+       That test was checking for automake#7868 "parallel-tests and command-line
+       length limit issue".  That bug is still open, and the tests was xfailing.
+
+       What concerns us is that the test was also causing an annoying problem.
+       On Solaris 10, it produced a '.log' file with two overly-long lines (more
+       than 1 million characters long!) and that was causing the test harness to
+       experience spurious failures, with Solaris XPG4 awk complaining that:
+
+        /usr/xpg4/bin/awk: line 0 (NR=734): Record too long (LIMIT: 19999 bytes)
+
+       A little consideration shows that the bug#7868 checked by the culprit
+       test cannot be solved "by accident", e.g., by another bug fix or some
+       simple refactoring, so there is little added value in keeping the xfailing
+       test for it, if this causes other problems (and we've seen it does).
+
+       So we just remove the test.  In case we ever manage to fix the bug in
+       mainline automake, we can copy over the similar test(s) from Automake-NG,
+       which has actually managed to fix the bug (and have simpler test cases
+       for it).
+
+       * t/parallel-tests-many.sh: Delete.
+       * t/list-of-tests.mk (XFAIL_TESTS, handwritten_TESTS): Remove it.
+
+2012-07-22  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       tests: better name for a couple of tests
+
+       * t/color.sh: Rename ...
+       * t/color-tests.sh: ... like this.
+       * t/color2.sh: Rename ...
+       * t/color-tests2.sh: ... like this.
+       * t/list-of-tests.mk: Adjust.
+
+2012-07-22  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       check: support colorized testsuite output by default
+
+       Fixes automake bug#11855.
+
+       With this change, we make the 'color-tests' option enabled by default.
+       That option remains still silently accepted as a no-op, for backward
+       compatibility.
+
+       The developer of a package is still free to disable testsuite coloring on
+       a per-makefile basis (by adding "AM_COLOR_TESTS = no" to the Makefile.am)
+       or on a whole-project basis (by AC_SUBST'ing AM_COLOR_TESTS to "no" in
+       configure.ac).  But now the user will be able to request the testsuite
+       output to be colorized, if he really wants to:
+
+           # With GNU make:
+           make AM_COLOR_TESTS=yes check
+           # With non-GNU make:
+           make AM_COLOR_TESTS=yes AM_MAKEFLAGS=AM_COLOR_TESTS=yes check
+
+       * NEWS: Update.
+       * doc/automake.texi: Updated, and some related minor reformatting
+       and rewording.
+       * automake.in (handle_tests): No need to pass the transform '%COLOR%'
+       when processing "check.am".
+       * lib/am/parallel-tests.am: Remove use of the '%?COLOR%' transform;
+       just act as if it were unconditionally TRUE.
+       * t/color.sh: No need to specify 'color-tests' in 'AUTOMAKE_OPTIONS'
+       nor in 'AM_INIT_AUTOMAKE'.
+       * t/ax/testsuite-summary-checks.sh: Likewise.
+       * t/ax/tap-summary-aux.sh: Likewise.
+       * t/color2.sh: Likewise.  Also, ensure that colorized testsuite output
+       can be disabled by default by calling "AC_SUBST([AM_COLOR_TESTS], [no])".
+       * t/tap-realtime.sh: Define 'AM_COLOR_TESTS' to "no" in Makefile.am, to
+       avoid spurious colorization of the output due to the use of the 'expect'
+       program.
+       * t/color-tests-opt.sh: New test, check that the 'color-tests' option is
+       still recognized as a no-op.
+       * t/list-of-tests.mk: Add the new test.
+
+2012-07-22  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       tags: unify recursion for tags targets with that of "usual" targets
+
+       This change has a side effect: now any failure of the 'tags', 'ctags',
+       'cscope' and 'cscopelist' targets in a subdirectory will cause the
+       recursive command issued from the top directory to fail.  We believe
+       that this behavioural change is not only justified by the simplification
+       this patch entails, but actually offers better semantics: ignoring
+       failures by default is never a good idea, and with make, the user can
+       anyway order the completion of commands in the face of possible failures
+       with the '-k' option.
+
+       * NEWS: Update.
+       * automake.in (%required_targets): Add keys 'cscopelist-am', 'tags-am'
+       and 'ctags-am'.
+       (handle_tags): Greatly simplified, the major part of the handling of
+       recursion for the 'tags', 'ctags' and 'cscopelist' now moved out to ...
+       * lib/am/tags.am: ... this file, that has been adjusted and extended
+       accordingly.
+       * t/maken3.sh: Remove testing of the 'TAGS' target, that is now just
+       an alias to 'tags'.  Without this change, this test would spuriously
+       fail.
+
+2012-07-21  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       typofix: in a comment in the automake script
+
+       * automake.in (process_file): Here.
+
+2012-07-17  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       news: minor fixlets and reordering
+
+2012-07-16  Jack Kelly  <jack@jackkelly.name>
+
+       elisp: --batch implies -q, remove -q
+
+       According to the emacs manual[1], --batch implies -q, so there's no
+       need to pass -q when compiling elisp.
+
+       * lib/am/lisp.am: Remove -q from $(EMACS) call.
+
+       [1]: http://gnu.org/s/emacs/manual/html_node/emacs/Initial-Options.html
+
+2012-07-16  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       Merge branch 'maint'
+
+       * maint:
+         fixup: delete "# serial" line in m4/amversion.in
+         news: update about recent ylwrap changes and fixes
+         m4: get rid of "# serial" lines
+         configure: ${#param} must be supported by the shell for the testsuite
+         yacc tests: fix a spurious failure with parallel make
+         ylwrap: use proper quoting inside a `...` substitution
+         ylwrap: don't uselessly reset the exit status in case of failure
+         ylwrap: fix C++ support for Bison
+         ylwrap: refactor: move loop invariant
+         ylwrap: refactoring: don't rely on the file order
+         tests: upgrade and fix Bison test case
+         tests: fix bison input file
+         ylwrap: comment changes
+         ylwrap: modernize idioms
+         ylwrap: rename header inclusion in generated parsers
+         ylwrap: simplify the list of renamings
+         ylwrap: refactor: less duplication
+
+2012-07-16  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       fixup: delete "# serial" line in m4/amversion.in
+
+       Otherwise, when m4/amversion.m4 is regenerated, it will contain a
+       serial line as well.
+
+2012-07-16  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       Merge branch 'yacc-work' into maint
+
+       * yacc-work:
+         news: update about recent ylwrap changes and fixes
+         yacc tests: fix a spurious failure with parallel make
+         ylwrap: use proper quoting inside a `...` substitution
+         ylwrap: don't uselessly reset the exit status in case of failure
+         ylwrap: fix C++ support for Bison
+         ylwrap: refactor: move loop invariant
+         ylwrap: refactoring: don't rely on the file order
+         tests: upgrade and fix Bison test case
+         tests: fix bison input file
+         ylwrap: comment changes
+         ylwrap: modernize idioms
+         ylwrap: rename header inclusion in generated parsers
+         ylwrap: simplify the list of renamings
+         ylwrap: refactor: less duplication
+
+2012-07-16  Akim Demaille  <akim@lrde.epita.fr>
+
+       news: update about recent ylwrap changes and fixes
+
+       * NEWS: In ylwrap, renamings are properly propagated, and unknown
+       files are preserved.
+
+2012-07-15  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       elisp: support elisp files in subdirectories properly
+
+       For more reference, see:
+       <http://lists.gnu.org/archive/html/automake/2009-10/msg00013.html>
+       <http://thread.gmane.org/gmane.comp.sysutils.automake.bugs/4772>
+
+       * lib/am/lisp.am (.el.elc): If the file being byte-compiled is in
+       a subdirectory, add that (both as a subdirectory of the builddir
+       and the srcdir) to the emacs load path.  While we are at it (and
+       for consistency), drop quoting of $(srcdir) and $(builddir), since
+       those variables are ensured (by configure-time checks) not to
+       contain white space nor shell metacharacters.
+       * t/list-of-tests.mk (XFAIL_TESTS): Add 't/lisp-subdir.sh' and
+       't/lisp-subdir2.sh', since they now passes.
+
+2012-07-15  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       elisp: simplify suffix rules using emacs '-L' option
+
+       * lib/am/lisp.am (.el.elc): Use '-L dir' instead of calling '--eval' to
+       explicitly append to the 'load-path' variable.
+
+2012-07-15  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       elisp: no need to "absolutize" $(srcdir) and $(builddir) ...
+
+       * lib/am/lisp.am (.el.elc): ... here: we don't chdir around anyway,
+       nor move or copy around our source '.el' files.  Update comments,
+       and re-wrap them while we are at it.
+
+2012-07-14  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       elisp: prefer $(builddir) files over $(srcdir) ones
+
+       * lib/am/lisp.am (.el.elc): Here.  This better respects VPATH spirit.
+       Adjust and extends comments.
+       * t/list-of-tests.mk (XFAIL_TESTS): Remove 't/lisp-loadpath.sh', which
+       now passes.
+
+2012-07-14  Jack Kelly  <jack@jackkelly.name>
+
+       elisp: use suffix rules, get rid of 'elisp-comp' script (mostly a rewrite)
+
+       Motivated by automake bug#11806.
+
+       Traditionally, automake byte-compiled emacs-lisp '.el' files by invoking
+       'elisp-comp' on all of them in a bulk; this involved complex timestamping
+       and file-locking logic.  It was also brittle in any slightly-unusual
+       setup, because 'elisp-comp' operated by copying all of the elisp files
+       to be compiled into a temporary sub-directory and compiling them in there,
+       the copying the resulting byte-compile files back in the build directory.
+
+       This patch removes all of that juggling and chicanery in favour of
+       defining a much simpler '.el.elc' suffix rule.  Not only this is simpler,
+       but it also interacts better with "make -jN" calls, which are becoming
+       more and more common and useful on today's increasingly multicore systems.
+
+       * Makefile.am (dist_script_DATA): Remove 'elisp-comp'.
+       * automake.in (@common_files): Likewise.
+       (handle_emacs_lisp): Do not require 'elisp-comp'.
+       * doc/automake.texi: Remove references to 'elisp-comp'.
+       * lib/am/lisp.am: Define elisp compilation via a suffix rule; this
+       basically amounts to a complete re-write of the lisp byte-compilation
+       rules.
+       * lib/elisp-comp: Remove.
+       * t/add-missing.tap: Remove elisp-comp test.
+       * t/dist-auxdir-many-subdirs.sh: Remove reference to elisp-comp.
+       * t/primary-prefix-invalid-couples.tap: Likewise.
+       * t/primary-prefix-valid-couples.sh: Likewise.
+       * t/lisp4.sh: Remove reference to elc-stamp.
+       * t/lisp5.sh: Likewise.
+       * t/lisp6.sh: Likewise.
+       * t/lisp3.sh: Likewise.  Also remove the recompilation check that
+       involves a (message) call.
+       * t/lisp7.sh: Remove check for "Warnings can be ignored".  Remove
+       reference to elc-stamp.
+       * t/lisp8.sh: Likewise.
+       * t/lispdry.sh: Remove references to elc-stamp.
+
+       Acked-by: Stefano Lattarini <stefano.lattarini@gmail.com>
+
+2012-07-14  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       coverage: elisp path contains $(srcdir) and $(builddir)
+
+       * t/lisp-loadpath.sh: Check that.  Also check that, in true VPATH
+       spirit, elisp files in the build directory are preferred to those
+       in the source directory.  This test currently fails.
+       * t/list-of-tests.mk (handwritten_TESTS): Add the new test.
+       (XFAIL_TESTS): Likewise.
+
+2012-07-14  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       coverage: emacs lisp files in subdirectories
+
+       * t/lisp-subdir.sh, t/lisp-subdir2.sh: New tests, still failing.
+       * t/list-of-files.mk (handwritten_TESTS, XFAIL_TESTS): Add them.
+
+2012-07-14  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       m4: get rid of "# serial" lines
+
+       The "#serial" lines are only considered by aclocal for the system-wide
+       third-party '.m4' files, not for the Automake-provided ones.  So they
+       serve no real purpose in the Automake '.m4' files.
+
+       In addition, now that we use git and topic branches, and that we are also
+       writing the Automake-NG fork, the "#serial" lines are becoming more and
+       more unreliable (e.g., different version of the same file in different
+       branches can easily end up having the same serial numbers).
+
+       So let's just nuke all the "#serial" lines.  See also automake bug#11932.
+
+       * m4/*.m4: All "# serial" lines removed.
+
+2012-07-14  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       configure: ${#param} must be supported by the shell for the testsuite
+
+       This will be required at least by the Automake-NG branch.
+
+       * configure.ac: Require the $AM_TEST_RUNNER_SHELL supports ${#param} as
+       a way to obtain the length of the expansion of the variable $param.
+
+2012-07-14  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       yacc tests: fix a spurious failure with parallel make
+
+       * t/yacc-bison-skeleton.sh (Makefile.am): Add 'zardoz.h'
+       to BUILT_SOURCES.
+
+2012-07-14  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       ylwrap: use proper quoting inside a `...` substitution
+
+       * lib/ylwrap ($target): Here, when redefining this to a temporary file.
+
+2012-07-14  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       ylwrap: don't uselessly reset the exit status in case of failure
+
+       * lib/ylwrap: Here.  In case of a failure in the wrapped yacc/lex
+       invocation, '$ret' (holding the final exit status of ylwrap) was
+       being uselessly reset to '1' in the later if/else.
+
+2012-07-14  Akim Demaille  <akim@lrde.epita.fr>
+
+       ylwrap: fix C++ support for Bison
+
+       Fixes automake bug#7648.
+
+       The current logic of ylwrap is to call yacc in a sub directory, and
+       pull out of it all the files that were requested on its command line.
+       Reverse this approach: export *all* the files created in the
+       subdirectory, but rename them according to what the command says.
+       This way, extra files, such as position.hh, location.hh and stack.hh
+       for C++ parsers, but also parser.xml or parser.dot if XML or Dot
+       output is enabled, will be preserved.
+
+       * lib/ylwrap (pairlist): Remove.
+       (main loop): Don't loop over pairlist, but over the files in the
+       temporary directory.
+       * t/list-of-tests.mk (XFAIL_TESTS): Fixes t/yacc-bison-skeleton-cxx.sh.
+       * THANKS (James Bostock): Add, he reported bug#7648.
+
+2012-07-14  Akim Demaille  <akim@lrde.epita.fr>
+
+       ylwrap: refactor: move loop invariant
+
+       * lib/ylwrap (input_rx): Move its definition next to its sibling's,
+       outside of the main loop.
+
+2012-07-14  Akim Demaille  <akim@lrde.epita.fr>
+
+       ylwrap: refactoring: don't rely on the file order
+
+       Forthcoming changes will make us iterate over the files in a different
+       order.
+
+       lib/ylwrap (first): Remove, replaced by...
+       (parser): this.
+
+2012-07-14  Akim Demaille  <akim@lrde.epita.fr>
+
+       tests: upgrade and fix Bison test case
+
+       * t/yacc-bison-skeleton-cxx.sh: Request locations, to be
+       even more stressful.
+       Use %union to make sure the %{...%} is inserted where appropriate.
+       Fix some indentation/coding style issues.
+
+2012-07-14  Akim Demaille  <akim@lrde.epita.fr>
+
+       tests: fix bison input file
+
+       Do not provide implementations in the %{...%} section, especially if the
+       header is included elsewhere, since then the linker will complain about
+       multiple definitions.
+
+       Reported by Stefano Lattarini,
+       <http://lists.gnu.org/archive/html/automake-patches/2012-07/msg00126.html>.
+
+       * t/yacc-bison-skeleton.sh (zardoz.y): Define yylex and yyerror in the
+       epilogue.
+
+2012-07-14  Akim Demaille  <akim@lrde.epita.fr>
+
+       ylwrap: comment changes
+
+       * lib/ylwrap: Improve some comments.
+
+2012-07-14  Akim Demaille  <akim@lrde.epita.fr>
+
+       ylwrap: modernize idioms
+
+       * lib/ylwrap: Prefer printf to echo when special characters may
+       occur.
+       Replace the historical ',' sed separator with '|'.
+
+2012-07-14  Akim Demaille  <akim@lrde.epita.fr>
+
+       ylwrap: rename header inclusion in generated parsers
+
+       Some types of Bison parsers, such as the GLR ones, generate a header
+       file that they include.  ylwrap, which renames the generated files,
+       does not rename the included file.  Fix this shortcoming, reported
+       for instance here:
+       <http://lists.gnu.org/archive/html/bug-bison/2012-06/msg00033.html>.
+       Fixes t/yacc-bison-skeleton.sh, see Automake bug#7648 and PR automake/491.
+
+       * lib/ylwrap (quote_for_sed): Accept arguments.
+       Catch more special characters.
+       (rename_sed): New.
+       Improve the previous renaming sed commands using quote_for_sed.
+       Suggested by Stefano Lattarini here:
+       <http://lists.gnu.org/archive/html/automake-patches/2012-07/msg00095.html>.
+       (main loop): Use rename_sed to rename the dependencies to other files.
+       * t/yacc-d-basic.sh: Exercise this case, even if bison/yacc was
+       not issuing such an include.
+       * t/list-of-tests.mk (XFAIL_TESTS): Adjust.
+
+2012-07-14  Akim Demaille  <akim@lrde.epita.fr>
+
+       ylwrap: simplify the list of renamings
+
+       * lib/ylwrap (pairwise): Instead of being a straightforward copy from
+       the command line arguments, and having to deal with y.tab vs. y_tab
+       later, let pairwise store the real file names to process, y_tab
+       conversion included when needed.
+       (main loop): Use $to instead of $2, for symmetry with $from.
+
+2012-07-14  Akim Demaille  <akim@lrde.epita.fr>
+
+       ylwrap: refactor: less duplication
+
+       * lib/ylwrap (guard): New function.
+       Move functions before actual code.
+
+2012-07-13  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       Merge branch 'maint'
+
+       * maint:
+         news: mention fixed testsuite weaknesses
+         news: bump, for future 1.12.3
+         tests: verify the shell test scripts are syntactically valid
+         tests: don't use C instead of C++ compiler on case-insensitive platforms
+         tests: avoid spurious TAP errors on Mac OS X 10.7
+         tests: fix spurious failure in aclocal7.sh on fast machines
+
+2012-07-13  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       news: mention fixed testsuite weaknesses
+
+2012-07-13  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       news: bump, for future 1.12.3
+
+2012-07-13  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       Merge branches 'fix-pr11898' and 'fix-pr-11893-and-10766' into maint
+
+       * fix-pr11898:
+         tests: verify the shell test scripts are syntactically valid
+
+       * fix-pr-11893-and-10766:
+         tests: don't use C instead of C++ compiler on case-insensitive platforms
+
+2012-07-13  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       tests: verify the shell test scripts are syntactically valid
+
+       Fixes automake bug#11898.
+
+       This measure of extra safety is mostly motivated by the fact that some
+       shells (at least some versions of Bash in the 3.x release series, one
+       of which serves as /bin/sh on Mac OS X 10.7, as well as Bash 4.0 and the
+       /usr/xpg4/bin/sh shell from Solaris 10) erroneously exit with exit status
+       0 upon encountering a syntax error, if an exit trap is sett (as it is in
+       our test scripts).
+
+       * Makefile.am (check-tests-syntax): New, check that the shell test
+       scripts listed in $(TESTS) are syntactically correct.
+       (.PHONY, check-local): Depend on it.
+       * t/self-check-exit.tap : Remove checks verifying that a script exits
+       with non-zero status upon encountering a syntax error; as explained
+       above, we can't depend on that.
+
+2012-07-12  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       depcomp: style changes to Portland Group Compilers support
+
+       * lib/depcomp (pgcc): Quote 'like this', not `like this'.  Other minor
+       quoting improvements.  Remove a commented-out command.  In comments,
+       use proper capitalization and punctuation.  Make a more consistent use
+       of whitespace.  Make fatal error messages more nicely formatted, and
+       send them to standard error rather than to standard output.
+
+2012-07-12  Dave Goodell  <goodell@mcs.anl.gov>
+           Jeff A. Daily  <jeff.daily@pnnl.gov>
+
+       depcomp: initial support for Portland Group Compilers
+
+       * lib/depcomp: Here.  See automake bug#8880.
+
+       Acked-by: Stefano Lattarini <stefano.lattarini@gmail.com>
+
+2012-07-12  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       tests: don't use C instead of C++ compiler on case-insensitive platforms
+
+       This change fixes automake bug#11893 and bug#10766.
+
+       On at least Cygwin and Mac OS X 10.7, the file system where the system
+       compilers are located can be case-insensitive, so that looking for a
+       program named 'CC' might actually find the C compiler in /usr/bin/cc.
+
+       Now, the Automake configure script looks for a C++ compiler named 'CC'
+       before looking for more obvious names like c++ or g++ (that is done to
+       increase testsuite "coverage in the wild", e.g., preferring, on Solaris,
+       the Sun Studio C++ compiler /usr/bin/CC over the GNU C++ compiler).
+
+       Since the checks done in AC_PROG_CXX are apparently not strict enough
+       to rule out C compilers like those from GCC or Clang (which are smart
+       enough to recognize if a file has a C++ extension, passing it to the
+       C++ front end) the testsuite might end up using a C compiler where a
+       C++ one is expected, with some subtle bad consequences.
+
+       * configure.ac: Don't look for a C++ compiler named 'CC' if the
+       "top-level" file system(s) (where /bin and /usr/bin are) are detected
+       to be case-insensitive.
+
+       Reported-by: Peter Rosin <peda@lysator.liu.se>
+       Reported-by: Max Horn <max@quendi.de>
+       Helped-by: Eric Blake <eblake@redhat.com>
+
+2012-07-10  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       tests: avoid spurious TAP errors on Mac OS X 10.7
+
+       Fixes automake bug#1897.  Reported by Max Horn.
+
+       * t/suffix8.tap: The libtool bug#11895 was causing the ./configure script
+       to output a stray "ok" string on a line of its own, confusing the TAP
+       driver into thinking this was an extra test result (which resulted in the
+       next, real test results being flagged as "OUT-OF-ORDER").  Fix this by
+       protecting configure output.
+       * t/suffix10.tap: Likewise, and for the "make distcheck" output as well.
+       * THANKS: Update.
+
+2012-07-10  Adam Sampson  <ats@offog.org>  (tiny change)
+
+       tests: fix spurious failure in aclocal7.sh on fast machines
+
+       Fixes automake bug#11896.  Issue introduced in commit v1.12.1-46-g13dd512.
+
+       * t/aclocal7.sh: Since aclocal rewrites aclocal.m4 unless the input files
+       are all older than the existing aclocal.m4, so we must sleep to ensure
+       somedefs.m4 has an older timestamp than the aclocal.m4 the next aclocal
+       call will generate.
+
+2012-07-09  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       Merge branch 'maint' (with fix for CVE-2012-3386)
+
+       This makes the fix for a locally-exploitable security vulnerability
+       (CVE-2012-3386) available to the Automake master branch.
+
+       * maint:
+         sync: update files from upstream with "make fetch"
+         news: improve wording in entry about CVE-2012-3386
+         maint: post-release minor version bump
+         release: stable release 1.12.2
+         distcheck: never make part of $(distdir) world-writable
+         compat: automake should substitute @mkdir_p@, for backward compatibility
+         fixup: t/README: it's ./runtest, not ./t/ax/runtest
+
+2012-07-09  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       sync: update files from upstream with "make fetch"
+
+       * lib/config.guess, lib/gitlog-to-changelog, lib/texinfo.tex: Update.
+
+2012-07-09  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       news: improve wording in entry about CVE-2012-3386
+
+2012-07-09  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       maint: post-release minor version bump
+
+       * configure.ac (AC_INIT): Bump version number to 1.12.2a.
+       * m4/amversion.m4: Likewise (automatically regenerated by
+       "make bootstrap").
+
+2012-07-09  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       release: stable release 1.12.2
+
+       * configure.ac (AC_INIT): Bump version number to 1.12.2.
+       * m4/amversion.m4: Likewise (auto-updated by "./bootstrap").
+
+2012-07-09  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       Merge branch 'distcheck-vulnerability-CVE-2012-3386' into maint
+
+       * distcheck-vulnerability-CVE-2012-3386:
+         distcheck: never make part of $(distdir) world-writable
+
+2012-07-09  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       distcheck: never make part of $(distdir) world-writable
+
+       This fixes a locally-exploitable security vulnerability (CVE-2012-3386).
+
+       In the 'distcheck' rule, we used to make the just-extracted (from
+       the distribution tarball) $(distdir) directory and all its files and
+       subdirectories read-only; then, in order to create the '_inst' and
+       '_build' subdirectories in there (used by the rest of the recipe) we
+       made the top-level $(distdir) *world-writable* for an instant (the
+       time to create those two directories) before making it read-only
+       again.
+
+       Making that directory world-writable (albeit only briefly) introduced a
+       locally exploitable race condition for those who run "make distcheck" with
+       a non-restrictive umask (e.g., 022) in a directory that is accessible by
+       others.  A successful exploit would result in arbitrary code execution
+       with the privileges of the user running "make distcheck" -- game over.
+       Jim Meyering wrote a proof-of-concept script showing that such exploit is
+       easily implemented.
+
+       This issue is similar to the CVE-2009-4029 vulnerability:
+       <http://lists.gnu.org/archive/html/automake/2009-12/msg00012.html>
+
+       * lib/am/distdir.am (distcheck): Don't make $(distdir) world-writable,
+       not even for an instant; make it user-writable instead, which is enough.
+
+       Helped-By: Jim Meyering <jim@meyering.net>
+
+2012-07-09  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       compat: automake should substitute @mkdir_p@, for backward compatibility
+
+       That has been unwittingly broken by commit v1.12-19-g7a1eb9f of 2012-04-28,
+       "AM_PROG_MKDIR_P: deprecate, to be removed in Automake 1.13". We thought it
+       wasn't a big deal, but Jim Meyering reported that @mkdir_p@ is used in
+       gettext's Makefile.in.in template:
+       <http://lists.gnu.org/archive/html/automake/2012-07/msg00014.html>
+
+       * lib/am/header-vars.am (mkdir_p): Don't define.
+       * m4/init.m4 (AM_INIT_AUTOMAKE): AC_SUBST 'mkdir_p' with $(MKDIR_P).
+       * t/mkdir_p.sh, t/mkdirp-deprecation.sh: Enhance.
+       * NEWS: Update.
+
+2012-07-08  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       fixup: t/README: it's ./runtest, not ./t/ax/runtest
+
+       * t/README (Supported shells): Here. And remove an extra empty line.
+
+2012-07-07  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       Merge branch 'maint'
+
+       * maint:
+         tests: move 'runtest' into the top-level directory
+
+2012-07-07  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       tests: move 'runtest' into the top-level directory
+
+       Move our wrapper script 'runtest' (meant to allow the execution of
+       Automake test cases from the command line) from the 't/ax/' directory
+       to the top-level one.  This makes the script easier to find and to
+       invoke.  Much more importantly, our DejaGNU-checking test cases won't
+       try anymore to use that script instead of the 'runtest' program provided
+       by DejaGNU (that happened because '$(srcdir)/t/ax/' is automatically
+       added early to the $PATH variable in our test cases), which was causing
+       spurious SKIPs.
+
+       * t/ax/runtest.in: Move ...
+       * runtest.in: ... here.
+       * Makefile.am, t/README, .gitignore: Adjust.
+
+2012-07-07  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       Merge branch 'maint'
+
+       * maint:
+         cosmetics: rename t/ax/test-runner => t/ax/runtest
+         fixup: another "make recheck" failure with BSD make
+         test runner: work correctly in VPATH setups
+         compat: automake should define $(mkdir_p), for backward compatibility
+         coverage: test that AM_PROG_MKDIR_P and $(mkdir_p) still works
+         tests init: don't automatically re-execute tests with a POSIX shell
+         yacc tests: fix spurious failure with parallel make
+         tests: ignore minor 'recheck' regression for BSD make
+         tests: don't clutter the top-level dir with temporary test directories
+         tests: avoid spurious failures when @MKDIR_P@ points to "install-sh -d"
+         lisp: better support of VPATH builds
+         news: fixlets and updates
+
+       + Extra non-trivial edits:
+
+       * NEWS: State that $(mkdir_p) is still provided as an alias to
+       $(MKDIR_P), for (partial) backward-compatibility.
+
+2012-07-06  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       cosmetics: rename t/ax/test-runner => t/ax/runtest
+
+       The latter is shorter and clearer.  Better to do the rename early,
+       before other developers or contributors begin to get used to the
+       'test-runner' name.
+
+       * t/ax/test-runner.in: Rename ...
+       * t/ax/runtest.in: ... like this.
+       * Makefile.am, t/README, .gitignore: Adjust.
+
+2012-07-06  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       fixup: another "make recheck" failure with BSD make
+
+       * t/parallel-tests-log-override-recheck.sh: Here, add a proper $sleep
+       before calling "make recheck".  This should ideally have been done
+       in the earlier commit 'v1.12.1-100-g19d84bc', but it somehow slipped
+       through the cracks.
+       * t/test-metadata-recheck.sh: Likewise.
+
+2012-07-06  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       test runner: work correctly in VPATH setups
+
+       Due to a "feature" of AC_CONFIG_FILES, because 't/ax/test-runner.in'
+       is in a subdirectory, the '@srcdir@' value that is AC_SUBST'd in it
+       gets tweaked to contain as much '..' components as are the directory
+       components of 't/ax/test-runner'.  Because our build system operates
+       in a non-recursive setup, this substitution is wrong; for example,
+       the final 't/ax/test-runner' build in a VPATH builds where the source
+       directory is ".." contains the line:
+
+           : ${srcdir='../../../t/ax'}
+
+       instead of the expected (and correct):
+
+           : ${srcdir='../t/ax'}
+
+       We solve the issue by building 't/ax/test-runner' with a Makefile
+       recipe instead of config.status substitutions; this is already done
+       for other testsuite-related files, like 'defs-static'.
+
+       * configure.ac (AC_CONFIG_FILES): Don't build 't/ax/test-runner'
+       anymore.
+       * Makefile.am (t/ax/test-runner): New rule.
+       (EXTRA_DIST): Add 't/ax/test-runner.in'.
+       (CLEANFILES, noinst_SCRIPTS): Add 't/ax/test-runner'.
+
+2012-07-06  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       Merge branch 'fix-pr11806' into maint
+
+       * fix-pr11806:
+         lisp: better support of VPATH builds
+
+2012-07-06  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       tests init: don't automatically re-execute tests with a POSIX shell
+
+       I've unwittingly broken support for that feature *again* in some of
+       my recent testsuite tweaking.  In this case, the re-execution code
+       works correctly when the tests are executed with a POSIX shells, but
+       breaks when they are invoked by an old-style Bourne shells (e.g.,
+       /bin/sh on Solaris).
+
+       It's time to face it: that feature is too much brittle, and too seldom
+       used (because the Makefile takes care of running the tests with the
+       correct shell anyway, so that a breakage is only experienced when
+       running the tests by hand).  It just don't remain working for long, not
+       when we often touch the testsuite setup (which we are going to do again
+       when we'll try to move part of our testsuite framework to Gnulib, or a
+       similar project).
+
+       So, instead of trying to be extra-smart and automatically re-execute the
+       tests with the correct shell, we now offer a simple wrapper script that
+       the user can employ to run the test scripts with the proper shell.  And
+       while we are at it, we write this wrapper to also deal with TAP tests in
+       a better way, running them through the prove(1) utility, so that their
+       results are correctly recognized and reported.
+
+       * t/ax/test-runner.in: New file; the wrapper script we were talking about.
+       * configure.ac (AC_CONFIG_FILES): Process it into 't/ax/test-runner'.
+       * .gitignore: Add 't/ax/test-runner'.
+       * defs: Remove code for automatic re-execution of the scripts with the
+       correct shell.  This file now just a very thin layer around 'defs-static'
+       and 't/ax/test-init.sh'.
+       * t/README: Adjust, and remove or fix some imprecise or outdated text in
+       the process (like "... test scripts are written with portability in mind,
+       so that they should run with any decent Bourne-compatible shell ..." ).
+       * Makefile.am (AM_TESTS_ENVIRONMENT): No need to export 'AM_TESTS_REEXEC'
+       to "no" anymore.
+       * t/self-check-explicit-skips.sh: Likewise.
+       * t/self-check-exit.tap: Likewise.
+       * t/self-check-me.tap: Likewise.
+       * t/self-check-dir.tap: Likewise.
+       * t/self-check-reexec.tap: Remove as obsolete.
+       * t/list-of-tests.mk: Adjust.
+
+2012-07-06  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       yacc tests: fix spurious failure with parallel make
+
+       * t/yacc-deleted-headers.sh: Here, by adding a missing dependency
+       in the Makefile.am.  Revealed by a failure with Sun Distributed make
+       run on Solaris 10 in parallel mode.
+
+2012-07-06  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       tests: ignore minor 'recheck' regression for BSD make
+
+       It turns out that, with NetBSD 5.1 make and FreeBSD 9 make, running
+       "make recheck" two times in a row quickly fails to correctly re-run
+       the failed tests in the second run.
+
+       That issue has been introduced likely introduced in commit
+       'v1.12.1-95-gd5443e4' of 20102-07-01, "parallel-tests: reimplement
+       fix for bug#11791".
+
+       Anyway, the use case that has been broken is not realistic (who is
+       going to run "make recheck" two times in one second, without modifying
+       any of the tests or the tested programs in the meantime?), so we believe
+       the best fix is to simply work around the issue in the affected test
+       cases, rather than risking to slow down or uglify the 'recheck' rule.
+
+       * t/parallel-tests9.sh: Enhance a little.
+       * t/tap-recheck.sh: Adjust adding proper '$sleep' calls were required.
+       * t/parallel-tests-log-override-recheck.sh: Likewise.
+       * t/test-driver-custom-multitest-recheck.sh: Likewise.
+       * t/test-driver-custom-multitest-recheck2.sh: Likewise.
+
+2012-07-06  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       tests: don't clutter the top-level dir with temporary test directories
+
+       * t/self-check-me.tap: Be sure to initialize '$am_create_testdir' to "no"
+       in all the shell invocations sourcing './defs'.  Otherwise, when running
+       the testsuite with 'keep_testdirs=yes', the following temporary director
+       are left cluttering the top-level directory:
+
+         ./012.dir
+         ./abc..dir
+         ./a.b.c.dir
+         ./foo.dir
+         ./foo.bar.dir
+         ./foo-bar-.dir
+         ./_foo__bar.dir
+
+2012-07-06  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       tests: avoid spurious failures when @MKDIR_P@ points to "install-sh -d"
+
+       * t/self-check-cleanup.tap: Several checks in this test were failing on
+       NetBSD 5.1.  That happened because on that system, '@MKDIR_P@' expands to
+       an "install-sh -d" invocation that references the $(builddir), and the
+       code trying to duplicate some of the Automake testsuite infrastructure
+       in the test subdirectory of this self test wasn't smart enough to cater
+       to that situation.  Granted, we could tweak the test case once more to
+       fix this Yet Another Spurious Failure, but at this point it has become
+       clear that the extra coverage offered by this test is not worth all the
+       hassle.  Just remove the test.  Since the testsuite is regularly run on
+       several systems and with different setups, most issues with the testsuite
+       framework will reveal themselves anyway; no actual need to unit-test them
+       in our testsuite, if that's too tricky.
+       * t/list-of-tests.mk: Adjust.
+
+2012-07-06  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       compat: automake should define $(mkdir_p), for backward compatibility
+
+       That has been unwittingly broken by commit 'v1.12-19-g7a1eb9f'
+       of 2012-04-28, "AM_PROG_MKDIR_P: deprecate, to be removed in
+       Automake 1.13".
+
+       Report from Benoit Sigoure and Diego Elio Pattenò:
+       <http://lists.gnu.org/archive/html/automake/2012-07/msg00001.html>
+
+       * lib/am/header-vars.am (mkdir_p): Define as an alias for $(MKDIR_P).
+       * t/list-of-tests.mk (XFAIL_TESTS): Remove 't/mkdir_p.sh'.
+       * NEWS: Update.
+
+2012-07-06  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       coverage: test that AM_PROG_MKDIR_P and $(mkdir_p) still works
+
+       They are deprecated, but should continue to work in the 1.12.x
+       release series.  Report from Benoit Sigoure and Diego Elio Pattenò:
+       <http://lists.gnu.org/archive/html/automake/2012-07/msg00001.html>
+
+       * t/mkdirp-deprecation.sh: Enhance.
+       * t/mkdir_p.sh: New test, check that AM_INIT_AUTOMAKE still defines
+       the $(mkdir_p) make variable.  Currently xfailing.
+       * t/list-of-tests.mk (handwritten_TESTS, XFAIL_TESTS): Add the new
+       test.
+
+2012-07-06  Jack Kelly  <jack@jackkelly.name>  (tiny change)
+           Stefano Lattarini  <stefano.lattarini@gnu.org>
+
+       lisp: better support of VPATH builds
+
+       Fixes automake bug#11806.
+
+       * lib/am/lisp.am: Pass the value of '$(abs_srcdir)' to the
+       elisp-compile script in the environment.
+       * lib/elisp-comp: Add the vale of '$abs_srcdir' to the emacs
+       load-path.
+       * t/lisp-pr11806.sh: New test.
+       * t/list-of-tests.mk: Add it.
+
+       Reported-by: Makoto Fujiwara <makoto@ki.nu>
+
+2012-07-03  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       tests: make 't/aclocal-macrodir.tap' executable
+
+2012-07-03  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       maintcheck: fix spurious failure in 'maintainer-check-list-of-tests'
+
+       * Makefile.am (test_subdirs): Add 'contrib/t', otherwise we would get a
+       spurious error like:
+
+         List of tests in Makefile an on filesystem differ
+         + diff -u in-makefile on-filesystem
+         --- tests-in-makefile-list.tmp    2012-07-03 23:07:47.000000000 +0200
+         +++ tests-on-filesystem-list.tmp  2012-07-03 23:07:47.000000000 +0200
+         @@ -1,7 +1,3 @@
+         -contrib/t/help-multilib.sh
+         -contrib/t/multilib.sh
+         -contrib/t/parallel-tests-html-recursive.sh
+         -contrib/t/parallel-tests-html.sh
+          t/ac-output-old.tap
+          t/acloca10.sh
+          t/acloca11.sh
+         make: *** [maintainer-check-list-of-tests] Error 1
+
+2012-07-03  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       build: fix cleaning of test directories in contrib (and in t/perf)
+
+       * Makefile.am (clean-local-check): Update recipe to cater to the fact
+       that some tests using a temporary directory have been placed in other
+       directories that the 't/' directory (for the moment, at least 't/perf'
+       and 'contrib/t').
+
+2012-07-03  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       Merge branch 'aclocal-trace-macrodir'
+
+       * aclocal-trace-macrodir:
+         aclocal: deprecate ACLOCAL_AMFLAGS, trace AC_CONFIG_MACRO_DIR instead
+
+2012-07-03  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       aclocal: deprecate ACLOCAL_AMFLAGS, trace AC_CONFIG_MACRO_DIR instead
+
+       Maintaining ACLOCAL_AMFLAGS in the Makefile.am to pass extra flags
+       to aclocal is (and have always been) quite of an hack.  For example,
+       autoreconf is forced to grep Makefile.am to honour those flags.  But
+       this is a bad obsolescent behaviour; in fact, the autotools have moved
+       consistently in the past years from custom grepping of Makefile.am and
+       configure.ac to tracing of m4 macro calls, which is more consistent,
+       more reliable and more flexible.
+
+       And when autoreconf is not used, the developer is forced to add *by hand*
+       the flags specified by ACLOCAL_AMFLAGS to the aclocal calls not triggered
+       by make rebuild rules; here lie again more duplication and more chances
+       for errors.
+
+       Moreover, ACLOCAL_AMFLAGS has only two typical use cases:
+
+         - to instruct aclocal to look for extra macro definition in a local
+           directory (as with "ACLOCAL_AMFLAGS = -I m4"); and
+
+         - to further instruct aclocal to copy in that local directory the
+           required third-party .m4 files found in the system-wide directory
+           (as with "ACLOCAL_AMFLAGS = -I m4 --install").
+
+       The first use case can be better covered if aclocal can instead trace and
+       honours call to the AC_CONFIG_MACRO_DIR autoconf macro; and the second
+       use case shouldn't be considered really legitimate, as it is quite (and
+       subtly) brittle (see automake bug#9037).
+
+       Thus we now make aclocal trace AC_CONFIG_MACRO_DIR macro, and act
+       accordingly.  For backward compatibility, we continue to support the
+       ACLOCAL_AMFLAGS special variable (although removing any mention of it
+       from the documentation).  Future Automake releases will likely start
+       to warn about the use of that variable, and eventually remove support
+       for it altogether.
+
+       From a suggestion by Eric Blake.
+
+       This is a much simplified (and IMHO saner) version of the patch series
+       discussed in the threads:
+       <http://lists.gnu.org/archive/html/automake-patches/2010-10/msg00045.html>
+       <http://lists.gnu.org/archive/html/automake-patches/2010-12/msg00156.html>
+
+       * aclocal.in ($ac_config_macro_dir): New global variable.
+       (trace_used_macros): Also trace the macro 'AC_CONFIG_MACRO_DIR',
+       and set the '$ac_config_macro_dir' variable accordingly.
+       (parse_arguments): Code for diagnosis of '--install' used without
+       any user-specified include directory moved  ...
+       (while (1)): .. into the main loop.  Which now also updates the
+       list of user-specified include directories to include the directory
+       given as argument to the call (if any) of 'AC_CONFIG_MACRO_DIR'.
+       * lib/am/configure.am: Update comments.
+       * NEWS: Updated.
+       * doc/automake.texi: Likewise.  Also, stop advising the use of the
+       '--install' in ACLOCAL_AMFLAGS (see automake bug#9037 for a rationale),
+       and remove any reference to ACLOCAL_AMFLAGS (which is now considered
+       obsolescent).
+       * t/aclocal-path-install.sh: Adjust grepping check in the aclocal
+       error messages.
+       * t/subpkg.sh: Updated: add 'AC_CONFIG_MACRO_DIR' call to configure.ac,
+       remove setting of 'ACLOCAL_AMFLAGS' in Makefile.am and use of aclocal
+       command line arguments.
+       * t/subpkg2.sh: Likewise.
+       * t/subdir8.sh: Likewise.
+       * t/remake10c.sh: Likewise.
+       * t/remake8a.sh: Likewise.
+       * t/remake8b.sh: Likewise.
+       * t/aclocal4.sh: Likewise.
+       * t/aclocal6.sh: Likewise.
+       * t/acloca14.sh: Likewise.
+       * t/acloca22.sh: Likewise.
+       * t/aclocal5.sh: Likewise, and do not not invade the Automake
+       namespace (this avoids spurious failures).
+       * t/acloca14b.sh: New test, identical to the previous version of
+       'acloca14.test'; it is kept to verify backwards compatibility with
+       the use of ACLOCAL_AMFLAGS.
+       * t/acloca22b.sh: Likewise (but for 'acloca22.test').
+       * t/aclocal-amflags.sh: New test, check for backwards
+       compatibility that ACLOCAL_AMFLAGS still works.
+       * t/remake-macrodir.sh: New test, checking that aclocal's honoring of
+       AC_CONFIG_MACRO_DIR interacts nicely with automatic rebuild rules.
+       * t/list-of-tests.mk: Add the new tests.
+
+2012-07-03  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       news: fixlets and updates
+
+       * NEWS: Here.  In particular, report the change in 'missing'
+       semantics.
+
+2012-07-02  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       contrib: check-html: pass flags to rst2html invocations
+
+       Related to automake bug#11287.
+
+       * contrib/t/check-html.am (.log.html): Here, passing $(AM_RST2HTMLFLAGS)
+       and $(RST2HTMLFLAGS) (in that order).
+
+2012-07-02  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       contrib: simple improvements to check-html
+
+       Related to automake bug#11287.
+
+       * contrib/t/check-html.am (.log.html): Do not look for $RST2HTML in
+       the environment, looking for $(RST2HTML) should be enough (also, the
+       pre-existing code was broken, because it single-quoted $RST2HTML).
+       Fix the loop-and-search implementation to be more similar to the
+       one in 'contrib/t/parallel-tests-html.sh'.  Prefer 'mv -f' over bare
+       'mv'.  Do not break the recipe in
+
+2012-07-02  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       coverage: check-html can be used recursively
+
+       Addresses the main part of Automake bug#11287.
+
+       * contrib/t/parallel-tests-html-recursive.sh: New test.
+       * contrib/t/local.am: Add it.
+
+2012-07-02  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       tests: tests for stuff in contrib goes in 'contrib/t'
+
+       * t/help-multilib.sh: Move ...
+       * contrib/t/help-multilib.sh: .. here. Remove a now-obsolete
+       "FIXME" comment.
+       * t/multlib.sh: Move ...
+       * contrib/t/multilib.sh: .. here.  Remove a now-obsolete
+       "FIXME" comment.
+       * t/parallel-test2.sh: Move ...
+       * contrib/t/parallel-tests-html.sh: .. here.  Remove a
+       now-obsolete "FIXME" comment.
+       * contrib/t/local.am: New, basically defining the list of
+       tests for stuff in 'contrib/'.
+       * t/list-of-tests.mk, Makefile.am: Adjust.
+       * .gitignore: Update.
+       * syntax-checks.mk (xtests): Likewise.
+
+2012-07-02  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       Merge branch 'user-recursive-targets'
+
+       * user-recursive-targets:
+         recursion: support user-defined recursive targets
+         tests: rename 'recurs*.sh' to 'var-recurs*.sh'
+         tests: minor improvements to 'recurs*.sh'
+
+2012-07-02  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       recursion: support user-defined recursive targets
+
+       The user can now define his own recursive targets that recurse
+       in the directories specified in $(SUBDIRS).  That can be done by
+       specifying the name of such targets in invocations of the new
+       'AM_EXTRA_RECURSIVE_TARGETS' m4 macro.
+
+       The API goes like this:
+
+           $ cat configure.ac
+           AC_INIT([pkg-name], [1.0]
+           AM_INIT_AUTOMAKE
+           AM_EXTRA_RECURSIVE_TARGETS([foo])
+           AC_CONFIG_FILES([Makefile sub/Makefile])
+           AC_OUTPUT
+
+           $ cat Makefile.am
+           SUBDIRS = sub
+           foo-local:
+               @echo This will be run by "make foo".
+
+           $ cat sub/Makefile.am
+           foo-local:
+               @echo This too will be run by a "make foo" issued either in
+               @echo the 'sub/' directory or in the top-level directory.
+
+       Like for the "default" recursive targets (e.g., 'all' and 'check'),
+       the user-defined recursive targets descend in the $(SUBDIRS) in a
+       depth-first fashion, and process '.' last (unless that is explicitly
+       specified in $(SUBDIRS)).
+
+       * NEWS, doc/automake.texi: Document the new feature.
+       * automake.in (@extra_recursive_targets): New global variable.
+       (scan_autoconf_traces): Trace macro '_AM_EXTRA_RECURSIVE_TARGETS'.
+       (handle_user_recursion): New subroutine; among other things, it defines
+       the new internal '$(am__extra_recursive_targets)' make variable, and
+       the '*-am', '*-local' and '*-recursive' targets associated with the
+       user-specified user recursive targets.
+       (generate_makefile): Call the new subroutine.
+       * lib/am/subdirs.am (am__recursive_targets): New internal make variable,
+       listing all of '$(RECURSIVE_TARGETS)', '$(RECURSIVE_CLEAN_TARGETS)' and
+       '$(am__extra_recursive_targets)' together.
+       (AM_RECURSIVE_TARGETS): Adjust the definition of this variable ...
+       (.PHONY, .MAKE): ... and the list of dependencies of these special targets
+       to take advantage of the new '$(am__recursive_targets)' variable.
+       ($(am__recursive_targets)): New targets, superseding ...
+       ($(RECURSIVE_TARGETS), $(RECURSIVE_CLEAN_TARGETS)): ... these, and
+       inheriting their rules.  This way, the rules to handle recursion for
+       built-in recursive targets (e.g., 'all', 'dvi', 'clean') and for user
+       defined recursive targets are the same.
+       * m4/extra-recurs.m4: New file, contain definition of new macro
+       'AM_EXTRA_RECURSIVE_TARGETS' and '_AM_EXTRA_RECURSIVE_TARGETS'.
+       These macros are basically dummy, only used for tracing by automake.
+       * m4/Makefile.am (dist_automake_ac_DATA): Update.
+       * t/recurs-user.sh: New test.
+       * t/recurs-user2.sh: Likewise.
+       * t/recurs-user-deeply-nested.sh: Likewise.
+       * t/recurs-user-indir.sh: Likewise.
+       * t/recurs-user-keep-going.sh: Likewise.
+       * t/recurs-user-many.sh: Likewise.
+       * t/recurs-user-no-subdirs.sh: Likewise.
+       * t/recurs-user-no-top-level.sh: Likewise.
+       * t/recurs-user-override.sh: Likewise.
+       * t/recurs-user-phony.sh: Likewise.
+       * t/recurs-user-wrap.sh: Likewise.
+       * t/remake-recurs-user.sh: Likewise.
+       * t/list-of-tests.mk: Update.
+
+2012-07-02  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       tests: rename 'recurs*.sh' to 'var-recurs*.sh'
+
+       * t/recurs.sh: Rename ...
+       * t/var-recurs.sh: ...  to this.
+       * t/recurs2.sh: Rename ...
+       * t/var-recurs2.sh: ... to this.
+       * tests/list-of-tests.mk: Adjust.
+
+2012-07-02  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       tests: minor improvements to 'recurs*.sh'
+
+       * t/recurs.sh: Removed useless calls to AM_CONDITIONAL in
+       the generated 'configure.ac'.
+       * t/recurs2.sh: Add trailing ':' command.
+
+2012-07-01  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       Merge branch 'maint'
+
+       * maint:
+         tests: don't trust the exit status of "make -k" for non-GNU makes
+         parallel-tests: reimplement fix for bug#11791
+         tests setup: unset CDPATH
+         tests setup: more namespace safeness
+         tests setup: remove an unused variable
+         tests setup: less hard-coding of the test subdirectory
+
+2012-07-01  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       tests: don't trust the exit status of "make -k" for non-GNU makes
+
+       * t/parallel-tests-recheck-pr11791.sh: Here.  At least some versions
+       of FreeBSD make botch it up, returning success when failure should be
+       returned.
+
+2012-07-01  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       parallel-tests: reimplement fix for bug#11791
+
+       * lib/am/check.am: Here.  The new implementation is shorter, slightly
+       more efficient (requiring less forks), less brittle in the face of
+       signals or unexpected interruptions in the make process, and should
+       also be easier to merge in the 'ng/master' branch (as of now, due to
+       the difficulties in merging our previous version of the fix in the
+       'ng/master' codebase, Automake-NG still lacks a fix for bug#11791).
+
+2012-07-01  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       tests setup: unset CDPATH
+
+       So that our test scripts can safely chdir around using relative
+       paths as well, without having to worry abut possible CDPATH
+       interferences.
+
+       * defs-static.in: unset CDPATH.
+       * t/ax/tests-init.sh: Remove a now-unneeded workaround.
+
+2012-07-01  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       tests setup: more namespace safeness
+
+       * t/ax/tests-init.sh ($testSubDir): Rename ...
+       ($am_test_subdir): ... to this, throughout the file.
+
+2012-07-01  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       tests setup: remove an unused variable
+
+       * defs-static.in ($testprefix): This one.
+
+2012-07-01  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       tests setup: less hard-coding of the test subdirectory
+
+       * t/ax/tests-init.sh: Make the code creating the temporary
+       test subdirectory smart enough to automatically create it
+       in the same subdirectory of the test that is being run.
+       * defs-static.in ($MKDIR_P, $am_rel_srcdir): New variables,
+       AC_SUBST'd from @MKDIR_P@ and @srcdir@ respectively, and
+       used in the new 'tests-init.sh' code.
+
+2012-07-01  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       Merge branch 'maint'
+
+       * maint:
+         parallel-tests: silence an overly verbose recipe
+         tests: fix some uses of 'Exit', where 'exit' should now be used instead
+         maintcheck: test scripts should be executable, check for that
+
+2012-06-30  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       parallel-tests: silence an overly verbose recipe
+
+       *  lib/am/check.am (check-TESTS): Here, the part of the recipe
+       removing the stale '.log' and '.trs' files.
+
+2012-06-30  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       tests: fix some uses of 'Exit', where 'exit' should now be used instead
+
+       * t/parallel-tests-recheck-pr11791.sh: Here.
+
+2012-06-30  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       maintcheck: test scripts should be executable, check for that
+
+       * syntax-checks.mk (sc_tests_executable): Here, in this new check.
+       (syntax_check_rules): Add it.
+       * Makefile.am (dist-hook): Drop, no need to make test cases executable
+       anymore.
+
+2012-06-30  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       Merge branch 'maint'
+
+       * maint:
+         parallel-tests: recipes for "check" and "recheck" are separated again
+
+2012-06-30  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       Merge branch 'recheck-fix' into maint
+
+       * recheck-fix:
+         parallel-tests: recipes for "check" and "recheck" are separated again
+
+2012-06-30  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       Merge branch 'maint'
+
+       * maint:
+         parallel-tests: "recheck" behaves better in case of compilation failures
+         scripts: quote 'like this', not `like this'
+
+2012-06-30  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       parallel-tests: recipes for "check" and "recheck" are separated again
+
+       * lib/am/check.am: Here.  They have distinctly diverged recently, and
+       the reduction in code duplication obtained keeping their recipes united
+       is not anymore worth the extra complications.
+
+2012-06-30  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       Merge branch 'recheck-fix' into maint
+
+       * recheck-fix:
+         parallel-tests: "recheck" behaves better in case of compilation failures
+         scripts: quote 'like this', not `like this'
+
+2012-06-30  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       tests: prefer "test ! -e FILE" to check that a file doesn't exist
+
+       * t/autohdrdry.sh: Here, rather than using "test ! -r FILE".
+
+2012-06-30  Jim Meyering  <jim@meyering.net>
+
+       texi: clean after Texinfo manuals in $(SUBDIRS) directories correctly
+
+       Fixes the regression exposed by previous commit 'v1.12.1-165-g498492f'.
+
+       * automake.in (handle_texinfo_helper): Add $infobase.{t2d,t2p}
+       to @mostly_cleans, but *without* the '$relative_dir/' prefix.
+
+2012-06-30  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       coverage: regression in texinfo "make mostlyclean" with $(SUBDIRS)
+
+       After commit v1.12.1-91-g205c757 of 2012-06-20, "texi: require
+       Texinfo >= 4.9, related enhancements", the presence of a Texinfo manual
+       'manual.texi' in a subdir (say 'doc/') of a package using a recursive
+       make setup would cause "make distcheck" to fail, due to the presence of
+       the 'manual.t2d/' directory created by texi2dvi.  That directory would
+       not be correctly removed because the 'mostlyclean' rule would run, from
+       within the 'doc/' sub-directory, "rm -rf doc/manual.t2d", instead of
+       the expected (and correct) "rm -rf manual.t2d".
+
+       Reported by Jim Meyering:
+       <http://lists.gnu.org/archive/html/automake-patches/2012-06/msg00203.html>
+
+       * t/txinfo21.sh: Enhance to expose the issue.
+       * t/txinfo-no-clutter.sh: Likewise, and other miscellaneous improvements.
+
+2012-06-30  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       Merge branch 'maint'
+
+       * maint:
+         tests: fix a spurious failure
+         configure: fix detection of POSIX shell to work in a VPATH build
+         tests: prefer "test ! -e FILE" to check that a file doesn't exist
+
+2012-06-30  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       tests: fix a spurious failure
+
+       * t/parallel-tests-dry-run-2.sh: Here.
+
+2012-06-30  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       configure: fix detection of POSIX shell to work in a VPATH build
+
+       * configure.ac: When checking whether "test -e" works, use 'config.log',
+       not 'configure', as the witness file, because the latter does not exist
+       in the current directory during a VPATH build.
+
+2012-06-29  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       tests: prefer "test ! -e FILE" to check that a file doesn't exist
+
+       Once, for the sake of (at least) Solaris 10 /bin/sh, we had to use
+       "test ! -f FILE" or "test ! -r FILE" or "test ! -d FILE" instead,
+       because the that shell's 'test' built-in didn't grok the '-e' option.
+
+       Note however that we still can't use "test ! -e" in the Makefile recipes
+       used in the test cases; that is because those recipes are run with the
+       shell detected by 'configure', and Autoconf-generated configure scripts
+       do no guarantee to find or provide a POSIX-compatible shell.
+
+       * Several tests: Adjust.
+       * t/yacc-clean-cxx: Adjust, and remove a couple of useless commands.
+       * t/parallel-tests-dry-run-2.sh: Adjust, and add invocation to
+       "make -n" forgotten in previous versions of the test.
+       * t/txinfo26.sh: Adjust, and don't bother to skip the test when it's
+       run in a directory whose absolute path contain whitespace: that setup
+       is not supported anyway.
+       * t/maken3.sh: Adjust, and fix a typo that could cause a minor false
+       negative.
+       * t/test-trs-recover2.sh: Prefer using 'skip_' with a suitable error
+       message over a bare 'exit 77'.
+
+2012-06-28  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       Merge branch 'maint'
+
+       * maint:
+         configure: move a misplaced "section" comment
+         configure: clump check for ${var%...} and ${var#...} expansion together
+         cosmetics: improve wording of a couple of configure messages
+         configure: the testsuite shell must support 'test -e' and 'test ! -e'
+         tests: remove stale workarounds for Solaris /bin/sh
+
+2012-06-28  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       configure: move a misplaced "section" comment
+
+       * configure.ac (Create output files): This, move it towards the end
+       of the script.
+
+2012-06-28  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       configure: clump check for ${var%...} and ${var#...} expansion together
+
+       And together with those for the ${var%%...} and ${var##...} expansions.
+       After all, it is basically impossible to find a shell that support one
+       of them but not the others.
+
+       Suggestion by Eric Blake.
+
+       * configure.ac: Here.
+
+2012-06-28  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       cosmetics: improve wording of a couple of configure messages
+
+       * configure.ac: Fix a couple of messages so that the configure
+       output changes from this:
+
+           checking whether /bin/sh "set -e" preserves exit traps... yes
+           checking whether /bin/sh "set -x" corrupts stderr... no
+
+       to this:
+
+           checking whether /bin/sh preserves exit traps with "set -e"... yes
+           checking whether /bin/sh corrupts stderr with "set -x"... no
+
+2012-06-28  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       configure: the testsuite shell must support 'test -e' and 'test ! -e'
+
+       * configure.ac: Require that the shell that is to be selected to run
+       the testsuite understands "set -e" and "set ! -e".
+
+2012-06-28  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       tests: remove stale workarounds for Solaris /bin/sh
+
+       Our testsuite cannot be run with that shell anymore (as it is
+       not POSIX-compliant).
+
+       * t/tap-more.sh: Remove outdated workarounds for Solaris /bin/sh.
+       * t/self-check-exit.tap: Likewise.
+       * t/ansi2knr-no-more.sh: Likewise.
+       * t/add-missing.tap: Likewise.
+       * t/dist-auxfile.sh: Likewise.
+       * t/test-driver-custom-multitest-recheck2.sh:  Likewise.
+       * t/ax/test-init.sh: Remove obsolete references to Solaris
+       /bin/sh.
+       * t/confh5.sh: Likewise.
+       * t/uninstall-fail.sh: Likewise.  And update comments about
+       quirks of Solaris /bin/ksh and /usr/xpg4/bin/sh.
+
+2012-06-28  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       Merge branch 'maint'
+
+       * maint:
+         tests init: don't bother allowing '$me' to be overridable
+         tests init: typofixes in comments
+
+2012-06-28  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       tests init: don't bother allowing '$me' to be overridable
+
+       We once used that feature in our wrapper tests; but now (and probably
+       even since commit 'v1.11-1308-g375f23d' of 2011-09-08, "testsuite:
+       revamp generation of autogenerated tests") it is not needed anymore.
+       By removing it we can simplify our growingly complex testsuite framework
+       a little.
+
+       * t/ax/test-inist.sh ($me): Do not initialize it here (and only if not
+       already set), instead ...
+       * defs-static.in ($me): ... initialize it here unconditionally.
+       Do not check anymore that $me doesn't come from the environment: that
+       wouldn't cause any problem now.
+       Now that '$me' is defined early, prefer it over 'argv0' in early error
+       messages, both here ...
+       * defs: ... and here.
+       * Makefile.am (AM_TESTS_ENVIRONMENT): Do not bother "nullifying" $me
+       anymore.
+       * t/self-check-env-sanitize.tap: Adjust.
+       * t/self-check-me.tap: Likewise.
+
+2012-06-28  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       tests init: typofixes in comments
+
+2012-06-28  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       Merge branch 'maint'
+
+       * maint:
+         tests: one test was not executable, make it so
+         readme: fix typo in t/README: s/$((...)/$((...))/
+         tests: don't skip if $(abs_builddir) or $(abs_srcdir) contain whitespace
+         tests: avoid spurious maintainer-check failures
+         tests: remove obsolete hacks around maintainer-check false positives
+
+2012-06-28  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       tests: one test was not executable, make it so
+
+       * t/subdir-order.sh: This test.
+
+2012-06-28  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       readme: fix typo in t/README: s/$((...)/$((...))/
+
+2012-06-28  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       tests: don't skip if $(abs_builddir) or $(abs_srcdir) contain whitespace
+
+       We used to explicitly skip libtool and gettext tests if the absolute
+       path of the builddir or of the srcdir which Automake was configured
+       with contained any whitespace (or other metacharacters).
+
+       But several other tests would spuriously fail in such an unholy setup.
+       To be precise, it would cause 61 'FAIL's and 42 'ERROR's in the whole
+       Automake testsuite.
+
+       The fact that, as of today, nobody has reported any failure of this kind
+       means that (thankfully) nobody is building automake with $(abs_srcdir)
+       or $(abs_builddir) mangled by whitespace.  So, instead of trying to cater
+       to such a broken setup consistently, we just drop the extra check in the
+       libtool/gettext tests.
+
+       In case someone will ever reports a failure due to extra whitespace in
+       either $(abs_srcdir) or or $(abs_builddir), we will simply enhance our
+       'configure.ac' to bail out flatly and loudly at such a setup.
+
+       * t/ax/test-init.sh: Simplify accordingly.
+
+2012-06-28  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       tests: avoid spurious maintainer-check failures
+
+       * t/ax/test-init.sh: Here, by adding extra quoting for two
+       occurrences of the string "perl".
+
+2012-06-28  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       tests: remove obsolete hacks around maintainer-check false positives
+
+       * gen-testsuite-part, t/test-trs-recover.sh: Here.
+
+2012-06-28  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       Merge branch 'maint'
+
+       * maint:
+         tests: simpler workaround for shells losing the exit status in exit trap
+
+       + Extra non-trivial edits:
+       * Several tests: Adjusted to use 'exit' rather than 'Exit'.
+
+2012-06-28  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       Merge branch 'simplify-exit-trap-workaround' into maint
+
+       * simplify-exit-trap-workaround:
+         tests: simpler workaround for shells losing the exit status in exit trap
+
+       + Extra non-trivial edits:
+
+       * t/am-missing-prog.sh: Use 'exit, not 'Exit'.
+
+2012-06-28  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       cosmetics: remove trailing whitespace in some files
+
+       * lib/missing, t/comment7.sh, t/objc-flags.sh, t/objcxx-flags.sh,
+       t/perf/testsuite-summary.sh, t/self-check-explicit-skips.sh: Here.
+
+       Prompted by a report from Karl Berry.
+
+2012-06-28  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       coverage: enhance tests in 'missing' script a little
+
+       * t/am-missing-prog.sh: Here, by also verifying its expected
+       exit status.
+
+2012-06-28  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       Merge branch 'maint'
+
+       * maint:
+         coverage: tests AM_MISSING_PROG usage
+         docs: document AM_MISSING_PROG
+
+2012-06-28  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       coverage: tests AM_MISSING_PROG usage
+
+       Now that AM_MISSING_PROG is documented, we want to make sure it
+       works as expected when used in third-party code.
+
+       * t/am-missing-prog.sh: New test.
+       * t/ammissing: Rename ...
+       * t/am-macro-not-found.sh: ... like this, to avoid confusion (this
+       test has nothing to do with the 'missing' script nor with the
+       'AM_MISSING_PROG' macro).
+       * t/list-of-tests.mk: Adjust.
+
+2012-06-28  Eric Blake  <eblake@redhat.com>
+
+       docs: document AM_MISSING_PROG
+
+       Addresses automake bug#11793.
+
+       This macro has been present for a long time, and coreutils has been
+       relying on it despite no documentation, which argues that it is stable
+       enough to be worth documenting.
+
+       Furthermore, since we are hoping to change our preferred invocation
+       from 'missing --run program' to 'missing program' in a future version
+       of automake, we need a way for packages to consistently get the
+       preferred invocation form rather than open-coding a call to 'missing'.
+       In particular, the Autoconf manual would love to recommend this macro
+       when discussing how to integrate an autotest suite with automake.
+
+       * doc/automake.texi (Public Macros): Document AM_MISSING_PROG.
+
+2012-06-27  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       Merge branch 'maint'
+
+       * maint:
+         tests: fix a spurious failure with Solaris make
+         tests: avoid several spurious failures on Solaris
+         tests: avoid a spurious failure on NetBSD
+
+2012-06-27  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       tests: fix a spurious failure with Solaris make
+
+       * t/subdir-order.sh: Run make in parallel only if the make implementation
+       truly supports it.
+
+2012-06-27  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       parallel-tests: "recheck" behaves better in case of compilation failures
+
+       With this change, the "recheck" target behaves better in the face of build
+       failures related to previously failed tests.  For example, if a test is a
+       compiled program that must be rerun by "make recheck", and its compilation
+       fails, that test will still be rerun by further "make recheck" invocations.
+       Previously, its '.log' and '.trs' would have both been lost, so that the
+       test would have not been re-run.
+
+       This change fixes automake bug#11791.
+
+       * NEWS: Update.
+       * lib/am/check.am (recheck, check-TESTS): Adjust to cater to scenario
+       described above.
+       * t/parallel-tests-recheck-pr11791.sh: New test.
+       * t/list-of-tests.mk: Add it.
+
+2012-06-27  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       scripts: quote 'like this', not `like this'
+
+       * lib/test-driver.sh: Here.
+
+2012-06-26  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       Merge branch 'missing-not-touch-just-warn'
+
+       * missing-not-touch-just-warn:
+         missing: --run is supported again (as a no-op) for use by older automake
+
+2012-06-26  Eric Blake  <eblake@redhat.com>
+
+       missing: --run is supported again (as a no-op) for use by older automake
+
+       Commit v1.12.1-87-ga22717d of 2012-06-21 ("missing: do not touch
+       timestamps; only warn for out-of-date files") has removed the '--run'
+       option, since our new preferred calling conventions now imply it; but
+       if a newer 'missing' is mixed with an already built project that used
+       an older Automake version (this happened in practice for GNU m4; see:
+       <http://lists.gnu.org/archive/html/bug-m4/2012-06/msg00001.html>), then
+       the 'Makefile' in that project will fail due to passing the '--run'
+       option when trying to bring the project up-to-date.
+
+       * lib/missing: Parse and ignore '--run'.
+
+2012-06-25  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       Merge branch 'missing-not-touch-just-warn'
+
+       * missing-not-touch-just-warn:
+         missing: don't cater to 'configure.in' in our advice
+         missing: better tips about missing tools
+
+2012-06-25  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       missing: don't cater to 'configure.in' in our advice
+
+       The use of 'configure.in' as autoconf input now deprecated the development
+       versions of both Automake and Autoconf, and we'd like to speed up its
+       demise.
+
+       * missing: In the advice displayed in case some autotools are detected to
+       be missing, refer to 'configure.ac' unconditionally, instead of referring
+       to 'configure.in' when that file exists in the current directory (and no
+       'configure.ac' does).
+
+2012-06-25  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       tests: simpler workaround for shells losing the exit status in exit trap
+
+       Now that we can assume our tests are run by a decent POSIX shell, we
+       can simplify our workaround aimed at having the exit status propagated
+       correctly to the code in the exit trap.  Unfortunately, we cannot
+       dispense with such a workaround altogether, because it's still required
+       by some shells we need to support (at least Solaris 10 /bin/ksh and
+       /usr/xpg4/bin/sh).
+
+       For more information about the need of that workaround, see the entry
+       about 'trap' in the section "Limitations of Shell Builtins" in the
+       Autoconf manual:
+       <http://www.gnu.org/software/autoconf/manual/autoconf.html#trap>
+
+       The new workaround has been tested successfully with the following
+       shells:
+
+         - Bash 4.1
+         - Bash 3.2
+         - Bash 3.0
+         - Bash 2.05b
+         - dash 0.5.5.1
+         - dash 0.5.2
+         - AT&T Ksh 93u (from official Debian package)
+         - MirBSD Korn Shell 40.2 (from official Debian package)
+         - Solaris 9, 10 and 11 /bin/ksh
+         - Solaris 9, 10 and 11 /usr/xpg4/bin/sh
+         - NetBSD 5.1 /bin/sh
+         - NetBSD 5.1 /bin/ksh
+
+       * t/ax/test-init.sh (Exit): Rename ...
+       (_am_exit): ... like this.
+       (exit): New alias for '_am_exit'.  We cannot simply redefine 'exit'
+       as a shell function, because some shells (dash 0.5.5.1, Solaris 10
+       /bin/ksh and /usr/xpg4/bin/sh) do not allow it.
+       (_am_exit, trap): Add extra escaping for 'exit' calls, to ensure we
+       really invoke the 'exit' builtin and not our alias with the same
+       name.
+       * configure.ac: Check that the shell selected to run our testsuite
+       supports aliases named like shell builtins.
+       * t/REAMDE: Adjust.
+       * All tests: Adjust, by simply using 'exit' instead of 'Exit'.
+       * t/self-check-explicit-skips.sh: Adjust: the first usage of 'exit'
+       after it has been redefined as an alias must be on a new line w.r.t.
+       that where the alias is defined, in order for the redefinition to be
+       honored.
+       * syntax-checks.mk (sc_tests_Exit_not_exit): Delete.
+       (sc_tests_exit_not_Exit): New.
+       (syntax_check_rules): Adjust.
+       (sc_tests_automake_fails): Simplify the recipe a little.
+       * Several tests: Remove now useless spurious quoting once required
+       to placate the 'sc_tests_Exit_not_exit' maintainer check.
+       * gen-testsuite-part: Likewise.  Also, avoid uses of 'Exit' in the
+       generated scripts.
+
+2012-06-24  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       tests: avoid several spurious failures on Solaris
+
+       * t/ax/is_newest: Rewrite to be Bourne-compatible, for /bin/sh shells like
+       Solaris' that are not POSIX-conforming.  The script is so small that such
+       a rewrite is easier than going through the hoops that would be required to
+       ensure this script is always executed with a POSIX shell.
+       * t/ax/is: Add a comment stating that this script is to be kept Bourne
+       compatible as well.
+
+2012-06-24  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       tests: avoid a spurious failure on NetBSD
+
+       * t/maken.sh: Do not expect the timestamp of the current directory
+       to be unchanged after a "make -n".
+
+2012-06-24  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       Merge branch 'maint'
+
+       * maint:
+         tests: fix automatic re-execution of tests with Zsh
+         tests: drop support for older Zsh shells
+         tests: allow AM_TEST_RUNNER_SHELL to be overridden
+         tests: fix setup for older Zsh
+
+2012-06-23  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       tests: fix automatic re-execution of tests with Zsh
+
+       * defs: Use '$argv0' instead of '$0'.  With Zsh not started right
+       away in Bourne-compatibility mode, the latter will be the path not
+       of the test script itself, but of the file it's currently sourcing
+       -- i.e., in our case, './defs'.  This would cause the automatic
+       re-execution code to execute './defs' (basically a no-op) rather
+       than re-run the test correctly.
+
+2012-06-23  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       tests: drop support for older Zsh shells
+
+       * defs-static.in: Here.  The fact that such support has been broken for
+       almost a year (only fixed by today's commit 'v1.12.1-57-gf1e0300'),
+       causing no bug reports from anyone, shows that such support is not truly
+       warranted.  And it will get in the way of future improvements in the
+       handling of the exit trap (because bugs in older Zsh versions will
+       prevent some of our planned improvements).  So just drop it.
+       * t/README: Remove obsolete advice for working around bugs in older
+       versions of Zsh; instead, indicate version 4.3 is the oldest Zsh now
+       supported.
+
+2012-06-23  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       tests: allow AM_TEST_RUNNER_SHELL to be overridden
+
+       * defs-static.in: Here.  This will make it easier for the maintainer
+       to run some self checks (like those in 't/self-check-exit.tap') with
+       different shells, to look for possible portability problems.  Fix a
+       typo (doubled "the") while we are at it.
+
+2012-06-23  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       tests: fix setup for older Zsh
+
+       * defs-static.in: After the addition of TAP-based tests and our renaming
+       of "simple" test scripts from 'tests/foo.test' to 't/foo.sh', a test name
+       is valid if it matches the wildcard "*.sh" or "*.tap", not the wildcard
+       "*.test".  Adjust accordingly.
+
+2012-06-23  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       missing: better tips about missing tools
+
+       * lib/missing: Try to point the user to the home page of such tools
+       where possible.  Also, make clear that some tools (e.g., aclocal or
+       autoheader) are distributed as part of bigger projects (resp. automake
+       and autoconf, in those cases).  While at it, refactor and re-format
+       the existing code heavily, in particular introducing
+       (give_advice): ... this new function in the process.
+
+2012-06-23  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       Merge branch 'missing-not-touch-just-warn'
+
+       * missing-not-touch-just-warn:
+         missing: do not touch timestamps; only warn for out-of-date files
+
+2012-06-23  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       Merge branch 'maint'
+
+       * maint:
+         tests: avoid one last `...` command substitution in 'test-init.sh'
+         maintcheck: guard against `...` for command substitution in test cases
+         tests: more uses of $(...) over `...` for command substitution
+         cosmetics: quote `like this', not 'like this', in a couple of tests
+         readme: clarify/extend few entries in 't/README'
+         readme: better separation of entries in 't/README'
+         readme: subsections "Do" and "Do not" in 't/README' merged
+         tests: new requirement 'grep-nonprint'
+         cosmetics: fix description of an expected error message in a test
+         tests: assume automake quotes 'like this', not `like this'
+
+2012-06-23  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       tests: avoid one last `...` command substitution in 'test-init.sh'
+
+       * t/ax/test-init.sh (me): In the definition of this variable.  This
+       also shave off a couple of forks, and the need for a sanity check
+       only required in fringe situations.
+
+2012-06-23  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       maintcheck: guard against `...` for command substitution in test cases
+
+       But still allow them in configure.ac, Makefile.am and shell scripts
+       created or used inside test cases itself, because Autoconf (as of
+       version 2.69) does not yet ensure that $CONFIG_SHELL will be set to
+       a proper POSIX shell.
+
+       * syntax-checks.mk (sc_tests_command_subst): New check.
+       (syntax-check_rules): Add it.
+       * t/tap-global-log.sh: Minimal tweakings to avoid triggering the
+       new maintainer check.
+
+2012-06-22  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       tests: more uses of $(...) over `...` for command substitution
+
+       Somehow missed by the previous changes.  No big deal, fix them now.
+
+       * t/ax/depcomp.sh: Here.
+       * t/autodist.sh: And here.
+       * t/autodist-no-duplicate.sh: And here.
+       * t/autodist-subdir.sh: Ad here.
+       * t/remake11.sh t/self-check-me.tap: And here.
+       * t/perf/testsuite-summary.sh: And here.
+       * t/perf/testsuite-recheck.sh: And here.
+
+2012-06-22  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       cosmetics: quote `like this', not 'like this', in a couple of tests
+
+       * t/ansi2knr-no-more.sh: Here.
+       * t/aclocal-verbose-install.sh: And here.
+
+2012-06-22  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       readme: clarify/extend few entries in 't/README'
+
+       * t/README (Writing test cases): Here.
+
+2012-06-22  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       readme: better separation of entries in 't/README'
+
+       * t/README (Writing test cases): Prepend different entries with a '*'
+       character acting like a bullet in a list.  This make different entries
+       better separated, visually-wise.  Minor related reformatting.
+
+2012-06-22  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       readme: subsections "Do" and "Do not" in 't/README' merged
+
+       * t/README (Writing test cases): Merge subsections "Do" and "Do not".
+       The distinction was rather artificial, and more confusing than helpful.
+
+2012-06-22  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       tests: new requirement 'grep-nonprint'
+
+       * t/ax/test-inist.sh ($esc): New, a literal escape character.
+       (grep-nonprint): New requirement, check that the grep implementation
+       available that can handle non-printing characters correctly.
+       * t/color.sh: Use it instead of hand-rolled equivalent, and do not
+       (re)define '$esc' explicitly.
+       * t/color2.sh: Likewise.
+       * t/tap-color.sh: Likewise.
+       * t/vtexi4.sh: Likewise.
+       * t/parallel-tests-no-color-in-log.sh: Likewise.  Also prefer the use
+       of grep over that of $FGREP, because the new requirement only check
+       grep, and ensure we only grep non-printing characters from a pipe, to
+       avoid hitting a BSD grep limitation.
+       * t/parallel-tests-reset-term.sh: Likewise.
+       * t/ax/tap-summary-aux.sh: Use '$esc' instead of hard-coding the
+       literal escape character.
+
+2012-06-22  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       cosmetics: fix description of an expected error message in a test
+
+       * t/vartypo2.sh: Here.  This reflects the change from `this style'
+       of quoting to 'this style'.
+
+2012-06-22  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       tests: assume automake quotes 'like this', not `like this'
+
+       * t/add-missing.tap: Here.  This slightly simplifies and/or enhances
+       some grepping checks on automake diagnostic.
+
+2012-06-22  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       Merge branch 'maint'
+
+       * maint:
+         tests: prefer using 'is_newest' over 'ls -t' hacks
+         tests: implement is_newest as an auxiliary script, not shell function
+         tests: fix some spurious failures in VPATH setup
+         tests: work in VPATH setup again
+
+2012-06-22  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       tests: prefer using 'is_newest' over 'ls -t' hacks
+
+       To verify that a file 'new' is newer than the file 'old', it's much
+       cleaner to use "is_newest new old" rather than the more clumsy
+       "ls -t". Adjust several of our tests accordingly.
+
+       * syntax-checks.mk (sc_tests_ls_t): New check, guard against uses
+       of "ls -t" and similar.
+       (syntax_check_rules): Add it.
+       * t/maken.sh: Adjust.
+       * t/autohdr4.sh: Likewise.
+       * t/extradep2.sh: Likewise.
+       * t/lex-depend-cxx.sh: Likewise.
+       * t/extradep.sh: Likewise.
+       * t/yacc-depend2.sh: Likewise.
+       * t/yacc-pr204.sh: Likewise.
+       * t/lex-pr204.sh: Likewise.
+       * t/yacc8.sh: Likewise.
+       * t/acloca13.sh: Likewise.
+       * t/lex-depend.sh: Likewise, and enhance.
+       * t/acloca14.sh: Likewise.
+       * t/aclocal7.sh: Likewise.
+
+2012-06-22  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       tests: implement is_newest as an auxiliary script, not shell function
+
+       This will allow to also use it in the makefile recipes used in our
+       test cases.
+
+       * t/ax/test-init.sh (is_newest): Remove.
+       * t/ax/is_newest: New script.
+       * Makefile.am (EXTRA_DIST): Add it.
+
+2012-06-22  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       tests: fix some spurious failures in VPATH setup
+
+       * t/self-check-cleanup.tap: No need to copy the 'ax/t/test-init.sh'
+       file over in our temporary directory.
+       * t/self-check-reexec.tap: Likewise.
+
+2012-06-22  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       tests: work in VPATH setup again
+
+       * defs: Drop overly paranoid sanity checks that was causing all the tests
+       to fail spuriously when run in a VPATH setup, with a message like:
+       "../t/nodef.sh: ./t/ax/test-init.sh: not found in current directory".
+       Those checks looked for invariants that, even if broken, would still
+       cause the test to fail very early and with a pretty clear error message
+       anyway.
+
+2012-06-22  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       Merge branch 'maint'
+
+       * maint:
+         tests: automatic re-execution works for non-POSIX shells too
+         tests: use more POSIX shell features our test scripts
+
+       + Extra non-trivial edits:
+
+       * t/ax/test-init.sh: Apply the diffs between past versions of
+       'defs' in maint and in master; i.e., remove handling of $required
+       entries 'texi2dvi-o' and 'makeinfo-html', and adjust to the fact
+       that the parallel testsuite harness is now the default.
+
+2012-06-22  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       tests: automatic re-execution works for non-POSIX shells too
+
+       Some inferior shells are too greedy in parsing their input.  If a
+       non-POSIX Bourne shell (like Solaris 10 /bin/sh) was used to launch
+       one of our test scripts, it would fail unconditionally, because it
+       unexpectedly saw some (by it) unsupported constructs, notwithstanding
+       such constructs being placed *after* the code implementing automatic
+       test re-execution with a better shell.  In conclusion, the shell
+       bailed out like this:
+
+           $ /bin/sh t/ar.sh
+           $ t/ar.sh: syntax error at line 257: `is_newest_files=$' unexpected
+
+       By moving all the potentially problematic code in a separate file, to
+       be sourced only after the code for automatic re-execution with a better
+       shell, we ensure that inferior shell cannot see such code by mistake.
+
+       * defs: All code after automatic shell re-execution moved out ...
+       * t/ax/test-init.sh: ... to this new file.
+       * syntax-checks.mk (xdefs): Add it.
+       * Makefile.am (dist_check_DATA): Add it.  Also move in 'defs' from
+       a less explicit 'check_DATA' declaration.
+       (nodist_check_DATA):  Move in 'defs-static' from a less explicit
+       'check_DATA' declaration.
+       (check_DATA): Remove.
+       * t/self-check-sanity.sh: Remove, it was actually too hacky and brittle,
+       sanity-checking situations we don0t actually care about.
+       * t/list-of-tests.mk: Adjust.
+       * t/self-check-explicit-skips.sh: Adjust, and fix a botched heading
+       comments while we are at it.
+       * t/self-check-reexec.tap: Adjust.
+       * t/self-check-cleanup.tap: Likewise.
+
+2012-06-22  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       tests: use more POSIX shell features our test scripts
+
+       Since commit 'v1.12-36-g2d68fd9' of 2012-05-07, "configure: search a
+       sturdy POSIX shell to be used in the testsuite", the shell running
+       our test script is assured to be a POSIX-conforming shell, so we can
+       use the more modern and flexible idioms and features that we couldn't
+       use when we also aimed at compatibility with non-POSIX Bourne shells,
+       like Solaris /bin/sh.
+
+       * t/README: Suggest to use POSIX shell features liberally in test cases,
+       with possible exception of Makefile recipes and configure shell code.
+       * Several tests: Adjust to use more POSIX shell features; e.g., $(...)
+       rather than `...`, $((...)) rather than `expr ...`, "if ! CMD; then ..."
+       instead of "if CMD; then :; else ...", and so on.
+       In several places, when using the 'test' built-in, prefer '-eq' over
+       '=' for numeric comparisons, and prefer "grep -c PATTERN FILE" over
+       "grep PATTERN FILE | wc -l".
+       Throw in other low-hanging easy improvements and fixlets while we are
+       at it.
+       * t/ax/depcomp.sh, t/ax/tap-summary-aux.sh, t/ax/tap-functions.sh,
+       defs, defs-static.in: Likewise.
+
+2012-06-21  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       Merge branch 'maint'
+
+       * maint:
+         docs: avoid failures with development version of Texinfo (4.13.90)
+         typofix: s/test derivers/test drivers/ in check.am comments
+         typofix: s/env/even/ in comments in GNUmakefile
+
+2012-06-21  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       docs: avoid failures with development version of Texinfo (4.13.90)
+
+       * doc/automake-history.texi: Use '@item' instead of '@itemx' where
+       appropriate.
+
+2012-06-21  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       missing: do not touch timestamps; only warn for out-of-date files
+
+       Before this change, the missing script had a twofold role:
+
+         - it warned the user if some required maintainer tools was missing,
+           or too old;
+
+         - in such a case, it tried to "fix" the timestamp of the files that
+           should have been rebuilt by that tool (without actually updating
+           the file contents, of course), to allow the build to continue.
+
+       The second capability used to be quite useful in the days when most
+       projects committed files generated by maintainer-only tools in their
+       VCS repository (today the trend is not to keep such generated files
+       VCS-committed anymore).  In such a setup, the "timestamp-fixing"
+       capability of 'missing' was quite useful, in that it allowed users
+       lacking some required maintainer tool to build from a VCS checkout
+       in the face of skewed timestamps (as could have been caused by
+       "cvs update" or "git checkout").
+
+       But then, when the automatic remake rules kicked in due to the
+       generated files being *actually out-of-date* (e.g., because the user
+       had modified 'configure.ac' but lacked a modern-enough autoconf to
+       rebuild it), that behaviour of 'missing' caused the same problem that
+       plagued AM_MAINTAINER_MODE; i.e., the user would get non-dependable
+       builds and inconsistent statuses of the build tree -- changes to
+       source files don't reflect on generated files, and this can be very
+       confusing and cause hard-to-spot errors).
+
+       So we now believe that the best approach to deal with timestamp-related
+       issues is not to have 'missing' to "automagically" try to resolve
+       them (with all the risk and brittleness entailed), but rather to
+       suggest those projects still keeping generated files committed in their
+       VCS to provide a proper (say) 'fix-timestamp.sh' script that touches
+       the timestamp of the checked-out files, to ensure no spurious rebuild
+       will be triggered.  As a bonus, such a script can be more aware of the
+       particularities, nooks and corner cases of a project, and thus more
+       reliable than the old 'missing' script.
+
+       An example of this approach is offered by GNU awk (release 4.0.1, Git
+       tag 'gawk-4.0.1', commit b85b04e8).  The GNU awk maintainers commit
+       the Autotools-generated files (configure, Makefile.in, etc.) and other
+       generated in the project's Git repository, but offer a useful script
+       'bootstrap.sh' that fixes the timestamps of those files, to ensure no
+       useless remake is triggered in a freshly cloned repository:
+
+           #! /bin/sh
+           # bootstrap.sh --- touch relevant files to avoid out-of-date issues
+           #                  in Git sandboxes
+           touch aclocal.m4
+           find awklib -type f -print | xargs touch
+           sleep 1
+           touch configure
+           sleep 2
+           touch configh.in
+           sleep 1
+           touch test/Maketests
+           find . -name Makefile.in -print | xargs touch
+           touch doc/*.info
+           touch po/*.gmo
+           touch po/stamp-po
+           touch awkgram.c
+           touch command.c
+           touch version.c
+
+       A similar, simplified script is also reported as an example in the
+       manual.
+
+       * NEWS: Update.
+       * doc/automake.texi (Auxiliary Programs, maintainer-mod): Update.
+       (CVS): Do not suggest that 'missing' can "automagically" fix botched
+       timestamp due to a "cvs update"; this isn't true anymore.  Give an
+       example of a custom 'fix-timestamp.sh' script that can be used to
+       obtain the same effect (in a slightly more laborious but also more
+       explicit and less brittle way).  Fix some minor typos and improper
+       wordings while we are at it.
+       * lib/missing: Basically rewritten to implement the new semantics.
+       As a side effect (one of the several), the '--run' option is no more
+       required nor recognized.
+       * m4/missing.m4 (AM_MISSING_HAS_RUN): Enhance the test on '$MISSING'
+       to ensure it actually provides the new semantics (by trying the new
+       "witness" option '--is-lightweight').
+       * lib/am/distdir.am (distdir): No need anymore to check for "bad"
+       distributed man pages that were actually dummy stubs generated by
+       the 'missing' script.
+       * t/missing4.sh: Rename ...
+       * t/remake-aclocal-version-mismatch.sh: ... like this.
+       * t/missing2.sh: Rename ...
+       * t/missing-version-mismatch.sh: ... like this, and adjust to the
+       new semantics.
+       * t/missing3.sh: Adjust to the new semantics.
+       * t/man4.sh: Remove as obsolete.
+       * t/missing.sh: Likewise.
+       * t/missing5.sh: Likewise.
+       * t/txinfo30.sh: Likewise.
+       * t/man6.sh: Adjust grepping checks.
+       * t/remake6.sh: Likewise.
+       * t/list-of-tests.mk: Adjust.
+
+2012-06-21  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       typofix: s/test derivers/test drivers/ in check.am comments
+
+2012-06-20  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       typofix: s/env/even/ in comments in GNUmakefile
+
+       Spotted by Eric Blake.
+
+2012-06-20  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       Merge branch 'maint'
+
+       * maint:
+         bootstrap: overhaul and improve
+         docs: quote 'like this', not `like this'
+
+2012-06-20  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       bootstrap: overhaul and improve
+
+       This fixes several weaknesses and buglets in the 'bootstrap' convenience
+       target offered in GNUmakefile (and its supporting code).  Refer to the
+       extensive code comments in there for more details.
+
+       * GNUmakefile: Almost completely rewritten.
+
+2012-06-20  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       docs: quote 'like this', not `like this'
+
+       * doc/automake.texi: Fix the reported warnings and informative messages
+       from automake to quote 'like this' rather than as `like this'.  Do the
+       same for comments and some text in our examples.
+
+2012-06-20  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       fixup: tests: special requirement 'makeinfo-html' removed from ./defs
+
+       This should have ideally been part of earlier commit v1.12.1-93-g3c64d54.
+
+       * defs (makeinfo-html): Remove.
+
+2012-06-20  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       maintcheck: guard against obsolete $required entries
+
+       * syntax-check.mk: Add rules guarding against the use of the
+       obsolete test requirements 'texi2dvi-o' and 'makeinfo-html'.
+
+2012-06-20  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       tests: drop requirement 'makeinfo-html'; 'makeinfo' is enough
+
+       * defs: Since we now require Texinfo 4.9 or later in the Automake
+       generated Makefiles, and since the '--html' option of makeinfo, as
+       well as its capability to generate HTML output, has been supported
+       since Texinfo 4.0 (according to the Texinfo NEWS file), the
+       requirement 'makeinfo-html' is obsolete -- the simpler requirement
+       'makeinfo' is enough.
+       * t/instdir-texi.sh ($required): Adjust by using simply 'makeinfo'
+       instead of 'makeinfo-html'.
+       * t/silent8.sh: Likewise.
+       * t/txinfo21.sh: Likewise.
+
+2012-06-20  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       tests: drop requirement 'texi2dvi-o'; 'texi2dvi' is enough
+
+       * defs: Since we now require Texinfo 4.9 or later in the Automake
+       generated Makefiles, and since the '-o' option of texi2dvi has been
+       supported since Texinfo 4.1, the requirement 'texi2dvi-o' is
+       obsolete -- the simpler requirement 'texi2dvi' is enough.
+       * t/silent8.sh ($required): Adjust by using simply 'texi2dvi'
+       instead of 'texi2dvi-o'
+       * t/txinfo-no-clutter.sh: Likewise.
+       * t/txinfo13.sh: Likewise.
+       * t/txinfo23.sh: Likewise.
+       * t/txinfo24.sh: Likewise.
+       * t/txinfo25.sh: Likewise.
+       * t/txinfo28.sh: Likewise.
+       * t/txinfo33.sh: Likewise.
+       * t/vtexi4.sh: Likewise.
+
+2012-06-20  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       texi: require Texinfo >= 4.9, related enhancements
+
+       We start passing the '--build-dir' option to the texi2dvi and texi2pdf
+       invocations done in our Texinfo-related rules.  The argument for this
+       option will be specific for each info_TEXINFOS entry, to work around a
+       texi2dvi bug that could otherwise cause racy failures in parallel make
+       builds:
+       <http://lists.gnu.org/archive/html/automake-patches/2012-06/msg00073.html>
+       That bug seems already fixed in the development version of texi2dvi,
+       though:
+       <http://lists.gnu.org/archive/html/automake-patches/2012-06/msg00074.html>
+       so the details of our '--build-dir' usage can be revisited once we can
+       assume Texinfo 5.0 or later.
+
+       Since the '--build-dir' options has been only supported since Texinfo
+       4.9, we lose compatibility with all older Texinfo versions.
+
+       But we also get some real improvements.
+
+       First, the '--build-dir' option implies the '--tidy' option; this, like
+       the '--clean' option that we were formerly using, prevents cluttering of
+       the build directory with all the TeX and Texinfo auxiliary files and
+       build by-products, but, differently from '--clean', keeps them around
+       for later re-runs to use; this shortens the rebuild times considerably.
+
+       Second, the use of '--build-dir' also allows us to specify different
+       build directories for the PDF and DVI output, preventing the rules
+       building them from stomping on each other's feet when run in parallel.
+       This is demonstrated by the test cases 'txinfo-no-clutter.sh' and
+       'txinfo33.sh', which before this change used to fail when run with
+       MAKE="make -j4", but now succeed even in that case.
+
+       * NEWS: Update.
+       * lib/am/texibuilds.am: Do not try to avoid texi2dvi/texi2pdf option
+       '-o'; it has been supported since Texinfo 4.1, and we now require
+       Texinfo >= 4.9.  Remove an obsolete comment.  Modify calls to texi2dvi
+       and texi2pdf to use the '--build-dir' option, so that TeX auxiliary
+       files and build by-products for a 'foo.texi' input will be placed in
+       a 'foo.t2d' directory (for texi2dvi) or in a 'foo.t2p' directory (for
+       texi2pdf).
+       * automake.in (scan_texinfo_file): Greatly simplify the implementation,
+       since we don't need anymore to keep track of the TeX auxiliary files and
+       build by-products to clean.  Drop the '@CLEAN_FILES' part of the return
+       value.
+       (handle_texinfo_helper): Adjust the 'scan_texinfo_file()' call to its
+       new signature.  Append the "work directories" now created by texi2dvi
+       and texi2pdf invocation to the list of files/directories removed upon
+       "make mostlyclean".
+       * lib/am/texinfos.am: Update the cleaning rules (and comments)
+       accordingly.
+       * t/txinfo-no-clutter.sh: Minimal adjustment to avoid spurious failures.
+       * .gitignore: Update.
+
+2012-06-16  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       docs: it's not true that DISTCHECK_CONFIGURE_FLAGS is maintainer-reserved
+
+       At least, not anymore since commit 'v1.11-372-g9760039' of 2001-06-10,
+       "distcheck: add support for AM_DISTCHECK_CONFIGURE_FLAGS".  See also
+       automake bug#8784.
+
+       * doc/automake.texi (Flag Variables Ordering): Do not report
+       'DISTCHECK_CONFIGURE_FLAGS' as a "variables that are only useful
+       to the maintainer that has no user counterpart": now it is a
+       user-reserved variable, its maintainer-reserved counterpart
+       being 'AM_DISTCHECK_CONFIGURE_FLAGS' .
+
+2012-06-15  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       Merge branch 'am-preprocess-drop-tricky-transform'
+
+       * am-preprocess-drop-tricky-transform:
+         automake: stop supporting "%KEY?iftrue:iffalse%" transforms
+         am: stop using "%KEY:iffalse?iftrue%" transforms
+
+2012-06-15  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       Merge branch 'maint'
+
+       * maint:
+         tests: minor reorganization of few tests
+         fixup: adjust t/list-of-tests.mk for renamed/added tests
+         subdirs: enhance coverage, tweak and rename few tests
+         sync: update files from upstream with "make fetch"
+         py-compile: consistently quote 'like this', not `like this'.
+         docs: recursive make considered harmful
+         docs: clean rules are not run in reverse order of build rules anymore
+         silent: new $(AM_V_P) variable, tell if we're running in silent mode
+         refactor: silent rules handling (a little)
+         refactor: &define_verbose_var: accept a third optional argument
+
+       + Extra non-trivial edits:
+
+       These are due to the fact that support for silent rules is enabled
+       unconditionally these days (since commit 'v1.12-34-g14141f2' of
+       2012-05-01, "silent rules: support for them is always active now").
+
+       * automake.in: In the new silent related code, do not ever check
+       whether the 'silent-rules' option is active; just assume support
+       for silent rules is enabled.
+       * t/silent-obsolescent-warns.sh: Remove as obsolete.
+       * t/list-of-tests.mk: Adjust.
+
+2012-06-15  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       Merge branch 'docs-recursion' into maint
+
+       * docs-recursion:
+         docs: recursive make considered harmful
+
+2012-06-15  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       Merge branch 'silent-custom' into maint
+
+       * silent-custom:
+         silent: new $(AM_V_P) variable, tell if we're running in silent mode
+         refactor: silent rules handling (a little)
+         refactor: &define_verbose_var: accept a third optional argument
+
+2012-06-14  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       automake: stop supporting "%KEY?iftrue:iffalse%" transforms
+
+       And the similar "reduced forms" "%KEY:iffalse%" and "%KEY?iftrue%"
+       as well.
+
+       They are convoluted, never used (after the previous change), and will
+       get in the way in the Automake-NG branch, where we'll soon want to use
+       GNU make static pattern rules in our internal '*.am' fragments.
+
+       * automake.in (preprocess_file, transform): Simplify not to support
+       those transform patterns.
+
+2012-06-14  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       am: stop using "%KEY:iffalse?iftrue%" transforms
+
+       And the similar "reduced forms" "%KEY:iffalse%" and "%KEY?iftrue%"
+       as well.
+
+       They are harder to grasp, can be easily reformulated in function of
+       other "plainer" transforms ("?KEY?" and "?!KEY?"), and we'll remove
+       support for them anyway in a later change.
+
+       * lib/am/data.am, lib/am/libs.am, lib/am/lisp.am, lib/am/ltlib.am,
+       lib/am/progs.am, lib/am/python.am, lib/am/scripts.am: Adjusted not
+       to rely on those kinds of transforms.
+
+2012-06-14  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       tests: minor reorganization of few tests
+
+       * t/subdir3.sh: Rename ...
+       * t/sourcefile-in-subdir.sh: ... like this.
+       * t/subdir4.sh: Rename ...
+       * t/depcomp-implicit-auxdir.sh: ... like this.
+       * t/subdir6.sh: Rename ...
+       * t/confh-subdir-clean.sh: ... like this.
+       * t/subdir7.sh: Renamed ...
+       * t/dir-named-obj-is-bad.sh: ... like this, and enhance.
+       * t/srcsub.sh, t/srcsub2.sh: Unify ...
+       * t/src-acsubst.sh: ... as this test.
+       * t/list-of-tests.mk: Adjust.
+
+2012-06-14  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       fixup: adjust t/list-of-tests.mk for renamed/added tests
+
+2012-06-14  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       subdirs: enhance coverage, tweak and rename few tests
+
+       * t/subdir5.sh: Rename ...
+       * t/subdir-add-pr46.sh: ... like this.
+       * t/subdir8.sh: Rename ...
+       * t/subdir-add2-pr46.sh: ... like this.
+       * t/cond2.sh: Rename ...
+       * t/subdir-cond-err.sh: ... like this.
+       * t/subdir9.sh: Rename ...
+       * t/subdir-with-slash.sh: ... like this; improve heading comments.
+       * t/subcond.sh: Rename ...
+       * t/subdir-cond-gettext.sh: ... like this; improve m4 quoting.
+       * t/subcond2.sh: Rename ...
+       * t/subdir-am-cond.sh: ... like this; adjust heading comments.
+       * t/subcond3.sh: Rename ...
+       * t/subdir-ac-subst.sh: ... like this; adjust heading comments.
+       * t/subdir2.sh: Rename ...
+       * t/subdir-subsub.sh: ... like this; enhance so that it also runs
+       './configure' and 'make'.
+       * t/subdir-order.sh: New test, check that the $(SUDBIRS) entries
+       are processed in the order they are specified.
+       * doc/automake.texi: Adjust references to tests.
+
+2012-06-14  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       sync: update files from upstream with "make fetch"
+
+       * lib/config.guess, lib/gitlog-to-changelog, lib/texinfo.tex: Update.
+
+2012-06-14  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       py-compile: consistently quote 'like this', not `like this'.
+
+       * lib/py-compile (usage_error): Here.
+
+2012-06-12  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       docs: recursive make considered harmful
+
+       In the documentation, we shouldn't confuse "packages using subdirectories"
+       with "packages using recursive make invocations".  A package can have a
+       careful organization in subdirectories, make no (or almost no) use of make
+       recursion (examples of such packages are GNU bison, GNU cppi, and Automake
+       itself).
+
+       In fact, make recursion should be used as seldom as possible, because it
+       makes the build system more brittle and dependency declarations less
+       faithful.  See Peter Miller's article "Recursive Make Considered Harmful"
+       for more a more in-depth discussion:
+
+           http://miller.emu.id.au/pmiller/books/rmch/
+
+       * doc/automake.texi (Directories): Clarify how a build system based on
+       make recursion does.  Observe that such a system, albeit being very
+       widespread, has its own issues and drawbacks, and that one can have a
+       non-recursive setup also for projects using complex directory layout.
+       (Recursing subdirectories): Speak of "packages that use make recursion"
+       rather than of "packages with subdirectories".
+
+2012-06-12  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       Merge branch 'subdirs-simplify' into maint
+
+       * subdirs-simplify:
+         docs: clean rules are not run in reverse order of build rules anymore
+
+2012-06-12  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       docs: clean rules are not run in reverse order of build rules anymore
+
+       At least since commit 'v1.12.1-12-gec6a135' of 2012-06-10, "subdirs: unify
+       rules for "cleaning" and "normal" recursive targets"
+
+       * doc/automake.texi (Recursing subdirectories): Adjust.
+
+2012-06-11  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       Merge branch 'maint'
+
+       * maint:
+         maintcheck: fix failures, both real and spurious
+         subdir tests: avoid an use of "make -j4", for portability
+         tests: avoid failure due to libtool quirks in C++ demo test
+         tests: fix spurious failures due to missing '$sleep'
+         subdirs: unify rules for "cleaning" and "normal" recursive targets
+         tests: add a "demo" test on C support
+         tests: look for '.lo' rather than '.o' object when using Libtool with C++
+         cosmetics: few typofixes in older ChangeLogs, suggested by "codespell.py"
+         maint: grammar fixes: s/all these/all of these/
+         subdir-objects: improve "make mostlyclean" efficiency and flexibility
+
+2012-06-11  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       Merge branch 'subdir-objects-pr10697' into maint
+
+       * subdir-objects-pr10697:
+         maintcheck: fix failures, both real and spurious
+
+2012-06-11  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       maintcheck: fix failures, both real and spurious
+
+       * syntax-checks.mk (sc_rm_minus_f): Whitelist the
+       't/subobj-clean*-pr10697.sh' tests.
+       * t/subobj-clean-pr10697.sh: When redefining PATH,
+       use '$PATH_SEPARATOR', not hard-coded ':'.
+       * t/subobj-clean-lt-pr10697.sh: Likewise.
+
+2012-06-11  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       tests: merged some testsuite fixlets
+
+       * fix-cxx-libtool-demo:
+         tests: avoid failure due to libtool quirks in C++ demo test
+
+       * subdir-objects-pr10697:
+         tests: fix spurious failures due to missing '$sleep'
+
+       * subdirs-simplify:
+         subdir tests: avoid an use of "make -j4", for portability
+
+2012-06-11  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       subdir tests: avoid an use of "make -j4", for portability
+
+       Otherwise, a spurious failure with Solaris CCS make can be triggered.
+       The coverage is not actually reduced, since the code path is still
+       covered when one runs the testsuite with AM_TESTSUITE_MAKE="make -jN"
+       (as should be done periodically).
+
+       * t/subdir-distclean.sh : Call simply "make maintainer-check", not
+       "make -j4 maintainer-check".
+
+2012-06-11  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       tests: avoid failure due to libtool quirks in C++ demo test
+
+       Revealed by failures on NetBSD 5.1.
+
+       * t/cxx-lt-demo.sh: In "make distcheck" invocation, don't define 'CC'
+       to "false", as that value would be exported and passed to the child
+       ./configure invocation, and some configure checks generated by libtool
+       autoconf macros can still require a C preprocessor even for packages
+       using only C++, and bail out if it's not found.  The problem was not
+       apparent on Solaris and GNU/Linux because those systems have a
+       '/lib/cpp' program, and configure detected and used that as a fallback
+       C preprocessor.
+
+2012-06-11  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       tests: fix spurious failures due to missing '$sleep'
+
+       Revealed by failures on NetBSD 5.1.
+
+       * t/subobj-clean-pr10697.sh: Call '$sleep' before modifying the
+       files that should trigger an automatic remake.
+       * t/subobj-clean-lt-pr10697.sh: Likewise.
+
+2012-06-11  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       Merge branches 'subdirs-simplify' and 'subdir-objects-pr10697' into maint
+
+       * subdirs-simplify:
+         subdirs: unify rules for "cleaning" and "normal" recursive targets
+         tests: add a "demo" test on C support
+
+       * subdir-objects-pr10697:
+         subdir-objects: improve "make mostlyclean" efficiency and flexibility
+         tests: look for '.lo' rather than '.o' object when using Libtool with C++
+         cosmetics: few typofixes in older ChangeLogs, suggested by "codespell.py"
+
+2012-06-11  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       subdirs: unify rules for "cleaning" and "normal" recursive targets
+
+       Before this change, the recursive invocation of cleaning targets in
+       the $(SUBDIRS) where done in inverse order, i.e., starting from the
+       last $(SUBDIRS) entry and proceeding towards the first.  According
+       to the code comments, this was done ...
+
+           ... in an attempt to alleviate a problem that can happen when
+           dependencies are enabled.  In this case, the .P file in one
+           directory can depend on some automatically generated header
+           in an earlier directory.  Since the dependencies are required
+           before any target is examined, make bombs.
+
+       But this comment does not apply anymore to the current implementation
+       of automatic dependency tracking: the '.Po' and '.Plo' files does not
+       depend on any C header or source file, ever!
+
+       So it seems that the distinction between "normal" and "cleaning"
+       recursive targets is a stale leftover of an older implementation of
+       the automatic dependency tracking.  In fact, the Automake History
+       manual seems to confirm this suspect; the section "First Take on
+       Dependency Tracking" reads:
+
+           Because each .P file was a dependency of Makefile, this meant
+           that dependency tracking was done eagerly by make.  For instance,
+           "make clean" would cause all the dependency files to be updated,
+           and then immediately removed.  This eagerness also caused problems
+           with some configurations; if a certain source file could not be
+           compiled on a given architecture for some reason, dependency
+           tracking would fail, aborting the entire build.
+
+       and the following section "Dependencies As Side Effects" reads:
+
+           In this approach, the .P files were included using the -include
+           command, which let us create these files lazily.  This avoided
+           the "make clean" problem.
+
+       So the distinction between "normal" and "cleaning" recursive targets
+       has likely been obsolete since by then already.  We can thus remove
+       such distinction, thus reducing some complications and duplication in
+       our rules.  Doing so, the whole testsuite still passes (both with GCC
+       and Sun C 5.9), even the test 'c-demo.sh', which, among the other
+       things, exercise the setup described in the obsolete code comment
+       referenced above.
+
+       Finally, note that we still keep '$(RECURSIVE_CLEAN_TARGETS)' and
+       '$(RECURSIVE_TARGETS)' as two distinct variables, to ensure a better
+       backward-compatibility for any user-defined rules that happen to use
+       those variables.
+
+       * NEWS: Update.
+       * lib/am/subdirs.am ($(RECURSIVE_CLEAN_TARGETS), $(CLEAN_TARGETS)):
+       Merge their recipes.
+       * t/subdir-distclean.sh: New test, check that "./configure && make
+       && make distclean" is actually a no-op, even when conditional SUBDIRS
+       are involved.
+       * t/list-of-tests.mk: Add it.
+
+2012-06-11  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       tests: add a "demo" test on C support
+
+       Showing and testing non-trivial use of C support, and its interaction
+       with other features.
+
+       * t/c-demo.sh: New test.
+       * t/list-of-tests.mk: Add it.
+
+2012-06-11  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       tests: look for '.lo' rather than '.o' object when using Libtool with C++
+
+       * t/cxx-lt-demo.sh: ... in this test.
+
+2012-06-11  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       cosmetics: few typofixes in older ChangeLogs, suggested by "codespell.py"
+
+       The typofixes offered by this patch have been suggested by the
+       "codespell.py" script.  Reference:
+       <http://git.profusion.mobi/cgit.cgi/lucas/codespell/>
+
+       * old/ChangeLog.01, old/ChangeLog.02, old/ChangeLog.03: Fix few typos.
+
+2012-06-11  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       silent: new $(AM_V_P) variable, tell if we're running in silent mode
+
+       Addresses part of automake bug#8665.
+
+       * automake.in (handle_silent): Define a new make variable '$(AM_V_P)',
+       that expands to a shell conditional that can be used in make recipes to
+       determine whether they are being run in silent mode or not.  The choice
+       of the name derives from the LISP convention of appending the letter
+       'P' to denote a predicate (see also "the '-P' convention" in the Jargon
+       File); we do so for lack of a better convention.
+       * t/automake.texi, NEWS: Document the new variable.
+       * t/silent6.sh: Adjust and extend.  Move out the checks that didn't
+       actually deal with user extension of silent rules ...
+       * t/silent-obsolescent-warns.sh: ... into this test (bound to be
+       removed once 'maint' is merged into the 'master' branch).
+       * t/list-of-tests.mk: Add the new test.
+
+2012-06-11  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       refactor: silent rules handling (a little)
+
+       * automake.in (handle_languages): Move definition of $(AM_V_GEN)
+       variable ...
+       (define_verbose_tagvar): ... and of '$(AM_V_at)' variable ...
+       (handle_silent): ... in this new subroutine.
+       (generate_makefile): Call it.
+
+2012-06-11  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       refactor: &define_verbose_var: accept a third optional argument
+
+       This is only required by future changes.
+
+       * automake.in (define_verbose_var): Accept a third optional argument,
+       specifying the value to assign to the given make variable when silent
+       rules are disabled.
+
+2012-06-10  Jim Meyering  <meyering@redhat.com>
+
+       maint: grammar fixes: s/all these/all of these/
+
+       Run this command:
+         git grep -li '\<all.these\>' \
+           |xargs perl -pi -e 's/\b([Aa])ll these\b/${1}ll of these/'
+
+2012-06-10  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       subdir-objects: improve "make mostlyclean" efficiency and flexibility
+
+       Fixes automake bug#10697.
+
+       Before this change, the generated Makefile issued one 'rm' invocation
+       for each subdir object file.  Not only was this very inefficient when
+       there were several such files, but it also caused stale object files
+       to be left behind when a source file was renamed or removed.
+
+       * automake.in (handle_single_transform): When a subdir object is seen,
+       update '%compile_clean_files' to clean all the compiled objects in its
+       same subdirectory, and all the libtool compiled objects ('.lo') there
+       as well is that subdir object is a libtool one.
+       * t/subobj-clean-pr10697.sh: New test.
+       * t/subobj-clean-lt-pr10697.sh: Likewise.
+       * t/list-of-tests.mk: Add them.
+       * NEWS: Update.
+
+2012-06-09  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       Merge branch 'maint'
+
+       * maint:
+         tests: look for '.lo' rather than '.o' object when using Libtool with C++
+         cosmetics: few typofixes in older ChangeLogs, suggested by "codespell.py"
+         tests: add basic semantic tests on C++ support
+         tests: minor tweak to 't/objc-megademo.sh'
+
+2012-06-09  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       tests: look for '.lo' rather than '.o' object when using Libtool with C++
+
+       * t/cxx-lt-demo.sh: ... in this test.
+
+2012-06-09  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       cosmetics: few typofixes in older ChangeLogs, suggested by "codespell.py"
+
+       The typofixes offered by this patch have been suggested by the
+       "codespell.py" script.  Reference:
+       <http://git.profusion.mobi/cgit.cgi/lucas/codespell/>
+
+       * old/ChangeLog.01, old/ChangeLog.02, old/ChangeLog.03: Fix few typos.
+
+2012-06-09  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       tests: add basic semantic tests on C++ support
+
+       Strange as it might seem, we were still missing them (yikes).
+
+       * t/cxx-demo.sh: New test.
+       * t/cxx-lt-demo.sh: Likewise (using libtool).
+       * t/list-of-tests.mk: Add them.
+
+2012-06-09  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       tests: minor tweak to 't/objc-megademo.sh'
+
+       * t/objc-megademo.sh (am_create_testdir): Define to "empty" before
+       including ./defs, because this test doesn't rely on the files usually
+       pre-set by the setup in there.
+
+2012-06-08  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       cleanup: simplify subroutine '&saw_extension'
+
+       * automake.in (saw_extension): Now that we use the '%extension_seen'
+       hash only as a set (it's keys being its elements), we can simplify
+       the implementation of this function accordingly.
+
+2012-06-08  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       cleanup: remove subroutine '&saw_sources_p'
+
+       * automake.in (saw_sources_p): Remove, its implementation is now so
+       trivial that it's easier to inline it into ...
+       (handle_languages): ... it's only caller.
+
+2012-06-08  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       cleanup: remove unused '&count_files_for_language' subroutine
+
+       * automake.in (count_files_for_language): Remove.  Its only remaining
+       caller (saw_sources_p) has stopped calling it in the previous commit.
+
+2012-06-08  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       automake: simplify '&saw_sources_p'
+
+       This is just a minor cleanup.  No semantic change is intended.
+
+       * automake.in (saw_sources_p): Since its now-only caller calls it with
+       the '0' argument, remove the code paths that assumed the argument could
+       be '1', and assume no arguments.
+       (handle_languages): Drop the arguments '0' in the '&saw_sources_p'
+       invocation.
+
+2012-06-08  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       tags: look at $(am__tagged_files) to decide whether to activate
+
+       This is just a preparatory refactoring in view of future changes.
+
+       * automake.in (handle_tags): To decide whether to include the tags rules,
+       rely on whether the automake-defined variable $(SOURCES) is non-empty,
+       rather than on the fact that '&saw_sources(1)' returns true.
+
+2012-06-08  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       tags: new var $(am__tagged_files) to list all files to run taggers on
+
+       This change reduce code duplication a little, and will be needed by
+       future simplifications.
+
+       * automake.in (handle_tags): Define a new 'am__tagged_files' private
+       make variable that lists all files to run taggers (mkid, cscope, ctags,
+       etc) on.  Drop the now-useless transform '%CONFIG%' when including
+       'tags.am'.
+       * lib/am/tags.am: Use it in several recipes and dependencies list to
+       reduce code duplication.
+
+2012-06-08  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       tags (cscope): also process $(TAGS_FILES)
+
+       * lib/am/tags.am (cscopelist): Also scan the files (if any) listed in
+       the '$(TAGS_FILES) variable, for consistency by what is done by the
+       'ID', 'TAGS' and 'CTAGS' rules.
+
+2012-06-08  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       tags (ID, cscope): also process config header (if any)
+
+       * lib/am/tags.am (cscopelist, ID): Also scan the file given by the
+       '%CONFIG%' transform, for consistency by what is done by the 'TAGS'
+       and 'CTAGS' rules.
+
+2012-06-02  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       Merge branch 'maint'
+
+       * maint:
+         news: document deprecation of configure.in
+         news: put planned backward compatibilities early
+         sync: update files from upstream with "make fetch"
+         maint: deprecate 'configure.in' as autoconf input
+         maint: post-release minor version bump
+         release: stable release 1.12.1
+         copyright: update copyright years in a couple of files
+         tests: avoid spurious failures with Solaris 9 cscope program
+         maintcheck: fix a spurious failure
+         perf: beginning of a performance testsuite
+         aclocal: declare function prototypes, do not use '&' in function calls
+         news: support for configure.in will be dropped in future automake versions
+         tests: fix botched heading comments in 'lex-clean-cxx.sh'
+         [ng] maintcheck: some tweaks and fixlets
+         help: fix a typo in the list of warning categories
+         maint: version bump after beta release
+         release: beta release 1.12.0b (will become 1.12.1)
+         release: remove overly picky check
+
+2012-06-02  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       news: document deprecation of configure.in
+
+       * NEWS (Warnings and deprecations): We now warn if 'configure.in' is
+       used instead of 'configure.ac' as autoconf input.
+       (Future backward-incompatibilities): Adjust.
+
+2012-06-02  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       news: put planned backward compatibilities early
+
+       * NEWS (Future backward-incompatibilities): Put them in the news
+       entries for the future 1.12.2 release.
+
+2012-06-01  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       sync: update files from upstream with "make fetch"
+
+       * lib/config.sub, lib/gitlog-to-changelog, lib/texinfo.tex: Update.
+
+2012-06-01  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       maint: deprecate 'configure.in' as autoconf input
+
+       It has been years since that has been deprecated in the documentation,
+       in favour of 'configure.ac':
+
+           Previous versions of Autoconf promoted the name configure.in, which
+           is somewhat ambiguous (the tool needed to process this file is not
+           described by its extension), and introduces a slight confusion with
+           config.h.in and so on (for which '.in' means "to be processed by
+           configure"). Using configure.ac is now preferred.
+
+       It's now time to start giving runtime warning about the use of
+       'configure.in', so that support for it can be removed in future
+       versions of autoconf/automake.
+
+       See also, in the Autoconf repository, commit 'v2.69-4-g560f16b' of
+       2012-05-23, "general: deprecate 'configure.in' as autoconf input".
+
+       * lib/Automake/Configure_ac.pm: Issue a warning in the 'obsolete'
+       category if 'configure.in' is detected.  Since this module is synced
+       from Automake, this change is to be backported there (and will be
+       soon).
+       * t/help.sh: Adjust.
+       * t/configure.sh: Adjust and enhance.
+
+2012-06-01  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       maint: post-release minor version bump
+
+       * configure.ac (AC_INIT): Bump version number to 1.12.1a.
+       * m4/amversion.m4: Likewise (automatically regenerated by
+       "make bootstrap").
+
 2012-06-01  Stefano Lattarini  <stefano.lattarini@gmail.com>
 
        release: stable release 1.12.1
 
        * NEWS (Future backward-incompatibilities): Update.
 
+2012-05-27  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       missing: support AC_CONFIG_HEADERS in addition to obsolete AC_CONFIG_HEADER
+
+       * missing (autoheader*): Do not look only for AC_CONFIG_HEADER when
+       grepping configure.ac, but also for AC_CONFIG_HEADERS: the latter has
+       been preferred to the former by several years now in Autoconf.
+
+2012-05-27  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       missing: don't bother checking for AM_CONFIG_HEADER: it is gone now
+
+       * missing (autoheader*): Do not look for AM_CONFIG_HEADER when
+       grepping configure.ac: it is not supported anymore (has been in
+       fact deleted in commit v1.12-15-gd2ca168 of 2012-04-27, "m4: delete
+       several obsolete macros").
+
+2012-05-27  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       docs: remove mention of AM_CONFIG_HEADER: it is obsolete and removed now
+
+       * doc/automake.texi (Variables used when building a program): Remove
+       obsolete mention of AM_CONFIG_HEADER as an alias to AC_CONFIG_HEADERS.
+
 2012-05-26  Stefano Lattarini  <stefano.lattarini@gmail.com>
 
        tests: fix botched heading comments in 'lex-clean-cxx.sh'
        * t/ext2.sh: ... use "exit (1)" instead of "exit 1" in the perl
        invocation of the guilty script.
 
+2012-05-25  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       Merge branch 'am-init-automake'
+
+       * am-init-automake:
+         init: obsolete usages of AM_INIT_AUTOMAKE not supported anymore
+
+2012-05-25  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       init: obsolete usages of AM_INIT_AUTOMAKE not supported anymore
+
+       This is a follow-up on commit v1.12-66-g27136df of 2012-05-06, "init: warn
+       against obsolete usage of AM_INIT_AUTOMAKE".
+
+       With this change, we drop support for the two-arguments and three-arguments
+       invocation forms of the AM_INIT_AUTOMAKE macro, as in either of:
+           AM_INIT_AUTOMAKE($PACKAGE, $VERSION)
+           AM_INIT_AUTOMAKE($PACKAGE, $VERSION, NODEFINE)
+
+       * NEWS, doc/automake.texi: Update.
+       * m4/init.m4 (AM_INIT_AUTOMAKE): Report the two- and three-arguments
+       invocation form as a hard error.
+       * t/aminit-moreargs-deprecation.sh: Renamed ...
+       * t/aminit-moreargs-deprecation.sh: ... to this, and updated to check
+       the new semantics.
+       * t/ac-output-old.tap: Adjust by avoiding old-style uses of AC_INIT
+       and AM_INIT_AUTOMAKE.
+       * t/acsilent.sh: Likewise.
+       * t/dirlist.sh: Likewise.
+       * t/dirlist2.sh: Likewise.
+       * t/req.sh: Likewise.
+       * t/nodef.sh: Remove as obsolete.
+       * t/version.sh: Likewise.
+       * t/version2.sh: Likewise.
+       * t/backcompat.sh: Likewise.
+       * t/backcompat2.sh: Likewise.
+       * t/backcompat3.sh: Likewise.
+       * t/backcompat5.sh: Likewise.
+       * t/backcompat4.sh: Renamed ...
+       * t/backcompat-acout.sh: ... to this.
+       * t/list-of-tests.mk: Adjust.
+
 2012-05-21  Stefano Lattarini  <stefano.lattarini@gmail.com>
 
        help: fix a typo in the list of warning categories
 
 2012-05-19  Stefano Lattarini  <stefano.lattarini@gmail.com>
 
+       Merge branch 'parallel-tests-default'
+
+       * parallel-tests-default:
+         check: the parallel-tests driver is now the default
+
+2012-05-19  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       Merge branch 'maint'
+
+       * maint:
+         ylwrap: preserve subdirectories in "#line" munging
+         ylwrap: preparatory refactoring
+
+2012-05-19  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
        Merge branch 'ylwrap-line-filename' into maint
 
        * ylwrap-line-filename:
 
 2012-05-18  Stefano Lattarini  <stefano.lattarini@gmail.com>
 
+       check: the parallel-tests driver is now the default
+
+       The old serial testsuite driver is still supported, and can be activated
+       by the 'serial-tests' option (introduced by commit 'v1.11-1989-gdeb7773'
+       of 2012-02-20, "automake: new option 'serial-tests'").
+
+       * lib/Automake/Options.pm: Now, the 'parallel-tests' option is a no-op
+       (but still explicitly recognized, for backward compatibility), while the
+       'serial-tests' option is recognized and registered.
+       * automake.in: Adjust to ensure that the parallel test harness is used by
+       default; mostly, this amounts at using "! option('serial-tests')" where
+       "option('parallel-tests')" was used before.
+       * NEWS, doc/automake.texi: Update.
+       * configure.ac (AM_INIT_AUTOMAKE): Drop 'parallel-tests' option, is
+       redundant now.
+       * defs: In the generated AM_INIT_AUTOMAKE call, use the 'serial-tests'
+       when the serial testsuite harness is to be used, and no option otherwise.
+       * lib/am/check.am: Use (static) conditional '%SERIAL_TESTS%' instead of
+       conditional '%PARALLEL_TESTS%'.
+       * lib/test-driver: Adjust heading comments.
+       * t/ax/extract-testsuite-summary.pl: Likewise.
+       * t/check-exported-srcdir.sh: Likewise.
+       * t/check-subst.sh: Likewise.
+       * t/java-compile-run-nested.sh: Likewise.
+       * t/parallel-tests-dry-run-1.sh: Likewise.
+       * t/parallel-tests-dry-run-2.sh: Likewise.
+       * t/parallel-tests-interrupt.sh: Likewise.
+       * t/parallel-tests-many.sh: Likewise.
+       * t/test-metadata-global-log.sh: Likewise.
+       * t/tests-environment-backcompat.sh: Likewise.
+       * m4/init.m4 (AM_INIT_AUTOMAKE): Adjust a comment.
+       * t/check8.sh: Likewise.
+       * t/check-tests-in-builddir.sh: Likewise.
+       * t/java-compile-run-flat.sh: Adjust a botched comment.
+       * t/ax/tap-summary-aux.sh: Remove explicit use of the 'parallel-tests'
+       option.
+       * t/ax/testsuite-summary-checks.sh: Likewise.
+       * t/aclocal-path-precedence.sh: Likewise.
+       * t/dist-aux-many-subdirs.sh: Likewise.
+       * t/parallel-tests-no-color-in-log.sh: Likewise.
+       * t/parallel-tests-reset-term.sh: Likewise.
+       * t/parallel-tests-subdir.sh: Likewise.
+       * t/check-no-test-driver.sh: Fix setup to adjust to the changed
+       semantics.  Update heading comments.
+       * t/parallel-tests-driver-install.sh: Adjust to the new semantic.
+       * t/test-driver-is-distributed.sh: Simplified according to the
+       new semantics.
+
+2012-05-18  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       Merge branch 'maint'
+
+       * maint:
+         tests: use 'parallel-tests' Automake option by default
+         doc: fix location of Automake's own test-suite.log file
+         yacc tests: avoid a spurious failure with Sun C++ 5.9
+         self tests: cater for /bin/ksh symlinked to Zsh
+         tests: fix spurious failures due to dpkg install-info
+
+2012-05-18  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
        tests: use 'parallel-tests' Automake option by default
 
        This will help our transition from 'serial-tests' to 'parallel-tests'
 
 2012-05-13  Stefano Lattarini  <stefano.lattarini@gmail.com>
 
+       Merge branch 'maint'
+
+       * maint:
+         tests: fix spurious failure due to i18n issue
+         tests: add few missing 'cc' and 'c++' requirements
+
+2012-05-13  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
        tests: fix spurious failure due to i18n issue
 
        Fixes automake bug#11452.
        * t/yacc-cxx.sh: Likewise.
        * t/yacc-mix-c-cxx.sh ($required): Require 'cc' and 'c++'.
 
+2012-05-08  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       fixup: s/AM_CONFIG_HEADER/AC_CONFIG_HEADERS/ in 't/confsub.sh'
+
+       Issue introduced in the recent merge 'v1.12-101-g12405c9'.
+
+2012-05-08  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       Merge branch 'maint'
+
+       * maint:
+         tests: fix a spurious failure with dash
+         test defs: fix indentation (cosmetic change)
+         tests: remove obsolete uses of $sh_errexit_works
+         configure: search a sturdy POSIX shell to be used in the testsuite
+         tests: shell running test scripts is now named AM_TEST_RUNNER_SHELL
+         fixup: distribute t/README
+         init: warn against obsolete usage of AM_INIT_AUTOMAKE
+
 2012-05-07  Stefano Lattarini  <stefano.lattarini@gmail.com>
 
        Merge branch 'testsuite-saner-shell' into maint
 
 2012-05-06  Stefano Lattarini  <stefano.lattarini@gmail.com>
 
+       Merge branch 'maint'
+
+       * maint:
+         m4: prepend m4 builtins with "m4_"
+         docs: fix clumsy grammar in the scripts-based testsuite chapter
+
+2012-05-06  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
        m4: prepend m4 builtins with "m4_"
 
        The comments in 'lib/autoconf/autoconf.m4' from Autoconf 2.69 read:
        * m4/init.m4 (AM_INIT_AUTOMAKE): Use 'm4_define' and 'm4_defn' instead
        of 'define' and 'defn'.
 
+2012-05-05  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       require: autoconf >= 2.65; related simplifications
+
+       The new support for Objective C++ (to be added in Automake 1.12.1) can be
+       simplified if we assume Autoconf version 2.65 or later (2.65 being the
+       version that introduced support for Objective C++).  Since such an Autoconf
+       version is two and half years old now (and will likely be almost three
+       years old when Automake 1.13 gets released), requiring it is acceptable.
+       This will also simplify testing and maintenance of Automake, because we'll
+       need to test with fewer Autoconf version, and possibly rely on new Autoconf
+       features.
+
+       * NEWS (Version requirements): Automake 1.13 will require Autoconf
+       2.65 or later.
+       * configure.ac ($required_autoconf_version): Bump to 2.65.
+       * m4/init.m4 (AM_INIT_AUTOMAKE): Require Autoconf >= 2.65.
+       Assume AC_PROG_OBJCXX is unconditionally defined.
+       * m4/depout.m4: Adjust a comment about a nugget of defensive programming.
+       * t/ext.sh: Assume that AC_PROG_OBJCXX is unconditionally defined,
+       and that we are using Autoconf >= 2.65.  Related simplifications.
+       * t/objc-megademo.sh: Likewise.
+       * t/objcxx-basic.sh: Likewise.
+       * t/objcxx-deps.sh: Likewise.
+       * t/objcxx-flags.sh: Likewise.
+       * t/objcxx-minidemo.sh: Likewise.
+       * t/nodep2.sh: Likewise.
+       * t/backcompat3.sh: Assume AC_INIT accepts an URL argument.
+       * t/depend5.sh: Adjust a comment.
+       * syntax-checks.mk (sc_test_names): Delete this check as now useless:
+       autoconf >= 2.65 (>= 2.63, actually) can handle arguments to AC_INIT
+       that contain or are m4 builtins or predefined macros.
+       (m4_builtin): Delete this now-useless variable as well, was used only
+       by the check above.
+       (syntax_check_rules): Update.
+
 2012-05-05  Nick Alcock  <nick.alcock@oracle.com>  (tiny change)
 
        docs: fix clumsy grammar in the scripts-based testsuite chapter
 
 2012-05-05  Stefano Lattarini  <stefano.lattarini@gmail.com>
 
+       Merge branch 'maint'
+
+       * maint:
+         tests: use append mode to capture parallel make output
+         parallel-tests: separate different logs with an empty line
+
+2012-05-05  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
        tests: use append mode to capture parallel make output
 
        This should fix the spurious failure reported in automake bug#11413.
 
 2012-05-05  Stefano Lattarini  <stefano.lattarini@gmail.com>
 
+       Merge branch 'maint'
+
+       * maint:
+         maintcheck: avoid a couple of spurious failures
+         maintcheck: reduce code duplication, increase coverage
+
+2012-05-05  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
        maintcheck: avoid a couple of spurious failures
 
        * t/objcxx-deps.sh, t/objcxx-minidemo.sh: In C++ files, use
 
 2012-05-04  Stefano Lattarini  <stefano.lattarini@gmail.com>
 
+       maintcheck: avoid a couple of spurious failures
+
+       * t/objcxx-deps.sh, t/objcxx-minidemo.sh: In C++ files, use
+       "std::cout <<", not "cout <<", to avoid triggering a spurious
+       failure by the syntax check 'sc_tests_here_document_format'.
+
+2012-05-04  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       Merge branch 'maint'
+
+       * maint:
+         tests: avoid spurious failure on missing Obj C/C++ compiler
+         objc, objc++: test support for compilation flags
+         objc, objc++: add stress test
+         objc, objc++: test automatic dependency tracking
+         objc: reorganize basic tests
+         objc++, objc: add first semantic tests
+         objc++: add first basic test
+         news: announce initial support for Objective C++
+         objc++: test support for '.mm' suffix in _SOURCES entries
+         objc++: add documentation
+         objc++: initial support for Objective C++
+
+2012-05-04  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
        Merge branch 'objc++' into maint
 
        * objc++:
          objc++: add documentation
          objc++: initial support for Objective C++
 
+2012-05-03  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       dist: don't bother putting README first in $(DIST_COMMON)
+
+       Comments on some of our automake-time pre-processing of $(DIST_COMMON)
+       said that it was done in order to "put README first because it then
+       becomes easier to make a Usenet-compliant shar file".  But such a
+       format is hardly relevant anymore, and not worth the (albeit small)
+       added complexity.
+
+       * automake.in (handle_dist): Don't sort @dist_common.
+       (for_dist_common): Delete this function, is not used anymore.
+       * lib/am/distdir.am (DISTFILES): Remove obsolete comment.
+       * t/distcom4.sh: Adjust.
+
+2012-05-02  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       Merge branch 'always-support-silent-rules'
+
+       * always-support-silent-rules:
+         silent rules: support for them is always active now
+
+2012-05-02  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       Merge branch 'maint'
+
+       * maint:
+         news: document improvement in parallel-tests performance
+         tests: fix spurious failure due to autom4te caching
+         news: fix typos
+         aclocal: error out again on unrecognized arguments
+         parallel-tests: save few forks when possible
+         parallel-tests: optimize global log creation
+         parallel-tests: optimize 'recheck' target for speed
+         coverage: add performance tests on some parallel-tests aspects
+
 2012-05-02  Stefano Lattarini  <stefano.lattarini@gmail.com>
 
        news: document improvement in parallel-tests performance
 
 2012-05-02  Stefano Lattarini  <stefano.lattarini@gmail.com>
 
+       Merge branch 'cygnus-remove'
+
+       * cygnus-remove:
+         cygnus: remove support for Cygnus-style trees
+
+2012-05-02  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       Merge branch 'maint'
+
+       * maint:
+         cosmetics: fix typo in aclocal m4 directory README
+         cygnus: warn when it's used (flagged as 'obsolete' now)
+
+2012-05-02  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
        Merge branch 'cygnus-deprecate' into maint
 
        * cygnus-deprecate:
 
 2012-05-01  Stefano Lattarini  <stefano.lattarini@gmail.com>
 
+       silent rules: support for them is always active now
+
+       Before this change, support for silent rules was optional and activated
+       only if the 'silent-rules' option was specified.
+
+       The rationale behind that behaviour was that the silent-rules machinery
+       originally only worked with make implementations supporting nested
+       variables expansions, which isn't (or wasn't) a POSIX-specified features;
+       so that packages wanting to be "extra-portable" couldn't use the
+       silent-rules machinery at all.
+
+       But after Paul Eggert's commit 'v1.11-598-g8493499' of 25-12-2011,
+       "silent-rules: fallback for makes without nested vars" (motivated
+       by automake bugs #9928 and #10237), Makefiles generated when the
+       'silent-rules' option is enabled can work also with those make
+       implementations that don't support nested variables expansion (albeit
+       the configure-time selected verbosity cannot be overridden at make
+       runtime in such case).
+
+       In light of that, and since silent rules are disabled by default even
+       when the 'silent-rules' option is given (unless the developer explicitly
+       makes them enabled by default be calling "AM_SILENT_RULES([yes])" in
+       configure.ac), we can now have the support for silent rules always
+       enabled.
+
+       The 'silent-rules' option will thus become a no-op, but will reaming a
+       valid option for the time being, for better backward-compatibility.
+
+       A collateral effect of this change is that the use of the 'silent-rules'
+       option will not anymore automatically disable the warnings in the
+       'portability-recursive' category.
+
+       The present change is basically a backport of the Automake-NG commit
+       'v1.11d-75-g61ca923' of 19-04-2012, "[ng] silent rules: support for
+       them is always active now".  Stemmed by this thread on the Automake-NG
+       list:
+       <http://lists.gnu.org/archive/html/automake-ng/2012-04/msg00027.html>
+
+       * automake.in: Enable silent-rules machinery unconditionally.  Reword
+       some comments.  Do not switch off warnings in the category
+       'portability-recursive' anymore if the 'silent-rules' option is
+       given.
+       * m4/init.m4: Call 'AC_REQUIRE' on 'AM_SILENT_RULES' unconditionally.
+       * lib/Automake/Options.pm: Recognize 'silent-rules' as a dummy option.
+       Do not bother anymore checking that it is set in 'configure.ac'.
+       * t/silent.sh: Remove now-redundant calls to AM_SILENT_RULES.
+       * t/silent2.sh: Likewise.
+       * t/silent3.sh: Likewise.
+       * t/silent4.sh: Likewise.
+       * t/silent8.sh: Likewise.
+       * t/silent9.sh: Likewise.
+       * t/silent-lex.sh: Likewise.
+       * t/silent-many-gcc.sh: Likewise.
+       * t/silent-many-generic.sh: Likewise.
+       * t/silent-yacc-headers.sh: Likewise.
+       * t/silent-yacc.sh: Likewise.
+       * t/silentcxx-gcc.sh: Likewise.
+       * t/silentcxx.sh: Likewise.
+       * t/silentf77.sh: Likewise.
+       * t/silentf90.sh: Likewise.
+       * t/help-silent.sh: Likewise.
+       * t/silent-configsite.sh: Likewise, and other minor adjustments.
+       * t/silent7.sh: Likewise.  Also, extend to check that silent rules
+       are disabled by default, and remove obsoleted checks about the
+       'silent-rules' option being rejected in 'AUTOMAKE_OPTIONS'.
+       * t/silent6.sh: Remove now-redundant calls to 'AM_SILENT_RULES'.
+       Call automake with '-Wno-portability-recursive'.  Remove other
+       obsoleted checks.
+       * t/dollarvar.sh: Don't expect the use of 'AM_SILENT_RULES' in
+       'configure.ac' to disable warning in the 'portability-recursive'
+       category anymore.
+       * t/compile_f_c_cxx.sh: Adjust to avoid a spurious failure.
+       * t/silent-amopts.sh: Remove as obsolete.
+       * t/silent-nowarn.sh: Likewise.
+       * t/list-of-tests.mk: Adjust.
+       * NEWS: Update.
+       * doc/automake.texi: Update and simplify accordingly.
+       * configure.ac (AM_INIT_AUTOMAKE): Remove 'silent-rules' option.
+
+2012-05-01  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       Merge branch 'maint'
+
+       * maint:
+         fixup: botched edit in bootstrap.sh
+
+2012-05-01  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
        fixup: botched edit in bootstrap.sh
 
        * bootstrap.sh (dosubst): Fix botched option ("G" instead of "g")
 
 2012-05-01  Stefano Lattarini  <stefano.lattarini@gmail.com>
 
+       Merge branch 'maint'
+
+       * maint:
+         news: fix confusing wording
+         news: fixed weaknesses in build system and testsuite
+         bootstrap: consistently use correct copyright year
+         fixup: remove leftover "TERM=ansi" definition in 't/color.sh'
+
+2012-05-01  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
        news: fix confusing wording
 
        Reported by Dave Hart.
 
 2012-04-30  Stefano Lattarini  <stefano.lattarini@gmail.com>
 
+       Merge branch 'maint'
+
+       * maint:
+         news: Automake 1.13 will require Autoconf >= 2.65
+         news: put planned future backward-incompatibilities on top
+         readme: update INSTALL to latest version from Autoconf
+         sync: some auxiliary files synced from upstream
+         hacking: copyright notices must be updated before releasing
+         color-tests: coloring can be forced on non-ANSI terminals as well
+
+2012-04-30  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
        news: Automake 1.13 will require Autoconf >= 2.65
 
        Autoconf 2.65 is almost three years old now, so requiring it is
 
 2012-04-30  Stefano Lattarini  <stefano.lattarini@gmail.com>
 
+       cygnus: remove support for Cygnus-style trees
+
+       Support for "Cygnus-style" tree as enabled by the 'cygnus' option
+       has been deprecated in the documentation and with runtime warning
+       since Automake 1.12.1.  It's now time to remove it.
+
+       Closes automake bug#11034.
+
+       * lib/Automake/Options.pm (_process_option_list): Issue a proper
+       error when the 'cygnus' option is seen.
+       * automake.in: Don't handle the 'cygnus' option anymore.
+       * docs/automake.texi: Remove references to cygnus option and
+       Cygnus-style trees.
+       * lib/am/dejagnu.am, lib/am/texinfos.am: Drop special setups for
+       cygnus mode.
+       * NEWS: Update.
+       * t/cygnus-no-more.sh: New test.
+       * t/flavor.sh: Adjust.
+       * t/cygnus-deprecation.sh: Remove.
+       * t/cygnus-check-without-all.sh: Likewise.
+       * t/cygnus-requires-maintainer-mode.sh: Likewise.
+       * t/cygnus-dependency-tracking.sh: Likewise.
+       * t/cygnus-imply-foreign.sh: Likewise.
+       * t/cygnus-no-installinfo.sh: Likewise.
+       * t/cygnus-no-dist.sh: Likewise.
+       * t/clean2.sh: Likewise.
+       * t/txinfo5.sh: Likewise.
+       * t/txinfo5b.sh: Likewise.
+       * t/list-of-tests.mk: Update.
+
+2012-04-30  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
        cygnus: warn when it's used (flagged as 'obsolete' now)
 
        Support for "Cygnus-style" tree as enabled by the 'cygnus'
 
 2012-04-29  Stefano Lattarini  <stefano.lattarini@gmail.com>
 
+       Merge branch 'mkdirp-remove' into master
+
+       * mkdirp-remove:
+         AM_PROG_MKDIR_P: remove as obsolete
+
+2012-04-29  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       Merge branch 'maint'
+
+       * maint:
+         AM_PROG_MKDIR_P: deprecate, to be removed in Automake 1.13
+
+2012-04-29  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
        Merge branch 'mkdirp-deprecate' into maint
 
        * mkdirp-deprecate:
          AM_PROG_MKDIR_P: deprecate, to be removed in Automake 1.13
 
+2012-04-29  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       Merge branch 'maint'
+
+       * maint:
+         tests: root can write on files without write perms; cater for this
+         tests: require lex, not yacc, in a lex test case
+         maint: fix a comment typo
+
 2012-04-28  Stefano Lattarini  <stefano.lattarini@gmail.com>
 
        tests: root can write on files without write perms; cater for this
 
 2012-04-28  Stefano Lattarini  <stefano.lattarini@gmail.com>
 
+       AM_PROG_MKDIR_P: remove as obsolete
+
+       Support for the obsolescent 'AM_PROG_MKDIR_P' m4 macro (and its
+       output variable '$(mkdir_p)') has in the documentation and with
+       runtime warning since Automake 1.12.1.  It's now time to remove it.
+
+       * automake.in (scan_autoconf_traces): Remove special handling of
+       'AM_PROG_MKDIR_P'.
+       * m4/mkdirp.m4: Delete.
+       * Makefile.am (dist_automake_ac_DATA): Remove it.
+       * t/mkdirp-deprecation.sh: Delete.
+       * t/list-of-tests.mk: Remove it.
+       * doc/automake.texi: Remove references to the 'AM_MKDIR_P' m4 macro
+       and the '$(mkdir_p)' output variable.
+       * t/gettext-macros.sh: Ensure the gettext-requiring tests will
+       still see the now-removed 'AM_PROG_MKDIR_P' macro as an alias for
+       the 'AC_PROG_MKDIR_P' macro, since even recent versions of gettext
+       uses 'AM_PROG_MKDIR_P' in their '.m4' files.
+       * NEWS: Update.
+
+2012-04-28  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
        AM_PROG_MKDIR_P: deprecate, to be removed in Automake 1.13
 
        Support for the obsolescent 'AM_PROG_MKDIR_P' macro (and its
 
 2012-04-28  Stefano Lattarini  <stefano.lattarini@gmail.com>
 
+       Merge branches 'remove-acdir-option' and 'remove-obsolete-m4'
+
+       * remove-acdir-option:
+         aclocal: remove the --acdir option
+
+       * remove-obsolete-m4:
+         m4: delete several obsolete macros
+
+2012-04-28  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       Merge branch 'maint'
+
+       * maint:
+         fixup: avoid unconditional re-bootstrapping on "make dist"
+         build: ensure release year in copyright notice is up-to-date
+         cosmetics: fix spacing in THANKS
+         readme: explicitly state we use ranges in copyright years
+         bootstrap: add convenience make target
+         automake, aclocal: update copyright year in output
+
+2012-04-28  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
        fixup: avoid unconditional re-bootstrapping on "make dist"
 
        Since our 'bootstrap' script is distributed, the 'distdir' target depends
 
 2012-04-27  Stefano Lattarini  <stefano.lattarini@gmail.com>
 
+       aclocal: remove the --acdir option
+
+       It not documented in the manual anymore, its use has already been
+       causing a deprecation warning, and its oncoming removal has already
+       been announced in the NEWS file.  So let's finally remove it.
+
+       * aclocal.in (parse_arguments): Don't recognize the '--acdir' option
+       anymore.
+       (handle_acdir_option): Remove subroutine.
+       * configure.ac ($ACLOCAL): Adjust.
+       ($AUTOMAKE): Cosmetic changes, for consistency.
+       * tests/aclocal-acdir.test: Remove usages of the '--acdir' option.
+       * tests/aclocal-print-acdir.test: Likewise.
+       * NEWS: Update.
+
+2012-04-27  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
        bootstrap: add convenience make target
 
        Dependencies in the Automake build system are not completely specified
 
 2012-04-27  Stefano Lattarini  <stefano.lattarini@gmail.com>
 
+       m4: delete several obsolete macros
+
+       Support for several obsolescent macros has already been deprecated,
+       and their removal already announced in the documentation and in the
+       NEWS file.  It's now time to finally remove them.
+
+       * m4/dmalloc.m4 (fp_WITH_DMALLOC): Don't define anymore.
+       * m4/maintainer.m4 (jm_MAINTAINER_MODE): Likewise.
+       * m4/lispdir.m4 (ud_PATH_LISPDIR): Likewise.
+       * m4/protos.m4 (fp_C_PROTOTYPES): Likewise.
+       * m4/ccstdc.m4: Delete file.
+       * m4/header.m4: Likewise.
+       * m4/obsol-gt.m4: Likewise.
+       * m4/obsol-lt.m4: Likewise.
+       * m4/obsolete.m4: Likewise.
+       * Makefile.am (dist_automake_ac_DATA): Don't list the deleted '.m4'
+       files anymore.
+       * t/confh.sh: Use 'AC_CONFIG_HEADERS' instead of the now-removed
+       AM_CONFIG_HEADER.
+       * t/confh.sh: Likewise.
+       * t/confh4.sh: Likewise.
+       * t/confh6.sh: Likewise.
+       * t/confh7.sh: Likewise.
+       * t/confh8.sh: Likewise.
+       * t/confsub.sh: Likewise.
+       * t/stamph2.sh: Likewise.
+       * t/subdir6.sh: Likewise.
+       * t/autohdr2.sh: Remove as obsolete.
+       * t/obsolete.sh: Likewise.
+       * t/list-of-tests.mk. Don't list the deleted test cases anymore.
+       * NEWS: Update.
+       * doc/automake.texi: Likewise.  In particular ...
+       (Obsolete Macros): Remove this node altogether.
+
+2012-04-27  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
        automake, aclocal: update copyright year in output
 
        Fixes automake bug#11356.
 
 2012-04-26  Stefano Lattarini  <stefano.lattarini@gmail.com>
 
+       Merge branch 'maint'
+
+       * maint:
+         maint: don't use "union" merge driver for NEWS anymore
+         build: avoid too greedy rebuilds in the testsuite
+         tests: avoid yet another spurious environment influence
+         tests: fix a failure in Lex/C++ tests on Mac OS X
+         tests: fix a spurious failure due to truncated timestamps
+         build: require autoconf 2.69
+         build: don't require minimal automake version in AM_INIT_AUTOMAKE
+
+2012-04-26  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
        maint: don't use "union" merge driver for NEWS anymore
 
        The use of the "union" merge driver to avoid conflicts in NEWS has
 
 2012-04-25  Stefano Lattarini  <stefano.lattarini@gmail.com>
 
+       post-release: major version bump
+
+       This is for the master branch.
+
+       * configure.ac, m4/amversion.m4: Bump version to 1.12a.
+
+2012-04-25  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       Merge branch 'maint'
+
+       * maint:
+         post-release: minor version bump
+
+2012-04-25  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
        post-release: minor version bump
 
        This is for the maint branch.
index 0676618..aa52f60 100644 (file)
@@ -1,6 +1,6 @@
 # Maintainer makefile for Automake.  Requires GNU make.
 
-# Copyright (C) 2012 Free Software Foundation, Inc.
+# Copyright (C) 2012-2017 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/>.
 
+ifeq ($(filter bootstrap,$(MAKECMDGOALS)),)
+
 ifeq ($(wildcard Makefile),)
-  ifeq ($(filter bootstrap,$(MAKECMDGOALS)),bootstrap)
-    # Allow the user (or more likely the developer) to ask for a bootstrap
-    # of the package; of course, this can happen before configure is run,
-    # and in fact even before it is created.
-  else
-    # Else, If the user runs GNU make but has not yet run ./configure,
-    # give them an helpful diagnostic instead of a cryptic error.
-    $(warning There seems to be no Makefile in this directory.)
-    $(warning You must run ./configure before running 'make'.)
-    $(error Fatal Error)
-  endif
-else
-  include ./Makefile
-  include $(srcdir)/syntax-checks.mk
+  # Any target but 'bootstrap' specified in an unconfigured tree
+  # is an error, even when the user is running GNU make.
+  $(warning There seems to be no Makefile in this directory.)
+  $(warning You must run ./configure before running 'make'.)
+  $(error Fatal Error)
 endif
+include ./Makefile
+include $(srcdir)/maintainer/maint.mk
+include $(srcdir)/maintainer/syntax-checks.mk
+
+else # ! bootstrap in $(MAKECMDGOALS)
+
+other-targets := $(filter-out bootstrap,$(MAKECMDGOALS))
+config-status := $(wildcard ./config.status)
 
-# To allow bootstrapping also in an unconfigured tree.
-srcdir ?= .
-am__cd ?= CDPATH=. && unset CDPATH && cd
-AM_DEFAULT_VERBOSITY ?= 0
-V ?= $(AM_DEFAULT_VERBOSITY)
+BOOTSTRAP_SHELL ?= /bin/sh
+export BOOTSTRAP_SHELL
 
-ifeq ($(V),0)
-  AM_V_BOOTSTRAP = @echo "  BOOTSTRAP";
-  AM_V_CONFIGURE = @echo "  CONFIGURE";
-  AM_V_REMAKE    = @echo "  REMAKE";
-else
-  AM_V_BOOTSTRAP =
-  AM_V_CONFIGURE =
-  AM_V_REMAKE    =
+# Allow the user (or more likely the developer) to ask for a bootstrap
+# of the package.
+#
+# Two issues that must be kept in mind in the implementation below:
+#
+#  [1] "make bootstrap" can be invoked before 'configure' is run (and in
+#      fact, even before it is created, if we are bootstrapping from a
+#      freshly-cloned checkout).
+#
+#  [2] When re-bootstrapping an already configured tree, we must ensure
+#      that the automatic remake rules for Makefile and company do not
+#      kick in, because the tree might be in an inconsistent state (e.g.,
+#      we have just switched from 'maint' to 'master', and have the built
+#      'automake' script left from 'maint', but the files 'lib/am/*.am'
+#      are from 'master': if 'automake' gets run and uses those files --
+#      boom!).
+
+ifdef config-status # Bootstrap from an already-configured tree.
+  # We need the definition of $(srcdir) in the 'bootstrap' rule
+  # below.
+  srcdir := $(shell echo @srcdir@ | $(config-status) --file=-)
+  ifndef srcdir
+    $(error Could not obtain $$(srcdir) from $(config-status))
+  endif
+  # Also, if we are re-bootstrapping an already-configured tree, we
+  # want to re-configure it with the same pre-existing configuration.
+  old-configure-flags := $(shell $(config-status) --config)
+else # Assume we are bootstrapping from an unconfigured srcdir.
+  srcdir := .
+  old-configure-flags :=
 endif
 
-# Must be phony, not to be confused with the 'bootstrap' script.
+configure-flags := $(old-configure-flags) $(BOOTSTRAP_CONFIGURE_FLAGS)
+
 .PHONY: bootstrap
 bootstrap:
-       $(AM_V_BOOTSTRAP)$(am__cd) $(srcdir) && ./bootstrap.sh
-       $(AM_V_CONFIGURE)set -e; \
-       am__bootstrap_configure () { \
-         $(srcdir)/configure $${1+"$$@"} $(BOOTSTRAP_CONFIGURE_FLAGS); \
-       }; \
-       if test -f $(srcdir)/config.status; then \
-         : config.status should return a string properly quoted for eval; \
-         old_configure_flags=`$(srcdir)/config.status --config`; \
-       else \
-         old_configure_flags=""; \
-       fi; \
-       eval am__bootstrap_configure "$$old_configure_flags"
-       # The "make check" below is to ensure all the testsuite-required
-       # files are rebuilt.
-       $(AM_V_REMAKE)$(MAKE) clean && $(MAKE) check TESTS=t/get-sysconf
+       cd $(srcdir) && $(SHELL) ./bootstrap
+       $(srcdir)/configure $(configure-flags)
+       $(MAKE) clean
+       $(MAKE) check TESTS=t/get-sysconf
+
+# Ensure that all the specified targets but 'bootstrap' (if any) are
+# run with a properly re-bootstrapped tree.
+ifdef other-targets
+$(other-targets): restart
+.PHONY: $(other-targets) restart
+restart: bootstrap; $(MAKE) $(AM_MAKEFLAGS) $(other-targets)
+endif
+
+endif # ! bootstrap in $(MAKECMDGOALS)
diff --git a/HACKING b/HACKING
index 6966384..e34870b 100644 (file)
--- a/HACKING
+++ b/HACKING
@@ -1,10 +1,10 @@
-================================================================
+============================================================================
 = This file
 
 * This file attempts to describe the rules to use when hacking
   automake.
 
-================================================================
+============================================================================
 = Administrivia
 
 * The correct response to most actual bugs is to write a new test case
   and check everything in.
 
 * If you incorporate a change from somebody on the net:
-  First, if it is a large change, you must make sure they have signed the
-  appropriate paperwork.
-  Second, be sure to add their name and email address to THANKS
+  - First, if it is a large change, you must make sure they have
+    signed the appropriate paperwork.
+  - Second, be sure to add their name and email address to THANKS.
 
 * If a change fixes a test, mention the test in the commit message.
   If a change fixes a bug registered in the Automake debbugs tracker,
   mention the bug number in the commit message.
 
 * If somebody reports a new bug, mention his name in the commit message
-  and in the test case you write.  Put him into THANKS.
+  that fixes or exposes the bug, and put him into THANKS.
 
 * When documenting a non-trivial idiom or example in the manual, be
   sure to add a test case for it, and to reference such test case from
   which should be updated by hand whenever the GPL gets updated (which
   shouldn't happen that often anyway :-)
 
-* Changes other than bug fixes must be mentioned in NEWS.  Important
-  bug fixes should be mentioned in NEWS, too.
+* Changes other than *trivial* bug fixes must be mentioned in NEWS.
 
-================================================================
+* Changes which are potentially controversial, require a non-trivial
+  plan, or must be implemented gradually with a roadmap spanning several
+  releases (either minor or major) should be discussed on the list,
+  and have a proper entry in the PLANS directory.  This entry should be
+  always committed in the "maint" branch, even if the change it deals
+  with is only for the master branch, or a topic branch.  Usually, in
+  addition to this, it is useful to open a "wishlist" report on the
+  Automake debbugs tracker, to keep the idea more visible, and have the
+  discussions surrounding it easily archived in a central place.
+
+============================================================================
 = Naming
 
-* We've adopted the convention that internal AC_SUBSTs should be
-  named with a leading 'am__', and internally generated targets
-  should be named with a leading 'am--'.  This convention, although
-  in place from at least February 2001, isn't yet universally used.
+* We've adopted the convention that internal AC_SUBSTs and make variables
+  should be named with a leading 'am__', and internally generated targets
+  should be named with a leading 'am--'.  This convention, although in
+  place from at least February 2001, isn't yet universally used.
   But all new code should use it.
 
-  We used to use '_am_' as the prefix for an internal AC_SUBST.
+  We used to use '_am_' as the prefix for an internal AC_SUBSTs.
   However, it turns out that NEWS-OS 4.2R complains if a Makefile
   variable begins with the underscore character.  Yay for them.
   I changed the target naming convention just to be safe.
 
-================================================================
+============================================================================
 = Editing '.am' files
 
 * Always use $(...) and not ${...}
 
-* Use ':', not 'true'.  Use 'exit 1', not 'false'.
+* Prefer ':' over 'true', mostly for consistency with existing code.
 
-* Use '##' comments liberally.  Comment anything even remotely
-  unusual.
+* Use '##' comments liberally.  Comment anything even remotely unusual.
 
-* Never use basename or dirname.  Instead use sed.
+* Never use basename or dirname.  Instead, use sed.
 
 * Do not use 'cd' within back-quotes, use '$(am__cd)' instead.
   Otherwise the directory name may be printed, depending on CDPATH.
   computed with CDPATH.
 
 * For install and uninstall rules, if a loop is required, it should be
-  silent.  Then the body of the loop itself should print each
-  "important" command it runs.  The printed commands should be preceded
-  by a single space.
+  silent.  Then the body of the loop itself should print each "important"
+  command it runs.  The printed commands should be preceded by a single
+  space.
 
 * Ensure install rules do not create any installation directory where
   nothing is to be actually installed.  See automake bug#11030.
 
-================================================================
+============================================================================
 = Editing automake.in and aclocal.in
 
 * Indent using GNU style.  For historical reasons, the perl code
   default), and other portions using the GNU style (cperl-mode's
   default).  Write new code using GNU style.
 
-* Don't use & for function calls, unless required.
+* Don't use & for function calls, unless really required.
   The use of & prevents prototypes from being checked.
-  Just as above, don't change massively all the code to strip the
-  &, just convert the old code as you work on it, and write new
-  code without.
 
-================================================================
+============================================================================
+= Automake versioning and compatibility scheme
+
+* There are three kinds of automake releases:
+
+    - new major releases (e.g., 2.0, 5.0)
+    - new minor releases (e.g., 1.14, 2.1)
+    - micro a.k.a. "bug-fixing" releases (e.g., 1.13.2, 2.0.1, 3.5.17).
+
+  A new major release should have the major version number bumped, and
+  the minor and micro version numbers reset to zero.  A new minor release
+  should have the major version number unchanged, the minor version number
+  bumped, and the micro version number reset to zero.  Finally, a new
+  micro version should have the major and minor version numbers unchanged,
+  and the micro version number bumped by one.
+
+  For example, the first minor version after 1.13.2 will be 1.14; the
+  first bug-fixing version after 1.14 that will be 1.14.1; the first
+  new major version after all such releases will be 2.0; the first
+  bug-fixing version after 2.0 will be 2.0.1; and a further bug-fixing
+  version after 2.0.1 will be 2.0.2.
+
+* Micro releases should be just bug-fixing releases; no new features
+  should be added, and ideally, only trivial bugs, recent regressions,
+  or documentation issues should be addressed by them.  On the other
+  hand, it's OK to include testsuite work and even testsuite refactoring
+  in a micro version, since a regression there is not going to annoy or
+  inconvenience Automake users, but only the Automake developers.
+
+* Minor releases can introduce new "safe" features, do non-trivial but
+  mostly safe code clean-ups, and even add new runtime warnings (rigorously
+  non-fatal).  But they shouldn't include any backward incompatible change,
+  nor contain any potentially destabilizing refactoring or sweeping change,
+  nor introduce new features whose implementation might be liable to cause
+  bugs or regressions in existing code.  However, it might be acceptable to
+  introduce very limited and localized backward-incompatibilities, *only*
+  if that is necessary to fix non-trivial bugs, address serious performance
+  issues, or greatly enhance usability.  But please, do this sparsely and
+  rarely!
+
+* Major releases can introduce backward-incompatibilities (albeit such
+  incompatibilities should be announced well in advance, and a smooth
+  transition plan prepared for them), and try more risking and daring
+  refactorings and code cleanups.
+
+* For more information, refer to the extensive discussion associated
+  with automake bug#13578.
+
+============================================================================
 = Working with git
 
 * To regenerate dependent files created by aclocal and automake,
-  use the 'bootstrap.sh' script.  It uses the code from the source
+  use the 'bootstrap' script.  It uses the code from the source
   tree, so the resulting files (aclocal.m4 and Makefile.in) should
   be the same as you would get if you install this version of
   automake and use it to generate those files.  Be sure to have the
   latest stable version of Autoconf installed and available early
   in your PATH.
 
-* The Automake git tree currently carries two basic branches: 'master' for
-  the current development, and 'maint' for maintenance and bug fixes.  The
-  maint branch should be kept regularly merged into the master branch.
-  It is advisable to merge only after a set of related commits have been
-  applied, to avoid introducing too much noise in the history.
+* The Automake git tree currently carries three basic branches: 'micro',
+  'maint' and 'master'.
+
+* The 'micro' branch, reserved to changes that should go into the next
+  micro release; so it will just see fixes for regressions, trivial
+  bugs, or documentation issues, and no "active" development whatsoever.
+  Since emergency regression-fixing or security releases could be cut
+  from this branch at any time, it should always be kept in a releasable
+  state.
+
+* The 'maint' branch is where the development of the next minor release
+  takes place.  It should be kept in a stable, almost-releasable state,
+  to simplify testing and deploying of new minor version.  Note that
+  this is not a hard rule, and such "stability" is not expected to be
+  absolute (emergency releases are cut from the 'micro' branch anyway).
+
+* The 'master' branch is reserved for the development of the next major
+  release.  Experimenting a little is OK here, but don't let the branch
+  grow too unstable; if you need to do exploratory programming or
+  over-arching change, you should use a dedicated topic branch, and
+  only merge that back once it is reasonably stable.
+
+* The 'micro' branch should be kept regularly merged into the 'maint'
+  branch, and the 'maint' branch into the 'master' branch.  It is advisable
+  to merge only after a set of related commits have been applied, to avoid
+  introducing too much noise in the history.
 
 * There may be a number of longer-lived feature branches for new
   developments.  They should be based off of a common ancestor of all
   active branches to which the feature should or might be merged later.
-  in the future, we might introduce a special branch named 'next' that
-  may serve as common ground for feature merging and testing, should
-  they not yet be ready for master.
 
-* After a major release is done, the master branch is to be merged into
-  the maint branch, and then a "new" master branch created stemming
-  from the resulting commit.
+* After a new minor release is done, the 'maint' branch is to be merged
+  into the 'micro' branch, and then a "new" 'maint' branch created
+  stemming from the resulting commit.
+  Similarly, after a new major release is done, the 'master' branch is to
+  be merged into both the 'micro' and 'maint' branches, and then "new"
+  'master' branch created stemming from the resulting commit.
 
 * When fixing a bug (especially a long-standing one), it may be useful
   to commit the fix to a new temporary branch based off the commit that
   the active branches descending from the buggy commit.  This offers a
   simple way to fix the bug consistently and effectively.
 
-* For merges from branches other than maint, prefer 'git merge --log' over
-  plain 'git merge', so that a later 'git log' gives an indication of which
-  actual patches were merged even when they don't appear early in the list.
+* When merging, prefer 'git merge --log' over plain 'git merge', so that
+  a later 'git log' gives an indication of which actual patches were
+  merged even when they don't appear early in the list.
 
-* master and release branches should not be rewound, i.e., should always
-  fast-forward, except maybe for privacy issues.  The maint branch should not
-  be rewound except maybe after retiring a release branch or a new stable
-  release.  For next, and for feature branches, the announcement for the
-  branch should document rewinding policy.
+* The 'master', 'maint' and 'micro' branches should not be rewound, i.e.,
+  should always fast-forward, except maybe for privacy issues.  For
+  feature branches, the announcement for the branch should document
+  the rewinding policy.
+  If a topic branch is expected to be rewound, it is good practice to put
+  it in the 'experimental/*' namespace; for example, a rewindable branch
+  dealing with Vala support could be named like "experimental/vala-work".
 
-================================================================
+============================================================================
 = Writing a good commit message
 
 * Here is the general format that Automake's commit messages are expected
       <reference to relevant bugs, if any>
 
       Here goes a more detailed explanation of why the commit is needed,
-      and a general overview of what it does, and how.  This section is
-      optional, but you are expected to provide it more often than not.
+      and a general overview of what it does, and how.  This section
+      should almost always be provided, possibly only with the expection
+      of obvious fixes or very trivial changes.
 
       And if the detailed explanation is quite long or detailed, you can
       want to break it in more paragraphs.
 
       <detailed list of touched files>
 
-* The <detailed list of touched files> is mandatory but for the most
-  trivial changes, and should follows the GNU guidelines for ChangeLog
-  entries (described explicitly in the GNU Coding Standards); it might
-  be something of this sort:
+* The <detailed list of touched files> should usually be provided (but
+  for short or trivial changes), and should follow the GNU guidelines
+  for ChangeLog entries (described explicitly in the GNU Coding
+  Standards); it might be something of this sort:
 
     * some/file (func1): Improved frobnication.
     (func2): Adjusted accordingly.
       ... removed in commit 'v1.11-1674-g02e9072' of 01-01-2012,
       "dist: ditch support for lzma"...
 
-================================================================
+============================================================================
 = Test suite
 
 * Use "make check" and "make maintainer-check" liberally.
 
-* Make sure each test file is executable.
-
 * Export the 'keep_testdirs' environment variable to "yes" to keep
   test directories for successful tests also.
 
 
 * See file 't/README' for more information.
 
-================================================================
+============================================================================
 = Release procedure
 
 * The steps outlined here are meant to be followed for alpha and stable
   date.  The maintainer-only target "update-copyright" can help with
   this.
 
-* Update NEWS.
+* Check NEWS; in particular, ensure that all the relevant differences
+  with the last release are actually reported.
 
 * Update the version number in configure.ac.
   (The idea is that every other alpha number will be a net release.
   The repository will always have its own "odd" number so we can easily
   distinguish net and repo versions.)
 
-* Run this:
-  ./bootstrap.sh && ./configure && make && make check && make distcheck
+* Run these commands, in this order:
+
+    make bootstrap
+    make check keep_testdirs=yes
+    make maintainer-check
+    make distcheck
+    make check-no-trailing-backslash-in-recipes
+    make check-cc-no-c-o
+
+  It is also advised to run "git clean -fdx" before invoking the
+  bootstrap, to ensure a really clean rebuild.  However, it must
+  be done carefully, because that command will remove *all* the
+  files that are not tracked by git!
 
 * Run "make git-tag-release".
   This will run the maintainer checks, verify that the local git
   locations.  In case you need to sign with a non-default key, you can
   use "make GNUPLOADFLAGS='--user KEY' git-upload-release".
 
-* Update version number in configure.ac to next alpha number.
-  Re-run ./bootstrap.sh and commit.
+* For stable releases you'll have to update the manuals at www.gnu.org.
 
-* Don't forget to "git push" your changes so they appear in the public
-  git tree.
+  - Generate manuals (with the help of the standard gendocs.sh script):
+
+       make web-manual
+
+    The ready-to-be-uploaded manuals (in several formats) will be left
+    in the 'doc/web-manuals' directory.
+
+  - Commit the updated manuals to web CVS:
+
+      make web-manual-update
+
+    If your local username is different from your username at Savannah,
+    you'll have to override the 'CVS_USER' make variable accordingly;
+    for example:
+
+      make web-manual-update CVS_USER=slattarini
 
-* For stable releases, update the manuals at www.gnu.org:
-  - Generate manuals:
-    cd doc
-    wget "http://savannah.gnu.org/cgi-bin/viewcvs/~checkout~/texinfo/texinfo/util/gendocs.sh"
-    wget "http://savannah.gnu.org/cgi-bin/viewcvs/~checkout~/texinfo/texinfo/util/gendocs_template"
-    sh ./gendocs.sh --email bug-automake@gnu.org automake "GNU Automake"
-  - copy manuals recursively to web cvs,
-  - commit.
   - Check for link errors, fix them, recheck until convergence:
     <http://validator.w3.org/checklink>
 
-* Send the announcement at least to <autotools-announce@gnu.org> and
-  <automake@gnu.org>.  If the release is a stable one, the announcement
-  must also go to <info-gnu@gnu.org>; if it is an alpha or beta release,
-  announcement should be sent also to <platform-testers@gnu.org>, to
-  maximize the possibility of early testing on exotic or proprietary
-  systems.  Finally, copy the announcement into the NEWS feed at
+* Create an announcement message with "make announcement".  Edit the
+  generated 'announcement' file appropriately, in particularly filling
+  in by hand any "TODO" left in there.
+
+* Update version number in configure.ac to next alpha number.
+  Re-run ./bootstrap and commit.
+
+* Don't forget to "git push" your changes so they appear in the public
+  git tree.
+
+* Send the announcement generated in the earlier steps at least to
+  <autotools-announce@gnu.org> and <automake@gnu.org>.  If the release
+  is a stable one, the announcement must also go to <info-gnu@gnu.org>;
+  if it is an alpha or beta release, announcement should be sent also
+  to <platform-testers@gnu.org>, to maximize the possibility of early
+  testing on exotic or proprietary systems.  Finally, copy an abridged
+  version of the announcement into the NEWS feed at:
   <https://savannah.gnu.org/projects/automake>.
+  Be sure to link a  version to the complete announcement (from
+  the version you sent to the automake list, as get archived on
+  <http://lists.gnu.org/archive/html/automake/>).
 
 -----
 
-Copyright (C) 2003-2012 Free Software Foundation, Inc.
+Copyright (C) 2003-2017 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
diff --git a/INSTALL b/INSTALL
index 6e90e07..2099840 100644 (file)
--- a/INSTALL
+++ b/INSTALL
@@ -1,7 +1,7 @@
 Installation Instructions
 *************************
 
-Copyright (C) 1994-1996, 1999-2002, 2004-2012 Free Software Foundation,
+Copyright (C) 1994-1996, 1999-2002, 2004-2013 Free Software Foundation,
 Inc.
 
    Copying and distribution of this file, with or without modification,
@@ -12,8 +12,8 @@ without warranty of any kind.
 Basic Installation
 ==================
 
-   Briefly, the shell commands `./configure; make; make install' should
-configure, build, and install this package.  The following
+   Briefly, the shell command `./configure && make && make install'
+should configure, build, and install this package.  The following
 more-detailed instructions are generic; see the `README' file for
 instructions specific to this package.  Some packages provide this
 `INSTALL' file but do not implement all of the features documented
index 57a2137..cfe4dd4 100644 (file)
@@ -2,7 +2,7 @@
 
 ## Makefile for Automake.
 
-# Copyright (C) 1995-2012 Free Software Foundation, Inc.
+# Copyright (C) 1995-2017 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
@@ -22,11 +22,22 @@ CLEANFILES =
 DISTCLEANFILES =
 MAINTAINERCLEANFILES =
 EXTRA_DIST =
+TAGS_FILES =
+dist_noinst_DATA =
+nodist_noinst_DATA =
+dist_noinst_SCRIPTS =
+nodist_noinst_SCRIPTS =
 
 ## ------------ ##
 ##  Top level.  ##
 ## ------------ ##
 
+EXTRA_DIST += \
+  bootstrap \
+  GNUmakefile \
+  HACKING \
+  PLANS
+
 # We want a handful of substitutions to be fully-expanded by make;
 # then use config.status to substitute the remainder where a single
 # expansion is sufficient.  We use a funny notation here to avoid
@@ -58,55 +69,14 @@ generated_file_finalize = $(AM_V_at) \
   fi; \
   chmod a-w $@-t && mv -f $@-t $@
 
-bin_SCRIPTS = automake aclocal
-
-CLEANFILES += $(bin_SCRIPTS)
-AUTOMAKESOURCES = automake.in aclocal.in
-
-TAGS_FILES = $(AUTOMAKESOURCES)
-
-EXTRA_DIST += \
-  $(AUTOMAKESOURCES) \
-  bootstrap.sh \
-  GNUmakefile \
-  syntax-checks.mk \
-  HACKING
+# For some tests or targets, we need to have the just-build automake and
+# aclocal scripts avaiable on PATH.
+extend_PATH = \
+  { PATH='$(abs_builddir)/t/wrap$(PATH_SEPARATOR)'$$PATH && export PATH; }
 
-## Make versioned links.  We only run the transform on the root name;
-## then we make a versioned link with the transformed base name.  This
-## seemed like the most reasonable approach.
-install-exec-hook:
-       @$(POST_INSTALL)
-       @for p in $(bin_SCRIPTS); do \
-         f="`echo $$p|sed '$(transform)'`"; \
-         fv="$$f-$(APIVERSION)"; \
-         rm -f "$(DESTDIR)$(bindir)/$$fv"; \
-         echo " $(LN) '$(DESTDIR)$(bindir)/$$f' '$(DESTDIR)$(bindir)/$$fv'"; \
-         $(LN) "$(DESTDIR)$(bindir)/$$f" "$(DESTDIR)$(bindir)/$$fv"; \
-       done
-
-uninstall-hook:
-       @for p in $(bin_SCRIPTS); do \
-         f="`echo $$p|sed '$(transform)'`"; \
-         fv="$$f-$(APIVERSION)"; \
-         rm -f "$(DESTDIR)$(bindir)/$$fv"; \
-       done
-
-## These files depend on Makefile so they are rebuilt if $(VERSION),
-## $(datadir) or other do_subst'ituted variables change.
-automake: automake.in
-aclocal: aclocal.in
-automake aclocal: Makefile
-       $(AM_V_at)rm -f $@ $@-t
-       $(AM_V_GEN)in=$@.in; $(do_subst) <$(srcdir)/$@.in >$@-t
-## We can't use '$(generated_file_finalize)' here, because currently
-## Automake contains occurrences of unexpanded @substitutions@ in
-## comments, and that is perfectly legit.
-       $(AM_V_at)chmod a+x,a-w $@-t && mv -f $@-t $@
-
-## The master location for INSTALL is lib/INSTALL.
-## This is where "make fetch" will install new versions.
-## Make sure we also update this copy.
+# The master location for INSTALL is lib/INSTALL.
+# This is where "make fetch" will install new versions.
+# Make sure we also update this copy.
 INSTALL: lib/INSTALL
        $(AM_V_GEN)cp $(srcdir)/lib/INSTALL $@
 
@@ -115,422 +85,14 @@ INSTALL: lib/INSTALL
 maintainer-clean-local:
        rm -rf .autom4te.cache
 
+# So that automake won't complain about the missing ChangeLog.
+# The real rule for ChangeLog generation is now in maintainer/maint.mk
+# (as it is maintainer-specific).
+ChangeLog:
 
-## -------------------------------------------------------------------- ##
-##  Auxiliary scripts and files for use with "automake --add-missing".  ##
-## -------------------------------------------------------------------- ##
-
-dist_pkgvdata_DATA = \
-  lib/COPYING \
-  lib/INSTALL \
-  lib/texinfo.tex
-
-## These must all be executable when installed.  However, if we use
-## _SCRIPTS, then the program transform will be applied, which is not
-## what we want.  So we make them executable by hand.
-dist_script_DATA = \
-  lib/config.guess \
-  lib/config.sub \
-  lib/install-sh \
-  lib/mdate-sh \
-  lib/missing \
-  lib/mkinstalldirs \
-  lib/elisp-comp \
-  lib/ylwrap \
-  lib/depcomp \
-  lib/compile \
-  lib/py-compile \
-  lib/ar-lib \
-  lib/test-driver \
-  lib/tap-driver.sh \
-  lib/tap-driver.pl
-
-install-data-hook:
-       @$(POST_INSTALL)
-       @for f in $(dist_script_DATA); do echo $$f; done \
-         | sed 's,^lib/,,' \
-         | ( st=0; \
-             while read f; do \
-               echo " chmod +x '$(DESTDIR)$(scriptdir)/$$f'"; \
-               chmod +x "$(DESTDIR)$(scriptdir)/$$f" || st=1; \
-             done; \
-             exit $$st )
-
-installcheck-local: installcheck-executable-scripts
-installcheck-executable-scripts:
-       @for f in $(dist_script_DATA); do echo $$f; done \
-         | sed 's,^lib/,,' \
-         | while read f; do \
-             path="$(pkgvdatadir)/$$f"; \
-             test -x "$$path" || echo $$path; \
-           done \
-         | sed 's/$$/: not executable/' \
-         | grep . 1>&2 && exit 1; exit 0
-
-
-## ---------------------------------------------------- ##
-##  Private perl modules used by automake and aclocal.  ##
-## ---------------------------------------------------- ##
-
-perllibdir = $(pkgvdatadir)/Automake
-dist_perllib_DATA = \
-  lib/Automake/ChannelDefs.pm \
-  lib/Automake/Channels.pm \
-  lib/Automake/Condition.pm \
-  lib/Automake/Configure_ac.pm \
-  lib/Automake/DisjConditions.pm \
-  lib/Automake/FileUtils.pm \
-  lib/Automake/General.pm \
-  lib/Automake/Getopt.pm \
-  lib/Automake/Item.pm \
-  lib/Automake/ItemDef.pm \
-  lib/Automake/Location.pm \
-  lib/Automake/Options.pm \
-  lib/Automake/Rule.pm \
-  lib/Automake/RuleDef.pm \
-  lib/Automake/Variable.pm \
-  lib/Automake/VarDef.pm \
-  lib/Automake/Version.pm \
-  lib/Automake/XFile.pm \
-  lib/Automake/Wrap.pm
-
-nodist_perllib_DATA = lib/Automake/Config.pm
-CLEANFILES += $(nodist_perllib_DATA)
-
-lib/Automake/Config.pm: lib/Automake/Config.in Makefile
-       $(AM_V_at)rm -f $@ $@-t
-       $(AM_V_at)test -d lib/Automake || $(MKDIR_P) lib/Automake
-       $(AM_V_GEN)in=Config.in \
-         && $(do_subst) <$(srcdir)/lib/Automake/Config.in >$@-t
-       $(generated_file_finalize)
-EXTRA_DIST += lib/Automake/Config.in
-
-
-## --------------------- ##
-##  Makefile fragments.  ##
-## --------------------- ##
-
-dist_am_DATA = \
-  lib/am/check.am \
-  lib/am/check2.am \
-  lib/am/clean-hdr.am \
-  lib/am/clean.am \
-  lib/am/compile.am \
-  lib/am/configure.am \
-  lib/am/data.am \
-  lib/am/dejagnu.am \
-  lib/am/depend.am \
-  lib/am/depend2.am \
-  lib/am/distdir.am \
-  lib/am/footer.am \
-  lib/am/header-vars.am \
-  lib/am/header.am \
-  lib/am/install.am \
-  lib/am/inst-vars.am \
-  lib/am/java.am \
-  lib/am/lang-compile.am \
-  lib/am/lex.am \
-  lib/am/library.am \
-  lib/am/libs.am \
-  lib/am/libtool.am \
-  lib/am/lisp.am \
-  lib/am/ltlib.am \
-  lib/am/ltlibrary.am \
-  lib/am/mans-vars.am \
-  lib/am/mans.am \
-  lib/am/program.am \
-  lib/am/progs.am \
-  lib/am/python.am \
-  lib/am/remake-hdr.am \
-  lib/am/scripts.am \
-  lib/am/subdirs.am \
-  lib/am/tags.am \
-  lib/am/texi-vers.am \
-  lib/am/texibuild.am \
-  lib/am/texinfos.am \
-  lib/am/vala.am \
-  lib/am/yacc.am
-
-
-## ------------------------------ ##
-##  Automake-provided m4 macros.  ##
-## ------------------------------ ##
-
-dist_automake_ac_DATA = \
-  m4/amversion.m4 \
-  m4/ar-lib.m4 \
-  m4/as.m4 \
-  m4/auxdir.m4 \
-  m4/ccstdc.m4 \
-  m4/cond.m4 \
-  m4/cond-if.m4 \
-  m4/depend.m4 \
-  m4/depout.m4 \
-  m4/dmalloc.m4 \
-  m4/gcj.m4 \
-  m4/header.m4 \
-  m4/init.m4 \
-  m4/install-sh.m4 \
-  m4/lead-dot.m4 \
-  m4/lex.m4 \
-  m4/lispdir.m4 \
-  m4/maintainer.m4 \
-  m4/make.m4 \
-  m4/minuso.m4 \
-  m4/missing.m4 \
-  m4/mkdirp.m4 \
-  m4/obsol-gt.m4 \
-  m4/obsol-lt.m4 \
-  m4/obsolete.m4 \
-  m4/options.m4 \
-  m4/protos.m4 \
-  m4/python.m4 \
-  m4/runlog.m4 \
-  m4/sanity.m4 \
-  m4/silent.m4 \
-  m4/strip.m4 \
-  m4/substnot.m4 \
-  m4/tar.m4 \
-  m4/upc.m4 \
-  m4/vala.m4
-
-dist_system_ac_DATA = m4/acdir/README
-
-# We build amversion.m4 here, instead of from config.status,
-# because config.status is rerun each time one of configure's
-# dependencies change and amversion.m4 happens to be a configure
-# dependency.  configure and amversion.m4 would be rebuilt in
-# loop otherwise.
-# Use '$(top_srcdir)/m4' for the benefit of non-GNU makes: this is
-# how amversion.m4 appears in our dependencies.
-$(top_srcdir)/m4/amversion.m4: $(srcdir)/configure.ac $(srcdir)/m4/amversion.in
-       $(AM_V_at)rm -f $@-t $@
-       $(AM_V_GEN)in=amversion.in \
-         && $(do_subst) <$(srcdir)/m4/amversion.in >$@-t
-       $(generated_file_finalize)
-EXTRA_DIST += m4/amversion.in
-
-
-## ------------ ##
-##  Testsuite.  ##
-## ------------ ##
-
-# Run the tests with a proper shell detected at configure time.
-LOG_COMPILER = $(AM_TEST_RUNNER_SHELL)
-
-TEST_EXTENSIONS = .pl .sh .tap
-SH_LOG_COMPILER = $(LOG_COMPILER)
-TAP_LOG_COMPILER = $(LOG_COMPILER)
-PL_LOG_COMPILER = $(PERL)
-AM_PL_LOG_FLAGS = -Mstrict -I $(builddir)/lib -I $(srcdir)/lib -w
-
-TAP_LOG_DRIVER = AM_TAP_AWK='$(AWK)' $(SHELL) $(srcdir)/lib/tap-driver.sh
-
-AM_TAP_LOG_DRIVER_FLAGS = --merge
-
-EXTRA_DIST += t/README t/ax/is
-
-TESTS = ## Will be updated later.
-
-# Some testsuite-influential variables should be overridable from the
-# test scripts, but not from the environment.
-AM_TESTS_ENVIRONMENT = \
-  for v in \
-    me \
-    required \
-    am_using_tap \
-    am_serial_tests \
-    am_test_prefer_config_shell \
-    am_original_AUTOMAKE \
-    am_original_ACLOCAL \
-  ; do \
-    eval test x"\$${$$v}" = x || unset $$v; \
-  done;
-# The 'AM_TESTS_REEXEC=no' setting tells the tests not to needlessly
-# re-execute themselves with the shell detected at configure time, since
-# we are already running them under it explicitly in our setup (see e.g.
-# the definition of TEST_LOG_COMPILER above).
-AM_TESTS_ENVIRONMENT += AM_TESTS_REEXEC=no; export AM_TESTS_REEXEC;
-# We want warning messages and explanations for skipped tests to go to
-# the console if possible, so set up 'stderr_fileno_' properly.
-AM_TESTS_FD_REDIRECT = 9>&2
-AM_TESTS_ENVIRONMENT += stderr_fileno_=9; export stderr_fileno_;
-
-# Hand-written tests.
-
-include $(srcdir)/t/list-of-tests.mk
-
-TESTS += $(handwritten_TESTS)
-EXTRA_DIST += $(handwritten_TESTS)
-
-# Automatically-generated tests wrapping hand-written ones.
-# Also, automatically-computed dependencies for tests.
-
-include $(srcdir)/t/testsuite-part.am
-
-TESTS += $(generated_TESTS)
-EXTRA_DIST += $(generated_TESTS)
-
-$(srcdir)/t/testsuite-part.am:
-       $(AM_V_at)rm -f t/testsuite-part.tmp $@
-       $(AM_V_GEN)$(PERL) $(srcdir)/gen-testsuite-part \
-         --srcdir $(srcdir) > t/testsuite-part.tmp
-       $(AM_V_at)chmod a-w t/testsuite-part.tmp
-       $(AM_V_at)mv -f t/testsuite-part.tmp $@
-EXTRA_DIST += gen-testsuite-part
-
-## The dependecies declared here are not truly complete, but such
-## completeness would cause more issues than it would solve.  See
-## automake bug#11347.
-$(generated_TESTS): $(srcdir)/gen-testsuite-part
-$(srcdir)/t/testsuite-part.am: $(srcdir)/gen-testsuite-part Makefile.am
-
-# Static dependencies valid for each test case.
-check_SCRIPTS = t/wrap/aclocal-$(APIVERSION) t/wrap/automake-$(APIVERSION)
-dist_check_DATA = t/ax/plain-functions.sh t/ax/tap-functions.sh
-check_DATA = defs defs-static
-
-# Few more static dependencies.
-t/distcheck-missing-m4.log: t/ax/distcheck-hook-m4.am
-t/distcheck-outdated-m4.log: t/ax/distcheck-hook-m4.am
-EXTRA_DIST += t/ax/distcheck-hook-m4.am
-
-defs-static: defs-static.in Makefile
-       $(AM_V_at)rm -f $@ $@-t
-       $(AM_V_GEN)in=defs-static.in\
-         && $(do_subst) <$(srcdir)/defs-static.in >$@-t
-       $(generated_file_finalize)
-EXTRA_DIST += defs-static.in
-CLEANFILES += defs-static
-
-# If two test scripts have the same basename, they will end up sharing
-# the same log file, leading to all sort of undefined and undesired
-# behaviours.
-check-no-repeated-test-name:
-       @LC_ALL=C; export LC_ALL; \
-        lst='$(TEST_LOGS)'; for log in $$lst; do echo $$log; done \
-          | sort | uniq -c | awk '($$1 > 1) { print }' \
-          | sed 's/\.log$$//' | grep . >&2 \
-          && { \
-            echo $@: test names listed above are duplicated >&2; \
-            exit 1; \
-          }; :
-check-local: check-no-repeated-test-name
-.PHONY: check-no-repeated-test-name
-
-## Checking the list of tests.
-test_subdirs = t t/pm t/perf
-include $(srcdir)/t/CheckListOfTests.am
-
-# Run the testsuite with the installed aclocal and automake.
-installcheck-local: installcheck-testsuite
-installcheck-testsuite:
-       am_running_installcheck=yes $(MAKE) $(AM_MAKEFLAGS) check
-
-clean-local: clean-local-check
-.PHONY: clean-local-check
-clean-local-check:
-       -set x t/*.dir; shift; \
-        if test "$$#,$$1" = "1,*.dir"; then \
-          : there is no test directory to clean; \
-        else \
-          find "$$@" -type d ! -perm -700 -exec chmod u+rwx {} ';'; \
-          rm -rf "$$@"; \
-        fi;
-
-
-## ---------------- ##
-##  Documentation.  ##
-## ---------------- ##
-
-info_TEXINFOS = doc/automake.texi doc/automake-history.texi
-doc_automake_TEXINFOS = doc/fdl.texi
-doc_automake_history_TEXINFOS = doc/fdl.texi
-
-man1_MANS = \
-  doc/aclocal.1 \
-  doc/automake.1 \
-  doc/aclocal-$(APIVERSION).1 \
-  doc/automake-$(APIVERSION).1
-
-$(man1_MANS): $(srcdir)/configure.ac
-
-CLEANFILES += $(man1_MANS)
-EXTRA_DIST += doc/help2man
-
-update_mans = \
-  $(AM_V_GEN): \
-    && $(MKDIR_P) doc \
-    && PATH="$(abs_builddir)/t/wrap$(PATH_SEPARATOR)$$PATH" \
-    && export PATH \
-    && $(PERL) $(srcdir)/doc/help2man --output=$@
-
-doc/aclocal.1 doc/automake.1:
-       $(AM_V_GEN): \
-         && $(MKDIR_P) doc \
-         && f=`echo $@ | sed 's|.*/||; s|\.1$$||; $(transform)'` \
-         && echo ".so man1/$$f-$(APIVERSION).1" > $@
-
-doc/aclocal-$(APIVERSION).1: aclocal.in aclocal lib/Automake/Config.pm
-       $(update_mans) aclocal-$(APIVERSION)
-doc/automake-$(APIVERSION).1: automake.in automake lib/Automake/Config.pm
-       $(update_mans) automake-$(APIVERSION)
-
-
-## ---------------------------- ##
-##  Example package "amhello".  ##
-## ---------------------------- ##
-
-amhello_sources = \
-  doc/amhello/configure.ac \
-  doc/amhello/Makefile.am \
-  doc/amhello/README \
-  doc/amhello/src/main.c \
-  doc/amhello/src/Makefile.am
-
-amhello_configury = \
-  aclocal.m4 \
-  autom4te.cache \
-  Makefile.in \
-  config.h.in \
-  configure \
-  depcomp \
-  install-sh \
-  missing \
-  src/Makefile.in
-
-dist_noinst_DATA = $(amhello_sources)
-dist_doc_DATA = $(srcdir)/doc/amhello-1.0.tar.gz
-
-# We depend on configure.ac so that we regenerate the tarball
-# whenever the Automake version changes.
-# aclocal-$(APIVERSION) and automake-$(APIVERSION) are generated by
-# configure in 't/wrap'.
-$(srcdir)/doc/amhello-1.0.tar.gz: $(amhello_sources) $(srcdir)/configure.ac
-       $(AM_V_GEN): \
-         && PATH="$(abs_top_builddir)/t/wrap$(PATH_SEPARATOR)$$PATH" \
-         && export PATH \
-         && $(am__cd) $(srcdir)/doc/amhello \
-         && ACLOCAL=aclocal-$(APIVERSION) && export ACLOCAL \
-         && AUTOMAKE=automake-$(APIVERSION) && export AUTOMAKE \
-         && AUTOCONF='$(am_AUTOCONF)' && export AUTOCONF \
-         && AUTOM4TE='$(am_AUTOM4TE)' && export AUTOM4TE \
-         && AUTORECONF='$(am_AUTORECONF)' && export AUTORECONF \
-         && AUTOHEADER='$(am_AUTOHEADER)' && export AUTOHEADER \
-         && AUTOUPDATE='$(am_AUTOUPDATE)' && export AUTOUPDATE \
-         && $(am_AUTORECONF) -vfi \
-         && ./configure \
-         && $(MAKE) $(AM_MAKEFLAGS) distcheck \
-         && $(MAKE) $(AM_MAKEFLAGS) distclean \
-         && rm -rf $(amhello_configury) \
-         && mv -f amhello-1.0.tar.gz ..
-
-
-## ------------------------------------------------- ##
-##  Third-party, obsolescent or experimental stuff.  ##
-## ------------------------------------------------- ##
-
+# Third-party, obsolescent or experimental stuff.
 EXTRA_DIST += \
+  contrib/tap-driver.pl \
   contrib/check-html.am \
   contrib/multilib/README \
   contrib/multilib/config-ml.in \
@@ -539,11 +101,7 @@ EXTRA_DIST += \
   contrib/multilib/multi.m4 \
   contrib/README
 
-
-## --------------------------------------------------- ##
-##  Older files, kept mostly for historical interest.  ##
-## --------------------------------------------------- ##
-
+# Older files, kept mostly for historical interest.
 EXTRA_DIST += \
   old/ChangeLog-tests \
   old/ChangeLog.96 \
@@ -557,314 +115,21 @@ EXTRA_DIST += \
   old/ChangeLog.11 \
   old/TODO
 
-
-##########################################################################
-
-## Everything past here is useful to the maintainer, but probably not
-## to anybody else.
-
-##########################################################################
-
-
-## --------------------------------------------------------- ##
-##  Automatic generation of the ChangeLog from git history.  ##
-## --------------------------------------------------------- ##
-
-gitlog_to_changelog_command = $(PERL) $(srcdir)/lib/gitlog-to-changelog
-gitlog_to_changelog_fixes = $(srcdir)/.git-log-fix
-gitlog_to_changelog_options = --amend=$(gitlog_to_changelog_fixes) \
-                              --since='2011-12-28 00:00:00' \
-                              --no-cluster --format '%s%n%n%b'
-
-EXTRA_DIST += lib/gitlog-to-changelog
-EXTRA_DIST += $(gitlog_to_changelog_fixes)
-
-# When executed from a git checkout, generate the ChangeLog from the git
-# history.  When executed from an extracted distribution tarball, just
-# copy the distributed ChangeLog in the build directory (and if this
-# fails, or if no distributed ChangeLog file is present, complain and
-# give an error).
-#
-# We need the apparently useless dependency from another .PHONY target
-# 'am--changelog-regen-hook' to work around a bug of Solaris make, which
-# doesn't execute the recipe of a target named as an existing file, even
-# if such target is declared '.PHONY' (yikes!)
-#
-.PHONY: am--changelog-regen-hook
-am--changelog-regen-hook:
-ChangeLog: am--changelog-regen-hook
-       $(AM_V_GEN)set -e; set -u; \
-## The ChangeLog should be regenerated unconditionally when working from
-## checked-out sources; otherwise, if we're working from a distribution
-## tarball, we expect the ChangeLog to be distributed, so check that it
-## is indeed present in the source directory.
-       if test -d $(srcdir)/.git; then \
-         rm -f $@-t \
-           && $(gitlog_to_changelog_command) \
-              $(gitlog_to_changelog_options) >$@-t \
-           && chmod a-w $@-t \
-           && mv -f $@-t $@ \
-           || exit 1; \
-       elif test ! -f $(srcdir)/$@; then \
-         echo "Source tree is not a git checkout, and no pre-existent" \
-              "$@ file has been found there" >&2; \
-         exit 1; \
-       fi
-
-# Ensure tests are world-executable.
-# FIXME: this should be turned into a maintainer check...
-dist-hook:
-       $(am__cd) $(distdir)/t && chmod a+rx *.sh *.tap
-
-
-## --------------------------- ##
-##  Perl coverage statistics.  ##
-## --------------------------- ##
-
-PERL_COVERAGE_DB = $(abs_top_builddir)/cover_db
-PERL_COVERAGE_FLAGS = -MDevel::Cover=-db,$(PERL_COVERAGE_DB),-silent,on,-summary,off
-PERL_COVER = cover
-
-check-coverage-run recheck-coverage-run: all
-       $(mkinstalldirs) $(PERL_COVERAGE_DB)
-       PERL5OPT="$$PERL5OPT $(PERL_COVERAGE_FLAGS)"; export PERL5OPT; \
-       WANT_NO_THREADS=yes; export WANT_NO_THREADS; unset AUTOMAKE_JOBS; \
-       $(MAKE) $(AM_MAKEFLAGS) `echo $@ | sed 's/-coverage-run//'`
-
-check-coverage-report:
-       @if test ! -d "$(PERL_COVERAGE_DB)"; then \
-         echo "No coverage database found in '$(PERL_COVERAGE_DB)'." >&2; \
-         echo "Please run \"make check-coverage\" first" >&2; \
-         exit 1; \
-       fi
-       $(PERL_COVER) $(PERL_COVER_FLAGS) "$(PERL_COVERAGE_DB)"
-
-# We don't use direct dependencies here because we'd like to be able
-# to invoke the report even after interrupted check-coverage.
-check-coverage: check-coverage-run
-       $(MAKE) $(AM_MAKEFLAGS) check-coverage-report
-
-recheck-coverage: recheck-coverage-run
-       $(MAKE) $(AM_MAKEFLAGS) check-coverage-report
-
-clean-coverage:
-       rm -rf "$(PERL_COVERAGE_DB)"
-clean-local: clean-coverage
-
-.PHONY: check-coverage recheck-coverage check-coverage-run \
-       recheck-coverage-run check-coverage-report clean-coverage
-
-
-## ---------------------------------------------------- ##
-##  Tagging and/or uploading stable and beta releases.  ##
-## ---------------------------------------------------- ##
-
-GIT = git
-
-EXTRA_DIST += lib/gnupload
-
-version_rx = ^[1-9][0-9]*\.[0-9][0-9]*(\.[0-9][0-9]*)?
-stable_version_rx = $(version_rx)$$
-beta_version_rx = $(version_rx)[bdfhjlnprtvxz]$$
-match_version = echo "$(VERSION)" | $(EGREP) >/dev/null
-
-## Check that we don't have uncommitted or unstaged changes.
-## TODO: Maybe the git suite already offers a shortcut to verify if the
-## TODO: working directory is "clean" or not?  If yes, use that instead
-## TODO: of duplicating the logic here.
-git_must_have_clean_workdir = \
-  $(GIT) rev-parse --verify HEAD >/dev/null \
-    && $(GIT) update-index -q --refresh \
-    && $(GIT) diff-files --quiet \
-    && $(GIT) diff-index --quiet --cached HEAD \
-    || fatal "you have uncommitted or unstaged changes"
-
-determine_release_type = \
-  if $(match_version) '$(stable_version_rx)'; then \
-    release_type='Release' dest=ftp; \
-  elif $(match_version) '$(beta_version_rx)'; then \
-    release_type='Beta release' dest=alpha; \
-  else \
-    fatal "invalid version '$(VERSION)' for a release"; \
-  fi
-
-git-tag-release: maintainer-check
-       @set -e; set -u; \
-       fatal () { echo "$@: $$*; not tagging" >&2; exit 1; }; \
-       case '$(AM_TAG_DRYRUN)' in \
-         ""|[nN]|[nN]o|NO) run="";; \
-         *) run="echo Running:";; \
-       esac; \
-       $(determine_release_type); \
-       $(git_must_have_clean_workdir); \
-## If all was successful, tag the release in the local repository.
-       $$run $(GIT) tag -s "v$(VERSION)" -m "$$release_type $(VERSION)"
-
-git-upload-release:
-       @set -e; set -u; \
-       fatal () { echo "$@: $$*; not releasing" >&2; exit 1; }; \
-       $(determine_release_type); \
-       dest=$$dest.gnu.org:automake; \
-       $(git_must_have_clean_workdir); \
-## Check that we are releasing from a valid tag.
-       tag=`$(GIT) describe` \
-         && case $$tag in "v$(VERSION)") true;; *) false;; esac \
-         || fatal "you can only create a release from a tagged version"; \
-## Build and upload the distribution tarball(s).
-       $(MAKE) $(AM_MAKEFLAGS) dist || exit 1; \
-       echo Will upload to $$dest: $(DIST_ARCHIVES); \
-       $(srcdir)/lib/gnupload $(GNUPLOADFLAGS) --to $$dest $(DIST_ARCHIVES)
-
-.PHONY: git-upload-release git-tag-release
-
-
-## ------------------------------------------------------------------ ##
-##  Explore differences of autogenerated files in different commits.  ##
-## ------------------------------------------------------------------ ##
-
-## Visually comparing differences between the Makefile.in files in
-## automake's own build system as generated in two different branches
-## might help to catch bugs and blunders.  This has already happened a
-## few times in the past, when we used to version-control Makefile.in.
-autodiffs:
-       @set -u; \
-        NEW_COMMIT=$${NEW_COMMIT-"HEAD"}; \
-        OLD_COMMIT=$${OLD_COMMIT-"HEAD~1"}; \
-        am_gitdir='$(abs_top_srcdir)/.git'; \
-        get_autofiles_from_rev () \
-        { \
-            rev=$$1 dir=$$2 \
-              && echo "$@: will get files from revision $$rev" \
-              && $(GIT) clone -q --depth 1 "$$am_gitdir" tmp \
-              && $(am__cd) tmp \
-              && $(GIT) checkout -q "$$rev" \
-              && echo "$@: bootstrapping $$rev" \
-              && $(SHELL) ./bootstrap.sh \
-              && echo "$@: copying files from $$rev" \
-              && makefile_ins=`find . -name Makefile.in` \
-              && (tar cf - configure aclocal.m4 $$makefile_ins) | \
-                 (cd .. && $(am__cd) "$$dir" && tar xf -) \
-              && cd .. \
-              && rm -rf tmp; \
-        }; \
-        outdir=$@.dir \
-## Before proceeding, ensure the specified revisions truly exist.
-          && $(GIT) --git-dir="$$am_gitdir" describe $$OLD_COMMIT >/dev/null \
-          && $(GIT) --git-dir="$$am_gitdir" describe $$NEW_COMMIT >/dev/null \
-          && rm -rf $$outdir \
-          && mkdir $$outdir \
-          && $(am__cd) $$outdir \
-          && mkdir new old \
-          && get_autofiles_from_rev $$OLD_COMMIT old \
-          && get_autofiles_from_rev $$NEW_COMMIT new \
-          && exit 0
-
-## With lots of eye candy; we like our developers pampered and spoiled :-)
-compare-autodiffs: autodiffs
-       @set -u; \
-       : $${COLORDIFF=colordiff} $${DIFF=diff}; \
-       dir=autodiffs.dir; \
-       if test ! -d "$$dir"; then \
-         echo "$@: $$dir: Not a directory" >&2; \
-         exit 1; \
-       fi; \
-       mydiff=false mypager=false; \
-       if test -t 1; then \
-         if ($$COLORDIFF -r . .) </dev/null >/dev/null 2>&1; then \
-           mydiff=$$COLORDIFF; \
-           mypager="less -R"; \
-         else \
-           mypager=less; \
-         fi; \
-       else \
-         mypager=cat; \
-       fi; \
-       if test "$$mydiff" = false; then \
-         if ($$DIFF -r -u . .); then \
-           mydiff=$$DIFF; \
-         else \
-           echo "$@: no good-enough diff program specified" >&2; \
-           exit 1; \
-         fi; \
-       fi; \
-       st=0; $$mydiff -r -u $$dir/old $$dir/new | $$mypager || st=$$?; \
-       rm -rf $$dir; \
-       exit $$st
-.PHONY: autodiffs compare-autodiffs
-
-
-## --------------------------------------------------------------------- ##
-##  Synchronize third-party files that are committed in our repository.  ##
-## --------------------------------------------------------------------- ##
-
-## Program to use to fetch files.
-WGET = wget
-WGET_SV_CVS = $(WGET) http://savannah.gnu.org/cgi-bin/viewcvs/~checkout~/
-WGET_SV_GIT_CF = $(WGET) 'http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;hb=HEAD;f='
-WGET_SV_GIT_AC = $(WGET) 'http://git.savannah.gnu.org/gitweb/?p=autoconf.git;a=blob_plain;hb=HEAD;f='
-WGET_SV_GIT_GL = $(WGET) 'http://git.savannah.gnu.org/gitweb/?p=gnulib.git;a=blob_plain;hb=HEAD;f='
-
-## Files that we fetch and which we compare against.
-## The 'lib/COPYING' file must still be synced by hand.
-FETCHFILES = \
-INSTALL \
-config.guess \
-config.sub \
-gnupload \
-gitlog-to-changelog \
-texinfo.tex \
-update-copyright
-
-## Fetch the latest versions of files we care about.
-fetch:
-       rm -rf Fetchdir > /dev/null 2>&1
-       mkdir Fetchdir
-## If a get fails then that is a problem.
-       ($(am__cd) Fetchdir && \
-       $(WGET_SV_GIT_CF)config.guess -O config.guess && \
-       $(WGET_SV_GIT_CF)config.sub -O config.sub && \
-       $(WGET_SV_CVS)texinfo/texinfo/doc/texinfo.tex -O texinfo.tex && \
-       $(WGET_SV_GIT_GL)doc/INSTALL -O INSTALL && \
-       $(WGET_SV_GIT_GL)build-aux/gnupload -O gnupload && \
-       $(WGET_SV_GIT_GL)build-aux/update-copyright -O update-copyright && \
-       $(WGET_SV_GIT_GL)build-aux/gitlog-to-changelog -O gitlog-to-changelog)
-## Don't exit after test because we want to give as many errors as
-## possible.
-       @stat=0; for file in $(FETCHFILES); do \
-         if diff -u $(srcdir)/lib/$$file Fetchdir/$$file \
-                 >>Fetchdir/update.patch 2>/dev/null; then :; \
-         else \
-           stat=1; \
-           echo "Updating $(srcdir)/lib/$$file ..."; \
-           cp Fetchdir/$$file $(srcdir)/lib/$$file; \
-         fi; \
-       done; \
-       test $$stat = 0 || \
-         echo "See Fetchdir/update.patch for a log of the changes."; \
-       exit $$stat
-.PHONY: fetch
-
-
-## ------------------------------------------------ ##
-##  Update copyright years of all committed files.  ##
-## ------------------------------------------------ ##
-
-EXTRA_DIST += lib/update-copyright
-
-update_copyright_env = \
-  UPDATE_COPYRIGHT_FORCE=1 \
-  UPDATE_COPYRIGHT_USE_INTERVALS=2
-
-.PHONY: update-copyright
-update-copyright:
-       $(AM_V_GEN)set -e; \
-       current_year=`date +%Y` && test -n "$$current_year" \
-         || { echo "$@: cannot get current year" >&2; exit 1; }; \
-       sed -i "/^RELEASE_YEAR=/s/=.*$$/=$$current_year/" \
-         bootstrap.sh configure.ac; \
-       excluded_re=`echo $(FETCHFILES) \
-         | sed -e 's|^|lib/|' -e 's| | lib/|g' -e 's, ,|,g'`; \
-       $(GIT) ls-files \
-         | grep -Ev '^(lib/)?(COPYING|INSTALL)$$' \
-         | grep -Ev "^($$excluded_re)$$" \
-         | $(update_copyright_env) xargs $(srcdir)/lib/$@
+# Maintainer-specific files and scripts.
+EXTRA_DIST += \
+  maintainer/am-ft \
+  maintainer/am-xft \
+  maintainer/rename-tests \
+  maintainer/maint.mk \
+  maintainer/syntax-checks.mk
+
+# Most work delegated to sub-dir makefile fragments.
+include $(srcdir)/bin/Makefile.inc
+include $(srcdir)/doc/Makefile.inc
+include $(srcdir)/lib/Makefile.inc
+include $(srcdir)/lib/Automake/Makefile.inc
+include $(srcdir)/lib/am/Makefile.inc
+include $(srcdir)/m4/Makefile.inc
+include $(srcdir)/t/Makefile.inc
+
+# vim: ft=automake noet
index a7392ab..5fb3121 100644 (file)
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.12.1 from Makefile.am.
+# Makefile.in generated by automake 1.15.1 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2012 Free Software Foundation, Inc.
+# Copyright (C) 1994-2017 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -14,7 +14,7 @@
 
 @SET_MAKE@
 
-# Copyright (C) 1995-2012 Free Software Foundation, Inc.
+# Copyright (C) 1995-2017 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
 
 
 VPATH = @srcdir@
-am__make_dryrun = \
-  { \
-    am__dry=no; \
+am__is_gnu_make = { \
+  if test -z '$(MAKELEVEL)'; then \
+    false; \
+  elif test -n '$(MAKE_HOST)'; then \
+    true; \
+  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+    true; \
+  else \
+    false; \
+  fi; \
+}
+am__make_running_with_option = \
+  case $${target_option-} in \
+      ?) ;; \
+      *) echo "am__make_running_with_option: internal error: invalid" \
+              "target option '$${target_option-}' specified" >&2; \
+         exit 1;; \
+  esac; \
+  has_opt=no; \
+  sane_makeflags=$$MAKEFLAGS; \
+  if $(am__is_gnu_make); then \
+    sane_makeflags=$$MFLAGS; \
+  else \
     case $$MAKEFLAGS in \
       *\\[\ \  ]*) \
-        echo 'am--echo: ; @echo "AM"  OK' | $(MAKE) -f - 2>/dev/null \
-          | grep '^AM OK$$' >/dev/null || am__dry=yes;; \
-      *) \
-        for am__flg in $$MAKEFLAGS; do \
-          case $$am__flg in \
-            *=*|--*) ;; \
-            *n*) am__dry=yes; break;; \
-          esac; \
-        done;; \
+        bs=\\; \
+        sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
+          | sed "s/$$bs$$bs[$$bs $$bs  ]*//g"`;; \
     esac; \
-    test $$am__dry = yes; \
-  }
+  fi; \
+  skip_next=no; \
+  strip_trailopt () \
+  { \
+    flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
+  }; \
+  for flg in $$sane_makeflags; do \
+    test $$skip_next = yes && { skip_next=no; continue; }; \
+    case $$flg in \
+      *=*|--*) continue;; \
+        -*I) strip_trailopt 'I'; skip_next=yes;; \
+      -*I?*) strip_trailopt 'I';; \
+        -*O) strip_trailopt 'O'; skip_next=yes;; \
+      -*O?*) strip_trailopt 'O';; \
+        -*l) strip_trailopt 'l'; skip_next=yes;; \
+      -*l?*) strip_trailopt 'l';; \
+      -[dEDm]) skip_next=yes;; \
+      -[JT]) skip_next=yes;; \
+    esac; \
+    case $$flg in \
+      *$$target_option*) has_opt=yes; break;; \
+    esac; \
+  done; \
+  test $$has_opt = yes
+am__make_dryrun = (target_option=n; $(am__make_running_with_option))
+am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
 pkgdatadir = $(datadir)/@PACKAGE@
 pkgincludedir = $(includedir)/@PACKAGE@
 pkglibdir = $(libdir)/@PACKAGE@
@@ -66,43 +104,32 @@ PRE_UNINSTALL = :
 POST_UNINSTALL = :
 build_triplet = @build@
 host_triplet = @host@
-DIST_COMMON = README $(am__configure_deps) $(dist_am_DATA) \
-       $(dist_automake_ac_DATA) $(dist_check_DATA) $(dist_doc_DATA) \
-       $(dist_noinst_DATA) $(dist_perllib_DATA) $(dist_pkgvdata_DATA) \
-       $(dist_script_DATA) $(dist_system_ac_DATA) \
-       $(doc_automake_TEXINFOS) $(doc_automake_history_TEXINFOS) \
-       $(srcdir)/GNUmakefile $(srcdir)/Makefile.am \
-       $(srcdir)/Makefile.in $(srcdir)/defs $(srcdir)/doc/stamp-vti \
-       $(srcdir)/doc/version.texi $(srcdir)/t/CheckListOfTests.am \
-       $(srcdir)/t/list-of-tests.mk $(srcdir)/t/testsuite-part.am \
-       $(top_srcdir)/configure $(top_srcdir)/lib/config.guess \
-       $(top_srcdir)/lib/config.sub $(top_srcdir)/lib/install-sh \
-       $(top_srcdir)/lib/mdate-sh $(top_srcdir)/lib/missing \
-       $(top_srcdir)/lib/mkinstalldirs $(top_srcdir)/lib/test-driver \
-       $(top_srcdir)/lib/texinfo.tex $(top_srcdir)/t/wrap/aclocal.in \
-       $(top_srcdir)/t/wrap/automake.in AUTHORS COPYING ChangeLog \
-       INSTALL NEWS THANKS lib/COPYING lib/INSTALL lib/ar-lib \
-       lib/compile lib/config.guess lib/config.sub lib/depcomp \
-       lib/elisp-comp lib/install-sh lib/mdate-sh lib/missing \
-       lib/mkinstalldirs lib/py-compile lib/texinfo.tex lib/ylwrap
 subdir = .
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
 am__aclocal_m4_deps = $(top_srcdir)/m4/amversion.m4 \
        $(top_srcdir)/m4/auxdir.m4 $(top_srcdir)/m4/cond.m4 \
        $(top_srcdir)/m4/init.m4 $(top_srcdir)/m4/install-sh.m4 \
        $(top_srcdir)/m4/lead-dot.m4 $(top_srcdir)/m4/missing.m4 \
-       $(top_srcdir)/m4/options.m4 $(top_srcdir)/m4/runlog.m4 \
-       $(top_srcdir)/m4/sanity.m4 $(top_srcdir)/m4/silent.m4 \
-       $(top_srcdir)/m4/strip.m4 $(top_srcdir)/m4/substnot.m4 \
-       $(top_srcdir)/m4/tar.m4 $(top_srcdir)/configure.ac
+       $(top_srcdir)/m4/options.m4 $(top_srcdir)/m4/prog-cc-c-o.m4 \
+       $(top_srcdir)/m4/runlog.m4 $(top_srcdir)/m4/sanity.m4 \
+       $(top_srcdir)/m4/silent.m4 $(top_srcdir)/m4/strip.m4 \
+       $(top_srcdir)/m4/substnot.m4 $(top_srcdir)/m4/tar.m4 \
+       $(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
        $(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(top_srcdir)/configure \
+       $(am__configure_deps) $(dist_noinst_SCRIPTS) \
+       $(srcdir)/doc/version.texi $(srcdir)/doc/stamp-vti \
+       $(dist_am_DATA) $(dist_automake_ac_DATA) \
+       $(dist_automake_internal_ac_DATA) $(dist_doc_DATA) \
+       $(dist_noinst_DATA) $(dist_perllib_DATA) $(dist_pkgvdata_DATA) \
+       $(dist_script_DATA) $(dist_system_ac_DATA) $(am__DIST_COMMON)
 am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
  configure.lineno config.status.lineno
 mkinstalldirs = $(SHELL) $(top_srcdir)/lib/mkinstalldirs
 CONFIG_CLEAN_FILES = t/wrap/aclocal-${APIVERSION} \
        t/wrap/automake-${APIVERSION}
-CONFIG_CLEAN_VPATH_FILES = GNUmakefile defs
+CONFIG_CLEAN_VPATH_FILES = GNUmakefile
 am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
 am__vpath_adj = case $$p in \
     $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
@@ -132,42 +159,57 @@ am__uninstall_files_from_dir = { \
   }
 am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(infodir)" \
        "$(DESTDIR)$(man1dir)" "$(DESTDIR)$(amdir)" \
-       "$(DESTDIR)$(automake_acdir)" "$(DESTDIR)$(docdir)" \
+       "$(DESTDIR)$(automake_acdir)" \
+       "$(DESTDIR)$(automake_internal_acdir)" "$(DESTDIR)$(docdir)" \
        "$(DESTDIR)$(perllibdir)" "$(DESTDIR)$(pkgvdatadir)" \
        "$(DESTDIR)$(scriptdir)" "$(DESTDIR)$(system_acdir)" \
        "$(DESTDIR)$(perllibdir)"
-SCRIPTS = $(bin_SCRIPTS)
-depcomp =
-am__depfiles_maybe =
+SCRIPTS = $(bin_SCRIPTS) $(dist_noinst_SCRIPTS) \
+       $(nodist_noinst_SCRIPTS)
+AM_V_P = $(am__v_P_@AM_V@)
+am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
+am__v_P_0 = false
+am__v_P_1 = :
 AM_V_GEN = $(am__v_GEN_@AM_V@)
 am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
 am__v_GEN_0 = @echo "  GEN     " $@;
+am__v_GEN_1 = 
 AM_V_at = $(am__v_at_@AM_V@)
 am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
 am__v_at_0 = @
+am__v_at_1 = 
+depcomp =
+am__depfiles_maybe =
 SOURCES =
 DIST_SOURCES =
 AM_V_DVIPS = $(am__v_DVIPS_@AM_V@)
 am__v_DVIPS_ = $(am__v_DVIPS_@AM_DEFAULT_V@)
 am__v_DVIPS_0 = @echo "  DVIPS   " $@;
+am__v_DVIPS_1 = 
 AM_V_MAKEINFO = $(am__v_MAKEINFO_@AM_V@)
 am__v_MAKEINFO_ = $(am__v_MAKEINFO_@AM_DEFAULT_V@)
 am__v_MAKEINFO_0 = @echo "  MAKEINFO" $@;
+am__v_MAKEINFO_1 = 
 AM_V_INFOHTML = $(am__v_INFOHTML_@AM_V@)
 am__v_INFOHTML_ = $(am__v_INFOHTML_@AM_DEFAULT_V@)
 am__v_INFOHTML_0 = @echo "  INFOHTML" $@;
+am__v_INFOHTML_1 = 
 AM_V_TEXI2DVI = $(am__v_TEXI2DVI_@AM_V@)
 am__v_TEXI2DVI_ = $(am__v_TEXI2DVI_@AM_DEFAULT_V@)
 am__v_TEXI2DVI_0 = @echo "  TEXI2DVI" $@;
+am__v_TEXI2DVI_1 = 
 AM_V_TEXI2PDF = $(am__v_TEXI2PDF_@AM_V@)
 am__v_TEXI2PDF_ = $(am__v_TEXI2PDF_@AM_DEFAULT_V@)
 am__v_TEXI2PDF_0 = @echo "  TEXI2PDF" $@;
+am__v_TEXI2PDF_1 = 
 AM_V_texinfo = $(am__v_texinfo_@AM_V@)
 am__v_texinfo_ = $(am__v_texinfo_@AM_DEFAULT_V@)
 am__v_texinfo_0 = -q
+am__v_texinfo_1 = 
 AM_V_texidevnull = $(am__v_texidevnull_@AM_V@)
 am__v_texidevnull_ = $(am__v_texidevnull_@AM_DEFAULT_V@)
 am__v_texidevnull_0 = > /dev/null
+am__v_texidevnull_1 = 
 am__dirstamp = $(am__leading_dot)dirstamp
 INFO_DEPS = $(srcdir)/doc/automake.info \
        $(srcdir)/doc/automake-history.info
@@ -191,10 +233,32 @@ am__can_run_installinfo = \
 man1dir = $(mandir)/man1
 NROFF = nroff
 MANS = $(man1_MANS)
-DATA = $(dist_am_DATA) $(dist_automake_ac_DATA) $(dist_doc_DATA) \
+DATA = $(dist_am_DATA) $(dist_automake_ac_DATA) \
+       $(dist_automake_internal_ac_DATA) $(dist_doc_DATA) \
        $(dist_noinst_DATA) $(dist_perllib_DATA) $(dist_pkgvdata_DATA) \
        $(dist_script_DATA) $(dist_system_ac_DATA) \
-       $(nodist_perllib_DATA)
+       $(nodist_noinst_DATA) $(nodist_perllib_DATA)
+am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
+# Read a list of newline-separated strings from the standard input,
+# and print each of them once, without duplicates.  Input order is
+# *not* preserved.
+am__uniquify_input = $(AWK) '\
+  BEGIN { nonempty = 0; } \
+  { items[$$0] = 1; nonempty = 1; } \
+  END { if (nonempty) { for (i in items) print i; }; } \
+'
+# Make sure the list of sources is unique.  This is necessary because,
+# e.g., the same source file might be shared among _SOURCES variables
+# for different programs/libraries.
+am__define_uniq_tagged_files = \
+  list='$(am__tagged_files)'; \
+  unique=`for i in $$list; do \
+    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+  done | $(am__uniquify_input)`
+ETAGS = etags
+CTAGS = ctags
+CSCOPE = cscope
+AM_RECURSIVE_TARGETS = cscope check recheck
 am__tty_colors_dummy = \
   mgn= red= grn= lgn= blu= brg= std=; \
   am__color_tests=no
@@ -345,13 +409,12 @@ $(AM_TESTS_ENVIRONMENT) $(TESTS_ENVIRONMENT)
 # '$bases'.  This honors runtime overriding of TESTS and TEST_LOGS.  Sadly,
 # we cannot use something simpler, involving e.g., "$(TEST_LOGS:.log=)",
 # since that might cause problem with VPATH rewrites for suffix-less tests.
-# See also 'test-harness-vpath-rewrite.test' and 'test-trs-basic.test'.
+# See also 'test-harness-vpath-rewrite.sh' and 'test-trs-basic.sh'.
 am__set_TESTS_bases = \
   bases='$(TEST_LOGS)'; \
   bases=`for i in $$bases; do echo $$i; done | sed 's/\.log$$//'`; \
   bases=`echo $$bases`
 RECHECK_LOGS = $(TEST_LOGS)
-AM_RECURSIVE_TARGETS = check recheck
 TEST_SUITE_LOG = test-suite.log
 am__test_logs1 = $(TESTS:=.log)
 am__test_logs2 = $(am__test_logs1:@EXEEXT@.log=.log)
@@ -374,6 +437,24 @@ SH_LOG_COMPILE = $(SH_LOG_COMPILER) $(AM_SH_LOG_FLAGS) $(SH_LOG_FLAGS)
 TEST_LOGS = $(am__test_logs4:.tap.log=.log)
 TAP_LOG_COMPILE = $(TAP_LOG_COMPILER) $(AM_TAP_LOG_FLAGS) \
        $(TAP_LOG_FLAGS)
+am__DIST_COMMON = $(doc_automake_TEXINFOS) \
+       $(doc_automake_history_TEXINFOS) $(srcdir)/GNUmakefile \
+       $(srcdir)/Makefile.in $(srcdir)/bin/Makefile.inc \
+       $(srcdir)/contrib/t/Makefile.inc $(srcdir)/doc/Makefile.inc \
+       $(srcdir)/lib/Automake/Makefile.inc $(srcdir)/lib/Makefile.inc \
+       $(srcdir)/lib/am/Makefile.inc $(srcdir)/m4/Makefile.inc \
+       $(srcdir)/t/CheckListOfTests.am $(srcdir)/t/Makefile.inc \
+       $(srcdir)/t/list-of-tests.mk $(srcdir)/t/testsuite-part.am \
+       $(top_srcdir)/lib/compile $(top_srcdir)/lib/config.guess \
+       $(top_srcdir)/lib/config.sub $(top_srcdir)/lib/install-sh \
+       $(top_srcdir)/lib/mdate-sh $(top_srcdir)/lib/missing \
+       $(top_srcdir)/lib/mkinstalldirs $(top_srcdir)/lib/test-driver \
+       $(top_srcdir)/lib/texinfo.tex $(top_srcdir)/t/wrap/aclocal.in \
+       $(top_srcdir)/t/wrap/automake.in AUTHORS COPYING ChangeLog \
+       INSTALL NEWS README THANKS lib/COPYING lib/INSTALL lib/ar-lib \
+       lib/compile lib/config.guess lib/config.sub lib/depcomp \
+       lib/install-sh lib/mdate-sh lib/missing lib/mkinstalldirs \
+       lib/py-compile lib/texinfo.tex lib/ylwrap
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 distdir = $(PACKAGE)-$(VERSION)
 top_distdir = $(distdir)
@@ -438,6 +519,7 @@ LEX = @LEX@
 LIBOBJS = @LIBOBJS@
 LIBS = @LIBS@
 LN = @LN@
+LN_S = @LN_S@
 LTLIBOBJS = @LTLIBOBJS@
 MAKEINFO = @MAKEINFO@
 MKDIR_P = @MKDIR_P@
@@ -452,7 +534,6 @@ PACKAGE_URL = @PACKAGE_URL@
 PACKAGE_VERSION = @PACKAGE_VERSION@
 PATH_SEPARATOR = @PATH_SEPARATOR@
 PERL = @PERL@
-PERL_THREADS = @PERL_THREADS@
 RELEASE_YEAR = @RELEASE_YEAR@
 SET_MAKE = @SET_MAKE@
 SHELL = @SHELL@
@@ -509,12 +590,14 @@ libexecdir = @libexecdir@
 localedir = @localedir@
 localstatedir = @localstatedir@
 mandir = @mandir@
+mkdir_p = @mkdir_p@
 oldincludedir = @oldincludedir@
 pdfdir = @pdfdir@
 pkgvdatadir = @pkgvdatadir@
 prefix = @prefix@
 program_transform_name = @program_transform_name@
 psdir = @psdir@
+required_autoconf_version = @required_autoconf_version@
 sbindir = @sbindir@
 scriptdir = @scriptdir@
 sharedstatedir = @sharedstatedir@
@@ -525,27 +608,50 @@ target_alias = @target_alias@
 top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
-CLEANFILES = $(bin_SCRIPTS) $(nodist_perllib_DATA) defs-static \
-       $(man1_MANS)
+CLEANFILES = $(bin_SCRIPTS) $(man1_MANS) $(nodist_perllib_DATA) \
+       t/ax/test-defs.sh t/ax/shell-no-trail-bslash t/ax/cc-no-c-o \
+       runtest $(PERF_TEST_SUITE_LOG)
 DISTCLEANFILES = 
 MAINTAINERCLEANFILES = 
-EXTRA_DIST = $(AUTOMAKESOURCES) bootstrap.sh GNUmakefile \
-       syntax-checks.mk HACKING lib/Automake/Config.in \
-       m4/amversion.in t/README t/ax/is $(handwritten_TESTS) \
-       t/ax/testsuite-summary-checks.sh t/ax/tap-setup.sh \
-       t/ax/tap-summary-aux.sh t/ax/depcomp.sh \
-       t/ax/extract-testsuite-summary.pl t/ax/trivial-test-driver \
-       $(generated_TESTS) gen-testsuite-part \
-       t/ax/distcheck-hook-m4.am defs-static.in doc/help2man \
+
+# Third-party, obsolescent or experimental stuff.
+
+# Older files, kept mostly for historical interest.
+
+# Maintainer-specific files and scripts.
+EXTRA_DIST = bootstrap GNUmakefile HACKING PLANS contrib/tap-driver.pl \
        contrib/check-html.am contrib/multilib/README \
        contrib/multilib/config-ml.in contrib/multilib/symlink-tree \
        contrib/multilib/multilib.am contrib/multilib/multi.m4 \
        contrib/README old/ChangeLog-tests old/ChangeLog.96 \
        old/ChangeLog.98 old/ChangeLog.00 old/ChangeLog.01 \
        old/ChangeLog.02 old/ChangeLog.03 old/ChangeLog.04 \
-       old/ChangeLog.09 old/ChangeLog.11 old/TODO \
-       lib/gitlog-to-changelog $(gitlog_to_changelog_fixes) \
-       lib/gnupload lib/update-copyright
+       old/ChangeLog.09 old/ChangeLog.11 old/TODO maintainer/am-ft \
+       maintainer/am-xft maintainer/rename-tests maintainer/maint.mk \
+       maintainer/syntax-checks.mk $(AUTOMAKESOURCES) \
+       bin/gen-perl-protos doc/help2man lib/Automake/Config.in \
+       m4/amversion.in t/README t/ax/is t/ax/is_newest \
+       t/ax/deltree.pl $(handwritten_TESTS) t/ax/tap-summary-aux.sh \
+       t/ax/testsuite-summary-checks.sh t/ax/depcomp.sh \
+       t/ax/extract-testsuite-summary.pl t/ax/tap-setup.sh \
+       t/ax/trivial-test-driver $(generated_TESTS) gen-testsuite-part \
+       $(contrib_TESTS) t/ax/distcheck-hook-m4.am t/ax/test-defs.in \
+       t/ax/shell-no-trail-bslash.in t/ax/cc-no-c-o.in \
+       t/ax/runtest.in $(perf_TESTS)
+TAGS_FILES = $(AUTOMAKESOURCES)
+dist_noinst_DATA = $(amhello_sources) t/ax/test-init.sh \
+       t/ax/test-lib.sh t/ax/am-test-lib.sh t/ax/tap-functions.sh
+nodist_noinst_DATA = t/ax/test-defs.sh
+dist_noinst_SCRIPTS = 
+
+# Static dependencies valid for each test case (also further
+# extended later).  Note that use 'noinst_' rather than 'check_'
+# as the prefix, because we really want them to be built by
+# "make all".  This makes it easier to run the test cases by
+# hand after having simply configured and built the package.
+nodist_noinst_SCRIPTS = t/wrap/aclocal-$(APIVERSION) \
+       t/wrap/automake-$(APIVERSION) t/ax/shell-no-trail-bslash \
+       t/ax/cc-no-c-o runtest
 
 # We want a handful of substitutions to be fully-expanded by make;
 # then use config.status to substitute the remainder where a single
@@ -577,14 +683,75 @@ generated_file_finalize = $(AM_V_at) \
   fi; \
   chmod a-w $@-t && mv -f $@-t $@
 
-bin_SCRIPTS = automake aclocal
-AUTOMAKESOURCES = automake.in aclocal.in
-TAGS_FILES = $(AUTOMAKESOURCES)
+
+# For some tests or targets, we need to have the just-build automake and
+# aclocal scripts avaiable on PATH.
+extend_PATH = \
+  { PATH='$(abs_builddir)/t/wrap$(PATH_SEPARATOR)'$$PATH && export PATH; }
+
+bin_SCRIPTS = bin/automake bin/aclocal
+
+# Used by maintainer checks and such.
+automake_in = $(srcdir)/bin/automake.in
+aclocal_in = $(srcdir)/bin/aclocal.in
+automake_script = bin/automake
+aclocal_script = bin/aclocal
+AUTOMAKESOURCES = $(automake_in) $(aclocal_in)
+info_TEXINFOS = doc/automake.texi doc/automake-history.texi
+doc_automake_TEXINFOS = doc/fdl.texi
+doc_automake_history_TEXINFOS = doc/fdl.texi
+man1_MANS = \
+  doc/aclocal.1 \
+  doc/automake.1 \
+  doc/aclocal-$(APIVERSION).1 \
+  doc/automake-$(APIVERSION).1
+
+update_mans = \
+  $(AM_V_GEN): \
+    && $(MKDIR_P) doc \
+    && $(extend_PATH) \
+    && $(PERL) $(srcdir)/doc/help2man --output=$@
+
+amhello_sources = \
+  doc/amhello/configure.ac \
+  doc/amhello/Makefile.am \
+  doc/amhello/README \
+  doc/amhello/src/main.c \
+  doc/amhello/src/Makefile.am
+
+amhello_configury = \
+  aclocal.m4 \
+  autom4te.cache \
+  Makefile.in \
+  config.h.in \
+  configure \
+  depcomp \
+  install-sh \
+  missing \
+  src/Makefile.in
+
+dist_doc_DATA = $(srcdir)/doc/amhello-1.0.tar.gz
+setup_autotools_paths = { \
+  $(extend_PATH) \
+    && ACLOCAL=aclocal-$(APIVERSION) && export ACLOCAL \
+    && AUTOMAKE=automake-$(APIVERSION) && export AUTOMAKE \
+    && AUTOCONF='$(am_AUTOCONF)' && export AUTOCONF \
+    && AUTOM4TE='$(am_AUTOM4TE)' && export AUTOM4TE \
+    && AUTORECONF='$(am_AUTORECONF)' && export AUTORECONF \
+    && AUTOHEADER='$(am_AUTOHEADER)' && export AUTOHEADER \
+    && AUTOUPDATE='$(am_AUTOUPDATE)' && export AUTOUPDATE \
+    && true; \
+}
+
 dist_pkgvdata_DATA = \
   lib/COPYING \
   lib/INSTALL \
   lib/texinfo.tex
 
+
+# These must all be executable when installed.  However, if we use
+# _SCRIPTS, then the program transform will be applied, which is not
+# what we want.  So we make them executable by hand.
 dist_script_DATA = \
   lib/config.guess \
   lib/config.sub \
@@ -592,15 +759,13 @@ dist_script_DATA = \
   lib/mdate-sh \
   lib/missing \
   lib/mkinstalldirs \
-  lib/elisp-comp \
   lib/ylwrap \
   lib/depcomp \
   lib/compile \
   lib/py-compile \
   lib/ar-lib \
   lib/test-driver \
-  lib/tap-driver.sh \
-  lib/tap-driver.pl
+  lib/tap-driver.sh
 
 perllibdir = $(pkgvdatadir)/Automake
 dist_perllib_DATA = \
@@ -614,6 +779,7 @@ dist_perllib_DATA = \
   lib/Automake/Getopt.pm \
   lib/Automake/Item.pm \
   lib/Automake/ItemDef.pm \
+  lib/Automake/Language.pm \
   lib/Automake/Location.pm \
   lib/Automake/Options.pm \
   lib/Automake/Rule.pm \
@@ -671,14 +837,13 @@ dist_automake_ac_DATA = \
   m4/ar-lib.m4 \
   m4/as.m4 \
   m4/auxdir.m4 \
-  m4/ccstdc.m4 \
   m4/cond.m4 \
   m4/cond-if.m4 \
   m4/depend.m4 \
   m4/depout.m4 \
   m4/dmalloc.m4 \
+  m4/extra-recurs.m4 \
   m4/gcj.m4 \
-  m4/header.m4 \
   m4/init.m4 \
   m4/install-sh.m4 \
   m4/lead-dot.m4 \
@@ -686,15 +851,12 @@ dist_automake_ac_DATA = \
   m4/lispdir.m4 \
   m4/maintainer.m4 \
   m4/make.m4 \
-  m4/minuso.m4 \
   m4/missing.m4 \
   m4/mkdirp.m4 \
-  m4/obsol-gt.m4 \
-  m4/obsol-lt.m4 \
   m4/obsolete.m4 \
   m4/options.m4 \
-  m4/protos.m4 \
   m4/python.m4 \
+  m4/prog-cc-c-o.m4 \
   m4/runlog.m4 \
   m4/sanity.m4 \
   m4/silent.m4 \
@@ -705,6 +867,8 @@ dist_automake_ac_DATA = \
   m4/vala.m4
 
 dist_system_ac_DATA = m4/acdir/README
+automake_internal_acdir = $(automake_acdir)/internal
+dist_automake_internal_ac_DATA = m4/internal/ac-config-macro-dirs.m4
 
 # Run the tests with a proper shell detected at configure time.
 LOG_COMPILER = $(AM_TEST_RUNNER_SHELL)
@@ -720,19 +884,26 @@ AM_TAP_LOG_DRIVER_FLAGS = --merge
 
 # Automatically-generated tests wrapping hand-written ones.
 # Also, automatically-computed dependencies for tests.
-TESTS = $(handwritten_TESTS) $(generated_TESTS)
+
+# Hand-written tests for stuff in 'contrib/'.
+TESTS = $(handwritten_TESTS) $(generated_TESTS) $(contrib_TESTS)
 
 # Some testsuite-influential variables should be overridable from the
 # test scripts, but not from the environment.
-# The 'AM_TESTS_REEXEC=no' setting tells the tests not to needlessly
-# re-execute themselves with the shell detected at configure time, since
-# we are already running them under it explicitly in our setup (see e.g.
-# the definition of TEST_LOG_COMPILER above).
-AM_TESTS_ENVIRONMENT = for v in me required am_using_tap \
+# Keep this in sync with the similar list in ax/runtest.in.
+
+# For sourcing of extra "shell libraries" by our test scripts.  As per
+# POSIX, sourcing a file with '.' will cause it to be looked up in $PATH
+# in case it is given with a relative name containing no slashes.
+AM_TESTS_ENVIRONMENT = for v in required am_test_protocol \
        am_serial_tests am_test_prefer_config_shell \
-       am_original_AUTOMAKE am_original_ACLOCAL ; do eval test \
-       x"\$${$$v}" = x || unset $$v; done; AM_TESTS_REEXEC=no; export \
-       AM_TESTS_REEXEC; stderr_fileno_=9; export stderr_fileno_;
+       am_original_AUTOMAKE am_original_ACLOCAL am_test_lib_sourced \
+       test_lib_sourced ; do eval test x"\$${$$v}" = x || unset $$v; \
+       done; stderr_fileno_=9; export stderr_fileno_; if test \
+       $(srcdir) != .; then \
+       PATH='$(abs_srcdir)/t/ax$(PATH_SEPARATOR)'$$PATH; fi; \
+       PATH='$(abs_builddir)/t/ax$(PATH_SEPARATOR)'$$PATH; export \
+       PATH;
 # We want warning messages and explanations for skipped tests to go to
 # the console if possible, so set up 'stderr_fileno_' properly.
 AM_TESTS_FD_REDIRECT = 9>&2
@@ -750,21 +921,21 @@ t/pm/Version3.pl
 
 XFAIL_TESTS = \
 t/all.sh \
-t/yacc-bison-skeleton-cxx.sh \
-t/yacc-bison-skeleton.sh \
+t/auxdir-pr19311.sh \
 t/cond17.sh \
 t/gcj6.sh \
 t/override-conditional-2.sh \
+t/override-conditional-pr13940.sh \
 t/dist-pr109765.sh \
 t/instdir-cond2.sh \
 t/java-nobase.sh \
 t/objext-pr10128.sh \
-t/parallel-tests-many.sh \
-t/pr8365-remake-timing.sh \
+t/remake-timing-bug-pr8365.sh \
 t/lex-subobj-nodep.sh \
+t/subobj-indir-pr13928.sh \
+t/subobj-vpath-pr13928.sh \
 t/remake-am-pr10111.sh \
 t/remake-m4-pr10111.sh \
-t/txinfo5.sh \
 $(perl_fake_XFAIL_TESTS)
 
 perl_TESTS = \
@@ -794,47 +965,58 @@ t/perf/testsuite-summary.sh
 handwritten_TESTS = \
 t/get-sysconf.sh \
 $(perl_TESTS) \
-$(perf_TESTS) \
 t/instspc.tap \
 t/aclocal.sh \
-t/aclocal3.sh \
-t/aclocal4.sh \
-t/aclocal5.sh \
-t/aclocal6.sh \
-t/aclocal7.sh \
-t/aclocal8.sh \
-t/aclocal9.sh \
-t/acloca10.sh \
-t/acloca11.sh \
-t/acloca12.sh \
-t/acloca13.sh \
-t/acloca14.sh \
-t/acloca15.sh \
-t/acloca16.sh \
-t/acloca17.sh \
-t/acloca18.sh \
-t/acloca19.sh \
-t/acloca20.sh \
-t/acloca21.sh \
-t/acloca22.sh \
-t/acloca23.sh \
+t/aclocal-I-order-1.sh \
+t/aclocal-I-order-2.sh \
+t/aclocal-I-order-3.sh \
+t/aclocal-I-and-install.sh \
 t/aclocal-acdir.sh \
+t/aclocal-amflags.sh \
+t/aclocal-autoconf-version-check.sh \
+t/aclocal-comments-respected.sh \
+t/aclocal-deleted-header-aclocal-amflags.sh \
+t/aclocal-deleted-header.sh \
+t/aclocal-deps-subdir.sh \
+t/aclocal-deps.sh \
+t/aclocal-dirlist.sh \
+t/aclocal-dirlist-globbing.sh \
+t/aclocal-dirlist-abspath.sh \
 t/aclocal-install-absdir.sh \
-t/aclocal-print-acdir.sh \
+t/aclocal-install-fail.sh \
+t/aclocal-install-mkdir.sh \
+t/aclocal-m4-include-are-scanned-aclocal-amflags.sh \
+t/aclocal-m4-include-are-scanned.sh \
+t/aclocal-m4-sinclude.sh \
+t/aclocal-macrodir.tap \
+t/aclocal-macrodirs.tap \
+t/aclocal-missing-macros.sh \
+t/aclocal-no-extra-scan.sh \
+t/aclocal-no-force.sh \
+t/aclocal-no-install-no-mkdir.sh \
+t/aclocal-no-symlinked-overwrite.sh \
+t/aclocal-no-unused-required.sh \
 t/aclocal-path.sh \
 t/aclocal-path-install.sh \
 t/aclocal-path-install-serial.sh \
 t/aclocal-path-nonexistent.sh \
 t/aclocal-path-precedence.sh \
-t/aclocal-install-fail.sh \
-t/aclocal-install-mkdir.sh \
-t/aclocal-no-install-no-mkdir.sh \
+t/aclocal-pr450.sh \
+t/aclocal-print-acdir.sh \
+t/aclocal-req.sh \
+t/aclocal-remake-misc.sh \
+t/aclocal-scan-configure-ac-pr319.sh \
+t/aclocal-serial.sh \
+t/aclocal-underquoted-defun.sh \
 t/aclocal-verbose-install.sh \
+t/auxdir-pr15981.sh \
+t/auxdir-cc-pr15981.sh \
 t/ac-output-old.tap \
 t/acsilent.sh \
 t/acsubst.sh \
 t/acsubst2.sh \
 t/add-missing.tap \
+t/add-missing-multiple.sh \
 t/all.sh \
 t/all2.sh \
 t/alloca.sh \
@@ -845,12 +1027,18 @@ t/amhello-cflags.sh \
 t/amhello-cross-compile.sh \
 t/amhello-binpkg.sh \
 t/aminit-moreargs-deprecation.sh \
+t/aminit-trailing-dnl-comment-pr16841.sh \
 t/amassign.sh \
-t/ammissing.sh \
+t/am-config-header.sh \
+t/am-prog-cc-stdc.sh \
+t/am-prog-cc-c-o.sh \
+t/am-macro-not-found.sh \
 t/amopt.sh \
 t/amopts-location.sh \
 t/amopts-variable-expansion.sh \
 t/amsubst.sh \
+t/am-default-source-ext.sh \
+t/am-include-only-one-generated-fragment.sh \
 t/ansi2knr-no-more.sh \
 t/ar-lib.sh \
 t/ar-lib2.sh \
@@ -879,9 +1067,9 @@ t/autodist-configure-no-subdir.sh \
 t/autodist-no-duplicate.sh \
 t/autodist-stamp-vti.sh \
 t/autohdr.sh \
-t/autohdr2.sh \
 t/autohdr3.sh \
 t/autohdr4.sh \
+t/autohdr-subdir-pr12495.sh \
 t/autohdrdry.sh \
 t/automake-cmdline.tap \
 t/auxdir.sh \
@@ -892,22 +1080,24 @@ t/auxdir-autodetect.sh \
 t/auxdir-computed.tap \
 t/auxdir-misplaced.sh \
 t/auxdir-nonexistent.sh \
+t/auxdir-pr19311.sh \
 t/auxdir-unportable.tap \
 t/backcompat.sh \
 t/backcompat2.sh \
 t/backcompat3.sh \
-t/backcompat4.sh \
-t/backcompat5.sh \
 t/backcompat6.sh \
-t/backsl.sh \
-t/backsl2.sh \
-t/backsl3.sh \
-t/backsl4.sh \
+t/backcompat-acout.sh \
+t/backslash-issues.sh \
+t/backslash-before-trailing-whitespace.sh \
 t/badline.sh \
 t/badopt.sh \
 t/badprog.sh \
-t/block.sh \
-t/bsource.sh \
+t/built-sources-check.sh \
+t/built-sources-cond.sh \
+t/built-sources-fork-bomb.sh \
+t/built-sources-install.sh \
+t/built-sources-subdir.sh \
+t/built-sources.sh \
 t/candist.sh \
 t/canon.sh \
 t/canon2.sh \
@@ -919,11 +1109,13 @@ t/canon7.sh \
 t/canon8.sh \
 t/canon-name.sh \
 t/ccnoco.sh \
-t/ccnoco2.sh \
+t/ccnoco-lib.sh \
+t/ccnoco-lt.sh \
 t/ccnoco3.sh \
+t/ccnoco4.sh \
+t/ccnoco-deps.sh \
 t/check.sh \
 t/check2.sh \
-t/check3.sh \
 t/check4.sh \
 t/check5.sh \
 t/check6.sh \
@@ -941,7 +1133,6 @@ t/check-no-test-driver.sh \
 t/check-concurrency-bug9245.sh \
 t/checkall.sh \
 t/clean.sh \
-t/clean2.sh \
 t/colneq.sh \
 t/colneq2.sh \
 t/colneq3.sh \
@@ -952,8 +1143,9 @@ t/colon4.sh \
 t/colon5.sh \
 t/colon6.sh \
 t/colon7.sh \
-t/color.sh \
-t/color2.sh \
+t/color-tests.sh \
+t/color-tests2.sh \
+t/color-tests-opt.sh \
 t/comment.sh \
 t/comment2.sh \
 t/comment3.sh \
@@ -965,6 +1157,7 @@ t/comment8.sh \
 t/comment9.sh \
 t/commen10.sh \
 t/commen11.sh \
+t/comment-block.sh \
 t/comments-in-var-def.sh \
 t/compile.sh \
 t/compile2.sh \
@@ -972,11 +1165,11 @@ t/compile3.sh \
 t/compile4.sh \
 t/compile5.sh \
 t/compile6.sh \
+t/compile7.sh \
 t/compile_f90_c_cxx.sh \
 t/compile_f_c_cxx.sh \
 t/cond-basic.sh \
 t/cond.sh \
-t/cond2.sh \
 t/cond3.sh \
 t/cond4.sh \
 t/cond5.sh \
@@ -1038,6 +1231,7 @@ t/confh5.sh \
 t/confh6.sh \
 t/confh7.sh \
 t/confh8.sh \
+t/confh-subdir-clean.sh \
 t/confincl.sh \
 t/conflnk.sh \
 t/conflnk2.sh \
@@ -1050,20 +1244,16 @@ t/copy.sh \
 t/cscope.tap \
 t/cscope2.sh \
 t/cscope3.sh \
+t/c-demo.sh \
 t/cxx.sh \
 t/cxx2.sh \
 t/cxxcpp.sh \
+t/cxx-demo.sh \
+t/cxx-lt-demo.sh \
 t/cxxlibobj.sh \
 t/cxxlink.sh \
 t/cxxnoc.sh \
-t/cxxo.sh \
-t/cygnus-deprecation.sh \
-t/cygnus-check-without-all.sh \
-t/cygnus-dependency-tracking.sh \
-t/cygnus-imply-foreign.sh \
-t/cygnus-no-dist.sh \
-t/cygnus-no-installinfo.sh \
-t/cygnus-requires-maintainer-mode.sh \
+t/cygnus-no-more.sh \
 t/cygwin32.sh \
 t/dash.sh \
 t/defun.sh \
@@ -1087,6 +1277,7 @@ t/depcomp.sh \
 t/depcomp2.sh \
 t/depcomp8a.sh \
 t/depcomp8b.sh \
+t/depcomp-implicit-auxdir.sh \
 t/depdist.sh \
 t/depend.sh \
 t/depend3.sh \
@@ -1095,11 +1286,12 @@ t/depend5.sh \
 t/depend6.sh \
 t/deprecated-acinit.sh \
 t/destdir.sh \
-t/dirlist.sh \
-t/dirlist2.sh \
-t/dirlist-abspath.sh \
+t/dir-named-obj-is-bad.sh \
 t/discover.sh \
 t/dist-formats.tap \
+t/dist-lzma.sh \
+t/dist-tarZ.sh \
+t/dist-shar.sh \
 t/dist-auxdir-many-subdirs.sh \
 t/dist-auxfile-2.sh \
 t/dist-auxfile.sh \
@@ -1129,9 +1321,11 @@ t/distcheck-hook2.sh \
 t/distcheck-writable-srcdir.sh \
 t/distcheck-missing-m4.sh \
 t/distcheck-outdated-m4.sh \
+t/distcheck-no-prefix-or-srcdir-override.sh \
 t/distcheck-override-infodir.sh \
 t/distcheck-pr9579.sh \
 t/distcheck-pr10470.sh \
+t/distcheck-pr18286.sh \
 t/dmalloc.sh \
 t/doc-parsing-buglets-colneq-subst.sh \
 t/doc-parsing-buglets-tabs.sh \
@@ -1141,10 +1335,8 @@ t/dollarvar2.sh \
 t/double.sh \
 t/dup2.sh \
 t/else.sh \
-t/empty.sh \
-t/empty2.sh \
-t/empty3.sh \
-t/empty4.sh \
+t/empty-data-primary.sh \
+t/empty-sources-primary.tap \
 t/exdir.sh \
 t/exdir2.sh \
 t/exdir3.sh \
@@ -1152,35 +1344,33 @@ t/exeext.sh \
 t/exeext2.sh \
 t/exeext3.sh \
 t/exeext4.sh \
-t/exsource.sh \
+t/extra-sources.sh \
 t/ext.sh \
 t/ext2.sh \
 t/ext3.sh \
 t/extra.sh \
-t/extra2.sh \
-t/extra3.sh \
-t/extra4.sh \
-t/extra5.sh \
-t/extra6.sh \
-t/extra7.sh \
-t/extra8.sh \
-t/extra9.sh \
-t/extra10.sh \
-t/extra11.sh \
-t/extra12.sh \
+t/extra-sources-no-spurious.sh \
+t/extra-data.sh \
+t/extra-dist-vpath-dir.sh \
+t/extra-dist-dirs-and-subdirs.sh \
+t/extra-dist-vpath-dir-merge.sh \
+t/extra-dist-wildcards.sh \
+t/extra-dist-wildcards-gnu.sh \
+t/extra-dist-wildcards-vpath.sh \
+t/extra-programs-misc.sh \
+t/extra-programs-and-libs.sh \
 t/extra-programs-empty.sh \
 t/extra-portability.sh \
 t/extra-portability2.sh \
 t/extra-portability3.sh \
-t/extradep.sh \
-t/extradep2.sh \
+t/extra-deps.sh \
+t/extra-deps-lt.sh \
 t/f90only.sh \
 t/flavor.sh \
 t/flibs.sh \
 t/fn99.sh \
 t/fn99subdir.sh \
 t/fnoc.sh \
-t/fo.sh \
 t/forcemiss.sh \
 t/forcemiss2.sh \
 t/fort1.sh \
@@ -1195,9 +1385,11 @@ t/gcj3.sh \
 t/gcj4.sh \
 t/gcj5.sh \
 t/gcj6.sh \
-t/gettext.sh \
-t/gettext2.sh \
-t/gettext3.sh \
+t/gettext-basics.sh \
+t/gettext-config-rpath.sh \
+t/gettext-external-pr338.sh \
+t/gettext-intl-subdir.sh \
+t/gettext-pr381.sh \
 t/gnumake.sh \
 t/gnuwarn.sh \
 t/gnuwarn2.sh \
@@ -1215,21 +1407,19 @@ t/help-depend2.sh \
 t/help-dmalloc.sh \
 t/help-init.sh \
 t/help-lispdir.sh \
-t/help-multilib.sh \
 t/help-python.sh \
 t/help-silent.sh \
 t/help-upc.sh \
 t/hfs.sh \
 t/implicit.sh \
-t/info.sh \
 t/init.sh \
 t/init2.sh \
-t/insh2.sh \
-t/install2.sh \
+t/dist-install-sh.sh \
+t/dist-with-unreadable-makefile-fails.sh \
 t/installdir.sh \
-t/instsh.sh \
-t/instsh2.sh \
-t/instsh3.sh \
+t/add-missing-install-sh.sh \
+t/install-sh-unittests.sh \
+t/install-sh-option-C.sh \
 t/instdat.sh \
 t/instdat2.sh \
 t/instdir.sh \
@@ -1287,9 +1477,11 @@ t/lex5.sh \
 t/lexcpp.sh \
 t/lexvpath.sh \
 t/lex-subobj-nodep.sh \
+t/lex-header.sh \
 t/lex-lib.sh \
 t/lex-lib-external.sh \
 t/lex-libobj.sh \
+t/lex-multiple.sh \
 t/lex-noyywrap.sh \
 t/lex-clean-cxx.sh \
 t/lex-clean.sh \
@@ -1300,7 +1492,7 @@ t/lex-line.sh \
 t/lex-nodist.sh \
 t/lex-pr204.sh \
 t/lflags.sh \
-t/lflags2.sh \
+t/lflags-cxx.sh \
 t/libexec.sh \
 t/libobj-basic.sh \
 t/libobj2.sh \
@@ -1355,7 +1547,13 @@ t/lisp5.sh \
 t/lisp6.sh \
 t/lisp7.sh \
 t/lisp8.sh \
+t/lisp-loadpath.sh \
+t/lisp-subdir.sh \
+t/lisp-subdir2.sh \
+t/lisp-subdir-mix.sh \
 t/lispdry.sh \
+t/lisp-pr11806.sh \
+t/lisp-flags.sh \
 t/listval.sh \
 t/location.sh \
 t/longline.sh \
@@ -1369,7 +1567,6 @@ t/ltinstloc.sh \
 t/ltlibobjs.sh \
 t/ltlibsrc.sh \
 t/ltorder.sh \
-t/lzma.sh \
 t/m4-inclusion.sh \
 t/maintclean.sh \
 t/maintclean-vpath.sh \
@@ -1380,12 +1577,13 @@ t/makej.sh \
 t/makej2.sh \
 t/maken.sh \
 t/maken3.sh \
-t/make-dryrun.tap \
 t/makevars.sh \
+t/make-dryrun.tap \
+t/make-keepgoing.tap \
+t/make-is-gnu.sh \
 t/man.sh \
 t/man2.sh \
 t/man3.sh \
-t/man4.sh \
 t/man5.sh \
 t/man6.sh \
 t/man7.sh \
@@ -1396,22 +1594,20 @@ t/mdate3.sh \
 t/mdate4.sh \
 t/mdate5.sh \
 t/mdate6.sh \
-t/missing.sh \
-t/missing2.sh \
+t/missing-version-mismatch.sh \
 t/missing3.sh \
-t/missing4.sh \
-t/missing5.sh \
-t/missing6.sh \
+t/am-missing-prog.sh \
 t/missing-auxfile-stops-makefiles-creation.sh \
+t/mkdir_p.sh \
 t/mkdirp-deprecation.sh \
 t/mkinstall.sh \
 t/mkinst2.sh \
 t/mkinst3.sh \
 t/mmode.sh \
 t/mmodely.sh \
-t/multlib.sh \
+t/no-extra-c-stuff.sh \
 t/no-extra-makefile-code.sh \
-t/no-outdir-option.sh \
+t/no-spurious-install-recursive.sh \
 t/nobase.sh \
 t/nobase-libtool.sh \
 t/nobase-python.sh \
@@ -1440,7 +1636,6 @@ t/objcxx-flags.sh \
 t/objcxx-deps.sh \
 t/objc-megademo.sh \
 t/objext-pr10128.sh \
-t/obsolete.sh \
 t/oldvars.sh \
 t/order.sh \
 t/output.sh \
@@ -1459,21 +1654,23 @@ t/output13.sh \
 t/output-order.sh \
 t/override-conditional-1.sh \
 t/override-conditional-2.sh \
+t/override-conditional-pr13940.sh \
 t/override-html.sh \
 t/override-suggest-local.sh \
 t/parallel-am.sh \
 t/parallel-am2.sh \
 t/parallel-am3.sh \
 t/serial-tests.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/parallel-tests9.sh \
-t/parallel-tests10.sh \
+t/parallel-tests-basics.sh \
+t/parallel-tests-concurrency.sh \
+t/parallel-tests-concurrency-2.sh \
+t/parallel-tests-empty.sh \
+t/parallel-tests-exit-status-reported.sh \
+t/parallel-tests-generated-and-distributed.sh \
+t/parallel-tests-recheck.sh \
+t/parallel-tests-trailing-whitespace.sh \
 t/parallel-tests-recheck-depends-on-all.sh \
+t/parallel-tests-recheck-pr11791.sh \
 t/parallel-tests-exeext.sh \
 t/parallel-tests-suffix.sh \
 t/parallel-tests-suffix-prog.sh \
@@ -1502,8 +1699,6 @@ t/parallel-tests-no-spurious-summary.sh \
 t/parallel-tests-exit-statuses.sh \
 t/parallel-tests-console-output.sh \
 t/parallel-tests-once.sh \
-t/parallel-tests-trailing-bslash.sh \
-t/parallel-tests-many.sh \
 t/tests-environment.sh \
 t/am-tests-environment.sh \
 t/tests-environment-backcompat.sh \
@@ -1541,7 +1736,9 @@ t/test-extensions-cond.sh \
 t/parse.sh \
 t/percent.sh \
 t/percent2.sh \
+t/per-target-flags.sh \
 t/phony.sh \
+t/precious.sh \
 t/pluseq.sh \
 t/pluseq2.sh \
 t/pluseq3.sh \
@@ -1585,6 +1782,10 @@ t/pr401.sh \
 t/pr401b.sh \
 t/pr401c.sh \
 t/prefix.sh \
+t/preproc-basics.sh \
+t/preproc-c-compile.sh \
+t/preproc-demo.sh \
+t/preproc-errmsg.sh \
 t/primary.sh \
 t/primary2.sh \
 t/primary3.sh \
@@ -1596,7 +1797,6 @@ t/print-libdir.sh \
 t/proginst.sh \
 t/programs-primary-rewritten.sh \
 t/py-compile-basic.sh \
-t/py-compile-basic2.sh \
 t/py-compile-basedir.sh \
 t/py-compile-destdir.sh \
 t/py-compile-env.sh \
@@ -1605,49 +1805,55 @@ t/py-compile-usage.sh \
 t/python.sh \
 t/python2.sh \
 t/python3.sh \
-t/python4.sh \
-t/python5.sh \
-t/python5b.sh \
-t/python6.sh \
-t/python7.sh \
-t/python8.sh \
-t/python9.sh \
 t/python10.sh \
 t/python11.sh \
 t/python12.sh \
+t/python-am-path-iftrue.sh \
+t/python-missing.sh \
+t/python-too-old.sh \
 t/python-dist.sh \
 t/python-vars.sh \
 t/python-virtualenv.sh \
 t/python-pr10995.sh \
-t/recurs.sh \
-t/recurs2.sh \
+t/recurs-user.sh \
+t/recurs-user2.sh \
+t/recurs-user-deeply-nested.sh \
+t/recurs-user-indir.sh \
+t/recurs-user-keep-going.sh \
+t/recurs-user-many.sh \
+t/recurs-user-no-subdirs.sh \
+t/recurs-user-no-top-level.sh \
+t/recurs-user-override.sh \
+t/recurs-user-phony.sh \
+t/recurs-user-wrap.sh \
 t/relativize.tap \
-t/remake.sh \
-t/remake1a.sh \
-t/remake2.sh \
-t/remake3.sh \
-t/remake3a.sh \
-t/remake4.sh \
-t/remake5.sh \
-t/remake6.sh \
-t/remake7.sh \
-t/remake8a.sh \
-t/remake8b.sh \
-t/remake9a.sh \
-t/remake9b.sh \
-t/remake9c.sh \
-t/remake9d.sh \
-t/remake10a.sh \
-t/remake10b.sh \
-t/remake10c.sh \
-t/remake11.sh \
-t/remake12.sh \
+t/remake-fail.sh \
+t/remake-not-after-make-dist.sh \
+t/remake-maintainer-mode.sh \
+t/remake-makefile-intree.sh \
+t/remake-makefile-vpath.sh \
+t/remake-after-configure-ac.sh \
+t/remake-after-makefile-am.sh \
+t/remake-after-acinclude-m4.sh \
+t/remake-after-aclocal-m4.sh \
+t/remake-include-configure.sh \
+t/remake-include-makefile.sh \
+t/remake-include-aclocal.sh \
+t/remake-config-status-dependencies.sh \
+t/remake-configure-dependencies.sh \
+t/remake-deeply-nested.sh \
+t/remake-mild-stress.sh \
 t/remake-all-1.sh \
 t/remake-all-2.sh \
-t/remake-subdir-from-subdir.sh \
-t/remake-subdir-gnu.sh \
+t/remake-recurs-user.sh \
 t/remake-subdir.sh \
 t/remake-subdir2.sh \
+t/remake-subdir3.sh \
+t/remake-subdir-only.sh \
+t/remake-subdir-grepping.sh \
+t/remake-subdir-from-subdir.sh \
+t/remake-subdir-gnu.sh \
+t/remake-subdir-no-makefile.sh \
 t/remake-subdir-long-time.sh \
 t/remake-gnulib-add-acsubst.sh \
 t/remake-gnulib-add-header.sh \
@@ -1663,68 +1869,54 @@ t/remake-deleted-am-2.sh \
 t/remake-deleted-am-subdir.sh \
 t/remake-deleted-am.sh \
 t/remake-renamed-am.sh \
-t/pr8365-remake-timing.sh \
-t/req.sh \
-t/reqd.sh \
+t/remake-aclocal-version-mismatch.sh \
+t/remake-macrodir.sh \
+t/remake-timing-bug-pr8365.sh \
 t/reqd2.sh \
 t/repeated-options.sh \
+t/rm-f-probe.sh \
 t/rulepat.sh \
-t/self-check-cleanup.tap \
+t/self-check-cc-no-c-o.sh \
 t/self-check-configure-help.sh \
 t/self-check-dir.tap \
-t/self-check-env-sanitize.tap \
 t/self-check-exit.tap \
 t/self-check-explicit-skips.sh \
 t/self-check-is_newest.tap \
 t/self-check-me.tap \
-t/self-check-reexec.tap \
 t/self-check-report.sh \
-t/self-check-sanity.sh \
 t/self-check-seq.tap \
+t/self-check-shell-no-trail-bslash.sh \
 t/self-check-is-blocked-signal.tap \
-t/self-check-tap.sh \
 t/self-check-unindent.tap \
 t/sanity.sh \
-t/scripts.sh \
 t/seenc.sh \
-t/silent.sh \
-t/silent2.sh \
-t/silent3.sh \
-t/silent4.sh \
-t/silent6.sh \
-t/silent7.sh \
-t/silent8.sh \
-t/silent9.sh \
-t/silentcxx.sh \
-t/silentcxx-gcc.sh \
-t/silentf77.sh \
-t/silentf90.sh \
-t/silent-amopts.sh \
-t/silent-many-gcc.sh \
-t/silent-many-generic.sh \
-t/silent-nowarn.sh \
-t/silent-configsite.sh \
-t/silent-nested-vars.sh \
+t/silent-c.sh \
+t/silent-cxx.sh \
+t/silent-lt.sh \
+t/silent-f77.sh \
+t/silent-f90.sh \
+t/silent-many-languages.sh \
+t/silent-gen.sh \
+t/silent-texi.sh \
 t/silent-lex.sh \
 t/silent-yacc.sh \
 t/silent-yacc-headers.sh \
-t/srcsub.sh \
-t/srcsub2.sh \
+t/silent-configsite.sh \
+t/silent-nested-vars.sh \
+t/silent-custom.sh \
+t/src-acsubst.sh \
+t/sourcefile-in-subdir.sh \
 t/space.sh \
-t/specflg.sh \
-t/specflg2.sh \
-t/specflg3.sh \
 t/specflg6.sh \
 t/specflg7.sh \
 t/specflg8.sh \
 t/specflg9.sh \
-t/specflg10.sh \
 t/specflg-dummy.sh \
 t/spell.sh \
 t/spell2.sh \
 t/spell3.sh \
 t/spelling.sh \
-t/spy.sh \
+t/spy-double-colon.sh \
 t/spy-rm.tap \
 t/stdinc.sh \
 t/stamph2.sh \
@@ -1736,19 +1928,18 @@ t/strip.sh \
 t/strip2.sh \
 t/strip3.sh \
 t/subdir.sh \
-t/subdir2.sh \
-t/subdir3.sh \
-t/subdir4.sh \
-t/subdir5.sh \
-t/subdir6.sh \
-t/subdir7.sh \
-t/subdir8.sh \
-t/subdir9.sh \
-t/subdir10.sh \
-t/subdirbuiltsources.sh \
-t/subcond.sh \
-t/subcond2.sh \
-t/subcond3.sh \
+t/subdir-ac-subst.sh \
+t/subdir-add-pr46.sh \
+t/subdir-add2-pr46.sh \
+t/subdir-am-cond.sh \
+t/subdir-cond-err.sh \
+t/subdir-cond-gettext.sh \
+t/subdir-env-interference.sh \
+t/subdir-order.sh \
+t/subdir-with-slash.sh \
+t/subdir-subsub.sh \
+t/subdir-distclean.sh \
+t/subdir-keep-going-pr12554.sh \
 t/subobj.sh \
 t/subobj2.sh \
 t/subobj4.sh \
@@ -1762,11 +1953,16 @@ t/subobj11a.sh \
 t/subobj11b.sh \
 t/subobj11c.sh \
 t/subobjname.sh \
+t/subobj-clean-pr10697.sh \
+t/subobj-clean-lt-pr10697.sh \
+t/subobj-indir-pr13928.sh \
+t/subobj-vpath-pr13928.sh \
 t/subpkg.sh \
 t/subpkg2.sh \
 t/subpkg3.sh \
 t/subpkg4.sh \
 t/subpkg-yacc.sh \
+t/subpkg-macrodir.sh \
 t/subst.sh \
 t/subst3.sh \
 t/subst4.sh \
@@ -1788,9 +1984,11 @@ t/suffix8.tap \
 t/suffix9.sh \
 t/suffix10.tap \
 t/suffix11.tap \
-t/suffix12.sh \
-t/suffix13.sh \
 t/suffix-chain.tap \
+t/suffix-custom-pr14441.sh \
+t/suffix-custom-subobj.sh \
+t/suffix-custom-subobj-and-specflg.sh \
+t/suffix-extra-c-stuff-pr14560.sh \
 t/symlink.sh \
 t/symlink2.sh \
 t/syntax.sh \
@@ -1853,7 +2051,6 @@ t/tap-planskip-whitespace.sh \
 t/tap-planskip-badexit.sh \
 t/tap-planskip-bailout.sh \
 t/tap-planskip-later-errors.sh \
-t/tap-realtime.sh \
 t/tap-test-number-0.sh \
 t/tap-recheck-logs.sh \
 t/tap-result-comment.sh \
@@ -1879,45 +2076,51 @@ t/tap-summary-color.sh \
 t/tags.sh \
 t/tags2.sh \
 t/tagsub.sh \
-t/tar.sh \
-t/tar2.sh \
-t/tar3.sh \
+t/tags-pr12372.sh \
+t/tar-ustar.sh \
+t/tar-pax.sh \
+t/tar-opts-errors.sh \
+t/tar-ustar-id-too-high.sh \
 t/tar-override.sh \
 t/target-cflags.sh \
 t/targetclash.sh \
 t/tests-environment-fd-redirect.sh \
 t/tests-environment-and-log-compiler.sh \
-t/txinfo.sh \
-t/txinfo2.sh \
-t/txinfo3.sh \
-t/txinfo4.sh \
-t/txinfo5.sh \
-t/txinfo5b.sh \
-t/txinfo6.sh \
-t/txinfo7.sh \
-t/txinfo8.sh \
-t/txinfo9.sh \
-t/txinfo10.sh \
-t/txinfo13.sh \
-t/txinfo16.sh \
-t/txinfo17.sh \
+t/txinfo-absolute-srcdir-pr408.sh \
+t/txinfo-add-missing-and-dist.sh \
+t/txinfo-bsd-make-recurs.sh \
+t/txinfo-builddir.sh \
+t/txinfo-clean.sh \
+t/txinfo-dvi-recurs.sh \
+t/txinfo-info-in-srcdir.sh \
+t/txinfo-include.sh \
+t/txinfo-makeinfo-error-no-clobber.sh \
+t/txinfo-many-output-formats.sh \
+t/txinfo-many-output-formats-vpath.sh \
+t/txinfo-nodist-info.sh \
+t/txinfo-no-clutter.sh \
+t/txinfo-no-extra-dist.sh \
+t/txinfo-no-installinfo.sh \
+t/txinfo-no-repeated-targets.sh \
+t/txinfo-other-suffixes.sh \
+t/txinfo-override-infodeps.sh \
+t/txinfo-override-texinfo-tex.sh \
+t/txinfo-setfilename-repeated.sh \
+t/txinfo-setfilename-suffix-strip.sh \
+t/txinfo-subdir-pr343.sh \
+t/txinfo-tex-dist.sh \
+t/txinfo-unrecognized-extension.sh \
+t/txinfo-unrecognized-info-suffix.sh \
+t/txinfo-vtexi.sh \
+t/txinfo-vtexi2.sh \
+t/txinfo-vtexi3.sh \
+t/txinfo-vtexi4.sh \
+t/txinfo-without-info-suffix.sh \
 t/txinfo19.sh \
-t/txinfo20.sh \
-t/txinfo21.sh \
-t/txinfo22.sh \
 t/txinfo23.sh \
 t/txinfo24.sh \
 t/txinfo25.sh \
-t/txinfo26.sh \
-t/txinfo27.sh \
 t/txinfo28.sh \
-t/txinfo29.sh \
-t/txinfo30.sh \
-t/txinfo31.sh \
-t/txinfo32.sh \
-t/txinfo33.sh \
-t/txinfo-no-clutter.sh \
-t/txinfo-unrecognized-extension.sh \
 t/transform.sh \
 t/transform2.sh \
 t/transform3.sh \
@@ -1927,35 +2130,32 @@ t/unused.sh \
 t/upc.sh \
 t/upc2.sh \
 t/upc3.sh \
-t/vala.sh \
-t/vala2.sh \
-t/vala3.sh \
-t/vala4.sh \
-t/vala5.sh \
-t/vala-vapi.sh \
+t/vala-configure.sh \
+t/vala-grepping.sh \
 t/vala-headers.sh \
 t/vala-libs.sh \
-t/vala-vpath.sh \
 t/vala-mix.sh \
 t/vala-mix2.sh \
+t/vala-non-recursive-setup.sh \
 t/vala-parallel.sh \
+t/vala-per-target-flags.sh \
+t/vala-recursive-setup.sh \
+t/vala-vapi.sh \
+t/vala-vpath.sh \
 t/vars.sh \
 t/vars3.sh \
+t/var-recurs.sh \
+t/var-recurs2.sh \
 t/vartar.sh \
 t/vartypos.sh \
 t/vartypo2.sh \
-t/version.sh \
-t/version2.sh \
 t/version3.sh \
 t/version4.sh \
 t/version6.sh \
 t/version7.sh \
 t/version8.sh \
 t/vpath.sh \
-t/vtexi.sh \
-t/vtexi2.sh \
-t/vtexi3.sh \
-t/vtexi4.sh \
+t/warnings-obsolete-default.sh \
 t/warnings-override.sh \
 t/warnings-precedence.sh \
 t/warnings-strictness-interactions.sh \
@@ -1969,15 +2169,10 @@ t/werror3.sh \
 t/werror4.sh \
 t/whoami.sh \
 t/xsource.sh \
-t/yacc.sh \
-t/yacc2.sh \
-t/yacc4.sh \
-t/yacc5.sh \
-t/yacc7.sh \
-t/yacc8.sh \
-t/yaccdry.sh \
-t/yaccpp.sh \
-t/yaccvpath.sh \
+t/yacc-misc.sh \
+t/yacc-dry.sh \
+t/yacc-cxx-grepping.sh \
+t/yacc-vpath.sh \
 t/yacc-auxdir.sh \
 t/yacc-basic.sh \
 t/yacc-cxx.sh \
@@ -1993,13 +2188,17 @@ t/yacc-depend.sh \
 t/yacc-depend2.sh \
 t/yacc-dist-nobuild-subdir.sh \
 t/yacc-dist-nobuild.sh \
+t/yacc-grepping.sh \
+t/yacc-grepping2.sh \
+t/yacc-headers-and-dist-pr47.sh \
 t/yacc-line.sh \
 t/yacc-mix-c-cxx.sh \
 t/yacc-nodist.sh \
 t/yacc-pr204.sh \
+t/yacc-subdir.sh \
 t/yacc-weirdnames.sh \
 t/yflags.sh \
-t/yflags2.sh \
+t/yflags-cxx.sh \
 t/yflags-cmdline-override.sh \
 t/yflags-conditional.sh \
 t/yflags-d-false-positives.sh \
@@ -2007,76 +2206,77 @@ t/yflags-force-conditional.sh \
 t/yflags-force-override.sh \
 t/yflags-var-expand.sh \
 t/libtool-macros.sh \
-t/gettext-macros.sh
+t/gettext-macros.sh \
+t/pkg-config-macros.sh
 
-generated_TESTS = t/ar-lib-w.sh t/compile-w.sh t/compile2-w.sh \
-       t/compile3-w.sh t/compile4-w.sh t/compile5-w.sh \
-       t/compile6-w.sh t/instsh2-w.sh t/instsh3-w.sh t/mdate5-w.sh \
-       t/mdate6-w.sh t/missing-w.sh t/missing2-w.sh t/missing3-w.sh \
-       t/missing5-w.sh t/mkinst3-w.sh t/check-w.sh t/check2-w.sh \
-       t/check3-w.sh t/check4-w.sh t/check5-w.sh t/check6-w.sh \
-       t/check7-w.sh t/check8-w.sh t/check11-w.sh t/check12-w.sh \
-       t/check-subst-w.sh t/check-subst-prog-w.sh \
+generated_TESTS = t/ar-lib-w.sh t/built-sources-check-w.sh \
        t/check-exported-srcdir-w.sh t/check-fd-redirect-w.sh \
-       t/check-tests-in-builddir-w.sh t/color-w.sh t/color2-w.sh \
-       t/exeext4-w.sh t/maken3-w.sh t/posixsubst-tests-w.sh \
-       t/tap-ambiguous-directive-w.sh t/tap-autonumber-w.sh \
-       t/tap-bailout-w.sh t/tap-bailout-and-logging-w.sh \
-       t/tap-bailout-suppress-badexit-w.sh \
-       t/tap-bailout-suppress-later-diagnostic-w.sh \
-       t/tap-bailout-suppress-later-errors-w.sh t/tap-color-w.sh \
-       t/tap-deps-w.sh t/tap-diagnostic-w.sh \
-       t/tap-empty-diagnostic-w.sh t/tap-empty-w.sh \
-       t/tap-escape-directive-w.sh t/tap-escape-directive-2-w.sh \
-       t/tap-exit-w.sh t/tap-signal-w.tap t/tap-fancy-w.sh \
-       t/tap-fancy2-w.sh t/tap-global-log-w.sh \
-       t/tap-global-result-w.sh t/tap-log-w.sh t/tap-msg0-result-w.sh \
-       t/tap-msg0-directive-w.sh t/tap-msg0-planskip-w.sh \
-       t/tap-msg0-bailout-w.sh t/tap-msg0-misc-w.sh \
-       t/tap-merge-stdout-stderr-w.sh \
-       t/tap-no-merge-stdout-stderr-w.sh \
-       t/tap-no-disable-hard-error-w.sh \
-       t/tap-no-spurious-summary-w.sh t/tap-no-spurious-numbers-w.sh \
-       t/tap-no-spurious-w.sh t/tap-not-ok-skip-w.sh \
-       t/tap-number-wordboundary-w.sh t/tap-numeric-description-w.sh \
-       t/tap-negative-numbers-w.sh t/tap-numbers-leading-zero-w.sh \
-       t/tap-out-of-order-w.sh t/tap-passthrough-w.sh \
-       t/tap-passthrough-exit-w.sh t/tap-plan-w.sh \
-       t/tap-plan-corner-w.sh t/tap-plan-errors-w.sh \
-       t/tap-plan-middle-w.sh t/tap-plan-whitespace-w.sh \
-       t/tap-plan-leading-zero-w.sh t/tap-plan-malformed-w.sh \
-       t/tap-missing-plan-and-bad-exit-w.sh t/tap-planskip-w.sh \
-       t/tap-planskip-late-w.sh t/tap-planskip-and-logging-w.sh \
-       t/tap-planskip-unplanned-w.sh \
-       t/tap-planskip-unplanned-corner-w.sh \
-       t/tap-planskip-case-insensitive-w.sh \
-       t/tap-planskip-whitespace-w.sh t/tap-planskip-badexit-w.sh \
-       t/tap-planskip-bailout-w.sh t/tap-planskip-later-errors-w.sh \
-       t/tap-realtime-w.sh t/tap-test-number-0-w.sh \
-       t/tap-recheck-logs-w.sh t/tap-result-comment-w.sh \
-       t/tap-todo-skip-together-w.sh t/tap-todo-skip-whitespace-w.sh \
-       t/tap-todo-skip-w.sh t/tap-unplanned-w.sh \
-       t/tap-whitespace-normalization-w.sh \
-       t/tap-with-and-without-number-w.sh t/tap-xfail-tests-w.sh \
-       t/tap-bad-prog-w.tap t/tap-basic-w.sh \
-       t/tap-diagnostic-custom-w.sh t/tap-driver-stderr-w.sh \
-       t/tap-doc-w.sh t/tap-more-w.sh t/tap-more2-w.sh \
-       t/tap-recheck-w.sh t/depcomp-lt-msvcmsys.tap \
-       t/depcomp-lt-disabled.tap t/depcomp-lt-msvisualcpp.tap \
-       t/depcomp-lt-makedepend.tap t/depcomp-lt-auto.tap \
-       t/depcomp-lt-cpp.tap t/depcomp-lt-gcc.tap \
-       t/depcomp-lt-dashmstdout.tap t/depcomp-msvcmsys.tap \
-       t/depcomp-disabled.tap t/depcomp-msvisualcpp.tap \
-       t/depcomp-makedepend.tap t/depcomp-auto.tap t/depcomp-cpp.tap \
-       t/depcomp-gcc.tap t/depcomp-dashmstdout.tap
+       t/check-subst-prog-w.sh t/check-subst-w.sh \
+       t/check-tests-in-builddir-w.sh t/check-w.sh t/check11-w.sh \
+       t/check12-w.sh t/check2-w.sh t/check4-w.sh t/check5-w.sh \
+       t/check6-w.sh t/check7-w.sh t/check8-w.sh t/color-tests-w.sh \
+       t/color-tests2-w.sh t/compile-w.sh t/compile2-w.sh \
+       t/compile3-w.sh t/compile4-w.sh t/compile5-w.sh \
+       t/compile6-w.sh t/compile7-w.sh t/exeext4-w.sh \
+       t/install-sh-option-C-w.sh t/install-sh-unittests-w.sh \
+       t/maken3-w.sh t/mdate5-w.sh t/mdate6-w.sh \
+       t/missing-version-mismatch-w.sh t/missing3-w.sh t/mkinst3-w.sh \
+       t/posixsubst-tests-w.sh t/depcomp-lt-auto.tap \
+       t/depcomp-lt-cpp.tap t/depcomp-lt-dashmstdout.tap \
+       t/depcomp-lt-disabled.tap t/depcomp-lt-gcc.tap \
+       t/depcomp-lt-makedepend.tap t/depcomp-lt-msvcmsys.tap \
+       t/depcomp-lt-msvisualcpp.tap t/depcomp-auto.tap \
+       t/depcomp-cpp.tap t/depcomp-dashmstdout.tap \
+       t/depcomp-disabled.tap t/depcomp-gcc.tap \
+       t/depcomp-makedepend.tap t/depcomp-msvcmsys.tap \
+       t/depcomp-msvisualcpp.tap
+check_tap_testsuite_summary_TESTS = \
+  t/tap-summary.sh \
+  t/tap-summary-color.sh
+
+check_testsuite_summary_TESTS = \
+  t/testsuite-summary-color.sh \
+  t/testsuite-summary-count.sh
+
+depcomp_TESTS = \
+  t/depcomp-lt-auto.tap \
+  t/depcomp-lt-cpp.tap \
+  t/depcomp-lt-dashmstdout.tap \
+  t/depcomp-lt-disabled.tap \
+  t/depcomp-lt-gcc.tap \
+  t/depcomp-lt-makedepend.tap \
+  t/depcomp-lt-msvcmsys.tap \
+  t/depcomp-lt-msvisualcpp.tap \
+  t/depcomp-auto.tap \
+  t/depcomp-cpp.tap \
+  t/depcomp-dashmstdout.tap \
+  t/depcomp-disabled.tap \
+  t/depcomp-gcc.tap \
+  t/depcomp-makedepend.tap \
+  t/depcomp-msvcmsys.tap \
+  t/depcomp-msvisualcpp.tap
+
+extract_testsuite_summary_TESTS = \
+  t/testsuite-summary-count-many.sh
+
+gettext_macros_TESTS = \
+  t/gettext-basics.sh \
+  t/gettext-config-rpath.sh \
+  t/gettext-external-pr338.sh \
+  t/gettext-intl-subdir.sh \
+  t/gettext-pr381.sh \
+  t/subdir-cond-gettext.sh
+
 libtool_macros_TESTS = \
   t/ar-lib4.sh \
   t/ar-lib6a.sh \
   t/ar-lib6b.sh \
   t/canon6.sh \
   t/canon7.sh \
+  t/ccnoco-lt.sh \
+  t/cxx-lt-demo.sh \
   t/depcomp8b.sh \
-  t/extradep2.sh \
+  t/extra-deps-lt.sh \
   t/fort5.sh \
   t/instdir-ltlib.sh \
   t/instfail-libtool.sh \
@@ -2112,30 +2312,25 @@ libtool_macros_TESTS = \
   t/pr307.sh \
   t/pr401b.sh \
   t/reqd2.sh \
-  t/silent3.sh \
-  t/silent4.sh \
-  t/silent9.sh \
+  t/silent-lt.sh \
   t/stdlib2.sh \
   t/strip3.sh \
   t/subobj9.sh \
+  t/subobj-clean-lt-pr10697.sh \
   t/suffix2.sh \
   t/suffix5.sh \
   t/suffix8.tap \
   t/suffix10.tap \
   t/vala-libs.sh \
   t/vartypo2.sh \
-  t/depcomp-lt-msvcmsys.tap \
-  t/depcomp-lt-disabled.tap \
-  t/depcomp-lt-msvisualcpp.tap \
-  t/depcomp-lt-makedepend.tap \
   t/depcomp-lt-auto.tap \
   t/depcomp-lt-cpp.tap \
+  t/depcomp-lt-dashmstdout.tap \
+  t/depcomp-lt-disabled.tap \
   t/depcomp-lt-gcc.tap \
-  t/depcomp-lt-dashmstdout.tap
-
-check_testsuite_summary_TESTS = \
-  t/testsuite-summary-color.sh \
-  t/testsuite-summary-count.sh
+  t/depcomp-lt-makedepend.tap \
+  t/depcomp-lt-msvcmsys.tap \
+  t/depcomp-lt-msvisualcpp.tap
 
 on_tap_with_common_setup_TESTS = \
   t/tap-ambiguous-directive.sh \
@@ -2196,7 +2391,6 @@ on_tap_with_common_setup_TESTS = \
   t/tap-planskip-badexit.sh \
   t/tap-planskip-bailout.sh \
   t/tap-planskip-later-errors.sh \
-  t/tap-realtime.sh \
   t/tap-test-number-0.sh \
   t/tap-recheck-logs.sh \
   t/tap-result-comment.sh \
@@ -2208,36 +2402,17 @@ on_tap_with_common_setup_TESTS = \
   t/tap-with-and-without-number.sh \
   t/tap-xfail-tests.sh
 
-check_tap_testsuite_summary_TESTS = \
-  t/tap-summary.sh \
-  t/tap-summary-color.sh
-
-depcomp_TESTS = \
-  t/depcomp-lt-msvcmsys.tap \
-  t/depcomp-lt-disabled.tap \
-  t/depcomp-lt-msvisualcpp.tap \
-  t/depcomp-lt-makedepend.tap \
-  t/depcomp-lt-auto.tap \
-  t/depcomp-lt-cpp.tap \
-  t/depcomp-lt-gcc.tap \
-  t/depcomp-lt-dashmstdout.tap \
-  t/depcomp-msvcmsys.tap \
-  t/depcomp-disabled.tap \
-  t/depcomp-msvisualcpp.tap \
-  t/depcomp-makedepend.tap \
-  t/depcomp-auto.tap \
-  t/depcomp-cpp.tap \
-  t/depcomp-gcc.tap \
-  t/depcomp-dashmstdout.tap
-
-extract_testsuite_summary_TESTS = \
-  t/testsuite-summary-count-many.sh
-
-gettext_macros_TESTS = \
-  t/gettext.sh \
-  t/gettext2.sh \
-  t/gettext3.sh \
-  t/subcond.sh
+pkgconfig_macros_TESTS = \
+  t/vala-headers.sh \
+  t/vala-libs.sh \
+  t/vala-mix.sh \
+  t/vala-mix2.sh \
+  t/vala-non-recursive-setup.sh \
+  t/vala-parallel.sh \
+  t/vala-per-target-flags.sh \
+  t/vala-recursive-setup.sh \
+  t/vala-vapi.sh \
+  t/vala-vpath.sh
 
 use_trivial_test_driver_TESTS = \
   t/testsuite-summary-count-many.sh \
@@ -2247,110 +2422,24 @@ use_trivial_test_driver_TESTS = \
   t/test-driver-custom-multitest-recheck.sh \
   t/test-driver-custom-multitest-recheck2.sh
 
+contrib_TESTS = \
+  contrib/t/parallel-tests-html.sh \
+  contrib/t/parallel-tests-html-recursive.sh \
+  contrib/t/help-multilib.sh \
+  contrib/t/multilib.sh
 
-# Static dependencies valid for each test case.
-check_SCRIPTS = t/wrap/aclocal-$(APIVERSION) t/wrap/automake-$(APIVERSION)
-dist_check_DATA = t/ax/plain-functions.sh t/ax/tap-functions.sh
-check_DATA = defs defs-static
-test_subdirs = t t/pm t/perf
+test_subdirs = t t/pm contrib/t
 am__tmk = tests-in-makefile-list.tmp
 am__tfs = tests-on-filesystem-list.tmp
 am__tdf = diff-in-tests-lists.tmp
-info_TEXINFOS = doc/automake.texi doc/automake-history.texi
-doc_automake_TEXINFOS = doc/fdl.texi
-doc_automake_history_TEXINFOS = doc/fdl.texi
-man1_MANS = \
-  doc/aclocal.1 \
-  doc/automake.1 \
-  doc/aclocal-$(APIVERSION).1 \
-  doc/automake-$(APIVERSION).1
-
-update_mans = \
-  $(AM_V_GEN): \
-    && $(MKDIR_P) doc \
-    && PATH="$(abs_builddir)/t/wrap$(PATH_SEPARATOR)$$PATH" \
-    && export PATH \
-    && $(PERL) $(srcdir)/doc/help2man --output=$@
-
-amhello_sources = \
-  doc/amhello/configure.ac \
-  doc/amhello/Makefile.am \
-  doc/amhello/README \
-  doc/amhello/src/main.c \
-  doc/amhello/src/Makefile.am
-
-amhello_configury = \
-  aclocal.m4 \
-  autom4te.cache \
-  Makefile.in \
-  config.h.in \
-  configure \
-  depcomp \
-  install-sh \
-  missing \
-  src/Makefile.in
-
-dist_noinst_DATA = $(amhello_sources)
-dist_doc_DATA = $(srcdir)/doc/amhello-1.0.tar.gz
-
-##########################################################################
-
-##########################################################################
-gitlog_to_changelog_command = $(PERL) $(srcdir)/lib/gitlog-to-changelog
-gitlog_to_changelog_fixes = $(srcdir)/.git-log-fix
-gitlog_to_changelog_options = --amend=$(gitlog_to_changelog_fixes) \
-                              --since='2011-12-28 00:00:00' \
-                              --no-cluster --format '%s%n%n%b'
-
-PERL_COVERAGE_DB = $(abs_top_builddir)/cover_db
-PERL_COVERAGE_FLAGS = -MDevel::Cover=-db,$(PERL_COVERAGE_DB),-silent,on,-summary,off
-PERL_COVER = cover
-GIT = git
-version_rx = ^[1-9][0-9]*\.[0-9][0-9]*(\.[0-9][0-9]*)?
-stable_version_rx = $(version_rx)$$
-beta_version_rx = $(version_rx)[bdfhjlnprtvxz]$$
-match_version = echo "$(VERSION)" | $(EGREP) >/dev/null
-git_must_have_clean_workdir = \
-  $(GIT) rev-parse --verify HEAD >/dev/null \
-    && $(GIT) update-index -q --refresh \
-    && $(GIT) diff-files --quiet \
-    && $(GIT) diff-index --quiet --cached HEAD \
-    || fatal "you have uncommitted or unstaged changes"
-
-determine_release_type = \
-  if $(match_version) '$(stable_version_rx)'; then \
-    release_type='Release' dest=ftp; \
-  elif $(match_version) '$(beta_version_rx)'; then \
-    release_type='Beta release' dest=alpha; \
-  else \
-    fatal "invalid version '$(VERSION)' for a release"; \
-  fi
-
-WGET = wget
-WGET_SV_CVS = $(WGET) http://savannah.gnu.org/cgi-bin/viewcvs/~checkout~/
-WGET_SV_GIT_CF = $(WGET) 'http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;hb=HEAD;f='
-WGET_SV_GIT_AC = $(WGET) 'http://git.savannah.gnu.org/gitweb/?p=autoconf.git;a=blob_plain;hb=HEAD;f='
-WGET_SV_GIT_GL = $(WGET) 'http://git.savannah.gnu.org/gitweb/?p=gnulib.git;a=blob_plain;hb=HEAD;f='
-FETCHFILES = \
-INSTALL \
-config.guess \
-config.sub \
-gnupload \
-gitlog-to-changelog \
-texinfo.tex \
-update-copyright
-
-update_copyright_env = \
-  UPDATE_COPYRIGHT_FORCE=1 \
-  UPDATE_COPYRIGHT_USE_INTERVALS=2
-
+PERF_TEST_SUITE_LOG = t/perf/test-suite.log
 all: all-am
 
 .SUFFIXES:
 .SUFFIXES: .dvi .log .pl .pl$(EXEEXT) .ps .sh .sh$(EXEEXT) .tap .tap$(EXEEXT) .trs
 am--refresh: Makefile
        @:
-$(srcdir)/Makefile.in:  $(srcdir)/Makefile.am $(srcdir)/t/list-of-tests.mk $(srcdir)/t/testsuite-part.am $(srcdir)/t/CheckListOfTests.am $(am__configure_deps)
+$(srcdir)/Makefile.in:  $(srcdir)/Makefile.am $(srcdir)/bin/Makefile.inc $(srcdir)/doc/Makefile.inc $(srcdir)/lib/Makefile.inc $(srcdir)/lib/Automake/Makefile.inc $(srcdir)/lib/am/Makefile.inc $(srcdir)/m4/Makefile.inc $(srcdir)/t/Makefile.inc $(srcdir)/t/list-of-tests.mk $(srcdir)/t/testsuite-part.am $(srcdir)/contrib/t/Makefile.inc $(srcdir)/t/CheckListOfTests.am $(am__configure_deps)
        @for dep in $?; do \
          case '$(am__configure_deps)' in \
            *$$dep*) \
@@ -2363,7 +2452,6 @@ $(srcdir)/Makefile.in:  $(srcdir)/Makefile.am $(srcdir)/t/list-of-tests.mk $(src
        echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu --ignore-deps Makefile'; \
        $(am__cd) $(top_srcdir) && \
          $(AUTOMAKE) --gnu --ignore-deps Makefile
-.PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
        @case '$?' in \
          *config.status*) \
@@ -2373,7 +2461,7 @@ Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
            echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \
            cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \
        esac;
-$(srcdir)/t/list-of-tests.mk $(srcdir)/t/testsuite-part.am $(srcdir)/t/CheckListOfTests.am:
+$(srcdir)/bin/Makefile.inc $(srcdir)/doc/Makefile.inc $(srcdir)/lib/Makefile.inc $(srcdir)/lib/Automake/Makefile.inc $(srcdir)/lib/am/Makefile.inc $(srcdir)/m4/Makefile.inc $(srcdir)/t/Makefile.inc $(srcdir)/t/list-of-tests.mk $(srcdir)/t/testsuite-part.am $(srcdir)/contrib/t/Makefile.inc $(srcdir)/t/CheckListOfTests.am $(am__empty):
 
 $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
        $(SHELL) ./config.status --recheck
@@ -2451,43 +2539,42 @@ $(srcdir)/doc/automake.info: doc/automake.texi $(srcdir)/doc/version.texi $(doc_
 doc/automake.dvi: doc/automake.texi $(srcdir)/doc/version.texi $(doc_automake_TEXINFOS) doc/$(am__dirstamp)
        $(AM_V_TEXI2DVI)TEXINPUTS="$(am__TEXINFO_TEX_DIR)$(PATH_SEPARATOR)$$TEXINPUTS" \
        MAKEINFO='$(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I doc -I $(srcdir)/doc' \
-       $(TEXI2DVI) $(AM_V_texinfo) --clean -o $@ `test -f 'doc/automake.texi' || echo '$(srcdir)/'`doc/automake.texi $(AM_V_texidevnull)
+       $(TEXI2DVI) $(AM_V_texinfo) --build-dir=$(@:.dvi=.t2d) -o $@ $(AM_V_texidevnull) \
+       `test -f 'doc/automake.texi' || echo '$(srcdir)/'`doc/automake.texi
 
 doc/automake.pdf: doc/automake.texi $(srcdir)/doc/version.texi $(doc_automake_TEXINFOS) doc/$(am__dirstamp)
        $(AM_V_TEXI2PDF)TEXINPUTS="$(am__TEXINFO_TEX_DIR)$(PATH_SEPARATOR)$$TEXINPUTS" \
        MAKEINFO='$(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I doc -I $(srcdir)/doc' \
-       $(TEXI2PDF) $(AM_V_texinfo) --clean -o $@ `test -f 'doc/automake.texi' || echo '$(srcdir)/'`doc/automake.texi $(AM_V_texidevnull)
+       $(TEXI2PDF) $(AM_V_texinfo) --build-dir=$(@:.pdf=.t2p) -o $@ $(AM_V_texidevnull) \
+       `test -f 'doc/automake.texi' || echo '$(srcdir)/'`doc/automake.texi
 
 doc/automake.html: doc/automake.texi $(srcdir)/doc/version.texi $(doc_automake_TEXINFOS) doc/$(am__dirstamp)
        $(AM_V_MAKEINFO)rm -rf $(@:.html=.htp)
        $(AM_V_at)if $(MAKEINFOHTML) $(AM_MAKEINFOHTMLFLAGS) $(MAKEINFOFLAGS) -I doc -I $(srcdir)/doc \
         -o $(@:.html=.htp) `test -f 'doc/automake.texi' || echo '$(srcdir)/'`doc/automake.texi; \
        then \
-         rm -rf $@; \
-         if test ! -d $(@:.html=.htp) && test -d $(@:.html=); then \
-           mv $(@:.html=) $@; else mv $(@:.html=.htp) $@; fi; \
+         rm -rf $@ && mv $(@:.html=.htp) $@; \
        else \
-         if test ! -d $(@:.html=.htp) && test -d $(@:.html=); then \
-           rm -rf $(@:.html=); else rm -Rf $(@:.html=.htp) $@; fi; \
-         exit 1; \
+         rm -rf $(@:.html=.htp); exit 1; \
        fi
 $(srcdir)/doc/version.texi:  $(srcdir)/doc/stamp-vti
 $(srcdir)/doc/stamp-vti: doc/automake.texi $(top_srcdir)/configure
-       test -f doc/$(am__dirstamp) || $(MAKE) $(AM_MAKEFLAGS) doc/$(am__dirstamp)
+       @test -f doc/$(am__dirstamp) || $(MAKE) $(AM_MAKEFLAGS) doc/$(am__dirstamp)
        @(dir=.; test -f ./doc/automake.texi || dir=$(srcdir); \
        set `$(SHELL) $(top_srcdir)/lib/mdate-sh $$dir/doc/automake.texi`; \
        echo "@set UPDATED $$1 $$2 $$3"; \
        echo "@set UPDATED-MONTH $$2 $$3"; \
        echo "@set EDITION $(VERSION)"; \
-       echo "@set VERSION $(VERSION)") > vti.tmp
-       @cmp -s vti.tmp $(srcdir)/doc/version.texi \
-         || (echo "Updating $(srcdir)/doc/version.texi"; \
-             cp vti.tmp $(srcdir)/doc/version.texi)
-       -@rm -f vti.tmp
+       echo "@set VERSION $(VERSION)") > vti.tmp$$$$ && \
+       (cmp -s vti.tmp$$$$ $(srcdir)/doc/version.texi \
+         || (echo "Updating $(srcdir)/doc/version.texi" && \
+             cp vti.tmp$$$$ $(srcdir)/doc/version.texi.tmp$$$$ && \
+             mv $(srcdir)/doc/version.texi.tmp$$$$ $(srcdir)/doc/version.texi)) && \
+       rm -f vti.tmp$$$$ $(srcdir)/doc/version.texi.$$$$
        @cp $(srcdir)/doc/version.texi $@
 
 mostlyclean-vti:
-       -rm -f vti.tmp
+       -rm -f vti.tmp* $(srcdir)/doc/version.texi.tmp*
 
 maintainer-clean-vti:
        -rm -f $(srcdir)/doc/stamp-vti $(srcdir)/doc/version.texi
@@ -2517,25 +2604,23 @@ $(srcdir)/doc/automake-history.info: doc/automake-history.texi $(doc_automake_hi
 doc/automake-history.dvi: doc/automake-history.texi $(doc_automake_history_TEXINFOS) doc/$(am__dirstamp)
        $(AM_V_TEXI2DVI)TEXINPUTS="$(am__TEXINFO_TEX_DIR)$(PATH_SEPARATOR)$$TEXINPUTS" \
        MAKEINFO='$(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I doc -I $(srcdir)/doc' \
-       $(TEXI2DVI) $(AM_V_texinfo) --clean -o $@ `test -f 'doc/automake-history.texi' || echo '$(srcdir)/'`doc/automake-history.texi $(AM_V_texidevnull)
+       $(TEXI2DVI) $(AM_V_texinfo) --build-dir=$(@:.dvi=.t2d) -o $@ $(AM_V_texidevnull) \
+       `test -f 'doc/automake-history.texi' || echo '$(srcdir)/'`doc/automake-history.texi
 
 doc/automake-history.pdf: doc/automake-history.texi $(doc_automake_history_TEXINFOS) doc/$(am__dirstamp)
        $(AM_V_TEXI2PDF)TEXINPUTS="$(am__TEXINFO_TEX_DIR)$(PATH_SEPARATOR)$$TEXINPUTS" \
        MAKEINFO='$(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I doc -I $(srcdir)/doc' \
-       $(TEXI2PDF) $(AM_V_texinfo) --clean -o $@ `test -f 'doc/automake-history.texi' || echo '$(srcdir)/'`doc/automake-history.texi $(AM_V_texidevnull)
+       $(TEXI2PDF) $(AM_V_texinfo) --build-dir=$(@:.pdf=.t2p) -o $@ $(AM_V_texidevnull) \
+       `test -f 'doc/automake-history.texi' || echo '$(srcdir)/'`doc/automake-history.texi
 
 doc/automake-history.html: doc/automake-history.texi $(doc_automake_history_TEXINFOS) doc/$(am__dirstamp)
        $(AM_V_MAKEINFO)rm -rf $(@:.html=.htp)
        $(AM_V_at)if $(MAKEINFOHTML) $(AM_MAKEINFOHTMLFLAGS) $(MAKEINFOFLAGS) -I doc -I $(srcdir)/doc \
         -o $(@:.html=.htp) `test -f 'doc/automake-history.texi' || echo '$(srcdir)/'`doc/automake-history.texi; \
        then \
-         rm -rf $@; \
-         if test ! -d $(@:.html=.htp) && test -d $(@:.html=); then \
-           mv $(@:.html=) $@; else mv $(@:.html=.htp) $@; fi; \
+         rm -rf $@ && mv $(@:.html=.htp) $@; \
        else \
-         if test ! -d $(@:.html=.htp) && test -d $(@:.html=); then \
-           rm -rf $(@:.html=); else rm -Rf $(@:.html=.htp) $@; fi; \
-         exit 1; \
+         rm -rf $(@:.html=.htp); exit 1; \
        fi
 .dvi.ps:
        $(AM_V_DVIPS)TEXINPUTS="$(am__TEXINFO_TEX_DIR)$(PATH_SEPARATOR)$$TEXINPUTS" \
@@ -2618,18 +2703,8 @@ dist-info: $(INFO_DEPS)
        done
 
 mostlyclean-aminfo:
-       -rm -rf automake.ac automake.aux automake.cm automake.cp automake.cps \
-         automake.fn automake.fns automake.ky automake.kys \
-         automake.log automake.op automake.pg automake.pgs \
-         automake.tmp automake.toc automake.tp automake.tps \
-         automake.tr automake.vr automake.vrs automake-history.aux \
-         automake-history.cp automake-history.cps automake-history.fn \
-         automake-history.fns automake-history.ky \
-         automake-history.kys automake-history.log \
-         automake-history.pg automake-history.pgs \
-         automake-history.tmp automake-history.toc \
-         automake-history.tp automake-history.tps automake-history.vr \
-         automake-history.vrs
+       -rm -rf doc/automake.t2d doc/automake.t2p doc/automake-history.t2d \
+         doc/automake-history.t2p
 
 clean-aminfo:
        -test -z "doc/automake.dvi doc/automake.pdf doc/automake.ps doc/automake.html \
@@ -2728,6 +2803,27 @@ uninstall-dist_automake_acDATA:
        @list='$(dist_automake_ac_DATA)'; test -n "$(automake_acdir)" || list=; \
        files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
        dir='$(DESTDIR)$(automake_acdir)'; $(am__uninstall_files_from_dir)
+install-dist_automake_internal_acDATA: $(dist_automake_internal_ac_DATA)
+       @$(NORMAL_INSTALL)
+       @list='$(dist_automake_internal_ac_DATA)'; test -n "$(automake_internal_acdir)" || list=; \
+       if test -n "$$list"; then \
+         echo " $(MKDIR_P) '$(DESTDIR)$(automake_internal_acdir)'"; \
+         $(MKDIR_P) "$(DESTDIR)$(automake_internal_acdir)" || exit 1; \
+       fi; \
+       for p in $$list; do \
+         if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+         echo "$$d$$p"; \
+       done | $(am__base_list) | \
+       while read files; do \
+         echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(automake_internal_acdir)'"; \
+         $(INSTALL_DATA) $$files "$(DESTDIR)$(automake_internal_acdir)" || exit $$?; \
+       done
+
+uninstall-dist_automake_internal_acDATA:
+       @$(NORMAL_UNINSTALL)
+       @list='$(dist_automake_internal_ac_DATA)'; test -n "$(automake_internal_acdir)" || list=; \
+       files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+       dir='$(DESTDIR)$(automake_internal_acdir)'; $(am__uninstall_files_from_dir)
 install-dist_docDATA: $(dist_doc_DATA)
        @$(NORMAL_INSTALL)
        @list='$(dist_doc_DATA)'; test -n "$(docdir)" || list=; \
@@ -2854,14 +2950,65 @@ uninstall-nodist_perllibDATA:
        @list='$(nodist_perllib_DATA)'; test -n "$(perllibdir)" || list=; \
        files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
        dir='$(DESTDIR)$(perllibdir)'; $(am__uninstall_files_from_dir)
-tags: TAGS
-TAGS:
-
-ctags: CTAGS
-CTAGS:
 
-cscope cscopelist:
+ID: $(am__tagged_files)
+       $(am__define_uniq_tagged_files); mkid -fID $$unique
+tags: tags-am
+TAGS: tags
+
+tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
+       set x; \
+       here=`pwd`; \
+       $(am__define_uniq_tagged_files); \
+       shift; \
+       if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
+         test -n "$$unique" || unique=$$empty_fix; \
+         if test $$# -gt 0; then \
+           $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+             "$$@" $$unique; \
+         else \
+           $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+             $$unique; \
+         fi; \
+       fi
+ctags: ctags-am
+
+CTAGS: ctags
+ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
+       $(am__define_uniq_tagged_files); \
+       test -z "$(CTAGS_ARGS)$$unique" \
+         || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+            $$unique
+
+GTAGS:
+       here=`$(am__cd) $(top_builddir) && pwd` \
+         && $(am__cd) $(top_srcdir) \
+         && gtags -i $(GTAGS_ARGS) "$$here"
+cscope: cscope.files
+       test ! -s cscope.files \
+         || $(CSCOPE) -b -q $(AM_CSCOPEFLAGS) $(CSCOPEFLAGS) -i cscope.files $(CSCOPE_ARGS)
+clean-cscope:
+       -rm -f cscope.files
+cscope.files: clean-cscope cscopelist
+cscopelist: cscopelist-am
+
+cscopelist-am: $(am__tagged_files)
+       list='$(am__tagged_files)'; \
+       case "$(srcdir)" in \
+         [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
+         *) sdir=$(subdir)/$(srcdir) ;; \
+       esac; \
+       for i in $$list; do \
+         if test -f "$$i"; then \
+           echo "$(subdir)/$$i"; \
+         else \
+           echo "$$sdir/$$i"; \
+         fi; \
+       done >> $(top_builddir)/cscope.files
 
+distclean-tags:
+       -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+       -rm -f cscope.out cscope.in.out cscope.po.out cscope.files
 
 # Recover from deleted '.trs' file; this should ensure that
 # "rm -f foo.log; make foo.trs" re-run 'foo.test', and re-create
@@ -2871,6 +3018,12 @@ cscope cscopelist:
        rm -f $< $@
        $(MAKE) $(AM_MAKEFLAGS) $<
 
+# Leading 'am--fnord' is there to ensure the list of targets does not
+# expand to empty, as could happen e.g. with make check TESTS=''.
+am--fnord $(TEST_LOGS) $(TEST_LOGS:.log=.trs): $(am__force_recheck)
+am--force-recheck:
+       @:
+
 $(TEST_SUITE_LOG): $(TEST_LOGS)
        @$(am__set_TESTS_bases); \
        am__f_ok () { test -f "$$1" && test -r "$$1"; }; \
@@ -2887,7 +3040,7 @@ $(TEST_SUITE_LOG): $(TEST_LOGS)
        if test -n "$$am__remaking_logs"; then \
          echo "fatal: making $(TEST_SUITE_LOG): possible infinite" \
               "recursion detected" >&2; \
-       else \
+       elif test -n "$$redo_logs"; then \
          am__remaking_logs=yes $(MAKE) $(AM_MAKEFLAGS) $$redo_logs; \
        fi; \
        if $(am__make_dryrun); then :; else \
@@ -2977,30 +3130,27 @@ $(TEST_SUITE_LOG): $(TEST_LOGS)
        fi;                                                             \
        $$success || exit 1
 
-check-TESTS recheck:
-       @if test $@ != recheck; then \
-          list='$(RECHECK_LOGS)'; \
-          test -z "$$list" || rm -f $$list; \
-        fi
-       @if test $@ != recheck; then \
-          list='$(RECHECK_LOGS:.log=.trs)'; \
-          test -z "$$list" || rm -f $$list; \
-        fi
+check-TESTS:
+       @list='$(RECHECK_LOGS)';           test -z "$$list" || rm -f $$list
+       @list='$(RECHECK_LOGS:.log=.trs)'; test -z "$$list" || rm -f $$list
        @test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG)
-       @$(am__set_TESTS_bases); \
-       if test $@ = recheck; then \
-         bases=`for i in $$bases; do echo $$i; done \
-                  | $(am__list_recheck_tests)` || exit 1; \
-       fi; \
+       @set +e; $(am__set_TESTS_bases); \
        log_list=`for i in $$bases; do echo $$i.log; done`; \
        trs_list=`for i in $$bases; do echo $$i.trs; done`; \
        log_list=`echo $$log_list`; trs_list=`echo $$trs_list`; \
-       if test $@ != recheck || $(am__make_dryrun); then :; else \
-         test -z "$$log_list" || rm -f $$log_list; \
-         test -z "$$trs_list" || rm -f $$trs_list; \
-       fi; \
-       $(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_LOG) TEST_LOGS="$$log_list"
-recheck: all $(check_SCRIPTS) $(check_DATA) $(dist_check_DATA)
+       $(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_LOG) TEST_LOGS="$$log_list"; \
+       exit $$?;
+recheck: all 
+       @test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG)
+       @set +e; $(am__set_TESTS_bases); \
+       bases=`for i in $$bases; do echo $$i; done \
+                | $(am__list_recheck_tests)` || exit 1; \
+       log_list=`for i in $$bases; do echo $$i.log; done`; \
+       log_list=`echo $$log_list`; \
+       $(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_LOG) \
+               am__force_recheck=am--force-recheck \
+               TEST_LOGS="$$log_list"; \
+       exit $$?
 .pl.log:
        @p='$<'; \
        $(am__set_b); \
@@ -3045,19 +3195,6 @@ recheck: all $(check_SCRIPTS) $(check_DATA) $(dist_check_DATA)
 @am__EXEEXT_TRUE@      "$$tst" $(AM_TESTS_FD_REDIRECT)
 
 distdir: $(DISTFILES)
-       @list='$(MANS)'; if test -n "$$list"; then \
-         list=`for p in $$list; do \
-           if test -f $$p; then d=; else d="$(srcdir)/"; fi; \
-           if test -f "$$d$$p"; then echo "$$d$$p"; else :; fi; done`; \
-         if test -n "$$list" && \
-           grep 'ab help2man is required to generate this page' $$list >/dev/null; then \
-           echo "error: found man pages containing the 'missing help2man' replacement text:" >&2; \
-           grep -l 'ab help2man is required to generate this page' $$list | sed 's/^/         /' >&2; \
-           echo "       to fix them, install help2man, remove and regenerate the man pages;" >&2; \
-           echo "       typically 'make maintainer-clean' will remove them" >&2; \
-           exit 1; \
-         else :; fi; \
-       else :; fi
        $(am__remove_distdir)
        test -d "$(distdir)" || mkdir "$(distdir)"
        @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
@@ -3091,7 +3228,7 @@ distdir: $(DISTFILES)
        done
        $(MAKE) $(AM_MAKEFLAGS) \
          top_distdir="$(top_distdir)" distdir="$(distdir)" \
-         dist-info dist-hook
+         dist-info
        -test -n "$(am__skip_mode_fix)" \
        || find "$(distdir)" -type d ! -perm -755 \
                -exec chmod u+rwx,go+rx {} \; -o \
@@ -3105,7 +3242,7 @@ distdir: $(DISTFILES)
          exit 1; \
        else :; fi
 dist-gzip: distdir
-       tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
+       tardir=$(distdir) && $(am__tar) | eval GZIP= gzip $(GZIP_ENV) -c >$(distdir).tar.gz
        $(am__post_remove_distdir)
 
 dist-bzip2: distdir
@@ -3120,11 +3257,17 @@ dist-xz: distdir
        $(am__post_remove_distdir)
 
 dist-tarZ: distdir
+       @echo WARNING: "Support for distribution archives compressed with" \
+                      "legacy program 'compress' is deprecated." >&2
+       @echo WARNING: "It will be removed altogether in Automake 2.0" >&2
        tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z
        $(am__post_remove_distdir)
 
 dist-shar: distdir
-       shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz
+       @echo WARNING: "Support for shar distribution archives is" \
+                      "deprecated." >&2
+       @echo WARNING: "It will be removed altogether in Automake 2.0" >&2
+       shar $(distdir) | eval GZIP= gzip $(GZIP_ENV) -c >$(distdir).shar.gz
        $(am__post_remove_distdir)
 
 dist-zip: distdir
@@ -3142,7 +3285,7 @@ dist dist-all:
 distcheck: dist
        case '$(DIST_ARCHIVES)' in \
        *.tar.gz*) \
-         GZIP=$(GZIP_ENV) gzip -dc $(distdir).tar.gz | $(am__untar) ;;\
+         eval GZIP= gzip $(GZIP_ENV) -dc $(distdir).tar.gz | $(am__untar) ;;\
        *.tar.bz2*) \
          bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\
        *.tar.lz*) \
@@ -3152,22 +3295,23 @@ distcheck: dist
        *.tar.Z*) \
          uncompress -c $(distdir).tar.Z | $(am__untar) ;;\
        *.shar.gz*) \
-         GZIP=$(GZIP_ENV) gzip -dc $(distdir).shar.gz | unshar ;;\
+         eval GZIP= gzip $(GZIP_ENV) -dc $(distdir).shar.gz | unshar ;;\
        *.zip*) \
          unzip $(distdir).zip ;;\
        esac
-       chmod -R a-w $(distdir); chmod a+w $(distdir)
-       mkdir $(distdir)/_build
-       mkdir $(distdir)/_inst
+       chmod -R a-w $(distdir)
+       chmod u+w $(distdir)
+       mkdir $(distdir)/_build $(distdir)/_build/sub $(distdir)/_inst
        chmod a-w $(distdir)
        test -d $(distdir)/_build || exit 0; \
        dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \
          && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \
          && am__cwd=`pwd` \
-         && $(am__cd) $(distdir)/_build \
-         && ../configure --srcdir=.. --prefix="$$dc_install_base" \
+         && $(am__cd) $(distdir)/_build/sub \
+         && ../../configure \
            $(AM_DISTCHECK_CONFIGURE_FLAGS) \
            $(DISTCHECK_CONFIGURE_FLAGS) \
+           --srcdir=../.. --prefix="$$dc_install_base" \
          && $(MAKE) $(AM_MAKEFLAGS) \
          && $(MAKE) $(AM_MAKEFLAGS) dvi \
          && $(MAKE) $(AM_MAKEFLAGS) check \
@@ -3221,13 +3365,11 @@ distcleancheck: distclean
               $(distcleancheck_listfiles) ; \
               exit 1; } >&2
 check-am: all-am
-       $(MAKE) $(AM_MAKEFLAGS) $(check_SCRIPTS) $(check_DATA) \
-         $(dist_check_DATA)
        $(MAKE) $(AM_MAKEFLAGS) check-TESTS check-local
 check: check-am
 all-am: Makefile $(INFO_DEPS) $(SCRIPTS) $(MANS) $(DATA)
 installdirs:
-       for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(infodir)" "$(DESTDIR)$(man1dir)" "$(DESTDIR)$(amdir)" "$(DESTDIR)$(automake_acdir)" "$(DESTDIR)$(docdir)" "$(DESTDIR)$(perllibdir)" "$(DESTDIR)$(pkgvdatadir)" "$(DESTDIR)$(scriptdir)" "$(DESTDIR)$(system_acdir)" "$(DESTDIR)$(perllibdir)"; do \
+       for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(infodir)" "$(DESTDIR)$(man1dir)" "$(DESTDIR)$(amdir)" "$(DESTDIR)$(automake_acdir)" "$(DESTDIR)$(automake_internal_acdir)" "$(DESTDIR)$(docdir)" "$(DESTDIR)$(perllibdir)" "$(DESTDIR)$(pkgvdatadir)" "$(DESTDIR)$(scriptdir)" "$(DESTDIR)$(system_acdir)" "$(DESTDIR)$(perllibdir)"; do \
          test -z "$$dir" || $(MKDIR_P) "$$dir"; \
        done
 install: install-am
@@ -3274,7 +3416,7 @@ clean-am: clean-aminfo clean-generic clean-local mostlyclean-am
 distclean: distclean-am
        -rm -f $(am__CONFIG_DISTCLEAN_FILES)
        -rm -f Makefile
-distclean-am: clean-am distclean-generic
+distclean-am: clean-am distclean-generic distclean-tags
 
 dvi: dvi-am
 
@@ -3289,10 +3431,10 @@ info: info-am
 info-am: $(INFO_DEPS)
 
 install-data-am: install-dist_amDATA install-dist_automake_acDATA \
-       install-dist_docDATA install-dist_perllibDATA \
-       install-dist_pkgvdataDATA install-dist_scriptDATA \
-       install-dist_system_acDATA install-info-am install-man \
-       install-nodist_perllibDATA
+       install-dist_automake_internal_acDATA install-dist_docDATA \
+       install-dist_perllibDATA install-dist_pkgvdataDATA \
+       install-dist_scriptDATA install-dist_system_acDATA \
+       install-info-am install-man install-nodist_perllibDATA
        @$(NORMAL_INSTALL)
        $(MAKE) $(AM_MAKEFLAGS) install-data-hook
 install-dvi: install-dvi-am
@@ -3434,7 +3576,8 @@ ps: ps-am
 ps-am: $(PSS)
 
 uninstall-am: uninstall-binSCRIPTS uninstall-dist_amDATA \
-       uninstall-dist_automake_acDATA uninstall-dist_docDATA \
+       uninstall-dist_automake_acDATA \
+       uninstall-dist_automake_internal_acDATA uninstall-dist_docDATA \
        uninstall-dist_perllibDATA uninstall-dist_pkgvdataDATA \
        uninstall-dist_scriptDATA uninstall-dist_system_acDATA \
        uninstall-dvi-am uninstall-html-am uninstall-info-am \
@@ -3447,15 +3590,17 @@ uninstall-man: uninstall-man1
 .MAKE: check-am install-am install-data-am install-exec-am \
        install-strip uninstall-am
 
-.PHONY: all all-am am--refresh check check-TESTS check-am check-local \
-       clean clean-aminfo clean-generic clean-local dist dist-all \
-       dist-bzip2 dist-gzip dist-hook dist-info dist-lzip dist-shar \
-       dist-tarZ dist-xz dist-zip distcheck distclean \
-       distclean-generic distcleancheck distdir distuninstallcheck \
-       dvi dvi-am html html-am info info-am install install-am \
-       install-binSCRIPTS install-data install-data-am \
-       install-data-hook install-dist_amDATA \
-       install-dist_automake_acDATA install-dist_docDATA \
+.PHONY: CTAGS GTAGS TAGS all all-am am--refresh check check-TESTS \
+       check-am check-local clean clean-aminfo clean-cscope \
+       clean-generic clean-local cscope cscopelist-am ctags ctags-am \
+       dist dist-all dist-bzip2 dist-gzip dist-info dist-lzip \
+       dist-shar dist-tarZ dist-xz dist-zip distcheck distclean \
+       distclean-generic distclean-tags distcleancheck distdir \
+       distuninstallcheck dvi dvi-am html html-am info info-am \
+       install install-am install-binSCRIPTS install-data \
+       install-data-am install-data-hook install-dist_amDATA \
+       install-dist_automake_acDATA \
+       install-dist_automake_internal_acDATA install-dist_docDATA \
        install-dist_perllibDATA install-dist_pkgvdataDATA \
        install-dist_scriptDATA install-dist_system_acDATA install-dvi \
        install-dvi-am install-exec install-exec-am install-exec-hook \
@@ -3467,20 +3612,42 @@ uninstall-man: uninstall-man1
        maintainer-clean-generic maintainer-clean-local \
        maintainer-clean-vti mostlyclean mostlyclean-aminfo \
        mostlyclean-generic mostlyclean-vti pdf pdf-am ps ps-am \
-       recheck uninstall uninstall-am uninstall-binSCRIPTS \
-       uninstall-dist_amDATA uninstall-dist_automake_acDATA \
-       uninstall-dist_docDATA uninstall-dist_perllibDATA \
-       uninstall-dist_pkgvdataDATA uninstall-dist_scriptDATA \
-       uninstall-dist_system_acDATA uninstall-dvi-am uninstall-hook \
-       uninstall-html-am uninstall-info-am uninstall-man \
-       uninstall-man1 uninstall-nodist_perllibDATA uninstall-pdf-am \
-       uninstall-ps-am
+       recheck tags tags-am uninstall uninstall-am \
+       uninstall-binSCRIPTS uninstall-dist_amDATA \
+       uninstall-dist_automake_acDATA \
+       uninstall-dist_automake_internal_acDATA uninstall-dist_docDATA \
+       uninstall-dist_perllibDATA uninstall-dist_pkgvdataDATA \
+       uninstall-dist_scriptDATA uninstall-dist_system_acDATA \
+       uninstall-dvi-am uninstall-hook uninstall-html-am \
+       uninstall-info-am uninstall-man uninstall-man1 \
+       uninstall-nodist_perllibDATA uninstall-pdf-am uninstall-ps-am
+
+.PRECIOUS: Makefile
+
+
+# The master location for INSTALL is lib/INSTALL.
+# This is where "make fetch" will install new versions.
+# Make sure we also update this copy.
+INSTALL: lib/INSTALL
+       $(AM_V_GEN)cp $(srcdir)/lib/INSTALL $@
 
+# We don't use the default name for the autom4te cache directory,
+# so we need this.
+maintainer-clean-local:
+       rm -rf .autom4te.cache
 
+# So that automake won't complain about the missing ChangeLog.
+# The real rule for ChangeLog generation is now in maintainer/maint.mk
+# (as it is maintainer-specific).
+ChangeLog:
+
+# Make versioned links.  We only run the transform on the root name;
+# then we make a versioned link with the transformed base name.  This
+# seemed like the most reasonable approach.
 install-exec-hook:
        @$(POST_INSTALL)
        @for p in $(bin_SCRIPTS); do \
-         f="`echo $$p|sed '$(transform)'`"; \
+         f=`echo $$p | sed -e 's,.*/,,' -e '$(transform)'`; \
          fv="$$f-$(APIVERSION)"; \
          rm -f "$(DESTDIR)$(bindir)/$$fv"; \
          echo " $(LN) '$(DESTDIR)$(bindir)/$$f' '$(DESTDIR)$(bindir)/$$fv'"; \
@@ -3489,25 +3656,63 @@ install-exec-hook:
 
 uninstall-hook:
        @for p in $(bin_SCRIPTS); do \
-         f="`echo $$p|sed '$(transform)'`"; \
+         f=`echo $$p | sed -e 's,.*/,,' -e '$(transform)'`; \
          fv="$$f-$(APIVERSION)"; \
          rm -f "$(DESTDIR)$(bindir)/$$fv"; \
        done
 
-automake: automake.in
-aclocal: aclocal.in
-automake aclocal: Makefile
-       $(AM_V_at)rm -f $@ $@-t
-       $(AM_V_GEN)in=$@.in; $(do_subst) <$(srcdir)/$@.in >$@-t
-       $(AM_V_at)chmod a+x,a-w $@-t && mv -f $@-t $@
+# These files depend on Makefile so they are rebuilt if $(VERSION),
+# $(datadir) or other do_subst'ituted variables change.
+bin/automake: bin/automake.in
+bin/aclocal: bin/aclocal.in
+bin/automake bin/aclocal: Makefile bin/gen-perl-protos
+       $(AM_V_GEN)rm -f $@ $@-t $@-t2 \
+         && $(MKDIR_P) $(@D) \
+         && in=$@.in && $(do_subst) <$(srcdir)/$$in >$@-t \
+         && $(PERL) -w $(srcdir)/bin/gen-perl-protos $@-t > $@-t2 \
+         && mv -f $@-t2 $@-t \
+         && chmod a+x,a-w $@-t && mv -f $@-t $@
 
-INSTALL: lib/INSTALL
-       $(AM_V_GEN)cp $(srcdir)/lib/INSTALL $@
+# vim: ft=automake noet
 
-# We don't use the default name for the autom4te cache directory,
-# so we need this.
-maintainer-clean-local:
-       rm -rf .autom4te.cache
+$(man1_MANS): $(top_srcdir)/configure.ac
+
+doc/aclocal.1 doc/automake.1:
+       $(AM_V_GEN): \
+         && $(MKDIR_P) doc \
+         && f=`echo $@ | sed 's|.*/||; s|\.1$$||; $(transform)'` \
+         && echo ".so man1/$$f-$(APIVERSION).1" > $@
+
+doc/aclocal-$(APIVERSION).1: $(aclocal_script) lib/Automake/Config.pm
+       $(update_mans) aclocal-$(APIVERSION)
+doc/automake-$(APIVERSION).1: $(automake_script) lib/Automake/Config.pm
+       $(update_mans) automake-$(APIVERSION)
+
+# We depend on configure.ac so that we regenerate the tarball
+# whenever the Automake version changes.
+$(srcdir)/doc/amhello-1.0.tar.gz: $(amhello_sources) $(srcdir)/configure.ac
+       $(AM_V_GEN)tmp=amhello-output.tmp \
+         && $(am__cd) $(srcdir)/doc/amhello \
+         && : Make our aclocal and automake avaiable before system ones. \
+         && $(setup_autotools_paths) \
+         && ( \
+           { $(AM_V_P) || exec 5>&2 >$$tmp 2>&1; } \
+             && $(am_AUTORECONF) -vfi \
+             && ./configure \
+             && $(MAKE) $(AM_MAKEFLAGS) distcheck \
+             && $(MAKE) $(AM_MAKEFLAGS) distclean \
+             || { \
+               if $(AM_V_P); then :; else \
+                 echo "$@: recipe failed." >&5; \
+                 echo "See file '`pwd`/$$tmp' for details" >&5; \
+               fi; \
+               exit 1; \
+             } \
+         ) \
+         && rm -rf $(amhello_configury) $$tmp \
+         && mv -f amhello-1.0.tar.gz ..
+
+# vim: ft=automake noet
 
 install-data-hook:
        @$(POST_INSTALL)
@@ -3531,32 +3736,75 @@ installcheck-executable-scripts:
          | sed 's/$$/: not executable/' \
          | grep . 1>&2 && exit 1; exit 0
 
+# vim: ft=automake noet
+
 lib/Automake/Config.pm: lib/Automake/Config.in Makefile
        $(AM_V_at)rm -f $@ $@-t
-       $(AM_V_at)test -d lib/Automake || $(MKDIR_P) lib/Automake
+       $(AM_V_at)$(MKDIR_P) lib/Automake
        $(AM_V_GEN)in=Config.in \
          && $(do_subst) <$(srcdir)/lib/Automake/Config.in >$@-t
        $(generated_file_finalize)
 
+# vim: ft=automake noet
+
+# vim: ft=automake noet
+
 # We build amversion.m4 here, instead of from config.status,
 # because config.status is rerun each time one of configure's
 # dependencies change and amversion.m4 happens to be a configure
 # dependency.  configure and amversion.m4 would be rebuilt in
 # loop otherwise.
-# Use '$(top_srcdir)/m4' for the benefit of non-GNU makes: this is
+# Use '$(top_srcdir)' for the benefit of non-GNU makes: this is
 # how amversion.m4 appears in our dependencies.
-$(top_srcdir)/m4/amversion.m4: $(srcdir)/configure.ac $(srcdir)/m4/amversion.in
+$(top_srcdir)/m4/amversion.m4: $(srcdir)/configure.ac \
+                                $(srcdir)/m4/amversion.in
        $(AM_V_at)rm -f $@-t $@
        $(AM_V_GEN)in=amversion.in \
          && $(do_subst) <$(srcdir)/m4/amversion.in >$@-t
        $(generated_file_finalize)
 
+# vim: ft=automake noet
+
 print-list-of-tests:
        @echo $(handwritten_TESTS)
 .PHONY: print-list-of-tests
 
 t/ar-lib-w.log: t/ar-lib.sh
 t/ar-lib-w.log: t/ar-lib.log
+t/built-sources-check-w.log: t/built-sources-check.sh
+t/built-sources-check-w.log: t/built-sources-check.log
+t/check-exported-srcdir-w.log: t/check-exported-srcdir.sh
+t/check-exported-srcdir-w.log: t/check-exported-srcdir.log
+t/check-fd-redirect-w.log: t/check-fd-redirect.sh
+t/check-fd-redirect-w.log: t/check-fd-redirect.log
+t/check-subst-prog-w.log: t/check-subst-prog.sh
+t/check-subst-prog-w.log: t/check-subst-prog.log
+t/check-subst-w.log: t/check-subst.sh
+t/check-subst-w.log: t/check-subst.log
+t/check-tests-in-builddir-w.log: t/check-tests-in-builddir.sh
+t/check-tests-in-builddir-w.log: t/check-tests-in-builddir.log
+t/check-w.log: t/check.sh
+t/check-w.log: t/check.log
+t/check11-w.log: t/check11.sh
+t/check11-w.log: t/check11.log
+t/check12-w.log: t/check12.sh
+t/check12-w.log: t/check12.log
+t/check2-w.log: t/check2.sh
+t/check2-w.log: t/check2.log
+t/check4-w.log: t/check4.sh
+t/check4-w.log: t/check4.log
+t/check5-w.log: t/check5.sh
+t/check5-w.log: t/check5.log
+t/check6-w.log: t/check6.sh
+t/check6-w.log: t/check6.log
+t/check7-w.log: t/check7.sh
+t/check7-w.log: t/check7.log
+t/check8-w.log: t/check8.sh
+t/check8-w.log: t/check8.log
+t/color-tests-w.log: t/color-tests.sh
+t/color-tests-w.log: t/color-tests.log
+t/color-tests2-w.log: t/color-tests2.sh
+t/color-tests2-w.log: t/color-tests2.log
 t/compile-w.log: t/compile.sh
 t/compile-w.log: t/compile.log
 t/compile2-w.log: t/compile2.sh
@@ -3569,225 +3817,64 @@ t/compile5-w.log: t/compile5.sh
 t/compile5-w.log: t/compile5.log
 t/compile6-w.log: t/compile6.sh
 t/compile6-w.log: t/compile6.log
-t/instsh2-w.log: t/instsh2.sh
-t/instsh2-w.log: t/instsh2.log
-t/instsh3-w.log: t/instsh3.sh
-t/instsh3-w.log: t/instsh3.log
+t/compile7-w.log: t/compile7.sh
+t/compile7-w.log: t/compile7.log
+t/exeext4-w.log: t/exeext4.sh
+t/exeext4-w.log: t/exeext4.log
+t/install-sh-option-C-w.log: t/install-sh-option-C.sh
+t/install-sh-option-C-w.log: t/install-sh-option-C.log
+t/install-sh-unittests-w.log: t/install-sh-unittests.sh
+t/install-sh-unittests-w.log: t/install-sh-unittests.log
+t/maken3-w.log: t/maken3.sh
+t/maken3-w.log: t/maken3.log
 t/mdate5-w.log: t/mdate5.sh
 t/mdate5-w.log: t/mdate5.log
 t/mdate6-w.log: t/mdate6.sh
 t/mdate6-w.log: t/mdate6.log
-t/missing-w.log: t/missing.sh
-t/missing-w.log: t/missing.log
-t/missing2-w.log: t/missing2.sh
-t/missing2-w.log: t/missing2.log
+t/missing-version-mismatch-w.log: t/missing-version-mismatch.sh
+t/missing-version-mismatch-w.log: t/missing-version-mismatch.log
 t/missing3-w.log: t/missing3.sh
 t/missing3-w.log: t/missing3.log
-t/missing5-w.log: t/missing5.sh
-t/missing5-w.log: t/missing5.log
 t/mkinst3-w.log: t/mkinst3.sh
 t/mkinst3-w.log: t/mkinst3.log
-t/check-w.log: t/check.sh
-t/check-w.log: t/check.log
-t/check2-w.log: t/check2.sh
-t/check2-w.log: t/check2.log
-t/check3-w.log: t/check3.sh
-t/check3-w.log: t/check3.log
-t/check4-w.log: t/check4.sh
-t/check4-w.log: t/check4.log
-t/check5-w.log: t/check5.sh
-t/check5-w.log: t/check5.log
-t/check6-w.log: t/check6.sh
-t/check6-w.log: t/check6.log
-t/check7-w.log: t/check7.sh
-t/check7-w.log: t/check7.log
-t/check8-w.log: t/check8.sh
-t/check8-w.log: t/check8.log
-t/check11-w.log: t/check11.sh
-t/check11-w.log: t/check11.log
-t/check12-w.log: t/check12.sh
-t/check12-w.log: t/check12.log
-t/check-subst-w.log: t/check-subst.sh
-t/check-subst-w.log: t/check-subst.log
-t/check-subst-prog-w.log: t/check-subst-prog.sh
-t/check-subst-prog-w.log: t/check-subst-prog.log
-t/check-exported-srcdir-w.log: t/check-exported-srcdir.sh
-t/check-exported-srcdir-w.log: t/check-exported-srcdir.log
-t/check-fd-redirect-w.log: t/check-fd-redirect.sh
-t/check-fd-redirect-w.log: t/check-fd-redirect.log
-t/check-tests-in-builddir-w.log: t/check-tests-in-builddir.sh
-t/check-tests-in-builddir-w.log: t/check-tests-in-builddir.log
-t/color-w.log: t/color.sh
-t/color-w.log: t/color.log
-t/color2-w.log: t/color2.sh
-t/color2-w.log: t/color2.log
-t/exeext4-w.log: t/exeext4.sh
-t/exeext4-w.log: t/exeext4.log
-t/maken3-w.log: t/maken3.sh
-t/maken3-w.log: t/maken3.log
 t/posixsubst-tests-w.log: t/posixsubst-tests.sh
 t/posixsubst-tests-w.log: t/posixsubst-tests.log
-t/tap-ambiguous-directive-w.log: t/tap-ambiguous-directive.sh
-t/tap-ambiguous-directive-w.log: t/tap-ambiguous-directive.log
-t/tap-autonumber-w.log: t/tap-autonumber.sh
-t/tap-autonumber-w.log: t/tap-autonumber.log
-t/tap-bailout-w.log: t/tap-bailout.sh
-t/tap-bailout-w.log: t/tap-bailout.log
-t/tap-bailout-and-logging-w.log: t/tap-bailout-and-logging.sh
-t/tap-bailout-and-logging-w.log: t/tap-bailout-and-logging.log
-t/tap-bailout-suppress-badexit-w.log: t/tap-bailout-suppress-badexit.sh
-t/tap-bailout-suppress-badexit-w.log: t/tap-bailout-suppress-badexit.log
-t/tap-bailout-suppress-later-diagnostic-w.log: t/tap-bailout-suppress-later-diagnostic.sh
-t/tap-bailout-suppress-later-diagnostic-w.log: t/tap-bailout-suppress-later-diagnostic.log
-t/tap-bailout-suppress-later-errors-w.log: t/tap-bailout-suppress-later-errors.sh
-t/tap-bailout-suppress-later-errors-w.log: t/tap-bailout-suppress-later-errors.log
-t/tap-color-w.log: t/tap-color.sh
-t/tap-color-w.log: t/tap-color.log
-t/tap-deps-w.log: t/tap-deps.sh
-t/tap-deps-w.log: t/tap-deps.log
-t/tap-diagnostic-w.log: t/tap-diagnostic.sh
-t/tap-diagnostic-w.log: t/tap-diagnostic.log
-t/tap-empty-diagnostic-w.log: t/tap-empty-diagnostic.sh
-t/tap-empty-diagnostic-w.log: t/tap-empty-diagnostic.log
-t/tap-empty-w.log: t/tap-empty.sh
-t/tap-empty-w.log: t/tap-empty.log
-t/tap-escape-directive-w.log: t/tap-escape-directive.sh
-t/tap-escape-directive-w.log: t/tap-escape-directive.log
-t/tap-escape-directive-2-w.log: t/tap-escape-directive-2.sh
-t/tap-escape-directive-2-w.log: t/tap-escape-directive-2.log
-t/tap-exit-w.log: t/tap-exit.sh
-t/tap-exit-w.log: t/tap-exit.log
-t/tap-signal-w.log: t/tap-signal.tap
-t/tap-signal-w.log: t/tap-signal.log
-t/tap-fancy-w.log: t/tap-fancy.sh
-t/tap-fancy-w.log: t/tap-fancy.log
-t/tap-fancy2-w.log: t/tap-fancy2.sh
-t/tap-fancy2-w.log: t/tap-fancy2.log
-t/tap-global-log-w.log: t/tap-global-log.sh
-t/tap-global-log-w.log: t/tap-global-log.log
-t/tap-global-result-w.log: t/tap-global-result.sh
-t/tap-global-result-w.log: t/tap-global-result.log
-t/tap-log-w.log: t/tap-log.sh
-t/tap-log-w.log: t/tap-log.log
-t/tap-msg0-result-w.log: t/tap-msg0-result.sh
-t/tap-msg0-result-w.log: t/tap-msg0-result.log
-t/tap-msg0-directive-w.log: t/tap-msg0-directive.sh
-t/tap-msg0-directive-w.log: t/tap-msg0-directive.log
-t/tap-msg0-planskip-w.log: t/tap-msg0-planskip.sh
-t/tap-msg0-planskip-w.log: t/tap-msg0-planskip.log
-t/tap-msg0-bailout-w.log: t/tap-msg0-bailout.sh
-t/tap-msg0-bailout-w.log: t/tap-msg0-bailout.log
-t/tap-msg0-misc-w.log: t/tap-msg0-misc.sh
-t/tap-msg0-misc-w.log: t/tap-msg0-misc.log
-t/tap-merge-stdout-stderr-w.log: t/tap-merge-stdout-stderr.sh
-t/tap-merge-stdout-stderr-w.log: t/tap-merge-stdout-stderr.log
-t/tap-no-merge-stdout-stderr-w.log: t/tap-no-merge-stdout-stderr.sh
-t/tap-no-merge-stdout-stderr-w.log: t/tap-no-merge-stdout-stderr.log
-t/tap-no-disable-hard-error-w.log: t/tap-no-disable-hard-error.sh
-t/tap-no-disable-hard-error-w.log: t/tap-no-disable-hard-error.log
-t/tap-no-spurious-summary-w.log: t/tap-no-spurious-summary.sh
-t/tap-no-spurious-summary-w.log: t/tap-no-spurious-summary.log
-t/tap-no-spurious-numbers-w.log: t/tap-no-spurious-numbers.sh
-t/tap-no-spurious-numbers-w.log: t/tap-no-spurious-numbers.log
-t/tap-no-spurious-w.log: t/tap-no-spurious.sh
-t/tap-no-spurious-w.log: t/tap-no-spurious.log
-t/tap-not-ok-skip-w.log: t/tap-not-ok-skip.sh
-t/tap-not-ok-skip-w.log: t/tap-not-ok-skip.log
-t/tap-number-wordboundary-w.log: t/tap-number-wordboundary.sh
-t/tap-number-wordboundary-w.log: t/tap-number-wordboundary.log
-t/tap-numeric-description-w.log: t/tap-numeric-description.sh
-t/tap-numeric-description-w.log: t/tap-numeric-description.log
-t/tap-negative-numbers-w.log: t/tap-negative-numbers.sh
-t/tap-negative-numbers-w.log: t/tap-negative-numbers.log
-t/tap-numbers-leading-zero-w.log: t/tap-numbers-leading-zero.sh
-t/tap-numbers-leading-zero-w.log: t/tap-numbers-leading-zero.log
-t/tap-out-of-order-w.log: t/tap-out-of-order.sh
-t/tap-out-of-order-w.log: t/tap-out-of-order.log
-t/tap-passthrough-w.log: t/tap-passthrough.sh
-t/tap-passthrough-w.log: t/tap-passthrough.log
-t/tap-passthrough-exit-w.log: t/tap-passthrough-exit.sh
-t/tap-passthrough-exit-w.log: t/tap-passthrough-exit.log
-t/tap-plan-w.log: t/tap-plan.sh
-t/tap-plan-w.log: t/tap-plan.log
-t/tap-plan-corner-w.log: t/tap-plan-corner.sh
-t/tap-plan-corner-w.log: t/tap-plan-corner.log
-t/tap-plan-errors-w.log: t/tap-plan-errors.sh
-t/tap-plan-errors-w.log: t/tap-plan-errors.log
-t/tap-plan-middle-w.log: t/tap-plan-middle.sh
-t/tap-plan-middle-w.log: t/tap-plan-middle.log
-t/tap-plan-whitespace-w.log: t/tap-plan-whitespace.sh
-t/tap-plan-whitespace-w.log: t/tap-plan-whitespace.log
-t/tap-plan-leading-zero-w.log: t/tap-plan-leading-zero.sh
-t/tap-plan-leading-zero-w.log: t/tap-plan-leading-zero.log
-t/tap-plan-malformed-w.log: t/tap-plan-malformed.sh
-t/tap-plan-malformed-w.log: t/tap-plan-malformed.log
-t/tap-missing-plan-and-bad-exit-w.log: t/tap-missing-plan-and-bad-exit.sh
-t/tap-missing-plan-and-bad-exit-w.log: t/tap-missing-plan-and-bad-exit.log
-t/tap-planskip-w.log: t/tap-planskip.sh
-t/tap-planskip-w.log: t/tap-planskip.log
-t/tap-planskip-late-w.log: t/tap-planskip-late.sh
-t/tap-planskip-late-w.log: t/tap-planskip-late.log
-t/tap-planskip-and-logging-w.log: t/tap-planskip-and-logging.sh
-t/tap-planskip-and-logging-w.log: t/tap-planskip-and-logging.log
-t/tap-planskip-unplanned-w.log: t/tap-planskip-unplanned.sh
-t/tap-planskip-unplanned-w.log: t/tap-planskip-unplanned.log
-t/tap-planskip-unplanned-corner-w.log: t/tap-planskip-unplanned-corner.sh
-t/tap-planskip-unplanned-corner-w.log: t/tap-planskip-unplanned-corner.log
-t/tap-planskip-case-insensitive-w.log: t/tap-planskip-case-insensitive.sh
-t/tap-planskip-case-insensitive-w.log: t/tap-planskip-case-insensitive.log
-t/tap-planskip-whitespace-w.log: t/tap-planskip-whitespace.sh
-t/tap-planskip-whitespace-w.log: t/tap-planskip-whitespace.log
-t/tap-planskip-badexit-w.log: t/tap-planskip-badexit.sh
-t/tap-planskip-badexit-w.log: t/tap-planskip-badexit.log
-t/tap-planskip-bailout-w.log: t/tap-planskip-bailout.sh
-t/tap-planskip-bailout-w.log: t/tap-planskip-bailout.log
-t/tap-planskip-later-errors-w.log: t/tap-planskip-later-errors.sh
-t/tap-planskip-later-errors-w.log: t/tap-planskip-later-errors.log
-t/tap-realtime-w.log: t/tap-realtime.sh
-t/tap-realtime-w.log: t/tap-realtime.log
-t/tap-test-number-0-w.log: t/tap-test-number-0.sh
-t/tap-test-number-0-w.log: t/tap-test-number-0.log
-t/tap-recheck-logs-w.log: t/tap-recheck-logs.sh
-t/tap-recheck-logs-w.log: t/tap-recheck-logs.log
-t/tap-result-comment-w.log: t/tap-result-comment.sh
-t/tap-result-comment-w.log: t/tap-result-comment.log
-t/tap-todo-skip-together-w.log: t/tap-todo-skip-together.sh
-t/tap-todo-skip-together-w.log: t/tap-todo-skip-together.log
-t/tap-todo-skip-whitespace-w.log: t/tap-todo-skip-whitespace.sh
-t/tap-todo-skip-whitespace-w.log: t/tap-todo-skip-whitespace.log
-t/tap-todo-skip-w.log: t/tap-todo-skip.sh
-t/tap-todo-skip-w.log: t/tap-todo-skip.log
-t/tap-unplanned-w.log: t/tap-unplanned.sh
-t/tap-unplanned-w.log: t/tap-unplanned.log
-t/tap-whitespace-normalization-w.log: t/tap-whitespace-normalization.sh
-t/tap-whitespace-normalization-w.log: t/tap-whitespace-normalization.log
-t/tap-with-and-without-number-w.log: t/tap-with-and-without-number.sh
-t/tap-with-and-without-number-w.log: t/tap-with-and-without-number.log
-t/tap-xfail-tests-w.log: t/tap-xfail-tests.sh
-t/tap-xfail-tests-w.log: t/tap-xfail-tests.log
-t/tap-bad-prog-w.log: t/tap-bad-prog.tap
-t/tap-bad-prog-w.log: t/tap-bad-prog.log
-t/tap-basic-w.log: t/tap-basic.sh
-t/tap-basic-w.log: t/tap-basic.log
-t/tap-diagnostic-custom-w.log: t/tap-diagnostic-custom.sh
-t/tap-diagnostic-custom-w.log: t/tap-diagnostic-custom.log
-t/tap-driver-stderr-w.log: t/tap-driver-stderr.sh
-t/tap-driver-stderr-w.log: t/tap-driver-stderr.log
-t/tap-doc-w.log: t/tap-doc.sh
-t/tap-doc-w.log: t/tap-doc.log
-t/tap-more-w.log: t/tap-more.sh
-t/tap-more-w.log: t/tap-more.log
-t/tap-more2-w.log: t/tap-more2.sh
-t/tap-more2-w.log: t/tap-more2.log
-t/tap-recheck-w.log: t/tap-recheck.sh
-t/tap-recheck-w.log: t/tap-recheck.log
+t/tap-summary.log: t/ax/tap-summary-aux.sh 
+t/tap-summary-color.log: t/ax/tap-summary-aux.sh 
+t/testsuite-summary-color.log: t/ax/testsuite-summary-checks.sh 
+t/testsuite-summary-count.log: t/ax/testsuite-summary-checks.sh 
+t/depcomp-lt-auto.log: t/ax/depcomp.sh 
+t/depcomp-lt-cpp.log: t/ax/depcomp.sh 
+t/depcomp-lt-dashmstdout.log: t/ax/depcomp.sh 
+t/depcomp-lt-disabled.log: t/ax/depcomp.sh 
+t/depcomp-lt-gcc.log: t/ax/depcomp.sh 
+t/depcomp-lt-makedepend.log: t/ax/depcomp.sh 
+t/depcomp-lt-msvcmsys.log: t/ax/depcomp.sh 
+t/depcomp-lt-msvisualcpp.log: t/ax/depcomp.sh 
+t/depcomp-auto.log: t/ax/depcomp.sh 
+t/depcomp-cpp.log: t/ax/depcomp.sh 
+t/depcomp-dashmstdout.log: t/ax/depcomp.sh 
+t/depcomp-disabled.log: t/ax/depcomp.sh 
+t/depcomp-gcc.log: t/ax/depcomp.sh 
+t/depcomp-makedepend.log: t/ax/depcomp.sh 
+t/depcomp-msvcmsys.log: t/ax/depcomp.sh 
+t/depcomp-msvisualcpp.log: t/ax/depcomp.sh 
+t/testsuite-summary-count-many.log: t/ax/extract-testsuite-summary.pl 
+t/gettext-basics.log:  t/gettext-macros.log
+t/gettext-config-rpath.log:  t/gettext-macros.log
+t/gettext-external-pr338.log:  t/gettext-macros.log
+t/gettext-intl-subdir.log:  t/gettext-macros.log
+t/gettext-pr381.log:  t/gettext-macros.log
+t/subdir-cond-gettext.log:  t/gettext-macros.log
 t/ar-lib4.log:  t/libtool-macros.log
 t/ar-lib6a.log:  t/libtool-macros.log
 t/ar-lib6b.log:  t/libtool-macros.log
 t/canon6.log:  t/libtool-macros.log
 t/canon7.log:  t/libtool-macros.log
+t/ccnoco-lt.log:  t/libtool-macros.log
+t/cxx-lt-demo.log:  t/libtool-macros.log
 t/depcomp8b.log:  t/libtool-macros.log
-t/extradep2.log:  t/libtool-macros.log
+t/extra-deps-lt.log:  t/libtool-macros.log
 t/fort5.log:  t/libtool-macros.log
 t/instdir-ltlib.log:  t/libtool-macros.log
 t/instfail-libtool.log:  t/libtool-macros.log
@@ -3823,28 +3910,25 @@ t/pr300-ltlib.log:  t/libtool-macros.log
 t/pr307.log:  t/libtool-macros.log
 t/pr401b.log:  t/libtool-macros.log
 t/reqd2.log:  t/libtool-macros.log
-t/silent3.log:  t/libtool-macros.log
-t/silent4.log:  t/libtool-macros.log
-t/silent9.log:  t/libtool-macros.log
+t/silent-lt.log:  t/libtool-macros.log
 t/stdlib2.log:  t/libtool-macros.log
 t/strip3.log:  t/libtool-macros.log
 t/subobj9.log:  t/libtool-macros.log
+t/subobj-clean-lt-pr10697.log:  t/libtool-macros.log
 t/suffix2.log:  t/libtool-macros.log
 t/suffix5.log:  t/libtool-macros.log
 t/suffix8.log:  t/libtool-macros.log
 t/suffix10.log:  t/libtool-macros.log
 t/vala-libs.log:  t/libtool-macros.log
 t/vartypo2.log:  t/libtool-macros.log
-t/depcomp-lt-msvcmsys.log:  t/libtool-macros.log
-t/depcomp-lt-disabled.log:  t/libtool-macros.log
-t/depcomp-lt-msvisualcpp.log:  t/libtool-macros.log
-t/depcomp-lt-makedepend.log:  t/libtool-macros.log
 t/depcomp-lt-auto.log:  t/libtool-macros.log
 t/depcomp-lt-cpp.log:  t/libtool-macros.log
-t/depcomp-lt-gcc.log:  t/libtool-macros.log
 t/depcomp-lt-dashmstdout.log:  t/libtool-macros.log
-t/testsuite-summary-color.log: t/ax/testsuite-summary-checks.sh 
-t/testsuite-summary-count.log: t/ax/testsuite-summary-checks.sh 
+t/depcomp-lt-disabled.log:  t/libtool-macros.log
+t/depcomp-lt-gcc.log:  t/libtool-macros.log
+t/depcomp-lt-makedepend.log:  t/libtool-macros.log
+t/depcomp-lt-msvcmsys.log:  t/libtool-macros.log
+t/depcomp-lt-msvisualcpp.log:  t/libtool-macros.log
 t/tap-ambiguous-directive.log: t/ax/tap-setup.sh t/tap-common-setup.log
 t/tap-autonumber.log: t/ax/tap-setup.sh t/tap-common-setup.log
 t/tap-bailout.log: t/ax/tap-setup.sh t/tap-common-setup.log
@@ -3903,7 +3987,6 @@ t/tap-planskip-whitespace.log: t/ax/tap-setup.sh t/tap-common-setup.log
 t/tap-planskip-badexit.log: t/ax/tap-setup.sh t/tap-common-setup.log
 t/tap-planskip-bailout.log: t/ax/tap-setup.sh t/tap-common-setup.log
 t/tap-planskip-later-errors.log: t/ax/tap-setup.sh t/tap-common-setup.log
-t/tap-realtime.log: t/ax/tap-setup.sh t/tap-common-setup.log
 t/tap-test-number-0.log: t/ax/tap-setup.sh t/tap-common-setup.log
 t/tap-recheck-logs.log: t/ax/tap-setup.sh t/tap-common-setup.log
 t/tap-result-comment.log: t/ax/tap-setup.sh t/tap-common-setup.log
@@ -3914,29 +3997,16 @@ t/tap-unplanned.log: t/ax/tap-setup.sh t/tap-common-setup.log
 t/tap-whitespace-normalization.log: t/ax/tap-setup.sh t/tap-common-setup.log
 t/tap-with-and-without-number.log: t/ax/tap-setup.sh t/tap-common-setup.log
 t/tap-xfail-tests.log: t/ax/tap-setup.sh t/tap-common-setup.log
-t/tap-summary.log: t/ax/tap-summary-aux.sh 
-t/tap-summary-color.log: t/ax/tap-summary-aux.sh 
-t/depcomp-lt-msvcmsys.log: t/ax/depcomp.sh 
-t/depcomp-lt-disabled.log: t/ax/depcomp.sh 
-t/depcomp-lt-msvisualcpp.log: t/ax/depcomp.sh 
-t/depcomp-lt-makedepend.log: t/ax/depcomp.sh 
-t/depcomp-lt-auto.log: t/ax/depcomp.sh 
-t/depcomp-lt-cpp.log: t/ax/depcomp.sh 
-t/depcomp-lt-gcc.log: t/ax/depcomp.sh 
-t/depcomp-lt-dashmstdout.log: t/ax/depcomp.sh 
-t/depcomp-msvcmsys.log: t/ax/depcomp.sh 
-t/depcomp-disabled.log: t/ax/depcomp.sh 
-t/depcomp-msvisualcpp.log: t/ax/depcomp.sh 
-t/depcomp-makedepend.log: t/ax/depcomp.sh 
-t/depcomp-auto.log: t/ax/depcomp.sh 
-t/depcomp-cpp.log: t/ax/depcomp.sh 
-t/depcomp-gcc.log: t/ax/depcomp.sh 
-t/depcomp-dashmstdout.log: t/ax/depcomp.sh 
-t/testsuite-summary-count-many.log: t/ax/extract-testsuite-summary.pl 
-t/gettext.log:  t/gettext-macros.log
-t/gettext2.log:  t/gettext-macros.log
-t/gettext3.log:  t/gettext-macros.log
-t/subcond.log:  t/gettext-macros.log
+t/vala-headers.log:  t/pkg-config-macros.log
+t/vala-libs.log:  t/pkg-config-macros.log
+t/vala-mix.log:  t/pkg-config-macros.log
+t/vala-mix2.log:  t/pkg-config-macros.log
+t/vala-non-recursive-setup.log:  t/pkg-config-macros.log
+t/vala-parallel.log:  t/pkg-config-macros.log
+t/vala-per-target-flags.log:  t/pkg-config-macros.log
+t/vala-recursive-setup.log:  t/pkg-config-macros.log
+t/vala-vapi.log:  t/pkg-config-macros.log
+t/vala-vpath.log:  t/pkg-config-macros.log
 t/testsuite-summary-count-many.log: t/ax/trivial-test-driver 
 t/test-driver-acsubst.log: t/ax/trivial-test-driver 
 t/test-driver-cond.log: t/ax/trivial-test-driver 
@@ -3951,17 +4021,46 @@ $(srcdir)/t/testsuite-part.am:
        $(AM_V_at)chmod a-w t/testsuite-part.tmp
        $(AM_V_at)mv -f t/testsuite-part.tmp $@
 
+# The dependecies declared here are not truly complete, but such
+# completeness would cause more issues than it would solve.  See
+# automake bug#11347.
 $(generated_TESTS): $(srcdir)/gen-testsuite-part
-$(srcdir)/t/testsuite-part.am: $(srcdir)/gen-testsuite-part Makefile.am
+$(srcdir)/t/testsuite-part.am: $(srcdir)/gen-testsuite-part
+$(srcdir)/t/testsuite-part.am: Makefile.am
 
 # Few more static dependencies.
 t/distcheck-missing-m4.log: t/ax/distcheck-hook-m4.am
 t/distcheck-outdated-m4.log: t/ax/distcheck-hook-m4.am
 
-defs-static: defs-static.in Makefile
+t/ax/test-defs.sh: t/ax/test-defs.in Makefile
        $(AM_V_at)rm -f $@ $@-t
-       $(AM_V_GEN)in=defs-static.in\
-         && $(do_subst) <$(srcdir)/defs-static.in >$@-t
+       $(AM_V_at)$(MKDIR_P) t/ax
+       $(AM_V_GEN)in=t/ax/test-defs.in \
+         && $(do_subst) <$(srcdir)/$$in >$@-t
+       $(generated_file_finalize)
+
+t/ax/shell-no-trail-bslash: t/ax/shell-no-trail-bslash.in Makefile
+       $(AM_V_at)rm -f $@ $@-t
+       $(AM_V_GEN)in=t/ax/shell-no-trail-bslash.in \
+         && $(MKDIR_P) t/ax \
+         && $(do_subst) <$(srcdir)/$$in >$@-t \
+         && chmod a+x $@-t
+       $(generated_file_finalize)
+
+t/ax/cc-no-c-o: t/ax/cc-no-c-o.in Makefile
+       $(AM_V_at)rm -f $@ $@-t
+       $(AM_V_GEN)in=t/ax/cc-no-c-o.in \
+         && $(MKDIR_P) t/ax \
+         && $(do_subst) <$(srcdir)/$$in >$@-t \
+         && chmod a+x $@-t
+       $(generated_file_finalize)
+
+runtest: t/ax/runtest.in Makefile
+       $(AM_V_at)rm -f $@ $@-t
+       $(AM_V_GEN)in=t/ax/runtest.in \
+         && $(MKDIR_P) t/ax \
+         && $(do_subst) <$(srcdir)/$$in >$@-t \
+         && chmod a+x $@-t
        $(generated_file_finalize)
 
 # If two test scripts have the same basename, they will end up sharing
@@ -3979,6 +4078,62 @@ check-no-repeated-test-name:
 check-local: check-no-repeated-test-name
 .PHONY: check-no-repeated-test-name
 
+# Check that our test cases are syntactically correct.
+# See automake bug#11898.
+check-tests-syntax:
+       @st=0; \
+       err () { echo "$@: $$*" >&2; st=1; }; \
+       bases=`for log in : $(TEST_LOGS); do echo $$log; done \
+         | sed -e '/^:$$/d' -e 's/\.log$$//'`; \
+       for bas in $$bases; do \
+         for suf in sh tap pl; do \
+           tst=$$bas.$$suf; \
+           if test -f $$tst; then \
+             break; \
+           elif test -f $(srcdir)/$$tst; then \
+             tst=$(srcdir)/$$tst; \
+             break; \
+           else \
+             tst=''; \
+           fi; \
+         done; \
+         test -n "$$tst" || err "couldn't find test '$$bas'"; \
+         test $$suf = pl && continue; \
+         $(AM_V_P) && echo " $(AM_TEST_RUNNER_SHELL) -n $$tst"; \
+         $(AM_TEST_RUNNER_SHELL) -n "$$tst" \
+           || err "test '$$tst' syntactically invalid"; \
+       done; \
+       exit $$st
+check-local: check-tests-syntax
+.PHONY: check-tests-syntax
+
+# Recipes with a trailing backslash character (possibly followed by
+# blank characters only) can cause spurious syntax errors with at
+# least older bash versions (e.g., bash 2.05b), and can be potentially
+# be unportable to other weaker shells.  Run the testsuite in a way
+# that helps catching such problems in Automake-generated recipes.
+# See automake bug#10436.
+check-no-trailing-backslash-in-recipes:
+       $(AM_V_GEN)$(MAKE) $(AM_MAKEFLAGS) check \
+         CONFIG_SHELL='$(abs_top_builddir)/t/ax/shell-no-trail-bslash'
+.PHONY: check-no-trailing-backslash-in-recipes
+
+# Some compilers out there (hello, MSVC) still choke on "-c -o" being
+# passed together on the command line.  Run the whole testsuite faking
+# the presence of such a compiler, to help catch regressions that would
+# otherwise only present themselves later "in the wild".  See also the
+# long discussion about automake bug#13378.
+check-cc-no-c-o:
+       $(AM_V_GEN)$(MAKE) $(AM_MAKEFLAGS) check \
+         AM_TESTSUITE_SIMULATING_NO_CC_C_O=yes
+.PHONY: check-cc-no-c-o
+
+# Automake-generated Makefiles should work when run with parallel make.
+check-parallel:
+       $(AM_V_GEN)$(MAKE) $(AM_MAKEFLAGS) check \
+         AM_TESTSUITE_MAKE="$${AM_TESTSUITE_MAKE-$${MAKE-make}} -j4"
+.PHONY: check-parallel
+
 .PHONY: maintainer-check-list-of-tests
 maintainer-check-list-of-tests:
         @if diff -u /dev/null /dev/null >/dev/null 2>&1; then \
@@ -4021,245 +4176,25 @@ clean-maintcheck-testslist-tmp:
 # Run the testsuite with the installed aclocal and automake.
 installcheck-local: installcheck-testsuite
 installcheck-testsuite:
-       am_running_installcheck=yes $(MAKE) $(AM_MAKEFLAGS) check
+       $(AM_V_GEN)$(MAKE) $(AM_MAKEFLAGS) check \
+         am_running_installcheck=yes
+
+# Performance tests.
+.PHONY: perf
+perf: all
+       $(AM_V_GEN)$(MAKE) $(AM_MAKEFLAGS) check \
+         TEST_SUITE_LOG='$(PERF_TEST_SUITE_LOG)' TESTS='$(perf_TESTS)'
 
 clean-local: clean-local-check
 .PHONY: clean-local-check
 clean-local-check:
-       -set x t/*.dir; shift; \
-        if test "$$#,$$1" = "1,*.dir"; then \
-          : there is no test directory to clean; \
-        else \
-          find "$$@" -type d ! -perm -700 -exec chmod u+rwx {} ';'; \
-          rm -rf "$$@"; \
-        fi;
-
-$(man1_MANS): $(srcdir)/configure.ac
-
-doc/aclocal.1 doc/automake.1:
-       $(AM_V_GEN): \
-         && $(MKDIR_P) doc \
-         && f=`echo $@ | sed 's|.*/||; s|\.1$$||; $(transform)'` \
-         && echo ".so man1/$$f-$(APIVERSION).1" > $@
-
-doc/aclocal-$(APIVERSION).1: aclocal.in aclocal lib/Automake/Config.pm
-       $(update_mans) aclocal-$(APIVERSION)
-doc/automake-$(APIVERSION).1: automake.in automake lib/Automake/Config.pm
-       $(update_mans) automake-$(APIVERSION)
-
-# We depend on configure.ac so that we regenerate the tarball
-# whenever the Automake version changes.
-# aclocal-$(APIVERSION) and automake-$(APIVERSION) are generated by
-# configure in 't/wrap'.
-$(srcdir)/doc/amhello-1.0.tar.gz: $(amhello_sources) $(srcdir)/configure.ac
-       $(AM_V_GEN): \
-         && PATH="$(abs_top_builddir)/t/wrap$(PATH_SEPARATOR)$$PATH" \
-         && export PATH \
-         && $(am__cd) $(srcdir)/doc/amhello \
-         && ACLOCAL=aclocal-$(APIVERSION) && export ACLOCAL \
-         && AUTOMAKE=automake-$(APIVERSION) && export AUTOMAKE \
-         && AUTOCONF='$(am_AUTOCONF)' && export AUTOCONF \
-         && AUTOM4TE='$(am_AUTOM4TE)' && export AUTOM4TE \
-         && AUTORECONF='$(am_AUTORECONF)' && export AUTORECONF \
-         && AUTOHEADER='$(am_AUTOHEADER)' && export AUTOHEADER \
-         && AUTOUPDATE='$(am_AUTOUPDATE)' && export AUTOUPDATE \
-         && $(am_AUTORECONF) -vfi \
-         && ./configure \
-         && $(MAKE) $(AM_MAKEFLAGS) distcheck \
-         && $(MAKE) $(AM_MAKEFLAGS) distclean \
-         && rm -rf $(amhello_configury) \
-         && mv -f amhello-1.0.tar.gz ..
-
-# When executed from a git checkout, generate the ChangeLog from the git
-# history.  When executed from an extracted distribution tarball, just
-# copy the distributed ChangeLog in the build directory (and if this
-# fails, or if no distributed ChangeLog file is present, complain and
-# give an error).
-#
-# We need the apparently useless dependency from another .PHONY target
-# 'am--changelog-regen-hook' to work around a bug of Solaris make, which
-# doesn't execute the recipe of a target named as an existing file, even
-# if such target is declared '.PHONY' (yikes!)
-#
-.PHONY: am--changelog-regen-hook
-am--changelog-regen-hook:
-ChangeLog: am--changelog-regen-hook
-       $(AM_V_GEN)set -e; set -u; \
-       if test -d $(srcdir)/.git; then \
-         rm -f $@-t \
-           && $(gitlog_to_changelog_command) \
-              $(gitlog_to_changelog_options) >$@-t \
-           && chmod a-w $@-t \
-           && mv -f $@-t $@ \
-           || exit 1; \
-       elif test ! -f $(srcdir)/$@; then \
-         echo "Source tree is not a git checkout, and no pre-existent" \
-              "$@ file has been found there" >&2; \
-         exit 1; \
-       fi
-
-# Ensure tests are world-executable.
-# FIXME: this should be turned into a maintainer check...
-dist-hook:
-       $(am__cd) $(distdir)/t && chmod a+rx *.sh *.tap
-
-check-coverage-run recheck-coverage-run: all
-       $(mkinstalldirs) $(PERL_COVERAGE_DB)
-       PERL5OPT="$$PERL5OPT $(PERL_COVERAGE_FLAGS)"; export PERL5OPT; \
-       WANT_NO_THREADS=yes; export WANT_NO_THREADS; unset AUTOMAKE_JOBS; \
-       $(MAKE) $(AM_MAKEFLAGS) `echo $@ | sed 's/-coverage-run//'`
-
-check-coverage-report:
-       @if test ! -d "$(PERL_COVERAGE_DB)"; then \
-         echo "No coverage database found in '$(PERL_COVERAGE_DB)'." >&2; \
-         echo "Please run \"make check-coverage\" first" >&2; \
-         exit 1; \
-       fi
-       $(PERL_COVER) $(PERL_COVER_FLAGS) "$(PERL_COVERAGE_DB)"
-
-# We don't use direct dependencies here because we'd like to be able
-# to invoke the report even after interrupted check-coverage.
-check-coverage: check-coverage-run
-       $(MAKE) $(AM_MAKEFLAGS) check-coverage-report
-
-recheck-coverage: recheck-coverage-run
-       $(MAKE) $(AM_MAKEFLAGS) check-coverage-report
+       $(AM_V_GEN)$(PERL) $(srcdir)/t/ax/deltree.pl t/*.dir t/*/*.dir */t/*.dir
 
-clean-coverage:
-       rm -rf "$(PERL_COVERAGE_DB)"
-clean-local: clean-coverage
+# vim: ft=automake noet
 
-.PHONY: check-coverage recheck-coverage check-coverage-run \
-       recheck-coverage-run check-coverage-report clean-coverage
+# Most work delegated to sub-dir makefile fragments.
 
-git-tag-release: maintainer-check
-       @set -e; set -u; \
-       fatal () { echo "$@: $$*; not tagging" >&2; exit 1; }; \
-       case '$(AM_TAG_DRYRUN)' in \
-         ""|[nN]|[nN]o|NO) run="";; \
-         *) run="echo Running:";; \
-       esac; \
-       $(determine_release_type); \
-       $(git_must_have_clean_workdir); \
-       $$run $(GIT) tag -s "v$(VERSION)" -m "$$release_type $(VERSION)"
-
-git-upload-release:
-       @set -e; set -u; \
-       fatal () { echo "$@: $$*; not releasing" >&2; exit 1; }; \
-       $(determine_release_type); \
-       dest=$$dest.gnu.org:automake; \
-       $(git_must_have_clean_workdir); \
-       tag=`$(GIT) describe` \
-         && case $$tag in "v$(VERSION)") true;; *) false;; esac \
-         || fatal "you can only create a release from a tagged version"; \
-       $(MAKE) $(AM_MAKEFLAGS) dist || exit 1; \
-       echo Will upload to $$dest: $(DIST_ARCHIVES); \
-       $(srcdir)/lib/gnupload $(GNUPLOADFLAGS) --to $$dest $(DIST_ARCHIVES)
-
-.PHONY: git-upload-release git-tag-release
-
-autodiffs:
-       @set -u; \
-        NEW_COMMIT=$${NEW_COMMIT-"HEAD"}; \
-        OLD_COMMIT=$${OLD_COMMIT-"HEAD~1"}; \
-        am_gitdir='$(abs_top_srcdir)/.git'; \
-        get_autofiles_from_rev () \
-        { \
-            rev=$$1 dir=$$2 \
-              && echo "$@: will get files from revision $$rev" \
-              && $(GIT) clone -q --depth 1 "$$am_gitdir" tmp \
-              && $(am__cd) tmp \
-              && $(GIT) checkout -q "$$rev" \
-              && echo "$@: bootstrapping $$rev" \
-              && $(SHELL) ./bootstrap.sh \
-              && echo "$@: copying files from $$rev" \
-              && makefile_ins=`find . -name Makefile.in` \
-              && (tar cf - configure aclocal.m4 $$makefile_ins) | \
-                 (cd .. && $(am__cd) "$$dir" && tar xf -) \
-              && cd .. \
-              && rm -rf tmp; \
-        }; \
-        outdir=$@.dir \
-          && $(GIT) --git-dir="$$am_gitdir" describe $$OLD_COMMIT >/dev/null \
-          && $(GIT) --git-dir="$$am_gitdir" describe $$NEW_COMMIT >/dev/null \
-          && rm -rf $$outdir \
-          && mkdir $$outdir \
-          && $(am__cd) $$outdir \
-          && mkdir new old \
-          && get_autofiles_from_rev $$OLD_COMMIT old \
-          && get_autofiles_from_rev $$NEW_COMMIT new \
-          && exit 0
-
-compare-autodiffs: autodiffs
-       @set -u; \
-       : $${COLORDIFF=colordiff} $${DIFF=diff}; \
-       dir=autodiffs.dir; \
-       if test ! -d "$$dir"; then \
-         echo "$@: $$dir: Not a directory" >&2; \
-         exit 1; \
-       fi; \
-       mydiff=false mypager=false; \
-       if test -t 1; then \
-         if ($$COLORDIFF -r . .) </dev/null >/dev/null 2>&1; then \
-           mydiff=$$COLORDIFF; \
-           mypager="less -R"; \
-         else \
-           mypager=less; \
-         fi; \
-       else \
-         mypager=cat; \
-       fi; \
-       if test "$$mydiff" = false; then \
-         if ($$DIFF -r -u . .); then \
-           mydiff=$$DIFF; \
-         else \
-           echo "$@: no good-enough diff program specified" >&2; \
-           exit 1; \
-         fi; \
-       fi; \
-       st=0; $$mydiff -r -u $$dir/old $$dir/new | $$mypager || st=$$?; \
-       rm -rf $$dir; \
-       exit $$st
-.PHONY: autodiffs compare-autodiffs
-
-fetch:
-       rm -rf Fetchdir > /dev/null 2>&1
-       mkdir Fetchdir
-       ($(am__cd) Fetchdir && \
-       $(WGET_SV_GIT_CF)config.guess -O config.guess && \
-       $(WGET_SV_GIT_CF)config.sub -O config.sub && \
-       $(WGET_SV_CVS)texinfo/texinfo/doc/texinfo.tex -O texinfo.tex && \
-       $(WGET_SV_GIT_GL)doc/INSTALL -O INSTALL && \
-       $(WGET_SV_GIT_GL)build-aux/gnupload -O gnupload && \
-       $(WGET_SV_GIT_GL)build-aux/update-copyright -O update-copyright && \
-       $(WGET_SV_GIT_GL)build-aux/gitlog-to-changelog -O gitlog-to-changelog)
-       @stat=0; for file in $(FETCHFILES); do \
-         if diff -u $(srcdir)/lib/$$file Fetchdir/$$file \
-                 >>Fetchdir/update.patch 2>/dev/null; then :; \
-         else \
-           stat=1; \
-           echo "Updating $(srcdir)/lib/$$file ..."; \
-           cp Fetchdir/$$file $(srcdir)/lib/$$file; \
-         fi; \
-       done; \
-       test $$stat = 0 || \
-         echo "See Fetchdir/update.patch for a log of the changes."; \
-       exit $$stat
-.PHONY: fetch
-
-.PHONY: update-copyright
-update-copyright:
-       $(AM_V_GEN)set -e; \
-       current_year=`date +%Y` && test -n "$$current_year" \
-         || { echo "$@: cannot get current year" >&2; exit 1; }; \
-       sed -i "/^RELEASE_YEAR=/s/=.*$$/=$$current_year/" \
-         bootstrap.sh configure.ac; \
-       excluded_re=`echo $(FETCHFILES) \
-         | sed -e 's|^|lib/|' -e 's| | lib/|g' -e 's, ,|,g'`; \
-       $(GIT) ls-files \
-         | grep -Ev '^(lib/)?(COPYING|INSTALL)$$' \
-         | grep -Ev "^($$excluded_re)$$" \
-         | $(update_copyright_env) xargs $(srcdir)/lib/$@
+# vim: ft=automake noet
 
 # Tell versions [3.59,3.63) of GNU make to not export all variables.
 # Otherwise a system limit (for SysV at least) may be exceeded.
diff --git a/NEWS b/NEWS
index a0703b1..1a0ccc9 100644 (file)
--- a/NEWS
+++ b/NEWS
-New in 1.12.1:
-
 * WARNING: Future backward-incompatibilities!
 
-  - Starting from either the next minor version (1.12.2) or the next major
-    version (1.13), Automake will start warning if 'configure.in' is used
-    instead of 'configure.ac' as the Autoconf input.  Future versions of
-    Automake will drop support for 'configure.in' altogether.
+  - Makefile recipes generated by Automake 2.0 will expect to use an
+    'rm' program that doesn't complain when called without any non-option
+    argument if the '-f' option is given (so that commands like "rm -f"
+    and "rm -rf" will act as a no-op, instead of raising usage errors).
+    This behavior of 'rm' is very widespread in the wild, and it will be
+    required in the next POSIX version:
+
+      <http://austingroupbugs.net/view.php?id=542>
+
+    Accordingly, AM_INIT_AUTOMAKE now expands some shell code that checks
+    that the default 'rm' program in PATH satisfies this requirement,
+    aborting the configure process if this is not the case.  For the
+    moment, it's still possible to force the configuration process to
+    succeed even with a broken 'rm', that that will no longer be the case
+    for Automake 2.0.
+
+  - Automake 2.0 will require Autoconf 2.70 or later (which is still
+    unreleased at the moment of writing, but is planned to be released
+    before Automake 2.0 is).
+
+  - Automake 2.0 will drop support for the long-deprecated 'configure.in'
+    name for the Autoconf input file.  You are advised to start using the
+    recommended name 'configure.ac' instead, ASAP.
+
+  - The ACLOCAL_AMFLAGS special make variable will be fully deprecated in
+    Automake 2.0: it will raise warnings in the "obsolete" category (but
+    still no hard error of course, for compatibilities with the many, many
+    packages that still relies on that variable).  You are advised to
+    start relying on the new Automake support for AC_CONFIG_MACRO_DIRS
+    instead (which was introduced in Automake 1.13).
+
+  - Automake 2.0 will remove support for automatic dependency tracking
+    with the SGI C/C++ compilers on IRIX.  The SGI depmode has been
+    reported broken "in the wild" already, and we don't think investing
+    time in debugging and fixing is worthwhile, especially considering
+    that SGI has last updated those compilers in 2006, and retired
+    support for them in December 2013:
+    <http://www.sgi.com/services/support/irix_mips_support.html>
+
+  - Automake 2.0 will remove support for MS-DOS and Windows 95/98/ME
+    (support for them was offered by relying on the DJGPP project).
+    Note however that both Cygwin and MSYS/MinGW on modern Windows
+    versions will continue to be fully supported.
+
+  - Automake-provided scripts and makefile recipes might (finally!)
+    start assuming a POSIX shell in Automake 2.0.  There still is no
+    certainty about this though: we'd first like to wait and see
+    whether future Autoconf versions will be enhanced to guarantee
+    that such a shell is always found and provided by the checks in
+    ./configure.
+
+  - Starting from Automake 2.0, third-party m4 files located in the
+    system-wide aclocal directory, as well as in any directory listed
+    in the ACLOCAL_PATH environment variable, will take precedence
+    over "built-in" Automake macros.  For example (assuming Automake
+    is installed in the /usr/local hierarchy), a definition of the
+    AM_PROG_VALAC macro found in '/usr/local/share/aclocal/my-vala.m4'
+    should take precedence over the same-named automake-provided macro
+    (defined in '/usr/local/share/aclocal-2.0/vala.m4').
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+New in 1.15.1:
+
+* Bugs fixed:
+
+  - The code has been adapted to remove a warning present since Perl
+    5.22 stating that "Unescaped left brace in regex is deprecated".
+    This warning has become an hard error in Perl 5.26 (bug#22372).
+
+  - The generated Makefiles do not rely on the obsolescent GZIP
+    environment variable which was used for passing arguments to
+    'gzip'.  Compatibility with old versions has been
+    preserved. (bug#20132)
+
+* Miscellaneous changes:
+
+  - Support the Windows version of the Intel C Compiler (icl) in the
+    'compile' script in the same way the (compatible) Microsoft C
+    Compiler is supported.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+New in 1.15:
+
+* Improvements and refactorings in the install-sh script:
+
+  - It has been modernized, and now makes the following assumptions
+    *unconditionally*:
+    (1) a working 'dirname' program is available;
+    (2) the ${var:-value} shell parameters substitution works;
+    (3) the "set -f" and "set +f" shell commands work, and, respectively,
+        disable and enable shell globbing.
+
+  - The script implements stricter error checking, and now it complains
+    and bails out if any of the following expectations is not met:
+    (1) the options -d and -t are never used together;
+    (2) the argument passed to option -t is a directory;
+    (3) if there are two or more SOURCEFILE arguments, the
+        DESTINATION argument must be a directory.
+
+* Automake-generated testsuites:
+
+  - The default test-driver used by the Automake-generated testsuites
+    now appends the result and exit status of each "plain" test to the
+    associated log file (automake bug#11814).
+
+  - The perl implementation of the TAP testsuite driver is no longer
+    installed in the Automake's scripts directory, and is instead just
+    distributed as a "contrib" addition.  There should be no reason to
+    use this implementation anyway in real packages, since the awk+shell
+    implementation of the TAP driver (which is documented in the manual)
+    is more portable and has feature parity with the perl implementation.
+
+  - The rule generating 'test-suite.log' no longer risk incurring in an
+    extra useless "make all" recursive invocation in some corner cases
+    (automake bug#16302).
+
+* Distribution:
+
+  - Automake bug#18286: "make distcheck" could sometimes fail to detect
+    files missing from the distribution tarball, especially in those cases
+    where both the generated files and their dependencies are explicitly
+    in $(srcdir).  An important example of this are *generated* makefile
+    fragments included at Automake time in Makefile.am; e.g.:
+
+        ...
+        $(srcdir)/fragment.am: $(srcdir)/data.txt $(srcdir)/preproc.sh
+            cd $(srcdir) && $(SHELL) preproc.sh <data.txt >fragment.am
+        include $(srcdir)/fragment.am
+        ...
+
+    If the use forgot to add data.txt and/or preproc.sh in the distribution
+    tarball, "make distcheck" would have erroneously succeeded!  This issue
+    is now fixed.
+
+  - As a consequence of the previous change, "make distcheck" will run
+    using '$(distdir)/_build/sub' as the build directory, rather than
+    simply '$(distdir)/_build' (as it was the case for Automake 1.14 and
+    earlier).  Consequently, the './configure' and 'make' invocations
+    issued by the distcheck recipe now have $(srcdir) equal to '../..',
+    rather than to just '..'.  Dependent and similar variables (e.g.,
+    '$(top_srcdir)') are also changed accordingly.
+
+    Thus, Makefiles that made assumptions about the exact values of the
+    build and source directories used by "make distcheck" will have to
+    be adjusted.  Notice that making such assumptions was a bad and
+    unsupported practice anyway, since the exact locations of those
+    directories should be considered implementation details, and we
+    reserve the right to change them at any time.
+
+* Miscellaneous bugs fixed:
+
+  - The expansion of AM_INIT_AUTOMAKE ends once again with a trailing
+    newline (bug#16841).  Regression introduced in Automake 1.14.
+
+  - We no longer risk to use '$ac_aux_dir' before it's defined (see
+    automake bug#15981). Bug introduced in Automake 1.14.
+
+  - The code used to detect whether the currently used make is GNU make
+    or not (relying on the private macro 'am__is_gnu_make') no longer
+    risks causing "Arg list too long" for projects using automatic
+    dependency tracking and having a ton of source files (bug#18744).
+
+  - Automake tries to offer a more deterministic output for generated
+    Makefiles, in the face of the newly-introduced randomization for
+    hash keys order in Perl 5.18.
+
+  - In older Automake versions, if a user defined one single Makefile
+    fragment (say 'foo.am') to be included via Automake includes in
+    his main Makefile.am, and defined a custom make rule to generate that
+    file from other data, Automake used to spuriously complain with some
+    message like "... overrides Automake target '$(srcdir)/foo.am".
+    This bug is now fixed.
+
+  - The user can now extend the special .PRECIOUS target, the same way
+    he could already do with the .MAKE .and .PHONY targets.
+
+  - Some confusing typos have been fixed in the manual and in few warning
+    messages (automake bug#16827 and bug#16997).
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+New in 1.14.1:
+
+* Bugs fixed:
+
+  - The user is no longer allowed to override the --srcdir nor the --prefix
+    configure options used by "make distcheck" (bug#14991).
+
+  - Fixed a gross inefficiency in the recipes for installing byte-compiled
+    python files, that was causing an O(N^2) performance on the number N of
+    files, instead of the expected O(N) performance.  Note that this bug
+    was only relevant when the number of python files was high (which is
+    unusual in practice).
+
+  - Automake try to offer a more deterministic output for warning messages,
+    in the face of the newly-introduced randomization for hash keys order
+    in Perl 5.18.
+
+  - The 'test-driver' script now actually error out with a clear error
+    message on the most common invalid usages.
+
+  - Several spurious failures/hangs in the testsuite (bugs #14706, #14707,
+    #14760, #14911, #15181, #15237).
+
+* Documentation fixes:
+
+  - Fixed typos in the 'fix-timestamp.sh' example script that made it
+    nonsensical.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+New in 1.14:
+
+* C compilation, and the AC_PROG_CC and AM_PROG_CC_C_O macros:
+
+  - The 'compile' script is now unconditionally required for all packages
+    that perform C compilation (if you are using the '--add-missing'
+    option, automake will fetch that script for you, so you shouldn't
+    need any explicit adjustment).  This new behaviour is needed to avoid
+    obscure errors when the 'subdir-objects' option is used, and the
+    compiler is an inferior one that doesn't grasp the combined use of
+    both the "-c -o" options; see discussion about automake bug#13378 for
+    more details:
+    <http://debbugs.gnu.org/cgi/bugreport.cgi?bug=13378#35>
+    <http://debbugs.gnu.org/cgi/bugreport.cgi?bug=13378#44>
+
+  - The next major Automake version (2.0) will unconditionally activate
+    the 'subdir-objects' option.  In order to smooth out the transition,
+    we now give a warning (in the category 'unsupported') whenever a
+    source file is present in a subdirectory but the 'subdir-object' is
+    not enabled.  For example, the following usage will trigger such a
+    warning:
+
+        bin_PROGRAMS = sub/foo
+        sub_foo_SOURCES = sub/main.c sub/bar.c
+
+  - Automake will automatically enhance the autoconf-provided macro
+    AC_PROG_CC to force it to check, at configure time, that the
+    C compiler supports the combined use of both the '-c' and '-o'
+    options.  The result of this check is saved in the cache variable
+    'am_cv_prog_cc_c_o', and said result can be overridden by
+    pre-defining that variable.
+
+  - The AM_PROG_CC_C_O macro can still be called, albeit that should no
+    longer be necessary. This macro is now just a thin wrapper around the
+    Automake-enhanced AC_PROG_CC.  This means, among the other things,
+    that its behaviour is changed in three ways:
+
+      1. It no longer invokes the Autoconf-provided AC_PROG_CC_C_O
+         macro behind the scenes.
+
+      2. It caches the check result in the 'am_cv_prog_cc_c_o' variable,
+         and not in a 'ac_cv_prog_cc_*_c_o' variable whose exact name is
+         dynamically computed only at configure runtime (really!) from
+         the content of the '$CC' variable.
+
+      3. It no longer automatically AC_DEFINE the C preprocessor
+         symbol 'NO_MINUS_C_MINUS_O'.
+
+* Texinfo support:
+
+  - Automake can now be instructed to place '.info' files generated from
+    Texinfo input in the builddir rather than in the srcdir; this is done
+    specifying the new automake option 'info-in-builddir'.  This feature
+    was requested by the developers of GCC, GDB, GNU binutils and the GNU
+    bfd library.  See the extensive discussion about automake bug#11034
+    for more details.
+
+  - For quite a long time, Automake has been implementing an undocumented
+    hack which ensured that '.info' files which appeared to be cleaned
+    (by being listed in the CLEANFILES or DISTCLEANFILES variables) were
+    built in the builddir rather than in the srcdir; this hack was
+    introduced to ensure better backward-compatibility with package
+    such as Texinfo, which do things like:
+
+        info_TEXINFOS = texinfo.txi info-stnd.texi info.texi
+        DISTCLEANFILES = texinfo texinfo-* info*.info*
+        # Do not create info files for distribution.
+        dist-info:
+            @:
+
+    in order not to distribute generated '.info' files.
+
+    Now that we have the 'info-in-builddir' option that explicitly causes
+    generated '.info' files to be placed in the builddir, this hack should
+    be longer necessary, so we deprecate it with runtime warnings.
+    It will be removed altogether in Automake 2.0.
+
+* Relative directory in Makefile fragments:
+
+  - The special Automake-time substitutions '%reldir%' and '%canon_reldir%'
+    (and their short versions, '%D%' and '%C%' respectively) can now be used
+    in an included Makefile fragment.  The former is substituted with the
+    relative directory of the included fragment (compared to the top-level
+    including Makefile), and the latter with the canonicalized version of
+    the same relative directory.
+
+        # in 'Makefile.am':
+        bin_PROGRAMS = # will be updated by included Makefile fragments
+        include src/Makefile.inc
+
+        # in 'src/Makefile.inc':
+        bin_PROGRAMS += %reldir%/foo
+        %canon_reldir%_foo_SOURCES = %reldir%/bar.c
+
+    This should be especially useful for packages using a non-recursive
+    build system.
+
+* Deprecated distribution formats:
+
+  - The 'shar' and 'compress' distribution formats are deprecated, and
+    scheduled for removal in Automake 2.0.  Accordingly, the use of the
+    'dist-shar' and 'dist-tarZ' will cause warnings at automake runtime
+    (in the 'obsolete' category), and the recipes of the Automake-generated
+    targets 'dist-shar' and 'dist-tarZ' will unconditionally display
+    (non-fatal) warnings at make runtime.
+
+* New configure runtime warnings about "rm -f" support:
+
+  - To simplify transition to Automake 2.0, the shell code expanded by
+    AM_INIT_AUTOMAKE now checks (at configure runtime) that the default
+    'rm' program in PATH doesn't complain when called without any
+    non-option argument if the '-f' option is given (so that commands like
+    "rm -f" and "rm -rf" act as a no-op, instead of raising usage errors).
+    If this is not the case, the configure script is aborted, to call the
+    attention of the user on the issue, and invite him to fix his PATH.
+    The checked 'rm' behavior is very widespread in the wild, and will be
+    required by future POSIX versions:
+
+        <http://austingroupbugs.net/view.php?id=542>
+
+    The user can still force the configure process to complete even in the
+    presence of a broken 'rm' by defining the ACCEPT_INFERIOR_RM_PROGRAM
+    environment variable to "yes".  And the generated Makefiles should
+    still work correctly even when such broken 'rm' is used.  But note
+    that this will no longer be the case with Automake 2.0 though, so, if
+    you encounter the warning, please report it to us ASAP (and try to fix
+    your environment as well).
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+New in 1.13.4:
+
+* Bugs fixed:
+
+  - Fix a minor regression introduced in Automake 1.13.3: when two or more
+    user-defined suffix rules were present in a single Makefile.am,
+    automake would needlessly include definition of some make variables
+    related to C compilation in the generated Makefile.in (bug#14560).
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+New in 1.13.3:
+
+* Documentation fixes:
+
+  - The documentation no longer mistakenly reports that the obsolete
+    'AM_MKDIR_PROG_P' macro and '$(mkdir_p)' make variable are going
+    to be removed in Automake 2.0.
+
+* Bugs fixed:
+
+  - Byte-compilation of Emacs lisp files could fail spuriously on
+    Solaris,  when /bin/ksh or /usr/xpg4/bin/sh were used as shell.
+
+  - If the same user-defined suffixes were transformed into different
+    Automake-known suffixes in different Makefile.am files in the same
+    project, automake could get confused and generate inconsistent
+    Makefiles (automake bug#14441).
+    For example, if 'Makefile.am' contained a ".ext.cc:" suffix rule,
+    and 'sub/Makefile.am' contained a ".ext.c:" suffix rule, automake
+    would have mistakenly placed into 'Makefile.in' rules to compile
+    "*.c" files into object files, and into 'sub/Makefile.in' rules to
+    compile "*.cc" files into object files --- rather than the other
+    way around.  This is now fixed.
+
+* Testsuite work:
+
+  - The test cases no longer have the executable bit set.  This should
+    make it clear that they are not meant to be run directly; as
+    explained in t/README, they can only be run through the custom
+    'runtest' script, or by a "make check" invocation.
+
+  - The testsuite has seen the introduction of a new helper function
+    'run_make', and several related changes.  These serve a two-fold
+    purpose:
+
+     1. Remove brittleness due to the use of "make -e" in test cases.
+
+     2. Seamlessly allow the use of parallel make ("make -j...") in the
+        test cases, even where redirection of make output is involved
+        (see automake bug#11413 for a description of the subtle issues
+        in this area).
+
+  - Several spurious failures have been fixed (they hit especially
+    MinGW/MSYS builds).  See automake bugs #14493, #14494, #14495,
+    #14498, #14499, #14500, #14501, #14517 and #14528.
 
-  - Autoconf 2.65 or later will be required by the next major Automake
-    version (1.13).  Until now, Automake has required Autoconf version
-    2.62 or later.
+  - Some other minor miscellaneous changes and fixlets.
 
-  - Starting from the next major Automake version (1.13), the rules to
-    build pdf, ps and dvi output from Texinfo input will use the '--tidy'
-    option by default.  Since such an option was introduced in Texinfo
-    4.9, this means that Makefiles generated by future Automake versions
-    will require at least that version of Texinfo.
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+New in 1.13.2:
+
+* Documentation fixes:
+
+  - The long-deprecated but still supported two-arguments invocation form
+    of AM_INIT_AUTOMAKE is documented once again.  This seems the sanest
+    thing to do, given that support for such usage might need to remain
+    in place for an unspecified amount of time in order to cater to people
+    who want to define the version number for their package dynamically at
+    configure runtime (unfortunately, Autoconf does not yet support this
+    scenario, so we cannot delegate the work to it).
+
+  - The serial testsuite harness is no longer reported as "deprecated",
+    but as "discouraged".  We have no plan to remove it, nor to make its
+    use cause runtime warnings.
+
+  - The parallel testsuite is no longer reported as "experimental"; it
+    is well tested, and should be stable now.
+
+  - The 'shar' and 'tarZ' distribution formats and the 'dist-shar' and
+    'dist-tarZ' options are obsolescent, and their use is deprecated
+    in the documentation.
+
+  - Other minor miscellaneous fixes and improvements; in particular,
+    some improvements in cross-references.
+
+* Obsolescent features:
+
+  - Use of suffix-less info files (that can be specified through the
+    '@setfilename' macro in Texinfo input files) is discouraged, and
+    its use will raise warnings in the 'obsolete' category.  Simply
+    use the '.info' extension for all your info files, transforming
+    usages like:
+
+        @setfilename myprogram
+
+    into:
+
+        @setfilename myprogram.info
+
+  - Use of Texinfo input files with '.txi' or '.texinfo' extensions
+    is discouraged, and its use will raise warnings in the 'obsolete'
+    category.  You are advised to simply use the '.texi' extension
+    instead.
+
+* Bugs fixed:
+
+  - When the 'ustar' option is used, the generated configure script no
+    longer risks hanging during the tests for the availability of the
+    'pax' utility, even if the user running configure has a UID or GID
+    that requires more than 21 bits to be represented.
+    See automake bug#8343 and bug#13588.
+
+  - The obsolete macros AM_CONFIG_HEADER or AM_PROG_CC_STDC work once
+    again, as they did in Automake 1.12.x (albeit printing runtime
+    warnings in the 'obsolete' category).  Removing them has turned
+    out to be a very bad idea, because it complicated distro packing
+    enormously.  Making them issue fatal warnings, as we did in
+    Automake 1.13, has turned out to be a similarly very bad idea,
+    for exactly the same reason.
+
+  - aclocal will no longer error out if the first local m4 directory
+    (as specified by the '-I' option or the 'AC_CONFIG_MACRO_DIRS' or
+    'AC_CONFIG_MACRO_DIR' macros) doesn't exist; it will merely report
+    a warning in the 'unsupported' category.  This is done to support
+    some pre-existing real-world usages.  See automake bug#13514.
+
+  - aclocal will no longer consider directories for extra m4 files more
+    than once, even if they are specified multiple times.  This ensures
+    packages that specify both
+
+        AC_CONFIG_MACRO_DIR([m4])       in configure.ac
+        ACLOCAL_AMFLAGS = -I m4         in Makefile.am
+
+    will work correctly, even when the 'm4' directory contains no
+    package-specific files, but is used only to install third-party
+    m4 files (as can happen with e.g., "libtoolize --install").
+    See automake bug#13514.
+
+  - Analysis of make flags in Automake-generated rules has been made more
+    robust, and more future-proof.  For example, in presence of make that
+    (like '-I') take an argument, the characters in said argument will no
+    longer be spuriously considered as a set of additional make options.
+    In particular, automake-generated rules will no longer spuriously
+    believe to be running in dry mode ("make -n") if run with an invocation
+    like "make -I noob"; nor will they believe to be running in keep-going
+    mode ("make -k") if run with an invocation like "make -I kool"
+    (automake bug#12554).
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
-  - Starting from the next major Automake version (1.13), the parallel
-    testsuite harness (previously only enabled by the 'parallel-tests'
-    option) will become the default one; the older serial testsuite
-    harness will still be available through the use of the 'serial-tests'
-    option.
+New in 1.13.1:
 
-  - The following long-obsolete m4 macros will be removed in the
-    next major Automake version (1.13):
+* Bugs fixed:
+
+  - Use of the obsolete macros AM_CONFIG_HEADER or AM_PROG_CC_STDC now
+    causes a clear and helpful error message, instead of obscure ones
+    (issue introduced in Automake 1.13).
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+New in 1.13:
+
+* Bugs fixed:
+
+  - ylwrap renames properly header guards in generated header files
+    (*.h), instead of leaving Y_TAB_H.
+
+  - ylwrap now also converts header guards in implementation files
+    (*.c).  Because ylwrap failed to rename properly #include in the
+    implementation files, current versions of Bison (e.g., 2.7)
+    duplicate the generated header file in the implementation file.
+    The header guard then protects the implementation file from
+    duplicate definitions from the header file.
+
+* Version requirements:
+
+  - Autoconf 2.65 or greater is now required.
+
+  - The rules to build PDF and DVI output from Texinfo input now
+    require Texinfo 4.9 or later.
+
+* Obsolete features:
+
+  - Support for the "Cygnus-style" trees (once enabled by the 'cygnus'
+    option) has been removed.  See discussion about automake bug#11034
+    for more background: <http://debbugs.gnu.org/11034>.
+
+  - The deprecated aclocal option '--acdir' has been removed.  You
+    should use the options '--automake-acdir' and '--system-acdir'
+    instead (which have been introduced in Automake 1.11.2).
+
+  - The following long-obsolete m4 macros have been removed:
 
       AM_PROG_CC_STDC:    superseded by AC_PROG_CC since October 2002
       fp_PROG_CC_STDC:    broken alias for AM_PROG_CC_STDC
@@ -38,21 +550,323 @@ New in 1.12.1:
                           of the now-removed automatic de-ANSI-fication
                           support of Automake)
 
-  - All the "old alias" macros in 'm4/obsolete.m4' will be removed in
-    the next major Automake version (1.13).
+  - All the "old alias" macros in 'm4/obsolete.m4' have been removed.
+
+  - Use of the long-deprecated two- and three-arguments invocation forms
+    of the AM_INIT_AUTOMAKE is no longer documented.  It's still supported
+    though (albeit with a warning in the 'obsolete' category), to cater
+    for people who want to define the version number for their package
+    dynamically (e.g., from the current VCS revision).  We'll have to
+    continue this support until Autoconf itself is fixed to allow better
+    support for such dynamic version numbers.
+
+* Elisp byte-compilation:
+
+  - The byte compilation of '.el' files into '.elc' files is now done
+    with a suffix rule.  This has simplified the compilation process, and
+    more importantly made it less brittle.  The downside is that emacs is
+    now invoked once for each '.el' files, which cause some noticeable
+    slowdowns.  These should however be mitigated on multicore machines
+    (which are becoming the norm today) if concurrent  make ("make -j")
+    is used.
+
+  - Elisp files placed in a subdirectory are now byte-compiled to '.elc'
+    files in the same subdirectory; for example, byte-compiling of file
+    'sub/foo.el' file will result in 'sub/foo.elc' rather than in
+    'foo.elc'.  This behaviour is backward-incompatible with older
+    Automake versions, but it is more natural and more sane.  See also
+    automake bug#7441.
+
+  - The Emacs invocation performing byte-compilation of '.el' files honors
+    the $(AM_ELCFLAGS) and $(ELCFLAGS) variables; as typical, the former
+    one is  developer-reserved and the latter one user-reserved.
+
+  - The 'elisp-comp' script, once provided by Automake, has been rendered
+    obsoleted by the just-described changes, and thus removed.
+
+* Changes to Automake-generated testsuite harnesses:
+
+  - The parallel testsuite harness (previously only enabled by the
+    'parallel-tests' option) is the default one; the older serial
+    testsuite harness will still be available through the use of the
+    'serial-tests' option (introduced in Automake 1.12).
+
+  - The 'color-tests' option is now unconditionally activated by default.
+    In particular, this means that testsuite output is now colorized by
+    default if the attached terminal seems to support ANSI escapes, and
+    that the user can force output colorization by setting the variable
+    AM_COLOR_TESTS to "always".  The 'color-tests' is still recognized
+    for backward-compatibility, although it's a handled as a no-op now.
+
+* Silent rules support:
+
+  - Support for silent rules is now always active in Automake-generated
+    Makefiles.  So, although the verbose output is still the default,
+    the user can now always use "./configure --enable-silent-rules" or
+    "make V=0" to enable quieter output in the package he's building.
 
-  - Support for the two- and three-arguments invocation forms of the
-    AM_INIT_AUTOMAKE macro will be deprecated in the next minor version
-    of Automake (1.12.1) and removed in the next major version (1.13).
+  - The 'silent-rules' option has now become a no-op, preserved for
+    backward-compatibility only.  In particular, its use no longer
+    disables the warnings in the 'portability-recursive' category.
 
-  - The '--acdir' option of aclocal is deprecated, and will probably
-    be removed in the next major Automake release (1.13).  You should
-    use the options '--automake-acdir' and '--system-acdir' instead
-    (which have been introduced in Automake 1.11.2).
+* Texinfo Support:
 
-  - The exact order in which the directories in the aclocal macro
-    search path are looked up is probably going to be changed in the
-    next Automake release (1.13).
+  - The rules to build PDF and DVI files from Texinfo input now require
+    Texinfo 4.9 or later.
+
+  - The rules to build PDF and DVI files from Texinfo input now use the
+    '--build-dir' option, to keep the auxiliary files used by texi2dvi
+    and texi2pdf around without cluttering the build directory, and to
+    make it possible to run the "dvi" and "pdf" recipes in parallel.
+
+* Automatic remake rules and 'missing' script:
+
+  - The 'missing' script no longer tries to update the timestamp of
+    out-of-date files that require a maintainer-specific tool to be
+    remade, in case the user lacks such a tool (or has a too-old version
+    of it).  It just gives a useful warning, and in some cases also a
+    tip about how to obtain such a tool.
+
+  - The missing script has thus become useless as a (poor) way to work
+    around the sketched-timestamps issues that can happen for projects
+    that keep generated files committed in their VCS repository.  Such
+    projects are now encouraged to write a custom "fix-timestamps.sh"
+    script to avoid such issues; a simple example is provided in the
+    "CVS and generated files" chapter of the automake manual.
+
+* Recursive targets:
+
+  - The user can now define his own recursive targets that recurse
+    in the directories specified in $(SUBDIRS).  This can be done by
+    specifying the name of such targets in invocations of the new
+    'AM_EXTRA_RECURSIVE_TARGETS' m4 macro.
+
+* Tags:
+
+  - Any failure in the recipe of the "tags", "ctags", "cscope" or
+    "cscopelist" targets in a subdirectory is now propagated to the
+    top-level make invocation.
+
+  - Tags are correctly computed also for files in _SOURCES variables that
+    only list files with non-standard suffixes (see automake bug#12372).
+
+* Improvements to aclocal and related rebuilds rules:
+
+  - Autoconf-provided macros AC_CONFIG_MACRO_DIR and AC_CONFIG_MACRO_DIRS
+    are now traced by aclocal, and can be used to declare the local m4
+    include directories.  Formerly, one had to specify it with an explicit
+    '-I' option to the 'aclocal' invocation.
+
+  - The special make variable ACLOCAL_AMFLAGS is deprecated; future
+    Automake versions will warn about its use, and later version will
+    remove support for it altogether.
+
+* The depcomp script:
+
+  - Dropped support for libtool 1.4.
+
+  - Various internal refactorings.  They should cause no visible change,
+    but the chance for regression is there anyway, so please report any
+    unexpected or suspicious behaviour.
+
+  - Support for pre-8.0 versions of the Intel C Compiler has been dropped.
+    This should cause no problem, since icc 8.0 has been released in
+    December 2003 -- almost nine years ago.
+
+  - Support for tcc (the Tiny C Compiler) has been improved, and is now
+    handled through a dedicated 'tcc' mode.
+
+* The ylwrap script:
+
+  - ylwrap generates header guards with a single '_' for series of non
+    alphabetic characters, instead of several.  This is what Bison >=
+    2.5.1 does.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+Bugs fixed in 1.12.6:
+
+* Python-related bugs:
+
+  - The default installation location for python modules has been improved
+    for Python 3 on Debian and Ubuntu systems, changing from:
+
+        ${prefix}/lib/python3/dist-packages
+
+    to
+
+        ${prefix}/lib/python3.x/site-packages
+
+    This change should ensure modules installed using the default ${prefix}
+    "/usr/local" are found by default by system python 3.x installations.
+    See automake bug#10227.
+
+  - Python byte-compilation supports the new layout mandated by PEP-3147,
+    with its __pycache__ directory (automake bug#8847).
+
+* Build system issues:
+
+  - The maintainer rebuild rules for Makefiles and aclocal.m4 in
+    Automake's own build system works correctly again (bug introduced
+    in Automake 1.12.5).
+
+* Testsuite issues:
+
+  - The Vala-related tests has been changed to adjust to the removal of
+    the 'posix' profile in the valac compiler.  See automake bug#12934
+    a.k.a. bug#12522.
+
+  - Some spurious testsuite failures related to older tools and systems
+    have been fixed.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+New in 1.12.5:
+
+* Vala support:
+
+  - The AM_PROG_VALAC macro has been enhanced to takes two further
+    optional arguments; it's signature now being
+
+        AM_PROG_VALAC([MINIMUM-VERSION], [ACTION-IF-FOUND],
+                      [ACTION-IF-NOT-FOUND])
+
+  - By default, AM_PROG_VALAC no longer aborts the configure invocation
+    if the Vala compiler found is too old, but simply prints a warning
+    messages (as it did when the Vala compiler was not found).  This
+    should avoid unnecessary difficulties for end users that just want
+    to compile the unmodified, distributed Vala-generated C sources,
+    but happens to have an old Vala compiler in their PATH.  This fixes
+    automake bug#12688.
+
+  - If no proper Vala compiler is found at configure runtime, AM_PROG_VALAC
+    will set the AC_SUBST'd variable 'VALAC' to 'valac' rather than to ':'.
+    This is a better default, because with it a triggered makefile rule
+    invoking a Vala compilation will clearly fail with an informative error
+    message like "valac: command not found", rather than silently, with
+    the error possibly going unnoticed or triggering harder-to-diagnose
+    fallout failures in later steps.
+
+* Miscellaneous changes:
+
+  - automake and aclocal no longer honours the 'perllibdir' environment
+    variable.  That had always been intended only as an hack required in
+    the testsuite, not meant for any use beyond that.
+
+Bugs fixed in 1.12.5:
+
+* Long-standing bugs:
+
+  - Automake no longer generates spurious remake rules invoking autoheader
+    to regenerate the template corresponding to header files specified after
+    the first one in AC_CONFIG_HEADERS (automake bug#12495).
+
+  - When wrapping Microsoft tools, the 'compile' script falls back to
+    finding classic 'libname.a' style libraries when 'name.lib' and
+    'name.dll.lib' aren't available.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+New in 1.12.4:
+
+* Warnings and deprecations:
+
+  - Warnings in the 'obsolete' category are enabled by default both in
+    automake and aclocal.
+
+* Miscellaneous changes:
+
+  - Some testsuite weaknesses and spurious failures have been fixed.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+New in 1.12.3:
+
+* Miscellaneous changes:
+
+  - The '.m4' files provided by Automake no longer define serial numbers.
+    This should cause no difference in the behaviour of aclocal though.
+
+  - Some testsuite weaknesses and spurious failures have been fixed.
+
+  - There is initial support for automatic dependency tracking with the
+    Portland Group C/C++ compilers, thanks to the new new depmode 'pgcc'.
+
+Bugs fixed in 1.12.3:
+
+* Long-standing bugs:
+
+  - Instead of renaming only self-references of files (typically for
+    #lines), ylwrap now also renames references to the other generated
+    files.  This fixes support for GLR and C++ parsers from Bison (PR
+    automake/491 and automake bug#7648): 'parser.c' now properly
+    #includes 'parser.h' instead of 'y.tab.h'.
+
+  - Generated files unknown to ylwrap are now preserved.  This fixes
+    C++ support for Bison (automake bug#7648): location.hh and the
+    like are no longer discarded.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+New in 1.12.2:
+
+* Warnings and deprecations:
+
+  - Automake now issues a warning (in the 'portability' category) if
+    'configure.in' is used instead of 'configure.ac' as the Autoconf
+    input file.  Such a warning will also be present in the next
+    Autoconf version (2.70).
+
+* Cleaning rules:
+
+  - Recursive cleaning rules descends into the $(SUBDIRS) in the natural
+    order (as done by the other recursive rules), rather than in the
+    inverse order.  They used to do that in order to work a round a
+    limitation in an older implementation of the automatic dependency
+    tracking support, but that limitation had been lifted years ago
+    already, when the automatic dependency tracking based on side-effects
+    of compilation had been introduced.
+
+  - Cleaning rules for compiled objects (both "plain" and libtool) work
+    better when subdir objects are involved, not triggering a distinct
+    'rm' invocation for each such object.  They do so by removing *any*
+    compiled object file that is in the same directory of a subdir
+    object.  See automake bug#10697.
+
+* Silent rules support:
+
+  - A new predefined $(AM_V_P) make variable is provided; it expands
+    to a shell conditional that can be used in recipes to know whether
+    make is being run in silent or verbose mode.
+
+Bugs fixed in 1.12.2:
+
+* SECURITY VULNERABILITIES!
+
+  - The 'distcheck' recipe no longer grants temporary world-write
+    permissions on the extracted distdir.  Even if such rights were
+    only granted for a vanishingly small time window, the implied
+    race condition proved to be enough to allow a local attacker
+    to run arbitrary code with the privileges of the user running
+    "make distcheck".  This is CVE-2012-3386.
+
+* Long-standing bugs:
+
+  - The "recheck" targets behaves better in the face of build failures
+    related to previously failed tests.  For example, if a test is a
+    compiled program that must be rerun by "make recheck", and its
+    compilation fails, it will still be rerun by further "make recheck"
+    invocations.  See automake bug#11791.
+
+* Bugs introduced by 1.12.1:
+
+  - Automake provides once again the '$(mkdir_p)' make variable and the
+    '@mkdir_p@' substitution (both as simple aliases for '$(MKDIR_P)'),
+    for better backward-compatibility.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+New in 1.12.1:
 
 * New supported languages:
 
@@ -63,8 +877,8 @@ New in 1.12.1:
 
   - Use of the long-deprecated two- and three-arguments invocation forms
     of the AM_INIT_AUTOMAKE macro now elicits a warning in the 'obsolete'
-    category.  Starting from the next major Automake release (1.13), such
-    usages won't be allowed anymore.
+    category.  Starting from some future major Automake release (likely
+    post-1.13), such usages will no longer be allowed.
 
   - Support for the "Cygnus-style" trees (enabled by the 'cygnus' option) is
     now deprecated (its use triggers a warning in the 'obsolete' category).
@@ -73,18 +887,17 @@ New in 1.12.1:
   - The long-obsolete (since 1.10) automake-provided $(mkdir_p) make
     variable, @mkdir_p@ configure-time substitution and AM_PROG_MKDIR
     m4 macro are deprecated, eliciting a warning in the 'obsolete'
-    category.  They will be removed in the next major version (1.13).
+    category.
 
 * Miscellaneous changes:
 
   - The Automake test cases now require a proper POSIX-conforming shell.
-    Older non-POSIX Bourne shells (like Solaris 10 /bin/sh) won't be
-    accepted anymore.  In most cases, the user shouldn't have to specify
-    such POSIX shell explicitly, since it will be looked up at configure
-    time.  Still, when this lookup fails, or when the user wants to
-    override its conclusion, the variable 'AM_TEST_RUNNER_SHELL' can be
-    used (pointing to the shell that will be used to run the Automake
-    test cases).
+    Older non-POSIX Bourne shells (like Solaris 10 /bin/sh) will no longer
+    be accepted.  In most cases, the user shouldn't have to specify such
+    POSIX shell explicitly, since it will be looked up at configure time.
+    Still, when this lookup fails, or when the user wants to override its
+    conclusion, the variable 'AM_TEST_RUNNER_SHELL' can be used (pointing
+    to the shell that will be used to run the Automake test cases).
 
 Bugs fixed in 1.12.1:
 
@@ -190,7 +1003,7 @@ New in 1.12:
     the '--add-missing' option, or manually copy the 'test-driver' script
     into their tree.  The second, and more important, implication is that
     now, when the 'parallel-tests' option is in use, TESTS_ENVIRONMENT can
-    not be used anymore to define a test runner, and the command specified
+    no longer be used to define a test runner, and the command specified
     in LOG_COMPILER (and <ext>_LOG_COMPILER) must be a *real* executable
     program or script.  For example, this is still a valid usage (albeit
     a little contorted):
@@ -203,7 +1016,7 @@ New in 1.12:
         fi;
       LOG_COMPILER = $(SHELL) $$maybe_errexit
 
-    while this is not anymore:
+    OTOH, this is no longer a valid usage:
 
       TESTS_ENVIRONMENT = \
         $(SHELL) `test -n '$(STRICT_TESTS_CHECKING)' && echo ' -e'`
@@ -304,9 +1117,9 @@ Bugs fixed in 1.12:
   - The AM_COND_IF macro also works if the shell expression for the
     conditional is no longer valid for the condition.
 
-  - The automake-provided parallel testsuite harness does not fail anymore
-    with BSD make used in parallel mode when there are test scripts in a
-    subdirectory, like in:
+  - The automake-provided parallel testsuite harness no longer fails
+    with BSD make used in parallel mode when there are test scripts in
+    subdirectory, like in:
 
       TESTS = sub/foo.test sub/bar.test
 
@@ -381,7 +1194,7 @@ Bugs fixed in 1.11.4:
 * Bugs introduced by 1.11.2:
 
   - A definition of 'noinst_PYTHON' before 'python_PYTHON' (or similar)
-    don't cause spurious failures upon "make install" anymore.
+    no longer cause spurious failures upon "make install".
 
   - The user can now instruct the 'uninstall-info' rule not to update
     the '${infodir}/dir' file by exporting the environment variable
@@ -399,9 +1212,9 @@ Bugs fixed in 1.11.4:
     '-I' is non-existent, aclocal will now create it before trying to copy
     files in it.
 
-  - An empty declaration of a "foo_PRIMARY" don't cause anymore the
-    generated install rules to create an empty $(foodir) directory;
-    for example, if Makefile.am contains something like:
+  - An empty declaration of a "foo_PRIMARY" no longer cause the generated
+    install rules to create an empty $(foodir) directory; for example, if
+    Makefile.am contains something like:
 
       pkglibexec_SCRIPTS =
       if FALSE
@@ -419,15 +1232,15 @@ New in 1.11.3:
   - Automake's own build system is more silent by default, making use of
     the 'silent-rules' option.
 
-  - The master copy of the `gnupload' script is now maintained in gnulib,
+  - The master copy of the 'gnupload' script is now maintained in gnulib,
     not in automake.
 
-  - The `missing' script doesn't try to wrap calls to `tar' anymore.
+  - The 'missing' script no longer tries to wrap calls to 'tar'.
 
-  - "make dist" doesn't wrap `tar' invocations with the `missing' script
-    anymore.  Similarly, the obsolescent variable `$(AMTAR)' (which you
-    shouldn't be using BTW ;-) does not invoke the missing script anymore
-    to wrap tar, but simply invokes the `tar' program itself.
+  - "make dist" no longer wraps 'tar' invocations with the 'missing'
+    script.  Similarly, the obsolescent variable '$(AMTAR)' (which you
+    shouldn't be using BTW ;-) no longer invokes the 'missing' script
+    to wrap tar, but simply invokes the 'tar' program itself.
 
   - "make dist" can now create lzip-compressed tarballs.
 
@@ -453,24 +1266,24 @@ Bugs fixed in 1.11.3:
 * Bugs introduced by 1.11.2:
 
   - Automake now correctly recognizes the prefix/primary combination
-   `pkglibexec_SCRIPTS' as valid.
+   'pkglibexec_SCRIPTS' as valid.
 
-  - The parallel-tests harness doesn't trip anymore on sed implementations
+  - The parallel-tests harness no longer trips on sed implementations
     with stricter limits on the length of input lines (problem seen at
     least on Solaris 8).
 
 * Long-standing bugs:
 
   - The "deleted header file problem" for *.am files is avoided by stub
-    rules.  This allows `make' to trigger a rerun of `automake' also if
-    some previously needed `.am' file has been removed.
+    rules.  This allows 'make' to trigger a rerun of 'automake' also if
+    some previously needed '.am' file has been removed.
 
-  - The `silent-rules' option now generates working makefiles even
-    for the uncommon `make' implementations that do not support the
-    nested-variables extension to POSIX 2008.  For such `make'
+  - The 'silent-rules' option now generates working makefiles even
+    for the uncommon 'make' implementations that do not support the
+    nested-variables extension to POSIX 2008.  For such 'make'
     implementations, whether a build is silent is determined at
     configure time, and cannot be overridden at make time with
-    `make V=0' or `make V=1'.
+    "make V=0" or "make V=1".
 
   - Vala support now works better in VPATH setups.
 
@@ -1102,8 +1915,8 @@ New in 1.9:
     tar-pax.  The new option filename-length-max=99 helps diagnosing
     filenames that are too long for tar-v7.  (PR/414)
 
-  - Variables aumented with `+=' are now automatically flattened (i.e.,
-    trailing backslashes removed) and then wrapped around 80 colummns
+  - Variables augmented with `+=' are now automatically flattened (i.e.,
+    trailing backslashes removed) and then wrapped around 80 columns
     (adding trailing backslashes).  In previous versions, a long series
     of
       VAR += value1
@@ -1622,7 +2435,7 @@ New in 1.8:
     rule for this target.  Running `automake -Woverride' will diagnose
     all such overriding definitions.
 
-    It should be noted that almost all these targets support a *-local
+    It should be noted that almost all of these targets support a *-local
     variant that is meant to supplement the automake-defined rule
     (See node `Extending' in the manual).  The above rule should
     be rewritten as
@@ -2123,7 +2936,7 @@ New in 0.20:
 
 -----
 
-Copyright (C) 1995-2012 Free Software Foundation, Inc.
+Copyright (C) 1995-2017 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
diff --git a/PLANS/README b/PLANS/README
new file mode 100644 (file)
index 0000000..87cb8dc
--- /dev/null
@@ -0,0 +1,25 @@
+"Plans" for future or on-going Automake development.
+
+The contents is meant to help ensure a more controlled and smooth
+development and evolution for Automake, in several ways.
+
+ - Having the plans clearly spelled out should will avoid messy
+   roadmaps with no clear way forward or with muddy or ill-defined
+   aims or purposes; a trap this is too easy to fall into.
+
+ - Keeping planned changes cooking and re-hashed for a while should
+   ensure rough edges are smoothed up, transitions are planned in a
+   proper way (hopefully avoiding debacles like the AM_MKDIR_PROG_P
+   deprecation and the AM_CONFIG_HEADER too-abrupt removal), and
+   "power users" have more chances of getting informed in due time,
+   thus having all the time to prepare for the changes or raise
+   objections against them.
+
+ - Having the plans clearly stated and registered in a "centralized"
+   location should make it more difficult to them to slip through
+   the cracks, getting forgotten or (worse) only half-implemented.
+
+ - Even for discussions and plans registered on the Bug Tracker
+   as well, a corresponding entry in the PLANS directory can help
+   in keeping main ideas summarized, and consensus and/or objections
+   registered and easily compared.
diff --git a/PLANS/obsolete-removed/am-prog-mkdir-p.txt b/PLANS/obsolete-removed/am-prog-mkdir-p.txt
new file mode 100644 (file)
index 0000000..20d5cf5
--- /dev/null
@@ -0,0 +1,62 @@
+The macro AM_PROG_MKDIR_P is no longer going to be removed from Automake.
+Let's see a bit of history to understand why.
+
+I had already scheduled the removal of the long-deprecated AM_PROG_MKDR_P
+macro (superseded by the Autoconf-provided one AC_PROG_MKDIR_P) for
+Automake 1.13 -- see commit 'v1.12-20-g8a1c64f'.
+
+Alas, it turned out the latest Gettext version at the time (0.18.1.1) was
+still using that macro:
+
+  <http://lists.gnu.org/archive/html/automake/2012-09/msg00010.html>
+
+And since the maintenance of Gettext was stalled, I couldn't get a fix
+committed and released in time for the appearance of Automake 1.13:
+
+  <http://lists.gnu.org/archive/html/bug-gettext/2012-04/msg00018.html>
+  <http://lists.gnu.org/archive/html/bug-gettext/2012-06/msg00012.html>
+  <http://lists.gnu.org/archive/html/bug-gettext/2012-10/msg00001.html>
+
+So, on strong advice by Jim Meyering, in commit 'v1.12.4-158-gdf23daf'
+I re-introduced AM_PROG_MKDIR_P in Automake (thanks to Jim for having
+convinced me to do so in time!)
+
+But then, Gettext (as said, the greatest "offender" in the use of
+AM_PROG_MKDIR_P), in its latest release 0.18.2, finally removed all the
+uses of that macro still present in its code base.  Yay.  So I thought
+we could finally and quite safely remove AM_PROG_MKDIR_P in Automake 1.14;
+and I proceeded to do so, see commit 'v1.13-30-gd01834b' and the merge
+commit 'v1.13-5-gb373ad9'.  Well, it turned out I was wrong, again, and
+in a trickier and sublter way this time.  Let's see the details.
+
+If a package's 'configure.ac' contains a call like:
+
+    AM_GNU_GETTEXT_VERSION([0.18])
+
+then the 'autopoint' script will bring the data files from the Gettext
+release *1.18* into the package's tree -- yes, even even if the developer
+has installed *and is using* Gettext 1.18.2!  Now, these data files
+comprise m4 files (that will be seen by subsequent aclocal and autoconf
+calls), and of course, the pre-0.18.2 version of some of these files
+still contains occurrences of AM_PROG_MKDIR_P -- so Automake 1.13 errors
+out, and we lose.  That already happened in practice:
+
+    <http://lists.gnu.org/archive/html/bug-grep/2013-01/msg00003.html>
+
+Moreover, while I might see it as not unreasonable to ask a developer
+using Automake 2.0 to also update Gettext to 1.18.2, that would not
+be enough; in order for gettext to use the correct data files, that
+developer would have to update his configure.ac to read:
+
+    AM_GNU_GETTEXT_VERSION([0.18.2])
+
+thus requiring *all* of his co-developers to install Gettext 1.18.2,
+even if they are still using, say, Automake 1.13 or 1.14.  Bad.
+
+So I decided to re-instate this macro as a simple alias for AC_PROG_MKDIR_P
+(plus a non-fatal runtime warning in the 'obsolete' category), and drop
+any plan to remove it (see how much good those plans have done us so far).
+See commit v1.13.1-109-g030ecb4.
+
+Similarly, the obsolete '@mkdir_p@' substitution and '$(mkdir_p)' make
+variable are still supported, as simple aliases to '$(MKDIR_P)'.
diff --git a/PLANS/obsolete-removed/configure.in.txt b/PLANS/obsolete-removed/configure.in.txt
new file mode 100644 (file)
index 0000000..d3f6da7
--- /dev/null
@@ -0,0 +1,28 @@
+In Automake 1.13.x (once planned, then dropped)
+-----------------------------------------------
+
+We are already warning about 'configure.in' used as the name for the
+Autoconf input file ('configure.ac' should be used instead); we've
+been doing that since Automake 1.12.4.
+
+We had scheduled to remove support for it altogether in Automake 1.13
+(and announced that in our NEWS file), because we thought that Autoconf
+too would have started deprecating it by the time our 1.13 release was
+done.  Alas, this hasn't been the case: the deprecation code is only
+present in the development version of autoconf so far (scheduled to
+become Autoconf 2.70).  So ...
+
+
+For Automake 2.0
+----------------
+
+... we have decided to wait until 2.70 is out before really removing
+'configure.in' support.  Since we plan to require Autoconf 2.70 in
+Automake 2.0 (so that we can remove the hacky code emulating
+AC_CONFIG_MACRO_DIRS for older autoconf versions), we are quite sure
+that Autoconf will actually have started deprecating 'configure.in'
+by the time Automake 2.0 is released.
+
+Note that the removal of 'configure.in' has already been implemented
+in our 'master' branch (from where the 2.0 release will be finally
+cut); see commits 'v1.13-17-gbff57c8' and 'v1.13-21-g7626e63'.
diff --git a/PLANS/rm-f-without-args.txt b/PLANS/rm-f-without-args.txt
new file mode 100644 (file)
index 0000000..b940fc3
--- /dev/null
@@ -0,0 +1,40 @@
+Summary
+-------
+
+POSIX will say in a future version that calling "rm -f" with no argument
+is OK; and this sensible behaviour seem to be already very widespread in
+"the wild" (and possibly lacking only on those systems that are well on
+their way to obsolescence).
+
+Se we'd like to simplify several automake-generated "cleaning" rules
+accordingly, to get rid of the awful idiom:
+
+  test -z "$(VAR)" || rm -f $(VAR)
+
+See automake bug#10828.
+
+For Automake 1.14 (DONE)
+------------------------
+
+Add a temporary "probe check" in AM_INIT_AUTOMAKE that verifies that
+the no-args "rm -f" usage is supported on the system configure is
+being run on; complain loudly if this is not the case, and tell the
+user to report the situation to us.
+
+For Automake 2.0
+----------------
+
+Make any failure in the configure-time probe check introduced by the
+previous point fatal; and in case of failure, also suggest to the user
+to install an older version of GNU coreutils to work around the
+limitation of his system (this version should be old enough not to
+be bootstrapped with Automake 2.0, otherwise the user will face a
+bootstrapping catch-22).
+
+In all our recipes, start assuming "rm -f" with no argument is OK;
+simplify and de-uglify the recipes accordingly.
+
+For Automake 3.0
+----------------
+
+Remove the runtime probe altogether.
diff --git a/PLANS/subdir-objects.txt b/PLANS/subdir-objects.txt
new file mode 100644 (file)
index 0000000..3cf6101
--- /dev/null
@@ -0,0 +1,71 @@
+Summary
+-------
+
+We want to make the behaviour currently enabled by the 'subdir-objects'
+the default one, and in fact the *only* one, in Automake 2.0.
+See automake bug#13378: <http://debbugs.gnu.org/13378>.
+
+Sadly, **THIS IS IMPOSSIBLE** until automake bug#13928 is resolved:
+http://debbugs.gnu.org/cgi/bugreport.cgi?bug=13928
+
+Details
+-------
+
+The fact that Automake-generated Makefiles place compiled object files in
+the current directory by default, also when the corresponding source file
+is in a subdirectory, is basically an historical accident, due to the fact
+that the 'subdir-objects' option had only been introduced in April 1999,
+starting with commit 'user-dep-gen-branchpoint-56-g88b5959', and never
+made the default (likely to avoid backwards-compatibility issues).
+
+Since I believe the behaviour enabled by the 'subdir-objects' is the most
+useful one, and in fact the *only* natural one, I'd like to make it the
+only one available, simplifying the Automake implementation and APIs a
+little in the process.
+
+Alas, since this also means changing the default behaviour of Automake
+('subdir-objects' is not enabled by default, sadly), this means the
+transition path will be less smooth than I'd like.
+
+DONE for automake 1.13.2
+------------------------
+
+The bug spotted by Nick Bowler:
+
+  <http://debbugs.gnu.org/cgi/bugreport.cgi?bug=13378#35>
+  <http://debbugs.gnu.org/cgi/bugreport.cgi?bug=13378#44>
+
+and exposed in test case 't/ccnoco4.sh' has been fixed (see commit
+v1.13.1-56-g34001a9).  The bug was due to the fact that Automake-generated
+C compilation rules mistakenly passed the "-c -o" options combination
+unconditionally (even to losing compiler) when the 'subdir-objects' was
+used but sources were only present in the top-level directory.
+
+DONE for automake 1.14
+----------------------
+
+We give a warning in the category 'unsupported' if the 'subdir-objects'
+option is not specified.  This should give the users enough forewarning
+about the planned change, and give them time to update their packages
+to the new semantic.
+
+We also make sure to avoid the warning when it would be irrelevant, i.e.,
+if all source files sit in "current" directory (thanks to Peter Johansson
+for suggesting this).
+
+For some automake 1.x (*before* 2.0 can be released)
+----------------------------------------------------
+
+Find a proper way to fix the blocking automake bug#13928:
+http://debbugs.gnu.org/cgi/bugreport.cgi?bug=13928
+
+For automake 2.0
+----------------
+
+Make the behaviour once activated by the 'subdir-object' option mandatory.
+With that change, we'll drop support for the "old" behaviour of having
+object files derived from sources in a subdirectory being placed in the
+current directory rather than in that same subdirectory.
+
+Still keep the 'subdir-objects' option supported (as a simple no-op
+now), to save useless churn in our user's build systems.
diff --git a/PLANS/texi/drop-split-info-files.txt b/PLANS/texi/drop-split-info-files.txt
new file mode 100644 (file)
index 0000000..a0a5636
--- /dev/null
@@ -0,0 +1,27 @@
+For in Automake 2.0 (DONE)
+--------------------------
+
+We will drop split info files in Automake 2.0.
+See automake bug#13351: <http://debbugs.gnu.org/13351>.
+
+Basically, it has been confirmed that the original reason behind
+the existence of split info files was indeed "efficiency,
+especially memory size":
+<http://lists.gnu.org/archive/html/texinfo-devel/2012-08/msg00024.html>
+
+So split info files have lost their reason d'etre on modern systems
+(where even Emacs has become a lightweight program ;-).  And you are
+not using an embedded system to read Info documentation, right?
+
+In addition, it appears that the use of split info files (at least
+the way Automake-generated rules have been handling them for a long
+time) can cause real problems in some (admittedly quite corner-case)
+situations; see automake bug#12320: <http://debbugs.gnu.org/12320>.
+
+This change should be completely transparent to the developer (no
+adjustments needed to be made to Makefile.am or other parts of the
+build system).  In case some CI system or overly picky build script
+used to rely on that feature, they'll have to be adjusted; but that
+is expected to be a rare occurrence, and thus a price worth pay for
+the nice simplifications and the fixlets this planned change will
+offer us.
diff --git a/PLANS/texi/warnings-for-automake-ng-compatibility.txt b/PLANS/texi/warnings-for-automake-ng-compatibility.txt
new file mode 100644 (file)
index 0000000..aca46b4
--- /dev/null
@@ -0,0 +1,21 @@
+Done in automake 1.13.2:
+------------------------
+
+I have discouraged the use of '.txi' and '.texinfo' suffixes for
+Texinfo inputs (see commit 'v1.13.1-6-ge1ed314') and the generation
+of suffix-less info files (commit 'v1.13.1-4-g2af418d').
+
+This is done to ease transition to Automake-NG (see commits
+'v1.12.1-416-gd5459b9' and 'v1.12.1-392-ga0c7b6a' there), and
+(to a lesser degree) to discourage use of seldom-tested setups.
+
+
+The Future:
+-----------
+
+I have no plans to do the further step of removing support for those
+usages in future Automake versions.  That would be a gratuitous
+incompatibility (in Automake-NG, they have been useful because have
+allowed further refactorings and improvements, but those were
+based on GNU make features, and as such have no place in mainline
+Automake).
diff --git a/THANKS b/THANKS
index 01b78c1..9b9faa1 100644 (file)
--- a/THANKS
+++ b/THANKS
@@ -6,7 +6,8 @@ Adam J. Richter                 adam@yggdrasil.com
 Adam Mercer                     ramercer@gmail.com
 Adam Sampson                    ats@offog.org
 Adrian Bunk                     bunk@fs.tum.de
-Akim Demaille                   akim@freefriends.org
+Aharon Robbins                  arnold@skeeve.com
+Akim Demaille                   akim@gnu.org
 Alan Modra                      amodra@bigpond.net.au
 Alex Hornby                     alex@anvil.co.uk
 Alex Unleashed                  unledev@gmail.com
@@ -17,6 +18,7 @@ Alexander Turbov                zaufi@sendmail.ru
 Alexandre Duret-Lutz            duret_g@epita.fr
 Alexey Mahotkin                 alexm@hsys.msk.ru
 Alfred M. Szmidt                ams@gnu.org
+Andrea Urbani                   matfanjol@mail.com
 Andreas Bergmeier               lcid-fire@gmx.net
 Andreas Buening                 andreas.buening@nexgo.de
 Andreas Köhler                  andi5.py@gmx.net
@@ -48,7 +50,9 @@ Bob Friesenhahn                 bfriesen@simple.dallas.tx.us
 Bob Proulx                      rwp@hprwp.fc.hp.com
 Bob Rossi                       bob@brasko.net
 Bobby Jack                      bobbykjack@yahoo.co.uk
+Boris Kolpackov                 boris@codesynthesis.com
 Braden N. McDaniel              braden@endoframe.com
+Brandon Black                   blblack@gmail.com
 Brendan O'Dea                   bod@debian.org
 Brian Cameron                   Brian.Cameron@Sun.COM
 Brian Ford                      ford@vss.fsi.com
@@ -65,6 +69,7 @@ Christian Cornelssen            ccorn@cs.tu-berlin.de
 Christina Gratorp               christina.gratorp@gmail.com
 Claudio Fontana                 sick_soul@yahoo.it
 Clifford Wolf                   clifford@clifford.at
+Colin Watson                    cjwatson@ubuntu.com
 Dagobert Michelsen              dam@opencsw.org
 Daiki Ueno                      ueno@unixuser.org
 Dalibor Topic                   robilad@kaffe.org
@@ -91,6 +96,7 @@ Dennis Schridde                 devurandom@gmx.net
 Derek R. Price                  derek.price@openavenue.com
 Diab Jerius                     djerius@cfa.harvard.edu
 Didier Cassirame                faded@free.fr
+Diego Elio Pettenò              flameeyes@flameeyes.eu
 Dieter Baron                    dillo@stieltjes.smc.univie.ac.at
 Dieter Jurzitza                 DJurzitza@harmanbecker.com
 Дилян Палаузов                  dilyan.palauzov@aegee.org
@@ -105,7 +111,7 @@ Elmar Hoffmann                  elho@elho.net
 Elrond                          Elrond@Wunder-Nett.org
 Enrico Scholz                   enrico.scholz@informatik.tu-chemnitz.de
 Erez Zadok                      ezk@cs.columbia.edu
-Eric Blake                      ebb9@byu.net
+Eric Blake                      eblake@redhat.com
 Eric Dorland                    eric@debian.org
 Eric Magnien                    emagnien@club-internet.fr
 Eric Siegerman                  erics_97@pobox.com
@@ -116,6 +122,7 @@ Esben Haabendal Soerensen       bart@kom.aau.dk
 Ezra Peisach                    epeisach@MED-XTAL.BU.EDU
 Fabian Alenius                  fabian.alenius@gmail.com
 Federico Simoncelli             fsimonce@redhat.com
+Felix Salfelder                 felix@salfelder.org
 Flavien Astraud                 flav42@yahoo.fr
 Florian Briegel                 briegel@zone42.de
 Francesco Salvestrini           salvestrini@gmail.com
@@ -125,6 +132,7 @@ Ganesan Rajagopal               rganesan@novell.com
 Garrett D'Amore                 garrett@qualcomm.com
 Garth Corral                    garthc@inktomi.com
 Gary V Vaughan                  gvaughan@oranda.demon.co.uk
+Gavin Smith                     gavinsmith0123@gmail.com
 Geoffrey Keating                geoffk@apple.com
 Glenn Amerine                   glenn@pie.mhsc.org
 Gord Matzigkeit                 gord@gnu.ai.mit.edu
@@ -139,17 +147,23 @@ Gwenole Beauchesne              gbeauchesne@mandrakesoft.com
 H.J. Lu                         hjl@lucon.org
 H.Merijn Brand                  h.m.brand@hccnet.nl
 Hans Ulrich Niedermann          hun@n-dimensional.de
+Hanspeter Niederstrasser        fink@snaggledworks.com
 Harald Dunkel                   harald@CoWare.com
 Harlan Stenn                    Harlan.Stenn@pfcs.com
 He Li                           tippa000@yahoo.com
 Henrik Frystyk Nielsen          frystyk@w3.org
+Hib Eris                        hib@hiberis.nl
+Hilko Bengen                    bengen@debian.org
+Holger Hans Peter Freyther      holger@freyther.de
 Ian Lance Taylor                ian@cygnus.com
 Ignacy Gawedzki                 i@lri.fr
 Илья Н. Голубев                 gin@mo.msk.ru
 Imacat                          imacat@mail.imacat.idv.tw
+Infirit                         infirit@gmail.com
 Inoue                           inoue@ainet.or.jp
 Jack Kelly                      jack@jackkelly.name
 James Amundson                  amundson@users.sourceforge.net
+James Bostock                   james.bostock@gmail.com
 James Henstridge                james@daa.com.au
 James R. Van Zandt              jrv@vanzandt.mv.com
 James Youngman                  jay@gnu.org
@@ -185,6 +199,7 @@ John Pierce                     hawkfan@pyrotechnics.com
 John Ratliff                    autoconf@technoplaza.net
 John R. Cary                    cary@txcorp.com
 John W. Coomes                  jcoomes@eng.Sun.COM
+Jonathan L Peyton               jonathan.l.peyton@intel.com
 Jonathan Nieder                 jrnieder@gmail.com
 Joseph S. Myers                 joseph@codesourcery.com
 Josh MacDonald                  jmacd@cs.berkeley.edu
@@ -220,6 +235,7 @@ Luo Yi                          luoyi.ly@gmail.com
 Maciej Stachowiak               mstachow@mit.edu
 Maciej W. Rozycki               macro@ds2.pg.gda.pl
 Manu Rouat                      emmanuel.rouat@wanadoo.fr
+Marc Herbert                    marc.herbert@intel.com
 Marcus Brinkmann                Marcus.Brinkmann@ruhr-uni-bochum.de
 Marcus G. Daniels               mgd@ute.santafe.edu
 Marius Vollmer                  mvo@zagadka.ping.de
@@ -245,12 +261,16 @@ Matthew D. Langston             langston@SLAC.Stanford.EDU
 Matthias Andree                 matthias.andree@gmx.de
 Matthias Clasen                 clasen@mathematik.uni-freiburg.de
 Matthias Klose                  doko@ubuntu.com
+Matthieu Baerts                 matttbe@glx-dock.org
+Max Horn                        max@quendi.de
 Maxim Sinev                     good@goods.ru
 Maynard Johnson                 maynardj@us.ibm.com
 Merijn de Jonge                 M.de.Jonge@cwi.nl
 Michael Brantley                Michael-Brantley@deshaw.com
+Michael Daniels                 mdaniels@rim.com
 Michael Hofmann                 mhofma@googlemail.com
 Michael Ploujnikov              ploujj@gmail.com
+Michael Zucchi                  notzed@gmail.com
 Michel de Ruiter                mdruiter@cs.vu.nl
 Mike Castle                     dalgoda@ix.netcom.com
 Mike Frysinger                  vapier@gentoo.org
@@ -266,6 +286,7 @@ Nathanael Nerode                neroden@twcny.rr.com
 Nelson H. F. Beebe              beebe@math.utah.edu
 Nicholas Wourms                 nwourms@netscape.net
 Nick Bowler                     nbowler@elliptictech.com
+Nicola Fontana                  ntd@entidi.it
 Nicolas Joly                    njoly@pasteur.fr
 Nicolas Thiery                  nthiery@Icare.mines.edu
 NightStrike                     nightstrike@gmail.com
@@ -291,6 +312,7 @@ Paul Jarc                       prj@po.cwru.edu
 Paul Lunau                      temp@lunau.me.uk
 Paul Martinolich                martinol@datasync.com
 Paul Thomas                     PTHOMAS@novell.com
+Pavel Raiskup                   praiskup@redhat.com
 Pavel Roskin                    pavel_roskin@geocities.com
 Pavel Sanda                     ps@twin.jikos.cz
 Per Bothner                     bothner@cygnus.com
@@ -299,25 +321,28 @@ Per Oyvind Hvidsten             poeh@enter.vg
 Peter Breitenlohner             peb@mppmu.mpg.de
 Peter Eisentraut                peter_e@gmx.net
 Peter Gavin                     pgavin@debaser.kicks-ass.org
+Peter Hutterer                  peter.hutterer@who-t.net
 Peter Johansson                 trojkan@gmail.com
 Peter Mattis                    petm@scam.XCF.Berkeley.EDU
 Peter Muir                      iyhi@yahoo.com
 Peter O'Gorman                  peter@pogma.com
 Peter Rosin                     peda@lysator.liu.se
 Peter Seiderer                  seiderer123@ciselant.de
+Petr Hracek                     phracek@redhat.com
 Petter Reinholdtsen             pere@hungry.com
 Petteri Räty                    betelgeuse@gentoo.org
 Phil Edwards                    phil@jaj.com
 Phil Nelson                     phil@cs.wwu.edu
 Philip Fong                     pwlfong@users.sourceforge.net
 Philip S Tellis                 philip@ncst.ernet.in
+Philipp A. Hartmann             philipp.hartmann@offis.de
 Пухальский Юрий Андреевич       pooh@cryptopro.ru
 Quentin Glidic                  sardemff7+gnu@sardemff7.net
 Rainer Orth                     ro@techfak.uni-bielefeld.de
 Rafael Laboissiere              laboissiere@psy.mpg.de
 Rainer Tammer                   tammer@tammer.net
 Raja R Harinath                 harinath@cs.umn.edu
-Ralf Corsepius                  corsepiu@faw.uni-ulm.de
+Ralf Corsepius                  ralf.corsepius@gmail.com
 Ralf Menzel                     menzel@ls6.cs.uni-dortmund.de
 Ralf Wildenhues                 Ralf.Wildenhues@gmx.de
 Ralph Schleicher                rs@purple.UL.BaWue.DE
@@ -326,6 +351,7 @@ Reuben Thomas                   rrt@sc3d.org
 Rich Wales                      richw@webcom.com
 Richard Boulton                 richard@tartarus.org
 Richard Dawe                    rich@phekda.freeserve.co.uk
+Richard W.M. Jones              rjones@redhat.com
 Rob Savoye                      rob@cygnus.com
 Robert Bihlmeyer                robbe@orcus.priv.at
 Robert Boehne                   rboehne@ricardo-us.com
@@ -333,6 +359,7 @@ Robert Collins                  robert.collins@itdomain.com.au
 Robert Swafford                 robert.swafford@l-3com.com
 Roberto Bagnara                 bagnara@cs.unipr.it
 Roman Fietze                    roman.fietze@telemotive.de
+Ronald Copley                   ronald.copley@gmail.com
 Ronald Landheer                 ronald@landheer.com
 Roumen Petrov                   bugtrack@roumenpetrov.info
 Russ Allbery                    rra@stanford.edu
@@ -345,6 +372,7 @@ Sam Steingold                   sds@gnu.org
 Sander Niemeijer                niemeijer@science-and-technology.nl
 Santiago Vila                   sanvila@unex.es
 Scott James Remnant             scott@netsplit.com
+Sébastien Wilmet                swilmet@gnome.org
 Sergey Poznyakoff               gray@gnu.org.ua
 Sergey Vlasov                   vsu@mivlgu.murom.ru
 Seth Alves                      alves@hungry.com
@@ -369,6 +397,7 @@ Theodoros V. Kalamatianos       thkala@gmail.com
 Thien-Thi Nguyen                ttn@glug.org
 Thomas Fitzsimmons              fitzsim@redhat.com
 Thomas Gagne                    tgagne@ix.netcom.com
+Thomas Jahns                    jahns@dkrz.de
 Thomas Klausner                 tk@giga.or.at
 Thomas Morgan                   tmorgan@pobox.com
 Thomas Schwinge                 tschwinge@gnu.org
@@ -380,15 +409,20 @@ Tim Mooney                      mooney@dogbert.cc.ndsu.NoDak.edu
 Tim Retout                      diocles@debian.org
 Tim Rice                        tim@multitalents.net
 Tim Van Holder                  tim.van.holder@pandora.be
+Tobias Hansen                   thansen@debian.org
 Toshio Kuratomi                 toshio@tiki-lounge.com
 Tom Epperly                     tepperly@llnl.gov
+Tom Rini                        tom_rini@mentor.com
 Ulrich Drepper                  drepper@gnu.ai.mit.edu
 Ulrich Eckhardt                 eckhardt@satorlaser.com
 Václav Haisman                  V.Haisman@sh.cvut.cz
+Václav Zeman                    vhaisman@gmail.com
 Vadim Zeitlin                   Vadim.zeitlin@dptmaths.ens-cachan.fr
+Vasyl Khalak                    basiliomail@gmail.com
 Vincent Lefevre                 vincent@vinc17.org
 Vladimir Serbinenko             phcoder@gmail.com
 Volker Boerchers                vboerchers@tecon.de
+Weiller Ronfini                 weillerronfini@yahoo.com.br
 Werner John                     john@oswf.de
 Werner Koch                     wk@isil.d.shuttle.de
 Werner Lemberg                  wl@gnu.org
index 107e568..ceb86df 100644 (file)
@@ -1,6 +1,6 @@
-# generated automatically by aclocal 1.12.1 -*- Autoconf -*-
+# generated automatically by aclocal 1.15.1 -*- Autoconf -*-
 
-# Copyright (C) 1996-2012 Free Software Foundation, Inc.
+# Copyright (C) 1996-2017 Free Software Foundation, Inc.
 
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -11,6 +11,7 @@
 # even the implied warranty of MERCHANTABILITY or FITNESS FOR A
 # PARTICULAR PURPOSE.
 
+m4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])])
 m4_ifndef([AC_AUTOCONF_VERSION],
   [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
 m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.69],,
@@ -27,6 +28,7 @@ m4_include([m4/install-sh.m4])
 m4_include([m4/lead-dot.m4])
 m4_include([m4/missing.m4])
 m4_include([m4/options.m4])
+m4_include([m4/prog-cc-c-o.m4])
 m4_include([m4/runlog.m4])
 m4_include([m4/sanity.m4])
 m4_include([m4/silent.m4])
diff --git a/bin/Makefile.inc b/bin/Makefile.inc
new file mode 100644 (file)
index 0000000..102dec9
--- /dev/null
@@ -0,0 +1,71 @@
+## Copyright (C) 1995-2017 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 automake and aclocal scripts.  ##
+## ----------------------------------- ##
+
+bin_SCRIPTS = %D%/automake %D%/aclocal
+CLEANFILES += $(bin_SCRIPTS)
+
+# Used by maintainer checks and such.
+automake_in = $(srcdir)/%D%/automake.in
+aclocal_in  = $(srcdir)/%D%/aclocal.in
+automake_script = %D%/automake
+aclocal_script  = %D%/aclocal
+
+AUTOMAKESOURCES = $(automake_in) $(aclocal_in)
+TAGS_FILES += $(AUTOMAKESOURCES)
+EXTRA_DIST += $(AUTOMAKESOURCES)
+
+# Make versioned links.  We only run the transform on the root name;
+# then we make a versioned link with the transformed base name.  This
+# seemed like the most reasonable approach.
+install-exec-hook:
+       @$(POST_INSTALL)
+       @for p in $(bin_SCRIPTS); do \
+         f=`echo $$p | sed -e 's,.*/,,' -e '$(transform)'`; \
+         fv="$$f-$(APIVERSION)"; \
+         rm -f "$(DESTDIR)$(bindir)/$$fv"; \
+         echo " $(LN) '$(DESTDIR)$(bindir)/$$f' '$(DESTDIR)$(bindir)/$$fv'"; \
+         $(LN) "$(DESTDIR)$(bindir)/$$f" "$(DESTDIR)$(bindir)/$$fv"; \
+       done
+
+uninstall-hook:
+       @for p in $(bin_SCRIPTS); do \
+         f=`echo $$p | sed -e 's,.*/,,' -e '$(transform)'`; \
+         fv="$$f-$(APIVERSION)"; \
+         rm -f "$(DESTDIR)$(bindir)/$$fv"; \
+       done
+
+# These files depend on Makefile so they are rebuilt if $(VERSION),
+# $(datadir) or other do_subst'ituted variables change.
+%D%/automake: %D%/automake.in
+%D%/aclocal: %D%/aclocal.in
+%D%/automake %D%/aclocal: Makefile %D%/gen-perl-protos
+       $(AM_V_GEN)rm -f $@ $@-t $@-t2 \
+         && $(MKDIR_P) $(@D) \
+## Common substitutions.
+         && in=$@.in && $(do_subst) <$(srcdir)/$$in >$@-t \
+## Auto-compute prototypes of perl subroutines.
+         && $(PERL) -w $(srcdir)/%D%/gen-perl-protos $@-t > $@-t2 \
+         && mv -f $@-t2 $@-t \
+## We can't use '$(generated_file_finalize)' here, because currently
+## Automake contains occurrences of unexpanded @substitutions@ in
+## comments, and that is perfectly legit.
+         && chmod a+x,a-w $@-t && mv -f $@-t $@
+EXTRA_DIST += %D%/gen-perl-protos
+
+# vim: ft=automake noet
similarity index 81%
rename from aclocal.in
rename to bin/aclocal.in
index e8855d5..a4535bc 100644 (file)
@@ -7,7 +7,7 @@ eval 'case $# in 0) exec @PERL@ -S "$0";; *) exec @PERL@ -S "$0" "$@";; esac'
 
 # aclocal - create aclocal.m4 by scanning configure.ac
 
-# Copyright (C) 1996-2012 Free Software Foundation, Inc.
+# Copyright (C) 1996-2017 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
@@ -27,8 +27,9 @@ eval 'case $# in 0) exec @PERL@ -S "$0";; *) exec @PERL@ -S "$0" "$@";; esac'
 
 BEGIN
 {
-  my $perllibdir = $ENV{'perllibdir'} || '@datadir@/@PACKAGE@-@APIVERSION@';
-  unshift @INC, (split '@PATH_SEPARATOR@', $perllibdir);
+  @Aclocal::perl_libdirs = ('@datadir@/@PACKAGE@-@APIVERSION@')
+    unless @Aclocal::perl_libdirs;
+  unshift @INC, @Aclocal::perl_libdirs;
 }
 
 use strict;
@@ -45,6 +46,16 @@ use File::Path ();
 
 # Some globals.
 
+# Support AC_CONFIG_MACRO_DIRS also with older autoconf.
+# FIXME: To be removed in Automake 2.0, once we can assume autoconf
+#        2.70 or later.
+# FIXME: keep in sync with 'internal/ac-config-macro-dirs.m4'.
+my $ac_config_macro_dirs_fallback =
+  'm4_ifndef([AC_CONFIG_MACRO_DIRS], [' .
+    'm4_defun([_AM_CONFIG_MACRO_DIRS], [])' .
+    'm4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])' .
+  '])';
+
 # We do not operate in threaded mode.
 $perl_threads = 0;
 
@@ -52,7 +63,7 @@ $perl_threads = 0;
 # user-supplied directories first, then the directory containing the
 # automake macros, and finally the system-wide directories for
 # third-party macros.
-# @user_includes can be augmented with -I.
+# @user_includes can be augmented with -I or AC_CONFIG_MACRO_DIRS.
 # @automake_includes can be reset with the '--automake-acdir' option.
 # @system_includes can be augmented with the 'dirlist' file or the
 # ACLOCAL_PATH environment variable, and reset with the '--system-acdir'
@@ -143,38 +154,27 @@ my $m4_include_rx = "(m4_|m4_s|s)include\\((?:\\[([^]]+)\\]|([^],)\n]+))\\)";
 my $serial_line_rx = '^#\s*serial\s+(\S*)';
 my $serial_number_rx = '^\d+(?:\.\d+)*$';
 
-# Autoconf version
-# Set by trace_used_macros.
+# Autoconf version.  This variable is set by 'trace_used_macros'.
 my $ac_version;
 
+# User directory containing extra m4 files for macros definition,
+# as extracted from calls to the macro AC_CONFIG_MACRO_DIRS.
+# This variable is updated by 'trace_used_macros'.
+my @ac_config_macro_dirs;
+
 # If set, names a temporary file that must be erased on abnormal exit.
 my $erase_me;
 
+# Constants for the $ERR_LEVEL parameter of the 'scan_m4_dirs' function.
+use constant SCAN_M4_DIRS_SILENT => 0;
+use constant SCAN_M4_DIRS_WARN => 1;
+use constant SCAN_M4_DIRS_ERROR => 2;
+
 ################################################################
 
 # Prototypes for all subroutines.
 
-sub unlink_tmp (;$);
-sub xmkdir_p ($);
-sub check_acinclude ();
-sub reset_maps ();
-sub install_file ($$);
-sub list_compare (\@\@);
-sub scan_m4_dirs ($@);
-sub scan_m4_files ();
-sub add_macro ($);
-sub scan_configure_dep ($);
-sub add_file ($);
-sub scan_file ($$$);
-sub strip_redundant_includes (%);
-sub trace_used_macros ();
-sub scan_configure ();
-sub write_aclocal ($@);
-sub usage ($);
-sub version ();
-sub handle_acdir_option ($$);
-sub parse_arguments ();
-sub parse_ACLOCAL_PATH ();
+#! Prototypes here will automatically be generated by the build system.
 
 ################################################################
 
@@ -340,29 +340,42 @@ sub list_compare (\@\@)
 
 ################################################################
 
-# scan_m4_dirs($TYPE, @DIRS)
-# --------------------------
+# scan_m4_dirs($TYPE, $ERR_LEVEL, @DIRS)
+# -----------------------------------------------
 # Scan all M4 files installed in @DIRS for new macro definitions.
 # Register each file as of type $TYPE (one of the FT_* constants).
-my $first_user_m4dir = 1;
-sub scan_m4_dirs ($@)
+# If a directory in @DIRS cannot be read:
+#  - fail hard                if $ERR_LEVEL == SCAN_M4_DIRS_ERROR
+#  - just print a warning     if $ERR_LEVEL == SCAN_M4_DIRS_WA
+#  - continue silently        if $ERR_LEVEL == SCAN_M4_DIRS_SILENT
+sub scan_m4_dirs ($$@)
 {
-  my ($type, @dirlist) = @_;
+  my ($type, $err_level, @dirlist) = @_;
 
   foreach my $m4dir (@dirlist)
     {
       if (! opendir (DIR, $m4dir))
        {
-         if ($install && $type == FT_USER && $first_user_m4dir)
+         # TODO: maybe avoid complaining only if errno == ENONENT?
+          my $message = "couldn't open directory '$m4dir': $!";
+
+          if ($err_level == SCAN_M4_DIRS_ERROR)
             {
-              # We will try to create this directory later, so don't
-              # complain if it doesn't exist.
-              # TODO: maybe we should avoid complaining only if errno
-              # is ENONENT?
-              $first_user_m4dir = 0;
+              fatal $message;
+            }
+          elsif ($err_level == SCAN_M4_DIRS_WARN)
+            {
+              msg ('unsupported', $message);
               next;
             }
-         fatal "couldn't open directory '$m4dir': $!";
+          elsif ($err_level == SCAN_M4_DIRS_SILENT)
+            {
+              next; # Silently ignore.
+            }
+          else
+            {
+               prog_error "invalid \$err_level value '$err_level'";
+            }
        }
 
       # We reverse the directory contents so that foo2.m4 gets
@@ -396,9 +409,30 @@ sub scan_m4_files ()
     }
 
   # Finally, scan all files in our search paths.
-  scan_m4_dirs (FT_USER, @user_includes);
-  scan_m4_dirs (FT_AUTOMAKE, @automake_includes);
-  scan_m4_dirs (FT_SYSTEM, @system_includes);
+
+  if (@user_includes)
+    {
+      # Don't explore the same directory multiple times.  This is here not
+      # only for speedup purposes.  We need this when the user has e.g.
+      # specified 'ACLOCAL_AMFLAGS = -I m4' and has also set
+      # AC_CONFIG_MACRO_DIR[S]([m4]) in configure.ac.  This makes the 'm4'
+      # directory to occur twice here and fail on the second call to
+      # scan_m4_dirs([m4]) when the 'm4' directory doesn't exist.
+      # TODO: Shouldn't there be rather a check in scan_m4_dirs for
+      #       @user_includes[0]?
+      @user_includes = uniq @user_includes;
+
+      # Don't complain if the first user directory doesn't exist, in case
+      # we need to create it later (can happen if '--install' was given).
+      scan_m4_dirs (FT_USER,
+                    $install ? SCAN_M4_DIRS_SILENT : SCAN_M4_DIRS_WARN,
+                    $user_includes[0]);
+      scan_m4_dirs (FT_USER,
+                    SCAN_M4_DIRS_ERROR,
+                   @user_includes[1..$#user_includes]);
+    }
+  scan_m4_dirs (FT_AUTOMAKE, SCAN_M4_DIRS_ERROR, @automake_includes);
+  scan_m4_dirs (FT_SYSTEM, SCAN_M4_DIRS_ERROR, @system_includes);
 
   # Construct a new function that does the searching.  We use a
   # function (instead of just evaluating $search in the loop) so that
@@ -713,19 +747,46 @@ sub trace_used_macros ()
   my %files = map { $map{$_} => 1 } keys %macro_seen;
   %files = strip_redundant_includes %files;
 
+  # When AC_CONFIG_MACRO_DIRS is used, avoid possible spurious warnings
+  # from autom4te about macros being "m4_require'd but not m4_defun'd";
+  # for more background, see:
+  # http://lists.gnu.org/archive/html/autoconf-patches/2012-11/msg00004.html
+  # as well as autoconf commit 'v2.69-44-g1ed0548', "warn: allow aclocal
+  # to silence m4_require warnings".
+  my $early_m4_code .= "m4_define([m4_require_silent_probe], [-])";
+
   my $traces = ($ENV{AUTOM4TE} || '@am_AUTOM4TE@');
   $traces .= " --language Autoconf-without-aclocal-m4 ";
+  $traces = "echo '$early_m4_code' | $traces - ";
+
+  # Support AC_CONFIG_MACRO_DIRS also with older autoconf.
+  # Note that we can't use '$ac_config_macro_dirs_fallback' here, because
+  # a bug in option parsing code of autom4te 2.68 and earlier will cause
+  # it to read standard input last, even if the "-" argument is specified
+  # early.
+  # FIXME: To be removed in Automake 2.0, once we can assume autoconf
+  #        2.70 or later.
+  $traces .= "$automake_includes[0]/internal/ac-config-macro-dirs.m4 ";
+
   # All candidate files.
   $traces .= join (' ',
                   (map { "'$_'" }
                    (grep { exists $files{$_} } @file_order))) . " ";
+
   # All candidate macros.
   $traces .= join (' ',
-                  (map { "--trace='$_:\$f::\$n::\$1'" }
+                  (map { "--trace='$_:\$f::\$n::\${::}%'" }
                    ('AC_DEFUN',
                     'AC_DEFUN_ONCE',
                     'AU_DEFUN',
-                    '_AM_AUTOCONF_VERSION')),
+                    '_AM_AUTOCONF_VERSION',
+                    'AC_CONFIG_MACRO_DIR_TRACE',
+                     # FIXME: Tracing the next two macros is a hack for
+                     # compatibility with older autoconf.  Remove this in
+                     # Automake 2.0, when we can assume Autoconf 2.70 or
+                     # later.
+                    'AC_CONFIG_MACRO_DIR',
+                    '_AM_CONFIG_MACRO_DIRS')),
                   # Do not trace $1 for all other macros as we do
                   # not need it and it might contains harmful
                   # characters (like newlines).
@@ -735,6 +796,8 @@ sub trace_used_macros ()
 
   my $tracefh = new Automake::XFile ("$traces $configure_ac |");
 
+  @ac_config_macro_dirs = ();
+
   my %traced = ();
 
   while ($_ = $tracefh->getline)
@@ -744,14 +807,43 @@ sub trace_used_macros ()
 
       $traced{$macro} = 1 if exists $macro_seen{$macro};
 
-      $map_traced_defs{$arg1} = $file
-       if ($macro eq 'AC_DEFUN'
-           || $macro eq 'AC_DEFUN_ONCE'
-           || $macro eq 'AU_DEFUN');
-
-      $ac_version = $arg1 if $macro eq '_AM_AUTOCONF_VERSION';
+      if ($macro eq 'AC_DEFUN' || $macro eq 'AC_DEFUN_ONCE'
+            || $macro eq 'AU_DEFUN')
+        {
+          $map_traced_defs{$arg1} = $file;
+        }
+      elsif ($macro eq '_AM_AUTOCONF_VERSION')
+        {
+          $ac_version = $arg1;
+        }
+      elsif ($macro eq 'AC_CONFIG_MACRO_DIR_TRACE')
+        {
+          push @ac_config_macro_dirs, $arg1;
+        }
+      # FIXME: We still need to trace AC_CONFIG_MACRO_DIR
+      # for compatibility with older autoconf.  Remove this
+      # once we can assume Autoconf 2.70 or later.
+      elsif ($macro eq 'AC_CONFIG_MACRO_DIR')
+        {
+          @ac_config_macro_dirs = ($arg1);
+        }
+      # FIXME:This is an hack for compatibility with older autoconf.
+      # Remove this once we can assume Autoconf 2.70 or later.
+      elsif ($macro eq '_AM_CONFIG_MACRO_DIRS')
+        {
+           # Empty leading/trailing fields might be produced by split,
+           # hence the grep is really needed.
+           push @ac_config_macro_dirs, grep (/./, (split /\s+/, $arg1));
+        }
     }
 
+  # FIXME: in Autoconf >= 2.70, AC_CONFIG_MACRO_DIR calls
+  # AC_CONFIG_MACRO_DIR_TRACE behind the scenes, which could
+  # leave unwanted duplicates in @ac_config_macro_dirs.
+  # Remove this in Automake 2.0, when we'll stop tracing
+  # AC_CONFIG_MACRO_DIR explicitly.
+  @ac_config_macro_dirs = uniq @ac_config_macro_dirs;
+
   $tracefh->close;
 
   return %traced;
@@ -877,6 +969,7 @@ $output";
 # even the implied warranty of MERCHANTABILITY or FITNESS FOR A
 # PARTICULAR PURPOSE.
 
+$ac_config_macro_dirs_fallback
 $output";
 
   # We try not to update $output_file unless necessary, because
@@ -972,15 +1065,6 @@ EOF
   exit 0;
 }
 
-# Using --acdir overrides both the automake (versioned) directory and
-# the public (unversioned) system directory.  This usage is obsolete.
-sub handle_acdir_option ($$)
-{
-  msg 'obsolete', '', "'--acdir' is deprecated\n";
-  @system_includes = ($_[1]);
-  @automake_includes = ();
-}
-
 # Parse command line.
 sub parse_arguments ()
 {
@@ -991,7 +1075,6 @@ sub parse_arguments ()
     (
      'help'            => sub { usage(0); },
      'version'         => \&version,
-     'acdir=s'         => \&handle_acdir_option,
      'system-acdir=s'  => sub { shift; @system_includes = @_; },
      'automake-acdir=s'        => sub { shift; @automake_includes = @_; },
      'diff:s'          => \$diff_command,
@@ -1028,12 +1111,6 @@ sub parse_arguments ()
       $dry_run = 1;
     }
 
-  if ($install && !@user_includes)
-    {
-      fatal ("--install should copy macros in the directory indicated by the"
-            . "\nfirst -I option, but no -I was supplied");
-    }
-
   # Finally, adds any directory listed in the 'dirlist' file.
   if (open (DIRLIST, "$system_includes[0]/dirlist"))
     {
@@ -1083,16 +1160,35 @@ $configure_ac = require_configure_ac;
 # we did not rerun aclocal, the next run of aclocal would produce a
 # different aclocal.m4.
 my $loop = 0;
+my $rerun_due_to_macrodir = 0;
 while (1)
   {
     ++$loop;
-    prog_error "too many loops" if $loop > 2;
+    prog_error "too many loops" if $loop > 2 + $rerun_due_to_macrodir;
 
     reset_maps;
     scan_m4_files;
     scan_configure;
     last if $exit_code;
     my %macro_traced = trace_used_macros;
+
+    if (!$rerun_due_to_macrodir && @ac_config_macro_dirs)
+      {
+        # The directory specified in calls to the AC_CONFIG_MACRO_DIRS
+        # m4 macro (if any) must go after the user includes specified
+        # explicitly with the '-I' option.
+        push @user_includes, @ac_config_macro_dirs;
+        # We might have to scan some new directory of .m4 files.
+        $rerun_due_to_macrodir++;
+        next;
+      }
+
+    if ($install && !@user_includes)
+      {
+        fatal "installation of third-party macros impossible without " .
+              "-I options nor AC_CONFIG_MACRO_DIR{,S} m4 macro(s)";
+      }
+
     last if write_aclocal ($output_file, keys %macro_traced);
     last if $dry_run;
   }
similarity index 85%
rename from automake.in
rename to bin/automake.in
index 5cf5a2c..d356336 100644 (file)
@@ -6,7 +6,7 @@ eval 'case $# in 0) exec @PERL@ -S "$0";; *) exec @PERL@ -S "$0" "$@";; esac'
     if 0;
 
 # automake - create Makefile.in from Makefile.am
-# Copyright (C) 1994-2012 Free Software Foundation, Inc.
+# Copyright (C) 1994-2017 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
@@ -25,12 +25,15 @@ eval 'case $# in 0) exec @PERL@ -S "$0";; *) exec @PERL@ -S "$0" "$@";; esac'
 # Perl reimplementation by Tom Tromey <tromey@redhat.com>, and
 # Alexandre Duret-Lutz <adl@gnu.org>.
 
-package Language;
+package Automake;
+
+use strict;
 
 BEGIN
 {
-  my $perllibdir = $ENV{'perllibdir'} || '@datadir@/@PACKAGE@-@APIVERSION@';
-  unshift @INC, (split '@PATH_SEPARATOR@', $perllibdir);
+  @Automake::perl_libdirs = ('@datadir@/@PACKAGE@-@APIVERSION@')
+    unless @Automake::perl_libdirs;
+  unshift @INC, @Automake::perl_libdirs;
 
   # Override SHELL.  This is required on DJGPP so that system() uses
   # bash, not COMMAND.COM which doesn't quote arguments properly.
@@ -42,93 +45,6 @@ BEGIN
   $ENV{'SHELL'} = '@SHELL@' if exists $ENV{'DJDIR'};
 }
 
-use Class::Struct ();
-Class::Struct::struct (
-       # Short name of the language (c, f77...).
-       'name' => "\$",
-       # Nice name of the language (C, Fortran 77...).
-       'Name' => "\$",
-
-       # List of configure variables which must be defined.
-       'config_vars' => '@',
-
-       # 'pure' is '1' or ''.  A 'pure' language is one where, if
-       # all the files in a directory are of that language, then we
-       # do not require the C compiler or any code to call it.
-       'pure'   => "\$",
-
-       'autodep' => "\$",
-
-       # Name of the compiling variable (COMPILE).
-       'compiler'  => "\$",
-       # Content of the compiling variable.
-       'compile'  => "\$",
-       # Flag to require compilation without linking (-c).
-       'compile_flag' => "\$",
-       'extensions' => '@',
-       # A subroutine to compute a list of possible extensions of
-       # the product given the input extensions.
-       # (defaults to a subroutine which returns ('.$(OBJEXT)', '.lo'))
-       'output_extensions' => "\$",
-       # A list of flag variables used in 'compile'.
-       # (defaults to [])
-       'flags' => "@",
-
-       # Any tag to pass to libtool while compiling.
-       'libtool_tag' => "\$",
-
-       # The file to use when generating rules for this language.
-       # The default is 'depend2'.
-       'rule_file' => "\$",
-
-       # Name of the linking variable (LINK).
-       'linker' => "\$",
-       # Content of the linking variable.
-       'link' => "\$",
-
-       # Name of the compiler variable (CC).
-       'ccer' => "\$",
-
-       # Name of the linker variable (LD).
-       'lder' => "\$",
-       # Content of the linker variable ($(CC)).
-       'ld' => "\$",
-
-       # Flag to specify the output file (-o).
-       'output_flag' => "\$",
-       '_finish' => "\$",
-
-       # This is a subroutine which is called whenever we finally
-       # determine the context in which a source file will be
-       # compiled.
-       '_target_hook' => "\$",
-
-       # If TRUE, nodist_ sources will be compiled using specific rules
-       # (i.e. not inference rules).  The default is FALSE.
-       'nodist_specific' => "\$");
-
-
-sub finish ($)
-{
-  my ($self) = @_;
-  if (defined $self->_finish)
-    {
-      &{$self->_finish} (@_);
-    }
-}
-
-sub target_hook ($$$$%)
-{
-    my ($self) = @_;
-    if (defined $self->_target_hook)
-    {
-       &{$self->_target_hook} (@_);
-    }
-}
-
-package Automake;
-
-use strict;
 use Automake::Config;
 BEGIN
 {
@@ -155,10 +71,18 @@ use Automake::VarDef;
 use Automake::Rule;
 use Automake::RuleDef;
 use Automake::Wrap 'makefile_wrap';
+use Automake::Language;
 use File::Basename;
 use File::Spec;
 use Carp;
 
+## ----------------------- ##
+## Subroutine prototypes.  ##
+## ----------------------- ##
+
+#! Prototypes here will automatically be generated by the build system.
+
+
 ## ----------- ##
 ## Constants.  ##
 ## ----------- ##
@@ -231,7 +155,7 @@ my @common_files =
     (qw(ABOUT-GNU ABOUT-NLS AUTHORS BACKLOG COPYING COPYING.DOC COPYING.LIB
        COPYING.LESSER ChangeLog INSTALL NEWS README THANKS TODO
        ar-lib compile config.guess config.rpath
-       config.sub depcomp elisp-comp install-sh libversion.in mdate-sh
+       config.sub depcomp install-sh libversion.in mdate-sh
        missing mkinstalldirs py-compile texinfo.tex ylwrap),
      @libtool_files, @libtool_sometimes);
 
@@ -317,7 +241,7 @@ my $configure_ac;
 # Files found by scanning configure.ac for LIBOBJS.
 my %libsources = ();
 
-# Names used in AC_CONFIG_HEADER call.
+# Names used in AC_CONFIG_HEADERS call.
 my @config_headers = ();
 
 # Names used in AC_CONFIG_LINKS call.
@@ -333,14 +257,14 @@ my @configure_input_files = ();
 # List of files in AC_CONFIG_FILES/AC_OUTPUT without Makefile.am's,
 # and their outputs.
 my @other_input_files = ();
-# Where each AC_CONFIG_FILES/AC_OUTPUT/AC_CONFIG_LINK/AC_CONFIG_HEADER appears.
-# The keys are the files created by these macros.
+# Where each AC_CONFIG_FILES/AC_OUTPUT/AC_CONFIG_LINK/AC_CONFIG_HEADERS
+# appears.  The keys are the files created by these macros.
 my %ac_config_files_location = ();
 # The condition under which AC_CONFIG_FOOS appears.
 my %ac_config_files_condition = ();
 
 # Directory to search for configure-required files.  This
-# will be computed by &locate_aux_dir and can be set using
+# will be computed by locate_aux_dir() and can be set using
 # AC_CONFIG_AUX_DIR in configure.ac.
 # $CONFIG_AUX_DIR is the 'raw' directory, valid only in the source-tree.
 my $config_aux_dir = '';
@@ -362,6 +286,9 @@ my $ac_gettext_location;
 # Whether AM_GNU_GETTEXT_INTL_SUBDIR has been seen.
 my $seen_gettext_intl = 0;
 
+# The arguments of the AM_EXTRA_RECURSIVE_TARGETS call (if any).
+my @extra_recursive_targets = ();
+
 # Lists of tags supported by Libtool.
 my %libtool_tags = ();
 # 1 if Libtool uses LT_SUPPORTED_TAG.  If it does, then it also
@@ -370,8 +297,6 @@ my $libtool_new_api = 0;
 
 # Most important AC_CANONICAL_* macro seen so far.
 my $seen_canonical = 0;
-# Location of that macro.
-my $canonical_location;
 
 # Where AM_MAINTAINER_MODE appears.
 my $seen_maint_mode;
@@ -385,13 +310,10 @@ my $package_version_location;
 # TRUE if we've seen AM_PROG_AR
 my $seen_ar = 0;
 
-# TRUE if we've seen AM_PROG_CC_C_O
-my $seen_cc_c_o = 0;
-
 # Location of AC_REQUIRE_AUX_FILE calls, indexed by their argument.
 my %required_aux_file = ();
 
-# Where AM_INIT_AUTOMAKE is called;
+# Where AM_INIT_AUTOMAKE is called.
 my $seen_init_automake = 0;
 
 # TRUE if we've seen AM_AUTOMAKE_VERSION.
@@ -420,7 +342,7 @@ my %extension_map = ();
 
 # List of the DIST_COMMON files we discovered while reading
 # configure.ac.
-my $configure_dist_common = '';
+my @configure_dist_common = ();
 
 # This maps languages names onto objects.
 my %languages = ();
@@ -461,9 +383,11 @@ my %required_targets =
    'install-ps-am'   => 1,
    'install-info-am' => 1,
    'installcheck-am' => 1,
-   'uninstall-am' => 1,
-
-   'install-man' => 1,
+   'uninstall-am'    => 1,
+   'tags-am'         => 1,
+   'ctags-am'        => 1,
+   'cscopelist-am'   => 1,
+   'install-man'     => 1,
   );
 
 # Queue to push require_conf_file requirements to.
@@ -478,17 +402,9 @@ my $am_file = 'BUG';
 ## Variables reset by &initialize_per_input.  ##
 ## ------------------------------------------ ##
 
-# Basename and relative dir of the input file.
-my $am_file_name;
-my $am_relative_dir;
-
-# Same but wrt Makefile.in.
-my $in_file_name;
+# Relative dir of the output makefile.
 my $relative_dir;
 
-# Relative path to the top directory.
-my $topsrcdir;
-
 # Greatest timestamp of the output's dependencies (excluding
 # configure's dependencies).
 my $output_deps_greatest_timestamp;
@@ -573,6 +489,9 @@ my %language_scratch;
 # handling on a per-language basis.
 my %lang_specific_files;
 
+# List of distributed files to be put in DIST_COMMON.
+my @dist_common;
+
 # This is set when 'handle_dist' has finished.  Once this happens,
 # we should no longer push on dist_common.
 my $handle_dist_run;
@@ -613,7 +532,7 @@ my %am_file_cache;
 # macro_define() call because SUFFIXES definitions impact
 # on $KNOWN_EXTENSIONS_PATTERN which is used used when parsing
 # the input am file.
-sub var_SUFFIXES_trigger ($$)
+sub var_SUFFIXES_trigger
 {
     my ($type, $value) = @_;
     accept_extensions (split (' ', $value));
@@ -622,27 +541,15 @@ Automake::Variable::hook ('SUFFIXES', \&var_SUFFIXES_trigger);
 
 ################################################################
 
-## --------------------------------- ##
-## Forward subroutine declarations.  ##
-## --------------------------------- ##
-sub register_language (%);
-sub file_contents_internal ($$$%);
-sub define_files_variable ($\@$$);
-
 
-# &initialize_per_input ()
-# ------------------------
+# initialize_per_input ()
+# -----------------------
 # (Re)-Initialize per-Makefile.am variables.
 sub initialize_per_input ()
 {
     reset_local_duplicates ();
 
-    $am_file_name = undef;
-    $am_relative_dir = undef;
-
-    $in_file_name = undef;
     $relative_dir = undef;
-    $topsrcdir = undef;
 
     $output_deps_greatest_timestamp = 0;
 
@@ -682,8 +589,11 @@ sub initialize_per_input ()
 
     @dist_targets = ();
 
+    @dist_common = ();
+    $handle_dist_run = 0;
+
     %known_programs = ();
-    %known_libraries= ();
+    %known_libraries = ();
 
     %extension_seen = ();
 
@@ -691,8 +601,6 @@ sub initialize_per_input ()
 
     %lang_specific_files = ();
 
-    $handle_dist_run = 0;
-
     $need_link = 0;
 
     $must_handle_compiled_objects = 0;
@@ -705,6 +613,15 @@ sub initialize_per_input ()
 
 # Initialize our list of languages that are internally supported.
 
+my @cpplike_flags =
+  qw{
+    $(DEFS)
+    $(DEFAULT_INCLUDES)
+    $(INCLUDES)
+    $(AM_CPPFLAGS)
+    $(CPPFLAGS)
+  };
+
 # C.
 register_language ('name' => 'c',
                   'Name' => 'C',
@@ -713,12 +630,13 @@ register_language ('name' => 'c',
                   'flags' => ['CFLAGS', 'CPPFLAGS'],
                   'ccer' => 'CC',
                   'compiler' => 'COMPILE',
-                  'compile' => '$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)',
+                  'compile' => "\$(CC) @cpplike_flags \$(AM_CFLAGS) \$(CFLAGS)",
                   'lder' => 'CCLD',
                   'ld' => '$(CC)',
                   'linker' => 'LINK',
                   'link' => '$(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@',
                   'compile_flag' => '-c',
+                  'output_flag' => '-o',
                   'libtool_tag' => 'CC',
                   'extensions' => ['.c']);
 
@@ -730,7 +648,7 @@ register_language ('name' => 'cxx',
                   'link' => '$(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@',
                   'autodep' => 'CXX',
                   'flags' => ['CXXFLAGS', 'CPPFLAGS'],
-                  'compile' => '$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)',
+                  'compile' => "\$(CXX) @cpplike_flags \$(AM_CXXFLAGS) \$(CXXFLAGS)",
                   'ccer' => 'CXX',
                   'compiler' => 'CXXCOMPILE',
                   'compile_flag' => '-c',
@@ -749,7 +667,7 @@ register_language ('name' => 'objc',
                   'link' => '$(OBJCLD) $(AM_OBJCFLAGS) $(OBJCFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@',
                   'autodep' => 'OBJC',
                   'flags' => ['OBJCFLAGS', 'CPPFLAGS'],
-                  'compile' => '$(OBJC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_OBJCFLAGS) $(OBJCFLAGS)',
+                  'compile' => "\$(OBJC) @cpplike_flags \$(AM_OBJCFLAGS) \$(OBJCFLAGS)",
                   'ccer' => 'OBJC',
                   'compiler' => 'OBJCCOMPILE',
                   'compile_flag' => '-c',
@@ -767,7 +685,7 @@ register_language ('name' => 'objcxx',
                   'link' => '$(OBJCXXLD) $(AM_OBJCXXFLAGS) $(OBJCXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@',
                   'autodep' => 'OBJCXX',
                   'flags' => ['OBJCXXFLAGS', 'CPPFLAGS'],
-                  'compile' => '$(OBJCXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_OBJCXXFLAGS) $(OBJCXXFLAGS)',
+                  'compile' => "\$(OBJCXX) @cpplike_flags \$(AM_OBJCXXFLAGS) \$(OBJCXXFLAGS)",
                   'ccer' => 'OBJCXX',
                   'compiler' => 'OBJCXXCOMPILE',
                   'compile_flag' => '-c',
@@ -785,7 +703,7 @@ register_language ('name' => 'upc',
                   'link' => '$(UPCLD) $(AM_UPCFLAGS) $(UPCFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@',
                   'autodep' => 'UPC',
                   'flags' => ['UPCFLAGS', 'CPPFLAGS'],
-                  'compile' => '$(UPC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_UPCFLAGS) $(UPCFLAGS)',
+                  'compile' => "\$(UPC) @cpplike_flags \$(AM_UPCFLAGS) \$(UPCFLAGS)",
                   'ccer' => 'UPC',
                   'compiler' => 'UPCCOMPILE',
                   'compile_flag' => '-c',
@@ -904,7 +822,7 @@ register_language ('name' => 'cppasm',
 
                   'autodep' => 'CCAS',
                   'flags' => ['CCASFLAGS', 'CPPFLAGS'],
-                  'compile' => '$(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CCASFLAGS) $(CCASFLAGS)',
+                  'compile' => "\$(CCAS) @cpplike_flags \$(AM_CCASFLAGS) \$(CCASFLAGS)",
                   'ccer' => 'CPPAS',
                   'compiler' => 'CPPASCOMPILE',
                   'compile_flag' => '-c',
@@ -958,7 +876,7 @@ register_language ('name' => 'ppfc',
                   'flags' => ['FCFLAGS', 'CPPFLAGS'],
                   'ccer' => 'PPFC',
                   'compiler' => 'PPFCCOMPILE',
-                  'compile' => '$(FC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_FCFLAGS) $(FCFLAGS)',
+                  'compile' => "\$(FC) @cpplike_flags \$(AM_FCFLAGS) \$(FCFLAGS)",
                   'compile_flag' => '-c',
                   'output_flag' => '-o',
                   'libtool_tag' => 'FC',
@@ -990,7 +908,7 @@ register_language ('name' => 'ppf77',
                   'flags' => ['FFLAGS', 'CPPFLAGS'],
                   'ccer' => 'PPF77',
                   'compiler' => 'PPF77COMPILE',
-                  'compile' => '$(F77) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_FFLAGS) $(FFLAGS)',
+                  'compile' => "\$(F77) @cpplike_flags \$(AM_FFLAGS) \$(FFLAGS)",
                   'compile_flag' => '-c',
                   'output_flag' => '-o',
                   'libtool_tag' => 'F77',
@@ -1042,7 +960,7 @@ register_language ('name' => 'java',
 # err_am ($MESSAGE, [%OPTIONS])
 # -----------------------------
 # Uncategorized errors about the current Makefile.am.
-sub err_am ($;%)
+sub err_am
 {
   msg_am ('error', @_);
 }
@@ -1050,7 +968,7 @@ sub err_am ($;%)
 # err_ac ($MESSAGE, [%OPTIONS])
 # -----------------------------
 # Uncategorized errors about configure.ac.
-sub err_ac ($;%)
+sub err_ac
 {
   msg_ac ('error', @_);
 }
@@ -1058,7 +976,7 @@ sub err_ac ($;%)
 # msg_am ($CHANNEL, $MESSAGE, [%OPTIONS])
 # ---------------------------------------
 # Messages about about the current Makefile.am.
-sub msg_am ($$;%)
+sub msg_am
 {
   my ($channel, $msg, %opts) = @_;
   msg $channel, "${am_file}.am", $msg, %opts;
@@ -1067,7 +985,7 @@ sub msg_am ($$;%)
 # msg_ac ($CHANNEL, $MESSAGE, [%OPTIONS])
 # ---------------------------------------
 # Messages about about configure.ac.
-sub msg_ac ($$;%)
+sub msg_ac
 {
   my ($channel, $msg, %opts) = @_;
   msg $channel, $configure_ac, $msg, %opts;
@@ -1081,7 +999,7 @@ sub msg_ac ($$;%)
 # We do this to avoid having the substitutions directly in automake.in;
 # when we do that they are sometimes removed and this causes confusion
 # and bugs.
-sub subst ($)
+sub subst
 {
     my ($text) = @_;
     return '@' . $text . '@';
@@ -1091,12 +1009,12 @@ sub subst ($)
 
 
 # $BACKPATH
-# &backname ($RELDIR)
-# --------------------
+# backname ($RELDIR)
+# -------------------
 # If I "cd $RELDIR", then to come back, I should "cd $BACKPATH".
 # For instance 'src/foo' => '../..'.
 # Works with non strictly increasing paths, i.e., 'src/../lib' => '..'.
-sub backname ($)
+sub backname
 {
     my ($file) = @_;
     my @res;
@@ -1118,12 +1036,12 @@ sub backname ($)
 
 ################################################################
 
-# 'silent-rules' mode handling functions.
+# Silent rules handling functions.
 
 # verbose_var (NAME)
 # ------------------
-# The public variable stem used to implement 'silent-rules'.
-sub verbose_var ($)
+# The public variable stem used to implement silent rules.
+sub verbose_var
 {
     my ($name) = @_;
     return 'AM_V_' . $name;
@@ -1131,55 +1049,54 @@ sub verbose_var ($)
 
 # verbose_private_var (NAME)
 # --------------------------
-# The naming policy for the private variables for 'silent-rules'.
-sub verbose_private_var ($)
+# The naming policy for the private variables for silent rules.
+sub verbose_private_var
 {
     my ($name) = @_;
     return 'am__v_' . $name;
 }
 
-# define_verbose_var (NAME, VAL)
-# ------------------------------
-# For 'silent-rules' mode, setup VAR and dispatcher, to expand to VAL if silent.
-sub define_verbose_var ($$)
+# define_verbose_var (NAME, VAL-IF-SILENT, [VAL-IF-VERBOSE])
+# ----------------------------------------------------------
+# For  silent rules, setup VAR and dispatcher, to expand to
+# VAL-IF-SILENT if silent, to VAL-IF-VERBOSE (defaulting to
+# empty) if not.
+sub define_verbose_var
 {
-    my ($name, $val) = @_;
+    my ($name, $silent_val, $verbose_val) = @_;
+    $verbose_val = '' unless defined $verbose_val;
     my $var = verbose_var ($name);
     my $pvar = verbose_private_var ($name);
     my $silent_var = $pvar . '_0';
-    if (option 'silent-rules')
-      {
-       # For typical 'make's, 'configure' replaces AM_V (inside @@) with $(V)
-       # and AM_DEFAULT_V (inside @@) with $(AM_DEFAULT_VERBOSITY).
-       # For strict POSIX 2008 'make's, it replaces them with 0 or 1 instead.
-       # See AM_SILENT_RULES in m4/silent.m4.
-       define_variable ($var, '$(' . $pvar . '_@'.'AM_V'.'@)', INTERNAL);
-       define_variable ($pvar . '_', '$(' . $pvar . '_@'.'AM_DEFAULT_V'.'@)', INTERNAL);
-       Automake::Variable::define ($silent_var, VAR_AUTOMAKE, '', TRUE, $val,
-                                   '', INTERNAL, VAR_ASIS)
-         if (! vardef ($silent_var, TRUE));
-      }
+    my $verbose_var = $pvar . '_1';
+    # For typical 'make's, 'configure' replaces AM_V (inside @@) with $(V)
+    # and AM_DEFAULT_V (inside @@) with $(AM_DEFAULT_VERBOSITY).
+    # For strict POSIX 2008 'make's, it replaces them with 0 or 1 instead.
+    # See AM_SILENT_RULES in m4/silent.m4.
+    define_variable ($var, '$(' . $pvar . '_@'.'AM_V'.'@)', INTERNAL);
+    define_variable ($pvar . '_', '$(' . $pvar . '_@'.'AM_DEFAULT_V'.'@)',
+                     INTERNAL);
+    Automake::Variable::define ($silent_var, VAR_AUTOMAKE, '', TRUE,
+                                $silent_val, '', INTERNAL, VAR_ASIS)
+      if (! vardef ($silent_var, TRUE));
+    Automake::Variable::define ($verbose_var, VAR_AUTOMAKE, '', TRUE,
+                                $verbose_val, '', INTERNAL, VAR_ASIS)
+      if (! vardef ($verbose_var, TRUE));
 }
 
-# Above should not be needed in the general automake code.
-
 # verbose_flag (NAME)
 # -------------------
-# Contents of %VERBOSE%: variable to expand before rule command.
-sub verbose_flag ($)
+# Contents of '%VERBOSE%' variable to expand before rule command.
+sub verbose_flag
 {
     my ($name) = @_;
-    return '$(' . verbose_var ($name) . ')'
-      if (option 'silent-rules');
-    return '';
+    return '$(' . verbose_var ($name) . ')';
 }
 
-sub verbose_nodep_flag ($)
+sub verbose_nodep_flag
 {
     my ($name) = @_;
-    return '$(' . verbose_var ($name) . subst ('am__nodep') . ')'
-      if (option 'silent-rules');
-    return '';
+    return '$(' . verbose_var ($name) . subst ('am__nodep') . ')';
 }
 
 # silent_flag
@@ -1192,20 +1109,14 @@ sub silent_flag ()
 
 # define_verbose_tagvar (NAME)
 # ----------------------------
-# Engage the needed 'silent-rules' machinery for tag NAME.
-sub define_verbose_tagvar ($)
+# Engage the needed silent rules machinery for tag NAME.
+sub define_verbose_tagvar
 {
     my ($name) = @_;
-    if (option 'silent-rules')
-      {
-       define_verbose_var ($name, '@echo "  '. $name . ' ' x (8 - length ($name)) . '" $@;');
-       define_verbose_var ('at', '@');
-      }
+    define_verbose_var ($name, '@echo "  '. $name . ' ' x (8 - length ($name)) . '" $@;');
 }
 
-# define_verbose_texinfo
-# ----------------------
-# Engage the needed 'silent-rules' machinery for assorted texinfo commands.
+# Engage the needed silent rules machinery for assorted texinfo commands.
 sub define_verbose_texinfo ()
 {
   my @tagvars = ('DVIPS', 'MAKEINFO', 'INFOHTML', 'TEXI2DVI', 'TEXI2PDF');
@@ -1217,21 +1128,33 @@ sub define_verbose_texinfo ()
   define_verbose_var('texidevnull', '> /dev/null');
 }
 
-# define_verbose_libtool
-# ----------------------
-# Engage the needed 'silent-rules' machinery for 'libtool --silent'.
+# Engage the needed silent rules machinery for 'libtool --silent'.
 sub define_verbose_libtool ()
 {
     define_verbose_var ('lt', '--silent');
     return verbose_flag ('lt');
 }
 
+sub handle_silent ()
+{
+    # Define "$(AM_V_P)", expanding to a shell conditional that can be
+    # used in make recipes to determine whether we are being run in
+    # silent mode or not.  The choice of the name derives from the LISP
+    # convention of appending the letter 'P' to denote a predicate (see
+    # also "the '-P' convention" in the Jargon File); we do so for lack
+    # of a better convention.
+    define_verbose_var ('P', 'false', ':');
+    # *Always* provide the user with '$(AM_V_GEN)', unconditionally.
+    define_verbose_tagvar ('GEN');
+    define_verbose_var ('at', '@');
+}
+
 
 ################################################################
 
 
-# Handle AUTOMAKE_OPTIONS variable.  Return 1 on error, 0 otherwise.
-sub handle_options
+# Handle AUTOMAKE_OPTIONS variable.  Return 0 on error, 1 otherwise.
+sub handle_options ()
 {
   my $var = var ('AUTOMAKE_OPTIONS');
   if ($var)
@@ -1244,13 +1167,9 @@ sub handle_options
       my @options = map { { option => $_->[1], where => $_->[0] } }
                        $var->value_as_list_recursive (cond_filter => TRUE,
                                                       location => 1);
-      return 1 if process_option_list (@options);
+      return 0 unless process_option_list (@options);
     }
 
-  # Override portability-recursive warning.
-  switch_warning ('no-portability-recursive')
-    if option 'silent-rules';
-
   if ($strictness == GNITS)
     {
       set_option ('readme-alpha', INTERNAL);
@@ -1258,7 +1177,7 @@ sub handle_options
       set_option ('check-news', INTERNAL);
     }
 
-  return 0;
+  return 1;
 }
 
 # shadow_unconditionally ($varname, $where)
@@ -1268,7 +1187,7 @@ sub handle_options
 # If the VAR wasn't defined conditionally, return $(VAR).
 # Otherwise we create an am__VAR_DIST variable which contains
 # all possible values, and return $(am__VAR_DIST).
-sub shadow_unconditionally ($$)
+sub shadow_unconditionally
 {
   my ($varname, $where) = @_;
   my $var = var $varname;
@@ -1285,7 +1204,7 @@ sub shadow_unconditionally ($$)
 # ----------------------------
 # Make sure each variable VAR in @LIST does not exist, suggest using AM_VAR
 # otherwise.
-sub check_user_variables (@)
+sub check_user_variables
 {
   my @dont_override = @_;
   foreach my $flag (@dont_override)
@@ -1308,19 +1227,19 @@ sub check_user_variables (@)
 }
 
 # Call finish function for each language that was used.
-sub handle_languages
+sub handle_languages ()
 {
     if (! option 'no-dependencies')
     {
        # Include auto-dep code.  Don't include it if DEP_FILES would
        # be empty.
-       if (&saw_sources_p (0) && keys %dep_files)
+       if (keys %extension_seen && keys %dep_files)
        {
            # Set location of depcomp.
-           &define_variable ('depcomp',
-                             "\$(SHELL) $am_config_aux_dir/depcomp",
-                             INTERNAL);
-           &define_variable ('am__depfiles_maybe', 'depfiles', INTERNAL);
+           define_variable ('depcomp',
+                            "\$(SHELL) $am_config_aux_dir/depcomp",
+                            INTERNAL);
+           define_variable ('am__depfiles_maybe', 'depfiles', INTERNAL);
 
            require_conf_file ("$am_file.am", FOREIGN, 'depcomp');
 
@@ -1343,15 +1262,15 @@ sub handle_languages
 
            # Compute the set of directories to remove in distclean-depend.
            my @depdirs = uniq (map { dirname ($_) } @deplist);
-           $output_rules .= &file_contents ('depend',
-                                            new Automake::Location,
-                                            DEPDIRS => "@depdirs");
+           $output_rules .= file_contents ('depend',
+                                           new Automake::Location,
+                                           DEPDIRS => "@depdirs");
        }
     }
     else
     {
-       &define_variable ('depcomp', '', INTERNAL);
-       &define_variable ('am__depfiles_maybe', '', INTERNAL);
+       define_variable ('depcomp', '', INTERNAL);
+       define_variable ('am__depfiles_maybe', '', INTERNAL);
     }
 
     my %done;
@@ -1386,7 +1305,7 @@ sub handle_languages
                         'FASTDEP' => $FASTDEP,
                         '-c'      => $lang->compile_flag || '',
                         # These are not used, but they need to be defined
-                        # so &transform do not complain.
+                        # so transform() do not complain.
                         SUBDIROBJ     => 0,
                         'DERIVED-EXT' => 'BUG',
                         DIST_SOURCE   => 1,
@@ -1399,17 +1318,9 @@ sub handle_languages
        if (((! option 'no-dependencies') && $lang->autodep ne 'no')
            || defined $lang->compile)
        {
-           # Some C compilers don't support -c -o.  Use it only if really
-           # needed.
-           my $output_flag = $lang->output_flag || '';
-           $output_flag = '-o'
-             if (! $output_flag
-                 && $lang->name eq 'c'
-                 && option 'subdir-objects');
-
            # Compute a possible derived extension.
            # This is not used by depend2.am.
-           my $der_ext = (&{$lang->output_extensions} ($ext))[0];
+           my $der_ext = ($lang->output_extensions->($ext))[0];
 
            # When we output an inference rule like '.c.o:' we
            # have two cases to consider: either subdir-objects
@@ -1450,7 +1361,7 @@ sub handle_languages
 
                             COMPILE   => '$(' . $lang->compiler . ')',
                             LTCOMPILE => '$(LT' . $lang->compiler . ')',
-                            -o        => $output_flag,
+                            -o        => $lang->output_flag,
                             SUBDIROBJ => !! option 'subdir-objects');
        }
 
@@ -1574,18 +1485,16 @@ sub handle_languages
     # If the project is entirely C++ or entirely Fortran 77 (i.e., 1
     # suffix rule was learned), don't bother with the C stuff.  But if
     # anything else creeps in, then use it.
-    $needs_c = 1
-      if $need_link || suffix_rules_count > 1;
-
-    if ($needs_c)
+    my @languages_seen = map { $languages{$extension_map{$_}}->name }
+                             (keys %extension_seen);
+    @languages_seen = uniq (@languages_seen);
+    $needs_c = 1 if @languages_seen > 1;
+    if ($need_link || $needs_c)
       {
-       &define_compiler_variable ($languages{'c'})
+       define_compiler_variable ($languages{'c'})
          unless defined $done{$languages{'c'}};
        define_linker_variable ($languages{'c'});
       }
-
-    # Always provide the user with 'AM_V_GEN' for 'silent-rules' mode.
-    define_verbose_tagvar ('GEN');
 }
 
 
@@ -1666,7 +1575,7 @@ sub check_libobjs_sources
 #     when producing explicit rules
 # Result is a list of the names of objects
 # %linkers_used will be updated with any linkers needed
-sub handle_single_transform ($$$$$%)
+sub handle_single_transform
 {
     my ($var, $topparent, $derived, $obj, $_file, %transform) = @_;
     my @files = ($_file);
@@ -1717,13 +1626,13 @@ sub handle_single_transform ($$$$$%)
        # language function.
        my $aggregate = 'AM';
 
-       $extension = &derive_suffix ($extension, $obj);
+       $extension = derive_suffix ($extension, $obj);
        my $lang;
        if ($extension_map{$extension} &&
            ($lang = $languages{$extension_map{$extension}}))
        {
            # Found the language, so see what it says.
-           &saw_extension ($extension);
+           saw_extension ($extension);
 
            # Do we have per-executable flags for this executable?
            my $have_per_exec_flags = 0;
@@ -1746,6 +1655,7 @@ sub handle_single_transform ($$$$$%)
            # generates another source file which we must then process
            # further.
            my $subr = \&{'lang_' . $lang->name . '_rewrite'};
+           defined &$subr or $subr = \&lang_sub_obj;
            my ($r, $source_extension)
                = &$subr ($directory, $base, $extension,
                          $obj, $have_per_exec_flags, $var);
@@ -1800,9 +1710,36 @@ sub handle_single_transform ($$$$$%)
 
            # If rewrite said it was ok, put the object into a
            # subdir.
-           if ($r == LANG_SUBDIR && $directory ne '')
+           if ($directory ne '')
            {
-               $object = $directory . '/' . $object;
+              if ($r == LANG_SUBDIR)
+                {
+                  $object = $directory . '/' . $object;
+                }
+              else
+                {
+                  # Since the next major version of automake (2.0) will
+                  # make the behaviour so far only activated with the
+                  # 'subdir-object' option mandatory, it's better if we
+                  # start warning users not using that option.
+                  # As suggested by Peter Johansson, we strive to avoid
+                  # the warning when it would be irrelevant, i.e., if
+                  # all source files sit in "current" directory.
+                  msg_var 'unsupported', $var,
+                          "source file '$full' is in a subdirectory,"
+                          . "\nbut option 'subdir-objects' is disabled";
+                  msg 'unsupported', INTERNAL, <<'EOF', uniq_scope => US_GLOBAL;
+possible forward-incompatibility.
+At least a source file is in a subdirectory, but the 'subdir-objects'
+automake option hasn't been enabled.  For now, the corresponding output
+object file(s) will be placed in the top-level directory.  However,
+this behaviour will change in future Automake versions: they will
+unconditionally cause object files to be placed in the same subdirectory
+of the corresponding sources.
+You are advised to start using 'subdir-objects' option throughout your
+project, to avoid future incompatibilities.
+EOF
+                }
            }
 
            # If the object file has been renamed (because per-target
@@ -1935,7 +1872,7 @@ sub handle_single_transform ($$$$$%)
            unshift (@files, $object);
            # Distribute derived sources unless the source they are
            # derived from is not.
-           &push_dist_common ($object)
+           push_dist_common ($object)
              unless ($topparent =~ /^(?:nobase_)?nodist_/);
            next;
          }
@@ -1963,18 +1900,22 @@ sub handle_single_transform ($$$$$%)
                    err_am "'$full' should not contain a '..' component";
                  }
 
-               # Make sure object is removed by 'make mostlyclean'.
-               $compile_clean_files{$object} = MOSTLY_CLEAN;
-               # If we have a libtool object then we also must remove
-               # the ordinary .o.
-               if ($object =~ /\.lo$/)
-               {
-                   (my $xobj = $object) =~ s,lo$,\$(OBJEXT),;
-                   $compile_clean_files{$xobj} = MOSTLY_CLEAN;
-
-                   # Remove any libtool object in this directory.
-                   $libtool_clean_directories{$directory} = 1;
-               }
+                # Make sure *all* objects files in the subdirectory are
+                # removed by "make mostlyclean".  Not only this is more
+                # efficient than listing the object files to be removed
+                # individually (which would cause an 'rm' invocation for
+                # each of them -- very inefficient, see bug#10697), it
+                # would also leave stale object files in the subdirectory
+                # whenever a source file there is removed or renamed.
+                $compile_clean_files{"$directory/*.\$(OBJEXT)"} = MOSTLY_CLEAN;
+                if ($object =~ /\.lo$/)
+                  {
+                    # If we have a libtool object, then we also must remove
+                    # any '.lo' objects in its same subdirectory.
+                    $compile_clean_files{"$directory/*.lo"} = MOSTLY_CLEAN;
+                    # Remember to cleanup .libs/ in this directory.
+                    $libtool_clean_directories{$directory} = 1;
+                  }
 
                push (@dep_list, require_build_directory ($directory));
 
@@ -1986,7 +1927,7 @@ sub handle_single_transform ($$$$$%)
                  unless option 'no-dependencies';
            }
 
-           &pretty_print_rule ($object . ':', "\t", @dep_list)
+           pretty_print_rule ($object . ':', "\t", @dep_list)
                if scalar @dep_list > 0;
        }
 
@@ -2037,7 +1978,7 @@ sub handle_single_transform ($$$$$%)
 #
 # Result is a pair ($LINKER, $OBJVAR):
 #    $LINKER is a boolean, true if a linker is needed to deal with the objects
-sub define_objects_from_sources ($$$$$$$%)
+sub define_objects_from_sources
 {
   my ($var, $objvar, $nodefine, $one_file,
       $obj, $topparent, $where, %transform) = @_;
@@ -2071,7 +2012,7 @@ sub define_objects_from_sources ($$$$$$$%)
 #   extra arguments to pass to file_contents when producing rules
 # Return the name of the linker variable that must be used.
 # Empty return means just use 'LINK'.
-sub handle_source_transform ($$$$%)
+sub handle_source_transform
 {
     # one_file is canonical name.  unxformed is given name.  obj is
     # object extension.
@@ -2109,14 +2050,14 @@ sub handle_source_transform ($$$$%)
        $needlinker |=
            define_objects_from_sources ($varname,
                                         $xpfx . $one_file . '_OBJECTS',
-                                        $prefix =~ /EXTRA_/,
+                                        !!($prefix =~ /EXTRA_/),
                                         $one_file, $obj, $varname, $where,
                                         DIST_SOURCE => ($prefix !~ /^nodist_/),
                                         %transform);
     }
     if ($needlinker)
     {
-       $linker ||= &resolve_linker (%linkers_used);
+       $linker ||= resolve_linker (%linkers_used);
     }
 
     my @keys = sort keys %used_pfx;
@@ -2131,6 +2072,7 @@ sub handle_source_transform ($$$$%)
        msg_var ('unsupported', $ext_var, $ext_var->name . " can assume at most one value")
          if $default_source_ext =~ /[\t ]/;
        (my $default_source = $unxformed) =~ s,(\.[^./\\]*)?$,$default_source_ext,;
+       # TODO: Remove this backward-compatibility hack in Automake 2.0.
        if ($old_default_source ne $default_source
            && !$ext_var
            && (rule $old_default_source
@@ -2155,7 +2097,7 @@ sub handle_source_transform ($$$$%)
            $default_source = '$(srcdir)/' . $default_source;
          }
 
-       &define_variable ($one_file . "_SOURCES", $default_source, $where);
+       define_variable ($one_file . "_SOURCES", $default_source, $where);
        push (@sources, $default_source);
        push (@dist_sources, $default_source);
 
@@ -2165,7 +2107,7 @@ sub handle_source_transform ($$$$%)
                                   $one_file . '_SOURCES',
                                   $one_file, $obj,
                                   $default_source, %transform);
-       $linker ||= &resolve_linker (%linkers_used);
+       $linker ||= resolve_linker (%linkers_used);
        define_pretty_variable ($one_file . '_OBJECTS', TRUE, $where, @result);
     }
     else
@@ -2270,7 +2212,7 @@ sub handle_lib_objects
 # -------------------------------
 # Definitions common to LIBOBJS and ALLOCA.
 # VAR should be one of LIBOBJS, LTLIBOBJS, ALLOCA, or LTALLOCA.
-sub handle_LIBOBJS_or_ALLOCA ($)
+sub handle_LIBOBJS_or_ALLOCA
 {
   my ($var) = @_;
 
@@ -2289,8 +2231,10 @@ sub handle_LIBOBJS_or_ALLOCA ($)
          # we are already there, and since the targets are built without
          # a $(top_builddir), it helps BSD Make to match them with
          # dependencies.
-         $dir = "$config_libobj_dir/" if $config_libobj_dir ne '.';
-         $dir = "$topsrcdir/$dir" if $relative_dir ne '.';
+         $dir = "$config_libobj_dir/"
+           if $config_libobj_dir ne '.';
+         $dir = backname ($relative_dir) . "/$dir"
+           if $relative_dir ne '.';
          define_variable ('LIBOBJDIR', "$dir", INTERNAL);
          $clean_files{"\$($var)"} = MOSTLY_CLEAN;
          # If LTLIBOBJS is used, we must also clear LIBOBJS (which might
@@ -2307,7 +2251,7 @@ sub handle_LIBOBJS_or_ALLOCA ($)
   return $dir;
 }
 
-sub handle_LIBOBJS ($$$)
+sub handle_LIBOBJS
 {
   my ($var, $cond, $lt) = @_;
   my $myobjext = $lt ? 'lo' : 'o';
@@ -2322,8 +2266,8 @@ sub handle_LIBOBJS ($$$)
     {
       if ($iter =~ /\.[cly]$/)
        {
-         &saw_extension ($&);
-         &saw_extension ('.c');
+         saw_extension ($&);
+         saw_extension ('.c');
        }
 
       if ($iter =~ /\.h$/)
@@ -2346,20 +2290,21 @@ sub handle_LIBOBJS ($$$)
     }
 }
 
-sub handle_ALLOCA ($$$)
+sub handle_ALLOCA
 {
   my ($var, $cond, $lt) = @_;
   my $myobjext = $lt ? 'lo' : 'o';
   $lt ||= '';
   my $dir = handle_LIBOBJS_or_ALLOCA "${lt}ALLOCA";
 
+  $dir eq '' and $dir = './';
   $var->requires_variables ("\@${lt}ALLOCA\@ used", $lt . 'ALLOCA');
   $dep_files{$dir . '$(DEPDIR)/alloca.P' . $myobjext} = 1;
   require_libsource_with_macro ($cond, $var, FOREIGN, 'alloca.c');
-  &saw_extension ('.c');
+  saw_extension ('.c');
 }
 
-# Canonicalize the input parameter
+# Canonicalize the input parameter.
 sub canonicalize
 {
     my ($string) = @_;
@@ -2374,7 +2319,7 @@ sub check_canonical_spelling
 {
   my ($name, @suffixes) = @_;
 
-  my $xname = &canonicalize ($name);
+  my $xname = canonicalize ($name);
   if ($xname ne $name)
     {
       foreach my $xt (@suffixes)
@@ -2386,9 +2331,6 @@ sub check_canonical_spelling
   return $xname;
 }
 
-
-# handle_compile ()
-# -----------------
 # Set up the compile suite.
 sub handle_compile ()
 {
@@ -2434,19 +2376,17 @@ sub handle_compile ()
     }
 
     my ($coms, $vars, $rules) =
-      &file_contents_internal (1, "$libdir/am/compile.am",
-                              new Automake::Location,
-                              ('DEFAULT_INCLUDES' => $default_includes,
-                               'MOSTLYRMS' => join ("\n", @mostly_rms),
-                               'DISTRMS' => join ("\n", @dist_rms)));
+      file_contents_internal (1, "$libdir/am/compile.am",
+                             new Automake::Location,
+                             'DEFAULT_INCLUDES' => $default_includes,
+                             'MOSTLYRMS' => join ("\n", @mostly_rms),
+                             'DISTRMS' => join ("\n", @dist_rms));
     $output_vars .= $vars;
     $output_rules .= "$coms$rules";
 }
 
-# handle_libtool ()
-# -----------------
 # Handle libtool rules.
-sub handle_libtool
+sub handle_libtool ()
 {
   return unless var ('LIBTOOL');
 
@@ -2467,24 +2407,22 @@ sub handle_libtool
   check_user_variables 'LIBTOOLFLAGS';
 
   # Output the libtool compilation rules.
-  $output_rules .= &file_contents ('libtool',
-                                  new Automake::Location,
+  $output_rules .= file_contents ('libtool',
+                                 new Automake::Location,
                                   LTRMS => join ("\n", @libtool_rms));
 }
 
-# handle_programs ()
-# ------------------
-# Handle C programs.
-sub handle_programs
+
+sub handle_programs ()
 {
-  my @proglist = &am_install_var ('progs', 'PROGRAMS',
-                                 'bin', 'sbin', 'libexec', 'pkglibexec',
-                                 'noinst', 'check');
+  my @proglist = am_install_var ('progs', 'PROGRAMS',
+                                'bin', 'sbin', 'libexec', 'pkglibexec',
+                                'noinst', 'check');
   return if ! @proglist;
   $must_handle_compiled_objects = 1;
 
   my $seen_global_libobjs =
-    var ('LDADD') && &handle_lib_objects ('', 'LDADD');
+    var ('LDADD') && handle_lib_objects ('', 'LDADD');
 
   foreach my $pair (@proglist)
     {
@@ -2496,30 +2434,30 @@ sub handle_programs
       $known_programs{$one_file} = $where;
 
       # Canonicalize names and check for misspellings.
-      my $xname = &check_canonical_spelling ($one_file, '_LDADD', '_LDFLAGS',
-                                            '_SOURCES', '_OBJECTS',
-                                            '_DEPENDENCIES');
+      my $xname = check_canonical_spelling ($one_file, '_LDADD', '_LDFLAGS',
+                                            '_SOURCES', '_OBJECTS',
+                                            '_DEPENDENCIES');
 
       $where->push_context ("while processing program '$one_file'");
       $where->set (INTERNAL->get);
 
-      my $linker = &handle_source_transform ($xname, $one_file, $obj, $where,
-                                            NONLIBTOOL => 1, LIBTOOL => 0);
+      my $linker = handle_source_transform ($xname, $one_file, $obj, $where,
+                                            NONLIBTOOL => 1, LIBTOOL => 0);
 
       if (var ($xname . "_LDADD"))
        {
-         $seen_libobjs = &handle_lib_objects ($xname, $xname . '_LDADD');
+         $seen_libobjs = handle_lib_objects ($xname, $xname . '_LDADD');
        }
       else
        {
          # User didn't define prog_LDADD override.  So do it.
-         &define_variable ($xname . '_LDADD', '$(LDADD)', $where);
+         define_variable ($xname . '_LDADD', '$(LDADD)', $where);
 
          # This does a bit too much work.  But we need it to
          # generate _DEPENDENCIES when appropriate.
          if (var ('LDADD'))
            {
-             $seen_libobjs = &handle_lib_objects ($xname, 'LDADD');
+             $seen_libobjs = handle_lib_objects ($xname, 'LDADD');
            }
        }
 
@@ -2531,46 +2469,43 @@ sub handle_programs
       set_seen ($xname . '_LDFLAGS');
 
       # Determine program to use for link.
-      my($xlink, $vlink) = &define_per_target_linker_variable ($linker, $xname);
+      my($xlink, $vlink) = define_per_target_linker_variable ($linker, $xname);
       $vlink = verbose_flag ($vlink || 'GEN');
 
-      # If the resulting program lies into a subdirectory,
-      # make sure this directory will exist.
+      # If the resulting program lies in a subdirectory,
+      # ensure that the directory exists before we need it.
       my $dirstamp = require_build_directory_maybe ($one_file);
 
       $libtool_clean_directories{dirname ($one_file)} = 1;
 
-      $output_rules .= &file_contents ('program',
-                                      $where,
-                                      PROGRAM  => $one_file,
-                                      XPROGRAM => $xname,
-                                      XLINK    => $xlink,
-                                      VERBOSE  => $vlink,
-                                      DIRSTAMP => $dirstamp,
-                                      EXEEXT   => '$(EXEEXT)');
+      $output_rules .= file_contents ('program',
+                                      $where,
+                                      PROGRAM  => $one_file,
+                                      XPROGRAM => $xname,
+                                      XLINK    => $xlink,
+                                      VERBOSE  => $vlink,
+                                      DIRSTAMP => $dirstamp,
+                                      EXEEXT   => '$(EXEEXT)');
 
       if ($seen_libobjs || $seen_global_libobjs)
        {
          if (var ($xname . '_LDADD'))
            {
-             &check_libobjs_sources ($xname, $xname . '_LDADD');
+             check_libobjs_sources ($xname, $xname . '_LDADD');
            }
          elsif (var ('LDADD'))
            {
-             &check_libobjs_sources ($xname, 'LDADD');
+             check_libobjs_sources ($xname, 'LDADD');
            }
        }
     }
 }
 
 
-# handle_libraries ()
-# -------------------
-# Handle libraries.
-sub handle_libraries
+sub handle_libraries ()
 {
-  my @liblist = &am_install_var ('libs', 'LIBRARIES',
-                                'lib', 'pkglib', 'noinst', 'check');
+  my @liblist = am_install_var ('libs', 'LIBRARIES',
+                                'lib', 'pkglib', 'noinst', 'check');
   return if ! @liblist;
   $must_handle_compiled_objects = 1;
 
@@ -2583,9 +2518,9 @@ sub handle_libraries
       $var->requires_variables ('library used', 'RANLIB');
     }
 
-  &define_variable ('AR', 'ar', INTERNAL);
-  &define_variable ('ARFLAGS', 'cru', INTERNAL);
-  &define_verbose_tagvar ('AR');
+  define_variable ('AR', 'ar', INTERNAL);
+  define_variable ('ARFLAGS', 'cru', INTERNAL);
+  define_verbose_tagvar ('AR');
 
   foreach my $pair (@liblist)
     {
@@ -2612,27 +2547,27 @@ sub handle_libraries
       my $obj = '.$(OBJEXT)';
 
       # Canonicalize names and check for misspellings.
-      my $xlib = &check_canonical_spelling ($onelib, '_LIBADD', '_SOURCES',
-                                           '_OBJECTS', '_DEPENDENCIES',
-                                           '_AR');
+      my $xlib = check_canonical_spelling ($onelib, '_LIBADD', '_SOURCES',
+                                           '_OBJECTS', '_DEPENDENCIES',
+                                           '_AR');
 
       if (! var ($xlib . '_AR'))
        {
-         &define_variable ($xlib . '_AR', '$(AR) $(ARFLAGS)', $where);
+         define_variable ($xlib . '_AR', '$(AR) $(ARFLAGS)', $where);
        }
 
       # Generate support for conditional object inclusion in
       # libraries.
       if (var ($xlib . '_LIBADD'))
        {
-         if (&handle_lib_objects ($xlib, $xlib . '_LIBADD'))
+         if (handle_lib_objects ($xlib, $xlib . '_LIBADD'))
            {
              $seen_libobjs = 1;
            }
        }
       else
        {
-         &define_variable ($xlib . "_LIBADD", '', $where);
+         define_variable ($xlib . "_LIBADD", '', $where);
        }
 
       reject_var ($xlib . '_LDADD',
@@ -2642,28 +2577,28 @@ sub handle_libraries
       set_seen ($xlib . '_DEPENDENCIES');
       set_seen ('EXTRA_' . $xlib . '_DEPENDENCIES');
 
-      &handle_source_transform ($xlib, $onelib, $obj, $where,
-                               NONLIBTOOL => 1, LIBTOOL => 0);
+      handle_source_transform ($xlib, $onelib, $obj, $where,
+                               NONLIBTOOL => 1, LIBTOOL => 0);
 
-      # If the resulting library lies into a subdirectory,
+      # If the resulting library lies in a subdirectory,
       # make sure this directory will exist.
       my $dirstamp = require_build_directory_maybe ($onelib);
       my $verbose = verbose_flag ('AR');
       my $silent = silent_flag ();
 
-      $output_rules .= &file_contents ('library',
-                                      $where,
-                                      VERBOSE  => $verbose,
-                                      SILENT   => $silent,
-                                      LIBRARY  => $onelib,
-                                      XLIBRARY => $xlib,
-                                      DIRSTAMP => $dirstamp);
+      $output_rules .= file_contents ('library',
+                                       $where,
+                                       VERBOSE  => $verbose,
+                                       SILENT   => $silent,
+                                       LIBRARY  => $onelib,
+                                       XLIBRARY => $xlib,
+                                       DIRSTAMP => $dirstamp);
 
       if ($seen_libobjs)
        {
          if (var ($xlib . '_LIBADD'))
            {
-             &check_libobjs_sources ($xlib, $xlib . '_LIBADD');
+             check_libobjs_sources ($xlib, $xlib . '_LIBADD');
            }
        }
 
@@ -2677,13 +2612,10 @@ sub handle_libraries
 }
 
 
-# handle_ltlibraries ()
-# ---------------------
-# Handle shared libraries.
-sub handle_ltlibraries
+sub handle_ltlibraries ()
 {
-  my @liblist = &am_install_var ('ltlib', 'LTLIBRARIES',
-                                'noinst', 'lib', 'pkglib', 'check');
+  my @liblist = am_install_var ('ltlib', 'LTLIBRARIES',
+                                'noinst', 'lib', 'pkglib', 'check');
   return if ! @liblist;
   $must_handle_compiled_objects = 1;
 
@@ -2785,9 +2717,9 @@ sub handle_ltlibraries
       my $obj = '.lo';
 
       # Canonicalize names and check for misspellings.
-      my $xlib = &check_canonical_spelling ($onelib, '_LIBADD', '_LDFLAGS',
-                                           '_SOURCES', '_OBJECTS',
-                                           '_DEPENDENCIES');
+      my $xlib = check_canonical_spelling ($onelib, '_LIBADD', '_LDFLAGS',
+                                           '_SOURCES', '_OBJECTS',
+                                           '_DEPENDENCIES');
 
       # Check that the library fits the standard naming convention.
       my $libname_rx = '^lib.*\.la';
@@ -2834,25 +2766,25 @@ sub handle_ltlibraries
       # libraries.
       if (var ($xlib . '_LIBADD'))
        {
-         if (&handle_lib_objects ($xlib, $xlib . '_LIBADD'))
+         if (handle_lib_objects ($xlib, $xlib . '_LIBADD'))
            {
              $seen_libobjs = 1;
            }
        }
       else
        {
-         &define_variable ($xlib . "_LIBADD", '', $where);
+         define_variable ($xlib . "_LIBADD", '', $where);
        }
 
       reject_var ("${xlib}_LDADD",
                  "use '${xlib}_LIBADD', not '${xlib}_LDADD'");
 
 
-      my $linker = &handle_source_transform ($xlib, $onelib, $obj, $where,
-                                            NONLIBTOOL => 0, LIBTOOL => 1);
+      my $linker = handle_source_transform ($xlib, $onelib, $obj, $where,
+                                            NONLIBTOOL => 0, LIBTOOL => 1);
 
       # Determine program to use for link.
-      my($xlink, $vlink) = &define_per_target_linker_variable ($linker, $xlib);
+      my($xlink, $vlink) = define_per_target_linker_variable ($linker, $xlib);
       $vlink = verbose_flag ($vlink || 'GEN');
 
       my $rpathvar = "am_${xlib}_rpath";
@@ -2889,7 +2821,7 @@ sub handle_ltlibraries
            }
        }
 
-      # If the resulting library lies into a subdirectory,
+      # If the resulting library lies in a subdirectory,
       # make sure this directory will exist.
       my $dirstamp = require_build_directory_maybe ($onelib);
 
@@ -2897,19 +2829,19 @@ sub handle_ltlibraries
       my $dirname = dirname $onelib;
       $libtool_clean_directories{$dirname} = 1;
 
-      $output_rules .= &file_contents ('ltlibrary',
-                                      $where,
-                                      LTLIBRARY  => $onelib,
-                                      XLTLIBRARY => $xlib,
-                                      RPATH      => $rpath,
-                                      XLINK      => $xlink,
-                                      VERBOSE    => $vlink,
-                                      DIRSTAMP   => $dirstamp);
+      $output_rules .= file_contents ('ltlibrary',
+                                      $where,
+                                      LTLIBRARY  => $onelib,
+                                      XLTLIBRARY => $xlib,
+                                      RPATH      => $rpath,
+                                      XLINK      => $xlink,
+                                      VERBOSE    => $vlink,
+                                      DIRSTAMP   => $dirstamp);
       if ($seen_libobjs)
        {
          if (var ($xlib . '_LIBADD'))
            {
-             &check_libobjs_sources ($xlib, $xlib . '_LIBADD');
+             check_libobjs_sources ($xlib, $xlib . '_LIBADD');
            }
        }
 
@@ -2949,53 +2881,30 @@ sub check_typos ()
 }
 
 
-# Handle scripts.
-sub handle_scripts
+sub handle_scripts ()
 {
     # NOTE we no longer automatically clean SCRIPTS, because it is
     # useful to sometimes distribute scripts verbatim.  This happens
     # e.g. in Automake itself.
-    &am_install_var ('-candist', 'scripts', 'SCRIPTS',
-                    'bin', 'sbin', 'libexec', 'pkglibexec', 'pkgdata',
-                    'noinst', 'check');
+    am_install_var ('-candist', 'scripts', 'SCRIPTS',
+                    'bin', 'sbin', 'libexec', 'pkglibexec', 'pkgdata',
+                    'noinst', 'check');
 }
 
 
-
-
 ## ------------------------ ##
 ## Handling Texinfo files.  ##
 ## ------------------------ ##
 
-# ($OUTFILE, $VFILE, @CLEAN_FILES)
-# &scan_texinfo_file ($FILENAME)
-# ------------------------------
+# ($OUTFILE, $VFILE)
+# scan_texinfo_file ($FILENAME)
+# -----------------------------
 # $OUTFILE     - name of the info file produced by $FILENAME.
 # $VFILE       - name of the version.texi file used (undef if none).
-# @CLEAN_FILES - list of byproducts (indexes etc.)
-sub scan_texinfo_file ($)
+sub scan_texinfo_file
 {
   my ($filename) = @_;
 
-  # Some of the following extensions are always created, no matter
-  # whether indexes are used or not.  Other (like cps, fns, ... pgs)
-  # are only created when they are used.  We used to scan $FILENAME
-  # for their use, but that is not enough: they could be used in
-  # included files.  We can't scan included files because we don't
-  # know the include path.  Therefore we always erase these files, no
-  # matter whether they are used or not.
-  #
-  # (tmp is only created if an @macro is used and a certain e-TeX
-  # feature is not available.)
-  my %clean_suffixes =
-    map { $_ => 1 } (qw(aux log toc tmp
-                       cp cps
-                       fn fns
-                       ky kys
-                       vr vrs
-                       tp tps
-                       pg pgs)); # grep 'new.*index' texinfo.tex
-
   my $texi = new Automake::XFile "< $filename";
   verb "reading $filename";
 
@@ -3010,7 +2919,12 @@ sub scan_texinfo_file ($)
          next if $outfile;
 
          $outfile = $1;
-         if ($outfile =~ /\.([^.]+)$/ && $1 ne 'info')
+         if (index ($outfile, '.') < 0)
+           {
+             msg 'obsolete', "$filename:$.",
+                 "use of suffix-less info files is discouraged"
+           }
+         elsif ($outfile !~ /\.info$/)
            {
              error ("$filename:$.",
                     "output '$outfile' has unrecognized extension");
@@ -3023,23 +2937,6 @@ sub scan_texinfo_file ($)
        {
          $vfile = $1;
        }
-
-      # Try to find new or unused indexes.
-
-      # Creating a new category of index.
-      elsif (/^\@def(code)?index (\w+)/)
-       {
-         $clean_suffixes{$2} = 1;
-         $clean_suffixes{"$2s"} = 1;
-       }
-
-      # Merging an index into an another.
-      elsif (/^\@syn(code)?index (\w+) (\w+)/)
-       {
-         delete $clean_suffixes{"$2s"};
-         $clean_suffixes{"$3s"} = 1;
-       }
-
     }
 
   if (! $outfile)
@@ -3048,10 +2945,7 @@ sub scan_texinfo_file ($)
       return;
     }
 
-  my $infobase = basename ($filename);
-  $infobase =~ s/\.te?xi(nfo)?$//;
-  return ($outfile, $vfile,
-         map { "$infobase.$_" } (sort keys %clean_suffixes));
+  return ($outfile, $vfile);
 }
 
 
@@ -3062,7 +2956,7 @@ sub scan_texinfo_file ($)
 # DEST - the destination Info file
 # INSRC - whether DEST should be built in the source tree
 # DEPENDENCIES - known dependencies
-sub output_texinfo_build_rules ($$$@)
+sub output_texinfo_build_rules
 {
   my ($source, $dest, $insrc, @deps) = @_;
 
@@ -3119,7 +3013,7 @@ sub output_texinfo_build_rules ($$$@)
   # extension).
   my $generic_info = ($generic && $dsfx) ? 1 : 0;
 
-  # If the resulting file lie into a subdirectory,
+  # If the resulting file lies in a subdirectory,
   # make sure this directory will exist.
   my $dirstamp = require_build_directory_maybe ($dest);
 
@@ -3156,8 +3050,8 @@ sub output_texinfo_build_rules ($$$@)
 # ($MOSTLYCLEAN, $TEXICLEAN, $MAINTCLEAN)
 # handle_texinfo_helper ($info_texinfos)
 # --------------------------------------
-# Handle all Texinfo source; helper for handle_texinfo.
-sub handle_texinfo_helper ($)
+# Handle all Texinfo source; helper for 'handle_texinfo'.
+sub handle_texinfo_helper
 {
   my ($info_texinfos) = @_;
   my (@infobase, @info_deps_list, @texi_deps);
@@ -3178,9 +3072,17 @@ sub handle_texinfo_helper ($)
       ($info_texinfos->value_as_list_recursive (inner_expand => 1))
     {
       my $infobase = $texi;
-      $infobase =~ s/\.(txi|texinfo|texi)$//;
-
-      if ($infobase eq $texi)
+      if ($infobase =~ s/\.texi$//)
+        {
+          1; # Nothing more to do.
+        }
+      elsif ($infobase =~ s/\.(txi|texinfo)$//)
+        {
+         msg_var 'obsolete', $info_texinfos,
+                 "suffix '.$1' for Texinfo files is discouraged;" .
+                  " use '.texi' instead";
+        }
+      else
        {
          # FIXME: report line number.
          err_am "texinfo file '$texi' has unrecognized extension";
@@ -3191,10 +3093,13 @@ sub handle_texinfo_helper ($)
 
       # If 'version.texi' is referenced by input file, then include
       # automatic versioning capability.
-      my ($out_file, $vtexi, @clean_files) =
+      my ($out_file, $vtexi) =
        scan_texinfo_file ("$relative_dir/$texi")
        or next;
-      push (@mostly_cleans, @clean_files);
+      # Directory of auxiliary files and build by-products used by texi2dvi
+      # and texi2pdf.
+      push @mostly_cleans, "$infobase.t2d";
+      push @mostly_cleans, "$infobase.t2p";
 
       # If the Texinfo source is in a subdirectory, create the
       # resulting info in this subdirectory.  If it is in the current
@@ -3295,23 +3200,51 @@ sub handle_texinfo_helper ($)
       # have a single variable ($INSRC) that controls whether
       # the current .info file must be built in the source tree
       # or in the build tree.  Actually this variable is switched
-      # off for .info files that appear to be cleaned; this is
-      # for backward compatibility with package such as Texinfo,
-      # which do things like
-      #   info_TEXINFOS = texinfo.txi info-stnd.texi info.texi
-      #   DISTCLEANFILES = texinfo texinfo-* info*.info*
-      #   # Do not create info files for distribution.
-      #   dist-info:
-      # in order not to distribute .info files.
-      my $insrc = ($out_file =~ $user_cleaned_files) ? 0 : 1;
-
+      # off in two cases:
+      #  (1) For '.info' files that appear to be cleaned; this is for
+      #      backward compatibility with package such as Texinfo,
+      #      which do things like
+      #        info_TEXINFOS = texinfo.txi info-stnd.texi info.texi
+      #        DISTCLEANFILES = texinfo texinfo-* info*.info*
+      #        # Do not create info files for distribution.
+      #        dist-info:
+      #      in order not to distribute .info files.
+      #  (2) When the undocumented option 'info-in-builddir' is given.
+      #      This is done to allow the developers of GCC, GDB, GNU
+      #      binutils and the GNU bfd library to force the '.info' files
+      #      to be generated in the builddir rather than the srcdir, as
+      #      was once done when the (now removed) 'cygnus' option was
+      #      given.  See automake bug#11034 for more discussion.
+      my $insrc = 1;
       my $soutdir = '$(srcdir)/' . $outdir;
+
+      if (option 'info-in-builddir')
+        {
+          $insrc = 0;
+        }
+      elsif ($out_file =~ $user_cleaned_files)
+        {
+          $insrc = 0;
+          msg 'obsolete', "$am_file.am", <<EOF;
+Oops!
+    It appears this file (or files included by it) are triggering
+    an undocumented, soon-to-be-removed automake hack.
+    Future automake versions will no longer place in the builddir
+    (rather than in the srcdir) the generated '.info' files that
+    appear to be cleaned, by e.g. being listed in CLEANFILES or
+    DISTCLEANFILES.
+    If you want your '.info' files to be placed in the builddir
+    rather than in the srcdir, you have to use the shiny new
+    'info-in-builddir' automake option.
+EOF
+        }
+
       $outdir = $soutdir if $insrc;
 
       # If user specified file_TEXINFOS, then use that as explicit
       # dependency list.
       @texi_deps = ();
-      push (@texi_deps, "$soutdir$vtexi") if $vtexi;
+      push (@texi_deps, "${soutdir}${vtexi}") if $vtexi;
 
       my $canonical = canonicalize ($infobase);
       if (var ($canonical . "_TEXINFOS"))
@@ -3382,11 +3315,6 @@ sub handle_texinfo_helper ($)
       $texinfodir = ('$(srcdir)/'
                     . dirname (variable_value ('TEXINFO_TEX')));
     }
-  elsif (option 'cygnus')
-    {
-      $texinfodir = '$(top_srcdir)/../texinfo';
-      define_variable ('TEXINFO_TEX', "$texinfodir/texinfo.tex", INTERNAL);
-    }
   elsif ($config_aux_dir_set_in_configure_ac)
     {
       $texinfodir = $am_config_aux_dir;
@@ -3443,9 +3371,6 @@ sub handle_texinfo_helper ($)
 }
 
 
-# handle_texinfo ()
-# -----------------
-# Handle all Texinfo source.
 sub handle_texinfo ()
 {
   reject_var 'TEXINFOS', "'TEXINFOS' is an anachronism; use 'info_TEXINFOS'";
@@ -3474,8 +3399,7 @@ sub handle_texinfo ()
 }
 
 
-# Handle any man pages.
-sub handle_man_pages
+sub handle_man_pages ()
 {
   reject_var 'MANS', "'MANS' is an anachronism; use 'man_MANS'";
 
@@ -3509,7 +3433,7 @@ sub handle_man_pages
                      $trans_sect_vars{$varname} = 1;
                    }
 
-                 &push_dist_common ($varname)
+                 push_dist_common ($varname)
                    if $pfx eq 'dist_';
                }
            }
@@ -3544,7 +3468,7 @@ sub handle_man_pages
                {
                  $trans_vars{$varname} = 1;
                }
-             &push_dist_common ($varname)
+             push_dist_common ($varname)
                if $pfx eq 'dist_';
            }
        }
@@ -3588,18 +3512,18 @@ sub handle_man_pages
       @unsorted_deps = (keys %notrans_vars, keys %trans_vars,
                         keys %notrans_this_sect, keys %trans_this_sect);
       my @deps = sort @unsorted_deps;
-      $output_rules .= &file_contents ('mans',
-                                      new Automake::Location,
-                                      SECTION           => $section,
-                                      DEPS              => "@deps",
-                                      NOTRANS_MANS      => $notrans_mans,
-                                      NOTRANS_SECT_LIST => "@notrans_sect_list",
-                                      HAVE_NOTRANS      => $have_notrans,
-                                      NOTRANS_LIST      => "@notrans_list",
-                                      TRANS_MANS        => $trans_mans,
-                                      TRANS_SECT_LIST   => "@trans_sect_list",
-                                      HAVE_TRANS        => $have_trans,
-                                      TRANS_LIST        => "@trans_list");
+      $output_rules .= file_contents ('mans',
+                                      new Automake::Location,
+                                      SECTION           => $section,
+                                      DEPS              => "@deps",
+                                      NOTRANS_MANS      => $notrans_mans,
+                                      NOTRANS_SECT_LIST => "@notrans_sect_list",
+                                      HAVE_NOTRANS      => $have_notrans,
+                                      NOTRANS_LIST      => "@notrans_list",
+                                      TRANS_MANS        => $trans_mans,
+                                      TRANS_SECT_LIST   => "@trans_sect_list",
+                                      HAVE_TRANS        => $have_trans,
+                                      TRANS_LIST        => "@trans_list");
     }
 
   @unsorted_deps  = (keys %notrans_vars, keys %trans_vars,
@@ -3613,97 +3537,55 @@ sub handle_man_pages
     unless option 'no-installman';
 }
 
-# Handle DATA variables.
-sub handle_data
-{
-    &am_install_var ('-noextra', '-candist', 'data', 'DATA',
-                    'data', 'dataroot', 'doc', 'dvi', 'html', 'pdf',
-                    'ps', 'sysconf', 'sharedstate', 'localstate',
-                    'pkgdata', 'lisp', 'noinst', 'check');
-}
-
-# Handle TAGS.
-sub handle_tags
-{
-    my @tag_deps = ();
-    my @ctag_deps = ();
-    my @cscope_deps = ();
-    if (var ('SUBDIRS'))
-    {
-       $output_rules .= ("tags-recursive:\n"
-                         . "\tlist='\$(SUBDIRS)'; for subdir in \$\$list; do \\\n"
-                         # Never fail here if a subdir fails; it
-                         # isn't important.
-                         . "\t  test \"\$\$subdir\" = . || (\$(am__cd) \$\$subdir"
-                         . " && \$(MAKE) \$(AM_MAKEFLAGS) tags); \\\n"
-                         . "\tdone\n");
-       push (@tag_deps, 'tags-recursive');
-       &depend ('.PHONY', 'tags-recursive');
-       &depend ('.MAKE', 'tags-recursive');
-
-       $output_rules .= ("ctags-recursive:\n"
-                         . "\tlist='\$(SUBDIRS)'; for subdir in \$\$list; do \\\n"
-                         # Never fail here if a subdir fails; it
-                         # isn't important.
-                         . "\t  test \"\$\$subdir\" = . || (\$(am__cd) \$\$subdir"
-                         . " && \$(MAKE) \$(AM_MAKEFLAGS) ctags); \\\n"
-                         . "\tdone\n");
-       push (@ctag_deps, 'ctags-recursive');
-       &depend ('.PHONY', 'ctags-recursive');
-       &depend ('.MAKE', 'ctags-recursive');
-
-       $output_rules .= ("cscopelist-recursive:\n"
-                         . "\tlist='\$(SUBDIRS)'; for subdir in \$\$list; do \\\n"
-                         # Never fail here if a subdir fails; it
-                         # isn't important.
-                         . "\t  test \"\$\$subdir\" = . || (\$(am__cd) \$\$subdir"
-                         . " && \$(MAKE) \$(AM_MAKEFLAGS) cscopelist); \\\n"
-                         . "\tdone\n");
-       push (@cscope_deps, 'cscopelist-recursive');
-       &depend ('.PHONY', 'cscopelist-recursive');
-       &depend ('.MAKE', 'cscopelist-recursive');
-    }
-
-    if (&saw_sources_p (1)
-       || var ('ETAGS_ARGS')
-       || @tag_deps)
-    {
-       my @config;
-       foreach my $spec (@config_headers)
-       {
-           my ($out, @ins) = split_config_file_spec ($spec);
-           foreach my $in (@ins)
-             {
-               # If the config header source is in this directory,
-               # require it.
-               push @config, basename ($in)
-                 if $relative_dir eq dirname ($in);
-             }
-       }
-       $output_rules .= &file_contents ('tags',
-                                        new Automake::Location,
-                                        CONFIG    => "@config",
-                                        TAGSDIRS  => "@tag_deps",
-                                        CTAGSDIRS => "@ctag_deps",
-                                        CSCOPEDIRS => "@cscope_deps");
 
+sub handle_data ()
+{
+    am_install_var ('-noextra', '-candist', 'data', 'DATA',
+                    'data', 'dataroot', 'doc', 'dvi', 'html', 'pdf',
+                    'ps', 'sysconf', 'sharedstate', 'localstate',
+                    'pkgdata', 'lisp', 'noinst', 'check');
+}
+
+
+sub handle_tags ()
+{
+    my @config;
+    foreach my $spec (@config_headers)
+      {
+        my ($out, @ins) = split_config_file_spec ($spec);
+       foreach my $in (@ins)
+         {
+            # If the config header source is in this directory,
+           # require it.
+           push @config, basename ($in)
+              if $relative_dir eq dirname ($in);
+          }
+      }
+
+    define_variable ('am__tagged_files',
+                     '$(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)'
+                     . "@config", INTERNAL);
+
+    if (rvar('am__tagged_files')->value_as_list_recursive
+          || var ('ETAGS_ARGS') || var ('SUBDIRS'))
+      {
+       $output_rules .= file_contents ('tags', new Automake::Location);
        set_seen 'TAGS_DEPENDENCIES';
-    }
-    elsif (reject_var ('TAGS_DEPENDENCIES',
-                      "it doesn't make sense to define 'TAGS_DEPENDENCIES'"
-                      . " without\nsources or 'ETAGS_ARGS'"))
-    {
-    }
+      }
     else
-    {
+      {
+        reject_var ('TAGS_DEPENDENCIES',
+                   "it doesn't make sense to define 'TAGS_DEPENDENCIES'"
+                   . " without\nsources or 'ETAGS_ARGS'");
        # Every Makefile must define some sort of TAGS rule.
        # Otherwise, it would be possible for a top-level "make TAGS"
-       # to fail because some subdirectory failed.
-       $output_rules .= "tags: TAGS\nTAGS:\n\n";
-       # Ditto ctags and cscope.
-       $output_rules .= "ctags: CTAGS\nCTAGS:\n\n";
-       $output_rules .= "cscope cscopelist:\n\n";
-    }
+       # to fail because some subdirectory failed.  Ditto ctags and
+        # cscope.
+        $output_rules .=
+          "tags TAGS:\n\n" .
+          "ctags CTAGS:\n\n" .
+          "cscope cscopelist:\n\n";
+      }
 }
 
 
@@ -3712,7 +3594,7 @@ sub handle_tags
 # Return false if rule $NAME does not exist.  Otherwise,
 # declare it as phony, complete its definition (in case it is
 # conditional), and return its Automake::Rule instance.
-sub user_phony_rule ($)
+sub user_phony_rule
 {
   my ($name) = @_;
   my $rule = rule $name;
@@ -3732,28 +3614,6 @@ sub user_phony_rule ($)
 }
 
 
-# $BOOLEAN
-# &for_dist_common ($A, $B)
-# -------------------------
-# Subroutine for &handle_dist: sort files to dist.
-#
-# We put README first because it then becomes easier to make a
-# Usenet-compliant shar file (in these, README must be first).
-#
-# FIXME: do more ordering of files here.
-sub for_dist_common
-{
-    return 0
-       if $a eq $b;
-    return -1
-       if $a eq 'README';
-    return 1
-       if $b eq 'README';
-    return $a cmp $b;
-}
-
-# handle_dist
-# -----------
 # Handle 'dist' target.
 sub handle_dist ()
 {
@@ -3802,7 +3662,7 @@ sub handle_dist ()
     {
       my $archive_defined = option 'no-dist-gzip' ? 0 : 1;
       $archive_defined ||=
-       grep { option "dist-$_" } qw(shar zip tarZ bzip2 lzip lzma xz);
+       grep { option "dist-$_" } qw(shar zip tarZ bzip2 lzip xz);
       error (option 'no-dist-gzip',
             "no-dist-gzip specified but no dist-* specified,\n"
             . "at least one archive format must be enabled")
@@ -3816,7 +3676,7 @@ sub handle_dist ()
   if ($relative_dir eq '.'
       && $config_aux_dir_set_in_configure_ac)
     {
-      if (! &is_make_dir ($config_aux_dir))
+      if (! is_make_dir ($config_aux_dir))
        {
          $check_aux = 1;
        }
@@ -3827,19 +3687,19 @@ sub handle_dist ()
          # The file might be absent, but if it can be built it's ok.
          || rule $cfile)
        {
-         &push_dist_common ($cfile);
+         push_dist_common ($cfile);
        }
 
       # Don't use 'elsif' here because a file might meaningfully
       # appear in both directories.
       if ($check_aux && dir_has_case_matching_file ($config_aux_dir, $cfile))
        {
-         &push_dist_common ("$config_aux_dir/$cfile")
+         push_dist_common ("$config_aux_dir/$cfile")
        }
     }
 
-  # We might copy elements from $configure_dist_common to
-  # %dist_common if we think we need to.  If the file appears in our
+  # We might copy elements from @configure_dist_common to
+  # @dist_common if we think we need to.  If the file appears in our
   # directory, we would have discovered it already, so we don't
   # check that.  But if the file is in a subdir without a Makefile,
   # we want to distribute it here if we are doing '.'.  Ugly!
@@ -3851,31 +3711,27 @@ sub handle_dist ()
   # See also automake bug#9651.
   if ($relative_dir eq '.')
     {
-      foreach my $file (split (' ' , $configure_dist_common))
+      foreach my $file (@configure_dist_common)
        {
          my $dir = dirname ($file);
          push_dist_common ($file)
            if ($dir eq '.' || ! is_make_dir ($dir));
        }
+      @configure_dist_common = ();
     }
 
-  # Files to distributed.  Don't use ->value_as_list_recursive
-  # as it recursively expands '$(dist_pkgdata_DATA)' etc.
-  my @dist_common = split (' ', rvar ('DIST_COMMON')->variable_value);
-  @dist_common = uniq (sort for_dist_common (@dist_common));
-  variable_delete 'DIST_COMMON';
-  define_pretty_variable ('DIST_COMMON', TRUE, INTERNAL, @dist_common);
+  # $(am__DIST_COMMON): files to be distributed automatically.  Will be
+  # appended to $(DIST_COMMON) in the generated Makefile.
+  # Use 'sort' so that the expansion of $(DIST_COMMON) in the generated
+  # Makefile is deterministic, in face of m4 and/or perl randomizations
+  # (see automake bug#17908).
+  define_pretty_variable ('am__DIST_COMMON', TRUE, INTERNAL,
+                          uniq (sort @dist_common));
 
-  # Now that we've processed DIST_COMMON, disallow further attempts
-  # to set it.
+  # Now that we've processed @dist_common, disallow further attempts
+  # to modify it.
   $handle_dist_run = 1;
 
-  # Scan EXTRA_DIST to see if we need to distribute anything from a
-  # subdir.  If so, add it to the list.  I didn't want to do this
-  # originally, but there were so many requests that I finally
-  # relented.
-  my $extra_dist = var ('EXTRA_DIST');
-
   $transform{'DISTCHECK-HOOK'} = !! rule 'distcheck-hook';
   $transform{'GETTEXT'} = $seen_gettext && !$seen_gettext_external;
 
@@ -3889,10 +3745,10 @@ sub handle_dist ()
   my $flm = option ('filename-length-max');
   my $filename_filter = $flm ? '.' x $flm->[1] : '';
 
-  $output_rules .= &file_contents ('distdir',
-                                  new Automake::Location,
-                                  %transform,
-                                  FILENAME_FILTER => $filename_filter);
+  $output_rules .= file_contents ('distdir',
+                                 new Automake::Location,
+                                 %transform,
+                                 FILENAME_FILTER => $filename_filter);
 }
 
 
@@ -3900,7 +3756,7 @@ sub handle_dist ()
 # -------------------------------------------------------
 # Ensure $NAME is a directory (in $RELATIVE_DIR), and that it uses a sane
 # name.  Use $WHERE as a location in the diagnostic, if any.
-sub check_directory ($$;$)
+sub check_directory
 {
   my ($dir, $where, $reldir) = @_;
   $reldir = '.' unless defined $reldir;
@@ -3938,7 +3794,7 @@ sub check_directory ($$;$)
 # check_directories_in_var ($VARIABLE)
 # ------------------------------------
 # Recursively check all items in variables $VARIABLE as directories
-sub check_directories_in_var ($)
+sub check_directories_in_var
 {
   my ($var) = @_;
   $var->traverse_recursively
@@ -3952,9 +3808,7 @@ sub check_directories_in_var ($)
      skip_ac_subst => 1);
 }
 
-# &handle_subdirs ()
-# ------------------
-# Handle subdirectories.
+
 sub handle_subdirs ()
 {
   my $subdirs = var ('SUBDIRS');
@@ -3967,14 +3821,14 @@ sub handle_subdirs ()
   check_directories_in_var $dsubdirs
     if $dsubdirs;
 
-  $output_rules .= &file_contents ('subdirs', new Automake::Location);
+  $output_rules .= file_contents ('subdirs', new Automake::Location);
   rvar ('RECURSIVE_TARGETS')->rdef (TRUE)->{'pretty'} = VAR_SORTED; # Gross!
 }
 
 
 # ($REGEN, @DEPENDENCIES)
-# &scan_aclocal_m4
-# ----------------
+# scan_aclocal_m4
+# ---------------
 # If aclocal.m4 creation is automated, return the list of its dependencies.
 sub scan_aclocal_m4 ()
 {
@@ -3985,7 +3839,7 @@ sub scan_aclocal_m4 ()
 
   if (-f 'aclocal.m4')
     {
-      &define_variable ("ACLOCAL_M4", '$(top_srcdir)/aclocal.m4', INTERNAL);
+      define_variable ("ACLOCAL_M4", '$(top_srcdir)/aclocal.m4', INTERNAL);
 
       my $aclocal = new Automake::XFile "< aclocal.m4";
       my $line = $aclocal->getline;
@@ -4010,8 +3864,8 @@ sub scan_aclocal_m4 ()
 }
 
 
-# Helper function for substitute_ac_subst_variables.
-sub substitute_ac_subst_variables_worker($)
+# Helper function for 'substitute_ac_subst_variables'.
+sub substitute_ac_subst_variables_worker
 {
   my ($token) = @_;
   return "\@$token\@" if var $token;
@@ -4022,22 +3876,22 @@ sub substitute_ac_subst_variables_worker($)
 # -------------------------------------
 # Replace any occurrence of ${FOO} in $TEXT by @FOO@ if FOO is an AC_SUBST
 # variable.
-sub substitute_ac_subst_variables ($)
+sub substitute_ac_subst_variables
 {
   my ($text) = @_;
-  $text =~ s/\${([^ \t=:+{}]+)}/&substitute_ac_subst_variables_worker ($1)/ge;
+  $text =~ s/\$[{]([^ \t=:+{}]+)}/substitute_ac_subst_variables_worker ($1)/ge;
   return $text;
 }
 
 # @DEPENDENCIES
-# &prepend_srcdir (@INPUTS)
-# -------------------------
+# prepend_srcdir (@INPUTS)
+# ------------------------
 # Prepend $(srcdir) or $(top_srcdir) to all @INPUTS.  The idea is that
 # if an input file has a directory part the same as the current
 # directory, then the directory part is simply replaced by $(srcdir).
 # But if the directory part is different, then $(top_srcdir) is
 # prepended.
-sub prepend_srcdir (@)
+sub prepend_srcdir
 {
   my (@inputs) = @_;
   my @newinputs;
@@ -4063,7 +3917,7 @@ sub prepend_srcdir (@)
 # rule of
 #   AC_CONFIG_FILES($OUTPUT:$INPUT[0]:$INPUTS[1]:...)
 # Also distribute $INPUTs which are not built by another AC_CONFIG_FOOs.
-sub rewrite_inputs_into_dependencies ($@)
+sub rewrite_inputs_into_dependencies
 {
   my ($file, @inputs) = @_;
   my @res = ();
@@ -4104,11 +3958,11 @@ sub rewrite_inputs_into_dependencies ($@)
 
 
 
-# &handle_configure ($MAKEFILE_AM, $MAKEFILE_IN, $MAKEFILE, @INPUTS)
-# ------------------------------------------------------------------
+# handle_configure ($MAKEFILE_AM, $MAKEFILE_IN, $MAKEFILE, @INPUTS)
+# -----------------------------------------------------------------
 # Handle remaking and configure stuff.
 # We need the name of the input file, to do proper remaking rules.
-sub handle_configure ($$$@)
+sub handle_configure
 {
   my ($makefile_am, $makefile_in, $makefile, @inputs) = @_;
 
@@ -4131,8 +3985,8 @@ sub handle_configure ($$$@)
   define_pretty_variable ('am__configure_deps', TRUE, INTERNAL,
                          @configuredeps);
 
-  my $automake_options = '--' . (global_option 'cygnus' ? 'cygnus' : $strictness_name)
-                        (global_option 'no-dependencies' ? ' --ignore-deps' : '');
+  my $automake_options = '--' . $strictness_name .
+                        (global_option 'no-dependencies' ? ' --ignore-deps' : '');
 
   $output_rules .= file_contents
     ('configure',
@@ -4151,7 +4005,7 @@ sub handle_configure ($$$@)
 
   if ($relative_dir eq '.')
     {
-      &push_dist_common ('acconfig.h')
+      push_dist_common ('acconfig.h')
        if -f 'acconfig.h';
     }
 
@@ -4170,7 +4024,7 @@ sub handle_configure ($$$@)
       # directory and the header's directory doesn't have a
       # Makefile, then we also want to build the header.
       if ($relative_dir eq $config_h_dir
-         || ($relative_dir eq '.' && ! &is_make_dir ($config_h_dir)))
+         || ($relative_dir eq '.' && ! is_make_dir ($config_h_dir)))
        {
          my ($cn_sans_dir, $stamp_dir);
          if ($relative_dir eq $config_h_dir)
@@ -4221,6 +4075,7 @@ sub handle_configure ($$$@)
            file_contents ('remake-hdr',
                           new Automake::Location,
                           FILES            => "@files",
+                          'FIRST-HDR'      => ($hdr_index == 1),
                           CONFIG_H         => $cn_sans_dir,
                           CONFIG_HIN       => $ins[0],
                           CONFIG_H_DEPS    => "@ins",
@@ -4239,6 +4094,9 @@ sub handle_configure ($$$@)
   # Distribute and define mkinstalldirs only if it is already present
   # in the package, for backward compatibility (some people may still
   # use $(mkinstalldirs)).
+  # TODO: start warning about this in Automake 1.14, and have
+  # TODO: Automake 2.0 drop it (and the mkinstalldirs script
+  # TODO: as well).
   my $mkidpath = "$config_aux_dir/mkinstalldirs";
   if (-f $mkidpath)
     {
@@ -4313,7 +4171,7 @@ sub handle_configure ($$$@)
       my $fd = dirname ($file);
       if ($fd ne $relative_dir)
        {
-         if ($relative_dir eq '.' && ! &is_make_dir ($fd))
+         if ($relative_dir eq '.' && ! is_make_dir ($fd))
            {
              $local = $file;
            }
@@ -4368,7 +4226,7 @@ sub handle_configure ($$$@)
          my $fd = dirname ($link);
          if ($fd ne $relative_dir)
            {
-             if ($relative_dir eq '.' && ! &is_make_dir ($fd))
+             if ($relative_dir eq '.' && ! is_make_dir ($fd))
                {
                  $local = $link;
                }
@@ -4396,7 +4254,7 @@ sub handle_configure ($$$@)
          # At the top-level ('.') we also distribute files whose
          # directory does not have a Makefile.
          if (($fd eq $relative_dir)
-             || ($relative_dir eq '.' && ! &is_make_dir ($fd)))
+             || ($relative_dir eq '.' && ! is_make_dir ($fd)))
            {
              # The following will distribute $file as a side-effect when
              # it is appropriate (i.e., when $file is not already an output).
@@ -4413,20 +4271,19 @@ sub handle_configure ($$$@)
                          @actual_other_vpath_files);
 }
 
-# Handle C headers.
-sub handle_headers
+sub handle_headers ()
 {
-    my @r = &am_install_var ('-defaultdist', 'header', 'HEADERS', 'include',
-                            'oldinclude', 'pkginclude',
-                            'noinst', 'check');
+    my @r = am_install_var ('-defaultdist', 'header', 'HEADERS', 'include',
+                           'oldinclude', 'pkginclude',
+                           'noinst', 'check');
     foreach (@r)
     {
       next unless $_->[1] =~ /\..*$/;
-      &saw_extension ($&);
+      saw_extension ($&);
     }
 }
 
-sub handle_gettext
+sub handle_gettext ()
 {
   return if ! $seen_gettext || $relative_dir ne '.';
 
@@ -4482,8 +4339,8 @@ sub handle_gettext
   require_file ($ac_gettext_location, GNU, 'ABOUT-NLS');
 }
 
-# Handle footer elements.
-sub handle_footer
+# Emit makefile footer.
+sub handle_footer ()
 {
     reject_rule ('.SUFFIXES',
                 "use variable 'SUFFIXES', not target '.SUFFIXES'");
@@ -4521,21 +4378,23 @@ sub handle_footer
 # Generate 'make install' rules.
 sub handle_install ()
 {
-  $output_rules .= &file_contents
+  $output_rules .= file_contents
     ('install',
      new Automake::Location,
      maybe_BUILT_SOURCES => (set_seen ('BUILT_SOURCES')
                             ? (" \$(BUILT_SOURCES)\n"
                                . "\t\$(MAKE) \$(AM_MAKEFLAGS)")
                             : ''),
-     'installdirs-local' => (user_phony_rule 'installdirs-local'
+     'installdirs-local' => (user_phony_rule ('installdirs-local')
                             ? ' installdirs-local' : ''),
      am__installdirs => variable_value ('am__installdirs') || '');
 }
 
 
-# Deal with all and all-am.
-sub handle_all ($)
+# handle_all ($MAKEFILE)
+#-----------------------
+# Deal with 'all' and 'all-am'.
+sub handle_all
 {
     my ($makefile) = @_;
 
@@ -4557,8 +4416,8 @@ sub handle_all ($)
     push (@all, "all-local")
       if user_phony_rule "all-local";
 
-    &pretty_print_rule ("all-am:", "\t\t", @all);
-    &depend ('.PHONY', 'all-am', 'all');
+    pretty_print_rule ("all-am:", "\t\t", @all);
+    depend ('.PHONY', 'all-am', 'all');
 
 
     # Output 'all'.
@@ -4595,9 +4454,33 @@ sub handle_all ($)
       }
 }
 
+# Generate helper targets for user-defined recursive targets, where needed.
+sub handle_user_recursion ()
+{
+  return unless @extra_recursive_targets;
+
+  define_pretty_variable ('am__extra_recursive_targets', TRUE, INTERNAL,
+                          map { "$_-recursive" } @extra_recursive_targets);
+  my $aux = var ('SUBDIRS') ? 'recursive' : 'am';
+  foreach my $target (@extra_recursive_targets)
+    {
+      # This allows the default target's rules to be overridden in
+      # Makefile.am.
+      user_phony_rule ($target);
+      depend ("$target", "$target-$aux");
+      depend ("$target-am", "$target-local");
+      # Every user-defined recursive target 'foo' *must* have a valid
+      # associated 'foo-local' rule; we define it as an empty rule by
+      # default, so that the user can transparently extend it in his
+      # own Makefile.am.
+      pretty_print_rule ("$target-local:", '', '');
+      # $target-recursive might as well be undefined, so do not add
+      # it here; it's taken care of in subdirs.am anyway.
+      depend (".PHONY", "$target-am", "$target-local");
+    }
+}
+
 
-# &do_check_merge_target ()
-# -------------------------
 # Handle check merge target specially.
 sub do_check_merge_target ()
 {
@@ -4605,25 +4488,16 @@ sub do_check_merge_target ()
   push @check_tests, 'check-local'
     if user_phony_rule 'check-local';
 
-  # In --cygnus mode, check doesn't depend on all.
-  if (option 'cygnus')
+  # The check target must depend on the local equivalent of
+  # 'all', to ensure all the primary targets are built.  Then it
+  # must build the local check rules.
+  $output_rules .= "check-am: all-am\n";
+  if (@check)
     {
-      # Just run the local check rules.
-      pretty_print_rule ('check-am:', "\t\t", @check);
-    }
-  else
-    {
-      # The check target must depend on the local equivalent of
-      # 'all', to ensure all the primary targets are built.  Then it
-      # must build the local check rules.
-      $output_rules .= "check-am: all-am\n";
-      if (@check)
-        {
-         pretty_print_rule ("\t\$(MAKE) \$(AM_MAKEFLAGS)", "\t  ",
-                            @check);
-         depend ('.MAKE', 'check-am');
-       }
+      pretty_print_rule ("\t\$(MAKE) \$(AM_MAKEFLAGS)", "\t  ", @check);
+      depend ('.MAKE', 'check-am');
     }
+
   if (@check_tests)
     {
       pretty_print_rule ("\t\$(MAKE) \$(AM_MAKEFLAGS)", "\t  ",
@@ -4643,10 +4517,8 @@ sub do_check_merge_target ()
     if var ('BUILT_SOURCES');
 }
 
-# handle_clean ($MAKEFILE)
-# ------------------------
 # Handle all 'clean' targets.
-sub handle_clean ($)
+sub handle_clean
 {
   my ($makefile) = @_;
 
@@ -4684,7 +4556,7 @@ sub handle_clean ($)
       push @{$rms{$when}}, "\t-$rm\n";
     }
 
-  $output_rules .= &file_contents
+  $output_rules .= file_contents
     ('clean',
      new Automake::Location,
      MOSTLYCLEAN_RMS      => join ('', sort @{$rms{&MOSTLY_CLEAN}}),
@@ -4696,10 +4568,9 @@ sub handle_clean ($)
 }
 
 
-# &target_cmp ($A, $B)
-# --------------------
-# Subroutine for &handle_factored_dependencies to let '.PHONY' and
-# other '.TARGETS' be last.
+# Subroutine for handle_factored_dependencies() to let '.PHONY' and
+# other '.TARGETS' be last.  This is meant to be used as a comparison
+# subroutine passed to the sort built-int.
 sub target_cmp
 {
   return 0 if $a eq $b;
@@ -4715,10 +4586,8 @@ sub target_cmp
 }
 
 
-# &handle_factored_dependencies ()
-# --------------------------------
 # Handle everything related to gathered targets.
-sub handle_factored_dependencies
+sub handle_factored_dependencies ()
 {
   # Reject bad hooks.
   foreach my $utarg ('uninstall-data-local', 'uninstall-data-hook',
@@ -4783,9 +4652,9 @@ sub handle_factored_dependencies
       # to append dependencies.  This would not work if Automake
       # refrained from defining its own .PHONY target as it does
       # with other overridden targets.
-      # Likewise for '.MAKE'.
+      # Likewise for '.MAKE' and '.PRECIOUS'.
       my @undefined_conds = (TRUE,);
-      if ($_ ne '.PHONY' && $_ ne '.MAKE')
+      if ($_ ne '.PHONY' && $_ ne '.MAKE' && $_ ne '.PRECIOUS')
        {
          @undefined_conds =
            Automake::Rule::define ($_, 'internal',
@@ -4795,7 +4664,7 @@ sub handle_factored_dependencies
       foreach my $cond (@undefined_conds)
        {
          my $condstr = $cond->subst_string;
-         &pretty_print_rule ("$condstr$_:", "$condstr\t", @uniq_deps);
+         pretty_print_rule ("$condstr$_:", "$condstr\t", @uniq_deps);
          $output_rules .= $actions{$_} if defined $actions{$_};
          $output_rules .= "\n";
        }
@@ -4803,20 +4672,18 @@ sub handle_factored_dependencies
 }
 
 
-# &handle_tests_dejagnu ()
-# ------------------------
-sub handle_tests_dejagnu
+sub handle_tests_dejagnu ()
 {
     push (@check_tests, 'check-DEJAGNU');
     $output_rules .= file_contents ('dejagnu', new Automake::Location);
 }
 
+# handle_per_suffix_test ($TEST_SUFFIX, [%TRANSFORM])
+#----------------------------------------------------
 sub handle_per_suffix_test
 {
   my ($test_suffix, %transform) = @_;
-  my ($pfx, $generic, $parallel_tests_option, $am_exeext);
-  prog_error ("called with 'parallel-tests' option not set")
-    unless $parallel_tests_option = option 'parallel-tests';
+  my ($pfx, $generic, $am_exeext);
   if ($test_suffix eq '')
     {
       $pfx = '';
@@ -4833,13 +4700,12 @@ sub handle_per_suffix_test
                                                     : 'FALSE';
     }
   # The "test driver" program, deputed to handle tests protocol used by
-  # test scripts.  By default, it's assumed that no protocol is used,
-  # so we fall back to the old "parallel-tests" behaviour, implemented
-  # by the 'test-driver' auxiliary script.
+  # test scripts.  By default, it's assumed that no protocol is used, so
+  # we fall back to the old behaviour, implemented by the 'test-driver'
+  # auxiliary script.
   if (! var "${pfx}LOG_DRIVER")
     {
-      require_conf_file ($parallel_tests_option->{position}, FOREIGN,
-                        'test-driver');
+      require_conf_file ("parallel-tests", FOREIGN, 'test-driver');
       define_variable ("${pfx}LOG_DRIVER",
                        "\$(SHELL) $am_config_aux_dir/test-driver",
                        INTERNAL);
@@ -4867,7 +4733,7 @@ sub handle_per_suffix_test
 # ------------------------------
 # Return true if $EXT can appear in $(TEST_EXTENSIONS), return false
 # otherwise.
-sub is_valid_test_extension ($)
+sub is_valid_test_extension
 {
   my $ext = shift;
   return 1
@@ -4877,12 +4743,12 @@ sub is_valid_test_extension ($)
   return 0;
 }
 
-# Handle TESTS variable and other checks.
-sub handle_tests
+
+sub handle_tests ()
 {
   if (option 'dejagnu')
     {
-      &handle_tests_dejagnu;
+      handle_tests_dejagnu;
     }
   else
     {
@@ -4897,10 +4763,9 @@ sub handle_tests
     {
       push (@check_tests, 'check-TESTS');
       my $check_deps = "@check";
-      $output_rules .= &file_contents ('check', new Automake::Location,
-                                      COLOR => !! option 'color-tests',
-                                      PARALLEL_TESTS => !! option 'parallel-tests',
-                                       CHECK_DEPS => $check_deps);
+      $output_rules .= file_contents ('check', new Automake::Location,
+                                      SERIAL_TESTS => !! option 'serial-tests',
+                                      CHECK_DEPS => $check_deps);
 
       # Tests that are known programs should have $(EXEEXT) appended.
       # For matching purposes, we need to adjust XFAIL_TESTS as well.
@@ -4908,7 +4773,7 @@ sub handle_tests
       append_exeext { exists $known_programs{$_[0]} } 'XFAIL_TESTS'
        if (var ('XFAIL_TESTS'));
 
-      if (my $parallel_tests = option 'parallel-tests')
+      if (! option 'serial-tests')
         {
          define_variable ('TEST_SUITE_LOG', 'test-suite.log', INTERNAL);
          my $suff = '.test';
@@ -4958,7 +4823,7 @@ sub handle_tests
                if ($val =~ /(\$\((top_)?srcdir\))\//o)
                  {
                    msg ('error', $subvar->rdef ($cond)->location,
-                        "parallel-tests: using '$1' in TESTS is currently broken: '$val'");
+                        "using '$1' in TESTS is currently broken: '$val'");
                  }
 
                foreach my $test_suffix (@test_suffixes)
@@ -5012,11 +4877,10 @@ sub handle_tests
     }
 }
 
-# Handle Emacs Lisp.
-sub handle_emacs_lisp
+sub handle_emacs_lisp ()
 {
-  my @elfiles = &am_install_var ('-candist', 'lisp', 'LISP',
-                                'lisp', 'noinst');
+  my @elfiles = am_install_var ('-candist', 'lisp', 'LISP',
+                                'lisp', 'noinst');
 
   return if ! @elfiles;
 
@@ -5031,28 +4895,24 @@ sub handle_emacs_lisp
 
   require_variables ($elfiles[0][0], "Emacs Lisp sources seen", TRUE,
                     'EMACS', 'lispdir');
-  require_conf_file ($elfiles[0][0], FOREIGN, 'elisp-comp');
-  &define_variable ('elisp_comp', "$am_config_aux_dir/elisp-comp", INTERNAL);
 }
 
-# Handle Python
-sub handle_python
+sub handle_python ()
 {
-  my @pyfiles = &am_install_var ('-defaultdist', 'python', 'PYTHON',
-                                'noinst');
+  my @pyfiles = am_install_var ('-defaultdist', 'python', 'PYTHON',
+                                'noinst');
   return if ! @pyfiles;
 
   require_variables ($pyfiles[0][0], "Python sources seen", TRUE, 'PYTHON');
   require_conf_file ($pyfiles[0][0], FOREIGN, 'py-compile');
-  &define_variable ('py_compile', "$am_config_aux_dir/py-compile", INTERNAL);
+  define_variable ('py_compile', "$am_config_aux_dir/py-compile", INTERNAL);
 }
 
-# Handle Java.
-sub handle_java
+sub handle_java ()
 {
-    my @sourcelist = &am_install_var ('-candist',
-                                     'java', 'JAVA',
-                                     'noinst', 'check');
+    my @sourcelist = am_install_var ('-candist',
+                                     'java', 'JAVA',
+                                     'noinst', 'check');
     return if ! @sourcelist;
 
     my @prefixes = am_primary_prefixes ('JAVA', 1,
@@ -5092,8 +4952,7 @@ sub handle_java
 }
 
 
-# Handle some of the minor options.
-sub handle_minor_options
+sub handle_minor_options ()
 {
   if (option 'readme-alpha')
     {
@@ -5118,11 +4977,11 @@ sub handle_minor_options
 ################################################################
 
 # ($OUTPUT, @INPUTS)
-# &split_config_file_spec ($SPEC)
-# -------------------------------
+# split_config_file_spec ($SPEC)
+# ------------------------------
 # Decode the Autoconf syntax for config files (files, headers, links
 # etc.).
-sub split_config_file_spec ($)
+sub split_config_file_spec
 {
   my ($spec) = @_;
   my ($output, @inputs) = split (/:/, $spec);
@@ -5139,7 +4998,7 @@ sub split_config_file_spec ($)
 # AC_CONFIG_FILES allow specifications such as Makefile:top.in:mid.in:bot.in
 # This functions returns the first *.in file for which a *.am exists.
 # It returns undef otherwise.
-sub locate_am (@)
+sub locate_am
 {
   my (@rest) = @_;
   my $input;
@@ -5156,11 +5015,11 @@ sub locate_am (@)
 
 my %make_list;
 
-# &scan_autoconf_config_files ($WHERE, $CONFIG-FILES)
-# ---------------------------------------------------
+# scan_autoconf_config_files ($WHERE, $CONFIG-FILES)
+# --------------------------------------------------
 # Study $CONFIG-FILES which is the first argument to AC_CONFIG_FILES
 # (or AC_OUTPUT).
-sub scan_autoconf_config_files ($$)
+sub scan_autoconf_config_files
 {
   my ($where, $config_files) = @_;
 
@@ -5173,7 +5032,7 @@ sub scan_autoconf_config_files ($$)
       # Handle $local:$input syntax.
       my ($local, @rest) = split (/:/);
       @rest = ("$local.in",) unless @rest;
-      # Keep in sync with 'conffile-leading-dot.test'.
+      # Keep in sync with test 'conffile-leading-dot.sh'.
       msg ('unsupported', $where,
            "omit leading './' from config file names such as '$local';"
            . "\nremake rules might be subtly broken otherwise")
@@ -5198,9 +5057,7 @@ sub scan_autoconf_config_files ($$)
 }
 
 
-# &scan_autoconf_traces ($FILENAME)
-# ---------------------------------
-sub scan_autoconf_traces ($)
+sub scan_autoconf_traces
 {
   my ($filename) = @_;
 
@@ -5223,15 +5080,14 @@ sub scan_autoconf_traces ($)
                AC_REQUIRE_AUX_FILE => 1,
                AC_SUBST_TRACE => 1,
                AM_AUTOMAKE_VERSION => 1,
-                AM_PROG_MKDIR_P => 0, # FIXME: to be removed in 1.13
+                AM_PROG_MKDIR_P => 0,
                AM_CONDITIONAL => 2,
+               AM_EXTRA_RECURSIVE_TARGETS => 1,
                AM_GNU_GETTEXT => 0,
                AM_GNU_GETTEXT_INTL_SUBDIR => 0,
                AM_INIT_AUTOMAKE => 0,
                AM_MAINTAINER_MODE => 0,
                AM_PROG_AR => 0,
-               AM_PROG_CC_C_O => 0,
-               AM_SILENT_RULES => 0,
                _AM_SUBST_NOTMAKE => 1,
                _AM_COND_IF => 1,
                _AM_COND_ELSE => 1,
@@ -5280,7 +5136,6 @@ sub scan_autoconf_traces ($)
          if ($seen_canonical <= AC_CANONICAL_BUILD)
            {
              $seen_canonical = AC_CANONICAL_BUILD;
-             $canonical_location = $where;
            }
        }
       elsif ($macro eq 'AC_CANONICAL_HOST')
@@ -5288,13 +5143,11 @@ sub scan_autoconf_traces ($)
          if ($seen_canonical <= AC_CANONICAL_HOST)
            {
              $seen_canonical = AC_CANONICAL_HOST;
-             $canonical_location = $where;
            }
        }
       elsif ($macro eq 'AC_CANONICAL_TARGET')
        {
          $seen_canonical = AC_CANONICAL_TARGET;
-         $canonical_location = $where;
        }
       elsif ($macro eq 'AC_CONFIG_AUX_DIR')
        {
@@ -5382,10 +5235,10 @@ sub scan_autoconf_traces ($)
 
          $seen_automake_version = 1;
        }
-      elsif ($macro eq 'AM_PROG_MKDIR_P') # FIXME: to be removed in 1.13
+      elsif ($macro eq 'AM_PROG_MKDIR_P')
        {
          msg 'obsolete', $where, <<'EOF';
-The 'AM_PROG_MKDIR_P' macro is deprecated, and will soon be removed.
+The 'AM_PROG_MKDIR_P' macro is deprecated, and its use is discouraged.
 You should use the Autoconf-provided 'AC_PROG_MKDIR_P' macro instead,
 and use '$(MKDIR_P)' instead of '$(mkdir_p)'in your Makefile.am files.
 EOF
@@ -5394,6 +5247,13 @@ EOF
        {
          $configure_cond{$args[1]} = $where;
        }
+      elsif ($macro eq 'AM_EXTRA_RECURSIVE_TARGETS')
+       {
+          # Empty leading/trailing fields might be produced by split,
+          # hence the grep is really needed.
+          push @extra_recursive_targets,
+               grep (/./, (split /\s+/, $args[1]));
+       }
       elsif ($macro eq 'AM_GNU_GETTEXT')
        {
          $seen_gettext = $where;
@@ -5411,7 +5271,7 @@ EOF
            {
               msg 'obsolete', $where, <<'EOF';
 AM_INIT_AUTOMAKE: two- and three-arguments forms are deprecated.  For more info, see:
-http://www.gnu.org/software/automake/manual/automake.html#Modernize-AM_INIT_AUTOMAKE-invocation
+http://www.gnu.org/software/automake/manual/automake.html#Modernize-AM_005fINIT_005fAUTOMAKE-invocation
 EOF
              $package_version = $args[2];
              $package_version_location = $where;
@@ -5420,7 +5280,7 @@ EOF
            {
              my @opts = split (' ', $args[1]);
              @opts = map { { option => $_, where => $where } } @opts;
-             exit $exit_code if process_global_option_list (@opts);
+             exit $exit_code unless process_global_option_list (@opts);
            }
        }
       elsif ($macro eq 'AM_MAINTAINER_MODE')
@@ -5431,14 +5291,6 @@ EOF
        {
          $seen_ar = $where;
        }
-      elsif ($macro eq 'AM_PROG_CC_C_O')
-       {
-         $seen_cc_c_o = $where;
-       }
-      elsif ($macro eq 'AM_SILENT_RULES')
-        {
-         set_global_option ('silent-rules', $where);
-       }
       elsif ($macro eq '_AM_COND_IF')
         {
          cond_stack_if ('', $args[1], $where);
@@ -5509,8 +5361,6 @@ EOF
 }
 
 
-# &scan_autoconf_files ()
-# -----------------------
 # Check whether we use 'configure.ac' or 'configure.in'.
 # Scan it (and possibly 'aclocal.m4') for interesting things.
 # We must scan aclocal.m4 because there might be AC_SUBSTs and such there.
@@ -5589,34 +5439,13 @@ sub scan_autoconf_files ()
     if -f $config_aux_dir . '/install.sh';
 
   # Preserve dist_common for later.
-  $configure_dist_common = variable_value ('DIST_COMMON') || '';
-
+  @configure_dist_common = @dist_common;
 }
 
 ################################################################
 
-# Set up for Cygnus mode.
-sub check_cygnus
-{
-  my $cygnus = option 'cygnus';
-  return unless $cygnus;
-
-  # This feature is deprecated, will be removed in the next
-  # Automake major release.
-  msg 'obsolete', $cygnus->get,
-      "support for Cygnus-style trees is deprecated";
-
-  set_strictness ('foreign');
-  set_option ('no-installinfo', $cygnus);
-  set_option ('no-dependencies', $cygnus);
-  set_option ('no-dist', $cygnus);
-
-  err_ac "'AM_MAINTAINER_MODE' required when --cygnus specified"
-    if !$seen_maint_mode;
-}
-
 # Do any extra checking for GNU standards.
-sub check_gnu_standards
+sub check_gnu_standards ()
 {
   if ($relative_dir eq '.')
     {
@@ -5648,7 +5477,7 @@ sub check_gnu_standards
 }
 
 # Do any extra checking for GNITS standards.
-sub check_gnits_standards
+sub check_gnits_standards ()
 {
   if ($relative_dir eq '.')
     {
@@ -5674,56 +5503,11 @@ sub check_gnits_standards
 
 # This is just a convenience function that can be used to determine
 # when a subdir object should be used.
-sub lang_sub_obj
+sub lang_sub_obj ()
 {
     return option 'subdir-objects' ? LANG_SUBDIR : LANG_PROCESS;
 }
 
-# Rewrite a single C source file.
-sub lang_c_rewrite
-{
-  my ($directory, $base, $ext, $obj, $have_per_exec_flags, $var) = @_;
-
-  my $r = LANG_PROCESS;
-  if (option 'subdir-objects')
-    {
-      $r = LANG_SUBDIR;
-      if ($directory && $directory ne '.')
-       {
-         $base = $directory . '/' . $base;
-
-         # libtool is always able to put the object at the proper place,
-         # so we do not have to require AM_PROG_CC_C_O when building .lo files.
-         msg_var ('portability', $var,
-                  "compiling '$base.c' in subdir requires "
-                  . "'AM_PROG_CC_C_O' in '$configure_ac'",
-                  uniq_scope => US_GLOBAL,
-                  uniq_part => 'AM_PROG_CC_C_O subdir')
-           unless $seen_cc_c_o || $obj eq '.lo';
-       }
-    }
-
-  if (! $seen_cc_c_o
-      && $have_per_exec_flags
-      && ! option 'subdir-objects'
-      && $obj ne '.lo')
-    {
-      msg_var ('portability',
-              $var, "compiling '$base.c' with per-target flags requires "
-              . "'AM_PROG_CC_C_O' in '$configure_ac'",
-              uniq_scope => US_GLOBAL,
-              uniq_part => 'AM_PROG_CC_C_O per-target')
-    }
-
-    return $r;
-}
-
-# Rewrite a single C++ source file.
-sub lang_cxx_rewrite
-{
-    return &lang_sub_obj;
-}
-
 # Rewrite a single header file.
 sub lang_header_rewrite
 {
@@ -5740,105 +5524,27 @@ sub lang_vala_rewrite
     return (LANG_SUBDIR, $newext);
 }
 
-# Rewrite a single yacc file.
+# Rewrite a single yacc/yacc++ file.
 sub lang_yacc_rewrite
 {
     my ($directory, $base, $ext) = @_;
 
-    my $r = &lang_sub_obj;
+    my $r = lang_sub_obj;
     (my $newext = $ext) =~ tr/y/c/;
     return ($r, $newext);
 }
+sub lang_yaccxx_rewrite { lang_yacc_rewrite (@_); };
 
-# Rewrite a single yacc++ file.
-sub lang_yaccxx_rewrite
-{
-    my ($directory, $base, $ext) = @_;
-
-    my $r = &lang_sub_obj;
-    (my $newext = $ext) =~ tr/y/c/;
-    return ($r, $newext);
-}
-
-# Rewrite a single lex file.
+# Rewrite a single lex/lex++ file.
 sub lang_lex_rewrite
 {
     my ($directory, $base, $ext) = @_;
 
-    my $r = &lang_sub_obj;
+    my $r = lang_sub_obj;
     (my $newext = $ext) =~ tr/l/c/;
     return ($r, $newext);
 }
-
-# Rewrite a single lex++ file.
-sub lang_lexxx_rewrite
-{
-    my ($directory, $base, $ext) = @_;
-
-    my $r = &lang_sub_obj;
-    (my $newext = $ext) =~ tr/l/c/;
-    return ($r, $newext);
-}
-
-# Rewrite a single assembly file.
-sub lang_asm_rewrite
-{
-    return &lang_sub_obj;
-}
-
-# Rewrite a single preprocessed assembly file.
-sub lang_cppasm_rewrite
-{
-    return &lang_sub_obj;
-}
-
-# Rewrite a single Fortran 77 file.
-sub lang_f77_rewrite
-{
-    return &lang_sub_obj;
-}
-
-# Rewrite a single Fortran file.
-sub lang_fc_rewrite
-{
-    return &lang_sub_obj;
-}
-
-# Rewrite a single preprocessed Fortran file.
-sub lang_ppfc_rewrite
-{
-    return &lang_sub_obj;
-}
-
-# Rewrite a single preprocessed Fortran 77 file.
-sub lang_ppf77_rewrite
-{
-    return &lang_sub_obj;
-}
-
-# Rewrite a single ratfor file.
-sub lang_ratfor_rewrite
-{
-    return &lang_sub_obj;
-}
-
-# Rewrite a single Objective C file.
-sub lang_objc_rewrite
-{
-    return &lang_sub_obj;
-}
-
-# Rewrite a single Objective C++ file.
-sub lang_objcxx_rewrite
-{
-    return &lang_sub_obj;
-}
-
-# Rewrite a single Unified Parallel C file.
-sub lang_upc_rewrite
-{
-    return &lang_sub_obj;
-}
+sub lang_lexxx_rewrite { lang_lex_rewrite (@_); };
 
 # Rewrite a single Java file.
 sub lang_java_rewrite
@@ -5851,7 +5557,7 @@ sub lang_java_rewrite
 # language, etc.  A finish function is only called if a source file of
 # the appropriate type has been seen.
 
-sub lang_vala_finish_target ($$)
+sub lang_vala_finish_target
 {
   my ($self, $name) = @_;
 
@@ -5946,7 +5652,7 @@ sub lang_vala_finish_target ($$)
 # Add output rules to invoke valac and create stamp file as a witness
 # to handle multiple outputs. This function is called after all source
 # file processing is done.
-sub lang_vala_finish
+sub lang_vala_finish ()
 {
   my ($self) = @_;
 
@@ -6032,9 +5738,9 @@ sub lang_yacc_target_hook
              . "$condstr\t\@if test ! -f \$@; then \$(MAKE) \$(AM_MAKEFLAGS) $output; else :; fi\n";
          }
        # Distribute the generated file, unless its .y source was
-       # listed in a nodist_ variable.  (&handle_source_transform
+       # listed in a nodist_ variable.  (handle_source_transform()
        # will set DIST_SOURCE.)
-       &push_dist_common ($header)
+       push_dist_common ($header)
          if $transform{'DIST_SOURCE'};
 
        # The GNU rules say that yacc/lex output files should be removed
@@ -6060,17 +5766,17 @@ sub lang_lex_target_hook
 }
 
 # This is a helper for both lex and yacc.
-sub yacc_lex_finish_helper
+sub yacc_lex_finish_helper ()
 {
   return if defined $language_scratch{'lex-yacc-done'};
   $language_scratch{'lex-yacc-done'} = 1;
 
   # FIXME: for now, no line number.
   require_conf_file ($configure_ac, FOREIGN, 'ylwrap');
-  &define_variable ('YLWRAP', "$am_config_aux_dir/ylwrap", INTERNAL);
+  define_variable ('YLWRAP', "$am_config_aux_dir/ylwrap", INTERNAL);
 }
 
-sub lang_yacc_finish
+sub lang_yacc_finish ()
 {
   return if defined $language_scratch{'yacc-done'};
   $language_scratch{'yacc-done'} = 1;
@@ -6081,7 +5787,7 @@ sub lang_yacc_finish
 }
 
 
-sub lang_lex_finish
+sub lang_lex_finish ()
 {
   return if defined $language_scratch{'lex-done'};
   $language_scratch{'lex-done'} = 1;
@@ -6109,81 +5815,14 @@ sub resolve_linker
 sub saw_extension
 {
     my ($ext) = @_;
-    if (! defined $extension_seen{$ext})
-    {
-       $extension_seen{$ext} = 1;
-    }
-    else
-    {
-       ++$extension_seen{$ext};
-    }
-}
-
-# Return the number of files seen for a given language.  Knows about
-# special cases we care about.  FIXME: this is hideous.  We need
-# something that involves real language objects.  For instance yacc
-# and yaccxx could both derive from a common yacc class which would
-# know about the strange ylwrap requirement.  (Or better yet we could
-# just not support legacy yacc!)
-sub count_files_for_language
-{
-    my ($name) = @_;
-
-    my @names;
-    if ($name eq 'yacc' || $name eq 'yaccxx')
-    {
-       @names = ('yacc', 'yaccxx');
-    }
-    elsif ($name eq 'lex' || $name eq 'lexxx')
-    {
-       @names = ('lex', 'lexxx');
-    }
-    else
-    {
-       @names = ($name);
-    }
-
-    my $r = 0;
-    foreach $name (@names)
-    {
-       my $lang = $languages{$name};
-       foreach my $ext (@{$lang->extensions})
-       {
-           $r += $extension_seen{$ext}
-               if defined $extension_seen{$ext};
-       }
-    }
-
-    return $r
-}
-
-# Called to ask whether source files have been seen . If HEADERS is 1,
-# headers can be included.
-sub saw_sources_p
-{
-    my ($headers) = @_;
-
-    # count all the sources
-    my $count = 0;
-    foreach my $val (values %extension_seen)
-    {
-       $count += $val;
-    }
-
-    if (!$headers)
-    {
-       $count -= count_files_for_language ('header');
-    }
-
-    return $count > 0;
+    $extension_seen{$ext} = 1;
 }
 
-
 # register_language (%ATTRIBUTE)
 # ------------------------------
 # Register a single language.
 # Each %ATTRIBUTE is of the form ATTRIBUTE => VALUE.
-sub register_language (%)
+sub register_language
 {
   my (%option) = @_;
 
@@ -6199,7 +5838,7 @@ sub register_language (%)
   $option{'nodist_specific'} = 0
     unless defined $option{'nodist_specific'};
 
-  my $lang = new Language (%option);
+  my $lang = new Automake::Language (%option);
 
   # Fill indexes.
   $extension_map{$_} = $lang->name foreach @{$lang->extensions};
@@ -6222,10 +5861,10 @@ sub register_language (%)
   # Update the pattern of known extensions.
   accept_extensions (@{$lang->extensions});
 
-  # Upate the $suffix_rule map.
+  # Update the suffix rules map.
   foreach my $suffix (@{$lang->extensions})
     {
-      foreach my $dest (&{$lang->output_extensions} ($suffix))
+      foreach my $dest ($lang->output_extensions->($suffix))
        {
          register_suffix_rule (INTERNAL, $suffix, $dest);
        }
@@ -6236,28 +5875,25 @@ sub register_language (%)
 # --------------------------
 # This function is used to find a path from a user-specified suffix $EXT
 # to $OBJ or to some other suffix we recognize internally, e.g. 'cc'.
-sub derive_suffix ($$)
+sub derive_suffix
 {
   my ($source_ext, $obj) = @_;
 
-  while (! $extension_map{$source_ext}
-        && $source_ext ne $obj
-        && exists $suffix_rules->{$source_ext}
-        && exists $suffix_rules->{$source_ext}{$obj})
+  while (!$extension_map{$source_ext} && $source_ext ne $obj)
     {
-      $source_ext = $suffix_rules->{$source_ext}{$obj}[0];
+      my $new_source_ext = next_in_suffix_chain ($source_ext, $obj);
+      last if not defined $new_source_ext;
+      $source_ext = $new_source_ext;
     }
 
   return $source_ext;
 }
 
 
-################################################################
-
-# Pretty-print something and append to output_rules.
+# Pretty-print something and append to '$output_rules'.
 sub pretty_print_rule
 {
-    $output_rules .= &makefile_wrap (@_);
+    $output_rules .= makefile_wrap (shift, shift, @_);
 }
 
 
@@ -6272,7 +5908,7 @@ sub pretty_print_rule
 # $STRING
 # make_conditional_string ($NEGATE, $COND)
 # ----------------------------------------
-sub make_conditional_string ($$)
+sub make_conditional_string
 {
   my ($negate, $cond) = @_;
   $cond = "${cond}_TRUE"
@@ -6300,7 +5936,7 @@ my %_am_macro_for_cond =
 # $COND
 # cond_stack_if ($NEGATE, $COND, $WHERE)
 # --------------------------------------
-sub cond_stack_if ($$$)
+sub cond_stack_if
 {
   my ($negate, $cond, $where) = @_;
 
@@ -6330,7 +5966,7 @@ sub cond_stack_if ($$$)
 # $COND
 # cond_stack_else ($NEGATE, $COND, $WHERE)
 # ----------------------------------------
-sub cond_stack_else ($$$)
+sub cond_stack_else
 {
   my ($negate, $cond, $where) = @_;
 
@@ -6360,7 +5996,7 @@ sub cond_stack_else ($$$)
 # $COND
 # cond_stack_endif ($NEGATE, $COND, $WHERE)
 # -----------------------------------------
-sub cond_stack_endif ($$$)
+sub cond_stack_endif
 {
   my ($negate, $cond, $where) = @_;
   my $old_cond;
@@ -6395,15 +6031,15 @@ sub cond_stack_endif ($$$)
 ## ------------------------ ##
 
 
-# &define_pretty_variable ($VAR, $COND, $WHERE, @VALUE)
-# -----------------------------------------------------
+# define_pretty_variable ($VAR, $COND, $WHERE, @VALUE)
+# ----------------------------------------------------
 # Like define_variable, but the value is a list, and the variable may
 # be defined conditionally.  The second argument is the condition
 # under which the value should be defined; this should be the empty
 # string to define the variable unconditionally.  The third argument
 # is a list holding the values to use for the variable.  The value is
 # pretty printed in the output file.
-sub define_pretty_variable ($$$@)
+sub define_pretty_variable
 {
     my ($var, $cond, $where, @value) = @_;
 
@@ -6420,7 +6056,7 @@ sub define_pretty_variable ($$$@)
 # --------------------------------------
 # Define a new Automake Makefile variable VAR to VALUE, but only if
 # not already defined.
-sub define_variable ($$$)
+sub define_variable
 {
     my ($var, $value, $where) = @_;
     define_pretty_variable ($var, TRUE, $where, $value);
@@ -6442,14 +6078,14 @@ sub define_files_variable ($\@$$)
 
 # Like define_variable, but define a variable to be the configure
 # substitution by the same name.
-sub define_configure_variable ($)
+sub define_configure_variable
 {
   my ($var) = @_;
   # Some variables we do not want to output.  For instance it
   # would be a bad idea to output `U = @U@` when `@U@` can be
   # substituted as `\`.
   my $pretty = exists $ignored_configure_vars{$var} ? VAR_SILENT : VAR_ASIS;
-  Automake::Variable::define ($var, VAR_CONFIGURE, '', TRUE, subst $var,
+  Automake::Variable::define ($var, VAR_CONFIGURE, '', TRUE, subst ($var),
                              '', $configure_vars{$var}, $pretty);
 }
 
@@ -6458,7 +6094,7 @@ sub define_configure_variable ($)
 # --------------------------------
 # Define a compiler variable.  We also handle defining the 'LT'
 # version of the command when using libtool.
-sub define_compiler_variable ($)
+sub define_compiler_variable
 {
     my ($lang) = @_;
 
@@ -6466,23 +6102,20 @@ sub define_compiler_variable ($)
     my $libtool_tag = '';
     $libtool_tag = '--tag=' . $lang->libtool_tag . ' '
       if $lang->libtool_tag && exists $libtool_tags{$lang->libtool_tag};
-    &define_variable ($var, $value, INTERNAL);
+    define_variable ($var, $value, INTERNAL);
     if (var ('LIBTOOL'))
       {
        my $verbose = define_verbose_libtool ();
-       &define_variable ("LT$var",
-                         "\$(LIBTOOL) $verbose $libtool_tag\$(AM_LIBTOOLFLAGS) "
-                         . "\$(LIBTOOLFLAGS) --mode=compile $value",
-                         INTERNAL);
+       define_variable ("LT$var",
+                         "\$(LIBTOOL) $verbose $libtool_tag\$(AM_LIBTOOLFLAGS)"
+                         . " \$(LIBTOOLFLAGS) --mode=compile $value",
+                         INTERNAL);
       }
     define_verbose_tagvar ($lang->ccer || 'GEN');
 }
 
 
-# define_linker_variable ($LANG)
-# ------------------------------
-# Define linker variables.
-sub define_linker_variable ($)
+sub define_linker_variable
 {
     my ($lang) = @_;
 
@@ -6490,7 +6123,7 @@ sub define_linker_variable ($)
     $libtool_tag = '--tag=' . $lang->libtool_tag . ' '
       if $lang->libtool_tag && exists $libtool_tags{$lang->libtool_tag};
     # CCLD = $(CC).
-    &define_variable ($lang->lder, $lang->ld, INTERNAL);
+    define_variable ($lang->lder, $lang->ld, INTERNAL);
     # CCLINK = $(CCLD) blah blah...
     my $link = '';
     if (var ('LIBTOOL'))
@@ -6499,12 +6132,12 @@ sub define_linker_variable ($)
        $link = "\$(LIBTOOL) $verbose $libtool_tag\$(AM_LIBTOOLFLAGS) "
                . "\$(LIBTOOLFLAGS) --mode=link ";
       }
-    &define_variable ($lang->linker, $link . $lang->link, INTERNAL);
-    &define_variable ($lang->compiler,  $lang);
-    &define_verbose_tagvar ($lang->lder || 'GEN');
+    define_variable ($lang->linker, $link . $lang->link, INTERNAL);
+    define_variable ($lang->compiler, $lang, INTERNAL);
+    define_verbose_tagvar ($lang->lder || 'GEN');
 }
 
-sub define_per_target_linker_variable ($$)
+sub define_per_target_linker_variable
 {
   my ($linker, $target) = @_;
 
@@ -6548,14 +6181,14 @@ sub define_per_target_linker_variable ($$)
   return ($lang->linker, $lang->lder)
     if $link_command eq $orig_command;
 
-  &define_variable ("${target}_LINK", $link_command, INTERNAL);
+  define_variable ("${target}_LINK", $link_command, INTERNAL);
   return ("${target}_LINK", $lang->lder);
 }
 
 ################################################################
 
-# &check_trailing_slash ($WHERE, $LINE)
-# -------------------------------------
+# check_trailing_slash ($WHERE, $LINE)
+# ------------------------------------
 # Return 1 iff $LINE ends with a slash.
 # Might modify $LINE.
 sub check_trailing_slash ($\$)
@@ -6573,15 +6206,19 @@ sub check_trailing_slash ($\$)
 }
 
 
-# &read_am_file ($AMFILE, $WHERE)
-# -------------------------------
-# Read Makefile.am and set up %contents.  Simultaneously copy lines
-# from Makefile.am into $output_trailer, or define variables as
-# appropriate.  NOTE we put rules in the trailer section.  We want
-# user rules to come after our generated stuff.
-sub read_am_file ($$)
+# read_am_file ($AMFILE, $WHERE, $RELDIR)
+# ---------------------------------------
+# Read $AMFILE file name which is located in $RELDIR, and set up
+# global variables resetted by '&generate_makefile'.  Simultaneously
+# copy lines from $AMFILE into '$output_trailer', or define variables
+# as appropriate.
+#
+# NOTE: We put rules in the trailer section.  We want user rules to
+# come after our generated stuff.
+sub read_am_file
 {
-    my ($amfile, $where) = @_;
+    my ($amfile, $where, $reldir) = @_;
+    my $canon_reldir = &canonicalize ($reldir);
 
     my $am_file = new Automake::XFile ("< $amfile");
     verb "reading $amfile";
@@ -6666,6 +6303,17 @@ sub read_am_file ($$)
 
        my $new_saw_bk = check_trailing_slash ($where, $_);
 
+       if ($reldir eq '.')
+         {
+           # If present, eat the following '_' or '/', converting
+           # "%reldir%/foo" and "%canon_reldir%_foo" into plain "foo"
+           # when $reldir is '.'.
+           $_ =~ s,%(D|reldir)%/,,g;
+           $_ =~ s,%(C|canon_reldir)%_,,g;
+         }
+       $_ =~ s/%(D|reldir)%/${reldir}/g;
+       $_ =~ s/%(C|canon_reldir)%/${canon_reldir}/g;
+
        if (/$IGNORE_PATTERN/o)
        {
            # Merely delete comments beginning with two hashes.
@@ -6812,7 +6460,7 @@ sub read_am_file ($$)
                # otherwise OSF make will implicitly copy the included
                # file in the build tree during "make distdir" to satisfy
                # the dependency.
-               # (subdircond2.test and subdircond3.test will fail.)
+               # (subdir-am-cond.sh and subdir-ac-cond.sh will fail)
                push_dist_common ("\$\(top_srcdir\)/$path");
              }
            else
@@ -6823,12 +6471,14 @@ sub read_am_file ($$)
                # otherwise OSF make will implicitly copy the included
                # file in the build tree during "make distdir" to satisfy
                # the dependency.
-               # (subdircond2.test and subdircond3.test will fail.)
+               # (subdir-am-cond.sh and subdir-ac-cond.sh will fail)
                push_dist_common ("\$\(srcdir\)/$path");
                $path = $relative_dir . "/" . $path if $relative_dir ne '.';
              }
+           my $new_reldir = File::Spec->abs2rel ($path, $relative_dir);
+           $new_reldir = '.' if $new_reldir !~ s,/[^/]*$,,;
            $where->push_context ("'$path' included from here");
-           &read_am_file ($path, $where);
+           read_am_file ($path, $where, $new_reldir);
            $where->pop_context;
        }
        else
@@ -6861,11 +6511,9 @@ sub read_am_file ($$)
 }
 
 
-# define_standard_variables ()
-# ----------------------------
 # A helper for read_main_am_file which initializes configure variables
 # and variables from header-vars.am.
-sub define_standard_variables
+sub define_standard_variables ()
 {
   my $saved_output_vars = $output_vars;
   my ($comments, undef, $rules) =
@@ -6874,16 +6522,18 @@ sub define_standard_variables
 
   foreach my $var (sort keys %configure_vars)
     {
-      &define_configure_variable ($var);
+      define_configure_variable ($var);
     }
 
   $output_vars .= $comments . $rules;
 }
 
-# Read main am file.
+
+# read_main_am_file ($MAKEFILE_AM, $MAKEFILE_IN)
+# ----------------------------------------------
 sub read_main_am_file
 {
-    my ($amfile) = @_;
+    my ($amfile, $infile) = @_;
 
     # This supports the strange variable tricks we are about to play.
     prog_error ("variable defined before read_main_am_file\n" . variables_dump ())
@@ -6891,27 +6541,26 @@ sub read_main_am_file
 
     # Generate copyright header for generated Makefile.in.
     # We do discard the output of predefined variables, handled below.
-    $output_vars = ("# $in_file_name generated by automake "
-                  . $VERSION . " from $am_file_name.\n");
+    $output_vars = ("# " . basename ($infile) . " generated by automake "
+                  . $VERSION . " from " . basename ($amfile) . ".\n");
     $output_vars .= '# ' . subst ('configure_input') . "\n";
     $output_vars .= $gen_copyright;
 
     # We want to predefine as many variables as possible.  This lets
     # the user set them with '+=' in Makefile.am.
-    &define_standard_variables;
+    define_standard_variables;
 
     # Read user file, which might override some of our values.
-    &read_am_file ($amfile, new Automake::Location);
+    read_am_file ($amfile, new Automake::Location, '.');
 }
 
 
 
 ################################################################
 
-# $FLATTENED
-# &flatten ($STRING)
-# ------------------
-# Flatten the $STRING and return the result.
+# $STRING
+# flatten ($ORIGINAL_STRING)
+# --------------------------
 sub flatten
 {
   $_ = shift;
@@ -6926,10 +6575,10 @@ sub flatten
 
 
 # transform_token ($TOKEN, \%PAIRS, $KEY)
-# =======================================
+# ---------------------------------------
 # Return the value associated to $KEY in %PAIRS, as used on $TOKEN
 # (which should be ?KEY? or any of the special %% requests)..
-sub transform_token ($$$)
+sub transform_token ($\%$)
 {
   my ($token, $transform, $key) = @_;
   my $res = $transform->{$key};
@@ -6939,14 +6588,12 @@ sub transform_token ($$$)
 
 
 # transform ($TOKEN, \%PAIRS)
-# ===========================
+# ---------------------------
 # If ($TOKEN, $VAL) is in %PAIRS:
 #   - replaces %KEY% with $VAL,
 #   - enables/disables ?KEY? and ?!KEY?,
 #   - replaces %?KEY% with TRUE or FALSE.
-#   - replaces %KEY?IFTRUE%, %KEY:IFFALSE%, and %KEY?IFTRUE:IFFALSE% with
-#     IFTRUE / IFFALSE, as appropriate.
-sub transform ($$)
+sub transform ($\%)
 {
   my ($token, $transform) = @_;
 
@@ -6955,23 +6602,18 @@ sub transform ($$)
   # when there is neither IFTRUE nor IFFALSE.
   if ($token =~ /^%([\w\-]+)%$/)
     {
-      return transform_token ($token, $transform, $1);
-    }
-  # %KEY?IFTRUE%, %KEY:IFFALSE%, and %KEY?IFTRUE:IFFALSE%.
-  elsif ($token =~ /^%([\w\-]+)(?:\?([^?:%]+))?(?::([^?:%]+))?%$/)
-    {
-      return transform_token ($token, $transform, $1) ? ($2 || '') : ($3 || '');
+      return transform_token ($token, %$transform, $1);
     }
   # %?KEY%.
   elsif ($token =~ /^%\?([\w\-]+)%$/)
     {
-      return transform_token ($token, $transform, $1) ? 'TRUE' : 'FALSE';
+      return transform_token ($token, %$transform, $1) ? 'TRUE' : 'FALSE';
     }
   # ?KEY? and ?!KEY?.
   elsif ($token =~ /^ \? (!?) ([\w\-]+) \? $/x)
     {
       my $neg = ($1 eq '!') ? 1 : 0;
-      my $val = transform_token ($token, $transform, $2);
+      my $val = transform_token ($token, %$transform, $2);
       return (!!$val == $neg) ? '##%' : '';
     }
   else
@@ -6984,20 +6626,18 @@ sub transform ($$)
 # preprocess_file ($MAKEFILE, [%TRANSFORM])
 # -----------------------------------------
 # Load a $MAKEFILE, apply the %TRANSFORM, and return the result.
-# No extra parsing of post-processing is done (i.e., recognition of
+# No extra parsing or post-processing is done (i.e., recognition of
 # rules declaration or of make variables definitions).
-sub preprocess_file ($%)
+sub preprocess_file
 {
   my ($file, %transform) = @_;
 
   # Complete %transform with global options.
   # Note that %transform goes last, so it overrides global options.
-  %transform = ('CYGNUS'      => !! option 'cygnus',
-                'MAINTAINER-MODE'
+  %transform = ( 'MAINTAINER-MODE'
                 => $seen_maint_mode ? subst ('MAINTAINER_MODE_TRUE') : '',
 
                 'XZ'          => !! option 'dist-xz',
-                'LZMA'        => !! option 'dist-lzma',
                 'LZIP'        => !! option 'dist-lzip',
                 'BZIP2'       => !! option 'dist-bzip2',
                 'COMPRESS'    => !! option 'dist-tarZ',
@@ -7007,7 +6647,6 @@ sub preprocess_file ($%)
 
                 'INSTALL-INFO' =>  ! option 'no-installinfo',
                 'INSTALL-MAN'  =>  ! option 'no-installman',
-                'HAVE-MANS'    => !! var ('MANS'),
                 'CK-NEWS'      => !! option 'check-news',
 
                 'SUBDIRS'      => !! var ('SUBDIRS'),
@@ -7040,9 +6679,8 @@ sub preprocess_file ($%)
 
   # Substitute Automake template tokens.
   s/(?: % \?? [\w\-]+ %
-      | % [\w\-]+ (?:\?[^?:%]+)? (?::[^?:%]+)? %
       | \? !? [\w\-]+ \?
-    )/transform($&, \%transform)/gex;
+    )/transform($&, %transform)/gex;
   # transform() may have added some ##%-comments to strip.
   # (we use '##%' instead of '##' so we can distinguish ##%##%##% from
   # ####### and do not remove the latter.)
@@ -7053,11 +6691,11 @@ sub preprocess_file ($%)
 
 
 # @PARAGRAPHS
-# &make_paragraphs ($MAKEFILE, [%TRANSFORM])
-# ------------------------------------------
+# make_paragraphs ($MAKEFILE, [%TRANSFORM])
+# -----------------------------------------
 # Load a $MAKEFILE, apply the %TRANSFORM, and return it as a list of
 # paragraphs.
-sub make_paragraphs ($%)
+sub make_paragraphs
 {
   my ($file, %transform) = @_;
   $transform{FIRST} = !$transformed_files{$file};
@@ -7099,12 +6737,12 @@ sub make_paragraphs ($%)
 
 
 # ($COMMENT, $VARIABLES, $RULES)
-# &file_contents_internal ($IS_AM, $FILE, $WHERE, [%TRANSFORM])
-# -------------------------------------------------------------
+# file_contents_internal ($IS_AM, $FILE, $WHERE, [%TRANSFORM])
+# ------------------------------------------------------------
 # Return contents of a file from $libdir/am, automatically skipping
 # macros or rules which are already known. $IS_AM iff the caller is
 # reading an Automake file (as opposed to the user's Makefile.am).
-sub file_contents_internal ($$$%)
+sub file_contents_internal
 {
     my ($is_am, $file, $where, %transform) = @_;
 
@@ -7198,7 +6836,7 @@ sub file_contents_internal ($$$%)
          my ($targets, $dependencies) = ($1, $2);
          # Remove the escaped new lines.
          # I don't know why, but I have to use a tmp $flat_deps.
-         my $flat_deps = &flatten ($dependencies);
+         my $flat_deps = flatten ($dependencies);
          my @deps = split (' ', $flat_deps);
 
          foreach (split (' ', $targets))
@@ -7222,7 +6860,7 @@ sub file_contents_internal ($$$%)
              # Output only if not in FALSE.
              if (defined $dependencies{$_} && $cond != FALSE)
                {
-                 &depend ($_, @deps);
+                 depend ($_, @deps);
                  register_action ($_, $actions);
                }
              else
@@ -7292,11 +6930,11 @@ sub file_contents_internal ($$$%)
 
 
 # $CONTENTS
-# &file_contents ($BASENAME, $WHERE, [%TRANSFORM])
-# ------------------------------------------------
+# file_contents ($BASENAME, $WHERE, [%TRANSFORM])
+# -----------------------------------------------
 # Return contents of a file from $libdir/am, automatically skipping
 # macros or rules which are already known.
-sub file_contents ($$%)
+sub file_contents
 {
     my ($basename, $where, %transform) = @_;
     my ($comments, $variables, $rules) =
@@ -7307,8 +6945,8 @@ sub file_contents ($$%)
 
 
 # @PREFIX
-# &am_primary_prefixes ($PRIMARY, $CAN_DIST, @PREFIXES)
-# -----------------------------------------------------
+# am_primary_prefixes ($PRIMARY, $CAN_DIST, @PREFIXES)
+# ----------------------------------------------------
 # Find all variable prefixes that are used for install directories.  A
 # prefix 'zar' qualifies iff:
 #
@@ -7322,7 +6960,7 @@ sub file_contents ($$%)
 # variable "zardir" is defined, then "zar_PROGRAMS" becomes valid.
 # This is to provide a little extra flexibility in those cases which
 # need it.
-sub am_primary_prefixes ($$@)
+sub am_primary_prefixes
 {
   my ($primary, $can_dist, @prefixes) = @_;
 
@@ -7382,6 +7020,9 @@ sub am_primary_prefixes ($$@)
 }
 
 
+# am_install_var (-OPTION..., file, HOW, where...)
+# ------------------------------------------------
+#
 # Handle 'where_HOW' variable magic.  Does all lookups, generates
 # install code, and possibly generates code to define the primary
 # variable.  The first argument is the name of the .am file to munge,
@@ -7396,7 +7037,6 @@ sub am_primary_prefixes ($$@)
 # FIXME: this should be rewritten to be cleaner.  It should be broken
 # up into multiple functions.
 #
-# Usage is: am_install_var (OPTION..., file, HOW, where...)
 sub am_install_var
 {
   my (@args) = @_;
@@ -7501,11 +7141,12 @@ sub am_install_var
            }
          else
            {
-             # Strip any $(EXEEXT) suffix the user might have added, or this
-             # will confuse &handle_source_transform and &check_canonical_spelling.
+             # Strip any $(EXEEXT) suffix the user might have added,
+              # or this will confuse handle_source_transform() and
+              # check_canonical_spelling().
              # We'll add $(EXEEXT) back later anyway.
-             # Do it here rather than in handle_programs so the uniquifying at the
-             # end of this function works.
+             # Do it here rather than in handle_programs so the
+              # uniquifying at the end of this function works.
              ${$locvals}[1] =~ s/\$\(EXEEXT\)$//
                if $primary eq 'PROGRAMS';
 
@@ -7549,18 +7190,17 @@ sub am_install_var
 
       # Singular form of $PRIMARY.
       (my $one_primary = $primary) =~ s/S$//;
-      $output_rules .= &file_contents ($file, $where,
-                                      PRIMARY     => $primary,
-                                      ONE_PRIMARY => $one_primary,
-                                      DIR         => $X,
-                                      NDIR        => $nodir_name,
-                                      BASE        => $strip_subdir,
-
-                                      EXEC      => $exec_p,
-                                      INSTALL   => $install_p,
-                                      DIST      => $dist_p,
-                                      DISTVAR   => $distvar,
-                                      'CK-OPTS' => $check_options_p);
+      $output_rules .= file_contents ($file, $where,
+                                      PRIMARY     => $primary,
+                                      ONE_PRIMARY => $one_primary,
+                                      DIR         => $X,
+                                      NDIR        => $nodir_name,
+                                      BASE        => $strip_subdir,
+                                      EXEC        => $exec_p,
+                                      INSTALL     => $install_p,
+                                      DIST        => $dist_p,
+                                      DISTVAR     => $distvar,
+                                      'CK-OPTS'   => $check_options_p);
     }
 
   # The JAVA variable is used as the name of the Java interpreter.
@@ -7603,6 +7243,8 @@ sub am_install_var
 my %make_dirs = ();
 my $make_dirs_set = 0;
 
+# is_make_dir ($DIRECTORY)
+# ------------------------
 sub is_make_dir
 {
     my ($dir) = @_;
@@ -7654,8 +7296,8 @@ sub locate_aux_dir ()
 }
 
 
-# &push_required_file ($DIR, $FILE, $FULLFILE)
-# --------------------------------------------------
+# push_required_file ($DIR, $FILE, $FULLFILE)
+# -------------------------------------------
 # Push the given file onto DIST_COMMON.
 sub push_required_file
 {
@@ -7670,7 +7312,7 @@ sub push_required_file
     }
   # This is needed to allow a construct in a non-top-level Makefile.am
   # to require a file in the build-aux directory (see at least the test
-  # script 'test-driver-is-distributed.test').  This is related to the
+  # script 'test-driver-is-distributed.sh').  This is related to the
   # automake bug#9546.  Note that the use of $config_aux_dir instead
   # of $am_config_aux_dir here is deliberate and necessary.
   elsif ($dir eq $config_aux_dir)
@@ -7691,7 +7333,7 @@ sub push_required_file
       $am_config_libobj_dir =~ s|/*$||;
       push_dist_common ("$am_config_libobj_dir/$file");
     }
-  elsif ($relative_dir eq '.' && ! &is_make_dir ($dir))
+  elsif ($relative_dir eq '.' && ! is_make_dir ($dir))
     {
       # If we are doing the topmost directory, and the file is in a
       # subdir which does not have a Makefile, then we distribute it
@@ -7741,10 +7383,10 @@ sub push_required_file
 # than once.
 my %required_file_not_found = ();
 
-# &required_file_check_or_copy ($WHERE, $DIRECTORY, $FILE)
-# --------------------------------------------------------
+# required_file_check_or_copy ($WHERE, $DIRECTORY, $FILE)
+# -------------------------------------------------------
 # Verify that the file must exist in $DIRECTORY, or install it.
-sub required_file_check_or_copy ($$$)
+sub required_file_check_or_copy
 {
   my ($where, $dir, $file) = @_;
 
@@ -7766,11 +7408,10 @@ sub required_file_check_or_copy ($$$)
   return
     if $found_it && (! $add_missing || ! $force_missing);
 
-  # If we've already looked for it, we're done.  You might
-  # wonder why we don't do this before searching for the
-  # file.  If we do that, then something like
-  # AC_OUTPUT(subdir/foo foo) will fail to put foo.in into
-  # DIST_COMMON.
+  # If we've already looked for it, we're done.  You might wonder why we
+  # don't do this before searching for the file.  If we do that, then
+  # something like AC_OUTPUT([subdir/foo foo]) will fail to put 'foo.in'
+  # into $(DIST_COMMON).
   if (! $found_it)
     {
       return if defined $required_file_not_found{$fullfile};
@@ -7850,13 +7491,13 @@ sub required_file_check_or_copy ($$$)
 }
 
 
-# &require_file_internal ($WHERE, $MYSTRICT, $DIRECTORY, $QUEUE, @FILES)
-# ----------------------------------------------------------------------
+# require_file_internal ($WHERE, $MYSTRICT, $DIRECTORY, $QUEUE, @FILES)
+# ---------------------------------------------------------------------
 # Verify that the file must exist in $DIRECTORY, or install it.
 # $MYSTRICT is the strictness level at which this file becomes required.
 # Worker threads may queue up the action to be serialized by the master,
 # if $QUEUE is true
-sub require_file_internal ($$$@)
+sub require_file_internal
 {
   my ($where, $mystrict, $dir, $queue, @files) = @_;
 
@@ -7879,28 +7520,28 @@ sub require_file_internal ($$$@)
     }
 }
 
-# &require_file ($WHERE, $MYSTRICT, @FILES)
-# -----------------------------------------
-sub require_file ($$@)
+# require_file ($WHERE, $MYSTRICT, @FILES)
+# ----------------------------------------
+sub require_file
 {
     my ($where, $mystrict, @files) = @_;
     require_file_internal ($where, $mystrict, $relative_dir, 0, @files);
 }
 
-# &require_file_with_macro ($COND, $MACRO, $MYSTRICT, @FILES)
-# -----------------------------------------------------------
-sub require_file_with_macro ($$$@)
+# require_file_with_macro ($COND, $MACRO, $MYSTRICT, @FILES)
+# ----------------------------------------------------------
+sub require_file_with_macro
 {
     my ($cond, $macro, $mystrict, @files) = @_;
     $macro = rvar ($macro) unless ref $macro;
     require_file ($macro->rdef ($cond)->location, $mystrict, @files);
 }
 
-# &require_libsource_with_macro ($COND, $MACRO, $MYSTRICT, @FILES)
-# ----------------------------------------------------------------
+# require_libsource_with_macro ($COND, $MACRO, $MYSTRICT, @FILES)
+# ---------------------------------------------------------------
 # Require an AC_LIBSOURCEd file.  If AC_CONFIG_LIBOBJ_DIR was called, it
 # must be in that directory.  Otherwise expect it in the current directory.
-sub require_libsource_with_macro ($$$@)
+sub require_libsource_with_macro
 {
     my ($cond, $macro, $mystrict, @files) = @_;
     $macro = rvar ($macro) unless ref $macro;
@@ -7915,10 +7556,10 @@ sub require_libsource_with_macro ($$$@)
       }
 }
 
-# &queue_required_file_check_or_copy ($QUEUE, $KEY, $DIR, $WHERE,
-#                                     $MYSTRICT, @FILES)
-# ---------------------------------------------------------------
-sub queue_required_file_check_or_copy ($$$$@)
+# queue_required_file_check_or_copy ($QUEUE, $KEY, $DIR, $WHERE,
+#                                    $MYSTRICT, @FILES)
+# --------------------------------------------------------------
+sub queue_required_file_check_or_copy
 {
     my ($queue, $key, $dir, $where, $mystrict, @files) = @_;
     my @serial_loc;
@@ -7933,9 +7574,9 @@ sub queue_required_file_check_or_copy ($$$$@)
     $queue->enqueue ($key, $dir, @serial_loc, $mystrict, 0 + @files, @files);
 }
 
-# &require_queued_file_check_or_copy ($QUEUE)
-# -------------------------------------------
-sub require_queued_file_check_or_copy ($)
+# require_queued_file_check_or_copy ($QUEUE)
+# ------------------------------------------
+sub require_queued_file_check_or_copy
 {
     my ($queue) = @_;
     my $where;
@@ -7966,10 +7607,10 @@ sub require_queued_file_check_or_copy ($)
       }
 }
 
-# &require_conf_file ($WHERE, $MYSTRICT, @FILES)
-# ----------------------------------------------
+# require_conf_file ($WHERE, $MYSTRICT, @FILES)
+# ---------------------------------------------
 # Looks in configuration path, as specified by AC_CONFIG_AUX_DIR.
-sub require_conf_file ($$@)
+sub require_conf_file
 {
     my ($where, $mystrict, @files) = @_;
     my $queue = defined $required_conf_file_queue ? 1 : 0;
@@ -7978,9 +7619,9 @@ sub require_conf_file ($$@)
 }
 
 
-# &require_conf_file_with_macro ($COND, $MACRO, $MYSTRICT, @FILES)
-# ----------------------------------------------------------------
-sub require_conf_file_with_macro ($$$@)
+# require_conf_file_with_macro ($COND, $MACRO, $MYSTRICT, @FILES)
+# ---------------------------------------------------------------
+sub require_conf_file_with_macro
 {
     my ($cond, $macro, $mystrict, @files) = @_;
     require_conf_file (rvar ($macro)->rdef ($cond)->location,
@@ -7989,14 +7630,14 @@ sub require_conf_file_with_macro ($$$@)
 
 ################################################################
 
-# &require_build_directory ($DIRECTORY)
-# -------------------------------------
+# require_build_directory ($DIRECTORY)
+# ------------------------------------
 # Emit rules to create $DIRECTORY if needed, and return
 # the file that any target requiring this directory should be made
 # dependent upon.
 # We don't want to emit the rule twice, and want to reuse it
 # for directories with equivalent names (e.g., 'foo/bar' and './foo//bar').
-sub require_build_directory ($)
+sub require_build_directory
 {
   my $directory = shift;
 
@@ -8030,12 +7671,12 @@ sub require_build_directory ($)
   return $dirstamp;
 }
 
-# &require_build_directory_maybe ($FILE)
-# --------------------------------------
+# require_build_directory_maybe ($FILE)
+# -------------------------------------
 # If $FILE lies in a subdirectory, emit a rule to create this
 # directory and return the file that $FILE should be made
 # dependent upon.  Otherwise, just return the empty string.
-sub require_build_directory_maybe ($)
+sub require_build_directory_maybe
 {
     my $file = shift;
     my $directory = dirname ($file);
@@ -8052,13 +7693,12 @@ sub require_build_directory_maybe ($)
 
 ################################################################
 
-# Push a list of files onto dist_common.
+# Push a list of files onto '@dist_common'.
 sub push_dist_common
 {
   prog_error "push_dist_common run after handle_dist"
     if $handle_dist_run;
-  Automake::Variable::define ('DIST_COMMON', VAR_AUTOMAKE, '+', TRUE, "@_",
-                             '', INTERNAL, VAR_PRETTY);
+  push @dist_common, @_;
 }
 
 
@@ -8068,7 +7708,7 @@ sub push_dist_common
 # ----------------------------------------------
 # Generate a Makefile.in given the name of the corresponding Makefile and
 # the name of the file output by config.status.
-sub generate_makefile ($$)
+sub generate_makefile
 {
   my ($makefile_am, $makefile_in) = @_;
 
@@ -8080,24 +7720,17 @@ sub generate_makefile ($$)
   # we have processed AUTOMAKE_OPTIONS.
   buffer_messages ('warning');
 
-  # Name of input file ("Makefile.am") and output file
-  # ("Makefile.in").  These have no directory components.
-  $am_file_name = basename ($makefile_am);
-  $in_file_name = basename ($makefile_in);
-
   # $OUTPUT is encoded.  If it contains a ":" then the first element
   # is the real output file, and all remaining elements are input
   # files.  We don't scan or otherwise deal with these input files,
-  # other than to mark them as dependencies.  See
-  # &scan_autoconf_files for details.
+  # other than to mark them as dependencies.  See the subroutine
+  # 'scan_autoconf_files' for details.
   my ($makefile, @inputs) = split (/:/, $output_files{$makefile_in});
 
   $relative_dir = dirname ($makefile);
-  $am_relative_dir = dirname ($makefile_am);
-  $topsrcdir = backname ($relative_dir);
 
-  read_main_am_file ($makefile_am);
-  if (handle_options)
+  read_main_am_file ($makefile_am, $makefile_in);
+  if (not handle_options)
     {
       # Process buffered warnings.
       flush_messages;
@@ -8135,7 +7768,6 @@ sub generate_makefile ($$)
     if var 'DIST_SUBDIRS' && ! var 'SUBDIRS';
 
   # Check first, because we might modify some state.
-  check_cygnus;
   check_gnu_standards;
   check_gnits_standards;
 
@@ -8146,9 +7778,11 @@ sub generate_makefile ($$)
   handle_programs;
   handle_scripts;
 
-  # These must be run after all the sources are scanned.  They
-  # use variables defined by &handle_libraries, &handle_ltlibraries,
-  # or &handle_programs.
+  handle_silent;
+
+  # These must be run after all the sources are scanned.  They use
+  # variables defined by handle_libraries(), handle_ltlibraries(),
+  # or handle_programs().
   handle_compile;
   handle_languages;
   handle_libtool;
@@ -8168,6 +7802,7 @@ sub generate_makefile ($$)
   handle_data;
   handle_headers;
   handle_subdirs;
+  handle_user_recursion;
   handle_tags;
   handle_minor_options;
   # Must come after handle_programs so that %known_programs is up-to-date.
@@ -8206,6 +7841,7 @@ sub generate_makefile ($$)
       return;
     }
 
+  my $am_relative_dir = dirname ($makefile_am);
   mkdir ($am_relative_dir, 0755) if ! -d $am_relative_dir;
 
   # We make sure that 'all:' is the first target.
@@ -8247,17 +7883,14 @@ sub generate_makefile ($$)
   print $gm_file $output;
 }
 
-################################################################
-
-
-
 
 ################################################################
 
+
 # Helper function for usage().
-sub print_autodist_files (@)
+sub print_autodist_files
 {
-  my @lcomm = sort (&uniq (@_));
+  my @lcomm = uniq (sort @_);
 
   my @four;
   format USAGE_FORMAT =
@@ -8298,7 +7931,6 @@ sub print_autodist_files (@)
 }
 
 
-# Print usage information.
 sub usage ()
 {
     print "Usage: $0 [OPTION]... [Makefile]...
@@ -8317,7 +7949,6 @@ Dependency tracking:
       --include-deps     enable dependency tracking code
 
 Flavors:
-      --cygnus           assume program is part of Cygnus-style tree
       --foreign          set strictness to foreign
       --gnits            set strictness to gnits
       --gnu              set strictness to gnu
@@ -8350,9 +7981,6 @@ General help using GNU software: <http://www.gnu.org/gethelp/>.
 }
 
 
-# &version ()
-# -----------
-# Print version information
 sub version ()
 {
   print <<EOF;
@@ -8375,7 +8003,6 @@ EOF
 sub parse_arguments ()
 {
   my $strict = 'gnu';
-  my $cygnus = 0;
   my $ignore_deps = 0;
   my @warnings = ();
 
@@ -8388,7 +8015,6 @@ sub parse_arguments ()
      'gnu'             => sub { $strict = 'gnu'; },
      'gnits'           => sub { $strict = 'gnits'; },
      'foreign'         => sub { $strict = 'foreign'; },
-     'cygnus'          => \$cygnus,
      'include-deps'    => sub { $ignore_deps = 0; },
      'i|ignore-deps'   => sub { $ignore_deps = 1; },
      'no-force'        => sub { $force_generation = 0; },
@@ -8404,11 +8030,10 @@ sub parse_arguments ()
 
   set_strictness ($strict);
   my $cli_where = new Automake::Location;
-  set_global_option ('cygnus', $cli_where) if $cygnus;
   set_global_option ('no-dependencies', $cli_where) if $ignore_deps;
   for my $warning (@warnings)
     {
-      &parse_warnings ('-W', $warning);
+      parse_warnings ('-W', $warning);
     }
 
   return unless @ARGV;
@@ -8439,10 +8064,9 @@ sub parse_arguments ()
 }
 
 
-# handle_makefile ($MAKEFILE_IN)
-# ------------------------------
-# Deal with $MAKEFILE_IN.
-sub handle_makefile ($)
+# handle_makefile ($MAKEFILE)
+# ---------------------------
+sub handle_makefile
 {
   my ($file) =  @_;
   ($am_file = $file) =~ s/\.in$//;
@@ -8462,8 +8086,6 @@ sub handle_makefile ($)
     }
 }
 
-# handle_makefiles_serial ()
-# --------------------------
 # Deal with all makefiles, without threads.
 sub handle_makefiles_serial ()
 {
@@ -8473,10 +8095,8 @@ sub handle_makefiles_serial ()
     }
 }
 
-# get_number_of_threads ()
-# ------------------------
 # Logic for deciding how many worker threads to use.
-sub get_number_of_threads
+sub get_number_of_threads ()
 {
   my $nthreads = $ENV{'AUTOMAKE_JOBS'} || 0;
 
@@ -8505,7 +8125,7 @@ sub get_number_of_threads
 #
 # The latter requires that the makefile that deals with the aux dir
 # files be handled last, done by the master thread.
-sub handle_makefiles_threaded ($)
+sub handle_makefiles_threaded
 {
   my ($nthreads) = @_;
 
diff --git a/bin/gen-perl-protos b/bin/gen-perl-protos
new file mode 100755 (executable)
index 0000000..215d275
--- /dev/null
@@ -0,0 +1,36 @@
+#!/usr/bin/env perl
+#
+# Copyright (C) 2013-2017 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 3, 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 warnings;
+use strict;
+
+my @lines = <>;
+my @protos = map { /^(sub \w+\s*\(.*\))/ ? ("$1;") : () } @lines;
+
+while (defined ($_ = shift @lines))
+  {
+    if (/^#!.* prototypes/i)
+      {
+        print "# BEGIN AUTOMATICALLY GENERATED PROTOTYPES\n";
+        print join ("\n", sort @protos) . "\n";
+        print "# END AUTOMATICALLY GENERATED PROTOTYPES\n";
+      }
+    else
+      {
+        print;
+      }
+  }
similarity index 82%
rename from bootstrap.sh
rename to bootstrap
index 4b12d2d..d0766d4 100755 (executable)
+++ b/bootstrap
@@ -2,7 +2,7 @@
 
 # This script helps bootstrap automake, when checked out from git.
 #
-# Copyright (C) 2002-2012 Free Software Foundation, Inc.
+# Copyright (C) 2002-2017 Free Software Foundation, Inc.
 # Originally written by Pavel Roskin <proski@gnu.org> September 2002.
 #
 # This program is free software; you can redistribute it and/or modify
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
+# Since Automake uses itself in its build process, we can't simply run
+# 'autoreconf -i' which would require Automake to already be
+# installed.
+
 # Don't ignore failures.
 set -e
 
@@ -35,10 +39,9 @@ export AUTOM4TE  # ditto
 VERSION=`sed -ne '/AC_INIT/s/^[^[]*\[[^[]*\[\([^]]*\)\].*$/\1/p' configure.ac`
 PACKAGE=automake
 datadir=.
-PERL_THREADS=0
 # This should be automatically updated by the 'update-copyright'
 # rule of our Makefile.
-RELEASE_YEAR=2012
+RELEASE_YEAR=2017
 
 # Override SHELL.  This is required on DJGPP so that Perl's system()
 # uses bash, not COMMAND.COM which doesn't quote arguments properly.
@@ -83,7 +86,6 @@ dosubst ()
   sed -e "s%@APIVERSION@%$APIVERSION%g" \
       -e "s%@PACKAGE@%$PACKAGE%g" \
       -e "s%@PERL@%$PERL%g" \
-      -e "s%@PERL_THREADS@%$PERL_THREADS%g" \
       -e "s%@SHELL@%$BOOTSTRAP_SHELL%g" \
       -e "s%@VERSION@%$VERSION%g" \
       -e "s%@datadir@%$datadir%g" \
@@ -97,27 +99,29 @@ dosubst ()
 dosubst automake-$APIVERSION/Automake/Config.in \
         automake-$APIVERSION/Automake/Config.pm
 
-# Create temporary replacement for aclocal.
-dosubst aclocal.in aclocal.tmp
-
 # Overwrite amversion.m4.
 dosubst m4/amversion.in m4/amversion.m4
 
-# Create temporary replacement for automake.
-dosubst automake.in automake.tmp
+# Create temporary replacement for aclocal and automake.
+for p in bin/aclocal bin/automake; do
+  dosubst $p.in $p.tmp
+  $PERL -w bin/gen-perl-protos $p.tmp > $p.tmp2
+  mv -f $p.tmp2 $p.tmp
+done
 
 # Create required makefile snippets.
 $PERL ./gen-testsuite-part > t/testsuite-part.tmp
 chmod a-w t/testsuite-part.tmp
 mv -f t/testsuite-part.tmp t/testsuite-part.am
 
-# Run the autotools.
+# Run the autotools.  Bail out if any warning is triggered.
 # Use '-I' here so that our own *.m4 files in m4/ gets included,
 # not copied, in aclocal.m4.
-$PERL ./aclocal.tmp -I m4 --automake-acdir m4 --system-acdir m4/acdir
-$AUTOCONF
-$PERL ./automake.tmp
+$PERL ./bin/aclocal.tmp -Wall -Werror -I m4 \
+                        --automake-acdir=m4 --system-acdir=m4/acdir
+$AUTOCONF -Wall -Werror
+$PERL ./bin/automake.tmp -Wall -Werror
 
 # Remove temporary files and directories.
 rm -rf aclocal-$APIVERSION automake-$APIVERSION
-rm -f aclocal.tmp automake.tmp
+rm -f bin/aclocal.tmp bin/automake.tmp
index 8c6cb1a..3466981 100755 (executable)
--- a/configure
+++ b/configure
@@ -1,6 +1,6 @@
 #! /bin/sh
 # Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.69 for GNU Automake 1.12.1.
+# Generated by GNU Autoconf 2.69 for GNU Automake 1.15.1.
 #
 # Report bugs to <bug-automake@gnu.org>.
 #
@@ -580,12 +580,12 @@ MAKEFLAGS=
 # Identity of this package.
 PACKAGE_NAME='GNU Automake'
 PACKAGE_TARNAME='automake'
-PACKAGE_VERSION='1.12.1'
-PACKAGE_STRING='GNU Automake 1.12.1'
+PACKAGE_VERSION='1.15.1'
+PACKAGE_STRING='GNU Automake 1.15.1'
 PACKAGE_BUGREPORT='bug-automake@gnu.org'
 PACKAGE_URL='http://www.gnu.org/software/automake/'
 
-ac_unique_file="automake.in"
+ac_unique_file="bin/automake.in"
 ac_subst_vars='am__EXEEXT_FALSE
 am__EXEEXT_TRUE
 LTLIBOBJS
@@ -628,11 +628,12 @@ EGREP
 GREP
 MODIFICATION_DELAY
 LN
+required_autoconf_version
 LEX
 YACC
 TEX
-PERL_THREADS
 PERL
+LN_S
 system_acdir
 automake_acdir
 amdir
@@ -646,6 +647,7 @@ AMTAR
 am__leading_dot
 SET_MAKE
 AWK
+mkdir_p
 MKDIR_P
 INSTALL_STRIP_PROGRAM
 STRIP
@@ -1288,7 +1290,7 @@ if test "$ac_init_help" = "long"; then
   # Omit some internal or obsolete options to make the list less imposing.
   # This message is too long to be a string in the A/UX 3.1 sh.
   cat <<_ACEOF
-\`configure' configures GNU Automake 1.12.1 to adapt to many kinds of systems.
+\`configure' configures GNU Automake 1.15.1 to adapt to many kinds of systems.
 
 Usage: $0 [OPTION]... [VAR=VALUE]...
 
@@ -1358,7 +1360,7 @@ fi
 
 if test -n "$ac_init_help"; then
   case $ac_init_help in
-     short | recursive ) echo "Configuration of GNU Automake 1.12.1:";;
+     short | recursive ) echo "Configuration of GNU Automake 1.15.1:";;
    esac
   cat <<\_ACEOF
 
@@ -1466,7 +1468,7 @@ fi
 test -n "$ac_init_help" && exit $ac_status
 if $ac_init_version; then
   cat <<\_ACEOF
-GNU Automake configure 1.12.1
+GNU Automake configure 1.15.1
 generated by GNU Autoconf 2.69
 
 Copyright (C) 2012 Free Software Foundation, Inc.
@@ -1635,7 +1637,7 @@ cat >config.log <<_ACEOF
 This file contains any messages produced by compilers while
 running configure, to aid debugging if configure makes a mistake.
 
-It was created by GNU Automake $as_me 1.12.1, which was
+It was created by GNU Automake $as_me 1.15.1, which was
 generated by GNU Autoconf 2.69.  Invocation command line was
 
   $ $0 $@
@@ -2143,7 +2145,7 @@ am_AUTOHEADER="${AUTOHEADER-autoheader}"
 am_AUTOUPDATE="${AUTOUPDATE-autoupdate}"
 
 
-am__api_version='1.12'
+am__api_version='1.15'
 
 # Find a good install program.  We prefer a C program (faster),
 # so one script is as good as another.  But avoid the broken or
@@ -2315,8 +2317,8 @@ test "$program_suffix" != NONE &&
 ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
 program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"`
 
-# expand $ac_aux_dir to an absolute path
-am_aux_dir=`cd $ac_aux_dir && pwd`
+# Expand $ac_aux_dir to an absolute path.
+am_aux_dir=`cd "$ac_aux_dir" && pwd`
 
 if test x"${MISSING+set}" != xset; then
   case $am_aux_dir in
@@ -2327,15 +2329,15 @@ if test x"${MISSING+set}" != xset; then
   esac
 fi
 # Use eval to expand $SHELL
-if eval "$MISSING --run true"; then
-  am_missing_run="$MISSING --run "
+if eval "$MISSING --is-lightweight"; then
+  am_missing_run="$MISSING "
 else
   am_missing_run=
   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: 'missing' script is too old or missing" >&5
 $as_echo "$as_me: WARNING: 'missing' script is too old or missing" >&2;}
 fi
 
-if test x"${install_sh}" != xset; then
+if test x"${install_sh+set}" != xset; then
   case $am_aux_dir in
   *\ * | *\    *)
     install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
@@ -2590,7 +2592,7 @@ fi
 
 # Define the identity of the package.
  PACKAGE='automake'
- VERSION='1.12.1'
+ VERSION='1.15.1'
 
 
 # Some tools Automake needs.
@@ -2609,12 +2611,22 @@ AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"}
 
 MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
 
-# We need awk for the "check" target.  The system "awk" is bad on
-# some platforms.
+# For better backward compatibility.  To be removed once Automake 1.9.x
+# dies out for good.  For more background, see:
+# <http://lists.gnu.org/archive/html/automake/2012-07/msg00001.html>
+# <http://lists.gnu.org/archive/html/automake/2012-07/msg00014.html>
+mkdir_p='$(MKDIR_P)'
+
+# We need awk for the "check" target (and possibly the TAP driver).  The
+# system "awk" is bad on some platforms.
 # Always define AMTAR for backward compatibility.  Yes, it's still used
 # in the wild :-(  We should find a proper way to deprecate it ...
 AMTAR='$${TAR-tar}'
 
+
+# We'll loop over all known methods to create a tar archive until one works.
+_am_tools='gnutar  pax cpio none'
+
 am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'
 
 
@@ -2622,9 +2634,52 @@ am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'
 
 
 
-## Keep this on a line of its own, since it must be found and processed
-## by the 'update-copyright' rule in our Makefile.
-RELEASE_YEAR=2012
+# POSIX will say in a future version that running "rm -f" with no argument
+# is OK; and we want to be able to make that assumption in our Makefile
+# recipes.  So use an aggressive probe to check that the usage we want is
+# actually supported "in the wild" to an acceptable degree.
+# See automake bug#10828.
+# To make any issue more visible, cause the running configure to be aborted
+# by default if the 'rm' program in use doesn't match our expectations; the
+# user can still override this though.
+if rm -f && rm -fr && rm -rf; then : OK; else
+  cat >&2 <<'END'
+Oops!
+
+Your 'rm' program seems unable to run without file operands specified
+on the command line, even when the '-f' option is present.  This is contrary
+to the behaviour of most rm programs out there, and not conforming with
+the upcoming POSIX standard: <http://austingroupbugs.net/view.php?id=542>
+
+Please tell bug-automake@gnu.org about your system, including the value
+of your $PATH and any error possibly output before this message.  This
+can help us improve future automake versions.
+
+END
+  if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then
+    echo 'Configuration will proceed anyway, since you have set the' >&2
+    echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2
+    echo >&2
+  else
+    cat >&2 <<'END'
+Aborting the configuration process, to ensure you take notice of the issue.
+
+You can download and install GNU coreutils to get an 'rm' implementation
+that behaves properly: <http://www.gnu.org/software/coreutils/>.
+
+If you want to complete the configuration process using your problematic
+'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM
+to "yes", and re-run configure.
+
+END
+    as_fn_error $? "Your 'rm' program is bad, sorry." "$LINENO" 5
+  fi
+fi
+
+
+# Keep this on a line of its own, since it must be found and processed
+# by the 'update-copyright' rule in our Makefile.
+RELEASE_YEAR=2017
 
 
 # The API version is the base version.  We must guarantee
@@ -2648,10 +2703,24 @@ automake_acdir="\${datadir}/aclocal-$APIVERSION"
 system_acdir="\${datadir}/aclocal"
 
 
-# $AUTOMAKE and $ACLOCAL are always run after a "cd $top_srcdir",
-# hence '.' is really what we want for perllibdir, libdir, and acdir.
-ACLOCAL="perllibdir=\"`pwd`/lib$PATH_SEPARATOR./lib\" \"`pwd`/aclocal\" --acdir=m4 -I m4"
-AUTOMAKE="perllibdir=\"`pwd`/lib$PATH_SEPARATOR./lib\" \"`pwd`/automake\" --libdir=lib"
+# Our build system is bootstrapped with the bleeding-edge versions of
+# aclocal and automake, hence the remake rules must use those versions
+# as well.  The extra quoting is to cater to cases when the build
+# directory contains whitespace or shell metacharacters.
+ACLOCAL="\"`pwd`/t/wrap/aclocal-$APIVERSION\""
+AUTOMAKE="\"`pwd`/t/wrap/automake-$APIVERSION\""
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
+$as_echo_n "checking whether ln -s works... " >&6; }
+LN_S=$as_ln_s
+if test "$LN_S" = "ln -s"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
+$as_echo "no, using $LN_S" >&6; }
+fi
+
 
 # Extract the first word of "perl", so it can be a program name with args.
 set dummy perl; ac_word=$2
@@ -2709,39 +2778,6 @@ installed, select the one Automake should use using
   ./configure PERL=/path/to/perl" "$LINENO" 5
 }
 
-# We require ithreads support, and version 5.7.2 for CLONE.
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $PERL supports ithreads" >&5
-$as_echo_n "checking whether $PERL supports ithreads... " >&6; }
-if ${am_cv_prog_PERL_ithreads+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  if $PERL -e '
-    require 5.007_002;
-    use Config;
-    if ($Config{useithreads})
-      {
-       require threads;
-       import threads;
-       require Thread::Queue;
-       import Thread::Queue;
-       exit 0;
-      }
-    exit 1;' >&5 2>&1
-then
-  am_cv_prog_PERL_ithreads=yes
-else
-  am_cv_prog_PERL_ithreads=no
-fi
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_PERL_ithreads" >&5
-$as_echo "$am_cv_prog_PERL_ithreads" >&6; }
-if test $am_cv_prog_PERL_ithreads = yes; then
-  PERL_THREADS=1;
-else
-  PERL_THREADS=0;
-fi
-
-
 # The test suite will skip some tests if tex is absent.
 # Extract the first word of "tex", so it can be a program name with args.
 set dummy tex; ac_word=$2
@@ -2893,7 +2929,8 @@ test -n "$LEX" || LEX="false"
 # following tests, but some users were unable to figure out that their
 # installation was broken since --version appeared to work.
 
-required_autoconf_version=2.62
+required_autoconf_version=2.65
+
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether autoconf is installed" >&5
 $as_echo_n "checking whether autoconf is installed... " >&6; }
 if ${am_cv_autoconf_installed+:} false; then :
@@ -3222,6 +3259,9 @@ $as_echo "$ac_cv_path_FGREP" >&6; }
 # We require that the shell can correctly trap EXIT when 'set -e' is in
 # effect (OSF1/Tru64 sh failed to do so, see commit v1.10b-52-g9fe8259).
 #
+# We want to able to define shell aliases with the same name of shell
+# builtins.
+#
 # We also prefer shells that, when 'set -x' is in effect, do not also
 # redirect traces upon stderr redirections.  For example,
 #  $ set -x; echo x 2>file
@@ -3230,9 +3270,6 @@ $as_echo "$ac_cv_path_FGREP" >&6; }
 # would emit "P=1" into file with /usr/xpg4/bin/sh from Solaris 10 and
 # /bin/sh from SunOS 5.11 and OpenBSD 4.7.
 #
-# Finally, we look for weird bugs and portability problems mentioned in
-# the Autoconf manual, and reject shells that suffers from them. (TODO)
-#
 # Use '$am_score' to indicate the degree of acceptability of the shell.
 # A score of "10" means that the shell is good enough for our needs;
 # a score of "9" means that the shell has some minor bugs or limitation,
@@ -3372,10 +3409,13 @@ $as_echo "no" >&6; }
   fi
 
 
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $am_sh supports \${var#glob}" >&5
-$as_echo_n "checking whether $am_sh supports \${var#glob}... " >&6; }
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $am_sh supports \${#var}" >&5
+$as_echo_n "checking whether $am_sh supports \${#var}... " >&6; }
   if { $am_sh -c "$am_bourne_compatible
-v=a/b/c; test \${v#*/} = b/c
+zero='' one='x' twelve=' foobar baz!' \\
+        && test \${#zero} -eq 0 \\
+        && test \${#one} -eq 1 \\
+        && test \${#twelve} -eq 12
 test \$? -eq 0 || exit 1
 # Use 77 to indicate success (rather than 0), in case some shell
 # acts like Solaris 10's /bin/sh, exiting successfully on some
@@ -3392,10 +3432,14 @@ $as_echo "no" >&6; }
   fi
 
 
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $am_sh supports \${var##glob}" >&5
-$as_echo_n "checking whether $am_sh supports \${var##glob}... " >&6; }
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $am_sh supports \${var#glob} and \${var%glob}" >&5
+$as_echo_n "checking whether $am_sh supports \${var#glob} and \${var%glob}... " >&6; }
   if { $am_sh -c "$am_bourne_compatible
-v=a/b/c; test \${v##*/} = c
+v=a/b/c \\
+        && test \${v#*/} = b/c \\
+        && test \${v##*/} = c \\
+        && test \${v%/*} = a/b \\
+        && test \${v%%/*} = a
 test \$? -eq 0 || exit 1
 # Use 77 to indicate success (rather than 0), in case some shell
 # acts like Solaris 10's /bin/sh, exiting successfully on some
@@ -3412,10 +3456,10 @@ $as_echo "no" >&6; }
   fi
 
 
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $am_sh supports \${var%glob}" >&5
-$as_echo_n "checking whether $am_sh supports \${var%glob}... " >&6; }
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $am_sh preserves exit traps with \"set -e\"" >&5
+$as_echo_n "checking whether $am_sh preserves exit traps with \"set -e\"... " >&6; }
   if { $am_sh -c "$am_bourne_compatible
-v=a.b.c; test \${v%.*} = a.b
+set -e; trap 'exit \$?' 0; (exit 77); exit 77
 test \$? -eq 0 || exit 1
 # Use 77 to indicate success (rather than 0), in case some shell
 # acts like Solaris 10's /bin/sh, exiting successfully on some
@@ -3432,10 +3476,10 @@ $as_echo "no" >&6; }
   fi
 
 
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $am_sh supports \${var%%glob}" >&5
-$as_echo_n "checking whether $am_sh supports \${var%%glob}... " >&6; }
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $am_sh can define exit traps in a shell function" >&5
+$as_echo_n "checking whether $am_sh can define exit traps in a shell function... " >&6; }
   if { $am_sh -c "$am_bourne_compatible
-v=a.b.c; test \${v%%.*} = a
+fail=0 && foo() { trap 'fail=1' 0; } && foo && test \$fail = 0
 test \$? -eq 0 || exit 1
 # Use 77 to indicate success (rather than 0), in case some shell
 # acts like Solaris 10's /bin/sh, exiting successfully on some
@@ -3452,10 +3496,10 @@ $as_echo "no" >&6; }
   fi
 
 
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $am_sh \"set -e\" preserves exit traps" >&5
-$as_echo_n "checking whether $am_sh \"set -e\" preserves exit traps... " >&6; }
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $am_sh corrupts stderr with \"set -x\"" >&5
+$as_echo_n "checking whether $am_sh corrupts stderr with \"set -x\"... " >&6; }
   if { $am_sh -c "$am_bourne_compatible
-set -e; trap 'exit \$?' 0; (exit 77); exit 77
+(set -x; P=1 true 2>&3) 3>&1 2>/dev/null | grep P=1
 test \$? -eq 0 || exit 1
 # Use 77 to indicate success (rather than 0), in case some shell
 # acts like Solaris 10's /bin/sh, exiting successfully on some
@@ -3464,18 +3508,42 @@ exit 77" >&5 2>&1; test $? -eq 77; }
   then
     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 $as_echo "yes" >&6; }
+    am_score=9
+  else
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+
+  fi
 
+    echo 'return 34' > conftest-return.sh
+    echo 'ok=no' >> conftest-return.sh
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $am_sh can return early from \"dot-sourced\" files" >&5
+$as_echo_n "checking whether $am_sh can return early from \"dot-sourced\" files... " >&6; }
+  if { $am_sh -c "$am_bourne_compatible
+ok=yes; . ./conftest-return.sh; test \$? -eq 34 && test \$ok = yes
+test \$? -eq 0 || exit 1
+# Use 77 to indicate success (rather than 0), in case some shell
+# acts like Solaris 10's /bin/sh, exiting successfully on some
+# syntax errors.
+exit 77" >&5 2>&1; test $? -eq 77; }
+  then
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+    rm -f conftest-return.sh
   else
     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 $as_echo "no" >&6; }
-    am_score=1; break
+    rm -f conftest-return.sh; am_score=1; break
   fi
 
+    echo 'alias false=echo' > conftest-alias.sh
+    echo 'false && test "$(false 97)" = 97' >> conftest-alias.sh
 
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $am_sh \"set -x\" corrupts stderr" >&5
-$as_echo_n "checking whether $am_sh \"set -x\" corrupts stderr... " >&6; }
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $am_sh supports alias named like shell builtins" >&5
+$as_echo_n "checking whether $am_sh supports alias named like shell builtins... " >&6; }
   if { $am_sh -c "$am_bourne_compatible
-(set -x; P=1 true 2>&3) 3>&1 2>/dev/null | grep P=1
+. ./conftest-alias.sh
 test \$? -eq 0 || exit 1
 # Use 77 to indicate success (rather than 0), in case some shell
 # acts like Solaris 10's /bin/sh, exiting successfully on some
@@ -3484,11 +3552,31 @@ exit 77" >&5 2>&1; test $? -eq 77; }
   then
     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 $as_echo "yes" >&6; }
-    am_score=9
+    rm -f conftest-alias.sh
   else
     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 $as_echo "no" >&6; }
+    rm -f conftest-alias.sh; am_score=1; break
+  fi
+
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $am_sh supports \"test -e\"" >&5
+$as_echo_n "checking whether $am_sh supports \"test -e\"... " >&6; }
+  if { $am_sh -c "$am_bourne_compatible
+test -e config.log && test -e . && test ! -e nonesuch
+test \$? -eq 0 || exit 1
+# Use 77 to indicate success (rather than 0), in case some shell
+# acts like Solaris 10's /bin/sh, exiting successfully on some
+# syntax errors.
+exit 77" >&5 2>&1; test $? -eq 77; }
+  then
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
 
+  else
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+    am_score=1; break
   fi
 
     break
@@ -3523,10 +3611,6 @@ fi
 
 
 
-## ---------------------- ##
-##  Create output files.  ##
-## ---------------------- ##
-
 
 ###########################################################################
 
@@ -4162,6 +4246,65 @@ ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
 ac_compiler_gnu=$ac_cv_c_compiler_gnu
 
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC understands -c and -o together" >&5
+$as_echo_n "checking whether $CC understands -c and -o together... " >&6; }
+if ${am_cv_prog_cc_c_o+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+  # Make sure it works both with $CC and with simple cc.
+  # Following AC_PROG_CC_C_O, we do the test twice because some
+  # compilers refuse to overwrite an existing .o file with -o,
+  # though they will create one.
+  am_cv_prog_cc_c_o=yes
+  for am_i in 1 2; do
+    if { echo "$as_me:$LINENO: $CC -c conftest.$ac_ext -o conftest2.$ac_objext" >&5
+   ($CC -c conftest.$ac_ext -o conftest2.$ac_objext) >&5 2>&5
+   ac_status=$?
+   echo "$as_me:$LINENO: \$? = $ac_status" >&5
+   (exit $ac_status); } \
+         && test -f conftest2.$ac_objext; then
+      : OK
+    else
+      am_cv_prog_cc_c_o=no
+      break
+    fi
+  done
+  rm -f core conftest*
+  unset am_i
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_c_o" >&5
+$as_echo "$am_cv_prog_cc_c_o" >&6; }
+if test "$am_cv_prog_cc_c_o" != yes; then
+   # Losing compiler, so override with the script.
+   # FIXME: It is wrong to rewrite CC.
+   # But if we don't then we get into trouble of one sort or another.
+   # A longer-term fix would be to have automake use am__CC in this case,
+   # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
+   CC="$am_aux_dir/compile $CC"
+fi
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
      break
   done
   if test $am__failed = yes; then :
@@ -4187,6 +4330,19 @@ else
   am_CC_is_GNU=no
 fi
 
+# On case-insensitive file systems (seen e.g. on Cygwin and Mac OS X)
+# we must avoid looking for 'CC', because that would be the same as
+# 'cc', and could cause $CXX to point to the C compiler, instead of
+# to a C++ compiler as expected (see automake bugs #11893 and #10766).
+# Similarly, we must avoid looking for 'RCC', as that can point to the
+# Qt4 "Resource Compiler": <http://doc.qt.digia.com/4.2/rcc.html>
+if test -f /bIn/rMdIr || test -f /uSr/bIn/rMdIr; then
+  # Case-insensitive file system, don't look for CC.
+  am_CC= am_RCC=
+else
+  am_CC=CC am_RCC=RCC
+fi
+
 # The list of C++ compilers here has been copied, pasted and edited
 # from 'lib/autoconf/c.m4:AC_PROG_CXX' in the Autoconf distribution.
 # Keep it in sync, or better again, find out a way to avoid this code
@@ -4206,7 +4362,7 @@ if test -z "$CXX"; then
     CXX=$CCC
   else
     if test -n "$ac_tool_prefix"; then
-  for ac_prog in   aCC CC FCC KCC RCC xlC_r xlC c++ cxx cc++ gpp g++
+  for ac_prog in   aCC $am_CC FCC KCC $am_RCC xlC_r xlC c++ cxx cc++ gpp g++
   do
     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
@@ -4250,7 +4406,7 @@ fi
 fi
 if test -z "$CXX"; then
   ac_ct_CXX=$CXX
-  for ac_prog in   aCC CC FCC KCC RCC xlC_r xlC c++ cxx cc++ gpp g++
+  for ac_prog in   aCC $am_CC FCC KCC $am_RCC xlC_r xlC c++ cxx cc++ gpp g++
 do
   # Extract the first word of "$ac_prog", so it can be a program name with args.
 set dummy $ac_prog; ac_word=$2
@@ -5828,7 +5984,8 @@ esac
 fi
 
 fi
-if { echo "$as_me:$LINENO: $GNU_CC --version && $GNU_CC -v" >&5
+if test "$GNU_CC" != false; then
+  if { echo "$as_me:$LINENO: $GNU_CC --version && $GNU_CC -v" >&5
    ($GNU_CC --version && $GNU_CC -v) >&5 2>&5
    ac_status=$?
    echo "$as_me:$LINENO: \$? = $ac_status" >&5
@@ -5837,9 +5994,10 @@ if { echo "$as_me:$LINENO: $GNU_CC --version && $GNU_CC -v" >&5
 else
   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: botched installation for GNU C compiler" >&5
 $as_echo "$as_me: WARNING: botched installation for GNU C compiler" >&2;}
-       { $as_echo "$as_me:${as_lineno-$LINENO}: tests requiring the GNU C compiler will be skipped" >&5
+         { $as_echo "$as_me:${as_lineno-$LINENO}: tests requiring the GNU C compiler will be skipped" >&5
 $as_echo "$as_me: tests requiring the GNU C compiler will be skipped" >&6;}
 fi
+fi
 
 # GNU C++ compiler.
 
@@ -5951,7 +6109,8 @@ esac
 fi
 
 fi
-if { echo "$as_me:$LINENO: $GNU_CXX --version && $GNU_CXX -v" >&5
+if test "$GNU_CXX" != false; then
+  if { echo "$as_me:$LINENO: $GNU_CXX --version && $GNU_CXX -v" >&5
    ($GNU_CXX --version && $GNU_CXX -v) >&5 2>&5
    ac_status=$?
    echo "$as_me:$LINENO: \$? = $ac_status" >&5
@@ -5960,9 +6119,10 @@ if { echo "$as_me:$LINENO: $GNU_CXX --version && $GNU_CXX -v" >&5
 else
   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: botched installation for GNU C++ compiler" >&5
 $as_echo "$as_me: WARNING: botched installation for GNU C++ compiler" >&2;}
-       { $as_echo "$as_me:${as_lineno-$LINENO}: tests requiring the GNU C++ compiler will be skipped" >&5
+         { $as_echo "$as_me:${as_lineno-$LINENO}: tests requiring the GNU C++ compiler will be skipped" >&5
 $as_echo "$as_me: tests requiring the GNU C++ compiler will be skipped" >&6;}
 fi
+fi
 
 # GNU Fortran compiler.
 
@@ -6074,7 +6234,8 @@ esac
 fi
 
 fi
-if { echo "$as_me:$LINENO: $GNU_FC --version && $GNU_FC -v" >&5
+if test "$GNU_FC" != false; then
+  if { echo "$as_me:$LINENO: $GNU_FC --version && $GNU_FC -v" >&5
    ($GNU_FC --version && $GNU_FC -v) >&5 2>&5
    ac_status=$?
    echo "$as_me:$LINENO: \$? = $ac_status" >&5
@@ -6083,9 +6244,10 @@ if { echo "$as_me:$LINENO: $GNU_FC --version && $GNU_FC -v" >&5
 else
   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: botched installation for GNU Fortran compiler" >&5
 $as_echo "$as_me: WARNING: botched installation for GNU Fortran compiler" >&2;}
-       { $as_echo "$as_me:${as_lineno-$LINENO}: tests requiring the GNU Fortran compiler will be skipped" >&5
+         { $as_echo "$as_me:${as_lineno-$LINENO}: tests requiring the GNU Fortran compiler will be skipped" >&5
 $as_echo "$as_me: tests requiring the GNU Fortran compiler will be skipped" >&6;}
 fi
+fi
 
 # GNU Fortran 77 compiler.
 
@@ -6197,7 +6359,8 @@ esac
 fi
 
 fi
-if { echo "$as_me:$LINENO: $GNU_F77 --version && $GNU_F77 -v" >&5
+if test "$GNU_F77" != false; then
+  if { echo "$as_me:$LINENO: $GNU_F77 --version && $GNU_F77 -v" >&5
    ($GNU_F77 --version && $GNU_F77 -v) >&5 2>&5
    ac_status=$?
    echo "$as_me:$LINENO: \$? = $ac_status" >&5
@@ -6206,9 +6369,10 @@ if { echo "$as_me:$LINENO: $GNU_F77 --version && $GNU_F77 -v" >&5
 else
   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: botched installation for GNU Fortran 77 compiler" >&5
 $as_echo "$as_me: WARNING: botched installation for GNU Fortran 77 compiler" >&2;}
-      { $as_echo "$as_me:${as_lineno-$LINENO}: tests requiring the GNU Fortran 77 compiler will be skipped" >&5
+        { $as_echo "$as_me:${as_lineno-$LINENO}: tests requiring the GNU Fortran 77 compiler will be skipped" >&5
 $as_echo "$as_me: tests requiring the GNU Fortran 77 compiler will be skipped" >&6;}
 fi
+fi
 
 # GNU Java compiler.
 
@@ -6313,7 +6477,8 @@ esac
   fi
 fi
 
-if { echo "$as_me:$LINENO: $GNU_GCJ --version && $GNU_GCJ -v" >&5
+if test "$GNU_GCJ" != false; then
+  if { echo "$as_me:$LINENO: $GNU_GCJ --version && $GNU_GCJ -v" >&5
    ($GNU_GCJ --version && $GNU_GCJ -v) >&5 2>&5
    ac_status=$?
    echo "$as_me:$LINENO: \$? = $ac_status" >&5
@@ -6322,9 +6487,10 @@ if { echo "$as_me:$LINENO: $GNU_GCJ --version && $GNU_GCJ -v" >&5
 else
   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: botched installation for GNU Java compiler" >&5
 $as_echo "$as_me: WARNING: botched installation for GNU Java compiler" >&2;}
-      { $as_echo "$as_me:${as_lineno-$LINENO}: tests requiring the GNU Java compiler will be skipped" >&5
+        { $as_echo "$as_me:${as_lineno-$LINENO}: tests requiring the GNU Java compiler will be skipped" >&5
 $as_echo "$as_me: tests requiring the GNU Java compiler will be skipped" >&6;}
 fi
+fi
 
 # If we have been able to find at least a working compiler above, we
 # know what the object and executable extensions for this platform are.
@@ -6335,13 +6501,14 @@ EXEEXT=${ac_cv_exeext-UNKNOWN}
 
 ###########################################################################
 
-ac_config_files="$ac_config_files Makefile"
+## ---------------------- ##
+##  Create output files.  ##
+## ---------------------- ##
 
+ac_config_files="$ac_config_files Makefile"
 
 ac_config_links="$ac_config_links GNUmakefile:GNUmakefile"
 
-ac_config_links="$ac_config_links defs:defs"
-
 
 ac_config_files="$ac_config_files t/wrap/aclocal-${APIVERSION}:t/wrap/aclocal.in"
 
@@ -6906,7 +7073,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
 # report actual input values of CONFIG_FILES etc. instead of their
 # values after options handling.
 ac_log="
-This file was extended by GNU Automake $as_me 1.12.1, which was
+This file was extended by GNU Automake $as_me 1.15.1, which was
 generated by GNU Autoconf 2.69.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
@@ -6965,7 +7132,7 @@ _ACEOF
 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
 ac_cs_version="\\
-GNU Automake config.status 1.12.1
+GNU Automake config.status 1.15.1
 configured by $0, generated by GNU Autoconf 2.69,
   with options \\"\$ac_cs_config\\"
 
@@ -7086,7 +7253,6 @@ do
   case $ac_config_target in
     "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
     "GNUmakefile") CONFIG_LINKS="$CONFIG_LINKS GNUmakefile:GNUmakefile" ;;
-    "defs") CONFIG_LINKS="$CONFIG_LINKS defs:defs" ;;
     "t/wrap/aclocal-${APIVERSION}") CONFIG_FILES="$CONFIG_FILES t/wrap/aclocal-${APIVERSION}:t/wrap/aclocal.in" ;;
     "t/wrap/automake-${APIVERSION}") CONFIG_FILES="$CONFIG_FILES t/wrap/automake-${APIVERSION}:t/wrap/automake.in" ;;
 
@@ -7602,7 +7768,8 @@ am_release_type=`$as_echo "$PACKAGE_VERSION" | LC_ALL=C awk "
   /^$am_beta_version_rx$/ { print \"beta version\"; exit(0); }
   { print \"development snapshot\"; }"`
 
-test "$am_release_type" = stable || cat <<EOF
+# '$silent' is set to yes if configure is passed the '--quiet' option.
+test "$am_release_type" = stable || test "$silent" = yes || cat <<EOF
 
 WARNING: You are about to use a $am_release_type of automake.
 WARNING: It might easily suffer from new bugs or regressions.
index 0958b0e..49a25a3 100644 (file)
@@ -1,6 +1,6 @@
 # Process this file with autoconf to produce a configure script.
 
-# Copyright (C) 1995-2012 Free Software Foundation, Inc.
+# Copyright (C) 1995-2017 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
@@ -16,9 +16,9 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 AC_PREREQ([2.69])
-AC_INIT([GNU Automake], [1.12.1], [bug-automake@gnu.org])
+AC_INIT([GNU Automake], [1.15.1], [bug-automake@gnu.org])
 
-AC_CONFIG_SRCDIR([automake.in])
+AC_CONFIG_SRCDIR([bin/automake.in])
 AC_CONFIG_AUX_DIR([lib])
 
 AM_SILENT_RULES([yes])
@@ -39,12 +39,12 @@ AC_SUBST([am_AUTOUPDATE], ["${AUTOUPDATE-autoupdate}"])
 dnl We call AC_PROG_CC in an unusual way, and only for use in our
 dnl testsuite, so also use 'no-dependencies' and 'no-define' among
 dnl the automake options to avoid bloating and potential problems.
-AM_INIT_AUTOMAKE([dist-xz filename-length-max=99 color-tests
-                 parallel-tests silent-rules no-define no-dependencies])
+AM_INIT_AUTOMAKE([-Wall -Werror dist-xz filename-length-max=99
+                  no-define no-dependencies])
 
-## Keep this on a line of its own, since it must be found and processed
-## by the 'update-copyright' rule in our Makefile.
-RELEASE_YEAR=2012
+# Keep this on a line of its own, since it must be found and processed
+# by the 'update-copyright' rule in our Makefile.
+RELEASE_YEAR=2017
 AC_SUBST([RELEASE_YEAR])
 
 # The API version is the base version.  We must guarantee
@@ -63,10 +63,14 @@ AC_SUBST([amdir], ["\${pkgvdatadir}/am"])
 AC_SUBST([automake_acdir], ["\${datadir}/aclocal-$APIVERSION"])
 AC_SUBST([system_acdir], ["\${datadir}/aclocal"])
 
-# $AUTOMAKE and $ACLOCAL are always run after a "cd $top_srcdir",
-# hence '.' is really what we want for perllibdir, libdir, and acdir.
-ACLOCAL="perllibdir=\"`pwd`/lib$PATH_SEPARATOR./lib\" \"`pwd`/aclocal\" --acdir=m4 -I m4"
-AUTOMAKE="perllibdir=\"`pwd`/lib$PATH_SEPARATOR./lib\" \"`pwd`/automake\" --libdir=lib"
+# Our build system is bootstrapped with the bleeding-edge versions of
+# aclocal and automake, hence the remake rules must use those versions
+# as well.  The extra quoting is to cater to cases when the build
+# directory contains whitespace or shell metacharacters.
+ACLOCAL="\"`pwd`/t/wrap/aclocal-$APIVERSION\""
+AUTOMAKE="\"`pwd`/t/wrap/automake-$APIVERSION\""
+
+AC_PROG_LN_S
 
 AC_PATH_PROG([PERL], [perl])
 if test -z "$PERL"; then
@@ -82,32 +86,6 @@ installed, select the one Automake should use using
   ./configure PERL=/path/to/perl])
 }
 
-# We require ithreads support, and version 5.7.2 for CLONE.
-AC_CACHE_CHECK([whether $PERL supports ithreads], [am_cv_prog_PERL_ithreads],
-[if $PERL -e '
-    require 5.007_002;
-    use Config;
-    if ($Config{useithreads})
-      {
-       require threads;
-       import threads;
-       require Thread::Queue;
-       import Thread::Queue;
-       exit 0;
-      }
-    exit 1;' >&AS_MESSAGE_LOG_FD 2>&1
-then
-  am_cv_prog_PERL_ithreads=yes
-else
-  am_cv_prog_PERL_ithreads=no
-fi])
-if test $am_cv_prog_PERL_ithreads = yes; then
-  PERL_THREADS=1;
-else
-  PERL_THREADS=0;
-fi
-AC_SUBST([PERL_THREADS])
-
 # The test suite will skip some tests if tex is absent.
 AC_CHECK_PROG([TEX], [tex], [tex])
 # Save details about the selected TeX program in config.log.
@@ -135,7 +113,7 @@ AC_CHECK_PROGS([LEX], [lex flex], [false])
 # following tests, but some users were unable to figure out that their
 # installation was broken since --version appeared to work.
 
-required_autoconf_version=2.62
+AC_SUBST([required_autoconf_version], [2.65])
 AC_CACHE_CHECK([whether autoconf is installed], [am_cv_autoconf_installed],
 [if AM_RUN_LOG([$am_AUTOCONF --version]);
 then
@@ -262,6 +240,9 @@ exit 77" >&AS_MESSAGE_LOG_FD 2>&1; test $? -eq 77; }
 # We require that the shell can correctly trap EXIT when 'set -e' is in
 # effect (OSF1/Tru64 sh failed to do so, see commit v1.10b-52-g9fe8259).
 #
+# We want to able to define shell aliases with the same name of shell
+# builtins.
+#
 # We also prefer shells that, when 'set -x' is in effect, do not also
 # redirect traces upon stderr redirections.  For example,
 #  $ set -x; echo x 2>file
@@ -270,9 +251,6 @@ exit 77" >&AS_MESSAGE_LOG_FD 2>&1; test $? -eq 77; }
 # would emit "P=1" into file with /usr/xpg4/bin/sh from Solaris 10 and
 # /bin/sh from SunOS 5.11 and OpenBSD 4.7.
 #
-# Finally, we look for weird bugs and portability problems mentioned in
-# the Autoconf manual, and reject shells that suffers from them. (TODO)
-#
 # Use '$am_score' to indicate the degree of acceptability of the shell.
 # A score of "10" means that the shell is good enough for our needs;
 # a score of "9" means that the shell has some minor bugs or limitation,
@@ -294,35 +272,58 @@ AC_DEFUN([_AM_CHECK_CANDIDATE_SHELL],
       [], [am_score=1; break])
 
     _AM_CHECK_SHELL_FEATURE([$1],
-      [supports \${var@%:@glob}],
-      [v=a/b/c; test ${v@%:@*/} = b/c],
+      [supports \${@%:@var}],
+      [zero='' one='x' twelve=' foobar baz!' \
+        && test ${@%:@zero} -eq 0 \
+        && test ${@%:@one} -eq 1 \
+        && test ${@%:@twelve} -eq 12],
       [], [am_score=1; break])
 
     _AM_CHECK_SHELL_FEATURE([$1],
-      [supports \${var@%:@@%:@glob}],
-      [v=a/b/c; test ${v@%:@@%:@*/} = c],
+      [supports \${var@%:@glob} and \${var%glob}],
+      [v=a/b/c \
+        && test ${v@%:@*/} = b/c \
+        && test ${v@%:@@%:@*/} = c \
+        && test ${v%/*} = a/b \
+        && test ${v%%/*} = a],
       [], [am_score=1; break])
 
     _AM_CHECK_SHELL_FEATURE([$1],
-      [supports \${var%glob}],
-      [v=a.b.c; test ${v%.*} = a.b],
-      [], [am_score=1; break])
-
-    _AM_CHECK_SHELL_FEATURE([$1],
-      [supports \${var%%glob}],
-      [v=a.b.c; test ${v%%.*} = a],
+      [preserves exit traps with "set -e"],
+      [set -e; trap 'exit $?' 0; (exit 77); exit 77],
       [], [am_score=1; break])
 
     _AM_CHECK_SHELL_FEATURE([$1],
-      ["set -e" preserves exit traps],
-      [set -e; trap 'exit $?' 0; (exit 77); exit 77],
+      [can define exit traps in a shell function],
+      [fail=0 && foo() { trap 'fail=1' 0; } && foo && test $fail = 0],
       [], [am_score=1; break])
 
     _AM_CHECK_SHELL_FEATURE([$1],
-      ["set -x" corrupts stderr],
+      [corrupts stderr with "set -x"],
       [(set -x; P=1 true 2>&3) 3>&1 2>/dev/null | grep P=1],
       [am_score=9], [])
 
+    echo 'return 34' > conftest-return.sh
+    echo 'ok=no' >> conftest-return.sh
+    _AM_CHECK_SHELL_FEATURE([$1],
+      [can return early from "dot-sourced" files],
+      [ok=yes; . ./conftest-return.sh; test $? -eq 34 && test $ok = yes],
+      [rm -f conftest-return.sh],
+      [rm -f conftest-return.sh; am_score=1; break])
+
+    echo 'alias false=echo' > conftest-alias.sh
+    echo 'false && test "$(false 97)" = 97' >> conftest-alias.sh
+    _AM_CHECK_SHELL_FEATURE([$1],
+      [supports alias named like shell builtins],
+      [. ./conftest-alias.sh],
+      [rm -f conftest-alias.sh],
+      [rm -f conftest-alias.sh; am_score=1; break])
+
+    _AM_CHECK_SHELL_FEATURE([$1],
+      [supports "test -e"],
+      [test -e config.log && test -e . && test ! -e nonesuch],
+      [], [am_score=1; break])
+
     break
   done])
 
@@ -378,10 +379,6 @@ fi
 AC_ARG_VAR([AM_TEST_RUNNER_SHELL],
            [a sturdy POSIX shell for our testsuite])
 
-## ---------------------- ##
-##  Create output files.  ##
-## ---------------------- ##
-
 
 ###########################################################################
 
@@ -441,12 +438,25 @@ _AM_COMPILER_CAN_FAIL(dnl
 
 AS_IF([test x"$GCC" = x"yes"], [am_CC_is_GNU=yes], [am_CC_is_GNU=no])
 
+# On case-insensitive file systems (seen e.g. on Cygwin and Mac OS X)
+# we must avoid looking for 'CC', because that would be the same as
+# 'cc', and could cause $CXX to point to the C compiler, instead of
+# to a C++ compiler as expected (see automake bugs #11893 and #10766).
+# Similarly, we must avoid looking for 'RCC', as that can point to the
+# Qt4 "Resource Compiler": <http://doc.qt.digia.com/4.2/rcc.html>
+if test -f /bIn/rMdIr || test -f /uSr/bIn/rMdIr; then
+  # Case-insensitive file system, don't look for CC.
+  am_CC= am_RCC=
+else
+  am_CC=CC am_RCC=RCC
+fi
+
 # The list of C++ compilers here has been copied, pasted and edited
 # from 'lib/autoconf/c.m4:AC_PROG_CXX' in the Autoconf distribution.
 # Keep it in sync, or better again, find out a way to avoid this code
 # duplication.
 _AM_COMPILER_CAN_FAIL([AC_PROG_CXX(dnl
-  [aCC CC FCC KCC RCC xlC_r xlC c++ cxx cc++ gpp g++])],
+  [aCC $am_CC FCC KCC $am_RCC xlC_r xlC c++ cxx cc++ gpp g++])],
   [CXX=false; _AM_SKIP_COMP_TESTS([C++])])
 
 AS_IF([test x"$GXX" = x"yes"], [am_CXX_is_GNU=yes], [am_CXX_is_GNU=no])
@@ -490,9 +500,11 @@ if test $am_CC_is_GNU = yes; then
 else
   AC_CHECK_TOOLS([GNU_CC], [gcc], [false])
 fi
-AS_IF([AM_RUN_LOG([$GNU_CC --version && $GNU_CC -v])], [],
-      [AC_MSG_WARN([botched installation for GNU C compiler])
-       _AM_SKIP_COMP_TESTS([GNU C])])
+if test "$GNU_CC" != false; then
+  AS_IF([AM_RUN_LOG([$GNU_CC --version && $GNU_CC -v])], [],
+        [AC_MSG_WARN([botched installation for GNU C compiler])
+         _AM_SKIP_COMP_TESTS([GNU C])])
+fi
 
 # GNU C++ compiler.
 AC_ARG_VAR([GNU_CXX],      [GNU C++ compiler])
@@ -504,9 +516,11 @@ if test $am_CXX_is_GNU = yes; then
 else
   AC_CHECK_TOOLS([GNU_CXX], [g++ gpp], [false])
 fi
-AS_IF([AM_RUN_LOG([$GNU_CXX --version && $GNU_CXX -v])], [],
-      [AC_MSG_WARN([botched installation for GNU C++ compiler])
-       _AM_SKIP_COMP_TESTS([GNU C++])])
+if test "$GNU_CXX" != false; then
+  AS_IF([AM_RUN_LOG([$GNU_CXX --version && $GNU_CXX -v])], [],
+        [AC_MSG_WARN([botched installation for GNU C++ compiler])
+         _AM_SKIP_COMP_TESTS([GNU C++])])
+fi
 
 # GNU Fortran compiler.
 AC_ARG_VAR([GNU_FC],      [GNU Fortran compiler])
@@ -518,9 +532,11 @@ if test $am_FC_is_GNU = yes; then
 else
   AC_CHECK_TOOLS([GNU_FC], [gfortran], [false])
 fi
-AS_IF([AM_RUN_LOG([$GNU_FC --version && $GNU_FC -v])], [],
-      [AC_MSG_WARN([botched installation for GNU Fortran compiler])
-       _AM_SKIP_COMP_TESTS([GNU Fortran])])
+if test "$GNU_FC" != false; then
+  AS_IF([AM_RUN_LOG([$GNU_FC --version && $GNU_FC -v])], [],
+        [AC_MSG_WARN([botched installation for GNU Fortran compiler])
+         _AM_SKIP_COMP_TESTS([GNU Fortran])])
+fi
 
 # GNU Fortran 77 compiler.
 AC_ARG_VAR([GNU_F77],    [GNU Fortran 77 compiler])
@@ -532,17 +548,21 @@ if test $am_F77_is_GNU = yes; then
 else
   AC_CHECK_TOOLS([GNU_F77], [g77 gfortran], [false])
 fi
-AS_IF([AM_RUN_LOG([$GNU_F77 --version && $GNU_F77 -v])], [],
-      [AC_MSG_WARN([botched installation for GNU Fortran 77 compiler])
-      _AM_SKIP_COMP_TESTS([GNU Fortran 77])])
+if test "$GNU_F77" != false; then
+  AS_IF([AM_RUN_LOG([$GNU_F77 --version && $GNU_F77 -v])], [],
+        [AC_MSG_WARN([botched installation for GNU Fortran 77 compiler])
+        _AM_SKIP_COMP_TESTS([GNU Fortran 77])])
+fi
 
 # GNU Java compiler.
 AC_ARG_VAR([GNU_GCJ], [GNU Java compiler])
 AC_ARG_VAR([GNU_GCJFLAGS], [GNU Java compiler flags])
 AC_CHECK_TOOLS([GNU_GCJ], [gcj], [false])
-AS_IF([AM_RUN_LOG([$GNU_GCJ --version && $GNU_GCJ -v])], [],
-      [AC_MSG_WARN([botched installation for GNU Java compiler])
-      _AM_SKIP_COMP_TESTS([GNU Java])])
+if test "$GNU_GCJ" != false; then
+  AS_IF([AM_RUN_LOG([$GNU_GCJ --version && $GNU_GCJ -v])], [],
+        [AC_MSG_WARN([botched installation for GNU Java compiler])
+        _AM_SKIP_COMP_TESTS([GNU Java])])
+fi
 
 # If we have been able to find at least a working compiler above, we
 # know what the object and executable extensions for this platform are.
@@ -553,17 +573,19 @@ AC_SUBST([EXEEXT])
 
 ###########################################################################
 
-AC_CONFIG_FILES([Makefile])
+## ---------------------- ##
+##  Create output files.  ##
+## ---------------------- ##
 
+AC_CONFIG_FILES([Makefile])
 AC_CONFIG_LINKS([GNUmakefile:GNUmakefile])
-AC_CONFIG_LINKS([defs:defs])
 
 AC_CONFIG_FILES([t/wrap/aclocal-${APIVERSION}:t/wrap/aclocal.in],
                 [chmod +x t/wrap/aclocal-${APIVERSION}],
-               [APIVERSION=$APIVERSION])
+                [APIVERSION=$APIVERSION])
 AC_CONFIG_FILES([t/wrap/automake-${APIVERSION}:t/wrap/automake.in],
                 [chmod +x t/wrap/automake-${APIVERSION}],
-               [APIVERSION=$APIVERSION])
+                [APIVERSION=$APIVERSION])
 
 AC_OUTPUT
 
@@ -581,7 +603,8 @@ am_release_type=`AS_ECHO(["$PACKAGE_VERSION"]) | LC_ALL=C awk ["
   /^$am_beta_version_rx$/ { print \"beta version\"; exit(0); }
   { print \"development snapshot\"; }"]`
 
-test "$am_release_type" = stable || cat <<EOF
+# '$silent' is set to yes if configure is passed the '--quiet' option.
+test "$am_release_type" = stable || test "$silent" = yes || cat <<EOF
 
 WARNING: You are about to use a $am_release_type of automake.
 WARNING: It might easily suffer from new bugs or regressions.
index 4495ac0..fc5db41 100644 (file)
@@ -1,5 +1,5 @@
 ## automake - create Makefile.in from Makefile.am
-## Copyright (C) 2001-2012 Free Software Foundation, Inc.
+## Copyright (C) 2001-2017 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
@@ -29,18 +29,17 @@ mostlyclean-check-html:
        rm -f $(TEST_SUITE_HTML)
 
 .log.html:
-       @list='$(RST2HTML) $$RST2HTML rst2html rst2html.py';            \
-       for r2h in $$list; do                                           \
-         if ($$r2h --version) >/dev/null 2>&1; then                    \
-           R2H=$$r2h;                                                  \
-         fi;                                                           \
-       done;                                                           \
-       if test -z "$$R2H"; then                                        \
-         echo >&2 "cannot find rst2html, cannot create $@";            \
+       @list='$(RST2HTML) rst2html rst2html.py';                       \
+       while :; do                                                     \
+         for r2h in $$list; do                                         \
+           if ($$r2h --version) >/dev/null 2>&1; then break 2;         \
+           else :; fi;                                                 \
+         done;                                                         \
+         echo "cannot find rst2html, cannot create $@" >&2;            \
          exit 2;                                                       \
-       fi;                                                             \
-       $$R2H $< >$@.tmp
-       @mv $@.tmp $@
+       done;                                                           \
+       $$r2h $(AM_RST2HTMLFLAGS) $(RST2HTMLFLAGS) $< >$@-t             \
+         && mv -f $@-t $@
 
 # Be sure to run check first, and then to convert the result.
 # Beware of concurrent executions.  Run "check" not "check-TESTS", as
index 0734a95..cc7f797 100644 (file)
@@ -1,7 +1,7 @@
 # Configure fragment invoked in the post-target section for subdirs
 # wanting multilib support.
 #
-# Copyright (C) 1995-2012 Free Software Foundation, Inc.
+# Copyright (C) 1995-2017 Free Software Foundation, Inc.
 #
 # This file is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
index d1320d6..2156e66 100644 (file)
@@ -1,5 +1,5 @@
 ##                                                          -*- Autoconf -*-
-# Copyright (C) 1998-2012 Free Software Foundation, Inc.
+# Copyright (C) 1998-2017 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
index bca9069..5c98b69 100644 (file)
@@ -1,6 +1,6 @@
 ## automake - create Makefile.in from Makefile.am
 
-## Copyright (C) 1994-2012 Free Software Foundation, Inc.
+## Copyright (C) 1994-2017 Free Software Foundation, Inc.
 ## This Makefile.in is free software; the Free Software Foundation
 ## gives unlimited permission to copy and/or distribute it,
 ## with or without modifications, as long as this notice is preserved.
index f1877f9..49de9fc 100755 (executable)
@@ -1,7 +1,7 @@
 #!/bin/sh
 # Create a symlink tree.
 #
-# Copyright (C) 1995-2012 Free Software Foundation, Inc.
+# Copyright (C) 1995-2017 Free Software Foundation, Inc.
 #
 # This file is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff --git a/contrib/t/Makefile.inc b/contrib/t/Makefile.inc
new file mode 100644 (file)
index 0000000..d55fb95
--- /dev/null
@@ -0,0 +1,26 @@
+## Included by top-level Makefile for Automake.
+
+## Copyright (C) 1995-2017 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/>.
+
+## -------------------------------- ##
+##  Tests for stuff in 'contrib/'.  ##
+## -------------------------------- ##
+
+contrib_TESTS = \
+  %D%/parallel-tests-html.sh \
+  %D%/parallel-tests-html-recursive.sh \
+  %D%/help-multilib.sh \
+  %D%/multilib.sh
similarity index 82%
rename from t/help-multilib.sh
rename to contrib/t/help-multilib.sh
index c2a8d3c..b58ca80 100755 (executable)
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2010-2012 Free Software Foundation, Inc.
+# Copyright (C) 2010-2017 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
 
 # Make sure that our macro 'AM_ENABLE_MULTILIB' adds proper text to
 # the configure help screen.
-# FIXME: the features tested by this script has been moved in contrib.
-# FIXME: We should move this script accordingly.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat > configure.ac <<END
 AC_INIT([$me], [1.0])
similarity index 92%
rename from t/multlib.sh
rename to contrib/t/multilib.sh
index 0295ccc..3899ce4 100755 (executable)
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2003-2012 Free Software Foundation, Inc.
+# Copyright (C) 2003-2017 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
 
 # Check multilib support.
 # Based on a test case from Ralf Corsepius.
-# FIXME: the features tested by this script has been moved in contrib.
-# FIXME: We should move this script accordingly.
 
 required='gcc GNUmake'
-. ./defs || Exit 1
+. test-init.sh
 
 mldir=$am_top_srcdir/contrib/multilib
 mkdir m4
 cp "$mldir"/config-ml.in "$mldir"/symlink-tree .
 cp "$mldir"/multi.m4 m4
 
-ACLOCAL_PATH=${ACLOCAL_PATH+"$ACLOCAL_PATH:"}`pwd`/m4
+ACLOCAL_PATH=${ACLOCAL_PATH+"$ACLOCAL_PATH:"}$(pwd)/m4
 export ACLOCAL_PATH
 
 cat >configure.ac <<'END'
@@ -53,7 +51,7 @@ gcc ${1+"$@"}
 END
 
 chmod +x mycc
-PATH=`pwd`$PATH_SEPARATOR$PATH
+PATH=$(pwd)$PATH_SEPARATOR$PATH; export PATH
 
 cat >Makefile.am <<'EOF'
 SUBDIRS = @subdirs@
diff --git a/contrib/t/parallel-tests-html-recursive.sh b/contrib/t/parallel-tests-html-recursive.sh
new file mode 100755 (executable)
index 0000000..f2d1fba
--- /dev/null
@@ -0,0 +1,163 @@
+#! /bin/sh
+# Copyright (C) 2012-2017 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/>.
+
+# Recursive use of 'check-html'.  See Automake bug#11287.
+
+. test-init.sh
+
+# Try the variants that are tried in check-html.am.
+while :; do
+  for r2h in $RST2HTML rst2html rst2html.py; do
+    echo "$me: running $r2h --version"
+    $r2h --version && break 2
+    : For shells with busted 'set -e'.
+  done
+  skip_all_ "no proper rst2html program found"
+done
+unset r2h
+
+cp "$am_top_srcdir"/contrib/check-html.am . \
+  || fatal_ "cannot fetch 'check-html.am' from contrib"
+
+cat >> configure.ac << 'END'
+AM_EXTRA_RECURSIVE_TARGETS([check-html])
+AC_CONFIG_FILES([sub/Makefile sub/more/Makefile])
+AC_OUTPUT
+END
+
+cat > Makefile.am << 'END'
+SUBDIRS = sub
+EXTRA_DIST = $(TESTS)
+TEST_SUITE_LOG = mylog.log
+TESTS = foo.test bar.sh mu
+XFAIL_TESTS = bar.sh
+check_SCRIPTS = bla
+bla:
+       echo '#!/bin/sh' > $@-t
+       echo 'echo Blah Blah Blah' >> $@-t
+       chmod a+x,a-w $@-t
+       mv -f $@-t $@
+CLEANFILES = bla
+include $(srcdir)/check-html.am
+END
+
+mkdir sub
+echo SUBDIRS = more > sub/Makefile.am
+
+mkdir sub/more
+cat > sub/more/Makefile.am << 'END'
+include $(top_srcdir)/check-html.am
+TEST_EXTENSIONS = .test .sh
+TESTS = sh.sh test.test
+LOG_COMPILER = true
+test.log: sh.log
+nodist_check_DATA = x.txt
+$(nodist_check_DATA):
+       echo $@ > $@
+CLEANFILES = $(nodist_check_DATA)
+EXTRA_DIST = $(TESTS)
+END
+
+cat > foo.test <<'END'
+#! /bin/sh
+./bla
+exit 77
+END
+
+cat > bar.sh <<'END'
+#! /bin/sh
+echo "this is $0"
+exit 1
+END
+
+cat > mu <<'END'
+#! /bin/sh
+set -x
+test -f sub/more/test.log
+test -f sub/more/sh.log
+END
+
+cat > sub/more/test.test << 'END'
+#!/bin/sh
+echo "this is $0"
+set -x
+test -f sh.log
+test -f x.txt
+exit 77
+END
+
+cat > sub/more/sh.sh << 'END'
+#!/bin/sh
+set -x
+test ! -f test.log
+test -f x.txt
+END
+
+
+cat > sub/more/mu << 'END'
+#!/bin/sh
+exit 99
+END
+
+chmod a+x foo.test bar.sh mu sub/more/test.test sub/more/sh.sh
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE -a
+
+./configure
+
+$MAKE check-html
+grep 'Blah Blah Blah' mylog.html
+grep 'this is .*bar\.sh' mylog.html
+grep 'this is .*test\.test' sub/more/test-suite.html
+# check-html should cause check_SCRIPTS and check_DATA to be created.
+test -f bla
+test -f sub/more/x.txt
+
+# "make clean" should remove HTML files.
+$MAKE clean
+test ! -e mylog.html
+test ! -e sub/more/test-suite.html
+test ! -e bla
+test ! -e sub/more/x.txt
+
+# Create HTML output for individual tests.
+
+$MAKE bla
+$MAKE foo.html bar.sh.html
+grep 'Blah Blah Blah' foo.html
+grep 'this is .*bar\.sh' bar.sh.html
+test ! -e mu.hml
+
+ocwd=$(pwd) || fatal_ "getting current workind directory"
+( cd sub/more \
+    && $MAKE sh.html \
+    && test -f sh.html \
+    && test ! -e test.html \
+    && $MAKE test.html \
+    && grep 'this is .*test\.test' test.html) || exit 1
+
+# HTML output removed by mostlyclean.
+$MAKE check-html
+test -f mylog.html
+test -f sub/more/test-suite.html
+$MAKE mostlyclean
+find . -name '*.html' | grep . && exit 1
+
+$MAKE distcheck
+
+:
similarity index 74%
rename from t/parallel-tests2.sh
rename to contrib/t/parallel-tests-html.sh
index d54b9e8..4d2f8e3 100755 (executable)
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2009-2012 Free Software Foundation, Inc.
+# Copyright (C) 2009-2017 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
 # Check parallel-tests features:
 #  - check-html
 #  - recheck-html
-# FIXME: the features tested by this script has been moved in contrib.
-# FIXME: We should move this script accordingly.
 
-. ./defs || Exit 1
+. test-init.sh
 
 # Try the variants that are tried in check-html.am.
 while :; do
   for r2h in $RST2HTML rst2html rst2html.py; do
     echo "$me: running $r2h --version"
-    # Don't use "&&" here, or a bug of 'set -e' present in some
-    # versions of the BSD shell will be triggered.  We add the
-    # dummy "else" branch for extra safety.
-    if $r2h --version; then break 2; else :; fi
+    $r2h --version && break 2
+    : For shells with busted 'set -e'.
   done
   skip_all_ "no proper rst2html program found"
 done
@@ -79,31 +75,31 @@ $AUTOMAKE -a
 
 ./configure
 
-$MAKE check-html && Exit 1
+$MAKE check-html && exit 1
 test -f mylog.html
 # check-html should cause check_SCRIPTS to be created.
 test -f bla
 
 # "make clean" should remove HTML files.
 $MAKE clean
-test ! -f mylog.html
-test ! -f bla
+test ! -e mylog.html
+test ! -e bla
 
 # Always create the HTML output, even if there were no failures.
 rm -f mylog.html
-env TESTS=foo.test $MAKE -e check-html
+run_make TESTS=foo.test check-html
 test -f mylog.html
 
 # Create summarizing HTML output also with recheck-html.
 rm -f mylog.html
-env TESTS=foo.test $MAKE -e recheck-html
+run_make TESTS=foo.test recheck-html
 test -f mylog.html
 
 # Create HTML output for an individual test.
 $MAKE foo.html
 grep 'this is .*foo\.test' foo.html
-test ! -f bar.html
-test ! -f baz.html
+test ! -e bar.html
+test ! -e baz.html
 
 # Create HTML output for individual tests.  Since the pre-existing log
 # files are expected to be used for the HTML conversion, this should
@@ -114,35 +110,35 @@ grep 'this is .*baz\.test' baz.html
 
 # HTML output removed by mostlyclean.
 $MAKE mostlyclean
-test ! -f foo.html
-test ! -f bar.html
-test ! -f baz.html
-test ! -f mylog.html
+test ! -e foo.html
+test ! -e bar.html
+test ! -e baz.html
+test ! -e mylog.html
 
 # check-html and recheck-html should cause check_SCRIPTS to be created,
 # and recheck-html should rerun no tests if check has not been run.
 
 $MAKE clean
-test ! -f mylog.html
-env TEST_LOGS=foo.log $MAKE -e check-html
+test ! -e mylog.html
+run_make TEST_LOGS=foo.log check-html
 test -f bla
 test -f foo.log
-test ! -f bar.log
-test ! -f baz.log
+test ! -e bar.log
+test ! -e baz.log
 test -f mylog.html
 
 $MAKE clean
-env TESTS=foo.test $MAKE -e recheck-html
+run_make TESTS=foo.test recheck-html
 test -f bla
-test ! -f foo.log
+test ! -e foo.log
 test -f mylog.html
 
 $MAKE clean
 $MAKE recheck-html
 test -f bla
-test ! -f foo.log
-test ! -f bar.log
-test ! -f baz.log
+test ! -e foo.log
+test ! -e bar.log
+test ! -e baz.log
 test -f mylog.html
 
 :
similarity index 97%
rename from lib/tap-driver.pl
rename to contrib/tap-driver.pl
index 7f420af..637c14c 100755 (executable)
@@ -1,5 +1,5 @@
 #! /usr/bin/env perl
-# Copyright (C) 2011-2012 Free Software Foundation, Inc.
+# Copyright (C) 2011-2017 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
@@ -32,7 +32,7 @@ use strict;
 use Getopt::Long ();
 use TAP::Parser;
 
-my $VERSION = '2012-02-01.19'; # UTC
+my $VERSION = '2013-12-24.15'; # UTC
 
 my $ME = "tap-driver.pl";
 
@@ -43,13 +43,13 @@ Usage:
              [--enable-hard-errors={yes|no}] [--ignore-exit]
              [--diagnostic-string=STRING] [--merge|--no-merge]
              [--comments|--no-comments] [--] TEST-COMMAND
-The `--test-name', `--log-file' and `--trs-file' options are mandatory.
+The '--test-name', '--log-file' and '--trs-file' options are mandatory.
 END
 
 my $HELP = "$ME: TAP-aware test driver for Automake testsuite harness." .
            "\n" . $USAGE;
 
-# Keep this in sync with `lib/am/check.am:$(am__tty_colors)'.
+# Keep this in sync with 'lib/am/check.am:$(am__tty_colors)'.
 my %COLOR = (
   red => "\e[0;31m",
   grn => "\e[0;32m",
@@ -208,7 +208,6 @@ TEST_RESULTS :
     return grep { not $_ eq "PASS" } (keys %test_results_seen);
   }
 
-  # FIXME: this can certainly be improved ...
   sub get_global_test_result ()
   {
     return "ERROR"
@@ -465,7 +464,7 @@ sub extract_tap_comment ($)
   my $line = shift;
   if (index ($line, $diag_string) == 0)
     {
-      # Strip leading `$diag_string' from `$line'.
+      # Strip leading '$diag_string' from '$line'.
       $line = substr ($line, length ($diag_string));
       # And strip any leading and trailing whitespace left.
       $line =~ s/(?:^\s*|\s*$)//g;
@@ -559,6 +558,6 @@ main @ARGV;
 # eval: (add-hook 'write-file-hooks 'time-stamp)
 # time-stamp-start: "my $VERSION = "
 # time-stamp-format: "'%:y-%02m-%02d.%02H'"
-# time-stamp-time-zone: "UTC"
+# time-stamp-time-zone: "UTC0"
 # time-stamp-end: "; # UTC"
 # End:
diff --git a/doc/Makefile.inc b/doc/Makefile.inc
new file mode 100644 (file)
index 0000000..b39ce89
--- /dev/null
@@ -0,0 +1,116 @@
+## Included by top-level Makefile for Automake.
+
+## Copyright (C) 1995-2017 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/>.
+
+## ---------------- ##
+##  Documentation.  ##
+## ---------------- ##
+
+info_TEXINFOS = %D%/automake.texi %D%/automake-history.texi
+doc_automake_TEXINFOS = %D%/fdl.texi
+doc_automake_history_TEXINFOS = %D%/fdl.texi
+
+man1_MANS = \
+  %D%/aclocal.1 \
+  %D%/automake.1 \
+  %D%/aclocal-$(APIVERSION).1 \
+  %D%/automake-$(APIVERSION).1
+
+$(man1_MANS): $(top_srcdir)/configure.ac
+
+CLEANFILES += $(man1_MANS)
+EXTRA_DIST += %D%/help2man
+
+update_mans = \
+  $(AM_V_GEN): \
+    && $(MKDIR_P) %D% \
+    && $(extend_PATH) \
+    && $(PERL) $(srcdir)/%D%/help2man --output=$@
+
+%D%/aclocal.1 %D%/automake.1:
+       $(AM_V_GEN): \
+         && $(MKDIR_P) %D% \
+         && f=`echo $@ | sed 's|.*/||; s|\.1$$||; $(transform)'` \
+         && echo ".so man1/$$f-$(APIVERSION).1" > $@
+
+%D%/aclocal-$(APIVERSION).1: $(aclocal_script) lib/Automake/Config.pm
+       $(update_mans) aclocal-$(APIVERSION)
+%D%/automake-$(APIVERSION).1: $(automake_script) lib/Automake/Config.pm
+       $(update_mans) automake-$(APIVERSION)
+
+## ---------------------------- ##
+##  Example package "amhello".  ##
+## ---------------------------- ##
+
+amhello_sources = \
+  %D%/amhello/configure.ac \
+  %D%/amhello/Makefile.am \
+  %D%/amhello/README \
+  %D%/amhello/src/main.c \
+  %D%/amhello/src/Makefile.am
+
+amhello_configury = \
+  aclocal.m4 \
+  autom4te.cache \
+  Makefile.in \
+  config.h.in \
+  configure \
+  depcomp \
+  install-sh \
+  missing \
+  src/Makefile.in
+
+dist_noinst_DATA += $(amhello_sources)
+dist_doc_DATA = $(srcdir)/%D%/amhello-1.0.tar.gz
+
+setup_autotools_paths = { \
+  $(extend_PATH) \
+    && ACLOCAL=aclocal-$(APIVERSION) && export ACLOCAL \
+    && AUTOMAKE=automake-$(APIVERSION) && export AUTOMAKE \
+    && AUTOCONF='$(am_AUTOCONF)' && export AUTOCONF \
+    && AUTOM4TE='$(am_AUTOM4TE)' && export AUTOM4TE \
+    && AUTORECONF='$(am_AUTORECONF)' && export AUTORECONF \
+    && AUTOHEADER='$(am_AUTOHEADER)' && export AUTOHEADER \
+    && AUTOUPDATE='$(am_AUTOUPDATE)' && export AUTOUPDATE \
+    && true; \
+}
+
+# We depend on configure.ac so that we regenerate the tarball
+# whenever the Automake version changes.
+$(srcdir)/%D%/amhello-1.0.tar.gz: $(amhello_sources) $(srcdir)/configure.ac
+       $(AM_V_GEN)tmp=amhello-output.tmp \
+         && $(am__cd) $(srcdir)/%D%/amhello \
+         && : Make our aclocal and automake avaiable before system ones. \
+         && $(setup_autotools_paths) \
+         && ( \
+           { $(AM_V_P) || exec 5>&2 >$$tmp 2>&1; } \
+             && $(am_AUTORECONF) -vfi \
+             && ./configure \
+             && $(MAKE) $(AM_MAKEFLAGS) distcheck \
+             && $(MAKE) $(AM_MAKEFLAGS) distclean \
+             || { \
+               if $(AM_V_P); then :; else \
+                 echo "$@: recipe failed." >&5; \
+                 echo "See file '`pwd`/$$tmp' for details" >&5; \
+               fi; \
+               exit 1; \
+             } \
+         ) \
+         && rm -rf $(amhello_configury) $$tmp \
+         && mv -f amhello-1.0.tar.gz ..
+
+
+# vim: ft=automake noet
index 13c6b9d..f2d0492 100644 (file)
Binary files a/doc/amhello-1.0.tar.gz and b/doc/amhello-1.0.tar.gz differ
index 8d230a8..706c2f2 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright (C) 2006-2012 Free Software Foundation, Inc.
+# Copyright (C) 2006-2017 Free Software Foundation, Inc.
 # This Makefile.am is free software; the Free Software Foundation
 # gives unlimited permission to copy, distribute and modify it.
 
index 6d966a2..381344d 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright (C) 2006-2012 Free Software Foundation, Inc.
+# Copyright (C) 2006-2017 Free Software Foundation, Inc.
 # This configure.ac script is free software; the Free Software Foundation
 # gives unlimited permission to copy, distribute and modify it.
 
index 9e17883..e52ff3c 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright (C) 2006-2012 Free Software Foundation, Inc.
+# Copyright (C) 2006-2017 Free Software Foundation, Inc.
 # This Makefile.am is free software; the Free Software Foundation
 # gives unlimited permission to copy, distribute and modify it.
 
index c782738..7a7ebec 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (C) 2006-2012 Free Software Foundation, Inc.
+/* Copyright (C) 2006-2017 Free Software Foundation, Inc.
    This program is free software; the Free Software Foundation
    gives unlimited permission to copy, distribute and modify it.  */
 
index ad592b1..a2b899f 100644 (file)
@@ -1,18 +1,17 @@
-This is doc/automake-history.info, produced by makeinfo version 4.13
-from ./doc/automake-history.texi.
+This is automake-history.info, produced by makeinfo version 6.1 from
+automake-history.texi.
 
 This manual describes (part of) the history of GNU Automake, a program
 that creates GNU standards-compliant Makefiles from template files.
 
-   Copyright (C) 1995-2012 Free Software Foundation, Inc.
+   Copyright (C) 1995-2017 Free Software Foundation, Inc.
 
      Permission is granted to copy, distribute and/or modify this
      document under the terms of the GNU Free Documentation License,
      Version 1.3 or any later version published by the Free Software
      Foundation; with no Invariant Sections, with no Front-Cover texts,
-     and with no Back-Cover Texts.  A copy of the license is included
-     in the section entitled "GNU Free Documentation License."
-
+     and with no Back-Cover Texts.  A copy of the license is included in
+     the section entitled "GNU Free Documentation License."
 
 \1f
 File: automake-history.info,  Node: Top,  Next: Timeline,  Up: (dir)
@@ -23,15 +22,14 @@ Brief History of Automake
 This manual describes (part of) the history of GNU Automake, a program
 that creates GNU standards-compliant Makefiles from template files.
 
-   Copyright (C) 1995-2012 Free Software Foundation, Inc.
+   Copyright (C) 1995-2017 Free Software Foundation, Inc.
 
      Permission is granted to copy, distribute and/or modify this
      document under the terms of the GNU Free Documentation License,
      Version 1.3 or any later version published by the Free Software
      Foundation; with no Invariant Sections, with no Front-Cover texts,
-     and with no Back-Cover Texts.  A copy of the license is included
-     in the section entitled "GNU Free Documentation License."
-
+     and with no Back-Cover Texts.  A copy of the license is included in
+     the section entitled "GNU Free Documentation License."
 
 * Menu:
 
@@ -40,7 +38,7 @@ that creates GNU standards-compliant Makefiles from template files.
 * Releases::                      Release statistics
 * Copying This Manual::           How to make copies of this manual
 
- --- The Detailed Node Listing ---
+ -- The Detailed Node Listing --
 
 Evolution of Automatic Dependency Tracking
 
@@ -58,6 +56,7 @@ Copying This Manual
 
 * GNU Free Documentation License::  License for copying this manual
 
+
 \1f
 File: automake-history.info,  Node: Timeline,  Next: Dependency Tracking Evolution,  Prev: Top,  Up: Top
 
@@ -65,11 +64,12 @@ File: automake-history.info,  Node: Timeline,  Next: Dependency Tracking Evoluti
 **********
 
 1994-09-19 First CVS commit.
+
      If we can trust the CVS repository, David J. MacKenzie (djm)
      started working on Automake (or AutoMake, as it was spelt then)
      this Monday.
 
-     The first version of the `automake' script looks as follows.
+     The first version of the 'automake' script looks as follows.
 
           #!/bin/sh
 
@@ -88,7 +88,7 @@ File: automake-history.info,  Node: Timeline,  Next: Dependency Tracking Evoluti
           done
 
      From this you can already see that Automake will be about reading
-     `*.am' file and producing `*.in' files.  You cannot see anything
+     '*.am' file and producing '*.in' files.  You cannot see anything
      else, but if you also know that David is the one who created
      Autoconf two years before you can guess the rest.
 
@@ -96,30 +96,30 @@ File: automake-history.info,  Node: Timeline,  Next: Dependency Tracking Evoluti
      reported to work for GNU fileutils and GNU m4.
 
      The modus operandi is the one that is still used today: variable
-     assignments in `Makefile.am' files trigger injections of precanned
-     `Makefile' fragments into the generated `Makefile.in'.  The use of
-     `Makefile' fragments was inspired by the 4.4BSD `make' and include
+     assignments in 'Makefile.am' files trigger injections of precanned
+     'Makefile' fragments into the generated 'Makefile.in'.  The use of
+     'Makefile' fragments was inspired by the 4.4BSD 'make' and include
      files, however Automake aims to be portable and to conform to the
-     GNU standards for `Makefile' variables and targets.
+     GNU standards for 'Makefile' variables and targets.
 
      At this point, the most recent release of Autoconf is version 1.11,
-     and David is preparing to release Autoconf 2.0 in late October.
-     As a matter of fact, he will barely touch Automake after September.
+     and David is preparing to release Autoconf 2.0 in late October.  As
+     a matter of fact, he will barely touch Automake after September.
 
 1994-11-05 David MacKenzie's last commit.
+
      At this point Automake is a 200 line portable shell script, plus
-     332 lines of `Makefile' fragments.  In the `README', David states
+     332 lines of 'Makefile' fragments.  In the 'README', David states
      his ambivalence between "portable shell" and "more appropriate
      language":
 
           I wrote it keeping in mind the possibility of it becoming an
-          Autoconf macro, so it would run at configure-time.  That
-          would slow configuration down a bit, but allow users to
-          modify the Makefile.am without needing to fetch the AutoMake
-          package.  And, the Makefile.in files wouldn't need to be
-          distributed.  But all of AutoMake would.  So I might
-          reimplement AutoMake in Perl, m4, or some other more
-          appropriate language.
+          Autoconf macro, so it would run at configure-time.  That would
+          slow configuration down a bit, but allow users to modify the
+          Makefile.am without needing to fetch the AutoMake package.
+          And, the Makefile.in files wouldn't need to be distributed.
+          But all of AutoMake would.  So I might reimplement AutoMake in
+          Perl, m4, or some other more appropriate language.
 
      Automake is described as "an experimental Makefile generator".
      There is no documentation.  Adventurous users are referred to the
@@ -129,20 +129,21 @@ File: automake-history.info,  Node: Timeline,  Next: Dependency Tracking Evoluti
 
      These examples seem to have been lost.  However at the time of
      writing (10 years later in September, 2004) the FSF still
-     distributes a package that uses this version of Automake: check
-     out GNU termutils 2.0.
+     distributes a package that uses this version of Automake: check out
+     GNU termutils 2.0.
 
 1995-11-12 Tom Tromey's first commit.
+
      After one year of inactivity, Tom Tromey takes over the package.
      Tom was working on GNU cpio back then, and doing this just for fun,
      having trouble finding a project to contribute to.  So while
-     hacking he wanted to bring the `Makefile.in' up to GNU standards.
+     hacking he wanted to bring the 'Makefile.in' up to GNU standards.
      This was hard, and one day he saw Automake on
-     `ftp://alpha.gnu.org/', grabbed it and tried it out.
+     <ftp://alpha.gnu.org/>, grabbed it and tried it out.
 
      Tom didn't talk to djm about it until later, just to make sure he
-     didn't mind if he made a release.  He did a bunch of early
-     releases to the Gnits folks.
+     didn't mind if he made a release.  He did a bunch of early releases
+     to the Gnits folks.
 
      Gnits was (and still is) totally informal, just a few GNU friends
      who Franc,ois Pinard knew, who were all interested in making a
@@ -156,13 +157,13 @@ File: automake-history.info,  Node: Timeline,  Next: Dependency Tracking Evoluti
      into Automake.
 
 1995-11-23 Automake 0.20
-     Besides introducing automatic dependency tracking (*note
-     Dependency Tracking Evolution::), this version also supplies a
-     9-page manual.
 
-     At this time `aclocal' and `AM_INIT_AUTOMAKE' did not exist, so
+     Besides introducing automatic dependency tracking (*note Dependency
+     Tracking Evolution::), this version also supplies a 9-page manual.
+
+     At this time 'aclocal' and 'AM_INIT_AUTOMAKE' did not exist, so
      many things had to be done by hand.  For instance, here is what a
-     configure.in (this is the former name of the `configure.ac' we use
+     configure.in (this is the former name of the 'configure.ac' we use
      today) must contain in order to use Automake 0.20:
 
           PACKAGE=cpio
@@ -174,71 +175,73 @@ File: automake-history.info,  Node: Timeline,  Next: Dependency Tracking Evoluti
           AC_ARG_PROGRAM
           AC_PROG_INSTALL
 
-     (Today all of the above is achieved by `AC_INIT' and
-     `AM_INIT_AUTOMAKE'.)
+     (Today all of the above is achieved by 'AC_INIT' and
+     'AM_INIT_AUTOMAKE'.)
 
-     Here is how programs are specified in `Makefile.am':
+     Here is how programs are specified in 'Makefile.am':
 
           PROGRAMS = hello
           hello_SOURCES = hello.c
 
-     This looks pretty much like what we do today, except the
-     `PROGRAMS' variable has no directory prefix specifying where
-     `hello' should be installed: all programs are installed in
-     `$(bindir)'.  `LIBPROGRAMS' can be used to specify programs that
-     must be built but not installed (it is called `noinst_PROGRAMS'
-     nowadays).
+     This looks pretty much like what we do today, except the 'PROGRAMS'
+     variable has no directory prefix specifying where 'hello' should be
+     installed: all programs are installed in '$(bindir)'.
+     'LIBPROGRAMS' can be used to specify programs that must be built
+     but not installed (it is called 'noinst_PROGRAMS' nowadays).
 
-     Programs can be built conditionally using `AC_SUBST'itutions:
+     Programs can be built conditionally using 'AC_SUBST'itutions:
 
           PROGRAMS = @progs@
           AM_PROGRAMS = foo bar baz
 
-     (`AM_PROGRAMS' has since then been renamed to `EXTRA_PROGRAMS'.)
+     ('AM_PROGRAMS' has since then been renamed to 'EXTRA_PROGRAMS'.)
 
      Similarly scripts, static libraries, and data can be built and
-     installed using the `LIBRARIES', `SCRIPTS', and `DATA' variables.
-     However `LIBRARIES' were treated a bit specially in that Automake
-     did automatically supply the `lib' and `.a' prefixes.  Therefore
-     to build `libcpio.a', one had to write
+     installed using the 'LIBRARIES', 'SCRIPTS', and 'DATA' variables.
+     However 'LIBRARIES' were treated a bit specially in that Automake
+     did automatically supply the 'lib' and '.a' prefixes.  Therefore to
+     build 'libcpio.a', one had to write
 
           LIBRARIES = cpio
           cpio_SOURCES = ...
 
-     Extra files to distribute must be listed in `DIST_OTHER' (the
-     ancestor of `EXTRA_DIST').  Also extra directories that are to be
-     distributed should appear in `DIST_SUBDIRS', but the manual
+     Extra files to distribute must be listed in 'DIST_OTHER' (the
+     ancestor of 'EXTRA_DIST').  Also extra directories that are to be
+     distributed should appear in 'DIST_SUBDIRS', but the manual
      describes this as a temporary ugly hack (today extra directories
-     should also be listed in `EXTRA_DIST', and `DIST_SUBDIRS' is used
+     should also be listed in 'EXTRA_DIST', and 'DIST_SUBDIRS' is used
      for another purpose, *note Conditional Subdirectories:
      (automake)Conditional Subdirectories.).
 
 1995-11-26 Automake 0.21
+
      In less time than it takes to cook a frozen pizza, Tom rewrites
      Automake using Perl.  At this time Perl 5 is only one year old, and
      Perl 4.036 is in use at many sites.  Supporting several Perl
-     versions has been a source of problems through the whole history
-     of Automake.
+     versions has been a source of problems through the whole history of
+     Automake.
 
      If you never used Perl 4, imagine Perl 5 without objects, without
-     `my' variables (only dynamically scoped `local' variables),
-     without function prototypes, with function calls that needs to be
-     prefixed with `&', etc.  Traces of this old style can still be
-     found in today's `automake'.
+     'my' variables (only dynamically scoped 'local' variables), without
+     function prototypes, with function calls that needs to be prefixed
+     with '&', etc.  Traces of this old style can still be found in
+     today's 'automake'.
 
 1995-11-28 Automake 0.22
 1995-11-29 Automake 0.23
+
      Bug fixes.
 
 1995-12-08 Automake 0.24
 1995-12-10 Automake 0.25
+
      Releases are raining.  0.24 introduces the uniform naming scheme we
-     use today, i.e., `bin_PROGRAMS' instead of `PROGRAMS',
-     `noinst_LIBRARIES' instead of `LIBLIBRARIES', etc.  (However
-     `EXTRA_PROGRAMS' does not exist yet, `AM_PROGRAMS' is still in
-     use; and `TEXINFOS' and `MANS' still have no directory prefixes.)
-     Adding support for prefixes like that was one of the major ideas
-     in `automake'; it has lasted pretty well.
+     use today, i.e., 'bin_PROGRAMS' instead of 'PROGRAMS',
+     'noinst_LIBRARIES' instead of 'LIBLIBRARIES', etc.  (However
+     'EXTRA_PROGRAMS' does not exist yet, 'AM_PROGRAMS' is still in use;
+     and 'TEXINFOS' and 'MANS' still have no directory prefixes.)
+     Adding support for prefixes like that was one of the major ideas in
+     'automake'; it has lasted pretty well.
 
      AutoMake is renamed to Automake (Tom seems to recall it was
      Franc,ois Pinard's doing).
@@ -246,11 +249,11 @@ File: automake-history.info,  Node: Timeline,  Next: Dependency Tracking Evoluti
      0.25 fixes a Perl 4 portability bug.
 
 1995-12-18 Jim Meyering starts using Automake in GNU Textutils.
-
 1995-12-31 Franc,ois Pinard starts using Automake in GNU tar.
 
 1996-01-03 Automake 0.26
 1996-01-03 Automake 0.27
+
      Of the many changes and suggestions sent by Franc,ois Pinard and
      included in 0.26, perhaps the most important is the advice that to
      ease customization a user rule or variable definition should always
@@ -262,96 +265,104 @@ File: automake-history.info,  Node: Timeline,  Next: Dependency Tracking Evoluti
      0.27 fixes yet another Perl 4 portability bug.
 
 1996-01-13 Automake 0.28
-     Automake starts scanning `configure.in' for `LIBOBJS' support.
+
+     Automake starts scanning 'configure.in' for 'LIBOBJS' support.
      This is an important step because until this version Automake only
-     knew about the `Makefile.am's it processed.  `configure.in' was
+     knew about the 'Makefile.am's it processed.  'configure.in' was
      Autoconf's world and the link between Autoconf and Automake had to
-     be done by the `Makefile.am' author.  For instance, if `config.h'
-     was generated by `configure', it was the package maintainer's
-     responsibility to define the `CONFIG_HEADER' variable in each
-     `Makefile.am'.
+     be done by the 'Makefile.am' author.  For instance, if 'config.h'
+     was generated by 'configure', it was the package maintainer's
+     responsibility to define the 'CONFIG_HEADER' variable in each
+     'Makefile.am'.
 
      Succeeding releases will rely more and more on scanning
-     `configure.in' to better automate the Autoconf integration.
+     'configure.in' to better automate the Autoconf integration.
 
-     0.28 also introduces the `AUTOMAKE_OPTIONS' variable and the
-     `--gnu' and `--gnits' options, the latter being stricter.
+     0.28 also introduces the 'AUTOMAKE_OPTIONS' variable and the
+     '--gnu' and '--gnits' options, the latter being stricter.
 
 1996-02-07 Automake 0.29
-     Thanks to `configure.in' scanning, `CONFIG_HEADER' is gone, and
-     rebuild rules for `configure'-generated file are automatically
+
+     Thanks to 'configure.in' scanning, 'CONFIG_HEADER' is gone, and
+     rebuild rules for 'configure'-generated file are automatically
      output.
 
-     `TEXINFOS' and `MANS' converted to the uniform naming scheme.
+     'TEXINFOS' and 'MANS' converted to the uniform naming scheme.
 
 1996-02-24 Automake 0.30
+
      The test suite is born.  It contains 9 tests.  From now on test
      cases will be added pretty regularly (*note Releases::), and this
      proved to be really helpful later on.
 
-     `EXTRA_PROGRAMS' finally replaces `AM_PROGRAMS'.
+     'EXTRA_PROGRAMS' finally replaces 'AM_PROGRAMS'.
 
      All the third-party Autoconf macros, written mostly by Franc,ois
      Pinard (and later Jim Meyering), are distributed in Automake's
-     hand-written `aclocal.m4' file.  Package maintainers are expected
+     hand-written 'aclocal.m4' file.  Package maintainers are expected
      to extract the necessary macros from this file.  (In previous
      versions you had to copy and paste them from the manual...)
 
 1996-03-11 Automake 0.31
-     The test suite in 0.30 was run via a long `check-local' rule.  Upon
+
+     The test suite in 0.30 was run via a long 'check-local' rule.  Upon
      Ulrich Drepper's suggestion, 0.31 makes it an Automake rule output
-     whenever the `TESTS' variable is defined.
+     whenever the 'TESTS' variable is defined.
 
-     `DIST_OTHER' is renamed to `EXTRA_DIST', and the `check_' prefix
-     is introduced.  The syntax is now the same as today.
+     'DIST_OTHER' is renamed to 'EXTRA_DIST', and the 'check_' prefix is
+     introduced.  The syntax is now the same as today.
 
 1996-03-15 Gordon Matzigkeit starts writing libtool.
 
 1996-04-27 Automake 0.32
-     `-hook' targets are introduced; an idea from Dieter Baron.
 
-     `*.info' files, which were output in the build directory are now
+     '-hook' targets are introduced; an idea from Dieter Baron.
+
+     '*.info' files, which were output in the build directory are now
      built in the source directory, because they are distributed.  It
      seems these files like to move back and forth as that will happen
      again in future versions.
 
 1996-05-18 Automake 0.33
+
      Gord Matzigkeit's main two contributions:
 
         * very preliminary libtool support
-
         * the distcheck rule
 
      Although they were very basic at this point, these are probably
      among the top features for Automake today.
 
-     Jim Meyering also provides the infamous `jm_MAINTAINER_MODE', since
-     then renamed to `AM_MAINTAINER_MODE' and abandoned by its author
+     Jim Meyering also provides the infamous 'jm_MAINTAINER_MODE', since
+     then renamed to 'AM_MAINTAINER_MODE' and abandoned by its author
      (*note maintainer-mode: (automake)maintainer-mode.).
 
 1996-05-28 Automake 1.0
-     After only six months of heavy development, the `automake' script
-     is 3134 lines long, plus 973 lines of `Makefile' fragments.  The
+
+     After only six months of heavy development, the 'automake' script
+     is 3134 lines long, plus 973 lines of 'Makefile' fragments.  The
      package has 30 pages of documentation, and 38 test cases.
-     `aclocal.m4' contains 4 macros.
+     'aclocal.m4' contains 4 macros.
 
      From now on and until version 1.4, new releases will occur at a
-     rate of about one a year.  1.1 did not exist, actually 1.1b to
-     1.1p have been the name of beta releases for 1.2.  This is the
-     first time Automake uses suffix letters to designate beta
-     releases, a habit that lasts.
+     rate of about one a year.  1.1 did not exist, actually 1.1b to 1.1p
+     have been the name of beta releases for 1.2.  This is the first
+     time Automake uses suffix letters to designate beta releases, a
+     habit that lasts.
 
 1996-10-10 Kevin Dalley packages Automake 1.0 for Debian GNU/Linux.
 
 1996-11-26 David J. MacKenzie releases Autoconf 2.12.
+
      Between June and October, the Autoconf development is almost
      stalled.  Roland McGrath has been working at the beginning of the
      year.  David comes back in November to release 2.12, but he won't
      touch Autoconf anymore after this year, and Autoconf then really
-     stagnates.  The desolate Autoconf `ChangeLog' for 1997 lists only
-     commits.
+     stagnates.  The desolate Autoconf 'ChangeLog' for 1997 lists only 7
+     commits.
 
 1997-02-28 <automake@gnu.ai.mit.edu> list alive
+
      The mailing list is announced as follows:
           I've created the "automake" mailing list.  It is
           "automake@gnu.ai.mit.edu".  Administrivia, as always, to
@@ -371,84 +382,86 @@ File: automake-history.info,  Node: Timeline,  Next: Dependency Tracking Evoluti
 
      Before that people were discussing Automake privately, on the Gnits
      mailing list (which is not public either), and less frequently on
-     `gnu.misc.discuss'.
+     'gnu.misc.discuss'.
 
-     `gnu.ai.mit.edu' is now `gnu.org', in case you never noticed.  The
-     archives of the early years of the `automake@gnu.org' list have
+     'gnu.ai.mit.edu' is now 'gnu.org', in case you never noticed.  The
+     archives of the early years of the 'automake@gnu.org' list have
      been lost, so today it is almost impossible to find traces of
-     discussions that occurred before 1999.  This has been annoying
-     more than once, as such discussions can be useful to understand
-     the rationale behind a piece of uncommented code that was
-     introduced back then.
+     discussions that occurred before 1999.  This has been annoying more
+     than once, as such discussions can be useful to understand the
+     rationale behind a piece of uncommented code that was introduced
+     back then.
 
 1997-06-22 Automake 1.2
+
      Automake developments continues, and more and more new Autoconf
-     macros are required.  Distributing them in `aclocal.m4' and
-     requiring people to browse this file to extract the relevant
-     macros becomes uncomfortable.  Ideally, some of them should be
-     contributed to Autoconf so that they can be used directly, however
-     Autoconf is currently inactive.  Automake 1.2 consequently
-     introduces `aclocal' (`aclocal' was actually started on
-     1996-07-28), a tool that automatically constructs an `aclocal.m4'
-     file from a repository of third-party macros.  Because Autoconf has
-     stalled, Automake also becomes a kind of repository for such
-     third-party macros, even macros completely unrelated to Automake
-     (for instance macros that fix broken Autoconf macros).
+     macros are required.  Distributing them in 'aclocal.m4' and
+     requiring people to browse this file to extract the relevant macros
+     becomes uncomfortable.  Ideally, some of them should be contributed
+     to Autoconf so that they can be used directly, however Autoconf is
+     currently inactive.  Automake 1.2 consequently introduces 'aclocal'
+     ('aclocal' was actually started on 1996-07-28), a tool that
+     automatically constructs an 'aclocal.m4' file from a repository of
+     third-party macros.  Because Autoconf has stalled, Automake also
+     becomes a kind of repository for such third-party macros, even
+     macros completely unrelated to Automake (for instance macros that
+     fix broken Autoconf macros).
 
      The 1.2 release contains 20 macros, including the
-     `AM_INIT_AUTOMAKE' macro that simplifies the creation of
-     `configure.in'.
+     'AM_INIT_AUTOMAKE' macro that simplifies the creation of
+     'configure.in'.
 
-     Libtool is fully supported using `*_LTLIBRARIES'.
+     Libtool is fully supported using '*_LTLIBRARIES'.
 
      The missing script is introduced by Franc,ois Pinard; it is meant
-     to be a better solution than `AM_MAINTAINER_MODE' (*note
+     to be a better solution than 'AM_MAINTAINER_MODE' (*note
      maintainer-mode: (automake)maintainer-mode.).
 
      Conditionals support was implemented by Ian Lance Taylor.  At the
      time, Tom and Ian were working on an internal project at Cygnus.
-     They were using ILU, which is pretty similar to CORBA.  They
-     wanted to integrate ILU into their build, which was all
-     `configure'-based, and Ian thought that adding conditionals to
-     `automake' was simpler than doing all the work in `configure'
-     (which was the standard at the time).  So this was actually funded
-     by Cygnus.
+     They were using ILU, which is pretty similar to CORBA.  They wanted
+     to integrate ILU into their build, which was all 'configure'-based,
+     and Ian thought that adding conditionals to 'automake' was simpler
+     than doing all the work in 'configure' (which was the standard at
+     the time).  So this was actually funded by Cygnus.
 
      This very useful but tricky feature will take a lot of time to
      stabilize.  (At the time this text is written, there are still
      primaries that have not been updated to support conditional
      definitions in Automake 1.9.)
 
-     The `automake' script has almost doubled: 6089 lines of Perl, plus
-     1294 lines of `Makefile' fragments.
+     The 'automake' script has almost doubled: 6089 lines of Perl, plus
+     1294 lines of 'Makefile' fragments.
 
 1997-07-08 Gordon Matzigkeit releases Libtool 1.0.
 
 1998-04-05 Automake 1.3
+
      This is a small advance compared to 1.2.  It adds support for
      assembly, and preliminary support for Java.
 
      Perl 5.004_04 is out, but fixes to support Perl 4 are still
      regularly submitted whenever Automake breaks it.
 
-1998-09-06 `sourceware.cygnus.com' is on-line.
+1998-09-06 'sourceware.cygnus.com' is on-line.
+
      Sourceware was setup by Jason Molenda to host open source projects.
 
-1998-09-19  Automake CVS repository moved to `sourceware.cygnus.com'
-1998-10-26  `sourceware.cygnus.com' announces it hosts Automake:
-     Automake is now hosted on `sourceware.cygnus.com'.  It has a
+1998-09-19 Automake CVS repository moved to 'sourceware.cygnus.com'
+1998-10-26 'sourceware.cygnus.com' announces it hosts Automake:
+     Automake is now hosted on 'sourceware.cygnus.com'.  It has a
      publicly accessible CVS repository.  This CVS repository is a copy
      of the one Tom was using on his machine, which in turn is based on
      a copy of the CVS repository of David MacKenzie.  This is why we
      still have to full source history.  (Automake was on Sourceware
      until 2007-10-29, when it moved to a git repository on
-     `savannah.gnu.org', but the Sourceware host had been renamed to
-     `sources.redhat.com'.)
+     'savannah.gnu.org', but the Sourceware host had been renamed to
+     'sources.redhat.com'.)
 
      The oldest file in the administrative directory of the CVS
      repository that was created on Sourceware is dated 1998-09-19,
-     while the announcement that `automake' and `autoconf' had joined
-     `sourceware' was made on 1998-10-26.  They were among the first
+     while the announcement that 'automake' and 'autoconf' had joined
+     'sourceware' was made on 1998-10-26.  They were among the first
      projects to be hosted there.
 
      The heedful reader will have noticed Automake was exactly 4 years
@@ -457,21 +470,23 @@ File: automake-history.info,  Node: Timeline,  Next: Dependency Tracking Evoluti
 1999-01-05 Ben Elliston releases Autoconf 2.13.
 
 1999-01-14 Automake 1.4
-     This release adds support for Fortran 77 and for the `include'
-     statement.  Also, `+=' assignments are introduced, but it is still
+
+     This release adds support for Fortran 77 and for the 'include'
+     statement.  Also, '+=' assignments are introduced, but it is still
      quite easy to fool Automake when mixing this with conditionals.
 
      These two releases, Automake 1.4 and Autoconf 2.13 make a duo that
      will be used together for years.
 
-     `automake' is 7228 lines, plus 1591 lines of Makefile fragment, 20
-     macros (some 1.3 macros were finally contributed back to
-     Autoconf), 197 test cases, and 51 pages of documentation.
+     'automake' is 7228 lines, plus 1591 lines of Makefile fragment, 20
+     macros (some 1.3 macros were finally contributed back to Autoconf),
+     197 test cases, and 51 pages of documentation.
+
+1999-03-27 The 'user-dep-branch' is created on the CVS repository.
 
-1999-03-27 The `user-dep-branch' is created on the CVS repository.
      This implements a new dependency tracking schemed that should be
      able to handle automatic dependency tracking using any compiler
-     (not just gcc) and any make (not just GNU `make').  In addition,
+     (not just gcc) and any make (not just GNU 'make').  In addition,
      the new scheme should be more reliable than the old one, as
      dependencies are generated on the end user's machine.  Alexandre
      Oliva creates depcomp for this purpose.
@@ -479,11 +494,13 @@ File: automake-history.info,  Node: Timeline,  Next: Dependency Tracking Evoluti
      *Note Dependency Tracking Evolution::, for more details about the
      evolution of automatic dependency tracking in Automake.
 
-1999-11-21 The `user-dep-branch' is merged into the main trunk.
+1999-11-21 The 'user-dep-branch' is merged into the main trunk.
+
      This was a huge problem since we also had patches going in on the
      trunk.  The merge took a long time and was very painful.
 
 2000-05-10
+
      Since September 1999 and until 2003, Akim Demaille will be
      zealously revamping Autoconf.
 
@@ -494,65 +511,69 @@ File: automake-history.info,  Node: Timeline,  Next: Dependency Tracking Evoluti
           face.
           - Tom Tromey on <autoconf@gnu.org>
 
-     Actually Akim works like a submarine: he will pile up patches
-     while he works off-line during the weekend, and flush them in
-     batch when he resurfaces on Monday.
+     Actually Akim works like a submarine: he will pile up patches while
+     he works off-line during the weekend, and flush them in batch when
+     he resurfaces on Monday.
 
 2001-01-24
+
      On this Wednesday, Autoconf 2.49c, the last beta before Autoconf
      2.50 is out, and Akim has to find something to do during his
      week-end :)
 
 2001-01-28
+
      Akim sends a batch of 14 patches to <automake@gnu.org>.
 
           Aiieeee!  I was dreading the day that the Demaillator turned
-          his sights on automake... and now it has arrived! - Tom Tromey
+          his sights on automake... and now it has arrived!  - Tom
+          Tromey
 
      It's only the beginning: in two months he will send 192 patches.
      Then he would slow down so Tom can catch up and review all this.
-     Initially Tom actually read all these patches, then he probably
-     trustingly answered OK to most of them, and finally gave up and
-     let Akim apply whatever he wanted.  There was no way to keep up
-     with that patch rate.
+     Initially Tom actually read all of these patches, then he probably
+     trustingly answered OK to most of them, and finally gave up and let
+     Akim apply whatever he wanted.  There was no way to keep up with
+     that patch rate.
 
           Anyway the patch below won't apply since it predates Akim's
           sourcequake; I have yet to figure where the relevant passage
           has been moved :) - Alexandre Duret-Lutz
 
-     All these patches were sent to and discussed on
+     All of these patches were sent to and discussed on
      <automake@gnu.org>, so subscribed users were literally drowning in
      technical mails.  Eventually, the <automake-patches@gnu.org>
      mailing list was created in May.
 
      Year after year, Automake had drifted away from its initial design:
-     construct `Makefile.in' by assembling various `Makefile'
-     fragments.  In 1.4, lots of `Makefile' rules are being emitted at
-     various places in the `automake' script itself; this does not help
-     ensuring a consistent treatment of these rules (for instance
-     making sure that user-defined rules override Automake's own rules).
-     One of Akim's goal was moving all these hard-coded rules to
-     separate `Makefile' fragments, so the logic could be centralized
-     in a `Makefile' fragment processor.
+     construct 'Makefile.in' by assembling various 'Makefile' fragments.
+     In 1.4, lots of 'Makefile' rules are being emitted at various
+     places in the 'automake' script itself; this does not help ensuring
+     a consistent treatment of these rules (for instance making sure
+     that user-defined rules override Automake's own rules).  One of
+     Akim's goal was moving all of these hard-coded rules to separate
+     'Makefile' fragments, so the logic could be centralized in a
+     'Makefile' fragment processor.
 
      Another significant contribution of Akim is the interface with the
-     "trace" feature of Autoconf.  The way to scan `configure.in' at
+     "trace" feature of Autoconf.  The way to scan 'configure.in' at
      this time was to read the file and grep the various macro of
      interest to Automake.  Doing so could break in many unexpected
-     ways; `automake' could miss some definition (for instance
-     `AC_SUBST([$1], [$2])' where the arguments are known only when M4
+     ways; 'automake' could miss some definition (for instance
+     'AC_SUBST([$1], [$2])' where the arguments are known only when M4
      is run), or conversely it could detect some macro that was not
      expanded (because it is called conditionally).  In the CVS version
-     of Autoconf, Akim had implemented the `--trace' option, which
+     of Autoconf, Akim had implemented the '--trace' option, which
      provides accurate information about where macros are actually
      called and with what arguments.  Akim will equip Automake with a
-     second `configure.in' scanner that uses this `--trace' interface.
+     second 'configure.in' scanner that uses this '--trace' interface.
      Since it was not sensible to drop the Autoconf 2.13 compatibility
      yet, this experimental scanner was only used when an environment
      variable was set, the traditional grep-scanner being still the
      default.
 
 2001-04-25 Gary V. Vaughan releases Libtool 1.4
+
      It has been more than two years since Automake 1.4, CVS Automake
      has suffered lot's of heavy changes and still is not ready for
      release.  Libtool 1.4 had to be distributed with a patch against
@@ -560,6 +581,7 @@ File: automake-history.info,  Node: Timeline,  Next: Dependency Tracking Evoluti
 
 2001-05-08 Automake 1.4-p1
 2001-05-24 Automake 1.4-p2
+
      Gary V. Vaughan, the principal Libtool maintainer, makes a "patch
      release" of Automake:
 
@@ -574,67 +596,68 @@ File: automake-history.info,  Node: Timeline,  Next: Dependency Tracking Evoluti
 2001-06-07 Automake 1.4-p3
 2001-06-10 Automake 1.4-p4
 2001-07-15 Automake 1.4-p5
+
      Gary continues his patch-release series.  These also add support
      for some new Autoconf 2.50 idioms.  Essentially, Autoconf now
-     advocates `configure.ac' over `configure.in', and it introduces a
-     new syntax for `AC_OUTPUT'ing files.
+     advocates 'configure.ac' over 'configure.in', and it introduces a
+     new syntax for 'AC_OUTPUT'ing files.
 
 2001-08-23 Automake 1.5
+
      A major and long-awaited release, that comes more than two years
      after 1.4.  It brings many changes, among which:
-        * The new dependency tracking scheme that uses `depcomp'.
-          Aside from the improvement on the dependency tracking itself
-          (*note Dependency Tracking Evolution::), this also
-          streamlines the use of `automake'-generated `Makefile.in's as
-          the `Makefile.in's used during development are now the same
-          as those used in distributions.  Before that the
-          `Makefile.in's generated for maintainers required GNU `make'
-          and GCC, they were different from the portable `Makefile'
-          generated for distribution; this was causing some confusion.
+        * The new dependency tracking scheme that uses 'depcomp'.  Aside
+          from the improvement on the dependency tracking itself (*note
+          Dependency Tracking Evolution::), this also streamlines the
+          use of 'automake'-generated 'Makefile.in's as the
+          'Makefile.in's used during development are now the same as
+          those used in distributions.  Before that the 'Makefile.in's
+          generated for maintainers required GNU 'make' and GCC, they
+          were different from the portable 'Makefile' generated for
+          distribution; this was causing some confusion.
 
         * Support for per-target compilation flags.
 
         * Support for reference to files in subdirectories in most
-          `Makefile.am' variables.
+          'Makefile.am' variables.
 
-        * Introduction of the `dist_', `nodist_', and `nobase_'
+        * Introduction of the 'dist_', 'nodist_', and 'nobase_'
           prefixes.
-
         * Perl 4 support is finally dropped.
 
      1.5 did break several packages that worked with 1.4.  Enough so
      that Linux distributions could not easily install the new Automake
-     version without breaking many of the packages for which they had
-     to run `automake'.
-
-     Some of these breakages were effectively bugs that would
-     eventually be fixed in the next release.  However, a lot of damage
-     was caused by some changes made deliberately to render Automake
-     stricter on some setup we did consider bogus.  For instance, `make
-     distcheck' was improved to check that `make uninstall' did remove
-     all the files `make install' installed, that `make distclean' did
-     not omit some file, and that a VPATH build would work even if the
-     source directory was read-only.  Similarly, Automake now rejects
-     multiple definitions of the same variable (because that would mix
-     very badly with conditionals), and `+=' assignments with no
-     previous definition.  Because these changes all occurred suddenly
-     after 1.4 had been established for more than two years, it hurt
-     users.
+     version without breaking many of the packages for which they had to
+     run 'automake'.
+
+     Some of these breakages were effectively bugs that would eventually
+     be fixed in the next release.  However, a lot of damage was caused
+     by some changes made deliberately to render Automake stricter on
+     some setup we did consider bogus.  For instance, 'make distcheck'
+     was improved to check that 'make uninstall' did remove all the
+     files 'make install' installed, that 'make distclean' did not omit
+     some file, and that a VPATH build would work even if the source
+     directory was read-only.  Similarly, Automake now rejects multiple
+     definitions of the same variable (because that would mix very badly
+     with conditionals), and '+=' assignments with no previous
+     definition.  Because these changes all occurred suddenly after 1.4
+     had been established for more than two years, it hurt users.
 
      To make matter worse, meanwhile Autoconf (now at version 2.52) was
      facing similar troubles, for similar reasons.
 
 2002-03-05 Automake 1.6
+
      This release introduced versioned installation (*note API
-     Versioning: (automake)API Versioning.). This was mainly pushed by
+     Versioning: (automake)API Versioning.).  This was mainly pushed by
      Havoc Pennington, taking the GNOME source tree as motive: due to
      incompatibilities between the autotools it's impossible for the
      GNOME packages to switch to Autoconf 2.53 and Automake 1.5 all at
      once, so they are currently stuck with Autoconf 2.13 and Automake
      1.4.
 
-     The idea was to call this version `automake-1.6', call all its
-     bug-fix versions identically, and switch to `automake-1.7' for the
+     The idea was to call this version 'automake-1.6', call all its
+     bug-fix versions identically, and switch to 'automake-1.7' for the
      next release that adds new features or changes some rules.  This
      scheme implies maintaining a bug-fix branch in addition to the
      development trunk, which means more work from the maintainer, but
@@ -644,9 +667,9 @@ File: automake-history.info,  Node: Timeline,  Next: Dependency Tracking Evoluti
      intentional or not.  Perhaps the more annoying was the dependence
      on the newly released Autoconf 2.53.  Autoconf seemed to have
      stabilized enough since its explosive 2.50 release and included
-     changes required to fix some bugs in Automake.  In order to
-     upgrade to Automake 1.6, people now had to upgrade Autoconf too;
-     for some packages it was no picnic.
+     changes required to fix some bugs in Automake.  In order to upgrade
+     to Automake 1.6, people now had to upgrade Autoconf too; for some
+     packages it was no picnic.
 
      While versioned installation helped people to upgrade, it also
      unfortunately allowed people not to upgrade.  At the time of
@@ -658,21 +681,23 @@ File: automake-history.info,  Node: Timeline,  Next: Dependency Tracking Evoluti
      1.4.  All this does not help the newcomer.
 
 2002-04-11 Automake 1.6.1
+
      1.6, and the upcoming 1.4-p6 release were the last release by Tom.
      This one and those following will be handled by Alexandre
      Duret-Lutz.  Tom is still around, and will be there until about
      1.7, but his interest into Automake is drifting away towards
-     projects like `gcj'.
+     projects like 'gcj'.
 
      Alexandre has been using Automake since 2000, and started to
      contribute mostly on Akim's incitement (Akim and Alexandre have
-     been working in the same room from 1999 to 2002).  In 2001 and
-     2002 he had a lot of free time to enjoy hacking Automake.
+     been working in the same room from 1999 to 2002).  In 2001 and 2002
+     he had a lot of free time to enjoy hacking Automake.
 
 2002-06-14 Automake 1.6.2
 
 2002-07-28 Automake 1.6.3
 2002-07-28 Automake 1.4-p6
+
      Two releases on the same day.  1.6.3 is a bug-fix release.
 
      Tom Tromey backported the versioned installation mechanism on the
@@ -680,7 +705,8 @@ File: automake-history.info,  Node: Timeline,  Next: Dependency Tracking Evoluti
      installed side by side.  Another request from the GNOME folks.
 
 2002-09-25 Automake 1.7
-     This release switches to the new `configure.ac' scanner Akim was
+
+     This release switches to the new 'configure.ac' scanner Akim was
      experimenting in 1.5.
 
 2002-10-16 Automake 1.7.1
@@ -691,47 +717,50 @@ File: automake-history.info,  Node: Timeline,  Next: Dependency Tracking Evoluti
 2003-07-10 Automake 1.7.6
 2003-09-07 Automake 1.7.7
 2003-10-07 Automake 1.7.8
+
      Many bug-fix releases.  1.7 lasted because the development version
      (upcoming 1.8) was suffering some major internal revamping.
 
 2003-10-26 Automake on screen
-     Episode 49, `Repercussions', in the third season of the `Alias' TV
+
+     Episode 49, 'Repercussions', in the third season of the 'Alias' TV
      show is first aired.
 
      Marshall, one of the characters, is working on a computer virus
      that he has to modify before it gets into the wrong hands or
      something like that.  The screenshots you see do not show any
-     program code, they show a `Makefile.in' generated by automake...
+     program code, they show a 'Makefile.in' generated by automake...
 
 2003-11-09 Automake 1.7.9
 
 2003-12-10 Automake 1.8
-     The most striking update is probably that of `aclocal'.
 
-     `aclocal' now uses `m4_include' in the produced `aclocal.m4' when
+     The most striking update is probably that of 'aclocal'.
+
+     'aclocal' now uses 'm4_include' in the produced 'aclocal.m4' when
      the included macros are already distributed with the package (an
-     idiom used in many packages), which reduces code duplication.
-     Many people liked that, but in fact this change was really
-     introduced to fix a bug in rebuild rules: `Makefile.in' must be
-     rebuilt whenever a dependency of `configure' changes, but all the
-     `m4' files included in `aclocal.m4' where unknown from `automake'.
-     Now `automake' can just trace the `m4_include's to discover the
+     idiom used in many packages), which reduces code duplication.  Many
+     people liked that, but in fact this change was really introduced to
+     fix a bug in rebuild rules: 'Makefile.in' must be rebuilt whenever
+     a dependency of 'configure' changes, but all the 'm4' files
+     included in 'aclocal.m4' where unknown from 'automake'.  Now
+     'automake' can just trace the 'm4_include's to discover the
      dependencies.
 
-     `aclocal' also starts using the `--trace' Autoconf option in order
+     'aclocal' also starts using the '--trace' Autoconf option in order
      to discover used macros more accurately.  This will turn out to be
      very tricky (later releases will improve this) as people had
-     devised many ways to cope with the limitation of previous
-     `aclocal' versions, notably using handwritten `m4_include's:
-     `aclocal' must make sure not to redefine a rule that is already
-     included by such statement.
+     devised many ways to cope with the limitation of previous 'aclocal'
+     versions, notably using handwritten 'm4_include's: 'aclocal' must
+     make sure not to redefine a rule that is already included by such
+     statement.
 
      Automake also has seen its guts rewritten.  Although this rewriting
      took a lot of efforts, it is only apparent to the users in that
      some constructions previously disallowed by the implementation now
      work nicely.  Conditionals, Locations, Variable and Rule
-     definitions, Options: these items on which Automake works have
-     been rewritten as separate Perl modules, and documented.
+     definitions, Options: these items on which Automake works have been
+     rewritten as separate Perl modules, and documented.
 
 2004-01-11 Automake 1.8.1
 2004-01-12 Automake 1.8.2
@@ -740,36 +769,37 @@ File: automake-history.info,  Node: Timeline,  Next: Dependency Tracking Evoluti
 2004-05-16 Automake 1.8.5
 
 2004-07-28 Automake 1.9
+
      This release tries to simplify the compilation rules it outputs to
      reduce the size of the Makefile.  The complaint initially come from
-     the libgcj developers.  Their `Makefile.in' generated with
-     Automake 1.4 and custom build rules (1.4 did not support compiled
-     Java) is 250KB.  The one generated by 1.8 was over 9MB!  1.9 gets
-     it down to 1.2MB.
+     the libgcj developers.  Their 'Makefile.in' generated with Automake
+     1.4 and custom build rules (1.4 did not support compiled Java) is
+     250KB.  The one generated by 1.8 was over 9MB!  1.9 gets it down to
+     1.2MB.
 
      Aside from this it contains mainly minor changes and bug-fixes.
 
 2004-08-11 Automake 1.9.1
 2004-09-19 Automake 1.9.2
+
      Automake has ten years.  This chapter of the manual was initially
      written for this occasion.
 
-2007-10-29 Automake repository moves to `savannah.gnu.org'
+2007-10-29 Automake repository moves to 'savannah.gnu.org'
      and uses git as primary repository.
 
-
 \1f
 File: automake-history.info,  Node: Dependency Tracking Evolution,  Next: Releases,  Prev: Timeline,  Up: Top
 
 2 Evolution of Automatic Dependency Tracking
 ********************************************
 
-Over the years Automake has deployed three different dependency
-tracking methods.  Each method, including the current one, has had
-flaws of various sorts.  Here we lay out the different dependency
-tracking methods, their flaws, and their fixes.  We conclude with
-recommendations for tool writers, and by indicating future directions
-for dependency tracking work in Automake.
+Over the years Automake has deployed three different dependency tracking
+methods.  Each method, including the current one, has had flaws of
+various sorts.  Here we lay out the different dependency tracking
+methods, their flaws, and their fixes.  We conclude with recommendations
+for tool writers, and by indicating future directions for dependency
+tracking work in Automake.
 
 * Menu:
 
@@ -788,54 +818,50 @@ Description
 -----------
 
 Our first attempt at automatic dependency tracking was based on the
-method recommended by GNU `make'.  (*note Generating Prerequisites
+method recommended by GNU 'make'.  (*note Generating Prerequisites
 Automatically: (make)Automatic Prerequisites.)
 
    This version worked by precomputing dependencies ahead of time.  For
-each source file, it had a special `.P' file that held the
-dependencies.  There was a rule to generate a `.P' file by invoking the
-compiler appropriately.  All such `.P' files were included by the
-`Makefile', thus implicitly becoming dependencies of `Makefile'.
+each source file, it had a special '.P' file that held the dependencies.
+There was a rule to generate a '.P' file by invoking the compiler
+appropriately.  All such '.P' files were included by the 'Makefile',
+thus implicitly becoming dependencies of 'Makefile'.
 
 Bugs
 ----
 
 This approach had several critical bugs.
 
-   * The code to generate the `.P' file relied on `gcc'.  (A
+   * The code to generate the '.P' file relied on 'gcc'.  (A limitation,
+     not technically a bug.)
+   * The dependency tracking mechanism itself relied on GNU 'make'.  (A
      limitation, not technically a bug.)
-
-   * The dependency tracking mechanism itself relied on GNU `make'.  (A
-     limitation, not technically a bug.)
-
-   * Because each `.P' file was a dependency of `Makefile', this meant
-     that dependency tracking was done eagerly by `make'.  For
-     instance, `make clean' would cause all the dependency files to be
-     updated, and then immediately removed.  This eagerness also caused
-     problems with some configurations; if a certain source file could
-     not be compiled on a given architecture for some reason,
-     dependency tracking would fail, aborting the entire build.
-
+   * Because each '.P' file was a dependency of 'Makefile', this meant
+     that dependency tracking was done eagerly by 'make'.  For instance,
+     'make clean' would cause all the dependency files to be updated,
+     and then immediately removed.  This eagerness also caused problems
+     with some configurations; if a certain source file could not be
+     compiled on a given architecture for some reason, dependency
+     tracking would fail, aborting the entire build.
    * As dependency tracking was done as a pre-pass, compile times were
      doubled-the compiler had to be run twice per source file.
-
-   * `make dist' re-ran `automake' to generate a `Makefile' that did
-     not have automatic dependency tracking (and that was thus portable
-     to any version of `make').  In order to do this portably, Automake
-     had to scan the dependency files and remove any reference that was
-     to a source file not in the distribution.  This process was
-     error-prone.  Also, if `make dist' was run in an environment where
-     some object file had a dependency on a source file that was only
-     conditionally created, Automake would generate a `Makefile' that
-     referred to a file that might not appear in the end user's build.
-     A special, hacky mechanism was required to work around this.
+   * 'make dist' re-ran 'automake' to generate a 'Makefile' that did not
+     have automatic dependency tracking (and that was thus portable to
+     any version of 'make').  In order to do this portably, Automake had
+     to scan the dependency files and remove any reference that was to a
+     source file not in the distribution.  This process was error-prone.
+     Also, if 'make dist' was run in an environment where some object
+     file had a dependency on a source file that was only conditionally
+     created, Automake would generate a 'Makefile' that referred to a
+     file that might not appear in the end user's build.  A special,
+     hacky mechanism was required to work around this.
 
 Historical Note
 ---------------
 
-The code generated by Automake is often inspired by the `Makefile'
-style of a particular author.  In the case of the first implementation
-of dependency tracking, I believe the impetus and inspiration was Jim
+The code generated by Automake is often inspired by the 'Makefile' style
+of a particular author.  In the case of the first implementation of
+dependency tracking, I believe the impetus and inspiration was Jim
 Meyering.  (I could be mistaken.  If you know otherwise feel free to
 correct me.)
 
@@ -854,39 +880,37 @@ was aimed at solving the most commonly reported problems with the first
 approach.  In particular we were most concerned with eliminating the
 weird rebuilding effect associated with make clean.
 
-   In this approach, the `.P' files were included using the `-include'
-command, which let us create these files lazily.  This avoided the
-`make clean' problem.
+   In this approach, the '.P' files were included using the '-include'
+command, which let us create these files lazily.  This avoided the 'make
+clean' problem.
 
    We only computed dependencies when a file was actually compiled.
 This avoided the performance penalty associated with scanning each file
 twice.  It also let us avoid the other problems associated with the
-first, eager, implementation.  For instance, dependencies would never
-be generated for a source file that was not compilable on a given
+first, eager, implementation.  For instance, dependencies would never be
+generated for a source file that was not compilable on a given
 architecture (because it in fact would never be compiled).
 
 Bugs
 ----
 
-   * This approach also relied on the existence of `gcc' and GNU
-     `make'.  (A limitation, not technically a bug.)
-
+   * This approach also relied on the existence of 'gcc' and GNU 'make'.
+     (A limitation, not technically a bug.)
    * Dependency tracking was still done by the developer, so the
      problems from the first implementation relating to massaging of
-     dependencies by `make dist' were still in effect.
-
+     dependencies by 'make dist' were still in effect.
    * This implementation suffered from the "deleted header file"
-     problem.  Suppose a lazily-created `.P' file includes a dependency
+     problem.  Suppose a lazily-created '.P' file includes a dependency
      on a given header file, like this:
 
           maude.o: maude.c something.h
 
-     Now suppose that you remove `something.h' and update `maude.c' so
-     that this include is no longer needed.  If you run `make', you
-     will get an error because there is no way to create `something.h'.
+     Now suppose that you remove 'something.h' and update 'maude.c' so
+     that this include is no longer needed.  If you run 'make', you will
+     get an error because there is no way to create 'something.h'.
 
      We fixed this problem in a later release by further massaging the
-     output of `gcc' to include a dummy dependency for each header file.
+     output of 'gcc' to include a dummy dependency for each header file.
 
 \1f
 File: automake-history.info,  Node: Dependencies for the User,  Next: Techniques for Dependencies,  Prev: Dependencies As Side Effects,  Up: Dependency Tracking Evolution
@@ -897,39 +921,35 @@ File: automake-history.info,  Node: Dependencies for the User,  Next: Techniques
 Description
 -----------
 
-The bugs associated with `make dist', over time, became a real problem.
-Packages using Automake were being built on a large number of
-platforms, and were becoming increasingly complex.  Broken dependencies
-were distributed in "portable" `Makefile.in's, leading to user
-complaints.  Also, the requirement for `gcc' and GNU `make' was a
-constant source of bug reports.  The next implementation of dependency
-tracking aimed to remove these problems.
+The bugs associated with 'make dist', over time, became a real problem.
+Packages using Automake were being built on a large number of platforms,
+and were becoming increasingly complex.  Broken dependencies were
+distributed in "portable" 'Makefile.in's, leading to user complaints.
+Also, the requirement for 'gcc' and GNU 'make' was a constant source of
+bug reports.  The next implementation of dependency tracking aimed to
+remove these problems.
 
    We realized that the only truly reliable way to automatically track
-dependencies was to do it when the package itself was built.  This
-meant discovering a method portable to any version of make and any
-compiler.  Also, we wanted to preserve what we saw as the best point of
-the second implementation: dependency computation as a side effect of
-compilation.
+dependencies was to do it when the package itself was built.  This meant
+discovering a method portable to any version of make and any compiler.
+Also, we wanted to preserve what we saw as the best point of the second
+implementation: dependency computation as a side effect of compilation.
 
    In the end we found that most modern make implementations support
 some form of include directive.  Also, we wrote a wrapper script that
 let us abstract away differences between dependency tracking methods for
-compilers.  For instance, some compilers cannot generate dependencies
-as a side effect of compilation.  In this case we simply have the
-script run the compiler twice.  Currently our wrapper script
-(`depcomp') knows about twelve different compilers (including a
-"compiler" that simply invokes `makedepend' and then the real compiler,
-which is assumed to be a standard Unix-like C compiler with no way to
-do dependency tracking).
+compilers.  For instance, some compilers cannot generate dependencies as
+a side effect of compilation.  In this case we simply have the script
+run the compiler twice.  Currently our wrapper script ('depcomp') knows
+about twelve different compilers (including a "compiler" that simply
+invokes 'makedepend' and then the real compiler, which is assumed to be
+a standard Unix-like C compiler with no way to do dependency tracking).
 
 Bugs
 ----
 
    * Running a wrapper script for each compilation slows down the build.
-
    * Many users don't really care about precise dependencies.
-
    * This implementation, like every other automatic dependency tracking
      scheme in common use today (indeed, every one we've ever heard of),
      suffers from the "duplicated new header" bug.
@@ -958,16 +978,16 @@ Bugs
      generators to record every probe, instead of every successful open.
 
    * Since Automake generates dependencies as a side effect of
-     compilation, there is a bootstrapping problem when header files
-     are generated by running a program.  The problem is that, the
-     first time the build is done, there is no way by default to know
-     that the headers are required, so make might try to run a
-     compilation for which the headers have not yet been built.
+     compilation, there is a bootstrapping problem when header files are
+     generated by running a program.  The problem is that, the first
+     time the build is done, there is no way by default to know that the
+     headers are required, so make might try to run a compilation for
+     which the headers have not yet been built.
 
      This was also a problem in the previous dependency tracking
      implementation.
 
-     The current fix is to use `BUILT_SOURCES' to list built headers
+     The current fix is to use 'BUILT_SOURCES' to list built headers
      (*note Sources: (automake)Sources.).  This causes them to be built
      before any other build rules are run.  This is unsatisfactory as a
      general solution, however in practice it seems sufficient for most
@@ -978,19 +998,19 @@ Bugs
    In GCC 3.0, we managed to convince the maintainers to add special
 command-line options to help Automake more efficiently do its job.  We
 hoped this would let us avoid the use of a wrapper script when
-Automake's automatic dependency tracking was used with `gcc'.
+Automake's automatic dependency tracking was used with 'gcc'.
 
    Unfortunately, this code doesn't quite do what we want.  In
 particular, it removes the dependency file if the compilation fails;
 we'd prefer that it instead only touch the file in any way if the
 compilation succeeds.
 
-   Nevertheless, since Automake 1.7, when a recent `gcc' is detected at
-`configure' time, we inline the dependency-generation code and do not
-use the `depcomp' wrapper script.  This makes compilations faster for
+   Nevertheless, since Automake 1.7, when a recent 'gcc' is detected at
+'configure' time, we inline the dependency-generation code and do not
+use the 'depcomp' wrapper script.  This makes compilations faster for
 those using this compiler (probably our primary user base).  The
 counterpart is that because we have to encode two compilation rules in
-`Makefile' (with or without `depcomp'), the produced `Makefile's are
+'Makefile' (with or without 'depcomp'), the produced 'Makefile's are
 larger.
 
 \1f
@@ -1002,33 +1022,30 @@ File: automake-history.info,  Node: Techniques for Dependencies,  Prev: Dependen
 There are actually several ways for a build tool like Automake to cause
 tools to generate dependencies.
 
-`makedepend'
+'makedepend'
      This was a commonly-used method in the past.  The idea is to run a
      special program over the source and have it generate dependency
-     information.  Traditional implementations of `makedepend' are not
+     information.  Traditional implementations of 'makedepend' are not
      completely precise; ordinarily they were conservative and
      discovered too many dependencies.
-
 The tool
-     An obvious way to generate dependencies is to simply write the
-     tool so that it can generate the information needed by the build
-     tool.  This is also the most portable method.  Many compilers have
-     an option to generate dependencies.  Unfortunately, not all tools
+     An obvious way to generate dependencies is to simply write the tool
+     so that it can generate the information needed by the build tool.
+     This is also the most portable method.  Many compilers have an
+     option to generate dependencies.  Unfortunately, not all tools
      provide such an option.
-
 The file system
      It is possible to write a special file system that tracks opens,
      reads, writes, etc, and then feed this information back to the
-     build tool.  `clearmake' does this.  This is a very powerful
+     build tool.  'clearmake' does this.  This is a very powerful
      technique, as it doesn't require cooperation from the tool.
      Unfortunately it is also very difficult to implement and also not
      practical in the general case.
-
-`LD_PRELOAD'
+'LD_PRELOAD'
      Rather than use the file system, one could write a special library
-     to intercept `open' and other syscalls.  This technique is also
-     quite powerful, but unfortunately it is not portable enough for
-     use in `automake'.
+     to intercept 'open' and other syscalls.  This technique is also
+     quite powerful, but unfortunately it is not portable enough for use
+     in 'automake'.
 
 * Menu:
 
@@ -1043,7 +1060,7 @@ File: automake-history.info,  Node: Recommendations for Tool Writers,  Next: Fut
 
 We think that every compilation tool ought to be able to generate
 dependencies as a side effect of compilation.  Furthermore, at least
-while `make'-based tools are nearly universally in use (at least in the
+while 'make'-based tools are nearly universally in use (at least in the
 free software community), the tool itself should generate dummy
 dependencies for header files, to avoid the deleted header file bug.
 Finally, the tool should generate a dependency for each probe, instead
@@ -1067,49 +1084,42 @@ File: automake-history.info,  Node: Releases,  Next: Copying This Manual,  Prev:
 3 Release Statistics
 ********************
 
-The following table (inspired by `perlhist(1)') quantifies the
-evolution of Automake using these metrics:
+The following table (inspired by 'perlhist(1)') quantifies the evolution
+of Automake using these metrics:
 
 Date, Rel
      The date and version of the release.
-
 am
-     The number of lines of the `automake' script.
-
+     The number of lines of the 'automake' script.
 acl
-     The number of lines of the `aclocal' script.
-
+     The number of lines of the 'aclocal' script.
 pm
-     The number of lines of the `Perl' supporting modules.
-
-`*.am'
-     The number of lines of the `Makefile' fragments.  The number in
+     The number of lines of the 'Perl' supporting modules.
+'*.am'
+     The number of lines of the 'Makefile' fragments.  The number in
      parentheses is the number of files.
-
 m4
      The number of lines (and files) of Autoconf macros.
-
 doc
      The number of pages of the documentation (the Postscript version).
-
 t
      The number of test cases in the test suite.  Of those, the number
      in parentheses is the number of generated test cases.
 
-Date         Rel      am     acl    pm     `*.am'      m4          doc   t
------------------------------------------------------------------------------------- 
-1994-09-19   CVS      141                  299 (24)                      
-1994-11-05   CVS      208                  332 (28)                      
-1995-11-23   0.20     533                  458 (35)                9     
-1995-11-26   0.21     613                  480 (36)                11    
-1995-11-28   0.22     1116                 539 (38)                12    
-1995-11-29   0.23     1240                 541 (38)                12    
-1995-12-08   0.24     1462                 504 (33)                14    
-1995-12-10   0.25     1513                 511 (37)                15    
-1996-01-03   0.26     1706                 438 (36)                16    
-1996-01-03   0.27     1706                 438 (36)                16    
-1996-01-13   0.28     1964                 934 (33)                16    
-1996-02-07   0.29     2299                 936 (33)                17    
+Date         Rel      am     acl    pm     '*.am'      m4          doc   t
+------------------------------------------------------------------------------------
+1994-09-19   CVS      141                  299 (24)
+1994-11-05   CVS      208                  332 (28)
+1995-11-23   0.20     533                  458 (35)                9
+1995-11-26   0.21     613                  480 (36)                11
+1995-11-28   0.22     1116                 539 (38)                12
+1995-11-29   0.23     1240                 541 (38)                12
+1995-12-08   0.24     1462                 504 (33)                14
+1995-12-10   0.25     1513                 511 (37)                15
+1996-01-03   0.26     1706                 438 (36)                16
+1996-01-03   0.27     1706                 438 (36)                16
+1996-01-13   0.28     1964                 934 (33)                16
+1996-02-07   0.29     2299                 936 (33)                17
 1996-02-24   0.30     2544                 919 (32)    85 (1)      20    9
 1996-03-11   0.31     2877                 919 (32)    85 (1)      29    17
 1996-04-27   0.32     3058                 921 (31)    85 (1)      30    26
@@ -1175,8 +1185,8 @@ A.1 GNU Free Documentation License
 
                      Version 1.3, 3 November 2008
 
-     Copyright (C) 2000-2012 Free Software Foundation, Inc.
-     `http://fsf.org/'
+     Copyright (C) 2000-2017 Free Software Foundation, Inc.
+     <http://fsf.org/>
 
      Everyone is permitted to copy and distribute verbatim copies
      of this license document, but changing it is not allowed.
@@ -1201,21 +1211,21 @@ A.1 GNU Free Documentation License
      free program should come with manuals providing the same freedoms
      that the software does.  But this License is not limited to
      software manuals; it can be used for any textual work, regardless
-     of subject matter or whether it is published as a printed book.
-     We recommend this License principally for works whose purpose is
+     of subject matter or whether it is published as a printed book.  We
+     recommend this License principally for works whose purpose is
      instruction or reference.
 
   1. APPLICABILITY AND DEFINITIONS
 
      This License applies to any manual or other work, in any medium,
-     that contains a notice placed by the copyright holder saying it
-     can be distributed under the terms of this License.  Such a notice
+     that contains a notice placed by the copyright holder saying it can
+     be distributed under the terms of this License.  Such a notice
      grants a world-wide, royalty-free license, unlimited in duration,
      to use that work under the conditions stated herein.  The
      "Document", below, refers to any such manual or work.  Any member
-     of the public is a licensee, and is addressed as "you".  You
-     accept the license if you copy, modify or distribute the work in a
-     way requiring permission under copyright law.
+     of the public is a licensee, and is addressed as "you".  You accept
+     the license if you copy, modify or distribute the work in a way
+     requiring permission under copyright law.
 
      A "Modified Version" of the Document means any work containing the
      Document or a portion of it, either copied verbatim, or with
@@ -1233,12 +1243,12 @@ A.1 GNU Free Documentation License
      regarding them.
 
      The "Invariant Sections" are certain Secondary Sections whose
-     titles are designated, as being those of Invariant Sections, in
-     the notice that says that the Document is released under this
-     License.  If a section does not fit the above definition of
-     Secondary then it is not allowed to be designated as Invariant.
-     The Document may contain zero Invariant Sections.  If the Document
-     does not identify any Invariant Sections then there are none.
+     titles are designated, as being those of Invariant Sections, in the
+     notice that says that the Document is released under this License.
+     If a section does not fit the above definition of Secondary then it
+     is not allowed to be designated as Invariant.  The Document may
+     contain zero Invariant Sections.  If the Document does not identify
+     any Invariant Sections then there are none.
 
      The "Cover Texts" are certain short passages of text that are
      listed, as Front-Cover Texts or Back-Cover Texts, in the notice
@@ -1249,27 +1259,27 @@ A.1 GNU Free Documentation License
      A "Transparent" copy of the Document means a machine-readable copy,
      represented in a format whose specification is available to the
      general public, that is suitable for revising the document
-     straightforwardly with generic text editors or (for images
-     composed of pixels) generic paint programs or (for drawings) some
-     widely available drawing editor, and that is suitable for input to
-     text formatters or for automatic translation to a variety of
-     formats suitable for input to text formatters.  A copy made in an
-     otherwise Transparent file format whose markup, or absence of
-     markup, has been arranged to thwart or discourage subsequent
-     modification by readers is not Transparent.  An image format is
-     not Transparent if used for any substantial amount of text.  A
-     copy that is not "Transparent" is called "Opaque".
+     straightforwardly with generic text editors or (for images composed
+     of pixels) generic paint programs or (for drawings) some widely
+     available drawing editor, and that is suitable for input to text
+     formatters or for automatic translation to a variety of formats
+     suitable for input to text formatters.  A copy made in an otherwise
+     Transparent file format whose markup, or absence of markup, has
+     been arranged to thwart or discourage subsequent modification by
+     readers is not Transparent.  An image format is not Transparent if
+     used for any substantial amount of text.  A copy that is not
+     "Transparent" is called "Opaque".
 
      Examples of suitable formats for Transparent copies include plain
      ASCII without markup, Texinfo input format, LaTeX input format,
-     SGML or XML using a publicly available DTD, and
-     standard-conforming simple HTML, PostScript or PDF designed for
-     human modification.  Examples of transparent image formats include
-     PNG, XCF and JPG.  Opaque formats include proprietary formats that
-     can be read and edited only by proprietary word processors, SGML or
-     XML for which the DTD and/or processing tools are not generally
-     available, and the machine-generated HTML, PostScript or PDF
-     produced by some word processors for output purposes only.
+     SGML or XML using a publicly available DTD, and standard-conforming
+     simple HTML, PostScript or PDF designed for human modification.
+     Examples of transparent image formats include PNG, XCF and JPG.
+     Opaque formats include proprietary formats that can be read and
+     edited only by proprietary word processors, SGML or XML for which
+     the DTD and/or processing tools are not generally available, and
+     the machine-generated HTML, PostScript or PDF produced by some word
+     processors for output purposes only.
 
      The "Title Page" means, for a printed book, the title page itself,
      plus such following pages as are needed to hold, legibly, the
@@ -1307,8 +1317,8 @@ A.1 GNU Free Documentation License
      may not use technical measures to obstruct or control the reading
      or further copying of the copies you make or distribute.  However,
      you may accept compensation in exchange for copies.  If you
-     distribute a large enough number of copies you must also follow
-     the conditions in section 3.
+     distribute a large enough number of copies you must also follow the
+     conditions in section 3.
 
      You may also lend copies, under the same conditions stated above,
      and you may publicly display copies.
@@ -1319,15 +1329,14 @@ A.1 GNU Free Documentation License
      have printed covers) of the Document, numbering more than 100, and
      the Document's license notice requires Cover Texts, you must
      enclose the copies in covers that carry, clearly and legibly, all
-     these Cover Texts: Front-Cover Texts on the front cover, and
+     of these Cover Texts: Front-Cover Texts on the front cover, and
      Back-Cover Texts on the back cover.  Both covers must also clearly
      and legibly identify you as the publisher of these copies.  The
-     front cover must present the full title with all words of the
-     title equally prominent and visible.  You may add other material
-     on the covers in addition.  Copying with changes limited to the
-     covers, as long as they preserve the title of the Document and
-     satisfy these conditions, can be treated as verbatim copying in
-     other respects.
+     front cover must present the full title with all words of the title
+     equally prominent and visible.  You may add other material on the
+     covers in addition.  Copying with changes limited to the covers, as
+     long as they preserve the title of the Document and satisfy these
+     conditions, can be treated as verbatim copying in other respects.
 
      If the required texts for either cover are too voluminous to fit
      legibly, you should put the first ones listed (as many as fit
@@ -1335,40 +1344,39 @@ A.1 GNU Free Documentation License
      adjacent pages.
 
      If you publish or distribute Opaque copies of the Document
-     numbering more than 100, you must either include a
-     machine-readable Transparent copy along with each Opaque copy, or
-     state in or with each Opaque copy a computer-network location from
-     which the general network-using public has access to download
-     using public-standard network protocols a complete Transparent
-     copy of the Document, free of added material.  If you use the
-     latter option, you must take reasonably prudent steps, when you
-     begin distribution of Opaque copies in quantity, to ensure that
-     this Transparent copy will remain thus accessible at the stated
-     location until at least one year after the last time you
-     distribute an Opaque copy (directly or through your agents or
-     retailers) of that edition to the public.
+     numbering more than 100, you must either include a machine-readable
+     Transparent copy along with each Opaque copy, or state in or with
+     each Opaque copy a computer-network location from which the general
+     network-using public has access to download using public-standard
+     network protocols a complete Transparent copy of the Document, free
+     of added material.  If you use the latter option, you must take
+     reasonably prudent steps, when you begin distribution of Opaque
+     copies in quantity, to ensure that this Transparent copy will
+     remain thus accessible at the stated location until at least one
+     year after the last time you distribute an Opaque copy (directly or
+     through your agents or retailers) of that edition to the public.
 
      It is requested, but not required, that you contact the authors of
-     the Document well before redistributing any large number of
-     copies, to give them a chance to provide you with an updated
-     version of the Document.
+     the Document well before redistributing any large number of copies,
+     to give them a chance to provide you with an updated version of the
+     Document.
 
   4. MODIFICATIONS
 
      You may copy and distribute a Modified Version of the Document
      under the conditions of sections 2 and 3 above, provided that you
-     release the Modified Version under precisely this License, with
-     the Modified Version filling the role of the Document, thus
-     licensing distribution and modification of the Modified Version to
-     whoever possesses a copy of it.  In addition, you must do these
-     things in the Modified Version:
+     release the Modified Version under precisely this License, with the
+     Modified Version filling the role of the Document, thus licensing
+     distribution and modification of the Modified Version to whoever
+     possesses a copy of it.  In addition, you must do these things in
+     the Modified Version:
 
        A. Use in the Title Page (and on the covers, if any) a title
-          distinct from that of the Document, and from those of
-          previous versions (which should, if there were any, be listed
-          in the History section of the Document).  You may use the
-          same title as a previous version if the original publisher of
-          that version gives permission.
+          distinct from that of the Document, and from those of previous
+          versions (which should, if there were any, be listed in the
+          History section of the Document).  You may use the same title
+          as a previous version if the original publisher of that
+          version gives permission.
 
        B. List on the Title Page, as authors, one or more persons or
           entities responsible for authorship of the modifications in
@@ -1398,31 +1406,30 @@ A.1 GNU Free Documentation License
 
        I. Preserve the section Entitled "History", Preserve its Title,
           and add to it an item stating at least the title, year, new
-          authors, and publisher of the Modified Version as given on
-          the Title Page.  If there is no section Entitled "History" in
-          the Document, create one stating the title, year, authors,
-          and publisher of the Document as given on its Title Page,
-          then add an item describing the Modified Version as stated in
-          the previous sentence.
+          authors, and publisher of the Modified Version as given on the
+          Title Page.  If there is no section Entitled "History" in the
+          Document, create one stating the title, year, authors, and
+          publisher of the Document as given on its Title Page, then add
+          an item describing the Modified Version as stated in the
+          previous sentence.
 
        J. Preserve the network location, if any, given in the Document
           for public access to a Transparent copy of the Document, and
           likewise the network locations given in the Document for
-          previous versions it was based on.  These may be placed in
-          the "History" section.  You may omit a network location for a
-          work that was published at least four years before the
-          Document itself, or if the original publisher of the version
-          it refers to gives permission.
+          previous versions it was based on.  These may be placed in the
+          "History" section.  You may omit a network location for a work
+          that was published at least four years before the Document
+          itself, or if the original publisher of the version it refers
+          to gives permission.
 
        K. For any section Entitled "Acknowledgements" or "Dedications",
-          Preserve the Title of the section, and preserve in the
-          section all the substance and tone of each of the contributor
+          Preserve the Title of the section, and preserve in the section
+          all the substance and tone of each of the contributor
           acknowledgements and/or dedications given therein.
 
-       L. Preserve all the Invariant Sections of the Document,
-          unaltered in their text and in their titles.  Section numbers
-          or the equivalent are not considered part of the section
-          titles.
+       L. Preserve all the Invariant Sections of the Document, unaltered
+          in their text and in their titles.  Section numbers or the
+          equivalent are not considered part of the section titles.
 
        M. Delete any section Entitled "Endorsements".  Such a section
           may not be included in the Modified Version.
@@ -1435,11 +1442,11 @@ A.1 GNU Free Documentation License
 
      If the Modified Version includes new front-matter sections or
      appendices that qualify as Secondary Sections and contain no
-     material copied from the Document, you may at your option
-     designate some or all of these sections as invariant.  To do this,
-     add their titles to the list of Invariant Sections in the Modified
-     Version's license notice.  These titles must be distinct from any
-     other section titles.
+     material copied from the Document, you may at your option designate
+     some or all of these sections as invariant.  To do this, add their
+     titles to the list of Invariant Sections in the Modified Version's
+     license notice.  These titles must be distinct from any other
+     section titles.
 
      You may add a section Entitled "Endorsements", provided it contains
      nothing but endorsements of your Modified Version by various
@@ -1448,15 +1455,15 @@ A.1 GNU Free Documentation License
      definition of a standard.
 
      You may add a passage of up to five words as a Front-Cover Text,
-     and a passage of up to 25 words as a Back-Cover Text, to the end
-     of the list of Cover Texts in the Modified Version.  Only one
-     passage of Front-Cover Text and one of Back-Cover Text may be
-     added by (or through arrangements made by) any one entity.  If the
-     Document already includes a cover text for the same cover,
-     previously added by you or by arrangement made by the same entity
-     you are acting on behalf of, you may not add another; but you may
-     replace the old one, on explicit permission from the previous
-     publisher that added the old one.
+     and a passage of up to 25 words as a Back-Cover Text, to the end of
+     the list of Cover Texts in the Modified Version.  Only one passage
+     of Front-Cover Text and one of Back-Cover Text may be added by (or
+     through arrangements made by) any one entity.  If the Document
+     already includes a cover text for the same cover, previously added
+     by you or by arrangement made by the same entity you are acting on
+     behalf of, you may not add another; but you may replace the old
+     one, on explicit permission from the previous publisher that added
+     the old one.
 
      The author(s) and publisher(s) of the Document do not by this
      License give permission to use their names for publicity for or to
@@ -1466,8 +1473,8 @@ A.1 GNU Free Documentation License
 
      You may combine the Document with other documents released under
      this License, under the terms defined in section 4 above for
-     modified versions, provided that you include in the combination
-     all of the Invariant Sections of all of the original documents,
+     modified versions, provided that you include in the combination all
+     of the Invariant Sections of all of the original documents,
      unmodified, and list them all as Invariant Sections of your
      combined work in its license notice, and that you preserve all
      their Warranty Disclaimers.
@@ -1494,20 +1501,20 @@ A.1 GNU Free Documentation License
      documents released under this License, and replace the individual
      copies of this License in the various documents with a single copy
      that is included in the collection, provided that you follow the
-     rules of this License for verbatim copying of each of the
-     documents in all other respects.
+     rules of this License for verbatim copying of each of the documents
+     in all other respects.
 
      You may extract a single document from such a collection, and
      distribute it individually under this License, provided you insert
-     a copy of this License into the extracted document, and follow
-     this License in all other respects regarding verbatim copying of
-     that document.
+     a copy of this License into the extracted document, and follow this
+     License in all other respects regarding verbatim copying of that
+     document.
 
   7. AGGREGATION WITH INDEPENDENT WORKS
 
      A compilation of the Document or its derivatives with other
-     separate and independent documents or works, in or on a volume of
-     storage or distribution medium, is called an "aggregate" if the
+     separate and independent documents or works, in or on a volume of a
+     storage or distribution medium, is called an "aggregate" if the
      copyright resulting from the compilation is not used to limit the
      legal rights of the compilation's users beyond what the individual
      works permit.  When the Document is included in an aggregate, this
@@ -1552,8 +1559,8 @@ A.1 GNU Free Documentation License
 
      However, if you cease all violation of this License, then your
      license from a particular copyright holder is reinstated (a)
-     provisionally, unless and until the copyright holder explicitly
-     and finally terminates your license, and (b) permanently, if the
+     provisionally, unless and until the copyright holder explicitly and
+     finally terminates your license, and (b) permanently, if the
      copyright holder fails to notify you of the violation by some
      reasonable means prior to 60 days after the cessation.
 
@@ -1565,33 +1572,33 @@ A.1 GNU Free Documentation License
      after your receipt of the notice.
 
      Termination of your rights under this section does not terminate
-     the licenses of parties who have received copies or rights from
-     you under this License.  If your rights have been terminated and
-     not permanently reinstated, receipt of a copy of some or all of
-     the same material does not give you any rights to use it.
+     the licenses of parties who have received copies or rights from you
+     under this License.  If your rights have been terminated and not
+     permanently reinstated, receipt of a copy of some or all of the
+     same material does not give you any rights to use it.
 
- 10. FUTURE REVISIONS OF THIS LICENSE
 10. FUTURE REVISIONS OF THIS LICENSE
 
      The Free Software Foundation may publish new, revised versions of
      the GNU Free Documentation License from time to time.  Such new
      versions will be similar in spirit to the present version, but may
      differ in detail to address new problems or concerns.  See
-     `http://www.gnu.org/copyleft/'.
+     <http://www.gnu.org/copyleft/>.
 
      Each version of the License is given a distinguishing version
      number.  If the Document specifies that a particular numbered
      version of this License "or any later version" applies to it, you
      have the option of following the terms and conditions either of
      that specified version or of any later version that has been
-     published (not as a draft) by the Free Software Foundation.  If
-     the Document does not specify a version number of this License,
-     you may choose any version ever published (not as a draft) by the
-     Free Software Foundation.  If the Document specifies that a proxy
-     can decide which future versions of this License can be used, that
+     published (not as a draft) by the Free Software Foundation.  If the
+     Document does not specify a version number of this License, you may
+     choose any version ever published (not as a draft) by the Free
+     Software Foundation.  If the Document specifies that a proxy can
+     decide which future versions of this License can be used, that
      proxy's public statement of acceptance of a version permanently
      authorizes you to choose that version for the Document.
 
- 11. RELICENSING
 11. RELICENSING
 
      "Massive Multiauthor Collaboration Site" (or "MMC Site") means any
      World Wide Web server that publishes copyrightable works and also
@@ -1621,7 +1628,6 @@ A.1 GNU Free Documentation License
      site under CC-BY-SA on the same site at any time before August 1,
      2009, provided the MMC is eligible for relicensing.
 
-
 ADDENDUM: How to use this License for your documents
 ====================================================
 
@@ -1638,7 +1644,7 @@ notices just after the title page:
        Free Documentation License''.
 
    If you have Invariant Sections, Front-Cover Texts and Back-Cover
-Texts, replace the "with...Texts." line with this:
+Texts, replace the "with...Texts."  line with this:
 
          with the Invariant Sections being LIST THEIR TITLES, with
          the Front-Cover Texts being LIST, and with the Back-Cover Texts
@@ -1649,24 +1655,24 @@ combination of the three, merge those two alternatives to suit the
 situation.
 
    If your document contains nontrivial examples of program code, we
-recommend releasing these examples in parallel under your choice of
-free software license, such as the GNU General Public License, to
-permit their use in free software.
+recommend releasing these examples in parallel under your choice of free
+software license, such as the GNU General Public License, to permit
+their use in free software.
 
 
 \1f
 Tag Table:
-Node: Top\7f714
-Node: Timeline\7f2250
-Node: Dependency Tracking Evolution\7f33686
-Node: First Take on Dependencies\7f34528
-Node: Dependencies As Side Effects\7f37191
-Node: Dependencies for the User\7f39253
-Node: Techniques for Dependencies\7f44287
-Node: Recommendations for Tool Writers\7f45989
-Node: Future Directions for Dependencies\7f46708
-Node: Releases\7f47178
-Node: Copying This Manual\7f52658
-Node: GNU Free Documentation License\7f52885
+Node: Top\7f702
+Node: Timeline\7f2236
+Node: Dependency Tracking Evolution\7f33697
+Node: First Take on Dependencies\7f34539
+Node: Dependencies As Side Effects\7f37197
+Node: Dependencies for the User\7f39256
+Node: Techniques for Dependencies\7f44286
+Node: Recommendations for Tool Writers\7f45984
+Node: Future Directions for Dependencies\7f46703
+Node: Releases\7f47173
+Node: Copying This Manual\7f52560
+Node: GNU Free Documentation License\7f52787
 \1f
 End Tag Table
index 5cb3685..75141f9 100644 (file)
@@ -10,7 +10,7 @@
 This manual describes (part of) the history of GNU Automake, a program
 that creates GNU standards-compliant Makefiles from template files.
 
-Copyright @copyright{} 1995-2012 Free Software Foundation, Inc.
+Copyright @copyright{} 1995-2017 Free Software Foundation, Inc.
 
 @quotation
 Permission is granted to copy, distribute and/or modify this document
@@ -560,7 +560,7 @@ sights on automake@dots{} and now it has arrived! -- Tom Tromey
 
 It's only the beginning: in two months he will send 192 patches.  Then
 he would slow down so Tom can catch up and review all this.  Initially
-Tom actually read all these patches, then he probably trustingly
+Tom actually read all of these patches, then he probably trustingly
 answered OK to most of them, and finally gave up and let Akim apply
 whatever he wanted.  There was no way to keep up with that patch rate.
 
@@ -570,7 +570,7 @@ sourcequake; I have yet to figure where the relevant passage has
 been moved :) -- Alexandre Duret-Lutz
 @end quotation
 
-All these patches were sent to and discussed on
+All of these patches were sent to and discussed on
 @email{automake@@gnu.org}, so subscribed users were literally drowning in
 technical mails.  Eventually, the @email{automake-patches@@gnu.org}
 mailing list was created in May.
@@ -581,7 +581,7 @@ fragments.  In 1.4, lots of @file{Makefile} rules are being emitted at
 various places in the @command{automake} script itself; this does not
 help ensuring a consistent treatment of these rules (for instance
 making sure that user-defined rules override Automake's own rules).
-One of Akim's goal was moving all these hard-coded rules to separate
+One of Akim's goal was moving all of these hard-coded rules to separate
 @file{Makefile} fragments, so the logic could be centralized in a
 @file{Makefile} fragment processor.
 
@@ -792,7 +792,7 @@ nicely.  Conditionals, Locations, Variable and Rule definitions,
 Options: these items on which Automake works have been rewritten as
 separate Perl modules, and documented.
 
-@itemx 2004-01-11 Automake 1.8.1
+@item 2004-01-11 Automake 1.8.1
 @itemx 2004-01-12 Automake 1.8.2
 @itemx 2004-03-07 Automake 1.8.3
 @itemx 2004-04-25 Automake 1.8.4
@@ -809,13 +809,13 @@ down to 1.2MB@.
 
 Aside from this it contains mainly minor changes and bug-fixes.
 
-@itemx 2004-08-11 Automake 1.9.1
+@item 2004-08-11 Automake 1.9.1
 @itemx 2004-09-19 Automake 1.9.2
 
 Automake has ten years.  This chapter of the manual was initially
 written for this occasion.
 
-@itemx 2007-10-29 Automake repository moves to @code{savannah.gnu.org}
+@item 2007-10-29 Automake repository moves to @code{savannah.gnu.org}
 and uses git as primary repository.
 
 @end table
index ac56e15..ab636b1 100644 (file)
@@ -1,19 +1,18 @@
-This is automake.info, produced by makeinfo version 4.13 from
-/home/stefano/src/am/branches/trunks/doc/automake.texi.
+This is automake.info, produced by makeinfo version 6.1 from
+automake.texi.
 
-This manual is for GNU Automake (version 1.12.1, 1 June 2012), a
+This manual is for GNU Automake (version 1.15.1, 17 June 2017), a
 program that creates GNU standards-compliant Makefiles from template
 files.
 
-   Copyright (C) 1995-2012 Free Software Foundation, Inc.
+   Copyright © 1995-2017 Free Software Foundation, Inc.
 
      Permission is granted to copy, distribute and/or modify this
      document under the terms of the GNU Free Documentation License,
      Version 1.3 or any later version published by the Free Software
      Foundation; with no Invariant Sections, with no Front-Cover texts,
-     and with no Back-Cover Texts.  A copy of the license is included
-     in the section entitled "GNU Free Documentation License."
-
+     and with no Back-Cover Texts.  A copy of the license is included in
+     the section entitled “GNU Free Documentation License.”
 
 INFO-DIR-SECTION Software development
 START-INFO-DIR-ENTRY
@@ -28,217 +27,220 @@ END-INFO-DIR-ENTRY
 
 \1f
 Indirect:
-automake.info-1: 1118
-automake.info-2: 297580
-automake.info-3: 529541
+automake.info-1: 1079
+automake.info-2: 301288
 \1f
 Tag Table:
 (Indirect)
-Node: Top\7f1118
-Node: Introduction\7f14528
-Ref: Introduction-Footnote-1\7f15992
-Node: Autotools Introduction\7f16141
-Node: GNU Build System\7f17492
-Node: Use Cases\7f20155
-Node: Basic Installation\7f22260
-Node: Standard Targets\7f25727
-Node: Standard Directory Variables\7f27220
-Node: Standard Configuration Variables\7f29028
-Node: config.site\7f30345
-Node: VPATH Builds\7f31727
-Node: Two-Part Install\7f35612
-Node: Cross-Compilation\7f38016
-Node: Renaming\7f40908
-Node: DESTDIR\7f42026
-Node: Preparing Distributions\7f44138
-Node: Dependency Tracking\7f46091
-Node: Nested Packages\7f48167
-Node: Why Autotools\7f49659
-Node: Hello World\7f51281
-Ref: amhello Explained\7f51690
-Node: Creating amhello\7f51858
-Node: amhello's configure.ac Setup Explained\7f56994
-Node: amhello's Makefile.am Setup Explained\7f61650
-Node: Generalities\7f65164
-Node: General Operation\7f65858
-Node: Strictness\7f69166
-Node: Uniform\7f71260
-Node: Length Limitations\7f76017
-Node: Canonicalization\7f78293
-Node: User Variables\7f79337
-Node: Auxiliary Programs\7f80782
-Node: Examples\7f84410
-Node: Complete\7f85276
-Node: true\7f87263
-Node: automake Invocation\7f89642
-Ref: Invoking automake\7f89793
-Node: configure\7f97335
-Node: Requirements\7f98230
-Node: Optional\7f103205
-Node: aclocal Invocation\7f111960
-Ref: Invoking aclocal\7f112121
-Node: aclocal Options\7f115030
-Node: Macro Search Path\7f118380
-Ref: ACLOCAL_PATH\7f122507
-Node: Extending aclocal\7f124010
-Node: Local Macros\7f127646
-Node: Serials\7f132147
-Node: Future of aclocal\7f137274
-Node: Macros\7f139546
-Node: Public Macros\7f140075
-Ref: Modernize AM_INIT_AUTOMAKE invocation\7f141041
-Node: Obsolete Macros\7f144805
-Node: Private Macros\7f146883
-Node: Directories\7f148286
-Node: Subdirectories\7f149225
-Node: Conditional Subdirectories\7f151529
-Node: SUBDIRS vs DIST_SUBDIRS\7f153125
-Node: Subdirectories with AM_CONDITIONAL\7f154671
-Node: Subdirectories with AC_SUBST\7f155785
-Node: Unconfigured Subdirectories\7f156584
-Node: Alternative\7f159883
-Ref: Alternative-Footnote-1\7f162024
-Node: Subpackages\7f162149
-Node: Programs\7f165345
-Node: A Program\7f166885
-Node: Program Sources\7f167608
-Node: Linking\7f169421
-Node: Conditional Sources\7f172880
-Node: Conditional Programs\7f175695
-Node: A Library\7f177511
-Node: A Shared Library\7f180061
-Node: Libtool Concept\7f181063
-Node: Libtool Libraries\7f183119
-Node: Conditional Libtool Libraries\7f184793
-Node: Conditional Libtool Sources\7f187157
-Node: Libtool Convenience Libraries\7f188496
-Node: Libtool Modules\7f191820
-Node: Libtool Flags\7f193089
-Node: LTLIBOBJS\7f194870
-Node: Libtool Issues\7f195461
-Node: Error required file ltmain.sh not found\7f195800
-Node: Objects created both with libtool and without\7f196964
-Node: Program and Library Variables\7f198800
-Ref: Program and Library Variables-Footnote-1\7f209763
-Node: Default _SOURCES\7f209838
-Node: LIBOBJS\7f212193
-Node: Program Variables\7f217164
-Node: Yacc and Lex\7f220627
-Ref: Yacc and Lex-Footnote-1\7f225961
-Node: C++ Support\7f226190
-Node: Objective C Support\7f227032
-Node: Objective C++ Support\7f227967
-Node: Unified Parallel C Support\7f228951
-Node: Assembly Support\7f229909
-Node: Fortran 77 Support\7f230989
-Ref: Fortran 77 Support-Footnote-1\7f232622
-Node: Preprocessing Fortran 77\7f232825
-Node: Compiling Fortran 77 Files\7f233402
-Node: Mixing Fortran 77 With C and C++\7f233975
-Ref: Mixing Fortran 77 With C and C++-Footnote-1\7f236212
-Node: How the Linker is Chosen\7f236515
-Node: Fortran 9x Support\7f237998
-Node: Compiling Fortran 9x Files\7f239006
-Node: Java Support with gcj\7f239591
-Node: Vala Support\7f240976
-Node: Support for Other Languages\7f242420
-Node: Dependencies\7f243128
-Node: EXEEXT\7f244958
-Node: Other Objects\7f247118
-Node: Scripts\7f247710
-Node: Headers\7f250450
-Node: Data\7f252175
-Node: Sources\7f252834
-Node: Built Sources Example\7f255604
-Node: Other GNU Tools\7f262514
-Node: Emacs Lisp\7f263039
-Node: gettext\7f264863
-Node: Libtool\7f265515
-Node: Java\7f265770
-Node: Python\7f268180
-Node: Documentation\7f273030
-Node: Texinfo\7f273334
-Node: Man Pages\7f279726
-Node: Install\7f282740
-Node: Basics of Installation\7f283440
-Node: The Two Parts of Install\7f284930
-Node: Extending Installation\7f286350
-Node: Staged Installs\7f287098
-Node: Install Rules for the User\7f288467
-Node: Clean\7f288995
-Node: Dist\7f291073
-Node: Basics of Distribution\7f291565
-Node: Fine-grained Distribution Control\7f294288
-Node: The dist Hook\7f295195
-Node: Checking the Distribution\7f297580
-Node: The Types of Distributions\7f303042
-Node: Tests\7f304713
-Node: Generalities about Testing\7f305889
-Node: Simple Tests\7f308892
-Node: Scripts-based Testsuites\7f309273
-Ref: Testsuite progress on console\7f311732
-Ref: Simple tests and color-tests\7f312807
-Node: Serial Test Harness\7f316712
-Node: Parallel Test Harness\7f318587
-Ref: Basics of test metadata\7f319239
-Node: Custom Test Drivers\7f327428
-Node: Overview of Custom Test Drivers Support\7f327719
-Node: Declaring Custom Test Drivers\7f330646
-Node: API for Custom Test Drivers\7f332012
-Node: Command-line arguments for test drivers\7f332789
-Node: Log files generation and test results recording\7f335461
-Node: Testsuite progress output\7f339537
-Node: Using the TAP test protocol\7f340949
-Node: Introduction to TAP\7f341311
-Node: Use TAP with the Automake test harness\7f343109
-Node: Incompatibilities with other TAP parsers and drivers\7f348529
-Node: Links and external resources on TAP\7f349886
-Node: DejaGnu Tests\7f351467
-Node: Install Tests\7f353501
-Node: Rebuilding\7f353803
-Node: Options\7f357419
-Node: Options generalities\7f357718
-Node: List of Automake options\7f359436
-Ref: tar-formats\7f365632
-Node: Miscellaneous\7f368880
-Node: Tags\7f369223
-Node: Suffixes\7f372165
-Node: Include\7f373737
-Node: Conditionals\7f374628
-Node: Usage of Conditionals\7f375459
-Node: Limits of Conditionals\7f378700
-Node: Silencing Make\7f379881
-Node: Make verbosity\7f380231
-Ref: Make verbosity-Footnote-1\7f381531
-Node: Tricks For Silencing Make\7f381605
-Node: Automake silent-rules Option\7f384004
-Node: Gnits\7f390977
-Node: Cygnus\7f393282
-Node: Not Enough\7f395260
-Node: Extending\7f395698
-Node: Third-Party Makefiles\7f400431
-Node: Distributing\7f407018
-Node: API Versioning\7f407655
-Node: Upgrading\7f410294
-Node: FAQ\7f412245
-Node: CVS\7f413365
-Node: maintainer-mode\7f420089
-Node: Wildcards\7f424015
-Node: Limitations on File Names\7f427289
-Node: Errors with distclean\7f429865
-Node: Flag Variables Ordering\7f434615
-Node: Renamed Objects\7f442319
-Node: Per-Object Flags\7f443862
-Node: Multiple Outputs\7f446759
-Node: Hard-Coded Install Paths\7f458375
-Node: Debugging Make Rules\7f463388
-Ref: Debugging Make Rules-Footnote-1\7f465528
-Node: Reporting Bugs\7f465692
-Node: Copying This Manual\7f467623
-Node: GNU Free Documentation License\7f467853
-Node: Indices\7f492969
-Node: Macro Index\7f493258
-Node: Variable Index\7f498842
-Node: General Index\7f529541
+Node: Top\7f1079
+Node: Introduction\7f14404
+Ref: Introduction-Footnote-1\7f15813
+Node: Autotools Introduction\7f15972
+Node: GNU Build System\7f17353
+Node: Use Cases\7f20101
+Node: Basic Installation\7f22229
+Node: Standard Targets\7f25815
+Node: Standard Directory Variables\7f27418
+Node: Standard Configuration Variables\7f29275
+Node: config.site\7f30634
+Node: VPATH Builds\7f32060
+Node: Two-Part Install\7f36008
+Node: Cross-Compilation\7f38452
+Node: Renaming\7f41427
+Node: DESTDIR\7f42585
+Node: Preparing Distributions\7f44767
+Node: Dependency Tracking\7f47138
+Node: Nested Packages\7f49246
+Node: Why Autotools\7f50762
+Node: Hello World\7f52404
+Ref: amhello Explained\7f52826
+Node: Creating amhello\7f52998
+Node: amhello's configure.ac Setup Explained\7f58353
+Node: amhello's Makefile.am Setup Explained\7f63273
+Node: Generalities\7f66973
+Node: General Operation\7f67667
+Node: Strictness\7f71090
+Node: Uniform\7f72708
+Node: Length Limitations\7f77647
+Node: Canonicalization\7f79957
+Node: User Variables\7f81029
+Node: Auxiliary Programs\7f82519
+Node: Examples\7f86255
+Node: Complete\7f87125
+Node: true\7f89230
+Node: automake Invocation\7f91721
+Ref: Invoking automake\7f91876
+Node: configure\7f99471
+Node: Requirements\7f100400
+Node: Optional\7f105638
+Node: aclocal Invocation\7f115040
+Ref: Invoking aclocal\7f115201
+Node: aclocal Options\7f118256
+Node: Macro Search Path\7f121772
+Ref: ACLOCAL_PATH\7f126147
+Node: Extending aclocal\7f127717
+Node: Local Macros\7f131441
+Node: Serials\7f135425
+Node: Future of aclocal\7f140618
+Node: Macros\7f143007
+Node: Public Macros\7f143548
+Ref: Modernize AM_INIT_AUTOMAKE invocation\7f145179
+Node: Obsolete Macros\7f149660
+Node: Private Macros\7f151002
+Node: Directories\7f152452
+Node: Subdirectories\7f154048
+Node: Conditional Subdirectories\7f157439
+Node: SUBDIRS vs DIST_SUBDIRS\7f159119
+Node: Subdirectories with AM_CONDITIONAL\7f160757
+Node: Subdirectories with AC_SUBST\7f161951
+Node: Unconfigured Subdirectories\7f162778
+Node: Alternative\7f166229
+Ref: Alternative-Footnote-1\7f168421
+Node: Subpackages\7f168546
+Node: Programs\7f171893
+Node: A Program\7f173435
+Node: Program Sources\7f174158
+Node: Linking\7f176063
+Node: Conditional Sources\7f179708
+Node: Conditional Programs\7f182634
+Node: A Library\7f184524
+Node: A Shared Library\7f187201
+Node: Libtool Concept\7f188205
+Node: Libtool Libraries\7f190309
+Node: Conditional Libtool Libraries\7f192043
+Node: Conditional Libtool Sources\7f194500
+Node: Libtool Convenience Libraries\7f195887
+Node: Libtool Modules\7f199314
+Node: Libtool Flags\7f200630
+Node: LTLIBOBJS\7f202534
+Node: Libtool Issues\7f203169
+Node: Error required file ltmain.sh not found\7f203510
+Node: Objects created both with libtool and without\7f204731
+Node: Program and Library Variables\7f206655
+Ref: Program and Library Variables-Footnote-1\7f218031
+Node: Default _SOURCES\7f218106
+Node: LIBOBJS\7f220578
+Node: Program Variables\7f225805
+Node: Yacc and Lex\7f229369
+Ref: Yacc and Lex-Footnote-1\7f234993
+Node: C++ Support\7f235256
+Node: Objective C Support\7f236136
+Node: Objective C++ Support\7f237109
+Node: Unified Parallel C Support\7f238131
+Node: Assembly Support\7f239127
+Node: Fortran 77 Support\7f240299
+Ref: Fortran 77 Support-Footnote-1\7f241984
+Node: Preprocessing Fortran 77\7f242187
+Node: Compiling Fortran 77 Files\7f242791
+Node: Mixing Fortran 77 With C and C++\7f243403
+Ref: Mixing Fortran 77 With C and C++-Footnote-1\7f245726
+Node: How the Linker is Chosen\7f246033
+Node: Fortran 9x Support\7f247571
+Node: Compiling Fortran 9x Files\7f248617
+Node: Java Support with gcj\7f249253
+Node: Vala Support\7f250734
+Node: Support for Other Languages\7f252819
+Node: Dependencies\7f253527
+Node: EXEEXT\7f255414
+Node: Other Objects\7f257657
+Node: Scripts\7f258249
+Node: Headers\7f261108
+Node: Data\7f262911
+Node: Sources\7f263596
+Node: Built Sources Example\7f266541
+Node: Other GNU Tools\7f273729
+Node: Emacs Lisp\7f274258
+Node: gettext\7f276356
+Node: Libtool\7f277044
+Node: Java\7f277303
+Node: Python\7f279962
+Node: Documentation\7f285043
+Node: Texinfo\7f285347
+Node: Man Pages\7f292546
+Node: Install\7f295671
+Node: Basics of Installation\7f296375
+Node: The Two Parts of Install\7f297905
+Node: Extending Installation\7f299445
+Node: Staged Installs\7f301288
+Node: Install Rules for the User\7f302701
+Node: Clean\7f303259
+Node: Dist\7f305431
+Node: Basics of Distribution\7f305935
+Node: Fine-grained Distribution Control\7f309166
+Node: The dist Hook\7f310093
+Node: Checking the Distribution\7f312584
+Node: The Types of Distributions\7f318944
+Node: Tests\7f321182
+Node: Generalities about Testing\7f322378
+Node: Simple Tests\7f325313
+Node: Scripts-based Testsuites\7f325694
+Ref: Testsuite progress on console\7f328079
+Ref: Simple tests and color-tests\7f329182
+Node: Serial Test Harness\7f333198
+Node: Parallel Test Harness\7f335296
+Ref: Basics of test metadata\7f335802
+Node: Custom Test Drivers\7f344531
+Node: Overview of Custom Test Drivers Support\7f344822
+Node: Declaring Custom Test Drivers\7f347876
+Node: API for Custom Test Drivers\7f349298
+Node: Command-line arguments for test drivers\7f350075
+Node: Log files generation and test results recording\7f352789
+Node: Testsuite progress output\7f357000
+Node: Using the TAP test protocol\7f358422
+Node: Introduction to TAP\7f358784
+Node: Use TAP with the Automake test harness\7f360601
+Node: Incompatibilities with other TAP parsers and drivers\7f366017
+Node: Links and external resources on TAP\7f367412
+Node: DejaGnu Tests\7f369036
+Node: Install Tests\7f371161
+Node: Rebuilding\7f371471
+Node: Options\7f375146
+Node: Options generalities\7f375447
+Node: List of Automake options\7f377229
+Ref: tar-formats\7f383880
+Node: Miscellaneous\7f387231
+Node: Tags\7f387576
+Node: Suffixes\7f390692
+Node: Include\7f392324
+Node: Conditionals\7f394059
+Node: Usage of Conditionals\7f394918
+Node: Limits of Conditionals\7f398274
+Node: Silencing Make\7f399459
+Node: Make verbosity\7f399810
+Ref: Make verbosity-Footnote-1\7f401132
+Node: Tricks For Silencing Make\7f401206
+Node: Automake Silent Rules\7f403723
+Node: Gnits\7f410707
+Node: Not Enough\7f413186
+Node: Extending\7f413633
+Node: Third-Party Makefiles\7f418668
+Node: Distributing\7f425604
+Node: API Versioning\7f426253
+Node: Upgrading\7f428962
+Node: FAQ\7f431007
+Node: CVS\7f432131
+Node: maintainer-mode\7f440520
+Node: Wildcards\7f444684
+Node: Limitations on File Names\7f448123
+Node: Errors with distclean\7f450753
+Node: Flag Variables Ordering\7f455701
+Node: Renamed Objects\7f463532
+Node: Per-Object Flags\7f465123
+Node: Multiple Outputs\7f468128
+Node: Hard-Coded Install Paths\7f480083
+Node: Debugging Make Rules\7f485239
+Ref: Debugging Make Rules-Footnote-1\7f487396
+Node: Reporting Bugs\7f487574
+Node: Copying This Manual\7f489519
+Node: GNU Free Documentation License\7f489749
+Node: Indices\7f515052
+Node: Macro Index\7f515341
+Node: Variable Index\7f520980
+Node: General Index\7f551856
 \1f
 End Tag Table
+
+\1f
+Local Variables:
+coding: utf-8
+End:
index c7ac8c7..f97b950 100644 (file)
@@ -1,19 +1,18 @@
-This is automake.info, produced by makeinfo version 4.13 from
-/home/stefano/src/am/branches/trunks/doc/automake.texi.
+This is automake.info, produced by makeinfo version 6.1 from
+automake.texi.
 
-This manual is for GNU Automake (version 1.12.1, 1 June 2012), a
+This manual is for GNU Automake (version 1.15.1, 17 June 2017), a
 program that creates GNU standards-compliant Makefiles from template
 files.
 
-   Copyright (C) 1995-2012 Free Software Foundation, Inc.
+   Copyright © 1995-2017 Free Software Foundation, Inc.
 
      Permission is granted to copy, distribute and/or modify this
      document under the terms of the GNU Free Documentation License,
      Version 1.3 or any later version published by the Free Software
      Foundation; with no Invariant Sections, with no Front-Cover texts,
-     and with no Back-Cover Texts.  A copy of the license is included
-     in the section entitled "GNU Free Documentation License."
-
+     and with no Back-Cover Texts.  A copy of the license is included in
+     the section entitled “GNU Free Documentation License.”
 
 INFO-DIR-SECTION Software development
 START-INFO-DIR-ENTRY
@@ -32,23 +31,22 @@ File: automake.info,  Node: Top,  Next: Introduction,  Up: (dir)
 GNU Automake
 ************
 
-This manual is for GNU Automake (version 1.12.1, 1 June 2012), a
+This manual is for GNU Automake (version 1.15.1, 17 June 2017), a
 program that creates GNU standards-compliant Makefiles from template
 files.
 
-   Copyright (C) 1995-2012 Free Software Foundation, Inc.
+   Copyright © 1995-2017 Free Software Foundation, Inc.
 
      Permission is granted to copy, distribute and/or modify this
      document under the terms of the GNU Free Documentation License,
      Version 1.3 or any later version published by the Free Software
      Foundation; with no Invariant Sections, with no Front-Cover texts,
-     and with no Back-Cover Texts.  A copy of the license is included
-     in the section entitled "GNU Free Documentation License."
-
+     and with no Back-Cover Texts.  A copy of the license is included in
+     the section entitled “GNU Free Documentation License.”
 
 * Menu:
 
-* Introduction::                Automake's purpose
+* Introduction::                Automakes purpose
 * Autotools Introduction::      An Introduction to the Autotools
 * Generalities::                General ideas
 * Examples::                    Some example packages
@@ -64,13 +62,12 @@ files.
 * Dist::                        What goes in a distribution
 * Tests::                       Support for test suites
 * Rebuilding::                  Automatic rebuilding of Makefile
-* Options::                     Changing Automake's behavior
+* Options::                     Changing Automakes behavior
 * Miscellaneous::               Miscellaneous rules
 * Include::                     Including extra files in an Automake template
 * Conditionals::                Conditionals
-* Silencing Make::              Obtain less verbose output from `make'
-* Gnits::                       The effect of `--gnu' and `--gnits'
-* Cygnus::                      The effect of `--cygnus' (deprecated, soon to be removed)
+* Silencing Make::              Obtain less verbose output from ‘make’
+* Gnits::                       The effect of ‘--gnu’ and ‘--gnits’
 * Not Enough::                  When Automake is not Enough
 * Distributing::                Distributing the Makefile.in
 * API Versioning::              About compatibility between Automake versions
@@ -79,7 +76,7 @@ files.
 * Copying This Manual::         How to make copies of this manual
 * Indices::                     Indices of variables, macros, and concepts
 
- --- The Detailed Node Listing ---
+ — The Detailed Node Listing —
 
 An Introduction to the Autotools
 
@@ -106,7 +103,7 @@ Use Cases for the GNU Build System
 
 A Small Hello World
 
-* Creating amhello::            Create `amhello-1.0.tar.gz' from scratch
+* Creating amhello::            Create ‘amhello-1.0.tar.gz’ from scratch
 * amhello's configure.ac Setup Explained::
 * amhello's Makefile.am Setup Explained::
 
@@ -125,7 +122,7 @@ Some example packages
 * Complete::                    A simple example, start to finish
 * true::                        Building true and false
 
-Scanning `configure.ac', using `aclocal'
+Scanning ‘configure.ac’, using ‘aclocal’
 
 * Requirements::                Configuration requirements
 * Optional::                    Other things Automake recognizes
@@ -139,12 +136,11 @@ Auto-generating aclocal.m4
 * Extending aclocal::           Writing your own aclocal macros
 * Local Macros::                Organizing local macros
 * Serials::                     Serial lines in Autoconf macros
-* Future of aclocal::           aclocal's scheduled death
+* Future of aclocal::           aclocals scheduled death
 
 Autoconf macros supplied with Automake
 
 * Public Macros::               Macros that you can use.
-* Obsolete Macros::             Macros that will soon be removed.
 * Private Macros::              Macros that you should not use.
 
 Directories
@@ -159,7 +155,7 @@ Conditional Subdirectories
 * SUBDIRS vs DIST_SUBDIRS::     Two sets of directories
 * Subdirectories with AM_CONDITIONAL::  Specifying conditional subdirectories
 * Subdirectories with AC_SUBST::  Another way for conditional recursion
-* Unconfigured Subdirectories::  Not even creating a `Makefile'
+* Unconfigured Subdirectories::  Not even creating a ‘Makefile’
 
 Building Programs and Libraries
 
@@ -202,9 +198,9 @@ Building a Shared Library
 * Libtool Modules::             Building Libtool Modules
 * Libtool Flags::               Using _LIBADD, _LDFLAGS, and _LIBTOOLFLAGS
 * LTLIBOBJS::                   Using $(LTLIBOBJS) and $(LTALLOCA)
-* Libtool Issues::              Common Issues Related to Libtool's Use
+* Libtool Issues::              Common Issues Related to Libtools Use
 
-Common Issues Related to Libtool's Use
+Common Issues Related to Libtools Use
 
 * Error required file ltmain.sh not found::  The need to run libtoolize
 * Objects created both with libtool and without::  Avoid a specific build race
@@ -258,24 +254,24 @@ What Gets Installed
 What Goes in a Distribution
 
 * Basics of Distribution::      Files distributed by default
-* Fine-grained Distribution Control::  `dist_' and `nodist_' prefixes
+* Fine-grained Distribution Control::  ‘dist_’ and ‘nodist_’ prefixes
 * The dist Hook::               A target for last-minute distribution changes
-* Checking the Distribution::   `make distcheck' explained
+* Checking the Distribution::   ‘make distcheck’ explained
 * The Types of Distributions::  A variety of formats and compression methods
 
 Support for test suites
 
 * Generalities about Testing::  Generic concepts and terminology about testing
-* Simple Tests::                Listing test scripts in `TESTS'
+* Simple Tests::                Listing test scripts in ‘TESTS’
 * Custom Test Drivers::         Writing and using custom test drivers
 * Using the TAP test protocol:: Integrating test scripts that use the TAP protocol
-* DejaGnu Tests::               Interfacing with the `dejagnu' testing framework
+* DejaGnu Tests::               Interfacing with the ‘dejagnu’ testing framework
 * Install Tests::               Running tests on installed packages
 
 Simple Tests
 
 * Scripts-based Testsuites::    Automake-specific concepts and terminology
-* Serial Test Harness::         Older (and obsolescent) serial test harness
+* Serial Test Harness::         Older (and discouraged) serial test harness
 * Parallel Test Harness::       Generic concurrent test harness
 
 Using the TAP test protocol
@@ -297,7 +293,7 @@ API for Custom Test Drivers
 * Log files generation and test results recording::
 * Testsuite progress output::
 
-Changing Automake's Behavior
+Changing Automakes Behavior
 
 * Options generalities::        Semantics of Automake option
 * List of Automake options::    A comprehensive list of Automake options
@@ -314,20 +310,20 @@ Conditionals
 
 Silencing Make
 
-* Make verbosity::               Make is verbose by default
-* Tricks For Silencing Make::    Standard and generic ways to silence make
-* Automake silent-rules Option:: How Automake can help in silencing make
+* Make verbosity::              Make is verbose by default
+* Tricks For Silencing Make::   Standard and generic ways to silence make
+* Automake Silent Rules::       How Automake can help in silencing make
 
-When Automake Isn't Enough
+When Automake Isnt Enough
 
 * Extending::                   Adding new rules or overriding existing ones.
-* Third-Party Makefiles::       Integrating Non-Automake `Makefile's.
+* Third-Party Makefiles::       Integrating Non-Automake ‘Makefile’s.
 
 Frequently Asked Questions about Automake
 
 * CVS::                         CVS and generated files
 * maintainer-mode::             missing and AM_MAINTAINER_MODE
-* Wildcards::                   Why doesn't Automake support wildcards?
+* Wildcards::                   Why doesnt Automake support wildcards?
 * Limitations on File Names::   Limitations on source and installed file names
 * Errors with distclean::       Files left in build directory after distclean
 * Flag Variables Ordering::     CFLAGS vs. AM_CFLAGS vs. mumble_CFLAGS
@@ -335,7 +331,7 @@ Frequently Asked Questions about Automake
 * Per-Object Flags::            How to simulate per-object flags?
 * Multiple Outputs::            Writing rules for tools with many output files
 * Hard-Coded Install Paths::    Installing to hard-coded locations
-* Debugging Make Rules::        Strategies when things don't work as expected
+* Debugging Make Rules::        Strategies when things dont work as expected
 * Reporting Bugs::              Feedback on bugs and feature requests
 
 Copying This Manual
@@ -348,44 +344,44 @@ Indices
 * Variable Index::              Index of Makefile variables
 * General Index::               General index
 
+
 \1f
 File: automake.info,  Node: Introduction,  Next: Autotools Introduction,  Prev: Top,  Up: Top
 
 1 Introduction
 **************
 
-Automake is a tool for automatically generating `Makefile.in's from
-files called `Makefile.am'.  Each `Makefile.am' is basically a series
-of `make' variable definitions(1), with rules being thrown in
-occasionally.  The generated `Makefile.in's are compliant with the GNU
-Makefile standards.
+Automake is a tool for automatically generating ‘Makefile.in’s from
+files called ‘Makefile.am’.  Each ‘Makefile.am’ is basically a series of
+‘make’ variable definitions(1), with rules being thrown in occasionally.
+The generated ‘Makefile.in’s are compliant with the GNU Makefile
+standards.
 
-   The GNU Makefile Standards Document (*note Makefile Conventions:
-(standards)Makefile Conventions.)  is long, complicated, and subject to
-change.  The goal of Automake is to remove the burden of Makefile
-maintenance from the back of the individual GNU maintainer (and put it
-on the back of the Automake maintainers).
+   The GNU Makefile Standards Document (*note (standards)Makefile
+Conventions::) is long, complicated, and subject to change.  The goal of
+Automake is to remove the burden of Makefile maintenance from the back
+of the individual GNU maintainer (and put it on the back of the Automake
+maintainers).
 
    The typical Automake input file is simply a series of variable
-definitions.  Each such file is processed to create a `Makefile.in'.
-There should generally be one `Makefile.am' per directory of a project.
+definitions.  Each such file is processed to create a ‘Makefile.in’.
 
    Automake does constrain a project in certain ways; for instance, it
 assumes that the project uses Autoconf (*note Introduction:
-(autoconf)Top.), and enforces certain restrictions on the
-`configure.ac' contents.
+(autoconf)Top.), and enforces certain restrictions on the ‘configure.ac’
+contents.
 
-   Automake requires `perl' in order to generate the `Makefile.in's.
+   Automake requires ‘perl’ in order to generate the ‘Makefile.in’s.
 However, the distributions created by Automake are fully GNU
-standards-compliant, and do not require `perl' in order to be built.
+standards-compliant, and do not require ‘perl’ in order to be built.
 
    For more information on bug reports, *Note Reporting Bugs::.
 
    ---------- Footnotes ----------
 
-   (1) These variables are also called "make macros" in Make
-terminology, however in this manual we reserve the term "macro" for
-Autoconf's macros.
+   (1) These variables are also called “make macros” in Make
+terminology, however in this manual we reserve the term “macro” for
+Autoconfs macros.
 
 \1f
 File: automake.info,  Node: Autotools Introduction,  Next: Generalities,  Prev: Introduction,  Up: Top
@@ -394,18 +390,18 @@ File: automake.info,  Node: Autotools Introduction,  Next: Generalities,  Prev:
 **********************************
 
 If you are new to Automake, maybe you know that it is part of a set of
-tools called _The Autotools_.  Maybe you've already delved into a
-package full of files named `configure', `configure.ac', `Makefile.in',
-`Makefile.am', `aclocal.m4', ..., some of them claiming to be
-_generated by_ Autoconf or Automake.  But the exact purpose of these
-files and their relations is probably fuzzy.  The goal of this chapter
-is to introduce you to this machinery, to show you how it works and how
-powerful it is.  If you've never installed or seen such a package, do
+tools called _The Autotools_.  Maybe youve already delved into a
+package full of files named ‘configure’, ‘configure.ac’, ‘Makefile.in’,
+‘Makefile.am’, ‘aclocal.m4’, ..., some of them claiming to be _generated
+by_ Autoconf or Automake.  But the exact purpose of these files and
+their relations is probably fuzzy.  The goal of this chapter is to
+introduce you to this machinery, to show you how it works and how
+powerful it is.  If youve never installed or seen such a package, do
 not worry: this chapter will walk you through it.
 
    If you need some teaching material, more illustrations, or a less
-`automake'-centered continuation, some slides for this introduction are
-available in Alexandre Duret-Lutz's Autotools Tutorial
+‘automake’-centered continuation, some slides for this introduction are
+available in Alexandre Duret-Lutzs Autotools Tutorial
 (http://www.lrde.epita.fr/~adl/autotools.html).  This chapter is the
 written version of the first part of his tutorial.
 
@@ -426,42 +422,42 @@ It is a truth universally acknowledged, that as a developer in
 possession of a new package, you must be in want of a build system.
 
    In the Unix world, such a build system is traditionally achieved
-using the command `make' (*note Overview: (make)Top.).  You express the
-recipe to build your package in a `Makefile'.  This file is a set of
+using the command ‘make’ (*note Overview: (make)Top.).  You express the
+recipe to build your package in a ‘Makefile’.  This file is a set of
 rules to build the files in the package.  For instance the program
-`prog' may be built by running the linker on the files `main.o',
-`foo.o', and `bar.o'; the file `main.o' may be built by running the
-compiler on `main.c'; etc.  Each time `make' is run, it reads
-`Makefile', checks the existence and modification time of the files
+‘prog’ may be built by running the linker on the files ‘main.o’,
+‘foo.o’, and ‘bar.o’; the file ‘main.o’ may be built by running the
+compiler on ‘main.c’; etc.  Each time ‘make’ is run, it reads
+‘Makefile’, checks the existence and modification time of the files
 mentioned, decides what files need to be built (or rebuilt), and runs
 the associated commands.
 
    When a package needs to be built on a different platform than the one
-it was developed on, its `Makefile' usually needs to be adjusted.  For
-instance the compiler may have another name or require more options.
-In 1991, David J. MacKenzie got tired of customizing `Makefile' for the
-20 platforms he had to deal with.  Instead, he handcrafted a little
-shell script called `configure' to automatically adjust the `Makefile'
-(*note Genesis: (autoconf)Genesis.).  Compiling his package was now as
-simple as running `./configure && make'.
+it was developed on, its ‘Makefile’ usually needs to be adjusted.  For
+instance the compiler may have another name or require more options.  In
+1991, David J. MacKenzie got tired of customizing ‘Makefile’ for the 20
+platforms he had to deal with.  Instead, he handcrafted a little shell
+script called ‘configure’ to automatically adjust the ‘Makefile’ (*note
+Genesis: (autoconf)Genesis.).  Compiling his package was now as simple
+as running ‘./configure && make’.
 
    Today this process has been standardized in the GNU project.  The GNU
 Coding Standards (*note The Release Process: (standards)Managing
 Releases.) explains how each package of the GNU project should have a
-`configure' script, and the minimal interface it should have.  The
-`Makefile' too should follow some established conventions.  The result?
+‘configure’ script, and the minimal interface it should have.  The
+‘Makefile’ too should follow some established conventions.  The result?
 A unified build system that makes all packages almost indistinguishable
-by the installer.  In its simplest scenario, all the installer has to
-do is to unpack the package, run `./configure && make && make install',
-and repeat with the next package to install.
+by the installer.  In its simplest scenario, all the installer has to do
+is to unpack the package, run ‘./configure && make && make install’, and
+repeat with the next package to install.
 
-   We call this build system the "GNU Build System", since it was grown
+   We call this build system the “GNU Build System”, since it was grown
 out of the GNU project.  However it is used by a vast number of other
 packages: following any existing convention has its advantages.
 
    The Autotools are tools that will create a GNU Build System for your
-package.  Autoconf mostly focuses on `configure' and Automake on
-`Makefile's.  It is entirely possible to create a GNU Build System
+package.  Autoconf mostly focuses on ‘configure’ and Automake on
+‘Makefile’s.  It is entirely possible to create a GNU Build System
 without the help of these tools.  However it is rather burdensome and
 error-prone.  We will discuss this again after some illustration of the
 GNU Build System in action.
@@ -473,23 +469,22 @@ File: automake.info,  Node: Use Cases,  Next: Why Autotools,  Prev: GNU Build Sy
 ======================================
 
 In this section we explore several use cases for the GNU Build System.
-You can replay all these examples on the `amhello-1.0.tar.gz' package
-distributed with Automake.  If Automake is installed on your system,
-you should find a copy of this file in
-`PREFIX/share/doc/automake/amhello-1.0.tar.gz', where PREFIX is the
+You can replay all of these examples on the ‘amhello-1.0.tar.gz’ package
+distributed with Automake.  If Automake is installed on your system, you
+should find a copy of this file in
+‘PREFIX/share/doc/automake/amhello-1.0.tar.gz’, where PREFIX is the
 installation prefix specified during configuration (PREFIX defaults to
-`/usr/local', however if Automake was installed by some GNU/Linux
-distribution it most likely has been set to `/usr').  If you do not
-have a copy of Automake installed, you can find a copy of this file
-inside the `doc/' directory of the Automake package.
+‘/usr/local’, however if Automake was installed by some GNU/Linux
+distribution it most likely has been set to ‘/usr’).  If you do not have
+a copy of Automake installed, you can find a copy of this file inside
+the ‘doc/’ directory of the Automake package.
 
    Some of the following use cases present features that are in fact
-extensions to the GNU Build System.  Read: they are not specified by
-the GNU Coding Standards, but they are nonetheless part of the build
-system created by the Autotools.  To keep things simple, we do not
-point out the difference.  Our objective is to show you many of the
-features that the build system created by the Autotools will offer to
-you.
+extensions to the GNU Build System.  Read: they are not specified by the
+GNU Coding Standards, but they are nonetheless part of the build system
+created by the Autotools.  To keep things simple, we do not point out
+the difference.  Our objective is to show you many of the features that
+the build system created by the Autotools will offer to you.
 
 * Menu:
 
@@ -535,101 +530,92 @@ The most common installation procedure looks as follows.
      ...
 
    The user first unpacks the package.  Here, and in the following
-examples, we will use the non-portable `tar zxf' command for
-simplicity.  On a system without GNU `tar' installed, this command
-should read `gunzip -c amhello-1.0.tar.gz | tar xf -'.
+examples, we will use the non-portable ‘tar zxf’ command for simplicity.
+On a system without GNU ‘tar’ installed, this command should read
+‘gunzip -c amhello-1.0.tar.gz | tar xf -’.
 
    The user then enters the newly created directory to run the
-`configure' script.  This script probes the system for various
-features, and finally creates the `Makefile's.  In this toy example
-there are only two `Makefile's, but in real-world projects, there may
-be many more, usually one `Makefile' per directory.
+‘configure’ script.  This script probes the system for various features,
+and finally creates the ‘Makefile’s.  In this toy example there are only
+two ‘Makefile’s, but in real-world projects, there may be many more,
+usually one ‘Makefile’ per directory.
 
-   It is now possible to run `make'.  This will construct all the
+   It is now possible to run ‘make’.  This will construct all the
 programs, libraries, and scripts that need to be constructed for the
-package.  In our example, this compiles the `hello' program.  All files
-are constructed in place, in the source tree; we will see later how
-this can be changed.
+package.  In our example, this compiles the ‘hello’ program.  All files
+are constructed in place, in the source tree; we will see later how this
+can be changed.
 
-   `make check' causes the package's tests to be run.  This step is not
-mandatory, but it is often good to make sure the programs that have
-been built behave as they should, before you decide to install them.
-Our example does not contain any tests, so running `make check' is a
-no-op.
+   ‘make check’ causes the package’s tests to be run.  This step is not
+mandatory, but it is often good to make sure the programs that have been
+built behave as they should, before you decide to install them.  Our
+example does not contain any tests, so running ‘make check’ is a no-op.
 
    After everything has been built, and maybe tested, it is time to
 install it on the system.  That means copying the programs, libraries,
-header files, scripts, and other data files from the source directory
-to their final destination on the system.  The command `make install'
-will do that.  However, by default everything will be installed in
-subdirectories of `/usr/local': binaries will go into `/usr/local/bin',
-libraries will end up in `/usr/local/lib', etc.  This destination is
+header files, scripts, and other data files from the source directory to
+their final destination on the system.  The command ‘make install’ will
+do that.  However, by default everything will be installed in
+subdirectories of ‘/usr/local’: binaries will go into ‘/usr/local/bin’,
+libraries will end up in ‘/usr/local/lib’, etc.  This destination is
 usually not writable by any user, so we assume that we have to become
-root before we can run `make install'.  In our example, running `make
-install' will copy the program `hello' into `/usr/local/bin' and
-`README' into `/usr/local/share/doc/amhello'.
-
-   A last and optional step is to run `make installcheck'.  This
-command may run tests on the installed files.  `make check' tests the
-files in the source tree, while `make installcheck' tests their
-installed copies.  The tests run by the latter can be different from
-those run by the former.  For instance, there are tests that cannot be
-run in the source tree.  Conversely, some packages are set up so that
-`make installcheck' will run the very same tests as `make check', only
-on different files (non-installed vs. installed).  It can make a
-difference, for instance when the source tree's layout is different
-from that of the installation.  Furthermore it may help to diagnose an
-incomplete installation.
-
-   Presently most packages do not have any `installcheck' tests because
-the existence of `installcheck' is little known, and its usefulness is
-neglected.  Our little toy package is no better: `make installcheck'
+root before we can run ‘make install’.  In our example, running ‘make
+install’ will copy the program ‘hello’ into ‘/usr/local/bin’ and
+‘README’ into ‘/usr/local/share/doc/amhello’.
+
+   A last and optional step is to run ‘make installcheck’.  This command
+may run tests on the installed files.  ‘make check’ tests the files in
+the source tree, while ‘make installcheck’ tests their installed copies.
+The tests run by the latter can be different from those run by the
+former.  For instance, there are tests that cannot be run in the source
+tree.  Conversely, some packages are set up so that ‘make installcheck’
+will run the very same tests as ‘make check’, only on different files
+(non-installed vs. installed).  It can make a difference, for instance
+when the source tree’s layout is different from that of the
+installation.  Furthermore it may help to diagnose an incomplete
+installation.
+
+   Presently most packages do not have any ‘installcheck’ tests because
+the existence of ‘installcheck’ is little known, and its usefulness is
+neglected.  Our little toy package is no better: ‘make installcheck’
 does nothing.
 
 \1f
 File: automake.info,  Node: Standard Targets,  Next: Standard Directory Variables,  Prev: Basic Installation,  Up: Use Cases
 
-2.2.2 Standard `Makefile' Targets
+2.2.2 Standard ‘Makefile’ Targets
 ---------------------------------
 
-So far we have come across four ways to run `make' in the GNU Build
-System: `make', `make check', `make install', and `make installcheck'.
-The words `check', `install', and `installcheck', passed as arguments
-to `make', are called "targets".  `make' is a shorthand for `make all',
-`all' being the default target in the GNU Build System.
+So far we have come across four ways to run ‘make’ in the GNU Build
+System: ‘make’, ‘make check’, ‘make install’, and ‘make installcheck’.
+The words ‘check’, ‘install’, and ‘installcheck’, passed as arguments to
+‘make’, are called “targets”.  ‘make’ is a shorthand for ‘make all’,
+‘all’ being the default target in the GNU Build System.
 
    Here is a list of the most useful targets that the GNU Coding
 Standards specify.
 
-`make all'
-     Build programs, libraries, documentation, etc. (same as `make').
-
-`make install'
+‘make all’
+     Build programs, libraries, documentation, etc. (same as ‘make’).
+‘make install’
      Install what needs to be installed, copying the files from the
-     package's tree to system-wide directories.
-
-`make install-strip'
-     Same as `make install', then strip debugging symbols.  Some users
+     package’s tree to system-wide directories.
+‘make install-strip’
+     Same as ‘make install’, then strip debugging symbols.  Some users
      like to trade space for useful bug reports...
-
-`make uninstall'
-     The opposite of `make install': erase the installed files.  (This
+‘make uninstall’
+     The opposite of ‘make install’: erase the installed files.  (This
      needs to be run from the same build tree that was installed.)
-
-`make clean'
-     Erase from the build tree the files built by `make all'.
-
-`make distclean'
-     Additionally erase anything `./configure' created.
-
-`make check'
+‘make clean’
+     Erase from the build tree the files built by ‘make all’.
+‘make distclean’
+     Additionally erase anything ‘./configure’ created.
+‘make check’
      Run the test suite, if any.
-
-`make installcheck'
+‘make installcheck’
      Check the installed programs or libraries, if supported.
-
-`make dist'
-     Recreate `PACKAGE-VERSION.tar.gz' from all the source files.
+‘make dist’
+     Recreate ‘PACKAGE-VERSION.tar.gz’ from all the source files.
 
 \1f
 File: automake.info,  Node: Standard Directory Variables,  Next: Standard Configuration Variables,  Prev: Standard Targets,  Up: Use Cases
@@ -637,32 +623,32 @@ File: automake.info,  Node: Standard Directory Variables,  Next: Standard Config
 2.2.3 Standard Directory Variables
 ----------------------------------
 
-The GNU Coding Standards also specify a hierarchy of variables to
-denote installation directories.  Some of these are:
+The GNU Coding Standards also specify a hierarchy of variables to denote
+installation directories.  Some of these are:
 
 Directory variable   Default value
-------------------------------------------------------- 
-`prefix'             `/usr/local'
-  `exec_prefix'        `${prefix}'
-    `bindir'             `${exec_prefix}/bin'
-    `libdir'             `${exec_prefix}/lib'
-    ...                  
-  `includedir'         `${prefix}/include'
-  `datarootdir'        `${prefix}/share'
-    `datadir'            `${datarootdir}'
-    `mandir'             `${datarootdir}/man'
-    `infodir'            `${datarootdir}/info'
-    `docdir'             `${datarootdir}/doc/${PACKAGE}'
-  ...                  
+-------------------------------------------------------
+‘prefix’             ‘/usr/local’
+  ‘exec_prefix’      ‘${prefix}’
+    ‘bindir’         ‘${exec_prefix}/bin’
+    ‘libdir’         ‘${exec_prefix}/lib’
+    ...
+  ‘includedir’       ‘${prefix}/include’
+  ‘datarootdir’      ‘${prefix}/share’
+    ‘datadir’        ‘${datarootdir}’
+    ‘mandir’         ‘${datarootdir}/man’
+    ‘infodir’        ‘${datarootdir}/info’
+    ‘docdir’         ‘${datarootdir}/doc/${PACKAGE}’
+  ...
 
    Each of these directories has a role which is often obvious from its
 name.  In a package, any installable file will be installed in one of
-these directories.  For instance in `amhello-1.0', the program `hello'
+these directories.  For instance in ‘amhello-1.0’, the program ‘hello’
 is to be installed in BINDIR, the directory for binaries.  The default
-value for this directory is `/usr/local/bin', but the user can supply a
-different value when calling `configure'.  Also the file `README' will
+value for this directory is ‘/usr/local/bin’, but the user can supply a
+different value when calling ‘configure’.  Also the file ‘README’ will
 be installed into DOCDIR, which defaults to
-`/usr/local/share/doc/amhello'.
+‘/usr/local/share/doc/amhello’.
 
    As a user, if you wish to install a package on your own account, you
 could proceed as follows:
@@ -674,11 +660,11 @@ could proceed as follows:
      ~/amhello-1.0 % make install
      ...
 
-   This would install `~/usr/bin/hello' and
-`~/usr/share/doc/amhello/README'.
+   This would install ‘~/usr/bin/hello’ and
+‘~/usr/share/doc/amhello/README’.
 
-   The list of all such directory options is shown by `./configure
---help'.
+   The list of all such directory options is shown by ./configure
+--help.
 
 \1f
 File: automake.info,  Node: Standard Configuration Variables,  Next: config.site,  Prev: Standard Directory Variables,  Up: Use Cases
@@ -689,70 +675,63 @@ File: automake.info,  Node: Standard Configuration Variables,  Next: config.site
 The GNU Coding Standards also define a set of standard configuration
 variables used during the build.  Here are some:
 
-`CC'
+‘CC’
      C compiler command
-
-`CFLAGS'
+‘CFLAGS’
      C compiler flags
-
-`CXX'
+‘CXX’
      C++ compiler command
-
-`CXXFLAGS'
+‘CXXFLAGS’
      C++ compiler flags
-
-`LDFLAGS'
+‘LDFLAGS’
      linker flags
-
-`CPPFLAGS'
+‘CPPFLAGS’
      C/C++ preprocessor flags
-
 ...
 
-   `configure' usually does a good job at setting appropriate values
-for these variables, but there are cases where you may want to override
+   ‘configure’ usually does a good job at setting appropriate values for
+these variables, but there are cases where you may want to override
 them.  For instance you may have several versions of a compiler
 installed and would like to use another one, you may have header files
 installed outside the default search path of the compiler, or even
 libraries out of the way of the linker.
 
-   Here is how one would call `configure' to force it to use `gcc-3' as
-C compiler, use header files from `~/usr/include' when compiling, and
-libraries from `~/usr/lib' when linking.
+   Here is how one would call ‘configure’ to force it to use ‘gcc-3’ as
+C compiler, use header files from ‘~/usr/include’ when compiling, and
+libraries from ‘~/usr/lib’ when linking.
 
      ~/amhello-1.0 % ./configure --prefix ~/usr CC=gcc-3 \
      CPPFLAGS=-I$HOME/usr/include LDFLAGS=-L$HOME/usr/lib
 
    Again, a full list of these variables appears in the output of
-`./configure --help'.
+‘./configure --help’.
 
 \1f
 File: automake.info,  Node: config.site,  Next: VPATH Builds,  Prev: Standard Configuration Variables,  Up: Use Cases
 
-2.2.5 Overriding Default Configuration Setting with `config.site'
+2.2.5 Overriding Default Configuration Setting with ‘config.site’
 -----------------------------------------------------------------
 
 When installing several packages using the same setup, it can be
-convenient to create a file to capture common settings.  If a file
-named `PREFIX/share/config.site' exists, `configure' will source it at
-the beginning of its execution.
+convenient to create a file to capture common settings.  If a file named
+‘PREFIX/share/config.site’ exists, ‘configure’ will source it at the
+beginning of its execution.
 
    Recall the command from the previous section:
 
      ~/amhello-1.0 % ./configure --prefix ~/usr CC=gcc-3 \
      CPPFLAGS=-I$HOME/usr/include LDFLAGS=-L$HOME/usr/lib
 
-   Assuming we are installing many package in `~/usr', and will always
-want to use these definitions of `CC', `CPPFLAGS', and `LDFLAGS', we
-can automate this by creating the following `~/usr/share/config.site'
-file:
+   Assuming we are installing many package in ‘~/usr’, and will always
+want to use these definitions of ‘CC’, ‘CPPFLAGS’, and ‘LDFLAGS’, we can
+automate this by creating the following ‘~/usr/share/config.site’ file:
 
      test -z "$CC" && CC=gcc-3
      test -z "$CPPFLAGS" && CPPFLAGS=-I$HOME/usr/include
      test -z "$LDFLAGS" && LDFLAGS=-L$HOME/usr/lib
 
-   Now, any time a `configure' script is using the `~/usr' prefix, it
-will execute the above `config.site' and define these three variables.
+   Now, any time a ‘configure’ script is using the ‘~/usr’ prefix, it
+will execute the above ‘config.site’ and define these three variables.
 
      ~/amhello-1.0 % ./configure --prefix ~/usr
      configure: loading site script /home/adl/usr/share/config.site
@@ -770,25 +749,25 @@ File: automake.info,  Node: VPATH Builds,  Next: Two-Part Install,  Prev: config
 The GNU Build System distinguishes two trees: the source tree, and the
 build tree.
 
-   The source tree is rooted in the directory containing `configure'.
+   The source tree is rooted in the directory containing ‘configure’.
 It contains all the sources files (those that are distributed), and may
 be arranged using several subdirectories.
 
-   The build tree is rooted in the directory in which `configure' was
+   The build tree is rooted in the directory in which ‘configure’ was
 run, and is populated with all object files, programs, libraries, and
 other derived files built from the sources (and hence not distributed).
 The build tree usually has the same subdirectory layout as the source
 tree; its subdirectories are created automatically by the build system.
 
-   If `configure' is executed in its own directory, the source and
-build trees are combined: derived files are constructed in the same
+   If ‘configure’ is executed in its own directory, the source and build
+trees are combined: derived files are constructed in the same
 directories as their sources.  This was the case in our first
 installation example (*note Basic Installation::).
 
    A common request from users is that they want to confine all derived
 files to a single directory, to keep their source directories
-uncluttered.  Here is how we could run `configure' to build everything
-in a subdirectory called `build/'.
+uncluttered.  Here is how we could run ‘configure’ to build everything
+in a subdirectory called ‘build/’.
 
      ~ % tar zxf ~/amhello-1.0.tar.gz
      ~ % cd amhello-1.0
@@ -799,14 +778,13 @@ in a subdirectory called `build/'.
      ...
 
    These setups, where source and build trees are different, are often
-called "parallel builds" or "VPATH builds".  The expression _parallel
+called “parallel builds” or “VPATH builds”.  The expression _parallel
 build_ is misleading: the word _parallel_ is a reference to the way the
 build tree shadows the source tree, it is not about some concurrency in
-the way build commands are run.  For this reason we refer to such
-setups using the name _VPATH builds_ in the following.  _VPATH_ is the
-name of the `make' feature used by the `Makefile's to allow these
-builds (*note `VPATH' Search Path for All Prerequisites: (make)General
-Search.).
+the way build commands are run.  For this reason we refer to such setups
+using the name _VPATH builds_ in the following.  _VPATH_ is the name of
+the ‘make’ feature used by the ‘Makefile’s to allow these builds (*note
+‘VPATH’ Search Path for All Prerequisites: (make)General Search.).
 
    VPATH builds have other interesting uses.  One is to build the same
 sources with multiple configurations.  For instance:
@@ -826,8 +804,8 @@ sources with multiple configurations.  For instance:
 
    With network file systems, a similar approach can be used to build
 the same sources on different machines.  For instance, suppose that the
-sources are installed on a directory shared by two hosts: `HOST1' and
-`HOST2', which may be different platforms.
+sources are installed on a directory shared by two hosts: ‘HOST1’ and
+‘HOST2’, which may be different platforms.
 
      ~ % cd /nfs/src
      /nfs/src % tar zxf ~/amhello-1.0.tar.gz
@@ -839,9 +817,9 @@ sources are installed on a directory shared by two hosts: `HOST1' and
      [HOST1] /tmp/amh % make && sudo make install
      ...
 
-(Here we assume that the installer has configured `sudo' so it can
-execute `make install' with root privileges; it is more convenient than
-using `su' like in *note Basic Installation::).
+(Here we assume that the installer has configured ‘sudo’ so it can
+execute ‘make install’ with root privileges; it is more convenient than
+using ‘su’ like in *note Basic Installation::).
 
    On the second host, you would do exactly the same, possibly at the
 same time:
@@ -851,11 +829,11 @@ same time:
      [HOST2] /tmp/amh % make && sudo make install
      ...
 
-   In this scenario, nothing forbids the `/nfs/src/amhello-1.0'
+   In this scenario, nothing forbids the ‘/nfs/src/amhello-1.0’
 directory from being read-only.  In fact VPATH builds are also a means
-of building packages from a read-only medium such as a CD-ROM.  (The
-FSF used to sell CD-ROM with unpacked source code, before the GNU
-project grew so big.)
+of building packages from a read-only medium such as a CD-ROM. (The FSF
+used to sell CD-ROM with unpacked source code, before the GNU project
+grew so big.)
 
 \1f
 File: automake.info,  Node: Two-Part Install,  Next: Cross-Compilation,  Prev: VPATH Builds,  Up: Use Cases
@@ -864,34 +842,34 @@ File: automake.info,  Node: Two-Part Install,  Next: Cross-Compilation,  Prev: V
 ---------------------------
 
 In our last example (*note VPATH Builds::), a source tree was shared by
-two hosts, but compilation and installation were done separately on
-each host.
+two hosts, but compilation and installation were done separately on each
+host.
 
    The GNU Build System also supports networked setups where part of the
 installed files should be shared amongst multiple hosts.  It does so by
 distinguishing architecture-dependent files from
-architecture-independent files, and providing two `Makefile' targets to
+architecture-independent files, and providing two ‘Makefile’ targets to
 install each of these classes of files.
 
-   These targets are `install-exec' for architecture-dependent files
-and `install-data' for architecture-independent files.  The command we
-used up to now, `make install', can be thought of as a shorthand for
-`make install-exec install-data'.
+   These targets are ‘install-exec’ for architecture-dependent files and
+‘install-data’ for architecture-independent files.  The command we used
+up to now, ‘make install’, can be thought of as a shorthand for ‘make
+install-exec install-data’.
 
    From the GNU Build System point of view, the distinction between
-architecture-dependent files and architecture-independent files is
-based exclusively on the directory variable used to specify their
-installation destination.  In the list of directory variables we
-provided earlier (*note Standard Directory Variables::), all the
-variables based on EXEC-PREFIX designate architecture-dependent
-directories whose files will be installed by `make install-exec'.  The
-others designate architecture-independent directories and will serve
-files installed by `make install-data'.  *Note The Two Parts of
-Install::, for more details.
+architecture-dependent files and architecture-independent files is based
+exclusively on the directory variable used to specify their installation
+destination.  In the list of directory variables we provided earlier
+(*note Standard Directory Variables::), all the variables based on
+EXEC-PREFIX designate architecture-dependent directories whose files
+will be installed by ‘make install-exec’.  The others designate
+architecture-independent directories and will serve files installed by
+‘make install-data’.  *Note The Two Parts of Install::, for more
+details.
 
    Here is how we could revisit our two-host installation example,
-assuming that (1) we want to install the package directly in `/usr',
-and (2) the directory `/usr/share' is shared by the two hosts.
+assuming that (1) we want to install the package directly in ‘/usr’, and
+(2) the directory ‘/usr/share’ is shared by the two hosts.
 
    On the first host we would run
      [HOST1] ~ % mkdir /tmp/amh && cd /tmp/amh
@@ -909,7 +887,7 @@ architecture-specific files.
      ...
 
    In packages that have installation checks, it would make sense to run
-`make installcheck' (*note Basic Installation::) to verify that the
+‘make installcheck’ (*note Basic Installation::) to verify that the
 package works correctly despite the apparent partial installation.
 
 \1f
@@ -918,27 +896,26 @@ File: automake.info,  Node: Cross-Compilation,  Next: Renaming,  Prev: Two-Part
 2.2.8 Cross-Compilation
 -----------------------
 
-To "cross-compile" is to build on one platform a binary that will run
-on another platform.  When speaking of cross-compilation, it is
-important to distinguish between the "build platform" on which the
-compilation is performed, and the "host platform" on which the
-resulting executable is expected to run.  The following `configure'
-options are used to specify each of them:
+To “cross-compile” is to build on one platform a binary that will run on
+another platform.  When speaking of cross-compilation, it is important
+to distinguish between the “build platform” on which the compilation is
+performed, and the “host platform” on which the resulting executable is
+expected to run.  The following ‘configure’ options are used to specify
+each of them:
 
-`--build=BUILD'
+‘--build=BUILD’
      The system on which the package is built.
-
-`--host=HOST'
+‘--host=HOST’
      The system where built programs and libraries will run.
 
-   When the `--host' is used, `configure' will search for the
+   When the ‘--host’ is used, ‘configure’ will search for the
 cross-compiling suite for this platform.  Cross-compilation tools
 commonly have their target architecture as prefix of their name.  For
 instance my cross-compiler for MinGW32 has its binaries called
-`i586-mingw32msvc-gcc', `i586-mingw32msvc-ld', `i586-mingw32msvc-as',
+‘i586-mingw32msvc-gcc’, ‘i586-mingw32msvc-ld’, ‘i586-mingw32msvc-as’,
 etc.
 
-   Here is how we could build `amhello-1.0' for `i586-mingw32msvc' on a
+   Here is how we could build ‘amhello-1.0’ for ‘i586-mingw32msvc’ on a
 GNU/Linux PC.
 
      ~/amhello-1.0 % ./configure --build i686-pc-linux-gnu --host i586-mingw32msvc
@@ -962,23 +939,23 @@ GNU/Linux PC.
      ~/amhello-1.0 % cd src; file hello.exe
      hello.exe: MS Windows PE 32-bit Intel 80386 console executable not relocatable
 
-   The `--host' and `--build' options are usually all we need for
+   The ‘--host’ and ‘--build’ options are usually all we need for
 cross-compiling.  The only exception is if the package being built is
 itself a cross-compiler: we need a third option to specify its target
 architecture.
 
-`--target=TARGET'
+‘--target=TARGET’
      When building compiler tools: the system for which the tools will
      create output.
 
    For instance when installing GCC, the GNU Compiler Collection, we can
-use `--target=TARGET' to specify that we want to build GCC as a
-cross-compiler for TARGET.  Mixing `--build' and `--target', we can
+use ‘--target=TARGET’ to specify that we want to build GCC as a
+cross-compiler for TARGET.  Mixing ‘--build’ and ‘--target’, we can
 actually cross-compile a cross-compiler; such a three-way
-cross-compilation is known as a "Canadian cross".
+cross-compilation is known as a “Canadian cross”.
 
    *Note Specifying the System Type: (autoconf)Specifying Names, for
-more information about these `configure' options.
+more information about these ‘configure’ options.
 
 \1f
 File: automake.info,  Node: Renaming,  Next: DESTDIR,  Prev: Cross-Compilation,  Up: Use Cases
@@ -990,22 +967,20 @@ The GNU Build System provides means to automatically rename executables
 and manpages before they are installed (*note Man Pages::).  This is
 especially convenient when installing a GNU package on a system that
 already has a proprietary implementation you do not want to overwrite.
-For instance, you may want to install GNU `tar' as `gtar' so you can
-distinguish it from your vendor's `tar'.
+For instance, you may want to install GNU ‘tar’ as ‘gtar’ so you can
+distinguish it from your vendor’s ‘tar’.
 
-   This can be done using one of these three `configure' options.
+   This can be done using one of these three ‘configure’ options.
 
-`--program-prefix=PREFIX'
+‘--program-prefix=PREFIX’
      Prepend PREFIX to installed program names.
-
-`--program-suffix=SUFFIX'
+‘--program-suffix=SUFFIX’
      Append SUFFIX to installed program names.
+‘--program-transform-name=PROGRAM’
+     Run ‘sed PROGRAM’ on installed program names.
 
-`--program-transform-name=PROGRAM'
-     Run `sed PROGRAM' on installed program names.
-
-   The following commands would install `hello' as
-`/usr/local/bin/test-hello', for instance.
+   The following commands would install ‘hello’ as
+‘/usr/local/bin/test-hello’, for instance.
 
      ~/amhello-1.0 % ./configure --program-prefix test-
      ...
@@ -1020,18 +995,18 @@ File: automake.info,  Node: DESTDIR,  Next: Preparing Distributions,  Prev: Rena
 2.2.10 Building Binary Packages Using DESTDIR
 ---------------------------------------------
 
-The GNU Build System's `make install' and `make uninstall' interface
+The GNU Build System’s ‘make install’ and ‘make uninstall’ interface
 does not exactly fit the needs of a system administrator who has to
 deploy and upgrade packages on lots of hosts.  In other words, the GNU
 Build System does not replace a package manager.
 
    Such package managers usually need to know which files have been
-installed by a package, so a mere `make install' is inappropriate.
+installed by a package, so a mere ‘make install’ is inappropriate.
 
-   The `DESTDIR' variable can be used to perform a staged installation.
+   The ‘DESTDIR’ variable can be used to perform a staged installation.
 The package should be configured as if it was going to be installed in
-its final location (e.g., `--prefix /usr'), but when running `make
-install', the `DESTDIR' should be set to the absolute name of a
+its final location (e.g., ‘--prefix /usr’), but when running ‘make
+install’, the ‘DESTDIR’ should be set to the absolute name of a
 directory into which the installation will be diverted.  From this
 directory it is easy to review which files are being installed where,
 and finally copy them to their final location by some means.
@@ -1051,16 +1026,16 @@ a snapshot of all the files to be installed.
      ./usr/bin/hello
      ./usr/share/doc/amhello/README
 
-   After this example, `amhello-1.0-i686.tar.gz' is ready to be
-uncompressed in `/' on many hosts.  (Using ``cat ../files.lst`' instead
-of `.' as argument for `tar' avoids entries for each subdirectory in
-the archive: we would not like `tar' to restore the modification time
-of `/', `/usr/', etc.)
+   After this example, ‘amhello-1.0-i686.tar.gz’ is ready to be
+uncompressed in ‘/’ on many hosts.  (Using ‘`cat ../files.lst`’ instead
+of ‘.’ as argument for ‘tar’ avoids entries for each subdirectory in the
+archive: we would not like ‘tar’ to restore the modification time of
+‘/’, ‘/usr/’, etc.)
 
    Note that when building packages for several architectures, it might
-be convenient to use `make install-data' and `make install-exec' (*note
-Two-Part Install::) to gather architecture-independent files in a
-single package.
+be convenient to use ‘make install-data’ and ‘make install-exec’ (*note
+Two-Part Install::) to gather architecture-independent files in a single
+package.
 
    *Note Install::, for more information.
 
@@ -1070,43 +1045,45 @@ File: automake.info,  Node: Preparing Distributions,  Next: Dependency Tracking,
 2.2.11 Preparing Distributions
 ------------------------------
 
-We have already mentioned `make dist'.  This target collects all your
+We have already mentioned ‘make dist’.  This target collects all your
 source files and the necessary parts of the build system to create a
-tarball named `PACKAGE-VERSION.tar.gz'.
+tarball named ‘PACKAGE-VERSION.tar.gz’.
 
-   Another, more useful command is `make distcheck'.  The `distcheck'
-target constructs `PACKAGE-VERSION.tar.gz' just as well as `dist', but
+   Another, more useful command is ‘make distcheck’.  The ‘distcheck’
+target constructs ‘PACKAGE-VERSION.tar.gz’ just as well as ‘dist’, but
 it additionally ensures most of the use cases presented so far work:
 
-   * It attempts a full compilation of the package (*note Basic
+    It attempts a full compilation of the package (*note Basic
      Installation::), unpacking the newly constructed tarball, running
-     `make', `make check', `make install', as well as `make
-     installcheck', and even `make dist',
-
-   * it tests VPATH builds with read-only source tree (*note VPATH
+     ‘make’, ‘make check’, ‘make install’, as well as ‘make
+     installcheck’, and even ‘make dist’,
+   • it tests VPATH builds with read-only source tree (*note VPATH
      Builds::),
-
-   * it makes sure `make clean', `make distclean', and `make uninstall'
+   • it makes sure ‘make clean’, ‘make distclean’, and ‘make uninstall’
      do not omit any file (*note Standard Targets::),
-
-   * and it checks that `DESTDIR' installations work (*note DESTDIR::).
-
-   All of these actions are performed in a temporary subdirectory, so
-that no root privileges are required.
-
-   Releasing a package that fails `make distcheck' means that one of
-the scenarios we presented will not work and some users will be
-disappointed.  Therefore it is a good practice to release a package
-only after a successful `make distcheck'.  This of course does not
-imply that the package will be flawless, but at least it will prevent
-some of the embarrassing errors you may find in packages released by
-people who have never heard about `distcheck' (like `DESTDIR' not
-working because of a typo, or a distributed file being erased by `make
-clean', or even `VPATH' builds not working).
-
-   *Note Creating amhello::, to recreate `amhello-1.0.tar.gz' using
-`make distcheck'.  *Note Checking the Distribution::, for more
-information about `distcheck'.
+   • and it checks that ‘DESTDIR’ installations work (*note DESTDIR::).
+
+   All of these actions are performed in a temporary directory, so that
+no root privileges are required.  Please note that the exact location
+and the exact structure of such a subdirectory (where the extracted
+sources are placed, how the temporary build and install directories are
+named and how deeply they are nested, etc.)  is to be considered an
+implementation detail, which can change at any time; so do not rely on
+it.
+
+   Releasing a package that fails ‘make distcheck’ means that one of the
+scenarios we presented will not work and some users will be
+disappointed.  Therefore it is a good practice to release a package only
+after a successful ‘make distcheck’.  This of course does not imply that
+the package will be flawless, but at least it will prevent some of the
+embarrassing errors you may find in packages released by people who have
+never heard about ‘distcheck’ (like ‘DESTDIR’ not working because of a
+typo, or a distributed file being erased by ‘make clean’, or even
+‘VPATH’ builds not working).
+
+   *Note Creating amhello::, to recreate ‘amhello-1.0.tar.gz’ using
+‘make distcheck’.  *Note Checking the Distribution::, for more
+information about ‘distcheck’.
 
 \1f
 File: automake.info,  Node: Dependency Tracking,  Next: Nested Packages,  Prev: Preparing Distributions,  Up: Use Cases
@@ -1117,14 +1094,14 @@ File: automake.info,  Node: Dependency Tracking,  Next: Nested Packages,  Prev:
 Dependency tracking is performed as a side-effect of compilation.  Each
 time the build system compiles a source file, it computes its list of
 dependencies (in C these are the header files included by the source
-being compiled).  Later, any time `make' is run and a dependency
-appears to have changed, the dependent files will be rebuilt.
+being compiled).  Later, any time ‘make’ is run and a dependency appears
+to have changed, the dependent files will be rebuilt.
 
    Automake generates code for automatic dependency tracking by default,
-unless the developer chooses to override it; for more information,
-*note Dependencies::.
+unless the developer chooses to override it; for more information, *note
+Dependencies::.
 
-   When `configure' is executed, you can see it probing each compiler
+   When ‘configure’ is executed, you can see it probing each compiler
 for the dependency mechanism it supports (several mechanisms can be
 used):
 
@@ -1136,21 +1113,21 @@ used):
    Because dependencies are only computed as a side-effect of the
 compilation, no dependency information exists the first time a package
 is built.  This is OK because all the files need to be built anyway:
-`make' does not have to decide which files need to be rebuilt.  In
-fact, dependency tracking is completely useless for one-time builds and
-there is a `configure' option to disable this:
+‘make’ does not have to decide which files need to be rebuilt.  In fact,
+dependency tracking is completely useless for one-time builds and there
+is a ‘configure’ option to disable this:
 
-`--disable-dependency-tracking'
+‘--disable-dependency-tracking’
      Speed up one-time builds.
 
    Some compilers do not offer any practical way to derive the list of
 dependencies as a side-effect of the compilation, requiring a separate
 run (maybe of another tool) to compute these dependencies.  The
 performance penalty implied by these methods is important enough to
-disable them by default.  The option `--enable-dependency-tracking'
-must be passed to `configure' to activate them.
+disable them by default.  The option ‘--enable-dependency-tracking’ must
+be passed to ‘configure’ to activate them.
 
-`--enable-dependency-tracking'
+‘--enable-dependency-tracking’
      Do not reject slow dependency extractors.
 
    *Note Dependency Tracking Evolution: (automake-history)Dependency
@@ -1163,18 +1140,18 @@ File: automake.info,  Node: Nested Packages,  Prev: Dependency Tracking,  Up: Us
 2.2.13 Nested Packages
 ----------------------
 
-Although nesting packages isn't something we would recommend to someone
-who is discovering the Autotools, it is a nice feature worthy of
-mention in this small advertising tour.
+Although nesting packages isnt something we would recommend to someone
+who is discovering the Autotools, it is a nice feature worthy of mention
+in this small advertising tour.
 
    Autoconfiscated packages (that means packages whose build system have
 been created by Autoconf and friends) can be nested to arbitrary depth.
 
    A typical setup is that package A will distribute one of the
 libraries it needs in a subdirectory.  This library B is a complete
-package with its own GNU Build System.  The `configure' script of A will
-run the `configure' script of B as part of its execution, building and
-installing A will also build and install B.  Generating a distribution
+package with its own GNU Build System.  The ‘configure’ script of A will
+run the ‘configure’ script of B as part of its execution, building and
+installing A will also build and install B. Generating a distribution
 for A will also include B.
 
    It is possible to gather several packages like this.  GCC is a heavy
@@ -1182,12 +1159,12 @@ user of this feature.  This gives installers a single package to
 configure, build and install, while it allows developers to work on
 subpackages independently.
 
-   When configuring nested packages, the `configure' options given to
-the top-level `configure' are passed recursively to nested
-`configure's.  A package that does not understand an option will ignore
-it, assuming it is meaningful to some other package.
+   When configuring nested packages, the ‘configure’ options given to
+the top-level ‘configure’ are passed recursively to nested ‘configure’s.
+A package that does not understand an option will ignore it, assuming it
+is meaningful to some other package.
 
-   The command `configure --help=recursive' can be used to display the
+   The command ‘configure --help=recursive’ can be used to display the
 options supported by all the included packages.
 
    *Note Subpackages::, for an example setup.
@@ -1199,32 +1176,29 @@ File: automake.info,  Node: Why Autotools,  Next: Hello World,  Prev: Use Cases,
 ======================
 
 There are several reasons why you may not want to implement the GNU
-Build System yourself (read: write a `configure' script and `Makefile's
+Build System yourself (read: write a ‘configure’ script and ‘Makefile’s
 yourself).
 
-   * As we have seen, the GNU Build System has a lot of features (*note
+    As we have seen, the GNU Build System has a lot of features (*note
      Use Cases::).  Some users may expect features you have not
      implemented because you did not need them.
-
-   * Implementing these features portably is difficult and exhausting.
-     Think of writing portable shell scripts, and portable `Makefile's,
+   • Implementing these features portably is difficult and exhausting.
+     Think of writing portable shell scripts, and portable ‘Makefile’s,
      for systems you may not have handy.  *Note Portable Shell
      Programming: (autoconf)Portable Shell, to convince yourself.
-
-   * You will have to upgrade your setup to follow changes to the GNU
+   • You will have to upgrade your setup to follow changes to the GNU
      Coding Standards.
 
    The GNU Autotools take all this burden off your back and provide:
 
-   * Tools to create a portable, complete, and self-contained GNU Build
+    Tools to create a portable, complete, and self-contained GNU Build
      System, from simple instructions.  _Self-contained_ meaning the
      resulting build system does not require the GNU Autotools.
-
-   * A central place where fixes and improvements are made: a bug-fix
+   • A central place where fixes and improvements are made: a bug-fix
      for a portability issue will benefit every package.
 
    Yet there also exist reasons why you may want NOT to use the
-Autotools... For instance you may be already using (or used to) another
+Autotools...  For instance you may be already using (or used to) another
 incompatible build system.  Autotools will only be useful if you do
 accept the concepts of the GNU Build System.  People who have their own
 idea of how a build system should work will feel frustrated by the
@@ -1236,34 +1210,34 @@ File: automake.info,  Node: Hello World,  Prev: Why Autotools,  Up: Autotools In
 2.4 A Small Hello World
 =======================
 
-In this section we recreate the `amhello-1.0' package from scratch.
-The first subsection shows how to call the Autotools to instantiate the
-GNU Build System, while the second explains the meaning of the
-`configure.ac' and `Makefile.am' files read by the Autotools.
+In this section we recreate the ‘amhello-1.0’ package from scratch.  The
+first subsection shows how to call the Autotools to instantiate the GNU
+Build System, while the second explains the meaning of the
+‘configure.ac’ and ‘Makefile.am’ files read by the Autotools.
 
 * Menu:
 
-* Creating amhello::            Create `amhello-1.0.tar.gz' from scratch
+* Creating amhello::            Create ‘amhello-1.0.tar.gz’ from scratch
 * amhello's configure.ac Setup Explained::
 * amhello's Makefile.am Setup Explained::
 
 \1f
 File: automake.info,  Node: Creating amhello,  Next: amhello's configure.ac Setup Explained,  Up: Hello World
 
-2.4.1 Creating `amhello-1.0.tar.gz'
+2.4.1 Creating ‘amhello-1.0.tar.gz’
 -----------------------------------
 
-Here is how we can recreate `amhello-1.0.tar.gz' from scratch.  The
+Here is how we can recreate ‘amhello-1.0.tar.gz’ from scratch.  The
 package is simple enough so that we will only need to write 5 files.
-(You may copy them from the final `amhello-1.0.tar.gz' that is
+(You may copy them from the final ‘amhello-1.0.tar.gz’ that is
 distributed with Automake if you do not want to write them.)
 
    Create the following files in an empty directory.
 
-   * `src/main.c' is the source file for the `hello' program.  We store
-     it in the `src/' subdirectory, because later, when the package
-     evolves, it will ease the addition of a `man/' directory for man
-     pages, a `data/' directory for data files, etc.
+   • ‘src/main.c’ is the source file for the ‘hello’ program.  We store
+     it in the ‘src/’ subdirectory, because later, when the package
+     evolves, it will ease the addition of a ‘man/’ directory for man
+     pages, a ‘data/’ directory for data files, etc.
           ~/amhello % cat src/main.c
           #include <config.h>
           #include <stdio.h>
@@ -1276,13 +1250,13 @@ distributed with Automake if you do not want to write them.)
             return 0;
           }
 
-   * `README' contains some very limited documentation for our little
+   • ‘README’ contains some very limited documentation for our little
      package.
           ~/amhello % cat README
           This is a demonstration package for GNU Automake.
-          Type `info Automake' to read the Automake manual.
+          Type 'info Automake' to read the Automake manual.
 
-   * `Makefile.am' and `src/Makefile.am' contain Automake instructions
+   • ‘Makefile.am’ and ‘src/Makefile.am’ contain Automake instructions
      for these two directories.
 
           ~/amhello % cat src/Makefile.am
@@ -1292,8 +1266,8 @@ distributed with Automake if you do not want to write them.)
           SUBDIRS = src
           dist_doc_DATA = README
 
-   * Finally, `configure.ac' contains Autoconf instructions to create
-     the `configure' script.
+   • Finally, ‘configure.ac’ contains Autoconf instructions to create
+     the ‘configure’ script.
 
           ~/amhello % cat configure.ac
           AC_INIT([amhello], [1.0], [bug-automake@gnu.org])
@@ -1307,21 +1281,22 @@ distributed with Automake if you do not want to write them.)
           AC_OUTPUT
 
    Once you have these five files, it is time to run the Autotools to
-instantiate the build system.  Do this using the `autoreconf' command
-as follows:
+instantiate the build system.  Do this using the ‘autoreconf’ command as
+follows:
 
      ~/amhello % autoreconf --install
-     configure.ac: installing `./install-sh'
-     configure.ac: installing `./missing'
-     src/Makefile.am: installing `./depcomp'
+     configure.ac: installing './install-sh'
+     configure.ac: installing './missing'
+     configure.ac: installing './compile'
+     src/Makefile.am: installing './depcomp'
 
    At this point the build system is complete.
 
    In addition to the three scripts mentioned in its output, you can see
-that `autoreconf' created four other files: `configure', `config.h.in',
-`Makefile.in', and `src/Makefile.in'.  The latter three files are
-templates that will be adapted to the system by `configure' under the
-names `config.h', `Makefile', and `src/Makefile'.  Let's do this:
+that ‘autoreconf’ created four other files: ‘configure’, ‘config.h.in’,
+‘Makefile.in’, and ‘src/Makefile.in’.  The latter three files are
+templates that will be adapted to the system by ‘configure’ under the
+names ‘config.h’, ‘Makefile’, and ‘src/Makefile’.  Let’s do this:
 
      ~/amhello % ./configure
      checking for a BSD-compatible install... /usr/bin/install -c
@@ -1346,8 +1321,8 @@ names `config.h', `Makefile', and `src/Makefile'.  Let's do this:
      config.status: creating config.h
      config.status: executing depfiles commands
 
-   You can see `Makefile', `src/Makefile', and `config.h' being created
-at the end after `configure' has probed the system.  It is now possible
+   You can see ‘Makefile’, ‘src/Makefile’, and ‘config.h’ being created
+at the end after ‘configure’ has probed the system.  It is now possible
 to run all the targets we wish (*note Standard Targets::).  For
 instance:
 
@@ -1363,28 +1338,28 @@ instance:
      amhello-1.0.tar.gz
      =============================================
 
-   Note that running `autoreconf' is only needed initially when the GNU
-Build System does not exist.  When you later change some instructions
-in a `Makefile.am' or `configure.ac', the relevant part of the build
-system will be regenerated automatically when you execute `make'.
+   Note that running ‘autoreconf’ is only needed initially when the GNU
+Build System does not exist.  When you later change some instructions in
+a ‘Makefile.am’ or ‘configure.ac’, the relevant part of the build system
+will be regenerated automatically when you execute ‘make’.
 
-   `autoreconf' is a script that calls `autoconf', `automake', and a
+   ‘autoreconf’ is a script that calls ‘autoconf’, ‘automake’, and a
 bunch of other commands in the right order.  If you are beginning with
-these tools, it is not important to figure out in which order all these
-tools should be invoked and why.  However, because Autoconf and
+these tools, it is not important to figure out in which order all of
+these tools should be invoked and why.  However, because Autoconf and
 Automake have separate manuals, the important point to understand is
-that `autoconf' is in charge of creating `configure' from
-`configure.ac', while `automake' is in charge of creating
-`Makefile.in's from `Makefile.am's and `configure.ac'.  This should at
-least direct you to the right manual when seeking answers.
+that ‘autoconf’ is in charge of creating ‘configure’ from
+‘configure.ac’, while ‘automake’ is in charge of creating ‘Makefile.in’s
+from ‘Makefile.am’s and ‘configure.ac’.  This should at least direct you
+to the right manual when seeking answers.
 
 \1f
 File: automake.info,  Node: amhello's configure.ac Setup Explained,  Next: amhello's Makefile.am Setup Explained,  Prev: Creating amhello,  Up: Hello World
 
-2.4.2 `amhello''s `configure.ac' Setup Explained
+2.4.2 ‘amhello’’s ‘configure.ac’ Setup Explained
 ------------------------------------------------
 
-Let us begin with the contents of `configure.ac'.
+Let us begin with the contents of ‘configure.ac’.
 
      AC_INIT([amhello], [1.0], [bug-automake@gnu.org])
      AM_INIT_AUTOMAKE([-Wall -Werror foreign])
@@ -1396,54 +1371,53 @@ Let us begin with the contents of `configure.ac'.
      ])
      AC_OUTPUT
 
-   This file is read by both `autoconf' (to create `configure') and
-`automake' (to create the various `Makefile.in's).  It contains a
-series of M4 macros that will be expanded as shell code to finally form
-the `configure' script.  We will not elaborate on the syntax of this
-file, because the Autoconf manual has a whole section about it (*note
-Writing `configure.ac': (autoconf)Writing Autoconf Input.).
+   This file is read by both ‘autoconf’ (to create ‘configure’) and
+‘automake’ (to create the various ‘Makefile.in’s).  It contains a series
+of M4 macros that will be expanded as shell code to finally form the
+‘configure’ script.  We will not elaborate on the syntax of this file,
+because the Autoconf manual has a whole section about it (*note Writing
+‘configure.ac’: (autoconf)Writing Autoconf Input.).
 
-   The macros prefixed with `AC_' are Autoconf macros, documented in
-the Autoconf manual (*note Autoconf Macro Index: (autoconf)Autoconf
-Macro Index.).  The macros that start with `AM_' are Automake macros,
+   The macros prefixed with ‘AC_’ are Autoconf macros, documented in the
+Autoconf manual (*note Autoconf Macro Index: (autoconf)Autoconf Macro
+Index.).  The macros that start with ‘AM_’ are Automake macros,
 documented later in this manual (*note Macro Index::).
 
-   The first two lines of `configure.ac' initialize Autoconf and
-Automake.  `AC_INIT' takes in as parameters the name of the package,
-its version number, and a contact address for bug-reports about the
-package (this address is output at the end of `./configure --help', for
+   The first two lines of ‘configure.ac’ initialize Autoconf and
+Automake.  ‘AC_INIT’ takes in as parameters the name of the package, its
+version number, and a contact address for bug-reports about the package
+(this address is output at the end of ‘./configure --help’, for
 instance).  When adapting this setup to your own package, by all means
-please do not blindly copy Automake's address: use the mailing list of
+please do not blindly copy Automakes address: use the mailing list of
 your package, or your own mail address.
 
-   The argument to `AM_INIT_AUTOMAKE' is a list of options for
-`automake' (*note Options::).  `-Wall' and `-Werror' ask `automake' to
+   The argument to ‘AM_INIT_AUTOMAKE’ is a list of options for
+‘automake’ (*note Options::).  ‘-Wall’ and ‘-Werror’ ask ‘automake’ to
 turn on all warnings and report them as errors.  We are speaking of
-*Automake* warnings here, such as dubious instructions in
-`Makefile.am'.  This has absolutely nothing to do with how the compiler
-will be called, even though it may support options with similar names.
-Using `-Wall -Werror' is a safe setting when starting to work on a
-package: you do not want to miss any issues.  Later you may decide to
-relax things a bit.  The `foreign' option tells Automake that this
-package will not follow the GNU Standards.  GNU packages should always
-distribute additional files such as `ChangeLog', `AUTHORS', etc.  We do
-not want `automake' to complain about these missing files in our small
-example.
-
-   The `AC_PROG_CC' line causes the `configure' script to search for a
-C compiler and define the variable `CC' with its name.  The
-`src/Makefile.in' file generated by Automake uses the variable `CC' to
-build `hello', so when `configure' creates `src/Makefile' from
-`src/Makefile.in', it will define `CC' with the value it has found.  If
-Automake is asked to create a `Makefile.in' that uses `CC' but
-`configure.ac' does not define it, it will suggest you add a call to
-`AC_PROG_CC'.
-
-   The `AC_CONFIG_HEADERS([config.h])' invocation causes the
-`configure' script to create a `config.h' file gathering `#define's
-defined by other macros in `configure.ac'.  In our case, the `AC_INIT'
-macro already defined a few of them.  Here is an excerpt of `config.h'
-after `configure' has run:
+*Automake* warnings here, such as dubious instructions in ‘Makefile.am’.
+This has absolutely nothing to do with how the compiler will be called,
+even though it may support options with similar names.  Using ‘-Wall
+-Werror’ is a safe setting when starting to work on a package: you do
+not want to miss any issues.  Later you may decide to relax things a
+bit.  The ‘foreign’ option tells Automake that this package will not
+follow the GNU Standards.  GNU packages should always distribute
+additional files such as ‘ChangeLog’, ‘AUTHORS’, etc.  We do not want
+‘automake’ to complain about these missing files in our small example.
+
+   The ‘AC_PROG_CC’ line causes the ‘configure’ script to search for a C
+compiler and define the variable ‘CC’ with its name.  The
+‘src/Makefile.in’ file generated by Automake uses the variable ‘CC’ to
+build ‘hello’, so when ‘configure’ creates ‘src/Makefile’ from
+‘src/Makefile.in’, it will define ‘CC’ with the value it has found.  If
+Automake is asked to create a ‘Makefile.in’ that uses ‘CC’ but
+‘configure.ac’ does not define it, it will suggest you add a call to
+‘AC_PROG_CC’.
+
+   The ‘AC_CONFIG_HEADERS([config.h])’ invocation causes the ‘configure’
+script to create a ‘config.h’ file gathering ‘#define’s defined by other
+macros in ‘configure.ac’.  In our case, the ‘AC_INIT’ macro already
+defined a few of them.  Here is an excerpt of ‘config.h’ after
+‘configure’ has run:
 
      ...
      /* Define to the address where bug reports for this package should be sent. */
@@ -1453,99 +1427,99 @@ after `configure' has run:
      #define PACKAGE_STRING "amhello 1.0"
      ...
 
-   As you probably noticed, `src/main.c' includes `config.h' so it can
-use `PACKAGE_STRING'.  In a real-world project, `config.h' can grow
-really big, with one `#define' per feature probed on the system.
+   As you probably noticed, ‘src/main.c’ includes ‘config.h’ so it can
+use ‘PACKAGE_STRING’.  In a real-world project, ‘config.h’ can grow
+really big, with one ‘#define’ per feature probed on the system.
 
-   The `AC_CONFIG_FILES' macro declares the list of files that
-`configure' should create from their `*.in' templates.  Automake also
-scans this list to find the `Makefile.am' files it must process.  (This
+   The ‘AC_CONFIG_FILES’ macro declares the list of files that
+‘configure’ should create from their ‘*.in’ templates.  Automake also
+scans this list to find the ‘Makefile.am’ files it must process.  (This
 is important to remember: when adding a new directory to your project,
-you should add its `Makefile' to this list, otherwise Automake will
-never process the new `Makefile.am' you wrote in that directory.)
+you should add its ‘Makefile’ to this list, otherwise Automake will
+never process the new ‘Makefile.am’ you wrote in that directory.)
 
-   Finally, the `AC_OUTPUT' line is a closing command that actually
+   Finally, the ‘AC_OUTPUT’ line is a closing command that actually
 produces the part of the script in charge of creating the files
-registered with `AC_CONFIG_HEADERS' and `AC_CONFIG_FILES'.
+registered with ‘AC_CONFIG_HEADERS’ and ‘AC_CONFIG_FILES’.
 
    When starting a new project, we suggest you start with such a simple
-`configure.ac', and gradually add the other tests it requires.  The
-command `autoscan' can also suggest a few of the tests your package may
-need (*note Using `autoscan' to Create `configure.ac':
+‘configure.ac’, and gradually add the other tests it requires.  The
+command ‘autoscan’ can also suggest a few of the tests your package may
+need (*note Using ‘autoscan’ to Create ‘configure.ac’:
 (autoconf)autoscan Invocation.).
 
 \1f
 File: automake.info,  Node: amhello's Makefile.am Setup Explained,  Prev: amhello's configure.ac Setup Explained,  Up: Hello World
 
-2.4.3 `amhello''s `Makefile.am' Setup Explained
+2.4.3 ‘amhello’’s ‘Makefile.am’ Setup Explained
 -----------------------------------------------
 
-We now turn to `src/Makefile.am'.  This file contains Automake
-instructions to build and install `hello'.
+We now turn to ‘src/Makefile.am’.  This file contains Automake
+instructions to build and install ‘hello’.
 
      bin_PROGRAMS = hello
      hello_SOURCES = main.c
 
-   A `Makefile.am' has the same syntax as an ordinary `Makefile'.  When
-`automake' processes a `Makefile.am' it copies the entire file into the
-output `Makefile.in' (that will be later turned into `Makefile' by
-`configure') but will react to certain variable definitions by
-generating some build rules and other variables.  Often `Makefile.am's
+   A ‘Makefile.am’ has the same syntax as an ordinary ‘Makefile’.  When
+‘automake’ processes a ‘Makefile.am’ it copies the entire file into the
+output ‘Makefile.in’ (that will be later turned into ‘Makefile’ by
+‘configure’) but will react to certain variable definitions by
+generating some build rules and other variables.  Often ‘Makefile.am’s
 contain only a list of variable definitions as above, but they can also
-contain other variable and rule definitions that `automake' will pass
+contain other variable and rule definitions that ‘automake’ will pass
 along without interpretation.
 
-   Variables that end with `_PROGRAMS' are special variables that list
-programs that the resulting `Makefile' should build.  In Automake
-speak, this `_PROGRAMS' suffix is called a "primary"; Automake
-recognizes other primaries such as `_SCRIPTS', `_DATA', `_LIBRARIES',
-etc. corresponding to different types of files.
+   Variables that end with ‘_PROGRAMS’ are special variables that list
+programs that the resulting ‘Makefile’ should build.  In Automake speak,
+this ‘_PROGRAMS’ suffix is called a “primary”; Automake recognizes other
+primaries such as ‘_SCRIPTS’, ‘_DATA’, ‘_LIBRARIES’, etc. corresponding
+to different types of files.
 
-   The `bin' part of the `bin_PROGRAMS' tells `automake' that the
+   The ‘bin’ part of the ‘bin_PROGRAMS’ tells ‘automake’ that the
 resulting programs should be installed in BINDIR.  Recall that the GNU
 Build System uses a set of variables to denote destination directories
 and allow users to customize these locations (*note Standard Directory
 Variables::).  Any such directory variable can be put in front of a
-primary (omitting the `dir' suffix) to tell `automake' where to install
+primary (omitting the ‘dir’ suffix) to tell ‘automake’ where to install
 the listed files.
 
    Programs need to be built from source files, so for each program
-`PROG' listed in a `_PROGRAMS' variable, `automake' will look for
-another variable named `PROG_SOURCES' listing its source files.  There
+‘PROG’ listed in a ‘_PROGRAMS’ variable, ‘automake’ will look for
+another variable named ‘PROG_SOURCES’ listing its source files.  There
 may be more than one source file: they will all be compiled and linked
 together.
 
    Automake also knows that source files need to be distributed when
 creating a tarball (unlike built programs).  So a side-effect of this
-`hello_SOURCES' declaration is that `main.c' will be part of the
-tarball created by `make dist'.
+‘hello_SOURCES’ declaration is that ‘main.c’ will be part of the tarball
+created by ‘make dist’.
 
    Finally here are some explanations regarding the top-level
-`Makefile.am'.
+‘Makefile.am’.
 
      SUBDIRS = src
      dist_doc_DATA = README
 
-   `SUBDIRS' is a special variable listing all directories that `make'
+   ‘SUBDIRS’ is a special variable listing all directories that ‘make’
 should recurse into before processing the current directory.  So this
-line is responsible for `make' building `src/hello' even though we run
-it from the top-level.  This line also causes `make install' to install
-`src/hello' before installing `README' (not that this order matters).
-
-   The line `dist_doc_DATA = README' causes `README' to be distributed
-and installed in DOCDIR.  Files listed with the `_DATA' primary are not
-automatically part of the tarball built with `make dist', so we add the
-`dist_' prefix so they get distributed.  However, for `README' it would
-not have been necessary: `automake' automatically distributes any
-`README' file it encounters (the list of other files automatically
-distributed is presented by `automake --help').  The only important
-effect of this second line is therefore to install `README' during
-`make install'.
+line is responsible for ‘make’ building ‘src/hello’ even though we run
+it from the top-level.  This line also causes ‘make install’ to install
+‘src/hello’ before installing ‘README’ (not that this order matters).
+
+   The line ‘dist_doc_DATA = README’ causes ‘README’ to be distributed
+and installed in DOCDIR.  Files listed with the ‘_DATA’ primary are not
+automatically part of the tarball built with ‘make dist’, so we add the
+‘dist_’ prefix so they get distributed.  However, for ‘README’ it would
+not have been necessary: ‘automake’ automatically distributes any
+‘README’ file it encounters (the list of other files automatically
+distributed is presented by ‘automake --help’).  The only important
+effect of this second line is therefore to install ‘README’ during ‘make
+install’.
 
    One thing not covered in this example is accessing the installation
 directory values (*note Standard Directory Variables::) from your
 program code, that is, converting them into defined macros.  For this,
-*note Defining Directories: (autoconf)Defining Directories.
+*note (autoconf)Defining Directories::.
 
 \1f
 File: automake.info,  Node: Generalities,  Next: Examples,  Prev: Autotools Introduction,  Up: Top
@@ -1572,74 +1546,73 @@ File: automake.info,  Node: General Operation,  Next: Strictness,  Up: Generalit
 3.1 General Operation
 =====================
 
-Automake works by reading a `Makefile.am' and generating a
-`Makefile.in'.  Certain variables and rules defined in the
-`Makefile.am' instruct Automake to generate more specialized code; for
-instance, a `bin_PROGRAMS' variable definition will cause rules for
-compiling and linking programs to be generated.
+Automake works by reading a ‘Makefile.am’ and generating a
+‘Makefile.in’.  Certain variables and rules defined in the ‘Makefile.am’
+instruct Automake to generate more specialized code; for instance, a
+‘bin_PROGRAMS’ variable definition will cause rules for compiling and
+linking programs to be generated.
 
-   The variable definitions and rules in the `Makefile.am' are copied
+   The variable definitions and rules in the ‘Makefile.am’ are copied
 mostly verbatim into the generated file, with all variable definitions
 preceding all rules.  This allows you to add almost arbitrary code into
-the generated `Makefile.in'.  For instance, the Automake distribution
-includes a non-standard rule for the `git-dist' target, which the
+the generated ‘Makefile.in’.  For instance, the Automake distribution
+includes a non-standard rule for the ‘git-dist’ target, which the
 Automake maintainer uses to make distributions from the source control
 system.
 
    Note that most GNU make extensions are not recognized by Automake.
-Using such extensions in a `Makefile.am' will lead to errors or
+Using such extensions in a ‘Makefile.am’ will lead to errors or
 confusing behavior.
 
-   A special exception is that the GNU make append operator, `+=', is
+   A special exception is that the GNU make append operator, ‘+=’, is
 supported.  This operator appends its right hand argument to the
 variable specified on the left.  Automake will translate the operator
-into an ordinary `=' operator; `+=' will thus work with any make
+into an ordinary ‘=’ operator; ‘+=’ will thus work with any make
 program.
 
    Automake tries to keep comments grouped with any adjoining rules or
 variable definitions.
 
    Generally, Automake is not particularly smart in the parsing of
-unusual Makefile constructs, so you're advised to avoid fancy
-constructs or "creative" use of whitespaces.  For example, <TAB>
-characters cannot be used between a target name and the following "`:'"
-character, and variable assignments shouldn't be indented with <TAB>
-characters.  Also, using more complex macro in target names can cause
-trouble:
+unusual Makefile constructs, so you’re advised to avoid fancy constructs
+or “creative” use of whitespace.  For example, <TAB> characters cannot
+be used between a target name and the following “‘:’” character, and
+variable assignments shouldn’t be indented with <TAB> characters.  Also,
+using more complex macro in target names can cause trouble:
 
      % cat Makefile.am
      $(FOO:=x): bar
      % automake
-     Makefile.am:1: bad characters in variable name `$(FOO'
-     Makefile.am:1: `:='-style assignments are not portable
+     Makefile.am:1: bad characters in variable name '$(FOO'
+     Makefile.am:1: ':='-style assignments are not portable
 
-   A rule defined in `Makefile.am' generally overrides any such rule of
-a similar name that would be automatically generated by `automake'.
+   A rule defined in ‘Makefile.am’ generally overrides any such rule of
+a similar name that would be automatically generated by ‘automake’.
 Although this is a supported feature, it is generally best to avoid
 making use of it, as sometimes the generated rules are very particular.
 
-   Similarly, a variable defined in `Makefile.am' or `AC_SUBST'ed from
-`configure.ac' will override any definition of the variable that
-`automake' would ordinarily create.  This feature is more often useful
+   Similarly, a variable defined in ‘Makefile.am’ or ‘AC_SUBST’ed from
+‘configure.ac’ will override any definition of the variable that
+‘automake’ would ordinarily create.  This feature is more often useful
 than the ability to override a rule.  Be warned that many of the
-variables generated by `automake' are considered to be for internal use
+variables generated by ‘automake’ are considered to be for internal use
 only, and their names might change in future releases.
 
    When examining a variable definition, Automake will recursively
 examine variables referenced in the definition.  For example, if
-Automake is looking at the content of `foo_SOURCES' in this snippet
+Automake is looking at the content of ‘foo_SOURCES’ in this snippet
 
      xs = a.c b.c
      foo_SOURCES = c.c $(xs)
 
-   it would use the files `a.c', `b.c', and `c.c' as the contents of
-`foo_SOURCES'.
+   it would use the files ‘a.c’, ‘b.c’, and ‘c.c’ as the contents of
+‘foo_SOURCES’.
 
    Automake also allows a form of comment that is _not_ copied into the
-output; all lines beginning with `##' (leading spaces allowed) are
+output; all lines beginning with ‘##’ (leading spaces allowed) are
 completely ignored by Automake.
 
-   It is customary to make the first line of `Makefile.am' read:
+   It is customary to make the first line of ‘Makefile.am’ read:
 
      ## Process this file with automake to produce Makefile.in
 
@@ -1653,29 +1626,29 @@ While Automake is intended to be used by maintainers of GNU packages, it
 does make some effort to accommodate those who wish to use it, but do
 not want to use all the GNU conventions.
 
-   To this end, Automake supports three levels of "strictness"--the
+   To this end, Automake supports three levels of “strictness”—the
 strictness indicating how stringently Automake should check standards
 conformance.
 
    The valid strictness levels are:
 
-`foreign'
+‘foreign’
      Automake will check for only those things that are absolutely
      required for proper operations.  For instance, whereas GNU
-     standards dictate the existence of a `NEWS' file, it will not be
+     standards dictate the existence of a ‘NEWS’ file, it will not be
      required in this mode.  This strictness will also turn off some
      warnings by default (among them, portability warnings).  The name
      comes from the fact that Automake is intended to be used for GNU
      programs; these relaxed rules are not the standard mode of
      operation.
 
-`gnu'
-     Automake will check--as much as possible--for compliance to the GNU
+‘gnu’
+     Automake will check—as much as possible—for compliance to the GNU
      standards for packages.  This is the default.
 
-`gnits'
-     Automake will check for compliance to the as-yet-unwritten "Gnits
-     standards".  These are based on the GNU standards, but are even
+‘gnits’
+     Automake will check for compliance to the as-yet-unwritten Gnits
+     standards.  These are based on the GNU standards, but are even
      more detailed.  Unless you are a Gnits standards contributor, it is
      recommended that you avoid this option until such time as the Gnits
      standard is actually published (which may never happen).
@@ -1683,81 +1656,71 @@ conformance.
    *Note Gnits::, for more information on the precise implications of
 the strictness level.
 
-   Automake also has a special (and _today deprecated_) "cygnus" mode
-that is similar to strictness but handled differently.  This mode is
-useful for packages that are put into a "Cygnus" style tree (e.g., older
-versions of the GCC and gdb trees).  *Note Cygnus::, for more
-information on this mode.  Please note that this mode _is deprecated
-and will be removed in the next major Automake release (1.13)_; you
-must avoid its use in new packages, and should stop using it in
-existing packages as well.
-
 \1f
 File: automake.info,  Node: Uniform,  Next: Length Limitations,  Prev: Strictness,  Up: Generalities
 
 3.3 The Uniform Naming Scheme
 =============================
 
-Automake variables generally follow a "uniform naming scheme" that
-makes it easy to decide how programs (and other derived objects) are
-built, and how they are installed.  This scheme also supports
-`configure' time determination of what should be built.
+Automake variables generally follow a “uniform naming scheme” that makes
+it easy to decide how programs (and other derived objects) are built,
+and how they are installed.  This scheme also supports ‘configure’ time
+determination of what should be built.
 
-   At `make' time, certain variables are used to determine which
-objects are to be built.  The variable names are made of several pieces
-that are concatenated together.
+   At ‘make’ time, certain variables are used to determine which objects
+are to be built.  The variable names are made of several pieces that are
+concatenated together.
 
-   The piece that tells `automake' what is being built is commonly
-called the "primary".  For instance, the primary `PROGRAMS' holds a
-list of programs that are to be compiled and linked.  
+   The piece that tells ‘automake’ what is being built is commonly
+called the “primary”.  For instance, the primary ‘PROGRAMS’ holds a list
+of programs that are to be compiled and linked.
 
    A different set of names is used to decide where the built objects
 should be installed.  These names are prefixes to the primary, and they
 indicate which standard directory should be used as the installation
 directory.  The standard directory names are given in the GNU standards
-(*note Directory Variables: (standards)Directory Variables.).  Automake
-extends this list with `pkgdatadir', `pkgincludedir', `pkglibdir', and
-`pkglibexecdir'; these are the same as the non-`pkg' versions, but with
-`$(PACKAGE)' appended.  For instance, `pkglibdir' is defined as
-`$(libdir)/$(PACKAGE)'.
+(*note (standards)Directory Variables::).  Automake extends this list
+with ‘pkgdatadir’, ‘pkgincludedir’, ‘pkglibdir’, and ‘pkglibexecdir’;
+these are the same as the non-‘pkg’ versions, but with ‘$(PACKAGE)’
+appended.  For instance, ‘pkglibdir’ is defined as
+‘$(libdir)/$(PACKAGE)’.
 
    For each primary, there is one additional variable named by
-prepending `EXTRA_' to the primary name.  This variable is used to list
-objects that may or may not be built, depending on what `configure'
+prepending ‘EXTRA_’ to the primary name.  This variable is used to list
+objects that may or may not be built, depending on what ‘configure’
 decides.  This variable is required because Automake must statically
-know the entire list of objects that may be built in order to generate
-a `Makefile.in' that will work in all cases.
+know the entire list of objects that may be built in order to generate a
+‘Makefile.in’ that will work in all cases.
 
-   For instance, `cpio' decides at configure time which programs should
-be built.  Some of the programs are installed in `bindir', and some are
-installed in `sbindir':
+   For instance, ‘cpio’ decides at configure time which programs should
+be built.  Some of the programs are installed in ‘bindir’, and some are
+installed in ‘sbindir’:
 
      EXTRA_PROGRAMS = mt rmt
      bin_PROGRAMS = cpio pax
      sbin_PROGRAMS = $(MORE_PROGRAMS)
 
-   Defining a primary without a prefix as a variable, e.g., `PROGRAMS',
+   Defining a primary without a prefix as a variable, e.g., ‘PROGRAMS’,
 is an error.
 
-   Note that the common `dir' suffix is left off when constructing the
-variable names; thus one writes `bin_PROGRAMS' and not
-`bindir_PROGRAMS'.
+   Note that the common ‘dir’ suffix is left off when constructing the
+variable names; thus one writes ‘bin_PROGRAMS’ and not
+‘bindir_PROGRAMS’.
 
    Not every sort of object can be installed in every directory.
 Automake will flag those attempts it finds in error (but see below how
 to override the check if you really need to).  Automake will also
 diagnose obvious misspellings in directory names.
 
-   Sometimes the standard directories--even as augmented by
-Automake--are not enough.  In particular it is sometimes useful, for
-clarity, to install objects in a subdirectory of some predefined
-directory.  To this end, Automake allows you to extend the list of
-possible installation directories.  A given prefix (e.g., `zar') is
-valid if a variable of the same name with `dir' appended is defined
-(e.g., `zardir').
+   Sometimes the standard directories—even as augmented by Automake—are
+not enough.  In particular it is sometimes useful, for clarity, to
+install objects in a subdirectory of some predefined directory.  To this
+end, Automake allows you to extend the list of possible installation
+directories.  A given prefix (e.g., ‘zar’) is valid if a variable of the
+same name with ‘dir’ appended is defined (e.g., ‘zardir’).
 
-   For instance, the following snippet will install `file.xml' into
-`$(datadir)/xml'.
+   For instance, the following snippet will install ‘file.xml’ into
+‘$(datadir)/xml’.
 
      xmldir = $(datadir)/xml
      xml_DATA = file.xml
@@ -1765,7 +1728,7 @@ valid if a variable of the same name with `dir' appended is defined
    This feature can also be used to override the sanity checks Automake
 performs to diagnose suspicious directory/primary couples (in the
 unlikely case these checks are undesirable, and you really know what
-you're doing).  For example, Automake would error out on this input:
+youre doing).  For example, Automake would error out on this input:
 
      # Forbidden directory combinations, automake will error out on this.
      pkglib_PROGRAMS = foo
@@ -1780,25 +1743,25 @@ but it will succeed with this:
      my_execbin_PROGRAMS = foo
      my_doclib_LIBRARIES = libquux.a
 
-   The `exec' substring of the `my_execbindir' variable lets the files
+   The ‘exec’ substring of the ‘my_execbindir’ variable lets the files
 be installed at the right time (*note The Two Parts of Install::).
 
-   The special prefix `noinst_' indicates that the objects in question
+   The special prefix ‘noinst_’ indicates that the objects in question
 should be built but not installed at all.  This is usually used for
 objects required to build the rest of your package, for instance static
 libraries (*note A Library::), or helper scripts.
 
-   The special prefix `check_' indicates that the objects in question
-should not be built until the `make check' command is run.  Those
+   The special prefix ‘check_’ indicates that the objects in question
+should not be built until the ‘make check’ command is run.  Those
 objects are not installed either.
 
-   The current primary names are `PROGRAMS', `LIBRARIES',
-`LTLIBRARIES', `LISP', `PYTHON', `JAVA', `SCRIPTS', `DATA', `HEADERS',
-`MANS', and `TEXINFOS'.  
+   The current primary names are ‘PROGRAMS’, ‘LIBRARIES’, ‘LTLIBRARIES’,
+‘LISP’, ‘PYTHON’, ‘JAVA’, ‘SCRIPTS’, ‘DATA’, ‘HEADERS’, ‘MANS’, and
+‘TEXINFOS’.
 
    Some primaries also allow additional prefixes that control other
-aspects of `automake''s behavior.  The currently defined prefixes are
-`dist_', `nodist_', `nobase_', and `notrans_'.  These prefixes are
+aspects of ‘automake’’s behavior.  The currently defined prefixes are
+‘dist_’, ‘nodist_’, ‘nobase_’, and ‘notrans_’.  These prefixes are
 explained later (*note Program and Library Variables::) (*note Man
 Pages::).
 
@@ -1811,8 +1774,8 @@ File: automake.info,  Node: Length Limitations,  Next: Canonicalization,  Prev:
 Traditionally, most unix-like systems have a length limitation for the
 command line arguments and environment contents when creating new
 processes (see for example
-`http://www.in-ulm.de/~mascheck/various/argmax/' for an overview on
-this issue), which of course also applies to commands spawned by `make'.
+<http://www.in-ulm.de/~mascheck/various/argmax/> for an overview on this
+issue), which of course also applies to commands spawned by ‘make’.
 POSIX requires this limit to be at least 4096 bytes, and most modern
 systems have quite high limits (or are unlimited).
 
@@ -1831,23 +1794,23 @@ may also be written as
      data2dir = $(datadir)
      data2_DATA = fileN+1 ... file2N
 
-and will cause Automake to treat the two lists separately during `make
-install'.  See *note The Two Parts of Install:: for choosing directory
+and will cause Automake to treat the two lists separately during make
+install.  See *note The Two Parts of Install:: for choosing directory
 names that will keep the ordering of the two parts of installation Note
-that `make dist' may still only work on a host with a higher length
+that ‘make dist’ may still only work on a host with a higher length
 limit in this example.
 
    Automake itself employs a couple of strategies to avoid long command
-lines.  For example, when `${srcdir}/' is prepended to file names, as
-can happen with above `$(data_DATA)' lists, it limits the amount of
+lines.  For example, when ‘${srcdir}/’ is prepended to file names, as
+can happen with above ‘$(data_DATA)’ lists, it limits the amount of
 arguments passed to external commands.
 
-   Unfortunately, some system's `make' commands may prepend `VPATH'
-prefixes like `${srcdir}/' to file names from the source tree
+   Unfortunately, some system’s ‘make’ commands may prepend ‘VPATH’
+prefixes like ‘${srcdir}/’ to file names from the source tree
 automatically (*note Automatic Rule Rewriting: (autoconf)Automatic Rule
-Rewriting.).  In this case, the user may have to switch to use GNU
-Make, or refrain from using VPATH builds, in order to stay below the
-length limit.
+Rewriting.).  In this case, the user may have to switch to use GNU Make,
+or refrain from using VPATH builds, in order to stay below the length
+limit.
 
    For libraries and programs built from many sources, convenience
 archives may be used as intermediates in order to limit the object list
@@ -1860,21 +1823,21 @@ File: automake.info,  Node: Canonicalization,  Next: User Variables,  Prev: Leng
 ===================================
 
 Sometimes a Makefile variable name is derived from some text the
-maintainer supplies.  For instance, a program name listed in
-`_PROGRAMS' is rewritten into the name of a `_SOURCES' variable.  In
-cases like this, Automake canonicalizes the text, so that program names
-and the like do not have to follow Makefile variable naming rules.  All
-characters in the name except for letters, numbers, the strudel (@),
-and the underscore are turned into underscores when making variable
+maintainer supplies.  For instance, a program name listed in ‘_PROGRAMS’
+is rewritten into the name of a ‘_SOURCES’ variable.  In cases like
+this, Automake canonicalizes the text, so that program names and the
+like do not have to follow Makefile variable naming rules.  All
+characters in the name except for letters, numbers, the strudel (@), and
+the underscore are turned into underscores when making variable
 references.
 
-   For example, if your program is named `sniff-glue', the derived
-variable name would be `sniff_glue_SOURCES', not `sniff-glue_SOURCES'.
-Similarly the sources for a library named `libmumble++.a' should be
-listed in the `libmumble___a_SOURCES' variable.
+   For example, if your program is named ‘sniff-glue’, the derived
+variable name would be ‘sniff_glue_SOURCES’, not ‘sniff-glue_SOURCES’.
+Similarly the sources for a library named ‘libmumble++.a’ should be
+listed in the ‘libmumble___a_SOURCES’ variable.
 
-   The strudel is an addition, to make the use of Autoconf
-substitutions in variable names less obfuscating.
+   The strudel is an addition, to make the use of Autoconf substitutions
+in variable names less obfuscating.
 
 \1f
 File: automake.info,  Node: User Variables,  Next: Auxiliary Programs,  Prev: Canonicalization,  Up: Generalities
@@ -1882,12 +1845,12 @@ File: automake.info,  Node: User Variables,  Next: Auxiliary Programs,  Prev: Ca
 3.6 Variables reserved for the user
 ===================================
 
-Some `Makefile' variables are reserved by the GNU Coding Standards for
-the use of the "user"--the person building the package.  For instance,
-`CFLAGS' is one such variable.
+Some ‘Makefile’ variables are reserved by the GNU Coding Standards for
+the use of the “user”—the person building the package.  For instance,
+‘CFLAGS’ is one such variable.
 
    Sometimes package developers are tempted to set user variables such
-as `CFLAGS' because it appears to make their job easier.  However, the
+as ‘CFLAGS’ because it appears to make their job easier.  However, the
 package itself should never set a user variable, particularly not to
 include switches that are required for proper compilation of the
 package.  Since these variables are documented as being for the package
@@ -1896,11 +1859,11 @@ these variables at build time.
 
    To get around this problem, Automake introduces an automake-specific
 shadow variable for each user flag variable.  (Shadow variables are not
-introduced for variables like `CC', where they would make no sense.)
-The shadow variable is named by prepending `AM_' to the user variable's
-name.  For instance, the shadow variable for `YFLAGS' is `AM_YFLAGS'.
-The package maintainer--that is, the author(s) of the `Makefile.am' and
-`configure.ac' files--may adjust these shadow variables however
+introduced for variables like ‘CC’, where they would make no sense.)
+The shadow variable is named by prepending ‘AM_’ to the user variable’s
+name.  For instance, the shadow variable for ‘YFLAGS’ is ‘AM_YFLAGS’.
+The package maintainer—that is, the author(s) of the ‘Makefile.am’ and
+‘configure.ac’ files—may adjust these shadow variables however
 necessary.
 
    *Note Flag Variables Ordering::, for more discussion about these
@@ -1913,91 +1876,86 @@ File: automake.info,  Node: Auxiliary Programs,  Prev: User Variables,  Up: Gene
 ===================================
 
 Automake sometimes requires helper programs so that the generated
-`Makefile' can do its work properly.  There are a fairly large number
-of them, and we list them here.
+‘Makefile’ can do its work properly.  There are a fairly large number of
+them, and we list them here.
 
    Although all of these files are distributed and installed with
 Automake, a couple of them are maintained separately.  The Automake
 copies are updated before each release, but we mention the original
 source in case you need more recent versions.
 
-`ar-lib'
+‘ar-lib’
      This is a wrapper primarily for the Microsoft lib archiver, to make
      it more POSIX-like.
 
-`compile'
-     This is a wrapper for compilers that do not accept options `-c'
-     and `-o' at the same time.  It is only used when absolutely
-     required.  Such compilers are rare, with the Microsoft C/C++
-     Compiler as the most notable exception. This wrapper also makes
-     the following common options available for that compiler, while
-     performing file name translation where needed: `-I', `-L', `-l',
-     `-Wl,' and `-Xlinker'.
-
-`config.guess'
-`config.sub'
+‘compile’
+     This is a wrapper for compilers that do not accept options ‘-c’ and
+     ‘-o’ at the same time.  It is only used when absolutely required.
+     Such compilers are rare, with the Microsoft C/C++ Compiler as the
+     most notable exception.  This wrapper also makes the following
+     common options available for that compiler, while performing file
+     name translation where needed: ‘-I’, ‘-L’, ‘-l’, ‘-Wl,’ and
+     ‘-Xlinker’.
+
+‘config.guess’
+‘config.sub’
      These two programs compute the canonical triplets for the given
      build, host, or target architecture.  These programs are updated
      regularly to support new architectures and fix probes broken by
-     changes in new kernel versions.  Each new release of Automake
-     comes with up-to-date copies of these programs.  If your copy of
-     Automake is getting old, you are encouraged to fetch the latest
-     versions of these files from
-     `http://savannah.gnu.org/git/?group=config' before making a
-     release.
-
-`depcomp'
+     changes in new kernel versions.  Each new release of Automake comes
+     with up-to-date copies of these programs.  If your copy of Automake
+     is getting old, you are encouraged to fetch the latest versions of
+     these files from <http://savannah.gnu.org/git/?group=config> before
+     making a release.
+
+‘depcomp’
      This program understands how to run a compiler so that it will
      generate not only the desired output but also dependency
      information that is then used by the automatic dependency tracking
      feature (*note Dependencies::).
 
-`elisp-comp'
-     This program is used to byte-compile Emacs Lisp code.
-
-`install-sh'
-     This is a replacement for the `install' program that works on
-     platforms where `install' is unavailable or unusable.
+‘install-sh’
+     This is a replacement for the ‘install’ program that works on
+     platforms where ‘install’ is unavailable or unusable.
 
-`mdate-sh'
-     This script is used to generate a `version.texi' file.  It examines
+‘mdate-sh’
+     This script is used to generate a ‘version.texi’ file.  It examines
      a file and prints some date information about it.
 
-`missing'
+‘missing’
      This wraps a number of programs that are typically only required by
-     maintainers.  If the program in question doesn't exist, `missing'
-     prints an informative warning and attempts to fix things so that
-     the build can continue.
-
-`mkinstalldirs'
-     This script used to be a wrapper around `mkdir -p', which is not
-     portable.  Now we prefer to use `install-sh -d' when `configure'
-     finds that `mkdir -p' does not work, this makes one less script to
+     maintainers.  If the program in question doesn’t exist, or seems to
+     old, ‘missing’ will print an informative warning before failing
+     out, to provide the user with more context and information.
+
+‘mkinstalldirs’
+     This script used to be a wrapper around ‘mkdir -p’, which is not
+     portable.  Now we prefer to use ‘install-sh -d’ when ‘configure’
+     finds that ‘mkdir -p’ does not work, this makes one less script to
      distribute.
 
-     For backward compatibility `mkinstalldirs' is still used and
-     distributed when `automake' finds it in a package.  But it is no
+     For backward compatibility ‘mkinstalldirs’ is still used and
+     distributed when ‘automake’ finds it in a package.  But it is no
      longer installed automatically, and it should be safe to remove it.
 
-`py-compile'
+‘py-compile’
      This is used to byte-compile Python scripts.
 
-`test-driver'
+‘test-driver’
      This implements the default test driver offered by the parallel
      testsuite harness.
 
-`texinfo.tex'
-     Not a program, this file is required for `make dvi', `make ps' and
-     `make pdf' to work when Texinfo sources are in the package.  The
+‘texinfo.tex’
+     Not a program, this file is required for ‘make dvi’, ‘make ps’ and
+     ‘make pdf’ to work when Texinfo sources are in the package.  The
      latest version can be downloaded from
-     `http://www.gnu.org/software/texinfo/'.
+     <http://www.gnu.org/software/texinfo/>.
 
-`ylwrap'
-     This program wraps `lex' and `yacc' to rename their output files.
-     It also ensures that, for instance, multiple `yacc' instances can
+‘ylwrap’
+     This program wraps ‘lex’ and ‘yacc’ to rename their output files.
+     It also ensures that, for instance, multiple ‘yacc’ instances can
      be invoked in a single directory in parallel.
 
-
 \1f
 File: automake.info,  Node: Examples,  Next: automake Invocation,  Prev: Generalities,  Up: Top
 
@@ -2007,15 +1965,14 @@ File: automake.info,  Node: Examples,  Next: automake Invocation,  Prev: General
 This section contains two small examples.
 
    The first example (*note Complete::) assumes you have an existing
-project already using Autoconf, with handcrafted `Makefile's, and that
+project already using Autoconf, with handcrafted ‘Makefile’s, and that
 you want to convert it to using Automake.  If you are discovering both
 tools, it is probably better that you look at the Hello World example
 presented earlier (*note Hello World::).
 
    The second example (*note true::) shows how two programs can be built
-from the same file, using different compilation parameters.  It
-contains some technical digressions that are probably best skipped on
-first read.
+from the same file, using different compilation parameters.  It contains
+some technical digressions that are probably best skipped on first read.
 
 * Menu:
 
@@ -2028,41 +1985,40 @@ File: automake.info,  Node: Complete,  Next: true,  Up: Examples
 4.1 A simple example, start to finish
 =====================================
 
-Let's suppose you just finished writing `zardoz', a program to make
-your head float from vortex to vortex.  You've been using Autoconf to
-provide a portability framework, but your `Makefile.in's have been
-ad-hoc.  You want to make them bulletproof, so you turn to Automake.
+Let’s suppose you just finished writing ‘zardoz’, a program to make your
+head float from vortex to vortex.  You’ve been using Autoconf to provide
+a portability framework, but your ‘Makefile.in’s have been ad-hoc.  You
+want to make them bulletproof, so you turn to Automake.
 
-   The first step is to update your `configure.ac' to include the
-commands that `automake' needs.  The way to do this is to add an
-`AM_INIT_AUTOMAKE' call just after `AC_INIT':
+   The first step is to update your ‘configure.ac’ to include the
+commands that ‘automake’ needs.  The way to do this is to add an
+‘AM_INIT_AUTOMAKE’ call just after ‘AC_INIT’:
 
      AC_INIT([zardoz], [1.0])
      AM_INIT_AUTOMAKE
      ...
 
-   Since your program doesn't have any complicating factors (e.g., it
-doesn't use `gettext', it doesn't want to build a shared library),
-you're done with this part.  That was easy!
+   Since your program doesnt have any complicating factors (e.g., it
+doesn’t use ‘gettext’, it doesn’t want to build a shared library),
+youre done with this part.  That was easy!
 
-   Now you must regenerate `configure'.  But to do that, you'll need to
-tell `autoconf' how to find the new macro you've used.  The easiest way
-to do this is to use the `aclocal' program to generate your
-`aclocal.m4' for you.  But wait... maybe you already have an
-`aclocal.m4', because you had to write some hairy macros for your
-program.  The `aclocal' program lets you put your own macros into
-`acinclude.m4', so simply rename and then run:
+   Now you must regenerate ‘configure’.  But to do that, you’ll need to
+tell ‘autoconf’ how to find the new macro you’ve used.  The easiest way
+to do this is to use the ‘aclocal’ program to generate your ‘aclocal.m4’
+for you.  But wait... maybe you already have an ‘aclocal.m4’, because
+you had to write some hairy macros for your program.  The ‘aclocal’
+program lets you put your own macros into ‘acinclude.m4’, so simply
+rename and then run:
 
      mv aclocal.m4 acinclude.m4
      aclocal
      autoconf
 
-   Now it is time to write your `Makefile.am' for `zardoz'.  Since
-`zardoz' is a user program, you want to install it where the rest of
-the user programs go: `bindir'.  Additionally, `zardoz' has some
-Texinfo documentation.  Your `configure.ac' script uses
-`AC_REPLACE_FUNCS', so you need to link against `$(LIBOBJS)'.  So
-here's what you'd write:
+   Now it is time to write your ‘Makefile.am’ for ‘zardoz’.  Since
+‘zardoz’ is a user program, you want to install it where the rest of the
+user programs go: ‘bindir’.  Additionally, ‘zardoz’ has some Texinfo
+documentation.  Your ‘configure.ac’ script uses ‘AC_REPLACE_FUNCS’, so
+you need to link against ‘$(LIBOBJS)’.  So here’s what you’d write:
 
      bin_PROGRAMS = zardoz
      zardoz_SOURCES = main.c head.c float.c vortex9.c gun.c
@@ -2070,8 +2026,8 @@ here's what you'd write:
 
      info_TEXINFOS = zardoz.texi
 
-   Now you can run `automake --add-missing' to generate your
-`Makefile.in' and grab any auxiliary files you might need, and you're
+   Now you can run ‘automake --add-missing’ to generate your
+‘Makefile.in’ and grab any auxiliary files you might need, and you’re
 done!
 
 \1f
@@ -2081,9 +2037,9 @@ File: automake.info,  Node: true,  Prev: Complete,  Up: Examples
 ===========================
 
 Here is another, trickier example.  It shows how to generate two
-programs (`true' and `false') from the same source file (`true.c').
-The difficult part is that each compilation of `true.c' requires
-different `cpp' flags.
+programs (‘true’ and ‘false’) from the same source file (‘true.c’).  The
+difficult part is that each compilation of ‘true.c’ requires different
+‘cpp’ flags.
 
      bin_PROGRAMS = true false
      false_SOURCES =
@@ -2095,22 +2051,22 @@ different `cpp' flags.
      false.o: true.c
              $(COMPILE) -DEXIT_CODE=1 -o false.o -c true.c
 
-   Note that there is no `true_SOURCES' definition.  Automake will
-implicitly assume that there is a source file named `true.c' (*note
-Default _SOURCES::), and define rules to compile `true.o' and link
-`true'.  The `true.o: true.c' rule supplied by the above `Makefile.am',
-will override the Automake generated rule to build `true.o'.
+   Note that there is no ‘true_SOURCES’ definition.  Automake will
+implicitly assume that there is a source file named ‘true.c’ (*note
+Default _SOURCES::), and define rules to compile ‘true.o’ and link
+‘true’.  The ‘true.o: true.c’ rule supplied by the above ‘Makefile.am’,
+will override the Automake generated rule to build ‘true.o’.
 
-   `false_SOURCES' is defined to be empty--that way no implicit value
-is substituted.  Because we have not listed the source of `false', we
-have to tell Automake how to link the program.  This is the purpose of
-the `false_LDADD' line.  A `false_DEPENDENCIES' variable, holding the
-dependencies of the `false' target will be automatically generated by
-Automake from the content of `false_LDADD'.
+   ‘false_SOURCES’ is defined to be empty—that way no implicit value is
+substituted.  Because we have not listed the source of ‘false’, we have
+to tell Automake how to link the program.  This is the purpose of the
+‘false_LDADD’ line.  A ‘false_DEPENDENCIES’ variable, holding the
+dependencies of the ‘false’ target will be automatically generated by
+Automake from the content of ‘false_LDADD’.
 
-   The above rules won't work if your compiler doesn't accept both `-c'
-and `-o'.  The simplest fix for this is to introduce a bogus dependency
-(to avoid problems with a parallel `make'):
+   The above rules won’t work if your compiler doesn’t accept both ‘-c’
+and ‘-o’.  The simplest fix for this is to introduce a bogus dependency
+(to avoid problems with a parallel ‘make’):
 
      true.o: true.c false.o
              $(COMPILE) -DEXIT_CODE=0 -c true.c
@@ -2119,10 +2075,10 @@ and `-o'.  The simplest fix for this is to introduce a bogus dependency
              $(COMPILE) -DEXIT_CODE=1 -c true.c && mv true.o false.o
 
    As it turns out, there is also a much easier way to do this same
-task.  Some of the above technique is useful enough that we've kept the
-example in the manual.  However if you were to build `true' and `false'
-in real life, you would probably use per-program compilation flags,
-like so:
+task.  Some of the above technique is useful enough that weve kept the
+example in the manual.  However if you were to build ‘true’ and ‘false’
+in real life, you would probably use per-program compilation flags, like
+so:
 
      bin_PROGRAMS = false true
 
@@ -2132,222 +2088,204 @@ like so:
      true_SOURCES = true.c
      true_CPPFLAGS = -DEXIT_CODE=0
 
-   In this case Automake will cause `true.c' to be compiled twice, with
+   In this case Automake will cause ‘true.c’ to be compiled twice, with
 different flags.  In this instance, the names of the object files would
-be chosen by automake; they would be `false-true.o' and `true-true.o'.
+be chosen by automake; they would be ‘false-true.o’ and ‘true-true.o’.
 (The name of the object files rarely matters.)
 
 \1f
 File: automake.info,  Node: automake Invocation,  Next: configure,  Prev: Examples,  Up: Top
 
-5 Creating a `Makefile.in'
+5 Creating a ‘Makefile.in’
 **************************
 
-To create all the `Makefile.in's for a package, run the `automake'
-program in the top level directory, with no arguments.  `automake' will
-automatically find each appropriate `Makefile.am' (by scanning
-`configure.ac'; *note configure::) and generate the corresponding
-`Makefile.in'.  Note that `automake' has a rather simplistic view of
+To create all the ‘Makefile.in’s for a package, run the ‘automake’
+program in the top level directory, with no arguments.  ‘automake’ will
+automatically find each appropriate ‘Makefile.am’ (by scanning
+‘configure.ac’; *note configure::) and generate the corresponding
+‘Makefile.in’.  Note that ‘automake’ has a rather simplistic view of
 what constitutes a package; it assumes that a package has only one
-`configure.ac', at the top.  If your package has multiple
-`configure.ac's, then you must run `automake' in each directory holding
-a `configure.ac'.  (Alternatively, you may rely on Autoconf's
-`autoreconf', which is able to recurse your package tree and run
-`automake' where appropriate.)
-
-   You can optionally give `automake' an argument; `.am' is appended to
-the argument and the result is used as the name of the input file.
-This feature is generally only used to automatically rebuild an
-out-of-date `Makefile.in'.  Note that `automake' must always be run
-from the topmost directory of a project, even if being used to
-regenerate the `Makefile.in' in some subdirectory.  This is necessary
-because `automake' must scan `configure.ac', and because `automake'
-uses the knowledge that a `Makefile.in' is in a subdirectory to change
-its behavior in some cases.
-
-   Automake will run `autoconf' to scan `configure.ac' and its
-dependencies (i.e., `aclocal.m4' and any included file), therefore
-`autoconf' must be in your `PATH'.  If there is an `AUTOCONF' variable
-in your environment it will be used instead of `autoconf', this allows
-you to select a particular version of Autoconf.  By the way, don't
-misunderstand this paragraph: `automake' runs `autoconf' to *scan* your
-`configure.ac', this won't build `configure' and you still have to run
-`autoconf' yourself for this purpose.
-
-   `automake' accepts the following options:
-
-`-a'
-`--add-missing'
+‘configure.ac’, at the top.  If your package has multiple
+‘configure.ac’s, then you must run ‘automake’ in each directory holding
+a ‘configure.ac’.  (Alternatively, you may rely on Autoconf’s
+‘autoreconf’, which is able to recurse your package tree and run
+‘automake’ where appropriate.)
+
+   You can optionally give ‘automake’ an argument; ‘.am’ is appended to
+the argument and the result is used as the name of the input file.  This
+feature is generally only used to automatically rebuild an out-of-date
+‘Makefile.in’.  Note that ‘automake’ must always be run from the topmost
+directory of a project, even if being used to regenerate the
+‘Makefile.in’ in some subdirectory.  This is necessary because
+‘automake’ must scan ‘configure.ac’, and because ‘automake’ uses the
+knowledge that a ‘Makefile.in’ is in a subdirectory to change its
+behavior in some cases.
+
+   Automake will run ‘autoconf’ to scan ‘configure.ac’ and its
+dependencies (i.e., ‘aclocal.m4’ and any included file), therefore
+‘autoconf’ must be in your ‘PATH’.  If there is an ‘AUTOCONF’ variable
+in your environment it will be used instead of ‘autoconf’, this allows
+you to select a particular version of Autoconf.  By the way, dont
+misunderstand this paragraph: ‘automake’ runs ‘autoconf’ to *scan* your
+‘configure.ac’, this won’t build ‘configure’ and you still have to run
+‘autoconf’ yourself for this purpose.
+
+   ‘automake’ accepts the following options:
+
+‘-a’
+‘--add-missing’
      Automake requires certain common files to exist in certain
-     situations; for instance, `config.guess' is required if
-     `configure.ac' invokes `AC_CANONICAL_HOST'.  Automake is
+     situations; for instance, ‘config.guess’ is required if
+     ‘configure.ac’ invokes ‘AC_CANONICAL_HOST’.  Automake is
      distributed with several of these files (*note Auxiliary
      Programs::); this option will cause the missing ones to be
      automatically added to the package, whenever possible.  In general
-     if Automake tells you a file is missing, try using this option.
-     By default Automake tries to make a symbolic link pointing to its
-     own copy of the missing file; this can be changed with `--copy'.
+     if Automake tells you a file is missing, try using this option.  By
+     default Automake tries to make a symbolic link pointing to its own
+     copy of the missing file; this can be changed with ‘--copy’.
 
      Many of the potentially-missing files are common scripts whose
-     location may be specified via the `AC_CONFIG_AUX_DIR' macro.
-     Therefore, `AC_CONFIG_AUX_DIR''s setting affects whether a file is
+     location may be specified via the ‘AC_CONFIG_AUX_DIR’ macro.
+     Therefore, ‘AC_CONFIG_AUX_DIR’’s setting affects whether a file is
      considered missing, and where the missing file is added (*note
      Optional::).
 
-     In some strictness modes, additional files are installed, see
-     *note Gnits:: for more information.
+     In some strictness modes, additional files are installed, see *note
+     Gnits:: for more information.
 
-`--libdir=DIR'
+‘--libdir=DIR’
      Look for Automake data files in directory DIR instead of in the
      installation directory.  This is typically used for debugging.
 
-`--print-libdir'
+‘--print-libdir’
      Print the path of the installation directory containing
-     Automake-provided scripts and data files (like e.g.,
-     `texinfo.texi' and `install-sh').
+     Automake-provided scripts and data files (like e.g., ‘texinfo.texi’
+     and ‘install-sh’).
 
-`-c'
-`--copy'
-     When used with `--add-missing', causes installed files to be
+‘-c’
+‘--copy’
+     When used with ‘--add-missing’, causes installed files to be
      copied.  The default is to make a symbolic link.
 
-`--cygnus'
-     Causes the generated `Makefile.in's to follow Cygnus rules, instead
-     of GNU or Gnits rules.  For more information, see *note Cygnus::.
-     Note that _this mode of operation is deprecated, and will be
-     removed_ in the next major Automake release (1.13).
-
-`-f'
-`--force-missing'
-     When used with `--add-missing', causes standard files to be
+‘-f’
+‘--force-missing’
+     When used with ‘--add-missing’, causes standard files to be
      reinstalled even if they already exist in the source tree.  This
-     involves removing the file from the source tree before creating
-     the new symlink (or, with `--copy', copying the new file).
+     involves removing the file from the source tree before creating the
+     new symlink (or, with ‘--copy’, copying the new file).
 
-`--foreign'
-     Set the global strictness to `foreign'.  For more information, see
+‘--foreign’
+     Set the global strictness to ‘foreign’.  For more information, see
      *note Strictness::.
 
-`--gnits'
-     Set the global strictness to `gnits'.  For more information, see
+‘--gnits’
+     Set the global strictness to ‘gnits’.  For more information, see
      *note Gnits::.
 
-`--gnu'
-     Set the global strictness to `gnu'.  For more information, see
+‘--gnu’
+     Set the global strictness to ‘gnu’.  For more information, see
      *note Gnits::.  This is the default strictness.
 
-`--help'
+‘--help’
      Print a summary of the command line options and exit.
 
-`-i'
-`--ignore-deps'
+‘-i’
+‘--ignore-deps’
      This disables the dependency tracking feature in generated
-     `Makefile's; see *note Dependencies::.
+     ‘Makefile’s; see *note Dependencies::.
 
-`--include-deps'
+‘--include-deps’
      This enables the dependency tracking feature.  This feature is
-     enabled by default.  This option is provided for historical
-     reasons only and probably should not be used.
+     enabled by default.  This option is provided for historical reasons
+     only and probably should not be used.
 
-`--no-force'
-     Ordinarily `automake' creates all `Makefile.in's mentioned in
-     `configure.ac'.  This option causes it to only update those
-     `Makefile.in's that are out of date with respect to one of their
+‘--no-force’
+     Ordinarily ‘automake’ creates all ‘Makefile.in’s mentioned in
+     ‘configure.ac’.  This option causes it to only update those
+     ‘Makefile.in’s that are out of date with respect to one of their
      dependents.
 
-`-o DIR'
-`--output-dir=DIR'
-     Put the generated `Makefile.in' in the directory DIR.  Ordinarily
-     each `Makefile.in' is created in the directory of the
-     corresponding `Makefile.am'.  This option is deprecated and will be
-     removed in a future release.
+‘-o DIR’
+‘--output-dir=DIR’
+     Put the generated ‘Makefile.in’ in the directory DIR.  Ordinarily
+     each ‘Makefile.in’ is created in the directory of the corresponding
+     ‘Makefile.am’.  This option is deprecated and will be removed in a
+     future release.
 
-`-v'
-`--verbose'
+‘-v’
+‘--verbose’
      Cause Automake to print information about which files are being
      read or created.
 
-`--version'
+‘--version’
      Print the version number of Automake and exit.
 
-`-W CATEGORY'
-`--warnings=CATEGORY'
+‘-W CATEGORY’
+‘--warnings=CATEGORY’
      Output warnings falling in CATEGORY.  CATEGORY can be one of:
-    `gnu'
-          warnings related to the GNU Coding Standards (*note Top:
-          (standards)Top.).
-
-    `obsolete'
+     ‘gnu’
+          warnings related to the GNU Coding Standards (*note
+          (standards)Top::).
+     ‘obsolete’
           obsolete features or constructions
-
-    `override'
+     ‘override’
           user redefinitions of Automake rules or variables
-
-    `portability'
-          portability issues (e.g., use of `make' features that are
+     ‘portability’
+          portability issues (e.g., use of ‘make’ features that are
           known to be not portable)
-
-    `extra-portability'
+     ‘extra-portability’
           extra portability issues related to obscure tools.  One
-          example of such a tool is the Microsoft `lib' archiver.
-
-    `syntax'
+          example of such a tool is the Microsoft ‘lib’ archiver.
+     ‘syntax’
           weird syntax, unused variables, typos
-
-    `unsupported'
+     ‘unsupported’
           unsupported or incomplete features
-
-    `all'
+     ‘all’
           all the warnings
-
-    `none'
+     ‘none’
           turn off all the warnings
-
-    `error'
+     ‘error’
           treat warnings as errors
 
-     A category can be turned off by prefixing its name with `no-'.  For
-     instance, `-Wno-syntax' will hide the warnings about unused
+     A category can be turned off by prefixing its name with ‘no-’.  For
+     instance, ‘-Wno-syntax’ will hide the warnings about unused
      variables.
 
-     The categories output by default are `syntax' and `unsupported'.
-     Additionally, `gnu' and `portability' are enabled in `--gnu' and
-     `--gnits' strictness.  On the other hand, the `silent-rules'
-     options (*note Options::) turns off portability warnings about
-     recursive variable expansions.
-
-     Turning off `portability' will also turn off `extra-portability',
-     and similarly turning on `extra-portability' will also turn on
-     `portability'.  However, turning on `portability' or turning off
-     `extra-portability' will not affect the other category.
+     The categories output by default are ‘obsolete’, ‘syntax’ and
+     ‘unsupported’.  Additionally, ‘gnu’ and ‘portability’ are enabled
+     in ‘--gnu’ and ‘--gnits’ strictness.
 
-     The environment variable `WARNINGS' can contain a comma separated
-     list of categories to enable.  It will be taken into account
-     before the command-line switches, this way `-Wnone' will also
-     ignore any warning category enabled by `WARNINGS'.  This variable
-     is also used by other tools like `autoconf'; unknown categories
-     are ignored for this reason.
+     Turning off ‘portability’ will also turn off ‘extra-portability’,
+     and similarly turning on ‘extra-portability’ will also turn on
+     ‘portability’.  However, turning on ‘portability’ or turning off
+     ‘extra-portability’ will not affect the other category.
 
+     The environment variable ‘WARNINGS’ can contain a comma separated
+     list of categories to enable.  It will be taken into account before
+     the command-line switches, this way ‘-Wnone’ will also ignore any
+     warning category enabled by ‘WARNINGS’.  This variable is also used
+     by other tools like ‘autoconf’; unknown categories are ignored for
+     this reason.
 
-   If the environment variable `AUTOMAKE_JOBS' contains a positive
+   If the environment variable ‘AUTOMAKE_JOBS’ contains a positive
 number, it is taken as the maximum number of Perl threads to use in
-`automake' for generating multiple `Makefile.in' files concurrently.
+‘automake’ for generating multiple ‘Makefile.in’ files concurrently.
 This is an experimental feature.
 
 \1f
 File: automake.info,  Node: configure,  Next: Directories,  Prev: automake Invocation,  Up: Top
 
-6 Scanning `configure.ac', using `aclocal'
+6 Scanning ‘configure.ac’, using ‘aclocal’
 ******************************************
 
-Automake scans the package's `configure.ac' to determine certain
-information about the package.  Some `autoconf' macros are required and
-some variables must be defined in `configure.ac'.  Automake will also
-use information from `configure.ac' to further tailor its output.
+Automake scans the package’s ‘configure.ac’ to determine certain
+information about the package.  Some ‘autoconf’ macros are required and
+some variables must be defined in ‘configure.ac’.  Automake will also
+use information from ‘configure.ac’ to further tailor its output.
 
    Automake also supplies some Autoconf macros to make the maintenance
-easier.  These macros can automatically be put into your `aclocal.m4'
-using the `aclocal' program.
+easier.  These macros can automatically be put into your ‘aclocal.m4’
+using the ‘aclocal’ program.
 
 * Menu:
 
@@ -2362,17 +2300,17 @@ File: automake.info,  Node: Requirements,  Next: Optional,  Up: configure
 6.1 Configuration requirements
 ==============================
 
-The one real requirement of Automake is that your `configure.ac' call
-`AM_INIT_AUTOMAKE'.  This macro does several things that are required
+The one real requirement of Automake is that your ‘configure.ac’ call
+‘AM_INIT_AUTOMAKE’.  This macro does several things that are required
 for proper Automake operation (*note Macros::).
 
    Here are the other macros that Automake requires but which are not
-run by `AM_INIT_AUTOMAKE':
+run by ‘AM_INIT_AUTOMAKE’:
 
-`AC_CONFIG_FILES'
-`AC_OUTPUT'
+‘AC_CONFIG_FILES’
+‘AC_OUTPUT’
      These two macros are usually invoked as follows near the end of
-     `configure.ac'.
+     ‘configure.ac’.
 
           ...
           AC_CONFIG_FILES([
@@ -2386,41 +2324,41 @@ run by `AM_INIT_AUTOMAKE':
 
      Automake uses these to determine which files to create (*note
      Creating Output Files: (autoconf)Output.).  A listed file is
-     considered to be an Automake generated `Makefile' if there exists
-     a file with the same name and the `.am' extension appended.
-     Typically, `AC_CONFIG_FILES([foo/Makefile])' will cause Automake to
-     generate `foo/Makefile.in' if `foo/Makefile.am' exists.
+     considered to be an Automake generated ‘Makefile’ if there exists a
+     file with the same name and the ‘.am’ extension appended.
+     Typically, ‘AC_CONFIG_FILES([foo/Makefile])’ will cause Automake to
+     generate ‘foo/Makefile.in’ if ‘foo/Makefile.am’ exists.
 
-     When using `AC_CONFIG_FILES' with multiple input files, as in
+     When using ‘AC_CONFIG_FILES’ with multiple input files, as in
 
           AC_CONFIG_FILES([Makefile:top.in:Makefile.in:bot.in])
 
-     `automake' will generate the first `.in' input file for which a
-     `.am' file exists.  If no such file exists the output file is not
+     ‘automake’ will generate the first ‘.in’ input file for which a
+     ‘.am’ file exists.  If no such file exists the output file is not
      considered to be generated by Automake.
 
-     Files created by `AC_CONFIG_FILES', be they Automake `Makefile's
-     or not, are all removed by `make distclean'.  Their inputs are
+     Files created by ‘AC_CONFIG_FILES’, be they Automake ‘Makefile’s or
+     not, are all removed by ‘make distclean’.  Their inputs are
      automatically distributed, unless they are the output of prior
-     `AC_CONFIG_FILES' commands.  Finally, rebuild rules are generated
-     in the Automake `Makefile' existing in the subdirectory of the
-     output file, if there is one, or in the top-level `Makefile'
+     ‘AC_CONFIG_FILES’ commands.  Finally, rebuild rules are generated
+     in the Automake ‘Makefile’ existing in the subdirectory of the
+     output file, if there is one, or in the top-level ‘Makefile’
      otherwise.
 
      The above machinery (cleaning, distributing, and rebuilding) works
-     fine if the `AC_CONFIG_FILES' specifications contain only
-     literals.  If part of the specification uses shell variables,
-     `automake' will not be able to fulfill this setup, and you will
-     have to complete the missing bits by hand.  For instance, on
+     fine if the ‘AC_CONFIG_FILES’ specifications contain only literals.
+     If part of the specification uses shell variables, ‘automake’ will
+     not be able to fulfill this setup, and you will have to complete
+     the missing bits by hand.  For instance, on
 
           file=input
           ...
           AC_CONFIG_FILES([output:$file],, [file=$file])
 
-     `automake' will output rules to clean `output', and rebuild it.
-     However the rebuild rule will not depend on `input', and this file
-     will not be distributed either.  (You must add `EXTRA_DIST =
-     input' to your `Makefile.am' if `input' is a source file.)
+     ‘automake’ will output rules to clean ‘output’, and rebuild it.
+     However the rebuild rule will not depend on ‘input’, and this file
+     will not be distributed either.  (You must add ‘EXTRA_DIST = input’
+     to your ‘Makefile.am’ if ‘input’ is a source file.)
 
      Similarly
 
@@ -2430,19 +2368,19 @@ run by `AM_INIT_AUTOMAKE':
           AC_CONFIG_FILES([$file:input],, [file=$file])
           AC_CONFIG_FILES([$file2],, [file2=$file2])
 
-     will only cause `input' to be distributed.  No file will be
-     cleaned automatically (add `DISTCLEANFILES = output out'
-     yourself), and no rebuild rule will be output.
+     will only cause ‘input’ to be distributed.  No file will be cleaned
+     automatically (add ‘DISTCLEANFILES = output out’ yourself), and no
+     rebuild rule will be output.
 
-     Obviously `automake' cannot guess what value `$file' is going to
-     hold later when `configure' is run, and it cannot use the shell
-     variable `$file' in a `Makefile'.  However, if you make reference
-     to `$file' as `${file}' (i.e., in a way that is compatible with
-     `make''s syntax) and furthermore use `AC_SUBST' to ensure that
-     `${file}' is meaningful in a `Makefile', then `automake' will be
-     able to use `${file}' to generate all these rules.  For instance,
-     here is how the Automake package itself generates versioned
-     scripts for its test suite:
+     Obviously ‘automake’ cannot guess what value ‘$file’ is going to
+     hold later when ‘configure’ is run, and it cannot use the shell
+     variable ‘$file’ in a ‘Makefile’.  However, if you make reference
+     to ‘$file’ as ‘${file}’ (i.e., in a way that is compatible with
+     ‘make’’s syntax) and furthermore use ‘AC_SUBST’ to ensure that
+     ‘${file}’ is meaningful in a ‘Makefile’, then ‘automake’ will be
+     able to use ‘${file}’ to generate all of these rules.  For
+     instance, here is how the Automake package itself generates
+     versioned scripts for its test suite:
 
           AC_SUBST([APIVERSION], ...)
           ...
@@ -2455,29 +2393,26 @@ run by `AM_INIT_AUTOMAKE':
             [chmod +x tests/automake-${APIVERSION}])
 
      Here cleaning, distributing, and rebuilding are done automatically,
-     because `${APIVERSION}' is known at `make'-time.
+     because ‘${APIVERSION}’ is known at ‘make’-time.
 
-     Note that you should not use shell variables to declare `Makefile'
-     files for which `automake' must create `Makefile.in'.  Even
-     `AC_SUBST' does not help here, because `automake' needs to know
-     the file name when it runs in order to check whether `Makefile.am'
+     Note that you should not use shell variables to declare ‘Makefile’
+     files for which ‘automake’ must create ‘Makefile.in’.  Even
+     ‘AC_SUBST’ does not help here, because ‘automake’ needs to know the
+     file name when it runs in order to check whether ‘Makefile.am’
      exists.  (In the very hairy case that your setup requires such use
-     of variables, you will have to tell Automake which `Makefile.in's
+     of variables, you will have to tell Automake which ‘Makefile.in’s
      to generate on the command-line.)
 
-     It is possible to let `automake' emit conditional rules for
-     `AC_CONFIG_FILES' with the help of `AM_COND_IF' (*note Optional::).
+     It is possible to let ‘automake’ emit conditional rules for
+     ‘AC_CONFIG_FILES’ with the help of ‘AM_COND_IF’ (*note Optional::).
 
      To summarize:
-        * Use literals for `Makefile's, and for other files whenever
+        • Use literals for ‘Makefile’s, and for other files whenever
           possible.
-
-        * Use `$file' (or `${file}' without `AC_SUBST([file])') for
-          files that `automake' should ignore.
-
-        * Use `${file}' and `AC_SUBST([file])' for files that
-          `automake' should not ignore.
-
+        • Use ‘$file’ (or ‘${file}’ without ‘AC_SUBST([file])’) for
+          files that ‘automake’ should ignore.
+        • Use ‘${file}’ and ‘AC_SUBST([file])’ for files that ‘automake’
+          should not ignore.
 
 \1f
 File: automake.info,  Node: Optional,  Next: aclocal Invocation,  Prev: Requirements,  Up: configure
@@ -2485,202 +2420,200 @@ File: automake.info,  Node: Optional,  Next: aclocal Invocation,  Prev: Requirem
 6.2 Other things Automake recognizes
 ====================================
 
-Every time Automake is run it calls Autoconf to trace `configure.ac'.
+Every time Automake is run it calls Autoconf to trace ‘configure.ac’.
 This way it can recognize the use of certain macros and tailor the
-generated `Makefile.in' appropriately.  Currently recognized macros and
+generated ‘Makefile.in’ appropriately.  Currently recognized macros and
 their effects are:
 
-`AC_CANONICAL_BUILD'
-`AC_CANONICAL_HOST'
-`AC_CANONICAL_TARGET'
-     Automake will ensure that `config.guess' and `config.sub' exist.
-     Also, the `Makefile' variables `build_triplet', `host_triplet' and
-     `target_triplet' are introduced.  See *note Getting the Canonical
+‘AC_CANONICAL_BUILD’
+‘AC_CANONICAL_HOST’
+‘AC_CANONICAL_TARGET’
+     Automake will ensure that ‘config.guess’ and ‘config.sub’ exist.
+     Also, the ‘Makefile’ variables ‘build_triplet’, ‘host_triplet’ and
+     ‘target_triplet’ are introduced.  See *note Getting the Canonical
      System Type: (autoconf)Canonicalizing.
 
-`AC_CONFIG_AUX_DIR'
+‘AC_CONFIG_AUX_DIR’
      Automake will look for various helper scripts, such as
-     `install-sh', in the directory named in this macro invocation.
-     (The full list of scripts is: `ar-lib', `config.guess',
-     `config.sub', `depcomp', `elisp-comp', `compile', `install-sh',
-     `ltmain.sh', `mdate-sh', `missing', `mkinstalldirs', `py-compile',
-     `test-driver', `texinfo.tex', `ylwrap'.)  Not all scripts are
+     ‘install-sh’, in the directory named in this macro invocation.
+     (The full list of scripts is: ‘ar-lib’, ‘config.guess’,
+     ‘config.sub’, ‘depcomp’, ‘compile’, ‘install-sh’, ‘ltmain.sh’,
+     ‘mdate-sh’, ‘missing’, ‘mkinstalldirs’, ‘py-compile’,
+     ‘test-driver’, ‘texinfo.tex’, ‘ylwrap’.)  Not all scripts are
      always searched for; some scripts will only be sought if the
-     generated `Makefile.in' requires them.
-
-     If `AC_CONFIG_AUX_DIR' is not given, the scripts are looked for in
-     their standard locations.  For `mdate-sh', `texinfo.tex', and
-     `ylwrap', the standard location is the source directory
-     corresponding to the current `Makefile.am'.  For the rest, the
-     standard location is the first one of `.', `..', or `../..'
-     (relative to the top source directory) that provides any one of
-     the helper scripts.  *Note Finding `configure' Input:
-     (autoconf)Input.
-
-     Required files from `AC_CONFIG_AUX_DIR' are automatically
-     distributed, even if there is no `Makefile.am' in this directory.
-
-`AC_CONFIG_LIBOBJ_DIR'
-     Automake will require the sources file declared with
-     `AC_LIBSOURCE' (see below) in the directory specified by this
-     macro.
-
-`AC_CONFIG_HEADERS'
-     Automake will generate rules to rebuild these headers.  Older
-     versions of Automake required the use of `AM_CONFIG_HEADER' (*note
-     Macros::); this is no longer the case.
-
-     As with `AC_CONFIG_FILES' (*note Requirements::), parts of the
+     generated ‘Makefile.in’ requires them.
+
+     If ‘AC_CONFIG_AUX_DIR’ is not given, the scripts are looked for in
+     their standard locations.  For ‘mdate-sh’, ‘texinfo.tex’, and
+     ‘ylwrap’, the standard location is the source directory
+     corresponding to the current ‘Makefile.am’.  For the rest, the
+     standard location is the first one of ‘.’, ‘..’, or ‘../..’
+     (relative to the top source directory) that provides any one of the
+     helper scripts.  *Note Finding ‘configure’ Input: (autoconf)Input.
+
+     Required files from ‘AC_CONFIG_AUX_DIR’ are automatically
+     distributed, even if there is no ‘Makefile.am’ in this directory.
+
+‘AC_CONFIG_LIBOBJ_DIR’
+     Automake will require the sources file declared with ‘AC_LIBSOURCE’
+     (see below) in the directory specified by this macro.
+
+‘AC_CONFIG_HEADERS’
+     Automake will generate rules to rebuild these headers from the
+     corresponding templates (usually, the template for a ‘foo.h’ header
+     being ‘foo.h.in’).  Older versions of Automake required the use of
+     ‘AM_CONFIG_HEADER’; this is no longer the case, and that macro has
+     indeed been removed.
+
+     As with ‘AC_CONFIG_FILES’ (*note Requirements::), parts of the
      specification using shell variables will be ignored as far as
      cleaning, distributing, and rebuilding is concerned.
 
-`AC_CONFIG_LINKS'
-     Automake will generate rules to remove `configure' generated links
-     on `make distclean' and to distribute named source files as part
-     of `make dist'.
+‘AC_CONFIG_LINKS’
+     Automake will generate rules to remove ‘configure’ generated links
+     on ‘make distclean’ and to distribute named source files as part of
+     ‘make dist’.
 
-     As for `AC_CONFIG_FILES' (*note Requirements::), parts of the
+     As for ‘AC_CONFIG_FILES’ (*note Requirements::), parts of the
      specification using shell variables will be ignored as far as
      cleaning and distributing is concerned.  (There are no rebuild
      rules for links.)
 
-`AC_LIBOBJ'
-`AC_LIBSOURCE'
-`AC_LIBSOURCES'
+‘AC_LIBOBJ’
+‘AC_LIBSOURCE’
+‘AC_LIBSOURCES’
      Automake will automatically distribute any file listed in
-     `AC_LIBSOURCE' or `AC_LIBSOURCES'.
+     ‘AC_LIBSOURCE’ or ‘AC_LIBSOURCES’.
 
-     Note that the `AC_LIBOBJ' macro calls `AC_LIBSOURCE'.  So if an
-     Autoconf macro is documented to call `AC_LIBOBJ([file])', then
-     `file.c' will be distributed automatically by Automake.  This
-     encompasses many macros like `AC_FUNC_ALLOCA', `AC_FUNC_MEMCMP',
-     `AC_REPLACE_FUNCS', and others.
+     Note that the ‘AC_LIBOBJ’ macro calls ‘AC_LIBSOURCE’.  So if an
+     Autoconf macro is documented to call ‘AC_LIBOBJ([file])’, then
+     ‘file.c’ will be distributed automatically by Automake.  This
+     encompasses many macros like ‘AC_FUNC_ALLOCA’, ‘AC_FUNC_MEMCMP’,
+     ‘AC_REPLACE_FUNCS’, and others.
 
-     By the way, direct assignments to `LIBOBJS' are no longer
-     supported.  You should always use `AC_LIBOBJ' for this purpose.
-     *Note `AC_LIBOBJ' vs. `LIBOBJS': (autoconf)AC_LIBOBJ vs LIBOBJS.
+     By the way, direct assignments to ‘LIBOBJS’ are no longer
+     supported.  You should always use ‘AC_LIBOBJ’ for this purpose.
+     *Note ‘AC_LIBOBJ’ vs. ‘LIBOBJS’: (autoconf)AC_LIBOBJ vs LIBOBJS.
 
-`AC_PROG_RANLIB'
+‘AC_PROG_RANLIB’
      This is required if any libraries are built in the package.  *Note
      Particular Program Checks: (autoconf)Particular Programs.
 
-`AC_PROG_CXX'
+‘AC_PROG_CXX’
      This is required if any C++ source is included.  *Note Particular
      Program Checks: (autoconf)Particular Programs.
 
-`AC_PROG_OBJC'
+‘AC_PROG_OBJC’
      This is required if any Objective C source is included.  *Note
      Particular Program Checks: (autoconf)Particular Programs.
 
-`AC_PROG_OBJCXX'
+‘AC_PROG_OBJCXX’
      This is required if any Objective C++ source is included.  *Note
      Particular Program Checks: (autoconf)Particular Programs.
 
-`AC_PROG_F77'
+‘AC_PROG_F77’
      This is required if any Fortran 77 source is included.  *Note
      Particular Program Checks: (autoconf)Particular Programs.
 
-`AC_F77_LIBRARY_LDFLAGS'
+‘AC_F77_LIBRARY_LDFLAGS’
      This is required for programs and shared libraries that are a
      mixture of languages that include Fortran 77 (*note Mixing Fortran
      77 With C and C++::).  *Note Autoconf macros supplied with
      Automake: Macros.
 
-`AC_FC_SRCEXT'
-     Automake will add the flags computed by `AC_FC_SRCEXT' to
+‘AC_FC_SRCEXT’
+     Automake will add the flags computed by ‘AC_FC_SRCEXT’ to
      compilation of files with the respective source extension (*note
      Fortran Compiler Characteristics: (autoconf)Fortran Compiler.).
 
-`AC_PROG_FC'
+‘AC_PROG_FC’
      This is required if any Fortran 90/95 source is included.  This
      macro is distributed with Autoconf version 2.58 and later.  *Note
      Particular Program Checks: (autoconf)Particular Programs.
 
-`AC_PROG_LIBTOOL'
-     Automake will turn on processing for `libtool' (*note
-     Introduction: (libtool)Top.).
+‘AC_PROG_LIBTOOL’
+     Automake will turn on processing for ‘libtool’ (*note Introduction:
+     (libtool)Top.).
 
-`AC_PROG_YACC'
+‘AC_PROG_YACC’
      If a Yacc source file is seen, then you must either use this macro
-     or define the variable `YACC' in `configure.ac'.  The former is
+     or define the variable ‘YACC’ in ‘configure.ac’.  The former is
      preferred (*note Particular Program Checks: (autoconf)Particular
      Programs.).
 
-`AC_PROG_LEX'
+‘AC_PROG_LEX’
      If a Lex source file is seen, then this macro must be used.  *Note
      Particular Program Checks: (autoconf)Particular Programs.
 
-`AC_REQUIRE_AUX_FILE'
-     For each `AC_REQUIRE_AUX_FILE([FILE])', `automake' will ensure
-     that `FILE' exists in the aux directory, and will complain
-     otherwise.  It will also automatically distribute the file.  This
-     macro should be used by third-party Autoconf macros that require
-     some supporting files in the aux directory specified with
-     `AC_CONFIG_AUX_DIR' above.  *Note Finding `configure' Input:
-     (autoconf)Input.
+‘AC_REQUIRE_AUX_FILE’
+     For each ‘AC_REQUIRE_AUX_FILE([FILE])’, ‘automake’ will ensure that
+     ‘FILE’ exists in the aux directory, and will complain otherwise.
+     It will also automatically distribute the file.  This macro should
+     be used by third-party Autoconf macros that require some supporting
+     files in the aux directory specified with ‘AC_CONFIG_AUX_DIR’
+     above.  *Note Finding ‘configure’ Input: (autoconf)Input.
 
-`AC_SUBST'
+‘AC_SUBST’
      The first argument is automatically defined as a variable in each
-     generated `Makefile.in', unless `AM_SUBST_NOTMAKE' is also used
-     for this variable.  *Note Setting Output Variables:
-     (autoconf)Setting Output Variables.
-
-     For every substituted variable VAR, `automake' will add a line
-     `VAR = VALUE' to each `Makefile.in' file.  Many Autoconf macros
-     invoke `AC_SUBST' to set output variables this way, e.g.,
-     `AC_PATH_XTRA' defines `X_CFLAGS' and `X_LIBS'.  Thus, you can
-     access these variables as `$(X_CFLAGS)' and `$(X_LIBS)' in any
-     `Makefile.am' if `AC_PATH_XTRA' is called.
-
-`AM_CONDITIONAL'
+     generated ‘Makefile.in’, unless ‘AM_SUBST_NOTMAKE’ is also used for
+     this variable.  *Note Setting Output Variables: (autoconf)Setting
+     Output Variables.
+
+     For every substituted variable VAR, ‘automake’ will add a line ‘VAR
+     = VALUE’ to each ‘Makefile.in’ file.  Many Autoconf macros invoke
+     ‘AC_SUBST’ to set output variables this way, e.g., ‘AC_PATH_XTRA’
+     defines ‘X_CFLAGS’ and ‘X_LIBS’.  Thus, you can access these
+     variables as ‘$(X_CFLAGS)’ and ‘$(X_LIBS)’ in any ‘Makefile.am’ if
+     ‘AC_PATH_XTRA’ is called.
+
+‘AM_CONDITIONAL’
      This introduces an Automake conditional (*note Conditionals::).
 
-`AM_COND_IF'
-     This macro allows `automake' to detect subsequent access within
-     `configure.ac' to a conditional previously introduced with
-     `AM_CONDITIONAL', thus enabling conditional `AC_CONFIG_FILES'
+‘AM_COND_IF’
+     This macro allows ‘automake’ to detect subsequent access within
+     ‘configure.ac’ to a conditional previously introduced with
+     ‘AM_CONDITIONAL’, thus enabling conditional ‘AC_CONFIG_FILES’
      (*note Usage of Conditionals::).
 
-`AM_GNU_GETTEXT'
+‘AM_GNU_GETTEXT’
      This macro is required for packages that use GNU gettext (*note
-     gettext::).  It is distributed with gettext.  If Automake sees
-     this macro it ensures that the package meets some of gettext's
+     gettext::).  It is distributed with gettext.  If Automake sees this
+     macro it ensures that the package meets some of gettext’s
      requirements.
 
-`AM_GNU_GETTEXT_INTL_SUBDIR'
-     This macro specifies that the `intl/' subdirectory is to be built,
-     even if the `AM_GNU_GETTEXT' macro was invoked with a first
-     argument of `external'.
+‘AM_GNU_GETTEXT_INTL_SUBDIR’
+     This macro specifies that the ‘intl/’ subdirectory is to be built,
+     even if the ‘AM_GNU_GETTEXT’ macro was invoked with a first
+     argument of ‘external’.
 
-`AM_MAINTAINER_MODE([DEFAULT-MODE])'
-     This macro adds an `--enable-maintainer-mode' option to
-     `configure'.  If this is used, `automake' will cause
-     "maintainer-only" rules to be turned off by default in the
-     generated `Makefile.in's, unless DEFAULT-MODE is `enable'.  This
-     macro defines the `MAINTAINER_MODE' conditional, which you can use
-     in your own `Makefile.am'.  *Note maintainer-mode::.
+‘AM_MAINTAINER_MODE([DEFAULT-MODE])’
+     This macro adds an ‘--enable-maintainer-mode’ option to
+     ‘configure’.  If this is used, ‘automake’ will cause
+     “maintainer-only” rules to be turned off by default in the
+     generated ‘Makefile.in’s, unless DEFAULT-MODE is ‘enable’.  This
+     macro defines the ‘MAINTAINER_MODE’ conditional, which you can use
+     in your own ‘Makefile.am’.  *Note maintainer-mode::.
 
-`AM_SUBST_NOTMAKE(VAR)'
+‘AM_SUBST_NOTMAKE(VAR)’
      Prevent Automake from defining a variable VAR, even if it is
-     substituted by `config.status'.  Normally, Automake defines a
-     `make' variable for each `configure' substitution, i.e., for each
-     `AC_SUBST([VAR])'.  This macro prevents that definition from
-     Automake.  If `AC_SUBST' has not been called for this variable,
-     then `AM_SUBST_NOTMAKE' has no effects.  Preventing variable
+     substituted by ‘config.status’.  Normally, Automake defines a
+     ‘make’ variable for each ‘configure’ substitution, i.e., for each
+     ‘AC_SUBST([VAR])’.  This macro prevents that definition from
+     Automake.  If ‘AC_SUBST’ has not been called for this variable,
+     then ‘AM_SUBST_NOTMAKE’ has no effects.  Preventing variable
      definitions may be useful for substitution of multi-line values,
-     where `VAR = @VALUE@' might yield unintended results.
+     where ‘VAR = @VALUE@’ might yield unintended results.
 
-`m4_include'
-     Files included by `configure.ac' using this macro will be detected
+‘m4_include’
+     Files included by ‘configure.ac’ using this macro will be detected
      by Automake and automatically distributed.  They will also appear
-     as dependencies in `Makefile' rules.
+     as dependencies in ‘Makefile’ rules.
 
-     `m4_include' is seldom used by `configure.ac' authors, but can
-     appear in `aclocal.m4' when `aclocal' detects that some required
+     ‘m4_include’ is seldom used by ‘configure.ac’ authors, but can
+     appear in ‘aclocal.m4’ when ‘aclocal’ detects that some required
      macros come from files local to your package (as opposed to macros
      installed in a system-wide directory, *note aclocal Invocation::).
 
-
 \1f
 File: automake.info,  Node: aclocal Invocation,  Next: Macros,  Prev: Optional,  Up: configure
 
@@ -2688,51 +2621,50 @@ File: automake.info,  Node: aclocal Invocation,  Next: Macros,  Prev: Optional,
 ==============================
 
 Automake includes a number of Autoconf macros that can be used in your
-package (*note Macros::); some of them are actually required by
-Automake in certain situations.  These macros must be defined in your
-`aclocal.m4'; otherwise they will not be seen by `autoconf'.
-
-   The `aclocal' program will automatically generate `aclocal.m4' files
-based on the contents of `configure.ac'.  This provides a convenient
-way to get Automake-provided macros, without having to search around.
-The `aclocal' mechanism allows other packages to supply their own
-macros (*note Extending aclocal::).  You can also use it to maintain
-your own set of custom macros (*note Local Macros::).
-
-   At startup, `aclocal' scans all the `.m4' files it can find, looking
+package (*note Macros::); some of them are actually required by Automake
+in certain situations.  These macros must be defined in your
+‘aclocal.m4’; otherwise they will not be seen by ‘autoconf’.
+
+   The ‘aclocal’ program will automatically generate ‘aclocal.m4’ files
+based on the contents of ‘configure.ac’.  This provides a convenient way
+to get Automake-provided macros, without having to search around.  The
+‘aclocal’ mechanism allows other packages to supply their own macros
+(*note Extending aclocal::).  You can also use it to maintain your own
+set of custom macros (*note Local Macros::).
+
+   At startup, ‘aclocal’ scans all the ‘.m4’ files it can find, looking
 for macro definitions (*note Macro Search Path::).  Then it scans
-`configure.ac'.  Any mention of one of the macros found in the first
+‘configure.ac’.  Any mention of one of the macros found in the first
 step causes that macro, and any macros it in turn requires, to be put
-into `aclocal.m4'.
+into ‘aclocal.m4’.
 
    _Putting_ the file that contains the macro definition into
-`aclocal.m4' is usually done by copying the entire text of this file,
-including unused macro definitions as well as both `#' and `dnl'
-comments.  If you want to make a comment that will be completely
-ignored by `aclocal', use `##' as the comment leader.
-
-   When a file selected by `aclocal' is located in a subdirectory
-specified as a relative search path with `aclocal''s `-I' argument,
-`aclocal' assumes the file belongs to the package and uses `m4_include'
-instead of copying it into `aclocal.m4'.  This makes the package
-smaller, eases dependency tracking, and cause the file to be
-distributed automatically.  (*Note Local Macros::, for an example.)
-Any macro that is found in a system-wide directory, or via an absolute
-search path will be copied.  So use `-I `pwd`/reldir' instead of `-I
-reldir' whenever some relative directory should be considered outside
-the package.
-
-   The contents of `acinclude.m4', if this file exists, are also
-automatically included in `aclocal.m4'.  We recommend against using
-`acinclude.m4' in new packages (*note Local Macros::).
-
-   While computing `aclocal.m4', `aclocal' runs `autom4te' (*note Using
-`Autom4te': (autoconf)Using autom4te.) in order to trace the macros
-that are really used, and omit from `aclocal.m4' all macros that are
+‘aclocal.m4’ is usually done by copying the entire text of this file,
+including unused macro definitions as well as both ‘#’ and ‘dnl’
+comments.  If you want to make a comment that will be completely ignored
+by ‘aclocal’, use ‘##’ as the comment leader.
+
+   When a file selected by ‘aclocal’ is located in a subdirectory
+specified as a relative search path with ‘aclocal’’s ‘-I’ argument,
+‘aclocal’ assumes the file belongs to the package and uses ‘m4_include’
+instead of copying it into ‘aclocal.m4’.  This makes the package
+smaller, eases dependency tracking, and cause the file to be distributed
+automatically.  (*Note Local Macros::, for an example.)  Any macro that
+is found in a system-wide directory, or via an absolute search path will
+be copied.  So use ‘-I `pwd`/reldir’ instead of ‘-I reldir’ whenever
+some relative directory should be considered outside the package.
+
+   The contents of ‘acinclude.m4’, if this file exists, are also
+automatically included in ‘aclocal.m4’.  We recommend against using
+‘acinclude.m4’ in new packages (*note Local Macros::).
+
+   While computing ‘aclocal.m4’, ‘aclocal’ runs ‘autom4te’ (*note Using
+‘Autom4te’: (autoconf)Using autom4te.) in order to trace the macros that
+are really used, and omit from ‘aclocal.m4’ all macros that are
 mentioned but otherwise unexpanded (this can happen when a macro is
-called conditionally).  `autom4te' is expected to be in the `PATH',
-just as `autoconf'.  Its location can be overridden using the
-`AUTOM4TE' environment variable.
+called conditionally).  ‘autom4te’ is expected to be in the ‘PATH’, just
+as ‘autoconf’.  Its location can be overridden using the ‘AUTOM4TE’
+environment variable.
 
 * Menu:
 
@@ -2741,7 +2673,7 @@ just as `autoconf'.  Its location can be overridden using the
 * Extending aclocal::           Writing your own aclocal macros
 * Local Macros::                Organizing local macros
 * Serials::                     Serial lines in Autoconf macros
-* Future of aclocal::           aclocal's scheduled death
+* Future of aclocal::           aclocals scheduled death
 
 \1f
 File: automake.info,  Node: aclocal Options,  Next: Macro Search Path,  Up: aclocal Invocation
@@ -2749,99 +2681,93 @@ File: automake.info,  Node: aclocal Options,  Next: Macro Search Path,  Up: aclo
 6.3.1 aclocal Options
 ---------------------
 
-`aclocal' accepts the following options:
+‘aclocal’ accepts the following options:
 
-`--automake-acdir=DIR'
-     Look for the automake-provided macro files in DIR instead of in
-     the installation directory.  This is typically used for debugging.
+‘--automake-acdir=DIR’
+     Look for the automake-provided macro files in DIR instead of in the
+     installation directory.  This is typically used for debugging.
 
-`--system-acdir=DIR'
+‘--system-acdir=DIR’
      Look for the system-wide third-party macro files (and the special
-     `dirlist' file) in DIR instead of in the installation directory.
+     ‘dirlist’ file) in DIR instead of in the installation directory.
      This is typically used for debugging.
 
-`--diff[=COMMAND]'
+‘--diff[=COMMAND]’
      Run COMMAND on M4 file that would be installed or overwritten by
-     `--install'.  The default COMMAND is `diff -u'.  This option
-     implies `--install' and `--dry-run'.
+     ‘--install’.  The default COMMAND is ‘diff -u’.  This option
+     implies ‘--install’ and ‘--dry-run’.
 
-`--dry-run'
-     Do not actually overwrite (or create) `aclocal.m4' and M4 files
-     installed by `--install'.
+‘--dry-run’
+     Do not actually overwrite (or create) ‘aclocal.m4’ and M4 files
+     installed by ‘--install’.
 
-`--help'
+‘--help’
      Print a summary of the command line options and exit.
 
-`-I DIR'
-     Add the directory DIR to the list of directories searched for
-     `.m4' files.
+‘-I DIR’
+     Add the directory DIR to the list of directories searched for ‘.m4’
+     files.
 
-`--install'
+‘--install’
      Install system-wide third-party macros into the first directory
-     specified with `-I DIR' instead of copying them in the output file.
+     specified with ‘-I DIR’ instead of copying them in the output file.
      Note that this will happen also if DIR is an absolute path.
 
      When this option is used, and only when this option is used,
-     `aclocal' will also honor `#serial NUMBER' lines that appear in
+     ‘aclocal’ will also honor ‘#serial NUMBER’ lines that appear in
      macros: an M4 file is ignored if there exists another M4 file with
      the same basename and a greater serial number in the search path
      (*note Serials::).
 
-`--force'
+‘--force’
      Always overwrite the output file.  The default is to overwrite the
      output file only when really needed, i.e., when its contents
      changes or if one of its dependencies is younger.
 
-     This option forces the update of `aclocal.m4' (or the file
-     specified with `--output' below) and only this file, it has
+     This option forces the update of ‘aclocal.m4’ (or the file
+     specified with ‘--output’ below) and only this file, it has
      absolutely no influence on files that may need to be installed by
-     `--install'.
+     ‘--install’.
 
-`--output=FILE'
-     Cause the output to be put into FILE instead of `aclocal.m4'.
+‘--output=FILE’
+     Cause the output to be put into FILE instead of ‘aclocal.m4’.
 
-`--print-ac-dir'
-     Prints the name of the directory that `aclocal' will search to
-     find third-party `.m4' files.  When this option is given, normal
+‘--print-ac-dir’
+     Prints the name of the directory that ‘aclocal’ will search to find
+     third-party ‘.m4’ files.  When this option is given, normal
      processing is suppressed.  This option was used _in the past_ by
-     third-party packages to determine where to install `.m4' macro
+     third-party packages to determine where to install ‘.m4’ macro
      files, but _this usage is today discouraged_, since it causes
-     `$(prefix)' not to be thoroughly honoured (which violates the GNU
+     ‘$(prefix)’ not to be thoroughly honored (which violates the GNU
      Coding Standards), and a similar semantics can be better obtained
-     with the `ACLOCAL_PATH' environment variable; *note Extending
+     with the ‘ACLOCAL_PATH’ environment variable; *note Extending
      aclocal::.
 
-`--verbose'
+‘--verbose’
      Print the names of the files it examines.
 
-`--version'
+‘--version’
      Print the version number of Automake and exit.
 
-`-W CATEGORY'
-
-`--warnings=CATEGORY'
+‘-W CATEGORY’
+‘--warnings=CATEGORY’
      Output warnings falling in CATEGORY.  CATEGORY can be one of:
-    `syntax'
+     ‘syntax’
           dubious syntactic constructs, underquoted macros, unused
           macros, etc.
-
-    `unsupported'
+     ‘unsupported’
           unknown macros
-
-    `all'
+     ‘all’
           all the warnings, this is the default
-
-    `none'
+     ‘none’
           turn off all the warnings
-
-    `error'
+     ‘error’
           treat warnings as errors
 
      All warnings are output by default.
 
-     The environment variable `WARNINGS' is honored in the same way as
-     it is for `automake' (*note automake Invocation::).
-
+     The environment variable ‘WARNINGS’ is honored in the same way as
+     it is for ‘automake’ (*note automake Invocation::).
 
 \1f
 File: automake.info,  Node: Macro Search Path,  Next: Extending aclocal,  Prev: aclocal Options,  Up: aclocal Invocation
@@ -2849,31 +2775,30 @@ File: automake.info,  Node: Macro Search Path,  Next: Extending aclocal,  Prev:
 6.3.2 Macro Search Path
 -----------------------
 
-By default, `aclocal' searches for `.m4' files in the following
+By default, ‘aclocal’ searches for ‘.m4’ files in the following
 directories, in this order:
 
-`ACDIR-APIVERSION'
-     This is where the `.m4' macros distributed with Automake itself
-     are stored.  APIVERSION depends on the Automake release used; for
-     example, for Automake 1.11.x, APIVERSION = `1.11'.
-
-`ACDIR'
-     This directory is intended for third party `.m4' files, and is
-     configured when `automake' itself is built.  This is
-     `@datadir@/aclocal/', which typically expands to
-     `${prefix}/share/aclocal/'.  To find the compiled-in value of
-     ACDIR, use the `--print-ac-dir' option (*note aclocal Options::).
+‘ACDIR-APIVERSION’
+     This is where the ‘.m4’ macros distributed with Automake itself are
+     stored.  APIVERSION depends on the Automake release used; for
+     example, for Automake 1.11.x, APIVERSION = ‘1.11’.
 
-   As an example, suppose that `automake-1.11.2' was configured with
-`--prefix=/usr/local'.  Then, the search path would be:
+‘ACDIR’
+     This directory is intended for third party ‘.m4’ files, and is
+     configured when ‘automake’ itself is built.  This is
+     ‘@datadir@/aclocal/’, which typically expands to
+     ‘${prefix}/share/aclocal/’.  To find the compiled-in value of
+     ACDIR, use the ‘--print-ac-dir’ option (*note aclocal Options::).
 
-  1. `/usr/local/share/aclocal-1.11.2/'
+   As an example, suppose that ‘automake-1.11.2’ was configured with
+‘--prefix=/usr/local’.  Then, the search path would be:
 
-  2. `/usr/local/share/aclocal/'
+  1. ‘/usr/local/share/aclocal-1.11.2/’
+  2. ‘/usr/local/share/aclocal/’
 
    The paths for the ACDIR and ACDIR-APIVERSION directories can be
-changed respectively through aclocal options `--system-acdir' and
-`--automake-acdir' (*note aclocal Options::).  Note however that these
+changed respectively through aclocal options ‘--system-acdir’ and
+‘--automake-acdir’ (*note aclocal Options::).  Note however that these
 options are only intended for use by the internal Automake test suite,
 or for debugging under highly unusual situations; they are not
 ordinarily needed by end-users.
@@ -2881,111 +2806,100 @@ ordinarily needed by end-users.
    As explained in (*note aclocal Options::), there are several options
 that can be used to change or extend this search path.
 
-Modifying the Macro Search Path: `-I DIR'
+Modifying the Macro Search Path: ‘-I DIR’
 .........................................
 
-Any extra directories specified using `-I' options (*note aclocal
-Options::) are _prepended_ to this search list.  Thus, `aclocal -I /foo
--I /bar' results in the following search path:
-
-  1. `/foo'
-
-  2. `/bar'
+Any extra directories specified using ‘-I’ options (*note aclocal
+Options::) are _prepended_ to this search list.  Thus, ‘aclocal -I /foo
+-I /bar’ results in the following search path:
 
+  1. ‘/foo’
+  2. ‘/bar’
   3. ACDIR-APIVERSION
-
   4. ACDIR
 
-Modifying the Macro Search Path: `dirlist'
+Modifying the Macro Search Path: ‘dirlist’
 ..........................................
 
 There is a third mechanism for customizing the search path.  If a
-`dirlist' file exists in ACDIR, then that file is assumed to contain a
-list of directory patterns, one per line.  `aclocal' expands these
+‘dirlist’ file exists in ACDIR, then that file is assumed to contain a
+list of directory patterns, one per line.  ‘aclocal’ expands these
 patterns to directory names, and adds them to the search list _after_
-all other directories.  `dirlist' entries may use shell wildcards such
-as `*', `?', or `[...]'.
+all other directories.  ‘dirlist’ entries may use shell wildcards such
+as ‘*’, ‘?’, or ‘[...]’.
 
-   For example, suppose `ACDIR/dirlist' contains the following:
+   For example, suppose ‘ACDIR/dirlist’ contains the following:
 
      /test1
      /test2
      /test3*
 
-and that `aclocal' was called with the `-I /foo -I /bar' options.
-Then, the search path would be
-
-  1. `/foo'
-
-  2. `/bar'
+and that ‘aclocal’ was called with the ‘-I /foo -I /bar’ options.  Then,
+the search path would be
 
+  1. ‘/foo’
+  2. ‘/bar’
   3. ACDIR-APIVERSION
-
   4. ACDIR
+  5. ‘/test1’
+  6. ‘/test2’
 
-  5. `/test1'
-
-  6. `/test2'
-
-and all directories with path names starting with `/test3'.
+and all directories with path names starting with ‘/test3’.
 
-   If the `--system-acdir=DIR' option is used, then `aclocal' will
-search for the `dirlist' file in DIR; but remember the warnings  above
-against the use of `--system-acdir'.
+   If the ‘--system-acdir=DIR’ option is used, then ‘aclocal’ will
+search for the ‘dirlist’ file in DIR; but remember the warnings above
+against the use of ‘--system-acdir’.
 
-   `dirlist' is useful in the following situation: suppose that
-`automake' version `1.11.2' is installed with `--prefix=/usr' by the
+   ‘dirlist’ is useful in the following situation: suppose that
+‘automake’ version ‘1.11.2’ is installed with ‘--prefix=/usr’ by the
 system vendor.  Thus, the default search directories are
 
-  1. `/usr/share/aclocal-1.11/'
-
-  2. `/usr/share/aclocal/'
+  1. ‘/usr/share/aclocal-1.11/’
+  2. ‘/usr/share/aclocal/’
 
    However, suppose further that many packages have been manually
 installed on the system, with $prefix=/usr/local, as is typical.  In
-that case, many of these "extra" `.m4' files are in
-`/usr/local/share/aclocal'.  The only way to force `/usr/bin/aclocal'
-to find these "extra" `.m4' files is to always call `aclocal -I
-/usr/local/share/aclocal'.  This is inconvenient.  With `dirlist', one
-may create a file `/usr/share/aclocal/dirlist' containing only the
+that case, many of these “extra” ‘.m4’ files are in
+‘/usr/local/share/aclocal’.  The only way to force ‘/usr/bin/aclocal’ to
+find these “extra” ‘.m4’ files is to always call ‘aclocal -I
+/usr/local/share/aclocal’.  This is inconvenient.  With ‘dirlist’, one
+may create a file ‘/usr/share/aclocal/dirlist’ containing only the
 single line
 
      /usr/local/share/aclocal
 
-   Now, the "default" search path on the affected system is
-
-  1. `/usr/share/aclocal-1.11/'
-
-  2. `/usr/share/aclocal/'
+   Now, the “default” search path on the affected system is
 
-  3. `/usr/local/share/aclocal/'
+  1. ‘/usr/share/aclocal-1.11/’
+  2. ‘/usr/share/aclocal/’
+  3. ‘/usr/local/share/aclocal/’
 
-   without the need for `-I' options; `-I' options can be reserved for
-project-specific needs (`my-source-dir/m4/'), rather than using it to
+   without the need for ‘-I’ options; ‘-I’ options can be reserved for
+project-specific needs (‘my-source-dir/m4/’), rather than using it to
 work around local system-dependent tool installation directories.
 
-   Similarly, `dirlist' can be handy if you have installed a local copy
-of Automake in your account and want `aclocal' to look for macros
+   Similarly, ‘dirlist’ can be handy if you have installed a local copy
+of Automake in your account and want ‘aclocal’ to look for macros
 installed at other places on the system.
 
-Modifying the Macro Search Path: `ACLOCAL_PATH'
+Modifying the Macro Search Path: ‘ACLOCAL_PATH’
 ...............................................
 
-The fourth and last mechanism to customize the macro search path is
-also the simplest.  Any directory included in the colon-separated
-environment variable `ACLOCAL_PATH' is added to the search path and
-takes precedence over system directories (including those found via
-`dirlist'), with the exception of the versioned directory
-ACDIR-APIVERSION (*note Macro Search Path::).  However, directories
-passed via `-I' will take precedence over directories in `ACLOCAL_PATH'.
+The fourth and last mechanism to customize the macro search path is also
+the simplest.  Any directory included in the colon-separated environment
+variable ‘ACLOCAL_PATH’ is added to the search path and takes precedence
+over system directories (including those found via ‘dirlist’), with the
+exception of the versioned directory ACDIR-APIVERSION (*note Macro
+Search Path::).  However, directories passed via ‘-I’ will take
+precedence over directories in ‘ACLOCAL_PATH’.
 
-   Also note that, if the `--install' option is used, any `.m4' file
+   Also note that, if the ‘--install’ option is used, any ‘.m4’ file
 containing a required macro that is found in a directory listed in
-`ACLOCAL_PATH' will be installed locally.  In this case, serial numbers
-in `.m4' are honoured too, *note Serials::.
+‘ACLOCAL_PATH’ will be installed locally.  In this case, serial numbers
+in ‘.m4’ are honored too, *note Serials::.
 
-   Conversely to `dirlist', `ACLOCAL_PATH' is useful if you are using a
-global copy of Automake and want `aclocal' to look for macros somewhere
+   Conversely to ‘dirlist’, ‘ACLOCAL_PATH’ is useful if you are using a
+global copy of Automake and want ‘aclocal’ to look for macros somewhere
 under your home directory.
 
 Planned future incompatibilities
@@ -2994,10 +2908,10 @@ Planned future incompatibilities
 The order in which the directories in the macro search path are
 currently looked up is confusing and/or suboptimal in various aspects,
 and is probably going to be changed in the future Automake release.  In
-particular, directories in `ACLOCAL_PATH' and `ACDIR' might end up
-taking precedence over `ACDIR-APIVERSION', and directories in
-`ACDIR/dirlist' might end up taking precedence over `ACDIR'.  _This is
-possible future incompatibility!_
+particular, directories in ‘ACLOCAL_PATH’ and ‘ACDIR’ might end up
+taking precedence over ‘ACDIR-APIVERSION’, and directories in
+‘ACDIR/dirlist’ might end up taking precedence over ‘ACDIR’.  _This is a
+possible future incompatibility!_
 
 \1f
 File: automake.info,  Node: Extending aclocal,  Next: Local Macros,  Prev: Macro Search Path,  Up: aclocal Invocation
@@ -3005,47 +2919,47 @@ File: automake.info,  Node: Extending aclocal,  Next: Local Macros,  Prev: Macro
 6.3.3 Writing your own aclocal macros
 -------------------------------------
 
-The `aclocal' program doesn't have any built-in knowledge of any
-macros, so it is easy to extend it with your own macros.
+The ‘aclocal’ program doesn’t have any built-in knowledge of any macros,
+so it is easy to extend it with your own macros.
 
    This can be used by libraries that want to supply their own Autoconf
-macros for use by other programs.  For instance, the `gettext' library
-supplies a macro `AM_GNU_GETTEXT' that should be used by any package
-using `gettext'.  When the library is installed, it installs this macro
-so that `aclocal' will find it.
+macros for use by other programs.  For instance, the ‘gettext’ library
+supplies a macro ‘AM_GNU_GETTEXT’ that should be used by any package
+using ‘gettext’.  When the library is installed, it installs this macro
+so that ‘aclocal’ will find it.
 
-   A macro file's name should end in `.m4'.  Such files should be
-installed in `$(datadir)/aclocal'.  This is as simple as writing:
+   A macro file’s name should end in ‘.m4’.  Such files should be
+installed in ‘$(datadir)/aclocal’.  This is as simple as writing:
 
      aclocaldir = $(datadir)/aclocal
      aclocal_DATA = mymacro.m4 myothermacro.m4
 
-Please do use `$(datadir)/aclocal', and not something based on the
-result of `aclocal --print-ac-dir' (*note Hard-Coded Install Paths::,
+Please do use ‘$(datadir)/aclocal’, and not something based on the
+result of ‘aclocal --print-ac-dir’ (*note Hard-Coded Install Paths::,
 for arguments).  It might also be helpful to suggest to the user to add
-the `$(datadir)/aclocal' directory to his `ACLOCAL_PATH' variable
-(*note ACLOCAL_PATH::) so that `aclocal' will find the `.m4' files
-installed by your package automatically.
-
-   A file of macros should be a series of properly quoted `AC_DEFUN''s
-(*note Macro Definitions: (autoconf)Macro Definitions.).  The `aclocal'
-programs also understands `AC_REQUIRE' (*note Prerequisite Macros:
-(autoconf)Prerequisite Macros.), so it is safe to put each macro in a
-separate file.  Each file should have no side effects but macro
-definitions.  Especially, any call to `AC_PREREQ' should be done inside
-the defined macro, not at the beginning of the file.
-
-   Starting with Automake 1.8, `aclocal' will warn about all
-underquoted calls to `AC_DEFUN'.  We realize this will annoy a lot of
-people, because `aclocal' was not so strict in the past and many third
-party macros are underquoted; and we have to apologize for this
-temporary inconvenience.  The reason we have to be stricter is that a
-future implementation of `aclocal' (*note Future of aclocal::) will
-have to temporarily include all these third party `.m4' files, maybe
-several times, including even files that are not actually needed.
-Doing so should alleviate many problems of the current implementation,
-however it requires a stricter style from the macro authors.  Hopefully
-it is easy to revise the existing macros.  For instance,
+the ‘$(datadir)/aclocal’ directory to his ‘ACLOCAL_PATH’ variable (*note
+ACLOCAL_PATH::) so that ‘aclocal’ will find the ‘.m4’ files installed by
+your package automatically.
+
+   A file of macros should be a series of properly quoted ‘AC_DEFUN’’s
+(*note (autoconf)Macro Definitions::).  The ‘aclocal’ programs also
+understands ‘AC_REQUIRE’ (*note (autoconf)Prerequisite Macros::), so it
+is safe to put each macro in a separate file.  Each file should have no
+side effects but macro definitions.  Especially, any call to ‘AC_PREREQ’
+should be done inside the defined macro, not at the beginning of the
+file.
+
+   Starting with Automake 1.8, ‘aclocal’ will warn about all underquoted
+calls to ‘AC_DEFUN’.  We realize this will annoy a lot of people,
+because ‘aclocal’ was not so strict in the past and many third party
+macros are underquoted; and we have to apologize for this temporary
+inconvenience.  The reason we have to be stricter is that a future
+implementation of ‘aclocal’ (*note Future of aclocal::) will have to
+temporarily include all of these third party ‘.m4’ files, maybe several
+times, including even files that are not actually needed.  Doing so
+should alleviate many problems of the current implementation, however it
+requires a stricter style from the macro authors.  Hopefully it is easy
+to revise the existing macros.  For instance,
 
      # bad style
      AC_PREREQ(2.68)
@@ -3064,21 +2978,20 @@ should be rewritten as
      AX_BAR
      ])
 
-   Wrapping the `AC_PREREQ' call inside the macro ensures that Autoconf
-2.68 will not be required if `AX_FOOBAR' is not actually used.  Most
-importantly, quoting the first argument of `AC_DEFUN' allows the macro
+   Wrapping the ‘AC_PREREQ’ call inside the macro ensures that Autoconf
+2.68 will not be required if ‘AX_FOOBAR’ is not actually used.  Most
+importantly, quoting the first argument of ‘AC_DEFUN’ allows the macro
 to be redefined or included twice (otherwise this first argument would
 be expanded during the second definition).  For consistency we like to
-quote even arguments such as `2.68' that do not require it.
+quote even arguments such as ‘2.68’ that do not require it.
 
-   If you have been directed here by the `aclocal' diagnostic but are
-not the maintainer of the implicated macro, you will want to contact
-the maintainer of that macro.  Please make sure you have the latest
-version of the macro and that the problem hasn't already been reported
-before doing so: people tend to work faster when they aren't flooded by
-mails.
+   If you have been directed here by the ‘aclocal’ diagnostic but are
+not the maintainer of the implicated macro, you will want to contact the
+maintainer of that macro.  Please make sure you have the latest version
+of the macro and that the problem hasn’t already been reported before
+doing so: people tend to work faster when they aren’t flooded by mails.
 
-   Another situation where `aclocal' is commonly used is to manage
+   Another situation where ‘aclocal’ is commonly used is to manage
 macros that are used locally by the package, *note Local Macros::.
 
 \1f
@@ -3094,83 +3007,71 @@ third-party macros.
    There are two ways to organize custom macros in a package.
 
    The first possibility (the historical practice) is to list all your
-macros in `acinclude.m4'.  This file will be included in `aclocal.m4'
-when you run `aclocal', and its macro(s) will henceforth be visible to
-`autoconf'.  However if it contains numerous macros, it will rapidly
+macros in ‘acinclude.m4’.  This file will be included in ‘aclocal.m4’
+when you run ‘aclocal’, and its macro(s) will henceforth be visible to
+‘autoconf’.  However if it contains numerous macros, it will rapidly
 become difficult to maintain, and it will be almost impossible to share
 macros between packages.
 
    The second possibility, which we do recommend, is to write each macro
 in its own file and gather all these files in a directory.  This
-directory is usually called `m4/'.  To build `aclocal.m4', one should
-therefore instruct `aclocal' to scan `m4/'.  From the command line,
-this is done with `aclocal -I m4'.  The top-level `Makefile.am' should
-also be updated to define
-
-     ACLOCAL_AMFLAGS = -I m4
-
-   `ACLOCAL_AMFLAGS' contains options to pass to `aclocal' when
-`aclocal.m4' is to be rebuilt by `make'.  This line is also used by
-`autoreconf' (*note Using `autoreconf' to Update `configure' Scripts:
-(autoconf)autoreconf Invocation.) to run `aclocal' with suitable
-options, or by `autopoint' (*note Invoking the `autopoint' Program:
-(gettext)autopoint Invocation.)  and `gettextize' (*note Invoking the
-`gettextize' Program: (gettext)gettextize Invocation.) to locate the
-place where Gettext's macros should be installed.  So even if you do
-not really care about the rebuild rules, you should define
-`ACLOCAL_AMFLAGS'.
-
-   When `aclocal -I m4' is run, it will build an `aclocal.m4' that
-`m4_include's any file from `m4/' that defines a required macro.
-Macros not found locally will still be searched in system-wide
-directories, as explained in *note Macro Search Path::.
+directory is usually called ‘m4/’.  Then it’s enough to update
+‘configure.ac’ by adding a proper call to ‘AC_CONFIG_MACRO_DIRS’:
+
+     AC_CONFIG_MACRO_DIRS([m4])
+
+   ‘aclocal’ will then take care of automatically adding ‘m4/’ to its
+search path for m4 files.
+
+   When ‘aclocal’ is run, it will build an ‘aclocal.m4’ that
+‘m4_include’s any file from ‘m4/’ that defines a required macro.  Macros
+not found locally will still be searched in system-wide directories, as
+explained in *note Macro Search Path::.
 
    Custom macros should be distributed for the same reason that
-`configure.ac' is: so that other people have all the sources of your
-package if they want to work on it.  Actually, this distribution
-happens automatically because all `m4_include'd files are distributed.
+‘configure.ac’ is: so that other people have all the sources of your
+package if they want to work on it.  Actually, this distribution happens
+automatically because all ‘m4_include’d files are distributed.
 
    However there is no consensus on the distribution of third-party
 macros that your package may use.  Many libraries install their own
-macro in the system-wide `aclocal' directory (*note Extending
-aclocal::).  For instance, Guile ships with a file called `guile.m4'
-that contains the macro `GUILE_FLAGS' that can be used to define setup
+macro in the system-wide ‘aclocal’ directory (*note Extending
+aclocal::).  For instance, Guile ships with a file called ‘guile.m4’
+that contains the macro ‘GUILE_FLAGS’ that can be used to define setup
 compiler and linker flags appropriate for using Guile.  Using
-`GUILE_FLAGS' in `configure.ac' will cause `aclocal' to copy `guile.m4'
-into `aclocal.m4', but as `guile.m4' is not part of the project, it
-will not be distributed.  Technically, that means a user who needs to
-rebuild `aclocal.m4' will have to install Guile first.  This is
-probably OK, if Guile already is a requirement to build the package.
-However, if Guile is only an optional feature, or if your package might
-run on architectures where Guile cannot be installed, this requirement
-will hinder development.  An easy solution is to copy such third-party
-macros in your local `m4/' directory so they get distributed.
-
-   Since Automake 1.10, `aclocal' offers an option to copy these
-system-wide third-party macros in your local macro directory, solving
-the above problem.  Simply use:
-
-     ACLOCAL_AMFLAGS = -I m4 --install
-
-With this setup, system-wide macros will be copied to `m4/' the first
-time you run `autoreconf'.  Then the locally installed macros will have
-precedence over the system-wide installed macros each time `aclocal' is
+‘GUILE_FLAGS’ in ‘configure.ac’ will cause ‘aclocal’ to copy ‘guile.m4’
+into ‘aclocal.m4’, but as ‘guile.m4’ is not part of the project, it will
+not be distributed.  Technically, that means a user who needs to rebuild
+‘aclocal.m4’ will have to install Guile first.  This is probably OK, if
+Guile already is a requirement to build the package.  However, if Guile
+is only an optional feature, or if your package might run on
+architectures where Guile cannot be installed, this requirement will
+hinder development.  An easy solution is to copy such third-party macros
+in your local ‘m4/’ directory so they get distributed.
+
+   Since Automake 1.10, ‘aclocal’ offers the option ‘--install’ to copy
+these system-wide third-party macros in your local macro directory,
+helping to solve the above problem.
+
+   With this setup, system-wide macros will be copied to ‘m4/’ the first
+time you run ‘aclocal’.  Then the locally installed macros will have
+precedence over the system-wide installed macros each time ‘aclocal’ is
 run again.
 
-   One reason why you should keep `--install' in the flags even after
-the first run is that when you later edit `configure.ac' and depend on
-a new macro, this macro will be installed in your `m4/' automatically.
+   One reason why you should keep ‘--install’ in the flags even after
+the first run is that when you later edit ‘configure.ac’ and depend on a
+new macro, this macro will be installed in your ‘m4/’ automatically.
 Another one is that serial numbers (*note Serials::) can be used to
-update the macros in your source tree automatically when new
-system-wide versions are installed.  A serial number should be a single
-line of the form
+update the macros in your source tree automatically when new system-wide
+versions are installed.  A serial number should be a single line of the
+form
 
      #serial NNN
 
 where NNN contains only digits and dots.  It should appear in the M4
 file before any macro definition.  It is a good practice to maintain a
 serial number for each macro you distribute, even if you do not use the
-`--install' option of `aclocal': this allows other people to use it.
+‘--install’ option of ‘aclocal’: this allows other people to use it.
 
 \1f
 File: automake.info,  Node: Serials,  Next: Future of aclocal,  Prev: Local Macros,  Up: aclocal Invocation
@@ -3178,10 +3079,10 @@ File: automake.info,  Node: Serials,  Next: Future of aclocal,  Prev: Local Macr
 6.3.5 Serial Numbers
 --------------------
 
-Because third-party macros defined in `*.m4' files are naturally shared
-between multiple projects, some people like to version them.  This
-makes it easier to tell which of two M4 files is newer.  Since at least
-1996, the tradition is to use a `#serial' line for this.
+Because third-party macros defined in ‘*.m4’ files are naturally shared
+between multiple projects, some people like to version them.  This makes
+it easier to tell which of two M4 files is newer.  Since at least 1996,
+the tradition is to use a ‘#serial’ line for this.
 
    A serial number should be a single line of the form
 
@@ -3189,158 +3090,147 @@ makes it easier to tell which of two M4 files is newer.  Since at least
 
 where VERSION is a version number containing only digits and dots.
 Usually people use a single integer, and they increment it each time
-they change the macro (hence the name of "serial").  Such a line should
+they change the macro (hence the name of “serial”).  Such a line should
 appear in the M4 file before any macro definition.
 
-   The `#' must be the first character on the line, and it is OK to
-have extra words after the version, as in
+   The ‘#’ must be the first character on the line, and it is OK to have
+extra words after the version, as in
 
      #serial VERSION GARBAGE
 
-   Normally these serial numbers are completely ignored by `aclocal'
-and `autoconf', like any genuine comment.  However when using
-`aclocal''s `--install' feature, these serial numbers will modify the
-way `aclocal' selects the macros to install in the package: if two
-files with the same basename exist in your search path, and if at least
-one of them uses a `#serial' line, `aclocal' will ignore the file that
-has the older `#serial' line (or the file that has none).
+   Normally these serial numbers are completely ignored by ‘aclocal’ and
+‘autoconf’, like any genuine comment.  However when using ‘aclocal’’s
+‘--install’ feature, these serial numbers will modify the way ‘aclocal’
+selects the macros to install in the package: if two files with the same
+basename exist in your search path, and if at least one of them uses a
+‘#serial’ line, ‘aclocal’ will ignore the file that has the older
+‘#serial’ line (or the file that has none).
 
    Note that a serial number applies to a whole M4 file, not to any
 macro it contains.  A file can contains multiple macros, but only one
 serial.
 
-   Here is a use case that illustrates the use of `--install' and its
-interaction with serial numbers.  Let's assume we maintain a package
-called MyPackage, the `configure.ac' of which requires a third-party
-macro `AX_THIRD_PARTY' defined in `/usr/share/aclocal/thirdparty.m4' as
+   Here is a use case that illustrates the use of ‘--install’ and its
+interaction with serial numbers.  Lets assume we maintain a package
+called MyPackage, the ‘configure.ac’ of which requires a third-party
+macro ‘AX_THIRD_PARTY’ defined in ‘/usr/share/aclocal/thirdparty.m4’ as
 follows:
 
      # serial 1
      AC_DEFUN([AX_THIRD_PARTY], [...])
 
-   MyPackage uses an `m4/' directory to store local macros as explained
+   MyPackage uses an ‘m4/’ directory to store local macros as explained
 in *note Local Macros::, and has
 
-     ACLOCAL_AMFLAGS = -I m4 --install
-
-in its top-level `Makefile.am'.
+     AC_CONFIG_MACRO_DIRS([m4])
 
-   Initially the `m4/' directory is empty.  The first time we run
-`autoreconf', it will fetch the options to pass to `aclocal' in
-`Makefile.am', and run `aclocal -I m4 --install'.  `aclocal' will
-notice that
+in its ‘configure.ac’.
 
-   * `configure.ac' uses `AX_THIRD_PARTY'
+   Initially the ‘m4/’ directory is empty.  The first time we run
+‘aclocal --install’, it will notice that
 
-   * No local macros define `AX_THIRD_PARTY'
-
-   * `/usr/share/aclocal/thirdparty.m4' defines `AX_THIRD_PARTY' with
+   • ‘configure.ac’ uses ‘AX_THIRD_PARTY’
+   • No local macros define ‘AX_THIRD_PARTY’
+   • ‘/usr/share/aclocal/thirdparty.m4’ defines ‘AX_THIRD_PARTY’ with
      serial 1.
 
-Because `/usr/share/aclocal/thirdparty.m4' is a system-wide macro and
-`aclocal' was given the `--install' option, it will copy this file in
-`m4/thirdparty.m4', and output an `aclocal.m4' that contains
-`m4_include([m4/thirdparty.m4])'.
-
-   The next time `aclocal -I m4 --install' is run (either via
-`autoreconf', by hand, or from the `Makefile' rebuild rules) something
-different happens.  `aclocal' notices that
+Because ‘/usr/share/aclocal/thirdparty.m4’ is a system-wide macro and
+‘aclocal’ was given the ‘--install’ option, it will copy this file in
+‘m4/thirdparty.m4’, and output an ‘aclocal.m4’ that contains
+‘m4_include([m4/thirdparty.m4])’.
 
-   * `configure.ac' uses `AX_THIRD_PARTY'
+   The next time ‘aclocal --install’ is run, something different
+happens.  ‘aclocal’ notices that
 
-   * `m4/thirdparty.m4' defines `AX_THIRD_PARTY' with serial 1.
-
-   * `/usr/share/aclocal/thirdparty.m4' defines `AX_THIRD_PARTY' with
+   • ‘configure.ac’ uses ‘AX_THIRD_PARTY’
+   • ‘m4/thirdparty.m4’ defines ‘AX_THIRD_PARTY’ with serial 1.
+   • ‘/usr/share/aclocal/thirdparty.m4’ defines ‘AX_THIRD_PARTY’ with
      serial 1.
 
-Because both files have the same serial number, `aclocal' uses the
-first it found in its search path order (*note Macro Search Path::).
-`aclocal' therefore ignores `/usr/share/aclocal/thirdparty.m4' and
-outputs an `aclocal.m4' that contains `m4_include([m4/thirdparty.m4])'.
+Because both files have the same serial number, ‘aclocal’ uses the first
+it found in its search path order (*note Macro Search Path::).
+‘aclocal’ therefore ignores ‘/usr/share/aclocal/thirdparty.m4’ and
+outputs an ‘aclocal.m4’ that contains ‘m4_include([m4/thirdparty.m4])’.
 
-   Local directories specified with `-I' are always searched before
-system-wide directories, so a local file will always be preferred to
-the system-wide file in case of equal serial numbers.
+   Local directories specified with ‘-I’ are always searched before
+system-wide directories, so a local file will always be preferred to the
+system-wide file in case of equal serial numbers.
 
    Now suppose the system-wide third-party macro is changed.  This can
-happen if the package installing this macro is updated.  Let's suppose
-the new macro has serial number 2.  The next time `aclocal -I m4
---install' is run the situation is the following:
-
-   * `configure.ac' uses `AX_THIRD_PARTY'
-
-   * `m4/thirdparty.m4' defines `AX_THIRD_PARTY' with serial 1.
+happen if the package installing this macro is updated.  Let’s suppose
+the new macro has serial number 2.  The next time ‘aclocal --install’ is
+run the situation is the following:
 
-   * `/usr/share/aclocal/thirdparty.m4' defines `AX_THIRD_PARTY' with
+   • ‘configure.ac’ uses ‘AX_THIRD_PARTY’
+   • ‘m4/thirdparty.m4’ defines ‘AX_THIRD_PARTY’ with serial 1.
+   • ‘/usr/share/aclocal/thirdparty.m4’ defines ‘AX_THIRD_PARTY’ with
      serial 2.
 
-When `aclocal' sees a greater serial number, it immediately forgets
+When ‘aclocal’ sees a greater serial number, it immediately forgets
 anything it knows from files that have the same basename and a smaller
-serial number.  So after it has found
-`/usr/share/aclocal/thirdparty.m4' with serial 2, `aclocal' will
-proceed as if it had never seen `m4/thirdparty.m4'.  This brings us
-back to a situation similar to that at the beginning of our example,
-where no local file defined the macro.  `aclocal' will install the new
-version of the macro in `m4/thirdparty.m4', in this case overriding the
-old version.  MyPackage just had its macro updated as a side effect of
-running `aclocal'.
-
-   If you are leery of letting `aclocal' update your local macro, you
-can run `aclocal -I m4 --diff' to review the changes `aclocal -I m4
---install' would perform on these macros.
-
-   Finally, note that the `--force' option of `aclocal' has absolutely
-no effect on the files installed by `--install'.  For instance, if you
-have modified your local macros, do not expect `--install --force' to
+serial number.  So after it has found ‘/usr/share/aclocal/thirdparty.m4’
+with serial 2, ‘aclocal’ will proceed as if it had never seen
+‘m4/thirdparty.m4’.  This brings us back to a situation similar to that
+at the beginning of our example, where no local file defined the macro.
+‘aclocal’ will install the new version of the macro in
+‘m4/thirdparty.m4’, in this case overriding the old version.  MyPackage
+just had its macro updated as a side effect of running ‘aclocal’.
+
+   If you are leery of letting ‘aclocal’ update your local macro, you
+can run ‘aclocal --diff’ to review the changes ‘aclocal --install’ would
+perform on these macros.
+
+   Finally, note that the ‘--force’ option of ‘aclocal’ has absolutely
+no effect on the files installed by ‘--install’.  For instance, if you
+have modified your local macros, do not expect ‘--install --force’ to
 replace the local macros by their system-wide versions.  If you want to
 do so, simply erase the local macros you want to revert, and run
-`aclocal -I m4 --install'.
+‘aclocal --install’.
 
 \1f
 File: automake.info,  Node: Future of aclocal,  Prev: Serials,  Up: aclocal Invocation
 
-6.3.6 The Future of `aclocal'
+6.3.6 The Future of ‘aclocal’
 -----------------------------
 
-`aclocal' is expected to disappear.  This feature really should not be
-offered by Automake.  Automake should focus on generating `Makefile's;
-dealing with M4 macros really is Autoconf's job.  The fact that some
-people install Automake just to use `aclocal', but do not use
-`automake' otherwise is an indication of how that feature is misplaced.
+‘aclocal’ is expected to disappear.  This feature really should not be
+offered by Automake.  Automake should focus on generating ‘Makefile’s;
+dealing with M4 macros really is Autoconfs job.  The fact that some
+people install Automake just to use ‘aclocal’, but do not use ‘automake’
+otherwise is an indication of how that feature is misplaced.
 
    The new implementation will probably be done slightly differently.
-For instance, it could enforce the `m4/'-style layout discussed in
-*note Local Macros::.
+For instance, it could enforce the ‘m4/’-style layout discussed in *note
+Local Macros::.
 
    We have no idea when and how this will happen.  This has been
 discussed several times in the past, but someone still has to commit to
 that non-trivial task.
 
-   From the user point of view, `aclocal''s removal might turn out to
-be painful.  There is a simple precaution that you may take to make
-that switch more seamless: never call `aclocal' yourself.  Keep this
-guy under the exclusive control of `autoreconf' and Automake's rebuild
-rules.  Hopefully you won't need to worry about things breaking, when
-`aclocal' disappears, because everything will have been taken care of.
-If otherwise you used to call `aclocal' directly yourself or from some
+   From the user point of view, ‘aclocal’’s removal might turn out to be
+painful.  There is a simple precaution that you may take to make that
+switch more seamless: never call ‘aclocal’ yourself.  Keep this guy
+under the exclusive control of ‘autoreconf’ and Automake’s rebuild
+rules.  Hopefully you wont need to worry about things breaking, when
+‘aclocal’ disappears, because everything will have been taken care of.
+If otherwise you used to call ‘aclocal’ directly yourself or from some
 script, you will quickly notice the change.
 
-   Many packages come with a script called `bootstrap.sh' or
-`autogen.sh', that will just call `aclocal', `libtoolize', `gettextize'
-or `autopoint', `autoconf', `autoheader', and `automake' in the right
-order.  Actually this is precisely what `autoreconf' can do for you.
-If your package has such a `bootstrap.sh' or `autogen.sh' script,
-consider using `autoreconf'.  That should simplify its logic a lot
-(less things to maintain, yum!), it's even likely you will not need the
-script anymore, and more to the point you will not call `aclocal'
-directly anymore.
+   Many packages come with a script called ‘bootstrap’ or ‘autogen.sh’,
+that will just call ‘aclocal’, ‘libtoolize’, ‘gettextize’ or
+‘autopoint’, ‘autoconf’, ‘autoheader’, and ‘automake’ in the right
+order.  Actually this is precisely what ‘autoreconf’ can do for you.  If
+your package has such a ‘bootstrap’ or ‘autogen.sh’ script, consider
+using ‘autoreconf’.  That should simplify its logic a lot (less things
+to maintain, yum!), it’s even likely you will not need the script
+anymore, and more to the point you will not call ‘aclocal’ directly
+anymore.
 
    For the time being, third-party packages should continue to install
-public macros into `/usr/share/aclocal/'.  If `aclocal' is replaced by
-another tool it might make sense to rename the directory, but
-supporting `/usr/share/aclocal/' for backward compatibility should be
-really easy provided all macros are properly written (*note Extending
-aclocal::).
+public macros into ‘/usr/share/aclocal/’.  If ‘aclocal’ is replaced by
+another tool it might make sense to rename the directory, but supporting
+‘/usr/share/aclocal/’ for backward compatibility should be really easy
+provided all macros are properly written (*note Extending aclocal::).
 
 \1f
 File: automake.info,  Node: Macros,  Prev: aclocal Invocation,  Up: configure
@@ -3349,8 +3239,8 @@ File: automake.info,  Node: Macros,  Prev: aclocal Invocation,  Up: configure
 ==========================================
 
 Automake ships with several Autoconf macros that you can use from your
-`configure.ac'.  When you use one of them it will be included by
-`aclocal' in `aclocal.m4'.
+‘configure.ac’.  When you use one of them it will be included by
+‘aclocal’ in ‘aclocal.m4’.
 
 * Menu:
 
@@ -3364,24 +3254,33 @@ File: automake.info,  Node: Public Macros,  Next: Obsolete Macros,  Up: Macros
 6.4.1 Public Macros
 -------------------
 
-`AM_INIT_AUTOMAKE([OPTIONS])'
+‘AM_INIT_AUTOMAKE([OPTIONS])’
      Runs many macros required for proper operation of the generated
      Makefiles.
 
-     Today, `AM_INIT_AUTOMAKE' is called with a single argument: a
+     Today, ‘AM_INIT_AUTOMAKE’ is called with a single argument: a
      space-separated list of Automake options that should be applied to
-     every `Makefile.am' in the tree.  The effect is as if each option
-     were listed in `AUTOMAKE_OPTIONS' (*note Options::).
-
-     This macro can also be called in _another, deprecated form_
-     (support for which will be _removed in the next major Automake
-     release (1.13)_): `AM_INIT_AUTOMAKE(PACKAGE, VERSION,
-     [NO-DEFINE])'.  In this form, there are two required arguments:
-     the package and the version number.  This form is obsolete because
-     the PACKAGE and VERSION can be obtained from Autoconf's `AC_INIT'
-     macro (which itself has an old and a new form).
-
-     If your `configure.ac' has:
+     every ‘Makefile.am’ in the tree.  The effect is as if each option
+     were listed in ‘AUTOMAKE_OPTIONS’ (*note Options::).
+
+     This macro can also be called in another, _deprecated_ form:
+     ‘AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])’.  In this form,
+     there are two required arguments: the package and the version
+     number.  This usage is mostly obsolete because the PACKAGE and
+     VERSION can be obtained from Autoconf’s ‘AC_INIT’ macro.  However,
+     differently from what happens for ‘AC_INIT’ invocations, this
+     ‘AM_INIT_AUTOMAKE’ invocation supports shell variables’ expansions
+     in the ‘PACKAGE’ and ‘VERSION’ arguments (which otherwise defaults,
+     respectively, to the ‘PACKAGE_TARNAME’ and ‘PACKAGE_VERSION’
+     defined via the ‘AC_INIT’ invocation; *note The ‘AC_INIT’ macro:
+     (autoconf)AC_INIT.); and this can be still be useful in some
+     selected situations.  Our hope is that future Autoconf versions
+     will improve their support for package versions defined dynamically
+     at configure runtime; when (and if) this happens, support for the
+     two-args ‘AM_INIT_AUTOMAKE’ invocation will likely be removed from
+     Automake.
+
+     If your ‘configure.ac’ has:
 
           AC_INIT([src/foo.c])
           AM_INIT_AUTOMAKE([mumble], [1.5])
@@ -3392,80 +3291,89 @@ File: automake.info,  Node: Public Macros,  Next: Obsolete Macros,  Up: Macros
           AC_CONFIG_SRCDIR([src/foo.c])
           AM_INIT_AUTOMAKE
 
-     Note that if you're upgrading your `configure.ac' from an earlier
+     Note that if you’re upgrading your ‘configure.ac’ from an earlier
      version of Automake, it is not always correct to simply move the
-     package and version arguments from `AM_INIT_AUTOMAKE' directly to
-     `AC_INIT', as in the example above.  The first argument to
-     `AC_INIT' should be the name of your package (e.g., `GNU
-     Automake'), not the tarball name (e.g., `automake') that you used
-     to pass to `AM_INIT_AUTOMAKE'.  Autoconf tries to derive a tarball
+     package and version arguments from ‘AM_INIT_AUTOMAKE’ directly to
+     ‘AC_INIT’, as in the example above.  The first argument to
+     ‘AC_INIT’ should be the name of your package (e.g., ‘GNU
+     Automake’), not the tarball name (e.g., ‘automake’) that you used
+     to pass to ‘AM_INIT_AUTOMAKE’.  Autoconf tries to derive a tarball
      name from the package name, which should work for most but not all
-     package names.  (If it doesn't work for yours, you can use the
-     four-argument form of `AC_INIT' to provide the tarball name
+     package names.  (If it doesnt work for yours, you can use the
+     four-argument form of ‘AC_INIT’ to provide the tarball name
      explicitly).
 
-     By default this macro `AC_DEFINE''s `PACKAGE' and `VERSION'.  This
-     can be avoided by passing the `no-define' option:
-          AM_INIT_AUTOMAKE([gnits 1.5 no-define dist-bzip2])
+     By default this macro ‘AC_DEFINE’’s ‘PACKAGE’ and ‘VERSION’.  This
+     can be avoided by passing the ‘no-define’ option (*note List of
+     Automake options::):
+          AM_INIT_AUTOMAKE([no-define ...])
 
-`AM_PATH_LISPDIR'
-     Searches for the program `emacs', and, if found, sets the output
-     variable `lispdir' to the full path to Emacs' site-lisp directory.
+‘AM_PATH_LISPDIR’
+     Searches for the program ‘emacs’, and, if found, sets the output
+     variable ‘lispdir’ to the full path to Emacs’ site-lisp directory.
 
-     Note that this test assumes the `emacs' found to be a version that
+     Note that this test assumes the ‘emacs’ found to be a version that
      supports Emacs Lisp (such as GNU Emacs or XEmacs).  Other emacsen
-     can cause this test to hang (some, like old versions of
-     MicroEmacs, start up in interactive mode, requiring `C-x C-c' to
-     exit, which is hardly obvious for a non-emacs user).  In most
-     cases, however, you should be able to use `C-c' to kill the test.
-     In order to avoid problems, you can set `EMACS' to "no" in the
-     environment, or use the `--with-lispdir' option to `configure' to
-     explicitly set the correct path (if you're sure you have an
-     `emacs' that supports Emacs Lisp).
-
-`AM_PROG_AR([ACT-IF-FAIL])'
+     can cause this test to hang (some, like old versions of MicroEmacs,
+     start up in interactive mode, requiring ‘C-x C-c’ to exit, which is
+     hardly obvious for a non-emacs user).  In most cases, however, you
+     should be able to use ‘C-c’ to kill the test.  In order to avoid
+     problems, you can set ‘EMACS’ to “no” in the environment, or use
+     the ‘--with-lispdir’ option to ‘configure’ to explicitly set the
+     correct path (if you’re sure you have an ‘emacs’ that supports
+     Emacs Lisp).
+
+‘AM_PROG_AR([ACT-IF-FAIL])’
      You must use this macro when you use the archiver in your project,
-     if you want support for unusual archivers such as Microsoft `lib'.
+     if you want support for unusual archivers such as Microsoft ‘lib’.
      The content of the optional argument is executed if the archiver
      interface is not recognized; the default action is to abort
      configure with an error message.
 
-`AM_PROG_AS'
+‘AM_PROG_AS’
      Use this macro when you have assembly code in your project.  This
      will choose the assembler for you (by default the C compiler) and
-     set `CCAS', and will also set `CCASFLAGS' if required.
-
-`AM_PROG_CC_C_O'
-     This is like `AC_PROG_CC_C_O', but it generates its results in the
-     manner required by Automake.  You must use this instead of
-     `AC_PROG_CC_C_O' when you need this functionality, that is, when
-     using per-target flags or subdir-objects with C sources.
-
-`AM_PROG_LEX'
-     Like `AC_PROG_LEX' (*note Particular Program Checks:
-     (autoconf)Particular Programs.), but uses the `missing' script on
-     systems that do not have `lex'.  HP-UX 10 is one such system.
-
-`AM_PROG_GCJ'
-     This macro finds the `gcj' program or causes an error.  It sets
-     `GCJ' and `GCJFLAGS'.  `gcj' is the Java front-end to the GNU
+     set ‘CCAS’, and will also set ‘CCASFLAGS’ if required.
+
+‘AM_PROG_CC_C_O’
+     This is an obsolescent macro that checks that the C compiler
+     supports the ‘-c’ and ‘-o’ options together.  Note that, since
+     Automake 1.14, the ‘AC_PROG_CC’ is rewritten to implement such
+     checks itself, and thus the explicit use of ‘AM_PROG_CC_C_O’ should
+     no longer be required.
+
+‘AM_PROG_LEX’
+     Like ‘AC_PROG_LEX’ (*note Particular Program Checks:
+     (autoconf)Particular Programs.), but uses the ‘missing’ script on
+     systems that do not have ‘lex’.  HP-UX 10 is one such system.
+
+‘AM_PROG_GCJ’
+     This macro finds the ‘gcj’ program or causes an error.  It sets
+     ‘GCJ’ and ‘GCJFLAGS’.  ‘gcj’ is the Java front-end to the GNU
      Compiler Collection.
 
-`AM_PROG_UPC([COMPILER-SEARCH-LIST])'
-     Find a compiler for Unified Parallel C and define the `UPC'
-     variable.  The default COMPILER-SEARCH-LIST is `upcc upc'.  This
-     macro will abort `configure' if no Unified Parallel C compiler is
+‘AM_PROG_UPC([COMPILER-SEARCH-LIST])’
+     Find a compiler for Unified Parallel C and define the ‘UPC’
+     variable.  The default COMPILER-SEARCH-LIST is ‘upcc upc’.  This
+     macro will abort ‘configure’ if no Unified Parallel C compiler is
      found.
 
-`AM_SILENT_RULES'
-     Enable the machinery for less verbose build output (*note
-     Options::).
+‘AM_MISSING_PROG(NAME, PROGRAM)’
+     Find a maintainer tool PROGRAM and define the NAME environment
+     variable with its location.  If PROGRAM is not detected, then NAME
+     will instead invoke the ‘missing’ script, in order to give useful
+     advice to the user about the missing maintainer tool.  *Note
+     maintainer-mode::, for more information on when the ‘missing’
+     script is appropriate.
 
-`AM_WITH_DMALLOC'
-     Add support for the Dmalloc package (http://dmalloc.com/).  If the
-     user runs `configure' with `--with-dmalloc', then define
-     `WITH_DMALLOC' and add `-ldmalloc' to `LIBS'.
+‘AM_SILENT_RULES’
+     Control the machinery for less verbose build output (*note Automake
+     Silent Rules::).
 
+‘AM_WITH_DMALLOC’
+     Add support for the Dmalloc package (http://dmalloc.com/).  If the
+     user runs ‘configure’ with ‘--with-dmalloc’, then define
+     ‘WITH_DMALLOC’ and add ‘-ldmalloc’ to ‘LIBS’.
 
 \1f
 File: automake.info,  Node: Obsolete Macros,  Next: Private Macros,  Prev: Public Macros,  Up: Macros
@@ -3474,45 +3382,27 @@ File: automake.info,  Node: Obsolete Macros,  Next: Private Macros,  Prev: Publi
 ---------------------
 
 Although using some of the following macros was required in past
-releases, you should not use any of them in new code.  _All these
-macros will be removed in the next major Automake version_; if you are
-still using them, running `autoupdate' should adjust your
-`configure.ac' automatically (*note Using `autoupdate' to Modernize
-`configure.ac': (autoconf)autoupdate Invocation.).  _Do it NOW!_
-
-`AM_CONFIG_HEADER'
-     Automake will generate rules to automatically regenerate the config
-     header.  This obsolete macro is a synonym of `AC_CONFIG_HEADERS'
-     today (*note Optional::).
-
-`AM_HEADER_TIOCGWINSZ_NEEDS_SYS_IOCTL'
-     If the use of `TIOCGWINSZ' requires `<sys/ioctl.h>', then define
-     `GWINSZ_IN_SYS_IOCTL'.  Otherwise `TIOCGWINSZ' can be found in
-     `<termios.h>'.  This macro is obsolete, you should use Autoconf's
-     `AC_HEADER_TIOCGWINSZ' instead.
-
-`AM_PROG_MKDIR_P'
+releases, you should not use any of them in new code.  _All these macros
+will be removed in the next major Automake version_; if you are still
+using them, running ‘autoupdate’ should adjust your ‘configure.ac’
+automatically (*note Using ‘autoupdate’ to Modernize ‘configure.ac’:
+(autoconf)autoupdate Invocation.).  _Do it NOW!_
+
+‘AM_PROG_MKDIR_P’
+
      From Automake 1.8 to 1.9.6 this macro used to define the output
-     variable `mkdir_p' to one of `mkdir -p', `install-sh -d', or
-     `mkinstalldirs'.
+     variable ‘mkdir_p’ to one of ‘mkdir -p’, ‘install-sh -d’, or
+     ‘mkinstalldirs’.
 
      Nowadays Autoconf provides a similar functionality with
-     `AC_PROG_MKDIR_P' (*note Particular Program Checks:
+     ‘AC_PROG_MKDIR_P’ (*note Particular Program Checks:
      (autoconf)Particular Programs.), however this defines the output
-     variable `MKDIR_P' instead.  In case you are still using the
-     `AM_PROG_MKDIR_P' macro in your `configure.ac', or its provided
-     variable `$(mkdir_p)' in your `Makefile.am', you are advised to
-     switch ASAP to the more modern Autoconf-provided interface
-     instead; both the macro and the variable _will be removed_ in the
-     next major Automake release.
-
-`AM_SYS_POSIX_TERMIOS'
-     Check to see if POSIX termios headers and functions are available
-     on the system.  If so, set the shell variable
-     `am_cv_sys_posix_termios' to `yes'.  If not, set the variable to
-     `no'.  This macro is obsolete, you should use Autoconf's
-     `AC_SYS_POSIX_TERMIOS' instead.
-
+     variable ‘MKDIR_P’ instead.  In case you are still using the
+     ‘AM_PROG_MKDIR_P’ macro in your ‘configure.ac’, or its provided
+     variable ‘$(mkdir_p)’ in your ‘Makefile.am’, you are advised to
+     switch ASAP to the more modern Autoconf-provided interface instead;
+     both the macro and the variable might be removed in a future major
+     Automake release.
 
 \1f
 File: automake.info,  Node: Private Macros,  Prev: Obsolete Macros,  Up: Macros
@@ -3526,30 +3416,29 @@ rely on them, as they might be changed in a future version.  Consider
 them as implementation details; or better, do not consider them at all:
 skip this section!
 
-`_AM_DEPENDENCIES'
-`AM_SET_DEPDIR'
-`AM_DEP_TRACK'
-`AM_OUTPUT_DEPENDENCY_COMMANDS'
-     These macros are used to implement Automake's automatic dependency
+‘_AM_DEPENDENCIES’
+‘AM_SET_DEPDIR’
+‘AM_DEP_TRACK’
+‘AM_OUTPUT_DEPENDENCY_COMMANDS’
+     These macros are used to implement Automakes automatic dependency
      tracking scheme.  They are called automatically by Automake when
      required, and there should be no need to invoke them manually.
 
-`AM_MAKE_INCLUDE'
-     This macro is used to discover how the user's `make' handles
-     `include' statements.  This macro is automatically invoked when
+‘AM_MAKE_INCLUDE’
+     This macro is used to discover how the user’s ‘make’ handles
+     ‘include’ statements.  This macro is automatically invoked when
      needed; there should be no need to invoke it manually.
 
-`AM_PROG_INSTALL_STRIP'
-     This is used to find a version of `install' that can be used to
+‘AM_PROG_INSTALL_STRIP’
+     This is used to find a version of ‘install’ that can be used to
      strip a program at installation time.  This macro is automatically
      included when required.
 
-`AM_SANITY_CHECK'
-     This checks to make sure that a file created in the build
-     directory is newer than a file in the source directory.  This can
-     fail on systems where the clock is set incorrectly.  This macro is
-     automatically run from `AM_INIT_AUTOMAKE'.
-
+‘AM_SANITY_CHECK’
+     This checks to make sure that a file created in the build directory
+     is newer than a file in the source directory.  This can fail on
+     systems where the clock is set incorrectly.  This macro is
+     automatically run from ‘AM_INIT_AUTOMAKE’.
 
 \1f
 File: automake.info,  Node: Directories,  Next: Programs,  Prev: configure,  Up: Top
@@ -3558,16 +3447,27 @@ File: automake.info,  Node: Directories,  Next: Programs,  Prev: configure,  Up:
 *************
 
 For simple projects that distribute all files in the same directory it
-is enough to have a single `Makefile.am' that builds everything in
+is enough to have a single ‘Makefile.am’ that builds everything in
 place.
 
-   In larger projects it is common to organize files in different
-directories, in a tree.  For instance one directory per program, per
-library or per module.  The traditional approach is to build these
-subdirectories recursively: each directory contains its `Makefile'
-(generated from `Makefile.am'), and when `make' is run from the top
-level directory it enters each subdirectory in turn to build its
-contents.
+   In larger projects, it is common to organize files in different
+directories, in a tree.  For example, there could be a directory for the
+program’s source, one for the testsuite, and one for the documentation;
+or, for very large projects, there could be one directory per program,
+per library or per module.
+
+   The traditional approach is to build these subdirectories
+recursively, employing _make recursion_: each directory contains its own
+‘Makefile’, and when ‘make’ is run from the top-level directory, it
+enters each subdirectory in turn, and invokes there a new ‘make’
+instance to build the directory’s contents.
+
+   Because this approach is very widespread, Automake offers built-in
+support for it.  However, it is worth nothing that the use of make
+recursion has its own serious issues and drawbacks, and that it’s well
+possible to have packages with a multi directory layout that make little
+or no use of such recursion (examples of such packages are GNU Bison and
+GNU Automake itself); see also the *note Alternative:: section below.
 
 * Menu:
 
@@ -3582,52 +3482,76 @@ File: automake.info,  Node: Subdirectories,  Next: Conditional Subdirectories,
 7.1 Recursing subdirectories
 ============================
 
-In packages with subdirectories, the top level `Makefile.am' must tell
+In packages using make recursion, the top level ‘Makefile.am’ must tell
 Automake which subdirectories are to be built.  This is done via the
-`SUBDIRS' variable.  
+‘SUBDIRS’ variable.
 
-   The `SUBDIRS' variable holds a list of subdirectories in which
+   The ‘SUBDIRS’ variable holds a list of subdirectories in which
 building of various sorts can occur.  The rules for many targets (e.g.,
-`all') in the generated `Makefile' will run commands both locally and
-in all specified subdirectories.  Note that the directories listed in
-`SUBDIRS' are not required to contain `Makefile.am's; only `Makefile's
-(after configuration).  This allows inclusion of libraries from
-packages that do not use Automake (such as `gettext'; see also *note
-Third-Party Makefiles::).
-
-   In packages that use subdirectories, the top-level `Makefile.am' is
-often very short.  For instance, here is the `Makefile.am' from the GNU
+‘all’) in the generated ‘Makefile’ will run commands both locally and in
+all specified subdirectories.  Note that the directories listed in
+‘SUBDIRS’ are not required to contain ‘Makefile.am’s; only ‘Makefile’s
+(after configuration).  This allows inclusion of libraries from packages
+that do not use Automake (such as ‘gettext’; see also *note Third-Party
+Makefiles::).
+
+   In packages that use subdirectories, the top-level ‘Makefile.am’ is
+often very short.  For instance, here is the ‘Makefile.am’ from the GNU
 Hello distribution:
 
      EXTRA_DIST = BUGS ChangeLog.O README-alpha
      SUBDIRS = doc intl po src tests
 
-   When Automake invokes `make' in a subdirectory, it uses the value of
-the `MAKE' variable.  It passes the value of the variable
-`AM_MAKEFLAGS' to the `make' invocation; this can be set in
-`Makefile.am' if there are flags you must always pass to `make'.  
+   When Automake invokes ‘make’ in a subdirectory, it uses the value of
+the ‘MAKE’ variable.  It passes the value of the variable ‘AM_MAKEFLAGS’
+to the ‘make’ invocation; this can be set in ‘Makefile.am’ if there are
+flags you must always pass to ‘make’.
 
-   The directories mentioned in `SUBDIRS' are usually direct children
-of the current directory, each subdirectory containing its own
-`Makefile.am' with a `SUBDIRS' pointing to deeper subdirectories.
+   The directories mentioned in ‘SUBDIRS’ are usually direct children of
+the current directory, each subdirectory containing its own
+‘Makefile.am’ with a ‘SUBDIRS’ pointing to deeper subdirectories.
 Automake can be used to construct packages of arbitrary depth this way.
 
-   By default, Automake generates `Makefiles' that work depth-first in
+   By default, Automake generates ‘Makefiles’ that work depth-first in
 postfix order: the subdirectories are built before the current
-directory.  However, it is possible to change this ordering.  You can
-do this by putting `.' into `SUBDIRS'.  For instance, putting `.' first
+directory.  However, it is possible to change this ordering.  You can do
+this by putting ‘.’ into ‘SUBDIRS’.  For instance, putting ‘.’ first
 will cause a prefix ordering of directories.
 
    Using
 
      SUBDIRS = lib src . test
 
-will cause `lib/' to be built before `src/', then the current directory
-will be built, finally the `test/' directory will be built.  It is
+will cause ‘lib/’ to be built before ‘src/’, then the current directory
+will be built, finally the ‘test/’ directory will be built.  It is
 customary to arrange test directories to be built after everything else
 since they are meant to test what has been constructed.
 
-   All `clean' rules are run in reverse order of build rules.
+   In addition to the built-in recursive targets defined by Automake
+(‘all’, ‘check’, etc.), the developer can also define his own recursive
+targets.  That is done by passing the names of such targets as arguments
+to the m4 macro ‘AM_EXTRA_RECURSIVE_TARGETS’ in ‘configure.ac’.
+Automake generates rules to handle the recursion for such targets; and
+the developer can define real actions for them by defining corresponding
+‘-local’ targets.
+
+     % cat configure.ac
+     AC_INIT([pkg-name], [1.0]
+     AM_INIT_AUTOMAKE
+     AM_EXTRA_RECURSIVE_TARGETS([foo])
+     AC_CONFIG_FILES([Makefile sub/Makefile sub/src/Makefile])
+     AC_OUTPUT
+     % cat Makefile.am
+     SUBDIRS = sub
+     foo-local:
+             @echo This will be run by "make foo".
+     % cat sub/Makefile.am
+     SUBDIRS = src
+     % cat sub/src/Makefile.am
+     foo-local:
+             @echo This too will be run by a "make foo" issued either in
+             @echo the 'sub/src/' directory, the 'sub/' directory, or the
+             @echo top-level directory.
 
 \1f
 File: automake.info,  Node: Conditional Subdirectories,  Next: Alternative,  Prev: Subdirectories,  Up: Directories
@@ -3635,87 +3559,87 @@ File: automake.info,  Node: Conditional Subdirectories,  Next: Alternative,  Pre
 7.2 Conditional Subdirectories
 ==============================
 
-It is possible to define the `SUBDIRS' variable conditionally if, like
+It is possible to define the ‘SUBDIRS’ variable conditionally if, like
 in the case of GNU Inetutils, you want to only build a subset of the
 entire package.
 
-   To illustrate how this works, let's assume we have two directories
-`src/' and `opt/'.  `src/' should always be built, but we want to
-decide in `configure' whether `opt/' will be built or not.  (For this
-example we will assume that `opt/' should be built when the variable
-`$want_opt' was set to `yes'.)
+   To illustrate how this works, lets assume we have two directories
+‘src/’ and ‘opt/’.  ‘src/’ should always be built, but we want to decide
+in ‘configure’ whether ‘opt/’ will be built or not.  (For this example
+we will assume that ‘opt/’ should be built when the variable ‘$want_opt’
+was set to ‘yes’.)
 
-   Running `make' should thus recurse into `src/' always, and then
-maybe in `opt/'.
+   Running ‘make’ should thus recurse into ‘src/’ always, and then maybe
+in ‘opt/’.
 
-   However `make dist' should always recurse into both `src/' and
-`opt/'.  Because `opt/' should be distributed even if it is not needed
-in the current configuration.  This means `opt/Makefile' should be
+   However ‘make dist’ should always recurse into both ‘src/’ and
+‘opt/’.  Because ‘opt/’ should be distributed even if it is not needed
+in the current configuration.  This means ‘opt/Makefile’ should be
 created _unconditionally_.
 
    There are two ways to setup a project like this.  You can use
-Automake conditionals (*note Conditionals::) or use Autoconf `AC_SUBST'
+Automake conditionals (*note Conditionals::) or use Autoconf ‘AC_SUBST’
 variables (*note Setting Output Variables: (autoconf)Setting Output
 Variables.).  Using Automake conditionals is the preferred solution.
-Before we illustrate these two possibilities, let's introduce
-`DIST_SUBDIRS'.
+Before we illustrate these two possibilities, lets introduce
+‘DIST_SUBDIRS’.
 
 * Menu:
 
 * SUBDIRS vs DIST_SUBDIRS::     Two sets of directories
 * Subdirectories with AM_CONDITIONAL::  Specifying conditional subdirectories
 * Subdirectories with AC_SUBST::  Another way for conditional recursion
-* Unconfigured Subdirectories::  Not even creating a `Makefile'
+* Unconfigured Subdirectories::  Not even creating a ‘Makefile’
 
 \1f
 File: automake.info,  Node: SUBDIRS vs DIST_SUBDIRS,  Next: Subdirectories with AM_CONDITIONAL,  Up: Conditional Subdirectories
 
-7.2.1 `SUBDIRS' vs. `DIST_SUBDIRS'
+7.2.1 ‘SUBDIRS’ vs. ‘DIST_SUBDIRS’
 ----------------------------------
 
 Automake considers two sets of directories, defined by the variables
-`SUBDIRS' and `DIST_SUBDIRS'.
+‘SUBDIRS’ and ‘DIST_SUBDIRS’.
 
-   `SUBDIRS' contains the subdirectories of the current directory that
+   ‘SUBDIRS’ contains the subdirectories of the current directory that
 must be built (*note Subdirectories::).  It must be defined manually;
-Automake will never guess a directory is to be built.  As we will see
-in the next two sections, it is possible to define it conditionally so
-that some directory will be omitted from the build.
+Automake will never guess a directory is to be built.  As we will see in
+the next two sections, it is possible to define it conditionally so that
+some directory will be omitted from the build.
 
-   `DIST_SUBDIRS' is used in rules that need to recurse in all
+   ‘DIST_SUBDIRS’ is used in rules that need to recurse in all
 directories, even those that have been conditionally left out of the
 build.  Recall our example where we may not want to build subdirectory
-`opt/', but yet we want to distribute it?  This is where `DIST_SUBDIRS'
-comes into play: `opt' may not appear in `SUBDIRS', but it must appear
-in `DIST_SUBDIRS'.
+‘opt/’, but yet we want to distribute it?  This is where ‘DIST_SUBDIRS’
+comes into play: ‘opt’ may not appear in ‘SUBDIRS’, but it must appear
+in ‘DIST_SUBDIRS’.
 
-   Precisely, `DIST_SUBDIRS' is used by `make maintainer-clean', `make
-distclean' and `make dist'.  All other recursive rules use `SUBDIRS'.
+   Precisely, ‘DIST_SUBDIRS’ is used by ‘make maintainer-clean’, ‘make
+distclean’ and ‘make dist’.  All other recursive rules use ‘SUBDIRS’.
 
-   If `SUBDIRS' is defined conditionally using Automake conditionals,
-Automake will define `DIST_SUBDIRS' automatically from the possible
-values of `SUBDIRS' in all conditions.
+   If ‘SUBDIRS’ is defined conditionally using Automake conditionals,
+Automake will define ‘DIST_SUBDIRS’ automatically from the possible
+values of ‘SUBDIRS’ in all conditions.
 
-   If `SUBDIRS' contains `AC_SUBST' variables, `DIST_SUBDIRS' will not
+   If ‘SUBDIRS’ contains ‘AC_SUBST’ variables, ‘DIST_SUBDIRS’ will not
 be defined correctly because Automake does not know the possible values
-of these variables.  In this case `DIST_SUBDIRS' needs to be defined
+of these variables.  In this case ‘DIST_SUBDIRS’ needs to be defined
 manually.
 
 \1f
 File: automake.info,  Node: Subdirectories with AM_CONDITIONAL,  Next: Subdirectories with AC_SUBST,  Prev: SUBDIRS vs DIST_SUBDIRS,  Up: Conditional Subdirectories
 
-7.2.2 Subdirectories with `AM_CONDITIONAL'
+7.2.2 Subdirectories with ‘AM_CONDITIONAL’
 ------------------------------------------
 
-`configure' should output the `Makefile' for each directory and define
-a condition into which `opt/' should be built.
+‘configure’ should output the ‘Makefile’ for each directory and define a
+condition into which ‘opt/’ should be built.
 
      ...
      AM_CONDITIONAL([COND_OPT], [test "$want_opt" = yes])
      AC_CONFIG_FILES([Makefile src/Makefile opt/Makefile])
      ...
 
-   Then `SUBDIRS' can be defined in the top-level `Makefile.am' as
+   Then ‘SUBDIRS’ can be defined in the top-level ‘Makefile.am’ as
 follows.
 
      if COND_OPT
@@ -3723,25 +3647,25 @@ follows.
      endif
      SUBDIRS = src $(MAYBE_OPT)
 
-   As you can see, running `make' will rightly recurse into `src/' and
-maybe `opt/'.
+   As you can see, running ‘make’ will rightly recurse into ‘src/’ and
+maybe ‘opt/’.
 
-   As you can't see, running `make dist' will recurse into both `src/'
-and `opt/' directories because `make dist', unlike `make all', doesn't
-use the `SUBDIRS' variable.  It uses the `DIST_SUBDIRS' variable.
+   As you can’t see, running ‘make dist’ will recurse into both ‘src/’
+and ‘opt/’ directories because ‘make dist’, unlike ‘make all’, doesn’t
+use the ‘SUBDIRS’ variable.  It uses the ‘DIST_SUBDIRS’ variable.
 
-   In this case Automake will define `DIST_SUBDIRS = src opt'
-automatically because it knows that `MAYBE_OPT' can contain `opt' in
+   In this case Automake will define ‘DIST_SUBDIRS = src opt’
+automatically because it knows that ‘MAYBE_OPT’ can contain ‘opt’ in
 some condition.
 
 \1f
 File: automake.info,  Node: Subdirectories with AC_SUBST,  Next: Unconfigured Subdirectories,  Prev: Subdirectories with AM_CONDITIONAL,  Up: Conditional Subdirectories
 
-7.2.3 Subdirectories with `AC_SUBST'
+7.2.3 Subdirectories with ‘AC_SUBST’
 ------------------------------------
 
-Another possibility is to define `MAYBE_OPT' from `./configure' using
-`AC_SUBST':
+Another possibility is to define ‘MAYBE_OPT’ from ‘./configure’ using
+‘AC_SUBST’:
 
      ...
      if test "$want_opt" = yes; then
@@ -3753,13 +3677,13 @@ Another possibility is to define `MAYBE_OPT' from `./configure' using
      AC_CONFIG_FILES([Makefile src/Makefile opt/Makefile])
      ...
 
-   In this case the top-level `Makefile.am' should look as follows.
+   In this case the top-level ‘Makefile.am’ should look as follows.
 
      SUBDIRS = src $(MAYBE_OPT)
      DIST_SUBDIRS = src opt
 
    The drawback is that since Automake cannot guess what the possible
-values of `MAYBE_OPT' are, it is necessary to define `DIST_SUBDIRS'.
+values of ‘MAYBE_OPT’ are, it is necessary to define ‘DIST_SUBDIRS’.
 
 \1f
 File: automake.info,  Node: Unconfigured Subdirectories,  Prev: Subdirectories with AC_SUBST,  Up: Conditional Subdirectories
@@ -3767,19 +3691,19 @@ File: automake.info,  Node: Unconfigured Subdirectories,  Prev: Subdirectories w
 7.2.4 Unconfigured Subdirectories
 ---------------------------------
 
-The semantics of `DIST_SUBDIRS' are often misunderstood by some users
-that try to _configure and build_ subdirectories conditionally.  Here
-by configuring we mean creating the `Makefile' (it might also involve
-running a nested `configure' script: this is a costly operation that
-explains why people want to do it conditionally, but only the `Makefile'
+The semantics of ‘DIST_SUBDIRS’ are often misunderstood by some users
+that try to _configure and build_ subdirectories conditionally.  Here by
+configuring we mean creating the ‘Makefile’ (it might also involve
+running a nested ‘configure’ script: this is a costly operation that
+explains why people want to do it conditionally, but only the ‘Makefile’
 is relevant to the discussion).
 
-   The above examples all assume that every `Makefile' is created, even
+   The above examples all assume that every ‘Makefile’ is created, even
 in directories that are not going to be built.  The simple reason is
-that we want `make dist' to distribute even the directories that are
-not being built (e.g., platform-dependent code), hence `make dist' must
+that we want ‘make dist’ to distribute even the directories that are not
+being built (e.g., platform-dependent code), hence ‘make dist’ must
 recurse into the subdirectory, hence this directory must be configured
-and appear in `DIST_SUBDIRS'.
+and appear in ‘DIST_SUBDIRS’.
 
    Building packages that do not configure every subdirectory is a
 tricky business, and we do not recommend it to the novice as it is easy
@@ -3787,47 +3711,44 @@ to produce an incomplete tarball by mistake.  We will not discuss this
 topic in depth here, yet for the adventurous here are a few rules to
 remember.
 
-   * `SUBDIRS' should always be a subset of `DIST_SUBDIRS'.
+   • ‘SUBDIRS’ should always be a subset of ‘DIST_SUBDIRS’.
 
-     It makes little sense to have a directory in `SUBDIRS' that is not
-     in `DIST_SUBDIRS'.  Think of the former as a way to tell which
+     It makes little sense to have a directory in ‘SUBDIRS’ that is not
+     in ‘DIST_SUBDIRS’.  Think of the former as a way to tell which
      directories listed in the latter should be built.
-
-   * Any directory listed in `DIST_SUBDIRS' and `SUBDIRS' must be
+   • Any directory listed in ‘DIST_SUBDIRS’ and ‘SUBDIRS’ must be
      configured.
 
-     I.e., the `Makefile' must exists or the recursive `make' rules
-     will not be able to process the directory.
-
-   * Any configured directory must be listed in `DIST_SUBDIRS'.
+     I.e., the ‘Makefile’ must exists or the recursive ‘make’ rules will
+     not be able to process the directory.
+   • Any configured directory must be listed in ‘DIST_SUBDIRS’.
 
-     So that the cleaning rules remove the generated `Makefile's.  It
-     would be correct to see `DIST_SUBDIRS' as a variable that lists
-     all the directories that have been configured.
+     So that the cleaning rules remove the generated ‘Makefile’s.  It
+     would be correct to see ‘DIST_SUBDIRS’ as a variable that lists all
+     the directories that have been configured.
 
-   In order to prevent recursion in some unconfigured directory you
-must therefore ensure that this directory does not appear in
-`DIST_SUBDIRS' (and `SUBDIRS').  For instance, if you define `SUBDIRS'
-conditionally using `AC_SUBST' and do not define `DIST_SUBDIRS'
-explicitly, it will be default to `$(SUBDIRS)'; another possibility is
-to force `DIST_SUBDIRS = $(SUBDIRS)'.
+   In order to prevent recursion in some unconfigured directory you must
+therefore ensure that this directory does not appear in ‘DIST_SUBDIRS’
+(and ‘SUBDIRS’).  For instance, if you define ‘SUBDIRS’ conditionally
+using ‘AC_SUBST’ and do not define ‘DIST_SUBDIRS’ explicitly, it will be
+default to ‘$(SUBDIRS)’; another possibility is to force ‘DIST_SUBDIRS =
+$(SUBDIRS)’.
 
-   Of course, directories that are omitted from `DIST_SUBDIRS' will not
+   Of course, directories that are omitted from ‘DIST_SUBDIRS’ will not
 be distributed unless you make other arrangements for this to happen
-(for instance, always running `make dist' in a configuration where all
-directories are known to appear in `DIST_SUBDIRS'; or writing a
-`dist-hook' target to distribute these directories).
-
-   In few packages, unconfigured directories are not even expected to
-be distributed.  Although these packages do not require the
-aforementioned extra arrangements, there is another pitfall.  If the
-name of a directory appears in `SUBDIRS' or `DIST_SUBDIRS', `automake'
-will make sure the directory exists.  Consequently `automake' cannot be
-run on such a distribution when one directory has been omitted.  One
-way to avoid this check is to use the `AC_SUBST' method to declare
-conditional directories; since `automake' does not know the values of
-`AC_SUBST' variables it cannot ensure the corresponding directory
-exists.
+(for instance, always running ‘make dist’ in a configuration where all
+directories are known to appear in ‘DIST_SUBDIRS’; or writing a
+‘dist-hook’ target to distribute these directories).
+
+   In few packages, unconfigured directories are not even expected to be
+distributed.  Although these packages do not require the aforementioned
+extra arrangements, there is another pitfall.  If the name of a
+directory appears in ‘SUBDIRS’ or ‘DIST_SUBDIRS’, ‘automake’ will make
+sure the directory exists.  Consequently ‘automake’ cannot be run on
+such a distribution when one directory has been omitted.  One way to
+avoid this check is to use the ‘AC_SUBST’ method to declare conditional
+directories; since ‘automake’ does not know the values of ‘AC_SUBST’
+variables it cannot ensure the corresponding directory exists.
 
 \1f
 File: automake.info,  Node: Alternative,  Next: Subpackages,  Prev: Conditional Subdirectories,  Up: Directories
@@ -3835,51 +3756,51 @@ File: automake.info,  Node: Alternative,  Next: Subpackages,  Prev: Conditional
 7.3 An Alternative Approach to Subdirectories
 =============================================
 
-If you've ever read Peter Miller's excellent paper, Recursive Make
+If you’ve ever read Peter Miller’s excellent paper, Recursive Make
 Considered Harmful (http://miller.emu.id.au/pmiller/books/rmch/), the
-preceding sections on the use of subdirectories will probably come as
-unwelcome advice.  For those who haven't read the paper, Miller's main
-thesis is that recursive `make' invocations are both slow and
+preceding sections on the use of make recursion will probably come as
+unwelcome advice.  For those who haven’t read the paper, Miller’s main
+thesis is that recursive ‘make’ invocations are both slow and
 error-prone.
 
    Automake provides sufficient cross-directory support (1) to enable
-you to write a single `Makefile.am' for a complex multi-directory
+you to write a single ‘Makefile.am’ for a complex multi-directory
 package.
 
    By default an installable file specified in a subdirectory will have
 its directory name stripped before installation.  For instance, in this
-example, the header file will be installed as `$(includedir)/stdio.h':
+example, the header file will be installed as ‘$(includedir)/stdio.h’:
 
      include_HEADERS = inc/stdio.h
 
-   However, the `nobase_' prefix can be used to circumvent this path
+   However, the ‘nobase_’ prefix can be used to circumvent this path
 stripping.  In this example, the header file will be installed as
-`$(includedir)/sys/types.h':
+‘$(includedir)/sys/types.h’:
 
      nobase_include_HEADERS = sys/types.h
 
-   `nobase_' should be specified first when used in conjunction with
-either `dist_' or `nodist_' (*note Fine-grained Distribution
-Control::).  For instance:
+   ‘nobase_’ should be specified first when used in conjunction with
+either ‘dist_’ or ‘nodist_’ (*note Fine-grained Distribution Control::).
+For instance:
 
      nobase_dist_pkgdata_DATA = images/vortex.pgm sounds/whirl.ogg
 
-   Finally, note that a variable using the `nobase_' prefix can often
-be replaced by several variables, one for each destination directory
-(*note Uniform::).  For instance, the last example could be rewritten
-as follows:
+   Finally, note that a variable using the ‘nobase_’ prefix can often be
+replaced by several variables, one for each destination directory (*note
+Uniform::).  For instance, the last example could be rewritten as
+follows:
 
      imagesdir = $(pkgdatadir)/images
      soundsdir = $(pkgdatadir)/sounds
      dist_images_DATA = images/vortex.pgm
      dist_sounds_DATA = sounds/whirl.ogg
 
-This latter syntax makes it possible to change one destination
-directory without changing the layout of the source tree.
+This latter syntax makes it possible to change one destination directory
+without changing the layout of the source tree.
 
-   Currently, `nobase_*_LTLIBRARIES' are the only exception to this
-rule, in that there is no particular installation order guarantee for
-an otherwise equivalent set of variables without `nobase_' prefix.
+   Currently, ‘nobase_*_LTLIBRARIES’ are the only exception to this
+rule, in that there is no particular installation order guarantee for an
+otherwise equivalent set of variables without ‘nobase_’ prefix.
 
    ---------- Footnotes ----------
 
@@ -3894,19 +3815,19 @@ File: automake.info,  Node: Subpackages,  Prev: Alternative,  Up: Directories
 
 In the GNU Build System, packages can be nested to arbitrary depth.
 This means that a package can embed other packages with their own
-`configure', `Makefile's, etc.
+‘configure’, ‘Makefile’s, etc.
 
    These other packages should just appear as subdirectories of their
-parent package.  They must be listed in `SUBDIRS' like other ordinary
-directories.  However the subpackage's `Makefile's should be output by
-its own `configure' script, not by the parent's `configure'.  This is
-achieved using the `AC_CONFIG_SUBDIRS' Autoconf macro (*note
+parent package.  They must be listed in ‘SUBDIRS’ like other ordinary
+directories.  However the subpackage’s ‘Makefile’s should be output by
+its own ‘configure’ script, not by the parent’s ‘configure’.  This is
+achieved using the ‘AC_CONFIG_SUBDIRS’ Autoconf macro (*note
 AC_CONFIG_SUBDIRS: (autoconf)Subdirectories.).
 
-   Here is an example package for an `arm' program that links with a
-`hand' library that is a nested package in subdirectory `hand/'.
+   Here is an example package for an ‘arm’ program that links with a
+‘hand’ library that is a nested package in subdirectory ‘hand/’.
 
-   `arm''s `configure.ac':
+   ‘arm’’s ‘configure.ac’:
 
      AC_INIT([arm], [1.0])
      AC_CONFIG_AUX_DIR([.])
@@ -3917,7 +3838,7 @@ AC_CONFIG_SUBDIRS: (autoconf)Subdirectories.).
      AC_CONFIG_SUBDIRS([hand])
      AC_OUTPUT
 
-   `arm''s `Makefile.am':
+   ‘arm’’s ‘Makefile.am’:
 
      # Build the library in the hand subdirectory first.
      SUBDIRS = hand
@@ -3930,7 +3851,7 @@ AC_CONFIG_SUBDIRS: (autoconf)Subdirectories.).
      # link with the hand library.
      arm_LDADD = hand/libhand.a
 
-   Now here is `hand''s `hand/configure.ac':
+   Now here is ‘hand’’s ‘hand/configure.ac’:
 
      AC_INIT([hand], [1.2])
      AC_CONFIG_AUX_DIR([.])
@@ -3941,35 +3862,35 @@ AC_CONFIG_SUBDIRS: (autoconf)Subdirectories.).
      AC_CONFIG_FILES([Makefile])
      AC_OUTPUT
 
-and its `hand/Makefile.am':
+and its ‘hand/Makefile.am’:
 
      lib_LIBRARIES = libhand.a
      libhand_a_SOURCES = hand.c
 
-   When `make dist' is run from the top-level directory it will create
-an archive `arm-1.0.tar.gz' that contains the `arm' code as well as the
-`hand' subdirectory.  This package can be built and installed like any
-ordinary package, with the usual `./configure && make && make install'
-sequence (the `hand' subpackage will be built and installed by the
+   When ‘make dist’ is run from the top-level directory it will create
+an archive ‘arm-1.0.tar.gz’ that contains the ‘arm’ code as well as the
+‘hand’ subdirectory.  This package can be built and installed like any
+ordinary package, with the usual ‘./configure && make && make install’
+sequence (the ‘hand’ subpackage will be built and installed by the
 process).
 
-   When `make dist' is run from the hand directory, it will create a
-self-contained `hand-1.2.tar.gz' archive.  So although it appears to be
+   When ‘make dist’ is run from the hand directory, it will create a
+self-contained ‘hand-1.2.tar.gz’ archive.  So although it appears to be
 embedded in another package, it can still be used separately.
 
-   The purpose of the `AC_CONFIG_AUX_DIR([.])' instruction is to force
+   The purpose of the ‘AC_CONFIG_AUX_DIR([.])’ instruction is to force
 Automake and Autoconf to search for auxiliary scripts in the current
 directory.  For instance, this means that there will be two copies of
-`install-sh': one in the top-level of the `arm' package, and another
-one in the `hand/' subdirectory for the `hand' package.
+‘install-sh’: one in the top-level of the ‘arm’ package, and another one
+in the ‘hand/’ subdirectory for the ‘hand’ package.
 
    The historical default is to search for these auxiliary scripts in
 the parent directory and the grandparent directory.  So if the
-`AC_CONFIG_AUX_DIR([.])' line was removed from `hand/configure.ac',
-that subpackage would share the auxiliary script of the `arm' package.
-This may looks like a gain in size (a few kilobytes), but it is
-actually a loss of modularity as the `hand' subpackage is no longer
-self-contained (`make dist' in the subdirectory will not work anymore).
+‘AC_CONFIG_AUX_DIR([.])’ line was removed from ‘hand/configure.ac’, that
+subpackage would share the auxiliary script of the ‘arm’ package.  This
+may looks like a gain in size (a few kilobytes), but it is actually a
+loss of modularity as the ‘hand’ subpackage is no longer self-contained
+(‘make dist’ in the subdirectory will not work anymore).
 
    Packages that do not use Automake need more work to be integrated
 this way.  *Note Third-Party Makefiles::.
@@ -3980,7 +3901,7 @@ File: automake.info,  Node: Programs,  Next: Other Objects,  Prev: Directories,
 8 Building Programs and Libraries
 *********************************
 
-A large part of Automake's functionality is dedicated to making it easy
+A large part of Automakes functionality is dedicated to making it easy
 to build programs and libraries.
 
 * Menu:
@@ -4013,8 +3934,8 @@ File: automake.info,  Node: A Program,  Next: A Library,  Up: Programs
 8.1 Building a program
 ======================
 
-In order to build a program, you need to tell Automake which sources
-are part of it, and which libraries it should be linked with.
+In order to build a program, you need to tell Automake which sources are
+part of it, and which libraries it should be linked with.
 
    This section also covers conditional compilation of sources or
 programs.  Most of the comments about these also apply to libraries
@@ -4034,43 +3955,43 @@ File: automake.info,  Node: Program Sources,  Next: Linking,  Up: A Program
 ------------------------------
 
 In a directory containing source that gets built into a program (as
-opposed to a library or a script), the `PROGRAMS' primary is used.
-Programs can be installed in `bindir', `sbindir', `libexecdir',
-`pkglibexecdir', or not at all (`noinst_').  They can also be built
-only for `make check', in which case the prefix is `check_'.
+opposed to a library or a script), the ‘PROGRAMS’ primary is used.
+Programs can be installed in ‘bindir’, ‘sbindir’, ‘libexecdir’,
+‘pkglibexecdir’, or not at all (‘noinst_’).  They can also be built only
+for ‘make check’, in which case the prefix is ‘check_’.
 
    For instance:
 
      bin_PROGRAMS = hello
 
-   In this simple case, the resulting `Makefile.in' will contain code
-to generate a program named `hello'.
+   In this simple case, the resulting ‘Makefile.in’ will contain code to
+generate a program named ‘hello’.
 
    Associated with each program are several assisting variables that are
 named after the program.  These variables are all optional, and have
 reasonable defaults.  Each variable, its use, and default is spelled out
-below; we use the "hello" example throughout.
+below; we use the “hello” example throughout.
 
-   The variable `hello_SOURCES' is used to specify which source files
+   The variable ‘hello_SOURCES’ is used to specify which source files
 get built into an executable:
 
      hello_SOURCES = hello.c version.c getopt.c getopt1.c getopt.h system.h
 
-   This causes each mentioned `.c' file to be compiled into the
-corresponding `.o'.  Then all are linked to produce `hello'.
+   This causes each mentioned ‘.c’ file to be compiled into the
+corresponding ‘.o’.  Then all are linked to produce ‘hello’.
 
-   If `hello_SOURCES' is not specified, then it defaults to the single
-file `hello.c' (*note Default _SOURCES::).  
+   If ‘hello_SOURCES’ is not specified, then it defaults to the single
+file ‘hello.c’ (*note Default _SOURCES::).
 
    Multiple programs can be built in a single directory.  Multiple
 programs can share a single source file, which must be listed in each
-`_SOURCES' definition.
+‘_SOURCES’ definition.
 
-   Header files listed in a `_SOURCES' definition will be included in
-the distribution but otherwise ignored.  In case it isn't obvious, you
-should not include the header file generated by `configure' in a
-`_SOURCES' variable; this file should not be distributed.  Lex (`.l')
-and Yacc (`.y') files can also be listed; see *note Yacc and Lex::.
+   Header files listed in a ‘_SOURCES’ definition will be included in
+the distribution but otherwise ignored.  In case it isnt obvious, you
+should not include the header file generated by ‘configure’ in a
+‘_SOURCES’ variable; this file should not be distributed.  Lex (‘.l’)
+and Yacc (‘.y’) files can also be listed; see *note Yacc and Lex::.
 
 \1f
 File: automake.info,  Node: Linking,  Next: Conditional Sources,  Prev: Program Sources,  Up: A Program
@@ -4078,24 +3999,24 @@ File: automake.info,  Node: Linking,  Next: Conditional Sources,  Prev: Program
 8.1.2 Linking the program
 -------------------------
 
-If you need to link against libraries that are not found by
-`configure', you can use `LDADD' to do so.  This variable is used to
-specify additional objects or libraries to link with; it is
-inappropriate for specifying specific linker flags, you should use
-`AM_LDFLAGS' for this purpose.  
+If you need to link against libraries that are not found by ‘configure’,
+you can use ‘LDADD’ to do so.  This variable is used to specify
+additional objects or libraries to link with; it is inappropriate for
+specifying specific linker flags, you should use ‘AM_LDFLAGS’ for this
+purpose.
 
    Sometimes, multiple programs are built in one directory but do not
 share the same link-time requirements.  In this case, you can use the
-`PROG_LDADD' variable (where PROG is the name of the program as it
-appears in some `_PROGRAMS' variable, and usually written in lowercase)
-to override `LDADD'.  If this variable exists for a given program, then
-that program is not linked using `LDADD'.  
+‘PROG_LDADD’ variable (where PROG is the name of the program as it
+appears in some ‘_PROGRAMS’ variable, and usually written in lowercase)
+to override ‘LDADD’.  If this variable exists for a given program, then
+that program is not linked using ‘LDADD’.
 
-   For instance, in GNU cpio, `pax', `cpio' and `mt' are linked against
-the library `libcpio.a'.  However, `rmt' is built in the same
-directory, and has no such link requirement.  Also, `mt' and `rmt' are
-only built on certain architectures.  Here is what cpio's
-`src/Makefile.am' looks like (abridged):
+   For instance, in GNU cpio, ‘pax’, ‘cpio’ and ‘mt’ are linked against
+the library ‘libcpio.a’.  However, ‘rmt’ is built in the same directory,
+and has no such link requirement.  Also, ‘mt’ and ‘rmt’ are only built
+on certain architectures.  Here is what cpio’s ‘src/Makefile.am’ looks
+like (abridged):
 
      bin_PROGRAMS = cpio pax $(MT)
      libexec_PROGRAMS = $(RMT)
@@ -4109,46 +4030,45 @@ only built on certain architectures.  Here is what cpio's
      mt_SOURCES = ...
      rmt_SOURCES = ...
 
-   `PROG_LDADD' is inappropriate for passing program-specific linker
-flags (except for `-l', `-L', `-dlopen' and `-dlpreopen').  So, use the
-`PROG_LDFLAGS' variable for this purpose.
+   ‘PROG_LDADD’ is inappropriate for passing program-specific linker
+flags (except for ‘-l’, ‘-L’, ‘-dlopen’ and ‘-dlpreopen’).  So, use the
+‘PROG_LDFLAGS’ variable for this purpose.
 
    It is also occasionally useful to have a program depend on some other
 target that is not actually part of that program.  This can be done
-using either the `PROG_DEPENDENCIES' or the `EXTRA_PROG_DEPENDENCIES'
+using either the ‘PROG_DEPENDENCIES’ or the ‘EXTRA_PROG_DEPENDENCIES’
 variable.  Each program depends on the contents both variables, but no
 further interpretation is done.
 
    Since these dependencies are associated to the link rule used to
 create the programs they should normally list files used by the link
-command.  That is `*.$(OBJEXT)', `*.a', or `*.la' files.  In rare cases
+command.  That is ‘*.$(OBJEXT)’, ‘*.a’, or ‘*.la’ files.  In rare cases
 you may need to add other kinds of files such as linker scripts, but
-_listing a source file in `_DEPENDENCIES' is wrong_.  If some source
-file needs to be built before all the components of a program are
-built, consider using the `BUILT_SOURCES' variable instead (*note
-Sources::).
+_listing a source file in ‘_DEPENDENCIES’ is wrong_.  If some source
+file needs to be built before all the components of a program are built,
+consider using the ‘BUILT_SOURCES’ variable instead (*note Sources::).
 
-   If `PROG_DEPENDENCIES' is not supplied, it is computed by Automake.
-The automatically-assigned value is the contents of `PROG_LDADD', with
-most configure substitutions, `-l', `-L', `-dlopen' and `-dlpreopen'
+   If ‘PROG_DEPENDENCIES’ is not supplied, it is computed by Automake.
+The automatically-assigned value is the contents of ‘PROG_LDADD’, with
+most configure substitutions, ‘-l’, ‘-L’, ‘-dlopen’ and ‘-dlpreopen’
 options removed.  The configure substitutions that are left in are only
-`$(LIBOBJS)' and `$(ALLOCA)'; these are left because it is known that
-they will not cause an invalid value for `PROG_DEPENDENCIES' to be
+‘$(LIBOBJS)’ and ‘$(ALLOCA)’; these are left because it is known that
+they will not cause an invalid value for ‘PROG_DEPENDENCIES’ to be
 generated.
 
-   *note Conditional Sources:: shows a situation where `_DEPENDENCIES'
+   *note Conditional Sources:: shows a situation where ‘_DEPENDENCIES’
 may be used.
 
-   The `EXTRA_PROG_DEPENDENCIES' may be useful for cases where you
-merely want to augment the `automake'-generated `PROG_DEPENDENCIES'
+   The ‘EXTRA_PROG_DEPENDENCIES’ may be useful for cases where you
+merely want to augment the ‘automake’-generated ‘PROG_DEPENDENCIES’
 rather than replacing it.
 
-   We recommend that you avoid using `-l' options in `LDADD' or
-`PROG_LDADD' when referring to libraries built by your package.
+   We recommend that you avoid using ‘-l’ options in ‘LDADD’ or
+‘PROG_LDADD’ when referring to libraries built by your package.
 Instead, write the file name of the library explicitly as in the above
-`cpio' example.  Use `-l' only to list third-party libraries.  If you
-follow this rule, the default value of `PROG_DEPENDENCIES' will list
-all your local libraries and omit the other ones.
+‘cpio’ example.  Use ‘-l’ only to list third-party libraries.  If you
+follow this rule, the default value of ‘PROG_DEPENDENCIES’ will list all
+your local libraries and omit the other ones.
 
 \1f
 File: automake.info,  Node: Conditional Sources,  Next: Conditional Programs,  Prev: Linking,  Up: A Program
@@ -4156,24 +4076,24 @@ File: automake.info,  Node: Conditional Sources,  Next: Conditional Programs,  P
 8.1.3 Conditional compilation of sources
 ----------------------------------------
 
-You can't put a configure substitution (e.g., `@FOO@' or `$(FOO)' where
-`FOO' is defined via `AC_SUBST') into a `_SOURCES' variable.  The
-reason for this is a bit hard to explain, but suffice to say that it
-simply won't work.  Automake will give an error if you try to do this.
+You can’t put a configure substitution (e.g., ‘@FOO@’ or ‘$(FOO)’ where
+‘FOO’ is defined via ‘AC_SUBST’) into a ‘_SOURCES’ variable.  The reason
+for this is a bit hard to explain, but suffice to say that it simply
+won’t work.  Automake will give an error if you try to do this.
 
-   Fortunately there are two other ways to achieve the same result.
-One is to use configure substitutions in `_LDADD' variables, the other
-is to use an Automake conditional.
+   Fortunately there are two other ways to achieve the same result.  One
+is to use configure substitutions in ‘_LDADD’ variables, the other is to
+use an Automake conditional.
 
-Conditional Compilation using `_LDADD' Substitutions
+Conditional Compilation using ‘_LDADD’ Substitutions
 ....................................................
 
 Automake must know all the source files that could possibly go into a
 program, even if not all the files are built in every circumstance.  Any
 files that are only conditionally built should be listed in the
-appropriate `EXTRA_' variable.  For instance, if `hello-linux.c' or
-`hello-generic.c' were conditionally included in `hello', the
-`Makefile.am' would contain:
+appropriate ‘EXTRA_’ variable.  For instance, if ‘hello-linux.c’ or
+‘hello-generic.c’ were conditionally included in ‘hello’, the
+‘Makefile.am’ would contain:
 
      bin_PROGRAMS = hello
      hello_SOURCES = hello-common.c
@@ -4181,8 +4101,8 @@ appropriate `EXTRA_' variable.  For instance, if `hello-linux.c' or
      hello_LDADD = $(HELLO_SYSTEM)
      hello_DEPENDENCIES = $(HELLO_SYSTEM)
 
-You can then setup the `$(HELLO_SYSTEM)' substitution from
-`configure.ac':
+You can then setup the ‘$(HELLO_SYSTEM)’ substitution from
+‘configure.ac’:
 
      ...
      case $host in
@@ -4192,17 +4112,17 @@ You can then setup the `$(HELLO_SYSTEM)' substitution from
      AC_SUBST([HELLO_SYSTEM])
      ...
 
-   In this case, the variable `HELLO_SYSTEM' should be replaced by
-either `hello-linux.o' or `hello-generic.o', and added to both
-`hello_DEPENDENCIES' and `hello_LDADD' in order to be built and linked
+   In this case, the variable ‘HELLO_SYSTEM’ should be replaced by
+either ‘hello-linux.o’ or ‘hello-generic.o’, and added to both
+‘hello_DEPENDENCIES’ and ‘hello_LDADD’ in order to be built and linked
 in.
 
 Conditional Compilation using Automake Conditionals
 ...................................................
 
 An often simpler way to compile source files conditionally is to use
-Automake conditionals.  For instance, you could use this `Makefile.am'
-construct to build the same `hello' example:
+Automake conditionals.  For instance, you could use this ‘Makefile.am’
+construct to build the same ‘hello’ example:
 
      bin_PROGRAMS = hello
      if LINUX
@@ -4211,15 +4131,15 @@ construct to build the same `hello' example:
      hello_SOURCES = hello-generic.c hello-common.c
      endif
 
-   In this case, `configure.ac' should setup the `LINUX' conditional
-using `AM_CONDITIONAL' (*note Conditionals::).
+   In this case, ‘configure.ac’ should setup the ‘LINUX’ conditional
+using ‘AM_CONDITIONAL’ (*note Conditionals::).
 
-   When using conditionals like this you don't need to use the `EXTRA_'
-variable, because Automake will examine the contents of each variable
-to construct the complete list of source files.
+   When using conditionals like this you don’t need to use the ‘EXTRA_’
+variable, because Automake will examine the contents of each variable to
+construct the complete list of source files.
 
    If your program uses a lot of files, you will probably prefer a
-conditional `+='.
+conditional ‘+=’.
 
      bin_PROGRAMS = hello
      hello_SOURCES = hello-common.c
@@ -4235,39 +4155,38 @@ File: automake.info,  Node: Conditional Programs,  Prev: Conditional Sources,  U
 8.1.4 Conditional compilation of programs
 -----------------------------------------
 
-Sometimes it is useful to determine the programs that are to be built
-at configure time.  For instance, GNU `cpio' only builds `mt' and `rmt'
+Sometimes it is useful to determine the programs that are to be built at
+configure time.  For instance, GNU ‘cpio’ only builds ‘mt’ and ‘rmt’
 under special circumstances.  The means to achieve conditional
-compilation of programs are the same you can use to compile source
-files conditionally: substitutions or conditionals.
+compilation of programs are the same you can use to compile source files
+conditionally: substitutions or conditionals.
 
-Conditional Programs using `configure' Substitutions
+Conditional Programs using ‘configure’ Substitutions
 ....................................................
 
 In this case, you must notify Automake of all the programs that can
 possibly be built, but at the same time cause the generated
-`Makefile.in' to use the programs specified by `configure'.  This is
-done by having `configure' substitute values into each `_PROGRAMS'
+‘Makefile.in’ to use the programs specified by ‘configure’.  This is
+done by having ‘configure’ substitute values into each ‘_PROGRAMS’
 definition, while listing all optionally built programs in
-`EXTRA_PROGRAMS'.
+‘EXTRA_PROGRAMS’.
 
      bin_PROGRAMS = cpio pax $(MT)
      libexec_PROGRAMS = $(RMT)
      EXTRA_PROGRAMS = mt rmt
 
-   As explained in *note EXEEXT::, Automake will rewrite
-`bin_PROGRAMS', `libexec_PROGRAMS', and `EXTRA_PROGRAMS', appending
-`$(EXEEXT)' to each binary.  Obviously it cannot rewrite values
-obtained at run-time through `configure' substitutions, therefore you
-should take care of appending `$(EXEEXT)' yourself, as in
-`AC_SUBST([MT], ['mt${EXEEXT}'])'.
+   As explained in *note EXEEXT::, Automake will rewrite ‘bin_PROGRAMS’,
+‘libexec_PROGRAMS’, and ‘EXTRA_PROGRAMS’, appending ‘$(EXEEXT)’ to each
+binary.  Obviously it cannot rewrite values obtained at run-time through
+‘configure’ substitutions, therefore you should take care of appending
+‘$(EXEEXT)’ yourself, as in ‘AC_SUBST([MT], ['mt${EXEEXT}'])’.
 
 Conditional Programs using Automake Conditionals
 ................................................
 
 You can also use Automake conditionals (*note Conditionals::) to select
-programs to be built.  In this case you don't have to worry about
-`$(EXEEXT)' or `EXTRA_PROGRAMS'.
+programs to be built.  In this case you dont have to worry about
+‘$(EXEEXT)’ or ‘EXTRA_PROGRAMS’.
 
      bin_PROGRAMS = cpio pax
      if WANT_MT
@@ -4284,54 +4203,54 @@ File: automake.info,  Node: A Library,  Next: A Shared Library,  Prev: A Program
 ======================
 
 Building a library is much like building a program.  In this case, the
-name of the primary is `LIBRARIES'.  Libraries can be installed in
-`libdir' or `pkglibdir'.
+name of the primary is ‘LIBRARIES’.  Libraries can be installed in
+‘libdir’ or ‘pkglibdir’.
 
    *Note A Shared Library::, for information on how to build shared
-libraries using libtool and the `LTLIBRARIES' primary.
+libraries using libtool and the ‘LTLIBRARIES’ primary.
 
-   Each `_LIBRARIES' variable is a list of the libraries to be built.
-For instance, to create a library named `libcpio.a', but not install
-it, you would write:
+   Each ‘_LIBRARIES’ variable is a list of the libraries to be built.
+For instance, to create a library named ‘libcpio.a’, but not install it,
+you would write:
 
      noinst_LIBRARIES = libcpio.a
      libcpio_a_SOURCES = ...
 
    The sources that go into a library are determined exactly as they are
-for programs, via the `_SOURCES' variables.  Note that the library name
-is canonicalized (*note Canonicalization::), so the `_SOURCES' variable
-corresponding to `libcpio.a' is `libcpio_a_SOURCES', not
-`libcpio.a_SOURCES'.
+for programs, via the ‘_SOURCES’ variables.  Note that the library name
+is canonicalized (*note Canonicalization::), so the ‘_SOURCES’ variable
+corresponding to ‘libcpio.a’ is ‘libcpio_a_SOURCES’, not
+‘libcpio.a_SOURCES’.
 
-   Extra objects can be added to a library using the `LIBRARY_LIBADD'
-variable.  This should be used for objects determined by `configure'.
-Again from `cpio':
+   Extra objects can be added to a library using the ‘LIBRARY_LIBADD’
+variable.  This should be used for objects determined by ‘configure’.
+Again from ‘cpio’:
 
      libcpio_a_LIBADD = $(LIBOBJS) $(ALLOCA)
 
    In addition, sources for extra objects that will not exist until
-configure-time must be added to the `BUILT_SOURCES' variable (*note
+configure-time must be added to the ‘BUILT_SOURCES’ variable (*note
 Sources::).
 
    Building a static library is done by compiling all object files, then
-by invoking `$(AR) $(ARFLAGS)' followed by the name of the library and
-the list of objects, and finally by calling `$(RANLIB)' on that
-library.  You should call `AC_PROG_RANLIB' from your `configure.ac' to
-define `RANLIB' (Automake will complain otherwise).  You should also
-call `AM_PROG_AR' to define `AR', in order to support unusual archivers
-such as Microsoft lib.  `ARFLAGS' will default to `cru'; you can
-override this variable by setting it in your `Makefile.am' or by
-`AC_SUBST'ing it from your `configure.ac'.  You can override the `AR'
-variable by defining a per-library `maude_AR' variable (*note Program
-and Library Variables::).
+by invoking ‘$(AR) $(ARFLAGS)’ followed by the name of the library and
+the list of objects, and finally by calling ‘$(RANLIB)’ on that library.
+You should call ‘AC_PROG_RANLIB’ from your ‘configure.ac’ to define
+‘RANLIB’ (Automake will complain otherwise).  You should also call
+‘AM_PROG_AR’ to define ‘AR’, in order to support unusual archivers such
+as Microsoft lib.  ‘ARFLAGS’ will default to ‘cru’; you can override
+this variable by setting it in your ‘Makefile.am’ or by ‘AC_SUBST’ing it
+from your ‘configure.ac’.  You can override the ‘AR’ variable by
+defining a per-library ‘maude_AR’ variable (*note Program and Library
+Variables::).
 
    Be careful when selecting library components conditionally.  Because
 building an empty library is not portable, you should ensure that any
 library always contains at least one object.
 
-   To use a static library when building a program, add it to `LDADD'
-for this program.  In the following example, the program `cpio' is
-statically linked with the library `libcpio.a'.
+   To use a static library when building a program, add it to ‘LDADD’
+for this program.  In the following example, the program ‘cpio’ is
+statically linked with the library ‘libcpio.a’.
 
      noinst_LIBRARIES = libcpio.a
      libcpio_a_SOURCES = ...
@@ -4347,8 +4266,8 @@ File: automake.info,  Node: A Shared Library,  Next: Program and Library Variabl
 =============================
 
 Building shared libraries portably is a relatively complex matter.  For
-this reason, GNU Libtool (*note Introduction: (libtool)Top.) was
-created to help build shared libraries in a platform-independent way.
+this reason, GNU Libtool (*note Introduction: (libtool)Top.) was created
+to help build shared libraries in a platform-independent way.
 
 * Menu:
 
@@ -4360,7 +4279,7 @@ created to help build shared libraries in a platform-independent way.
 * Libtool Modules::             Building Libtool Modules
 * Libtool Flags::               Using _LIBADD, _LDFLAGS, and _LIBTOOLFLAGS
 * LTLIBOBJS::                   Using $(LTLIBOBJS) and $(LTALLOCA)
-* Libtool Issues::              Common Issues Related to Libtool's Use
+* Libtool Issues::              Common Issues Related to Libtools Use
 
 \1f
 File: automake.info,  Node: Libtool Concept,  Next: Libtool Libraries,  Up: A Shared Library
@@ -4369,31 +4288,30 @@ File: automake.info,  Node: Libtool Concept,  Next: Libtool Libraries,  Up: A Sh
 -------------------------
 
 Libtool abstracts shared and static libraries into a unified concept
-henceforth called "libtool libraries".  Libtool libraries are files
-using the `.la' suffix, and can designate a static library, a shared
+henceforth called “libtool libraries”.  Libtool libraries are files
+using the ‘.la’ suffix, and can designate a static library, a shared
 library, or maybe both.  Their exact nature cannot be determined until
-`./configure' is run: not all platforms support all kinds of libraries,
+‘./configure’ is run: not all platforms support all kinds of libraries,
 and users can explicitly select which libraries should be built.
-(However the package's maintainers can tune the default, *note The
-`AC_PROG_LIBTOOL' macro: (libtool)AC_PROG_LIBTOOL.)
+(However the packages maintainers can tune the default, *note The
+‘AC_PROG_LIBTOOL’ macro: (libtool)AC_PROG_LIBTOOL.)
 
    Because object files for shared and static libraries must be compiled
 differently, libtool is also used during compilation.  Object files
-built by libtool are called "libtool objects": these are files using
-the `.lo' suffix.  Libtool libraries are built from these libtool
-objects.
+built by libtool are called “libtool objects”: these are files using the
+‘.lo’ suffix.  Libtool libraries are built from these libtool objects.
 
-   You should not assume anything about the structure of `.la' or `.lo'
-files and how libtool constructs them: this is libtool's concern, and
-the last thing one wants is to learn about libtool's guts.  However the
+   You should not assume anything about the structure of ‘.la’ or ‘.lo’
+files and how libtool constructs them: this is libtools concern, and
+the last thing one wants is to learn about libtools guts.  However the
 existence of these files matters, because they are used as targets and
-dependencies in `Makefile's rules when building libtool libraries.
+dependencies in ‘Makefile’s rules when building libtool libraries.
 There are situations where you may have to refer to these, for instance
 when expressing dependencies for building source files conditionally
 (*note Conditional Libtool Sources::).
 
    People considering writing a plug-in system, with dynamically loaded
-modules, should look into `libltdl': libtool's dlopening library (*note
+modules, should look into ‘libltdl’: libtool’s dlopening library (*note
 Using libltdl: (libtool)Using libltdl.).  This offers a portable
 dlopening facility to load libtool libraries dynamically, and can also
 achieve static linking where unavoidable.
@@ -4409,20 +4327,20 @@ File: automake.info,  Node: Libtool Libraries,  Next: Conditional Libtool Librar
 8.3.2 Building Libtool Libraries
 --------------------------------
 
-Automake uses libtool to build libraries declared with the
-`LTLIBRARIES' primary.  Each `_LTLIBRARIES' variable is a list of
-libtool libraries to build.  For instance, to create a libtool library
-named `libgettext.la', and install it in `libdir', write:
+Automake uses libtool to build libraries declared with the ‘LTLIBRARIES’
+primary.  Each ‘_LTLIBRARIES’ variable is a list of libtool libraries to
+build.  For instance, to create a libtool library named ‘libgettext.la’,
+and install it in ‘libdir’, write:
 
      lib_LTLIBRARIES = libgettext.la
      libgettext_la_SOURCES = gettext.c gettext.h ...
 
-   Automake predefines the variable `pkglibdir', so you can use
-`pkglib_LTLIBRARIES' to install libraries in `$(libdir)/@PACKAGE@/'.
+   Automake predefines the variable ‘pkglibdir’, so you can use
+‘pkglib_LTLIBRARIES’ to install libraries in ‘$(libdir)/@PACKAGE@/’.
 
-   If `gettext.h' is a public header file that needs to be installed in
+   If ‘gettext.h’ is a public header file that needs to be installed in
 order for people to use the library, it should be declared using a
-`_HEADERS' variable, not in `libgettext_la_SOURCES'.  Headers listed in
+‘_HEADERS’ variable, not in ‘libgettext_la_SOURCES’.  Headers listed in
 the latter should be internal headers that are not part of the public
 interface.
 
@@ -4432,8 +4350,8 @@ interface.
 
    A package can build and install such a library along with other
 programs that use it.  This dependency should be specified using
-`LDADD'.  The following example builds a program named `hello' that is
-linked with `libgettext.la'.
+‘LDADD’.  The following example builds a program named ‘hello’ that is
+linked with ‘libgettext.la’.
 
      lib_LTLIBRARIES = libgettext.la
      libgettext_la_SOURCES = gettext.c ...
@@ -4442,9 +4360,9 @@ linked with `libgettext.la'.
      hello_SOURCES = hello.c ...
      hello_LDADD = libgettext.la
 
-Whether `hello' is statically or dynamically linked with
-`libgettext.la' is not yet known: this will depend on the configuration
-of libtool and the capabilities of the host.
+Whether ‘hello’ is statically or dynamically linked with ‘libgettext.la’
+is not yet known: this will depend on the configuration of libtool and
+the capabilities of the host.
 
 \1f
 File: automake.info,  Node: Conditional Libtool Libraries,  Next: Conditional Libtool Sources,  Prev: Libtool Libraries,  Up: A Shared Library
@@ -4453,32 +4371,32 @@ File: automake.info,  Node: Conditional Libtool Libraries,  Next: Conditional Li
 ----------------------------------------------
 
 Like conditional programs (*note Conditional Programs::), there are two
-main ways to build conditional libraries: using Automake conditionals
-or using Autoconf `AC_SUBST'itutions.
+main ways to build conditional libraries: using Automake conditionals or
+using Autoconf ‘AC_SUBST’itutions.
 
    The important implementation detail you have to be aware of is that
-the place where a library will be installed matters to libtool: it
-needs to be indicated _at link-time_ using the `-rpath' option.
+the place where a library will be installed matters to libtool: it needs
+to be indicated _at link-time_ using the ‘-rpath’ option.
 
    For libraries whose destination directory is known when Automake
-runs, Automake will automatically supply the appropriate `-rpath'
-option to libtool.  This is the case for libraries listed explicitly in
-some installable `_LTLIBRARIES' variables such as `lib_LTLIBRARIES'.
+runs, Automake will automatically supply the appropriate ‘-rpath’ option
+to libtool.  This is the case for libraries listed explicitly in some
+installable ‘_LTLIBRARIES’ variables such as ‘lib_LTLIBRARIES’.
 
    However, for libraries determined at configure time (and thus
-mentioned in `EXTRA_LTLIBRARIES'), Automake does not know the final
-installation directory.  For such libraries you must add the `-rpath'
-option to the appropriate `_LDFLAGS' variable by hand.
+mentioned in ‘EXTRA_LTLIBRARIES’), Automake does not know the final
+installation directory.  For such libraries you must add the ‘-rpath’
+option to the appropriate ‘_LDFLAGS’ variable by hand.
 
    The examples below illustrate the differences between these two
 methods.
 
-   Here is an example where `WANTEDLIBS' is an `AC_SUBST'ed variable
-set at `./configure'-time to either `libfoo.la', `libbar.la', both, or
-none.  Although `$(WANTEDLIBS)' appears in the `lib_LTLIBRARIES',
-Automake cannot guess it relates to `libfoo.la' or `libbar.la' at the
-time it creates the link rule for these two libraries.  Therefore the
-`-rpath' argument must be explicitly supplied.
+   Here is an example where ‘WANTEDLIBS’ is an ‘AC_SUBST’ed variable set
+at ‘./configure’-time to either ‘libfoo.la’, ‘libbar.la’, both, or none.
+Although ‘$(WANTEDLIBS)’ appears in the ‘lib_LTLIBRARIES’, Automake
+cannot guess it relates to ‘libfoo.la’ or ‘libbar.la’ at the time it
+creates the link rule for these two libraries.  Therefore the ‘-rpath’
+argument must be explicitly supplied.
 
      EXTRA_LTLIBRARIES = libfoo.la libbar.la
      lib_LTLIBRARIES = $(WANTEDLIBS)
@@ -4487,10 +4405,10 @@ time it creates the link rule for these two libraries.  Therefore the
      libbar_la_SOURCES = bar.c ...
      libbar_la_LDFLAGS = -rpath '$(libdir)'
 
-   Here is how the same `Makefile.am' would look using Automake
-conditionals named `WANT_LIBFOO' and `WANT_LIBBAR'.  Now Automake is
-able to compute the `-rpath' setting itself, because it's clear that
-both libraries will end up in `$(libdir)' if they are installed.
+   Here is how the same ‘Makefile.am’ would look using Automake
+conditionals named ‘WANT_LIBFOO’ and ‘WANT_LIBBAR’.  Now Automake is
+able to compute the ‘-rpath’ setting itself, because it’s clear that
+both libraries will end up in ‘$(libdir)’ if they are installed.
 
      lib_LTLIBRARIES =
      if WANT_LIBFOO
@@ -4510,13 +4428,13 @@ File: automake.info,  Node: Conditional Libtool Sources,  Next: Libtool Convenie
 
 Conditional compilation of sources in a library can be achieved in the
 same way as conditional compilation of sources in a program (*note
-Conditional Sources::).  The only difference is that `_LIBADD' should
-be used instead of `_LDADD' and that it should mention libtool objects
-(`.lo' files).
+Conditional Sources::).  The only difference is that ‘_LIBADD’ should be
+used instead of ‘_LDADD’ and that it should mention libtool objects
+(‘.lo’ files).
 
-   So, to mimic the `hello' example from *note Conditional Sources::,
-we could build a `libhello.la' library using either `hello-linux.c' or
-`hello-generic.c' with the following `Makefile.am'.
+   So, to mimic the ‘hello’ example from *note Conditional Sources::, we
+could build a ‘libhello.la’ library using either ‘hello-linux.c’ or
+‘hello-generic.c’ with the following ‘Makefile.am’.
 
      lib_LTLIBRARIES = libhello.la
      libhello_la_SOURCES = hello-common.c
@@ -4524,8 +4442,8 @@ we could build a `libhello.la' library using either `hello-linux.c' or
      libhello_la_LIBADD = $(HELLO_SYSTEM)
      libhello_la_DEPENDENCIES = $(HELLO_SYSTEM)
 
-And make sure `configure' defines `HELLO_SYSTEM' as either
-`hello-linux.lo' or `hello-generic.lo'.
+And make sure ‘configure’ defines ‘HELLO_SYSTEM’ as either
+‘hello-linux.lo’ or ‘hello-generic.lo’.
 
    Or we could simply use an Automake conditional as follows.
 
@@ -4544,26 +4462,26 @@ File: automake.info,  Node: Libtool Convenience Libraries,  Next: Libtool Module
 -----------------------------------
 
 Sometimes you want to build libtool libraries that should not be
-installed.  These are called "libtool convenience libraries" and are
-typically used to encapsulate many sublibraries, later gathered into
-one big installed library.
+installed.  These are called “libtool convenience libraries” and are
+typically used to encapsulate many sublibraries, later gathered into one
+big installed library.
 
    Libtool convenience libraries are declared by directory-less
-variables such as `noinst_LTLIBRARIES', `check_LTLIBRARIES', or even
-`EXTRA_LTLIBRARIES'.  Unlike installed libtool libraries they do not
-need an `-rpath' flag at link time (actually this is the only
+variables such as ‘noinst_LTLIBRARIES’, ‘check_LTLIBRARIES’, or even
+‘EXTRA_LTLIBRARIES’.  Unlike installed libtool libraries they do not
+need an ‘-rpath’ flag at link time (actually this is the only
 difference).
 
-   Convenience libraries listed in `noinst_LTLIBRARIES' are always
-built.  Those listed in `check_LTLIBRARIES' are built only upon `make
-check'.  Finally, libraries listed in `EXTRA_LTLIBRARIES' are never
+   Convenience libraries listed in ‘noinst_LTLIBRARIES’ are always
+built.  Those listed in ‘check_LTLIBRARIES’ are built only upon ‘make
+check’.  Finally, libraries listed in ‘EXTRA_LTLIBRARIES’ are never
 built explicitly: Automake outputs rules to build them, but if the
-library does not appear as a Makefile dependency anywhere it won't be
-built (this is why `EXTRA_LTLIBRARIES' is used for conditional
+library does not appear as a Makefile dependency anywhere it wont be
+built (this is why ‘EXTRA_LTLIBRARIES’ is used for conditional
 compilation).
 
    Here is a sample setup merging libtool convenience libraries from
-subdirectories into one main `libtop.la' library.
+subdirectories into one main ‘libtop.la’ library.
 
      # -- Top-level Makefile.am --
      SUBDIRS = sub1 sub2 ...
@@ -4588,18 +4506,17 @@ subdirectories into one main `libtop.la' library.
        sub22/libsub22.la \
        ...
 
-   When using such setup, beware that `automake' will assume
-`libtop.la' is to be linked with the C linker.  This is because
-`libtop_la_SOURCES' is empty, so `automake' picks C as default
-language.  If `libtop_la_SOURCES' was not empty, `automake' would
-select the linker as explained in *note How the Linker is Chosen::.
+   When using such setup, beware that ‘automake’ will assume ‘libtop.la’
+is to be linked with the C linker.  This is because ‘libtop_la_SOURCES’
+is empty, so ‘automake’ picks C as default language.  If
+‘libtop_la_SOURCES’ was not empty, ‘automake’ would select the linker as
+explained in *note How the Linker is Chosen::.
 
    If one of the sublibraries contains non-C source, it is important
 that the appropriate linker be chosen.  One way to achieve this is to
 pretend that there is such a non-C file among the sources of the
-library, thus forcing `automake' to select the appropriate linker.
-Here is the top-level `Makefile' of our example updated to force C++
-linking.
+library, thus forcing ‘automake’ to select the appropriate linker.  Here
+is the top-level ‘Makefile’ of our example updated to force C++ linking.
 
      SUBDIRS = sub1 sub2 ...
      lib_LTLIBRARIES = libtop.la
@@ -4611,14 +4528,14 @@ linking.
        sub2/libsub2.la \
        ...
 
-   `EXTRA_*_SOURCES' variables are used to keep track of source files
+   ‘EXTRA_*_SOURCES’ variables are used to keep track of source files
 that might be compiled (this is mostly useful when doing conditional
-compilation using `AC_SUBST', *note Conditional Libtool Sources::), and
-the `nodist_' prefix means the listed sources are not to be distributed
-(*note Program and Library Variables::).  In effect the file
-`dummy.cxx' does not need to exist in the source tree.  Of course if
-you have some real source file to list in `libtop_la_SOURCES' there is
-no point in cheating with `nodist_EXTRA_libtop_la_SOURCES'.
+compilation using ‘AC_SUBST’, *note Conditional Libtool Sources::), and
+the ‘nodist_’ prefix means the listed sources are not to be distributed
+(*note Program and Library Variables::).  In effect the file ‘dummy.cxx’
+does not need to exist in the source tree.  Of course if you have some
+real source file to list in ‘libtop_la_SOURCES’ there is no point in
+cheating with ‘nodist_EXTRA_libtop_la_SOURCES’.
 
 \1f
 File: automake.info,  Node: Libtool Modules,  Next: Libtool Flags,  Prev: Libtool Convenience Libraries,  Up: A Shared Library
@@ -4626,87 +4543,88 @@ File: automake.info,  Node: Libtool Modules,  Next: Libtool Flags,  Prev: Libtoo
 8.3.6 Libtool Modules
 ---------------------
 
-These are libtool libraries meant to be dlopened.  They are indicated
-to libtool by passing `-module' at link-time.
+These are libtool libraries meant to be dlopened.  They are indicated to
+libtool by passing ‘-module’ at link-time.
 
      pkglib_LTLIBRARIES = mymodule.la
      mymodule_la_SOURCES = doit.c
      mymodule_la_LDFLAGS = -module
 
-   Ordinarily, Automake requires that a library's name start with
-`lib'.  However, when building a dynamically loadable module you might
-wish to use a "nonstandard" name.  Automake will not complain about
-such nonstandard names if it knows the library being built is a libtool
-module, i.e., if `-module' explicitly appears in the library's
-`_LDFLAGS' variable (or in the common `AM_LDFLAGS' variable when no
-per-library `_LDFLAGS' variable is defined).
+   Ordinarily, Automake requires that a library’s name start with ‘lib’.
+However, when building a dynamically loadable module you might wish to
+use a "nonstandard" name.  Automake will not complain about such
+nonstandard names if it knows the library being built is a libtool
+module, i.e., if ‘-module’ explicitly appears in the library’s
+‘_LDFLAGS’ variable (or in the common ‘AM_LDFLAGS’ variable when no
+per-library ‘_LDFLAGS’ variable is defined).
 
-   As always, `AC_SUBST' variables are black boxes to Automake since
-their values are not yet known when `automake' is run.  Therefore if
-`-module' is set via such a variable, Automake cannot notice it and
-will proceed as if the library was an ordinary libtool library, with
-strict naming.
+   As always, ‘AC_SUBST’ variables are black boxes to Automake since
+their values are not yet known when ‘automake’ is run.  Therefore if
+‘-module’ is set via such a variable, Automake cannot notice it and will
+proceed as if the library was an ordinary libtool library, with strict
+naming.
 
-   If `mymodule_la_SOURCES' is not specified, then it defaults to the
-single file `mymodule.c' (*note Default _SOURCES::).
+   If ‘mymodule_la_SOURCES’ is not specified, then it defaults to the
+single file ‘mymodule.c’ (*note Default _SOURCES::).
 
 \1f
 File: automake.info,  Node: Libtool Flags,  Next: LTLIBOBJS,  Prev: Libtool Modules,  Up: A Shared Library
 
-8.3.7 `_LIBADD', `_LDFLAGS', and `_LIBTOOLFLAGS'
+8.3.7 ‘_LIBADD’, ‘_LDFLAGS’, and ‘_LIBTOOLFLAGS’
 ------------------------------------------------
 
-As shown in previous sections, the `LIBRARY_LIBADD' variable should be
-used to list extra libtool objects (`.lo' files) or libtool libraries
-(`.la') to add to LIBRARY.
+As shown in previous sections, the ‘LIBRARY_LIBADD’ variable should be
+used to list extra libtool objects (‘.lo’ files) or libtool libraries
+(‘.la’) to add to LIBRARY.
 
-   The `LIBRARY_LDFLAGS' variable is the place to list additional
-libtool linking flags, such as `-version-info', `-static', and a lot
+   The ‘LIBRARY_LDFLAGS’ variable is the place to list additional
+libtool linking flags, such as ‘-version-info’, ‘-static’, and a lot
 more.  *Note Link mode: (libtool)Link mode.
 
-   The `libtool' command has two kinds of options: mode-specific
-options and generic options.  Mode-specific options such as the
-aforementioned linking flags should be lumped with the other flags
-passed to the tool invoked by `libtool' (hence the use of
-`LIBRARY_LDFLAGS' for libtool linking flags).  Generic options include
-`--tag=TAG' and `--silent' (*note Invoking `libtool': (libtool)Invoking
-libtool. for more options) should appear before the mode selection on
-the command line; in `Makefile.am's they should be listed in the
-`LIBRARY_LIBTOOLFLAGS' variable.
-
-   If `LIBRARY_LIBTOOLFLAGS' is not defined, then the variable
-`AM_LIBTOOLFLAGS' is used instead.
-
-   These flags are passed to libtool after the `--tag=TAG' option
-computed by Automake (if any), so `LIBRARY_LIBTOOLFLAGS' (or
-`AM_LIBTOOLFLAGS') is a good place to override or supplement the
-`--tag=TAG' setting.
-
-   The libtool rules also use a `LIBTOOLFLAGS' variable that should not
-be set in `Makefile.am': this is a user variable (*note Flag Variables
-Ordering::.  It allows users to run `make LIBTOOLFLAGS=--silent', for
-instance.  Note that the verbosity of `libtool' can also be influenced
-with the Automake `silent-rules' option (*note Options::).
+   The ‘libtool’ command has two kinds of options: mode-specific options
+and generic options.  Mode-specific options such as the aforementioned
+linking flags should be lumped with the other flags passed to the tool
+invoked by ‘libtool’ (hence the use of ‘LIBRARY_LDFLAGS’ for libtool
+linking flags).  Generic options include ‘--tag=TAG’ and ‘--silent’
+(*note Invoking ‘libtool’: (libtool)Invoking libtool. for more options)
+should appear before the mode selection on the command line; in
+‘Makefile.am’s they should be listed in the ‘LIBRARY_LIBTOOLFLAGS’
+variable.
+
+   If ‘LIBRARY_LIBTOOLFLAGS’ is not defined, then the variable
+‘AM_LIBTOOLFLAGS’ is used instead.
+
+   These flags are passed to libtool after the ‘--tag=TAG’ option
+computed by Automake (if any), so ‘LIBRARY_LIBTOOLFLAGS’ (or
+‘AM_LIBTOOLFLAGS’) is a good place to override or supplement the
+‘--tag=TAG’ setting.
+
+   The libtool rules also use a ‘LIBTOOLFLAGS’ variable that should not
+be set in ‘Makefile.am’: this is a user variable (*note Flag Variables
+Ordering::.  It allows users to run ‘make LIBTOOLFLAGS=--silent’, for
+instance.  Note that the verbosity of ‘libtool’ can also be influenced
+by the Automake support for silent rules (*note Automake Silent
+Rules::).
 
 \1f
 File: automake.info,  Node: LTLIBOBJS,  Next: Libtool Issues,  Prev: Libtool Flags,  Up: A Shared Library
 
-8.3.8 `LTLIBOBJS' and `LTALLOCA'
+8.3.8 ‘LTLIBOBJS’ and ‘LTALLOCA’
 --------------------------------
 
-Where an ordinary library might include `$(LIBOBJS)' or `$(ALLOCA)'
-(*note LIBOBJS::), a libtool library must use `$(LTLIBOBJS)' or
-`$(LTALLOCA)'.  This is required because the object files that libtool
-operates on do not necessarily end in `.o'.
+Where an ordinary library might include ‘$(LIBOBJS)’ or ‘$(ALLOCA)’
+(*note LIBOBJS::), a libtool library must use ‘$(LTLIBOBJS)’ or
+‘$(LTALLOCA)’.  This is required because the object files that libtool
+operates on do not necessarily end in ‘.o’.
 
-   Nowadays, the computation of `LTLIBOBJS' from `LIBOBJS' is performed
-automatically by Autoconf (*note `AC_LIBOBJ' vs. `LIBOBJS':
+   Nowadays, the computation of ‘LTLIBOBJS’ from ‘LIBOBJS’ is performed
+automatically by Autoconf (*note ‘AC_LIBOBJ’ vs. ‘LIBOBJS’:
 (autoconf)AC_LIBOBJ vs LIBOBJS.).
 
 \1f
 File: automake.info,  Node: Libtool Issues,  Prev: LTLIBOBJS,  Up: A Shared Library
 
-8.3.9 Common Issues Related to Libtool's Use
+8.3.9 Common Issues Related to Libtools Use
 --------------------------------------------
 
 * Menu:
@@ -4717,38 +4635,38 @@ File: automake.info,  Node: Libtool Issues,  Prev: LTLIBOBJS,  Up: A Shared Libr
 \1f
 File: automake.info,  Node: Error required file ltmain.sh not found,  Next: Objects created both with libtool and without,  Up: Libtool Issues
 
-8.3.9.1 Error: `required file `./ltmain.sh' not found'
+8.3.9.1 Error: ‘required file `./ltmain.sh' not found’
 ......................................................
 
-Libtool comes with a tool called `libtoolize' that will install
-libtool's supporting files into a package.  Running this command will
-install `ltmain.sh'.  You should execute it before `aclocal' and
-`automake'.
+Libtool comes with a tool called ‘libtoolize’ that will install
+libtools supporting files into a package.  Running this command will
+install ‘ltmain.sh’.  You should execute it before ‘aclocal’ and
+‘automake’.
 
    People upgrading old packages to newer autotools are likely to face
-this issue because older Automake versions used to call `libtoolize'.
-Therefore old build scripts do not call `libtoolize'.
+this issue because older Automake versions used to call ‘libtoolize’.
+Therefore old build scripts do not call ‘libtoolize’.
 
-   Since Automake 1.6, it has been decided that running `libtoolize'
-was none of Automake's business.  Instead, that functionality has been
-moved into the `autoreconf' command (*note Using `autoreconf':
+   Since Automake 1.6, it has been decided that running ‘libtoolize’ was
+none of Automake’s business.  Instead, that functionality has been moved
+into the ‘autoreconf’ command (*note Using ‘autoreconf’:
 (autoconf)autoreconf Invocation.).  If you do not want to remember what
-to run and when, just learn the `autoreconf' command.  Hopefully,
-replacing existing `bootstrap.sh' or `autogen.sh' scripts by a call to
-`autoreconf' should also free you from any similar incompatible change
+to run and when, just learn the ‘autoreconf’ command.  Hopefully,
+replacing existing ‘bootstrap’ or ‘autogen.sh’ scripts by a call to
+‘autoreconf’ should also free you from any similar incompatible change
 in the future.
 
 \1f
 File: automake.info,  Node: Objects created both with libtool and without,  Prev: Error required file ltmain.sh not found,  Up: Libtool Issues
 
-8.3.9.2 Objects `created with both libtool and without'
+8.3.9.2 Objects ‘created with both libtool and without’
 .......................................................
 
 Sometimes, the same source file is used both to build a libtool library
 and to build another non-libtool target (be it a program or another
 library).
 
-   Let's consider the following `Makefile.am'.
+   Let’s consider the following ‘Makefile.am’.
 
      bin_PROGRAMS = prog
      prog_SOURCES = prog.c foo.c ...
@@ -4756,18 +4674,18 @@ library).
      lib_LTLIBRARIES = libfoo.la
      libfoo_la_SOURCES = foo.c ...
 
-(In this trivial case the issue could be avoided by linking `libfoo.la'
-with `prog' instead of listing `foo.c' in `prog_SOURCES'.  But let's
-assume we really want to keep `prog' and `libfoo.la' separate.)
+(In this trivial case the issue could be avoided by linking ‘libfoo.la’
+with ‘prog’ instead of listing ‘foo.c’ in ‘prog_SOURCES’.  But let’s
+assume we really want to keep ‘prog’ and ‘libfoo.la’ separate.)
 
-   Technically, it means that we should build `foo.$(OBJEXT)' for
-`prog', and `foo.lo' for `libfoo.la'.  The problem is that in the
-course of creating `foo.lo', libtool may erase (or replace)
-`foo.$(OBJEXT)', and this cannot be avoided.
+   Technically, it means that we should build ‘foo.$(OBJEXT)’ for
+‘prog’, and ‘foo.lo’ for ‘libfoo.la’.  The problem is that in the course
+of creating ‘foo.lo’, libtool may erase (or replace) ‘foo.$(OBJEXT)’,
+and this cannot be avoided.
 
-   Therefore, when Automake detects this situation it will complain
-with a message such as
-     object `foo.$(OBJEXT)' created both with libtool and without
+   Therefore, when Automake detects this situation it will complain with
+a message such as
+     object 'foo.$(OBJEXT)' created both with libtool and without
 
    A workaround for this issue is to ensure that these two objects get
 different basenames.  As explained in *note Renamed Objects::, this
@@ -4780,10 +4698,10 @@ happens automatically when per-targets flags are used.
      lib_LTLIBRARIES = libfoo.la
      libfoo_la_SOURCES = foo.c ...
 
-Adding `prog_CFLAGS = $(AM_CFLAGS)' is almost a no-op, because when the
-`prog_CFLAGS' is defined, it is used instead of `AM_CFLAGS'.  However
-as a side effect it will cause `prog.c' and `foo.c' to be compiled as
-`prog-prog.$(OBJEXT)' and `prog-foo.$(OBJEXT)', which solves the issue.
+Adding ‘prog_CFLAGS = $(AM_CFLAGS)’ is almost a no-op, because when the
+‘prog_CFLAGS’ is defined, it is used instead of ‘AM_CFLAGS’.  However as
+a side effect it will cause ‘prog.c’ and ‘foo.c’ to be compiled as
+‘prog-prog.$(OBJEXT)’ and ‘prog-foo.$(OBJEXT)’, which solves the issue.
 
 \1f
 File: automake.info,  Node: Program and Library Variables,  Next: Default _SOURCES,  Prev: A Shared Library,  Up: Programs
@@ -4796,212 +4714,209 @@ used to modify how that program is built.  There is a similar list of
 such variables for each library.  The canonical name of the program (or
 library) is used as a base for naming these variables.
 
-   In the list below, we use the name "maude" to refer to the program or
-library.  In your `Makefile.am' you would replace this with the
-canonical name of your program.  This list also refers to "maude" as a
+   In the list below, we use the name “maude” to refer to the program or
+library.  In your ‘Makefile.am’ you would replace this with the
+canonical name of your program.  This list also refers to “maude” as a
 program, but in general the same rules apply for both static and dynamic
 libraries; the documentation below notes situations where programs and
 libraries differ.
 
-`maude_SOURCES'
+‘maude_SOURCES’
      This variable, if it exists, lists all the source files that are
      compiled to build the program.  These files are added to the
      distribution by default.  When building the program, Automake will
-     cause each source file to be compiled to a single `.o' file (or
-     `.lo' when using libtool).  Normally these object files are named
+     cause each source file to be compiled to a single ‘.o’ file (or
+     ‘.lo’ when using libtool).  Normally these object files are named
      after the source file, but other factors can change this.  If a
-     file in the `_SOURCES' variable has an unrecognized extension,
+     file in the ‘_SOURCES’ variable has an unrecognized extension,
      Automake will do one of two things with it.  If a suffix rule
-     exists for turning files with the unrecognized extension into `.o'
-     files, then `automake' will treat this file as it will any other
+     exists for turning files with the unrecognized extension into ‘.o’
+     files, then ‘automake’ will treat this file as it will any other
      source file (*note Support for Other Languages::).  Otherwise, the
      file will be ignored as though it were a header file.
 
-     The prefixes `dist_' and `nodist_' can be used to control whether
-     files listed in a `_SOURCES' variable are distributed.  `dist_' is
+     The prefixes ‘dist_’ and ‘nodist_’ can be used to control whether
+     files listed in a ‘_SOURCES’ variable are distributed.  ‘dist_’ is
      redundant, as sources are distributed by default, but it can be
      specified for clarity if desired.
 
-     It is possible to have both `dist_' and `nodist_' variants of a
-     given `_SOURCES' variable at once; this lets you easily distribute
+     It is possible to have both ‘dist_’ and ‘nodist_’ variants of a
+     given ‘_SOURCES’ variable at once; this lets you easily distribute
      some files and not others, for instance:
 
           nodist_maude_SOURCES = nodist.c
           dist_maude_SOURCES = dist-me.c
 
-     By default the output file (on Unix systems, the `.o' file) will
-     be put into the current build directory.  However, if the option
-     `subdir-objects' is in effect in the current directory then the
-     `.o' file will be put into the subdirectory named after the source
-     file.  For instance, with `subdir-objects' enabled,
-     `sub/dir/file.c' will be compiled to `sub/dir/file.o'.  Some
-     people prefer this mode of operation.  You can specify
-     `subdir-objects' in `AUTOMAKE_OPTIONS' (*note Options::).  
+     By default the output file (on Unix systems, the ‘.o’ file) will be
+     put into the current build directory.  However, if the option
+     ‘subdir-objects’ is in effect in the current directory then the
+     ‘.o’ file will be put into the subdirectory named after the source
+     file.  For instance, with ‘subdir-objects’ enabled,
+     ‘sub/dir/file.c’ will be compiled to ‘sub/dir/file.o’.  Some people
+     prefer this mode of operation.  You can specify ‘subdir-objects’ in
+     ‘AUTOMAKE_OPTIONS’ (*note Options::).
 
-`EXTRA_maude_SOURCES'
+‘EXTRA_maude_SOURCES’
      Automake needs to know the list of files you intend to compile
      _statically_.  For one thing, this is the only way Automake has of
-     knowing what sort of language support a given `Makefile.in'
-     requires.  (1)  This means that, for example, you can't put a
-     configure substitution like `@my_sources@' into a `_SOURCES'
+     knowing what sort of language support a given ‘Makefile.in’
+     requires.  (1) This means that, for example, you can’t put a
+     configure substitution like ‘@my_sources@’ into a ‘_SOURCES’
      variable.  If you intend to conditionally compile source files and
-     use `configure' to substitute the appropriate object names into,
-     e.g., `_LDADD' (see below), then you should list the corresponding
-     source files in the `EXTRA_' variable.
+     use ‘configure’ to substitute the appropriate object names into,
+     e.g., ‘_LDADD’ (see below), then you should list the corresponding
+     source files in the ‘EXTRA_’ variable.
 
-     This variable also supports `dist_' and `nodist_' prefixes.  For
-     instance, `nodist_EXTRA_maude_SOURCES' would list extra sources
+     This variable also supports ‘dist_’ and ‘nodist_’ prefixes.  For
+     instance, ‘nodist_EXTRA_maude_SOURCES’ would list extra sources
      that may need to be built, but should not be distributed.
 
-`maude_AR'
-     A static library is created by default by invoking `$(AR)
-     $(ARFLAGS)' followed by the name of the library and then the
+‘maude_AR’
+     A static library is created by default by invoking $(AR)
+     $(ARFLAGS) followed by the name of the library and then the
      objects being put into the library.  You can override this by
-     setting the `_AR' variable.  This is usually used with C++; some
+     setting the ‘_AR’ variable.  This is usually used with C++; some
      C++ compilers require a special invocation in order to instantiate
-     all the templates that should go into a library.  For instance,
-     the SGI C++ compiler likes this variable set like so:
+     all the templates that should go into a library.  For instance, the
+     SGI C++ compiler likes this variable set like so:
           libmaude_a_AR = $(CXX) -ar -o
 
-`maude_LIBADD'
-     Extra objects can be added to a _library_ using the `_LIBADD'
-     variable.  For instance, this should be used for objects
-     determined by `configure' (*note A Library::).
+‘maude_LIBADD’
+     Extra objects can be added to a _library_ using the ‘_LIBADD’
+     variable.  For instance, this should be used for objects determined
+     by ‘configure’ (*note A Library::).
 
-     In the case of libtool libraries, `maude_LIBADD' can also refer to
+     In the case of libtool libraries, ‘maude_LIBADD’ can also refer to
      other libtool libraries.
 
-`maude_LDADD'
-     Extra objects (`*.$(OBJEXT)') and libraries (`*.a', `*.la') can be
-     added to a _program_ by listing them in the `_LDADD' variable.
-     For instance, this should be used for objects determined by
-     `configure' (*note Linking::).
+‘maude_LDADD’
+     Extra objects (‘*.$(OBJEXT)’) and libraries (‘*.a’, ‘*.la’) can be
+     added to a _program_ by listing them in the ‘_LDADD’ variable.  For
+     instance, this should be used for objects determined by ‘configure’
+     (*note Linking::).
 
-     `_LDADD' and `_LIBADD' are inappropriate for passing
-     program-specific linker flags (except for `-l', `-L', `-dlopen'
-     and `-dlpreopen').  Use the `_LDFLAGS' variable for this purpose.
+     ‘_LDADD’ and ‘_LIBADD’ are inappropriate for passing
+     program-specific linker flags (except for ‘-l’, ‘-L’, ‘-dlopen’ and
+     ‘-dlpreopen’).  Use the ‘_LDFLAGS’ variable for this purpose.
 
-     For instance, if your `configure.ac' uses `AC_PATH_XTRA', you
-     could link your program against the X libraries like so:
+     For instance, if your ‘configure.ac’ uses ‘AC_PATH_XTRA’, you could
+     link your program against the X libraries like so:
 
           maude_LDADD = $(X_PRE_LIBS) $(X_LIBS) $(X_EXTRA_LIBS)
 
-     We recommend that you use `-l' and `-L' only when referring to
+     We recommend that you use ‘-l’ and ‘-L’ only when referring to
      third-party libraries, and give the explicit file names of any
      library built by your package.  Doing so will ensure that
-     `maude_DEPENDENCIES' (see below) is correctly defined by default.
+     ‘maude_DEPENDENCIES’ (see below) is correctly defined by default.
 
-`maude_LDFLAGS'
+‘maude_LDFLAGS’
      This variable is used to pass extra flags to the link step of a
-     program or a shared library.  It overrides the `AM_LDFLAGS'
+     program or a shared library.  It overrides the ‘AM_LDFLAGS’
      variable.
 
-`maude_LIBTOOLFLAGS'
-     This variable is used to pass extra options to `libtool'.  It
-     overrides the `AM_LIBTOOLFLAGS' variable.  These options are
-     output before `libtool''s `--mode=MODE' option, so they should not
-     be mode-specific options (those belong to the compiler or linker
+‘maude_LIBTOOLFLAGS’
+     This variable is used to pass extra options to ‘libtool’.  It
+     overrides the ‘AM_LIBTOOLFLAGS’ variable.  These options are output
+     before ‘libtool’’s ‘--mode=MODE’ option, so they should not be
+     mode-specific options (those belong to the compiler or linker
      flags).  *Note Libtool Flags::.
 
-`maude_DEPENDENCIES'
-`EXTRA_maude_DEPENDENCIES'
+‘maude_DEPENDENCIES’
+‘EXTRA_maude_DEPENDENCIES’
      It is also occasionally useful to have a target (program or
      library) depend on some other file that is not actually part of
-     that target.  This can be done using the `_DEPENDENCIES' variable.
+     that target.  This can be done using the ‘_DEPENDENCIES’ variable.
      Each target depends on the contents of such a variable, but no
      further interpretation is done.
 
      Since these dependencies are associated to the link rule used to
      create the programs they should normally list files used by the
-     link command.  That is `*.$(OBJEXT)', `*.a', or `*.la' files for
-     programs; `*.lo' and `*.la' files for Libtool libraries; and
-     `*.$(OBJEXT)' files for static libraries.  In rare cases you may
+     link command.  That is ‘*.$(OBJEXT)’, ‘*.a’, or ‘*.la’ files for
+     programs; ‘*.lo’ and ‘*.la’ files for Libtool libraries; and
+     ‘*.$(OBJEXT)’ files for static libraries.  In rare cases you may
      need to add other kinds of files such as linker scripts, but
-     _listing a source file in `_DEPENDENCIES' is wrong_.  If some
+     _listing a source file in ‘_DEPENDENCIES’ is wrong_.  If some
      source file needs to be built before all the components of a
-     program are built, consider using the `BUILT_SOURCES' variable
+     program are built, consider using the ‘BUILT_SOURCES’ variable
      (*note Sources::).
 
-     If `_DEPENDENCIES' is not supplied, it is computed by Automake.
-     The automatically-assigned value is the contents of `_LDADD' or
-     `_LIBADD', with most configure substitutions, `-l', `-L',
-     `-dlopen' and `-dlpreopen' options removed.  The configure
-     substitutions that are left in are only `$(LIBOBJS)' and
-     `$(ALLOCA)'; these are left because it is known that they will not
-     cause an invalid value for `_DEPENDENCIES' to be generated.
+     If ‘_DEPENDENCIES’ is not supplied, it is computed by Automake.
+     The automatically-assigned value is the contents of ‘_LDADD’ or
+     ‘_LIBADD’, with most configure substitutions, ‘-l’, ‘-L’, ‘-dlopen’
+     and ‘-dlpreopen’ options removed.  The configure substitutions that
+     are left in are only ‘$(LIBOBJS)’ and ‘$(ALLOCA)’; these are left
+     because it is known that they will not cause an invalid value for
+     ‘_DEPENDENCIES’ to be generated.
 
-     `_DEPENDENCIES' is more likely used to perform conditional
-     compilation using an `AC_SUBST' variable that contains a list of
+     ‘_DEPENDENCIES’ is more likely used to perform conditional
+     compilation using an ‘AC_SUBST’ variable that contains a list of
      objects.  *Note Conditional Sources::, and *note Conditional
      Libtool Sources::.
 
-     The `EXTRA_*_DEPENDENCIES' variable may be useful for cases where
-     you merely want to augment the `automake'-generated
-     `_DEPENDENCIES' variable rather than replacing it.
+     The ‘EXTRA_*_DEPENDENCIES’ variable may be useful for cases where
+     you merely want to augment the ‘automake’-generated ‘_DEPENDENCIES’
+     variable rather than replacing it.
 
-`maude_LINK'
+‘maude_LINK’
      You can override the linker on a per-program basis.  By default the
      linker is chosen according to the languages used by the program.
-     For instance, a program that includes C++ source code would use
-     the C++ compiler to link.  The `_LINK' variable must hold the name
-     of a command that can be passed all the `.o' file names and
-     libraries to link against as arguments.  Note that the name of the
-     underlying program is _not_ passed to `_LINK'; typically one uses
-     `$@':
+     For instance, a program that includes C++ source code would use the
+     C++ compiler to link.  The ‘_LINK’ variable must hold the name of a
+     command that can be passed all the ‘.o’ file names and libraries to
+     link against as arguments.  Note that the name of the underlying
+     program is _not_ passed to ‘_LINK’; typically one uses ‘$@’:
 
           maude_LINK = $(CCLD) -magic -o $@
 
-     If a `_LINK' variable is not supplied, it may still be generated
+     If a ‘_LINK’ variable is not supplied, it may still be generated
      and used by Automake due to the use of per-target link flags such
-     as `_CFLAGS', `_LDFLAGS' or `_LIBTOOLFLAGS', in cases where they
+     as ‘_CFLAGS’, ‘_LDFLAGS’ or ‘_LIBTOOLFLAGS’, in cases where they
      apply.
 
-`maude_CCASFLAGS'
-`maude_CFLAGS'
-`maude_CPPFLAGS'
-`maude_CXXFLAGS'
-`maude_FFLAGS'
-`maude_GCJFLAGS'
-`maude_LFLAGS'
-`maude_OBJCFLAGS'
-`maude_OBJCXXFLAGS'
-`maude_RFLAGS'
-`maude_UPCFLAGS'
-`maude_YFLAGS'
+‘maude_CCASFLAGS’
+‘maude_CFLAGS’
+‘maude_CPPFLAGS’
+‘maude_CXXFLAGS’
+‘maude_FFLAGS’
+‘maude_GCJFLAGS’
+‘maude_LFLAGS’
+‘maude_OBJCFLAGS’
+‘maude_OBJCXXFLAGS’
+‘maude_RFLAGS’
+‘maude_UPCFLAGS’
+‘maude_YFLAGS’
      Automake allows you to set compilation flags on a per-program (or
      per-library) basis.  A single source file can be included in
      several programs, and it will potentially be compiled with
      different flags for each program.  This works for any language
-     directly supported by Automake.  These "per-target compilation
-     flags" are `_CCASFLAGS', `_CFLAGS', `_CPPFLAGS', `_CXXFLAGS',
-     `_FFLAGS', `_GCJFLAGS', `_LFLAGS', `_OBJCFLAGS', `_OBJCXXFLAGS',
-     `_RFLAGS', `_UPCFLAGS', and `_YFLAGS'.
+     directly supported by Automake.  These per-target compilation
+     flags” are ‘_CCASFLAGS’, ‘_CFLAGS’, ‘_CPPFLAGS’, ‘_CXXFLAGS’,
+     ‘_FFLAGS’, ‘_GCJFLAGS’, ‘_LFLAGS’, ‘_OBJCFLAGS’, ‘_OBJCXXFLAGS’,
+     ‘_RFLAGS’, ‘_UPCFLAGS’, and ‘_YFLAGS’.
 
      When using a per-target compilation flag, Automake will choose a
      different name for the intermediate object files.  Ordinarily a
-     file like `sample.c' will be compiled to produce `sample.o'.
-     However, if the program's `_CFLAGS' variable is set, then the
-     object file will be named, for instance, `maude-sample.o'.  (See
-     also *note Renamed Objects::.)  The use of per-target compilation
-     flags with C sources requires that the macro `AM_PROG_CC_C_O' be
-     called from `configure.ac'.
-
-     In compilations with per-target flags, the ordinary `AM_' form of
+     file like ‘sample.c’ will be compiled to produce ‘sample.o’.
+     However, if the program’s ‘_CFLAGS’ variable is set, then the
+     object file will be named, for instance, ‘maude-sample.o’.  (See
+     also *note Renamed Objects::).
+
+     In compilations with per-target flags, the ordinary ‘AM_’ form of
      the flags variable is _not_ automatically included in the
      compilation (however, the user form of the variable _is_ included).
-     So for instance, if you want the hypothetical `maude' compilations
-     to also use the value of `AM_CFLAGS', you would need to write:
+     So for instance, if you want the hypothetical ‘maude’ compilations
+     to also use the value of ‘AM_CFLAGS’, you would need to write:
 
           maude_CFLAGS = ... your flags ... $(AM_CFLAGS)
 
      *Note Flag Variables Ordering::, for more discussion about the
-     interaction between user variables, `AM_' shadow variables, and
+     interaction between user variables, ‘AM_’ shadow variables, and
      per-target variables.
 
-`maude_SHORTNAME'
+‘maude_SHORTNAME’
      On some platforms the allowable file names are very short.  In
      order to support these systems and per-target compilation flags at
-     the same time, Automake allows you to set a "short name" that will
+     the same time, Automake allows you to set a “short name” that will
      influence how intermediate object files are named.  For instance,
      in the following example,
 
@@ -5010,8 +4925,8 @@ libraries differ.
           maude_SHORTNAME = m
           maude_SOURCES = sample.c ...
 
-     the object file would be named `m-sample.o' rather than
-     `maude-sample.o'.
+     the object file would be named ‘m-sample.o’ rather than
+     ‘maude-sample.o’.
 
      This facility is rarely needed in practice, and we recommend
      avoiding it until you find it is required.
@@ -5024,30 +4939,30 @@ well.
 \1f
 File: automake.info,  Node: Default _SOURCES,  Next: LIBOBJS,  Prev: Program and Library Variables,  Up: Programs
 
-8.5 Default `_SOURCES'
+8.5 Default ‘_SOURCES’
 ======================
 
-`_SOURCES' variables are used to specify source files of programs
-(*note A Program::), libraries (*note A Library::), and Libtool
-libraries (*note A Shared Library::).
+‘_SOURCES’ variables are used to specify source files of programs (*note
+A Program::), libraries (*note A Library::), and Libtool libraries
+(*note A Shared Library::).
 
    When no such variable is specified for a target, Automake will define
 one itself.  The default is to compile a single C file whose base name
 is the name of the target itself, with any extension replaced by
-`AM_DEFAULT_SOURCE_EXT', which defaults to `.c'.
+‘AM_DEFAULT_SOURCE_EXT’, which defaults to ‘.c’.
 
-   For example if you have the following somewhere in your
-`Makefile.am' with no corresponding `libfoo_a_SOURCES':
+   For example if you have the following somewhere in your ‘Makefile.am’
+with no corresponding ‘libfoo_a_SOURCES’:
 
      lib_LIBRARIES = libfoo.a sub/libc++.a
 
-`libfoo.a' will be built using a default source file named `libfoo.c',
-and `sub/libc++.a' will be built from `sub/libc++.c'.  (In older
-versions `sub/libc++.a' would be built from `sub_libc___a.c', i.e., the
-default source was the canonized name of the target, with `.c' appended.
+‘libfoo.a’ will be built using a default source file named ‘libfoo.c’,
+and ‘sub/libc++.a’ will be built from ‘sub/libc++.c’.  (In older
+versions ‘sub/libc++.a’ would be built from ‘sub_libc___a.c’, i.e., the
+default source was the canonized name of the target, with ‘.c’ appended.
 We believe the new behavior is more sensible, but for backward
-compatibility `automake' will use the old name if a file or a rule with
-that name exists and `AM_DEFAULT_SOURCE_EXT' is not used.)
+compatibility ‘automake’ will use the old name if a file or a rule with
+that name exists and ‘AM_DEFAULT_SOURCE_EXT’ is not used.)
 
    Default sources are mainly useful in test suites, when building many
 test programs each from a single source.  For instance, in
@@ -5055,23 +4970,23 @@ test programs each from a single source.  For instance, in
      check_PROGRAMS = test1 test2 test3
      AM_DEFAULT_SOURCE_EXT = .cpp
 
-`test1', `test2', and `test3' will be built from `test1.cpp',
-`test2.cpp', and `test3.cpp'.  Without the last line, they will be
-built from `test1.c', `test2.c', and `test3.c'.
+‘test1’, ‘test2’, and ‘test3’ will be built from ‘test1.cpp’,
+‘test2.cpp’, and ‘test3.cpp’.  Without the last line, they will be built
+from ‘test1.c’, ‘test2.c’, and ‘test3.c’.
 
    Another case where this is convenient is building many Libtool
-modules (`moduleN.la'), each defined in its own file (`moduleN.c').
+modules (‘moduleN.la’), each defined in its own file (‘moduleN.c’).
 
      AM_LDFLAGS = -module
      lib_LTLIBRARIES = module1.la module2.la module3.la
 
    Finally, there is one situation where this default source computation
-needs to be avoided: when a target should not be built from sources.
-We already saw such an example in *note true::; this happens when all
-the constituents of a target have already been compiled and just need
-to be combined using a `_LDADD' variable.  Then it is necessary to
-define an empty `_SOURCES' variable, so that `automake' does not
-compute a default.
+needs to be avoided: when a target should not be built from sources.  We
+already saw such an example in *note true::; this happens when all the
+constituents of a target have already been compiled and just need to be
+combined using a ‘_LDADD’ variable.  Then it is necessary to define an
+empty ‘_SOURCES’ variable, so that ‘automake’ does not compute a
+default.
 
      bin_PROGRAMS = target
      target_SOURCES =
@@ -5080,38 +4995,38 @@ compute a default.
 \1f
 File: automake.info,  Node: LIBOBJS,  Next: Program Variables,  Prev: Default _SOURCES,  Up: Programs
 
-8.6 Special handling for `LIBOBJS' and `ALLOCA'
+8.6 Special handling for ‘LIBOBJS’ and ‘ALLOCA’
 ===============================================
 
-The `$(LIBOBJS)' and `$(ALLOCA)' variables list object files that
-should be compiled into the project to provide an implementation for
-functions that are missing or broken on the host system.  They are
-substituted by `configure'.
+The ‘$(LIBOBJS)’ and ‘$(ALLOCA)’ variables list object files that should
+be compiled into the project to provide an implementation for functions
+that are missing or broken on the host system.  They are substituted by
+‘configure’.
 
-   These variables are defined by Autoconf macros such as `AC_LIBOBJ',
-`AC_REPLACE_FUNCS' (*note Generic Function Checks: (autoconf)Generic
-Functions.), or `AC_FUNC_ALLOCA' (*note Particular Function Checks:
+   These variables are defined by Autoconf macros such as ‘AC_LIBOBJ’,
+‘AC_REPLACE_FUNCS’ (*note Generic Function Checks: (autoconf)Generic
+Functions.), or ‘AC_FUNC_ALLOCA’ (*note Particular Function Checks:
 (autoconf)Particular Functions.).  Many other Autoconf macros call
-`AC_LIBOBJ' or `AC_REPLACE_FUNCS' to populate `$(LIBOBJS)'.
+‘AC_LIBOBJ’ or ‘AC_REPLACE_FUNCS’ to populate ‘$(LIBOBJS)’.
 
    Using these variables is very similar to doing conditional
-compilation using `AC_SUBST' variables, as described in *note
-Conditional Sources::.  That is, when building a program, `$(LIBOBJS)'
-and `$(ALLOCA)' should be added to the associated `*_LDADD' variable,
-or to the `*_LIBADD' variable when building a library.  However there
-is no need to list the corresponding sources in `EXTRA_*_SOURCES' nor
-to define `*_DEPENDENCIES'.  Automake automatically adds `$(LIBOBJS)'
-and `$(ALLOCA)' to the dependencies, and it will discover the list of
+compilation using ‘AC_SUBST’ variables, as described in *note
+Conditional Sources::.  That is, when building a program, ‘$(LIBOBJS)’
+and ‘$(ALLOCA)’ should be added to the associated ‘*_LDADD’ variable, or
+to the ‘*_LIBADD’ variable when building a library.  However there is no
+need to list the corresponding sources in ‘EXTRA_*_SOURCES’ nor to
+define ‘*_DEPENDENCIES’.  Automake automatically adds ‘$(LIBOBJS)’ and
+‘$(ALLOCA)’ to the dependencies, and it will discover the list of
 corresponding source files automatically (by tracing the invocations of
-the `AC_LIBSOURCE' Autoconf macros).  If you have already defined
-`*_DEPENDENCIES' explicitly for an unrelated reason, then you either
-need to add these variables manually, or use `EXTRA_*_DEPENDENCIES'
-instead of `*_DEPENDENCIES'.
+the ‘AC_LIBSOURCE’ Autoconf macros).  If you have already defined
+‘*_DEPENDENCIES’ explicitly for an unrelated reason, then you either
+need to add these variables manually, or use ‘EXTRA_*_DEPENDENCIES’
+instead of ‘*_DEPENDENCIES’.
 
    These variables are usually used to build a portability library that
 is linked with all the programs of the project.  We now review a sample
-setup.  First, `configure.ac' contains some checks that affect either
-`LIBOBJS' or `ALLOCA'.
+setup.  First, ‘configure.ac’ contains some checks that affect either
+‘LIBOBJS’ or ‘ALLOCA’.
 
      # configure.ac
      ...
@@ -5128,14 +5043,14 @@ setup.  First, `configure.ac' contains some checks that affect either
      ])
      AC_OUTPUT
 
-   The `AC_CONFIG_LIBOBJ_DIR' tells Autoconf that the source files of
-these object files are to be found in the `lib/' directory.  Automake
-can also use this information, otherwise it expects the source files
-are to be in the directory where the `$(LIBOBJS)' and `$(ALLOCA)'
-variables are used.
+   The ‘AC_CONFIG_LIBOBJ_DIR’ tells Autoconf that the source files of
+these object files are to be found in the ‘lib/’ directory.  Automake
+can also use this information, otherwise it expects the source files are
+to be in the directory where the ‘$(LIBOBJS)’ and ‘$(ALLOCA)’ variables
+are used.
 
-   The `lib/' directory should therefore contain `malloc.c',
-`memcmp.c', `strdup.c', `alloca.c'.  Here is its `Makefile.am':
+   The ‘lib/’ directory should therefore contain ‘malloc.c’, ‘memcmp.c’,
+‘strdup.c’, ‘alloca.c’.  Here is its ‘Makefile.am’:
 
      # lib/Makefile.am
 
@@ -5147,16 +5062,16 @@ variables are used.
 to be installed: it just holds the replacement versions of the missing
 or broken functions so we can later link them in.  Many projects also
 include extra functions, specific to the project, in that library: they
-are simply added on the `_SOURCES' line.
+are simply added on the ‘_SOURCES’ line.
 
-   There is a small trap here, though: `$(LIBOBJS)' and `$(ALLOCA)'
+   There is a small trap here, though: ‘$(LIBOBJS)’ and ‘$(ALLOCA)’
 might be empty, and building an empty library is not portable.  You
-should ensure that there is always something to put in `libcompat.a'.
+should ensure that there is always something to put in ‘libcompat.a’.
 Most projects will also add some utility functions in that directory,
-and list them in `libcompat_a_SOURCES', so in practice `libcompat.a'
+and list them in ‘libcompat_a_SOURCES’, so in practice ‘libcompat.a’
 cannot be empty.
 
-   Finally here is how this library could be used from the `src/'
+   Finally here is how this library could be used from the ‘src/’
 directory.
 
      # src/Makefile.am
@@ -5168,12 +5083,12 @@ directory.
      tool1_SOURCES = ...
      tool2_SOURCES = ...
 
-   When option `subdir-objects' is not used, as in the above example,
-the variables `$(LIBOBJS)' or `$(ALLOCA)' can only be used in the
+   When option ‘subdir-objects’ is not used, as in the above example,
+the variables ‘$(LIBOBJS)’ or ‘$(ALLOCA)’ can only be used in the
 directory where their sources lie.  E.g., here it would be wrong to use
-`$(LIBOBJS)' or `$(ALLOCA)' in `src/Makefile.am'.  However if both
-`subdir-objects' and `AC_CONFIG_LIBOBJ_DIR' are used, it is OK to use
-these variables in other directories.  For instance `src/Makefile.am'
+‘$(LIBOBJS)’ or ‘$(ALLOCA)’ in ‘src/Makefile.am’.  However if both
+‘subdir-objects’ and ‘AC_CONFIG_LIBOBJ_DIR’ are used, it is OK to use
+these variables in other directories.  For instance ‘src/Makefile.am’
 could be changed as follows.
 
      # src/Makefile.am
@@ -5185,15 +5100,15 @@ could be changed as follows.
      tool1_SOURCES = ...
      tool2_SOURCES = ...
 
-   Because `$(LIBOBJS)' and `$(ALLOCA)' contain object file names that
-end with `.$(OBJEXT)', they are not suitable for Libtool libraries
-(where the expected object extension is `.lo'): `LTLIBOBJS' and
-`LTALLOCA' should be used instead.
+   Because ‘$(LIBOBJS)’ and ‘$(ALLOCA)’ contain object file names that
+end with ‘.$(OBJEXT)’, they are not suitable for Libtool libraries
+(where the expected object extension is ‘.lo’): ‘LTLIBOBJS’ and
+‘LTALLOCA’ should be used instead.
 
-   `LTLIBOBJS' is defined automatically by Autoconf and should not be
+   ‘LTLIBOBJS’ is defined automatically by Autoconf and should not be
 defined by hand (as in the past), however at the time of writing
-`LTALLOCA' still needs to be defined from `ALLOCA' manually.  *Note
-`AC_LIBOBJ' vs. `LIBOBJS': (autoconf)AC_LIBOBJ vs LIBOBJS.
+‘LTALLOCA’ still needs to be defined from ‘ALLOCA’ manually.  *Note
+‘AC_LIBOBJ’ vs. ‘LIBOBJS’: (autoconf)AC_LIBOBJ vs LIBOBJS.
 
 \1f
 File: automake.info,  Node: Program Variables,  Next: Yacc and Lex,  Prev: LIBOBJS,  Up: Programs
@@ -5201,73 +5116,71 @@ File: automake.info,  Node: Program Variables,  Next: Yacc and Lex,  Prev: LIBOB
 8.7 Variables used when building a program
 ==========================================
 
-Occasionally it is useful to know which `Makefile' variables Automake
+Occasionally it is useful to know which ‘Makefile’ variables Automake
 uses for compilations, and in which order (*note Flag Variables
 Ordering::); for instance, you might need to do your own compilation in
 some special cases.
 
-   Some variables are inherited from Autoconf; these are `CC',
-`CFLAGS', `CPPFLAGS', `DEFS', `LDFLAGS', and `LIBS'.  
+   Some variables are inherited from Autoconf; these are ‘CC’, ‘CFLAGS’,
+‘CPPFLAGS’, ‘DEFS’, ‘LDFLAGS’, and ‘LIBS’.
 
    There are some additional variables that Automake defines on its own:
 
-`AM_CPPFLAGS'
+‘AM_CPPFLAGS’
      The contents of this variable are passed to every compilation that
      invokes the C preprocessor; it is a list of arguments to the
-     preprocessor.  For instance, `-I' and `-D' options should be
-     listed here.
+     preprocessor.  For instance, ‘-I’ and ‘-D’ options should be listed
+     here.
 
-     Automake already provides some `-I' options automatically, in a
+     Automake already provides some ‘-I’ options automatically, in a
      separate variable that is also passed to every compilation that
-     invokes the C preprocessor.  In particular it generates `-I.',
-     `-I$(srcdir)', and a `-I' pointing to the directory holding
-     `config.h' (if you've used `AC_CONFIG_HEADERS' or
-     `AM_CONFIG_HEADER').  You can disable the default `-I' options
-     using the `nostdinc' option.
+     invokes the C preprocessor.  In particular it generates ‘-I.’,
+     ‘-I$(srcdir)’, and a ‘-I’ pointing to the directory holding
+     ‘config.h’ (if you’ve used ‘AC_CONFIG_HEADERS’).  You can disable
+     the default ‘-I’ options using the ‘nostdinc’ option.
 
      When a file to be included is generated during the build and not
      part of a distribution tarball, its location is under
-     `$(builddir)', not under `$(srcdir)'.  This matters especially for
+     ‘$(builddir)’, not under ‘$(srcdir)’.  This matters especially for
      packages that use header files placed in sub-directories and want
-     to allow builds outside the source tree (*note VPATH Builds::). In
-     that case we recommend to use a pair of `-I' options, such as,
-     e.g., `-Isome/subdir -I$(srcdir)/some/subdir' or
-     `-I$(top_builddir)/some/subdir -I$(top_srcdir)/some/subdir'.  Note
+     to allow builds outside the source tree (*note VPATH Builds::).  In
+     that case we recommend to use a pair of ‘-I’ options, such as,
+     e.g., ‘-Isome/subdir -I$(srcdir)/some/subdir’ or
+     ‘-I$(top_builddir)/some/subdir -I$(top_srcdir)/some/subdir’.  Note
      that the reference to the build tree should come before the
      reference to the source tree, so that accidentally leftover
      generated files in the source directory are ignored.
 
-     `AM_CPPFLAGS' is ignored in preference to a per-executable (or
-     per-library) `_CPPFLAGS' variable if it is defined.
+     ‘AM_CPPFLAGS’ is ignored in preference to a per-executable (or
+     per-library) ‘_CPPFLAGS’ variable if it is defined.
 
-`INCLUDES'
-     This does the same job as `AM_CPPFLAGS' (or any per-target
-     `_CPPFLAGS' variable if it is used).  It is an older name for the
+‘INCLUDES’
+     This does the same job as ‘AM_CPPFLAGS’ (or any per-target
+     ‘_CPPFLAGS’ variable if it is used).  It is an older name for the
      same functionality.  This variable is deprecated; we suggest using
-     `AM_CPPFLAGS' and per-target `_CPPFLAGS' instead.
+     ‘AM_CPPFLAGS’ and per-target ‘_CPPFLAGS’ instead.
 
-`AM_CFLAGS'
-     This is the variable the `Makefile.am' author can use to pass in
-     additional C compiler flags.  It is more fully documented
-     elsewhere.  In some situations, this is not used, in preference to
-     the per-executable (or per-library) `_CFLAGS'.
+‘AM_CFLAGS’
+     This is the variable the ‘Makefile.am’ author can use to pass in
+     additional C compiler flags.  In some situations, this is not used,
+     in preference to the per-executable (or per-library) ‘_CFLAGS’.
 
-`COMPILE'
+‘COMPILE’
      This is the command used to actually compile a C source file.  The
      file name is appended to form the complete command line.
 
-`AM_LDFLAGS'
-     This is the variable the `Makefile.am' author can use to pass in
+‘AM_LDFLAGS’
+     This is the variable the ‘Makefile.am’ author can use to pass in
      additional linker flags.  In some situations, this is not used, in
-     preference to the per-executable (or per-library) `_LDFLAGS'.
+     preference to the per-executable (or per-library) ‘_LDFLAGS’.
 
-`LINK'
+‘LINK’
      This is the command used to actually link a C program.  It already
-     includes `-o $@' and the usual variable references (for instance,
-     `CFLAGS'); it takes as "arguments" the names of the object files
+     includes ‘-o $@’ and the usual variable references (for instance,
+     ‘CFLAGS’); it takes as “arguments” the names of the object files
      and libraries to link in.  This variable is not used when the
-     linker is overridden with a per-target `_LINK' variable or
-     per-target flags cause Automake to define such a `_LINK' variable.
+     linker is overridden with a per-target ‘_LINK’ variable or
+     per-target flags cause Automake to define such a ‘_LINK’ variable.
 
 \1f
 File: automake.info,  Node: Yacc and Lex,  Next: C++ Support,  Prev: Program Variables,  Up: Programs
@@ -5277,80 +5190,80 @@ File: automake.info,  Node: Yacc and Lex,  Next: C++ Support,  Prev: Program Var
 
 Automake has somewhat idiosyncratic support for Yacc and Lex.
 
-   Automake assumes that the `.c' file generated by `yacc' (or `lex')
+   Automake assumes that the ‘.c’ file generated by ‘yacc’ (or ‘lex’)
 should be named using the basename of the input file.  That is, for a
-yacc source file `foo.y', Automake will cause the intermediate file to
-be named `foo.c' (as opposed to `y.tab.c', which is more traditional).
+yacc source file ‘foo.y’, Automake will cause the intermediate file to
+be named ‘foo.c’ (as opposed to ‘y.tab.c’, which is more traditional).
 
    The extension of a yacc source file is used to determine the
 extension of the resulting C or C++ source and header files.  Note that
-header files are generated only when the `-d' Yacc option is used; see
+header files are generated only when the ‘-d’ Yacc option is used; see
 below for more information about this flag, and how to specify it.
-Files with the extension `.y' will thus be turned into `.c' sources and
-`.h' headers; likewise, `.yy' will become `.cc' and `.hh', `.y++' will
-become `c++' and `h++', `.yxx' will become `.cxx' and `.hxx', and
-`.ypp' will become `.cpp' and `.hpp'.
+Files with the extension ‘.y’ will thus be turned into ‘.c’ sources and
+‘.h’ headers; likewise, ‘.yy’ will become ‘.cc’ and ‘.hh’, ‘.y++’ will
+become ‘c++’ and ‘h++’, ‘.yxx’ will become ‘.cxx’ and ‘.hxx’, and ‘.ypp’
+will become ‘.cpp’ and ‘.hpp’.
 
    Similarly, lex source files can be used to generate C or C++; the
-extensions `.l', `.ll', `.l++', `.lxx', and `.lpp' are recognized.
+extensions ‘.l’, ‘.ll’, ‘.l++’, ‘.lxx’, and ‘.lpp’ are recognized.
 
    You should never explicitly mention the intermediate (C or C++) file
-in any `SOURCES' variable; only list the source file.
+in any ‘SOURCES’ variable; only list the source file.
 
-   The intermediate files generated by `yacc' (or `lex') will be
-included in any distribution that is made.  That way the user doesn't
-need to have `yacc' or `lex'.
+   The intermediate files generated by ‘yacc’ (or ‘lex’) will be
+included in any distribution that is made.  That way the user doesnt
+need to have ‘yacc’ or ‘lex’.
 
-   If a `yacc' source file is seen, then your `configure.ac' must
-define the variable `YACC'.  This is most easily done by invoking the
-macro `AC_PROG_YACC' (*note Particular Program Checks:
-(autoconf)Particular Programs.).
+   If a ‘yacc’ source file is seen, then your ‘configure.ac’ must define
+the variable ‘YACC’.  This is most easily done by invoking the macro
+‘AC_PROG_YACC’ (*note Particular Program Checks: (autoconf)Particular
+Programs.).
 
-   When `yacc' is invoked, it is passed `AM_YFLAGS' and `YFLAGS'.  The
+   When ‘yacc’ is invoked, it is passed ‘AM_YFLAGS’ and ‘YFLAGS’.  The
 latter is a user variable and the former is intended for the
-`Makefile.am' author.
+‘Makefile.am’ author.
 
-   `AM_YFLAGS' is usually used to pass the `-d' option to `yacc'.
+   ‘AM_YFLAGS’ is usually used to pass the ‘-d’ option to ‘yacc’.
 Automake knows what this means and will automatically adjust its rules
-to update and distribute the header file built by `yacc -d'(1).  What
+to update and distribute the header file built by ‘yacc -d’(1).  What
 Automake cannot guess, though, is where this header will be used: it is
 up to you to ensure the header gets built before it is first used.
 Typically this is necessary in order for dependency tracking to work
 when the header is included by another file.  The common solution is
-listing the header file in `BUILT_SOURCES' (*note Sources::) as follows.
+listing the header file in ‘BUILT_SOURCES’ (*note Sources::) as follows.
 
      BUILT_SOURCES = parser.h
      AM_YFLAGS = -d
      bin_PROGRAMS = foo
      foo_SOURCES = ... parser.y ...
 
-   If a `lex' source file is seen, then your `configure.ac' must define
-the variable `LEX'.  You can use `AC_PROG_LEX' to do this (*note
+   If a ‘lex’ source file is seen, then your ‘configure.ac’ must define
+the variable ‘LEX’.  You can use ‘AC_PROG_LEX’ to do this (*note
 Particular Program Checks: (autoconf)Particular Programs.), but using
-`AM_PROG_LEX' macro (*note Macros::) is recommended.
+‘AM_PROG_LEX’ macro (*note Macros::) is recommended.
 
-   When `lex' is invoked, it is passed `AM_LFLAGS' and `LFLAGS'.  The
+   When ‘lex’ is invoked, it is passed ‘AM_LFLAGS’ and ‘LFLAGS’.  The
 latter is a user variable and the former is intended for the
-`Makefile.am' author.
+‘Makefile.am’ author.
 
-   When `AM_MAINTAINER_MODE' (*note maintainer-mode::) is used, the
+   When ‘AM_MAINTAINER_MODE’ (*note maintainer-mode::) is used, the
 rebuild rule for distributed Yacc and Lex sources are only used when
-`maintainer-mode' is enabled, or when the files have been erased.
+‘maintainer-mode’ is enabled, or when the files have been erased.
 
-   When `lex' or `yacc' sources are used, `automake -i' automatically
-installs an auxiliary program called `ylwrap' in your package (*note
+   When ‘lex’ or ‘yacc’ sources are used, ‘automake -a’ automatically
+installs an auxiliary program called ‘ylwrap’ in your package (*note
 Auxiliary Programs::).  This program is used by the build rules to
 rename the output of these tools, and makes it possible to include
-multiple `yacc' (or `lex') source files in a single directory.  (This
-is necessary because yacc's output file name is fixed, and a parallel
-make could conceivably invoke more than one instance of `yacc'
+multiple ‘yacc’ (or ‘lex’) source files in a single directory.  (This is
+necessary because yacc’s output file name is fixed, and a parallel make
+could conceivably invoke more than one instance of ‘yacc’
 simultaneously.)
 
-   For `yacc', simply managing locking is insufficient.  The output of
-`yacc' always uses the same symbol names internally, so it isn't
-possible to link two `yacc' parsers into the same executable.
+   For ‘yacc’, simply managing locking is insufficient.  The output of
+‘yacc’ always uses the same symbol names internally, so it isn’t
+possible to link two ‘yacc’ parsers into the same executable.
 
-   We recommend using the following renaming hack used in `gdb':
+   We recommend using the following renaming hack used in ‘gdb’:
      #define yymaxdepth c_maxdepth
      #define yyparse c_parse
      #define yylex   c_lex
@@ -5392,17 +5305,17 @@ possible to link two `yacc' parsers into the same executable.
      #define yyname   c_yyname
      #define yyrule   c_yyrule
 
-   For each define, replace the `c_' prefix with whatever you like.
-These defines work for `bison', `byacc', and traditional `yacc's.  If
+   For each define, replace the ‘c_’ prefix with whatever you like.
+These defines work for ‘bison’, ‘byacc’, and traditional ‘yacc’s.  If
 you find a parser generator that uses a symbol not covered here, please
 report the new name so it can be added to the list.
 
    ---------- Footnotes ----------
 
-   (1) Please note that `automake' recognizes `-d' in `AM_YFLAGS' only
-if it is not clustered with other options; for example, it won't be
-recognized if `AM_YFLAGS' is `-dt', but it will be if `AM_YFLAGS' is
-`-d -t' or `-t -d'.
+   (1) Please note that ‘automake’ recognizes ‘-d’ in ‘AM_YFLAGS’ only
+if it is not clustered with other options; for example, it wont be
+recognized if ‘AM_YFLAGS’ is ‘-dt’, but it will be if ‘AM_YFLAGS’ is ‘-d
+-t’ or ‘-t -d’.
 
 \1f
 File: automake.info,  Node: C++ Support,  Next: Objective C Support,  Prev: Yacc and Lex,  Up: Programs
@@ -5412,28 +5325,28 @@ File: automake.info,  Node: C++ Support,  Next: Objective C Support,  Prev: Yacc
 
 Automake includes full support for C++.
 
-   Any package including C++ code must define the output variable `CXX'
-in `configure.ac'; the simplest way to do this is to use the
-`AC_PROG_CXX' macro (*note Particular Program Checks:
+   Any package including C++ code must define the output variable ‘CXX’
+in ‘configure.ac’; the simplest way to do this is to use the
+‘AC_PROG_CXX’ macro (*note Particular Program Checks:
 (autoconf)Particular Programs.).
 
    A few additional variables are defined when a C++ source file is
 seen:
 
-`CXX'
+‘CXX’
      The name of the C++ compiler.
 
-`CXXFLAGS'
+‘CXXFLAGS’
      Any flags to pass to the C++ compiler.
 
-`AM_CXXFLAGS'
-     The maintainer's variant of `CXXFLAGS'.
+‘AM_CXXFLAGS’
+     The maintainer’s variant of ‘CXXFLAGS’.
 
-`CXXCOMPILE'
+‘CXXCOMPILE’
      The command used to actually compile a C++ source file.  The file
      name is appended to form the complete command line.
 
-`CXXLINK'
+‘CXXLINK’
      The command used to actually link a C++ program.
 
 \1f
@@ -5445,27 +5358,27 @@ File: automake.info,  Node: Objective C Support,  Next: Objective C++ Support,
 Automake includes some support for Objective C.
 
    Any package including Objective C code must define the output
-variable `OBJC' in `configure.ac'; the simplest way to do this is to use
-the `AC_PROG_OBJC' macro (*note Particular Program Checks:
+variable ‘OBJC’ in ‘configure.ac’; the simplest way to do this is to use
+the ‘AC_PROG_OBJC’ macro (*note Particular Program Checks:
 (autoconf)Particular Programs.).
 
    A few additional variables are defined when an Objective C source
 file is seen:
 
-`OBJC'
+‘OBJC’
      The name of the Objective C compiler.
 
-`OBJCFLAGS'
+‘OBJCFLAGS’
      Any flags to pass to the Objective C compiler.
 
-`AM_OBJCFLAGS'
-     The maintainer's variant of `OBJCFLAGS'.
+‘AM_OBJCFLAGS’
+     The maintainer’s variant of ‘OBJCFLAGS’.
 
-`OBJCCOMPILE'
+‘OBJCCOMPILE’
      The command used to actually compile an Objective C source file.
      The file name is appended to form the complete command line.
 
-`OBJCLINK'
+‘OBJCLINK’
      The command used to actually link an Objective C program.
 
 \1f
@@ -5477,27 +5390,27 @@ File: automake.info,  Node: Objective C++ Support,  Next: Unified Parallel C Sup
 Automake includes some support for Objective C++.
 
    Any package including Objective C++ code must define the output
-variable `OBJCXX' in `configure.ac'; the simplest way to do this is to
-use the `AC_PROG_OBJCXX' macro (*note Particular Program Checks:
+variable ‘OBJCXX’ in ‘configure.ac’; the simplest way to do this is to
+use the ‘AC_PROG_OBJCXX’ macro (*note Particular Program Checks:
 (autoconf)Particular Programs.).
 
    A few additional variables are defined when an Objective C++ source
 file is seen:
 
-`OBJCXX'
+‘OBJCXX’
      The name of the Objective C++ compiler.
 
-`OBJCXXFLAGS'
+‘OBJCXXFLAGS’
      Any flags to pass to the Objective C++ compiler.
 
-`AM_OBJCXXFLAGS'
-     The maintainer's variant of `OBJCXXFLAGS'.
+‘AM_OBJCXXFLAGS’
+     The maintainer’s variant of ‘OBJCXXFLAGS’.
 
-`OBJCXXCOMPILE'
+‘OBJCXXCOMPILE’
      The command used to actually compile an Objective C++ source file.
      The file name is appended to form the complete command line.
 
-`OBJCXXLINK'
+‘OBJCXXLINK’
      The command used to actually link an Objective C++ program.
 
 \1f
@@ -5509,26 +5422,26 @@ File: automake.info,  Node: Unified Parallel C Support,  Next: Assembly Support,
 Automake includes some support for Unified Parallel C.
 
    Any package including Unified Parallel C code must define the output
-variable `UPC' in `configure.ac'; the simplest way to do this is to use
-the `AM_PROG_UPC' macro (*note Public Macros::).
+variable ‘UPC’ in ‘configure.ac’; the simplest way to do this is to use
+the ‘AM_PROG_UPC’ macro (*note Public Macros::).
 
    A few additional variables are defined when a Unified Parallel C
 source file is seen:
 
-`UPC'
+‘UPC’
      The name of the Unified Parallel C compiler.
 
-`UPCFLAGS'
+‘UPCFLAGS’
      Any flags to pass to the Unified Parallel C compiler.
 
-`AM_UPCFLAGS'
-     The maintainer's variant of `UPCFLAGS'.
+‘AM_UPCFLAGS’
+     The maintainer’s variant of ‘UPCFLAGS’.
 
-`UPCCOMPILE'
+‘UPCCOMPILE’
      The command used to actually compile a Unified Parallel C source
      file.  The file name is appended to form the complete command line.
 
-`UPCLINK'
+‘UPCLINK’
      The command used to actually link a Unified Parallel C program.
 
 \1f
@@ -5538,22 +5451,22 @@ File: automake.info,  Node: Assembly Support,  Next: Fortran 77 Support,  Prev:
 =====================
 
 Automake includes some support for assembly code.  There are two forms
-of assembler files: normal (`*.s') and preprocessed by `CPP' (`*.S' or
-`*.sx').
+of assembler files: normal (‘*.s’) and preprocessed by ‘CPP’ (‘*.S’ or
+‘*.sx’).
 
-   The variable `CCAS' holds the name of the compiler used to build
+   The variable ‘CCAS’ holds the name of the compiler used to build
 assembly code.  This compiler must work a bit like a C compiler; in
-particular it must accept `-c' and `-o'.  The values of `CCASFLAGS' and
-`AM_CCASFLAGS' (or its per-target definition) is passed to the
-compilation.  For preprocessed files, `DEFS', `DEFAULT_INCLUDES',
-`INCLUDES', `CPPFLAGS' and `AM_CPPFLAGS' are also used.
-
-   The autoconf macro `AM_PROG_AS' will define `CCAS' and `CCASFLAGS'
-for you (unless they are already set, it simply sets `CCAS' to the C
-compiler and `CCASFLAGS' to the C compiler flags), but you are free to
+particular it must accept ‘-c’ and ‘-o’.  The values of ‘CCASFLAGS’ and
+‘AM_CCASFLAGS’ (or its per-target definition) is passed to the
+compilation.  For preprocessed files, ‘DEFS’, ‘DEFAULT_INCLUDES’,
+‘INCLUDES’, ‘CPPFLAGS’ and ‘AM_CPPFLAGS’ are also used.
+
+   The autoconf macro ‘AM_PROG_AS’ will define ‘CCAS’ and ‘CCASFLAGS’
+for you (unless they are already set, it simply sets ‘CCAS’ to the C
+compiler and ‘CCASFLAGS’ to the C compiler flags), but you are free to
 define these variables by other means.
 
-   Only the suffixes `.s', `.S', and `.sx' are recognized by `automake'
+   Only the suffixes ‘.s’, ‘.S’, and ‘.sx’ are recognized by ‘automake’
 as being files containing assembly code.
 
 \1f
@@ -5565,42 +5478,40 @@ File: automake.info,  Node: Fortran 77 Support,  Next: Fortran 9x Support,  Prev
 Automake includes full support for Fortran 77.
 
    Any package including Fortran 77 code must define the output variable
-`F77' in `configure.ac'; the simplest way to do this is to use the
-`AC_PROG_F77' macro (*note Particular Program Checks:
+‘F77’ in ‘configure.ac’; the simplest way to do this is to use the
+‘AC_PROG_F77’ macro (*note Particular Program Checks:
 (autoconf)Particular Programs.).
 
    A few additional variables are defined when a Fortran 77 source file
 is seen:
 
-`F77'
+‘F77’
      The name of the Fortran 77 compiler.
 
-`FFLAGS'
+‘FFLAGS’
      Any flags to pass to the Fortran 77 compiler.
 
-`AM_FFLAGS'
-     The maintainer's variant of `FFLAGS'.
+‘AM_FFLAGS’
+     The maintainer’s variant of ‘FFLAGS’.
 
-`RFLAGS'
+‘RFLAGS’
      Any flags to pass to the Ratfor compiler.
 
-`AM_RFLAGS'
-     The maintainer's variant of `RFLAGS'.
+‘AM_RFLAGS’
+     The maintainer’s variant of ‘RFLAGS’.
 
-`F77COMPILE'
-     The command used to actually compile a Fortran 77 source file.
-     The file name is appended to form the complete command line.
+‘F77COMPILE’
+     The command used to actually compile a Fortran 77 source file.  The
+     file name is appended to form the complete command line.
 
-`FLINK'
+‘FLINK’
      The command used to actually link a pure Fortran 77 program or
      shared library.
 
-
    Automake can handle preprocessing Fortran 77 and Ratfor source files
 in addition to compiling them(1).  Automake also contains some support
-for creating programs and shared libraries that are a mixture of
-Fortran 77 and other languages (*note Mixing Fortran 77 With C and
-C++::).
+for creating programs and shared libraries that are a mixture of Fortran
+77 and other languages (*note Mixing Fortran 77 With C and C++::).
 
    These issues are covered in the following sections.
 
@@ -5622,18 +5533,17 @@ File: automake.info,  Node: Preprocessing Fortran 77,  Next: Compiling Fortran 7
 8.14.1 Preprocessing Fortran 77
 -------------------------------
 
-`N.f' is made automatically from `N.F' or `N.r'.  This rule runs just
-the preprocessor to convert a preprocessable Fortran 77 or Ratfor
-source file into a strict Fortran 77 source file.  The precise command
-used is as follows:
-
-`.F'
-     `$(F77) -F $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS)
-     $(AM_FFLAGS) $(FFLAGS)'
+‘N.f’ is made automatically from ‘N.F’ or ‘N.r’.  This rule runs just
+the preprocessor to convert a preprocessable Fortran 77 or Ratfor source
+file into a strict Fortran 77 source file.  The precise command used is
+as follows:
 
-`.r'
-     `$(F77) -F $(AM_FFLAGS) $(FFLAGS) $(AM_RFLAGS) $(RFLAGS)'
+‘.F’
+     ‘$(F77) -F $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS)
+     $(AM_FFLAGS) $(FFLAGS)’
 
+‘.r’
+     ‘$(F77) -F $(AM_FFLAGS) $(FFLAGS) $(AM_RFLAGS) $(RFLAGS)’
 
 \1f
 File: automake.info,  Node: Compiling Fortran 77 Files,  Next: Mixing Fortran 77 With C and C++,  Prev: Preprocessing Fortran 77,  Up: Fortran 77 Support
@@ -5641,19 +5551,18 @@ File: automake.info,  Node: Compiling Fortran 77 Files,  Next: Mixing Fortran 77
 8.14.2 Compiling Fortran 77 Files
 ---------------------------------
 
-`N.o' is made automatically from `N.f', `N.F' or `N.r' by running the
+‘N.o’ is made automatically from ‘N.f’, ‘N.F’ or ‘N.r’ by running the
 Fortran 77 compiler.  The precise command used is as follows:
 
-`.f'
-     `$(F77) -c $(AM_FFLAGS) $(FFLAGS)'
-
-`.F'
-     `$(F77) -c $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS)
-     $(AM_FFLAGS) $(FFLAGS)'
+‘.f’
+     ‘$(F77) -c $(AM_FFLAGS) $(FFLAGS)’
 
-`.r'
-     `$(F77) -c $(AM_FFLAGS) $(FFLAGS) $(AM_RFLAGS) $(RFLAGS)'
+‘.F’
+     ‘$(F77) -c $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS)
+     $(AM_FFLAGS) $(FFLAGS)’
 
+‘.r’
+     ‘$(F77) -c $(AM_FFLAGS) $(FFLAGS) $(AM_RFLAGS) $(RFLAGS)’
 
 \1f
 File: automake.info,  Node: Mixing Fortran 77 With C and C++,  Prev: Compiling Fortran 77 Files,  Up: Fortran 77 Support
@@ -5664,32 +5573,32 @@ File: automake.info,  Node: Mixing Fortran 77 With C and C++,  Prev: Compiling F
 Automake currently provides _limited_ support for creating programs and
 shared libraries that are a mixture of Fortran 77 and C and/or C++.
 However, there are many other issues related to mixing Fortran 77 with
-other languages that are _not_ (currently) handled by Automake, but
-that are handled by other packages(1).
+other languages that are _not_ (currently) handled by Automake, but that
+are handled by other packages(1).
 
    Automake can help in two ways:
 
   1. Automatic selection of the linker depending on which combinations
      of source code.
 
-  2. Automatic selection of the appropriate linker flags (e.g., `-L' and
-     `-l') to pass to the automatically selected linker in order to link
+  2. Automatic selection of the appropriate linker flags (e.g., ‘-L’ and
+     ‘-l’) to pass to the automatically selected linker in order to link
      in the appropriate Fortran 77 intrinsic and run-time libraries.
 
      These extra Fortran 77 linker flags are supplied in the output
-     variable `FLIBS' by the `AC_F77_LIBRARY_LDFLAGS' Autoconf macro.
+     variable ‘FLIBS’ by the ‘AC_F77_LIBRARY_LDFLAGS’ Autoconf macro.
      *Note Fortran Compiler Characteristics: (autoconf)Fortran Compiler.
 
    If Automake detects that a program or shared library (as mentioned in
-some `_PROGRAMS' or `_LTLIBRARIES' primary) contains source code that
-is a mixture of Fortran 77 and C and/or C++, then it requires that the
-macro `AC_F77_LIBRARY_LDFLAGS' be called in `configure.ac', and that
-either `$(FLIBS)' appear in the appropriate `_LDADD' (for programs) or
-`_LIBADD' (for shared libraries) variables.  It is the responsibility
-of the person writing the `Makefile.am' to make sure that `$(FLIBS)'
-appears in the appropriate `_LDADD' or `_LIBADD' variable.
+some ‘_PROGRAMS’ or ‘_LTLIBRARIES’ primary) contains source code that is
+a mixture of Fortran 77 and C and/or C++, then it requires that the
+macro ‘AC_F77_LIBRARY_LDFLAGS’ be called in ‘configure.ac’, and that
+either ‘$(FLIBS)’ appear in the appropriate ‘_LDADD’ (for programs) or
+‘_LIBADD’ (for shared libraries) variables.  It is the responsibility of
+the person writing the ‘Makefile.am’ to make sure that ‘$(FLIBS)’
+appears in the appropriate ‘_LDADD’ or ‘_LIBADD’ variable.
 
-   For example, consider the following `Makefile.am':
+   For example, consider the following ‘Makefile.am’:
 
      bin_PROGRAMS = foo
      foo_SOURCES  = main.cc foo.f
@@ -5699,10 +5608,10 @@ appears in the appropriate `_LDADD' or `_LIBADD' variable.
      libfoo_la_SOURCES  = bar.f baz.c zardoz.cc
      libfoo_la_LIBADD   = $(FLIBS)
 
-   In this case, Automake will insist that `AC_F77_LIBRARY_LDFLAGS' is
-mentioned in `configure.ac'.  Also, if `$(FLIBS)' hadn't been mentioned
-in `foo_LDADD' and `libfoo_la_LIBADD', then Automake would have issued
-warning.
+   In this case, Automake will insist that ‘AC_F77_LIBRARY_LDFLAGS’ is
+mentioned in ‘configure.ac’.  Also, if ‘$(FLIBS)’ hadn’t been mentioned
+in ‘foo_LDADD’ and ‘libfoo_la_LIBADD’, then Automake would have issued a
+warning.
 
 * Menu:
 
@@ -5713,7 +5622,7 @@ a warning.
    (1) For example, the cfortran package
 (http://www-zeus.desy.de/~burow/cfortran/) addresses all of these
 inter-language issues, and runs under nearly all Fortran 77, C and C++
-compilers on nearly all platforms.  However, `cfortran' is not yet Free
+compilers on nearly all platforms.  However, ‘cfortran’ is not yet Free
 Software, but it will be in the next major release.
 
 \1f
@@ -5723,40 +5632,33 @@ File: automake.info,  Node: How the Linker is Chosen,  Up: Mixing Fortran 77 Wit
 .................................
 
 When a program or library mixes several languages, Automake choose the
-linker according to the following priorities.  (The names in
-parentheses are the variables containing the link command.)
-
-  1. Native Java (`GCJLINK')
-
-  2. Objective C++ (`OBJCXXLINK')
-
-  3. C++ (`CXXLINK')
-
-  4. Fortran 77 (`F77LINK')
-
-  5. Fortran (`FCLINK')
-
-  6. Objective C (`OBJCLINK')
-
-  7. Unified Parallel C (`UPCLINK')
-
-  8. C (`LINK')
+linker according to the following priorities.  (The names in parentheses
+are the variables containing the link command.)
+
+  1. Native Java (‘GCJLINK’)
+  2. Objective C++ (‘OBJCXXLINK’)
+  3. C++ (‘CXXLINK’)
+  4. Fortran 77 (‘F77LINK’)
+  5. Fortran (‘FCLINK’)
+  6. Objective C (‘OBJCLINK’)
+  7. Unified Parallel C (‘UPCLINK’)
+  8. C (‘LINK’)
 
    For example, if Fortran 77, C and C++ source code is compiled into a
 program, then the C++ linker will be used.  In this case, if the C or
-Fortran 77 linkers required any special libraries that weren't included
-by the C++ linker, then they must be manually added to an `_LDADD' or
-`_LIBADD' variable by the user writing the `Makefile.am'.
+Fortran 77 linkers required any special libraries that werent included
+by the C++ linker, then they must be manually added to an ‘_LDADD’ or
+‘_LIBADD’ variable by the user writing the ‘Makefile.am’.
 
-   Automake only looks at the file names listed in `_SOURCES' variables
+   Automake only looks at the file names listed in ‘_SOURCES’ variables
 to choose the linker, and defaults to the C linker.  Sometimes this is
 inconvenient because you are linking against a library written in
 another language and would like to set the linker more appropriately.
 *Note Libtool Convenience Libraries::, for a trick with
-`nodist_EXTRA_..._SOURCES'.
+‘nodist_EXTRA_..._SOURCES’.
 
-   A per-target `_LINK' variable will override the above selection.
-Per-target link flags will cause Automake to write a per-target `_LINK'
+   A per-target ‘_LINK’ variable will override the above selection.
+Per-target link flags will cause Automake to write a per-target ‘_LINK’
 variable according to the language chosen as above.
 
 \1f
@@ -5768,31 +5670,30 @@ File: automake.info,  Node: Fortran 9x Support,  Next: Java Support with gcj,  P
 Automake includes support for Fortran 9x.
 
    Any package including Fortran 9x code must define the output variable
-`FC' in `configure.ac'; the simplest way to do this is to use the
-`AC_PROG_FC' macro (*note Particular Program Checks:
+‘FC’ in ‘configure.ac’; the simplest way to do this is to use the
+‘AC_PROG_FC’ macro (*note Particular Program Checks:
 (autoconf)Particular Programs.).
 
    A few additional variables are defined when a Fortran 9x source file
 is seen:
 
-`FC'
+‘FC’
      The name of the Fortran 9x compiler.
 
-`FCFLAGS'
+‘FCFLAGS’
      Any flags to pass to the Fortran 9x compiler.
 
-`AM_FCFLAGS'
-     The maintainer's variant of `FCFLAGS'.
+‘AM_FCFLAGS’
+     The maintainer’s variant of ‘FCFLAGS’.
 
-`FCCOMPILE'
-     The command used to actually compile a Fortran 9x source file.
-     The file name is appended to form the complete command line.
+‘FCCOMPILE’
+     The command used to actually compile a Fortran 9x source file.  The
+     file name is appended to form the complete command line.
 
-`FCLINK'
+‘FCLINK’
      The command used to actually link a pure Fortran 9x program or
      shared library.
 
-
 * Menu:
 
 * Compiling Fortran 9x Files::  Compiling Fortran 9x sources
@@ -5803,22 +5704,21 @@ File: automake.info,  Node: Compiling Fortran 9x Files,  Up: Fortran 9x Support
 8.15.1 Compiling Fortran 9x Files
 ---------------------------------
 
-`FILE.o' is made automatically from `FILE.f90', `FILE.f95', `FILE.f03',
-or `FILE.f08' by running the Fortran 9x compiler.  The precise command
+‘FILE.o’ is made automatically from ‘FILE.f90’, ‘FILE.f95’, ‘FILE.f03’,
+or ‘FILE.f08’ by running the Fortran 9x compiler.  The precise command
 used is as follows:
 
-`.f90'
-     `$(FC) $(AM_FCFLAGS) $(FCFLAGS) -c $(FCFLAGS_f90) $<'
+‘.f90’
+     ‘$(FC) $(AM_FCFLAGS) $(FCFLAGS) -c $(FCFLAGS_f90) $<’
 
-`.f95'
-     `$(FC) $(AM_FCFLAGS) $(FCFLAGS) -c $(FCFLAGS_f95) $<'
+‘.f95’
+     ‘$(FC) $(AM_FCFLAGS) $(FCFLAGS) -c $(FCFLAGS_f95) $<’
 
-`.f03'
-     `$(FC) $(AM_FCFLAGS) $(FCFLAGS) -c $(FCFLAGS_f03) $<'
-
-`.f08'
-     `$(FC) $(AM_FCFLAGS) $(FCFLAGS) -c $(FCFLAGS_f08) $<'
+‘.f03’
+     ‘$(FC) $(AM_FCFLAGS) $(FCFLAGS) -c $(FCFLAGS_f03) $<’
 
+‘.f08’
+     ‘$(FC) $(AM_FCFLAGS) $(FCFLAGS) -c $(FCFLAGS_f08) $<’
 
 \1f
 File: automake.info,  Node: Java Support with gcj,  Next: Vala Support,  Prev: Fortran 9x Support,  Up: Programs
@@ -5826,32 +5726,32 @@ File: automake.info,  Node: Java Support with gcj,  Next: Vala Support,  Prev: F
 8.16 Compiling Java sources using gcj
 =====================================
 
-Automake includes support for natively compiled Java, using `gcj', the
+Automake includes support for natively compiled Java, using ‘gcj’, the
 Java front end to the GNU Compiler Collection (rudimentary support for
-compiling Java to bytecode using the `javac' compiler is also present,
+compiling Java to bytecode using the ‘javac’ compiler is also present,
 _albeit deprecated_; *note Java::).
 
    Any package including Java code to be compiled must define the output
-variable `GCJ' in `configure.ac'; the variable `GCJFLAGS' must also be
-defined somehow (either in `configure.ac' or `Makefile.am').  The
-simplest way to do this is to use the `AM_PROG_GCJ' macro.
+variable ‘GCJ’ in ‘configure.ac’; the variable ‘GCJFLAGS’ must also be
+defined somehow (either in ‘configure.ac’ or ‘Makefile.am’).  The
+simplest way to do this is to use the ‘AM_PROG_GCJ’ macro.
 
    By default, programs including Java source files are linked with
-`gcj'.
+‘gcj’.
 
-   As always, the contents of `AM_GCJFLAGS' are passed to every
-compilation invoking `gcj' (in its role as an ahead-of-time compiler,
-when invoking it to create `.class' files, `AM_JAVACFLAGS' is used
-instead).  If it is necessary to pass options to `gcj' from
-`Makefile.am', this variable, and not the user variable `GCJFLAGS',
+   As always, the contents of ‘AM_GCJFLAGS’ are passed to every
+compilation invoking ‘gcj’ (in its role as an ahead-of-time compiler,
+when invoking it to create ‘.class’ files, ‘AM_JAVACFLAGS’ is used
+instead).  If it is necessary to pass options to ‘gcj’ from
+‘Makefile.am’, this variable, and not the user variable ‘GCJFLAGS’,
 should be used.
 
-   `gcj' can be used to compile `.java', `.class', `.zip', or `.jar'
+   ‘gcj’ can be used to compile ‘.java’, ‘.class’, ‘.zip’, or ‘.jar’
 files.
 
-   When linking, `gcj' requires that the main class be specified using
-the `--main=' option.  The easiest way to do this is to use the
-`_LDFLAGS' variable for the program.
+   When linking, ‘gcj’ requires that the main class be specified using
+the ‘--main=’ option.  The easiest way to do this is to use the
+‘_LDFLAGS’ variable for the program.
 
 \1f
 File: automake.info,  Node: Vala Support,  Next: Support for Other Languages,  Prev: Java Support with gcj,  Up: Programs
@@ -5860,41 +5760,47 @@ File: automake.info,  Node: Vala Support,  Next: Support for Other Languages,  P
 =================
 
 Automake provides initial support for Vala
-(`http://www.vala-project.org/').  This requires valac version 0.7.0 or
-later, and currently requires the user to use GNU `make'.
+(<http://www.vala-project.org/>).  This requires valac version 0.7.0 or
+later, and currently requires the user to use GNU ‘make’.
 
      foo_SOURCES = foo.vala bar.vala zardoc.c
 
-   Any `.vala' file listed in a `_SOURCES' variable will be compiled
-into C code by the Vala compiler. The generated `.c' files are
-distributed. The end user does not need to have a Vala compiler
+   Any ‘.vala’ file listed in a ‘_SOURCES’ variable will be compiled
+into C code by the Vala compiler.  The generated ‘.c’ files are
+distributed.  The end user does not need to have a Vala compiler
 installed.
 
-   Automake ships with an Autoconf macro called `AM_PROG_VALAC' that
+   Automake ships with an Autoconf macro called ‘AM_PROG_VALAC’ that
 will locate the Vala compiler and optionally check its version number.
 
- -- Macro: AM_PROG_VALAC ([MINIMUM-VERSION])
-     Try to find a Vala compiler in `PATH'. If it is found, the variable
-     `VALAC' is set. Optionally a minimum release number of the compiler
-     can be requested:
-
-          AM_PROG_VALAC([0.7.0])
+ -- Macro: AM_PROG_VALAC ([MINIMUM-VERSION], [ACTION-IF-FOUND],
+     [ACTION-IF-NOT-FOUND]) Search for a Vala compiler in ‘PATH’.  If it
+     is found, the variable ‘VALAC’ is set to point to it (see below for
+     more details).  This macro takes three optional arguments.  The
+     first argument, if present, is the minimum version of the Vala
+     compiler required to compile this package.  If a compiler is found
+     and satisfies MINIMUM-VERSION, then ACTION-IF-FOUND is run (this
+     defaults to do nothing).  Otherwise, ACTION-IF-NOT-FOUND is run.
+     If ACTION-IF-NOT-FOUND is not specified, the default value is to
+     print a warning in case no compiler is found, or if a too-old
+     version of the compiler is found.
 
    There are a few variables that are used when compiling Vala sources:
 
-`VALAC'
-     Path to the Vala compiler.
+‘VALAC’
+     Absolute path to the Vala compiler, or simply ‘valac’ if no
+     suitable compiler Vala could be found at configure runtime.
 
-`VALAFLAGS'
+‘VALAFLAGS’
      Additional arguments for the Vala compiler.
 
-`AM_VALAFLAGS'
-     The maintainer's variant of `VALAFLAGS'.
+‘AM_VALAFLAGS’
+     The maintainer’s variant of ‘VALAFLAGS’.
 
           lib_LTLIBRARIES = libfoo.la
           libfoo_la_SOURCES = foo.vala
 
-   Note that currently, you cannot use per-target `*_VALAFLAGS' (*note
+   Note that currently, you cannot use per-target ‘*_VALAFLAGS’ (*note
 Renamed Objects::) to produce different C files from one Vala source
 file.
 
@@ -5921,35 +5827,35 @@ File: automake.info,  Node: Dependencies,  Next: EXEEXT,  Prev: Support for Othe
 ==================================
 
 As a developer it is often painful to continually update the
-`Makefile.am' whenever the include-file dependencies change in a
+‘Makefile.am’ whenever the include-file dependencies change in a
 project.  Automake supplies a way to automatically track dependency
 changes (*note Dependency Tracking::).
 
    Automake always uses complete dependencies for a compilation,
-including system headers.  Automake's model is that dependency
+including system headers.  Automakes model is that dependency
 computation should be a side effect of the build.  To this end,
 dependencies are computed by running all compilations through a special
-wrapper program called `depcomp'.  `depcomp' understands how to coax
+wrapper program called ‘depcomp’.  ‘depcomp’ understands how to coax
 many different C and C++ compilers into generating dependency
-information in the format it requires.  `automake -a' will install
-`depcomp' into your source tree for you.  If `depcomp' can't figure out
-how to properly invoke your compiler, dependency tracking will simply
-be disabled for your build.
+information in the format it requires.  ‘automake -a’ will install
+‘depcomp’ into your source tree for you.  If ‘depcomp’ can’t figure out
+how to properly invoke your compiler, dependency tracking will simply be
+disabled for your build.
 
    Experience with earlier versions of Automake (*note Dependency
 Tracking Evolution: (automake-history)Dependency Tracking Evolution.)
 taught us that it is not reliable to generate dependencies only on the
-maintainer's system, as configurations vary too much.  So instead
+maintainers system, as configurations vary too much.  So instead
 Automake implements dependency tracking at build time.
 
    Automatic dependency tracking can be suppressed by putting
-`no-dependencies' in the variable `AUTOMAKE_OPTIONS', or passing
-`no-dependencies' as an argument to `AM_INIT_AUTOMAKE' (this should be
-the preferred way).  Or, you can invoke `automake' with the `-i'
-option.  Dependency tracking is enabled by default.
+‘no-dependencies’ in the variable ‘AUTOMAKE_OPTIONS’, or passing
+‘no-dependencies’ as an argument to ‘AM_INIT_AUTOMAKE’ (this should be
+the preferred way).  Or, you can invoke ‘automake’ with the ‘-i’ option.
+Dependency tracking is enabled by default.
 
    The person building your package also can choose to disable
-dependency tracking by configuring with `--disable-dependency-tracking'.
+dependency tracking by configuring with ‘--disable-dependency-tracking’.
 
 \1f
 File: automake.info,  Node: EXEEXT,  Prev: Dependencies,  Up: Programs
@@ -5958,12 +5864,12 @@ File: automake.info,  Node: EXEEXT,  Prev: Dependencies,  Up: Programs
 ======================================
 
 On some platforms, such as Windows, executables are expected to have an
-extension such as `.exe'.  On these platforms, some compilers (GCC
-among them) will automatically generate `foo.exe' when asked to
-generate `foo'.
+extension such as ‘.exe’.  On these platforms, some compilers (GCC among
+them) will automatically generate ‘foo.exe’ when asked to generate
+‘foo’.
 
    Automake provides mostly-transparent support for this.  Unfortunately
-_mostly_ doesn't yet mean _fully_.  Until the English dictionary is
+_mostly_ doesnt yet mean _fully_.  Until the English dictionary is
 revised, you will have to assist Automake if your package must support
 those platforms.
 
@@ -5976,32 +5882,32 @@ something like this:
 
      bin_PROGRAMS = liver$(EXEEXT)
 
-   The targets Automake generates are likewise given the `$(EXEEXT)'
+   The targets Automake generates are likewise given the ‘$(EXEEXT)’
 extension.
 
-   The variables `TESTS' and `XFAIL_TESTS' (*note Simple Tests::) are
+   The variables ‘TESTS’ and ‘XFAIL_TESTS’ (*note Simple Tests::) are
 also rewritten if they contain filenames that have been declared as
-programs in the same `Makefile'.  (This is mostly useful when some
-programs from `check_PROGRAMS' are listed in `TESTS'.)
+programs in the same ‘Makefile’.  (This is mostly useful when some
+programs from ‘check_PROGRAMS’ are listed in ‘TESTS’.)
 
-   However, Automake cannot apply this rewriting to `configure'
+   However, Automake cannot apply this rewriting to ‘configure’
 substitutions.  This means that if you are conditionally building a
-program using such a substitution, then your `configure.ac' must take
-care to add `$(EXEEXT)' when constructing the output variable.
+program using such a substitution, then your ‘configure.ac’ must take
+care to add ‘$(EXEEXT)’ when constructing the output variable.
 
    Sometimes maintainers like to write an explicit link rule for their
-program.  Without executable extension support, this is easy--you
-simply write a rule whose target is the name of the program.  However,
-when executable extension support is enabled, you must instead add the
-`$(EXEEXT)' suffix.
+program.  Without executable extension support, this is easy—you simply
+write a rule whose target is the name of the program.  However, when
+executable extension support is enabled, you must instead add the
+‘$(EXEEXT)’ suffix.
 
    This might be a nuisance for maintainers who know their package will
 never run on a platform that has executable extensions.  For those
-maintainers, the `no-exeext' option (*note Options::) will disable this
-feature.  This works in a fairly ugly way; if `no-exeext' is seen, then
-the presence of a rule for a target named `foo' in `Makefile.am' will
-override an `automake'-generated rule for `foo$(EXEEXT)'.  Without the
-`no-exeext' option, this use will give a diagnostic.
+maintainers, the ‘no-exeext’ option (*note Options::) will disable this
+feature.  This works in a fairly ugly way; if ‘no-exeext’ is seen, then
+the presence of a rule for a target named ‘foo’ in ‘Makefile.am’ will
+override an ‘automake’-generated rule for ‘foo$(EXEEXT)’.  Without the
+‘no-exeext’ option, this use will give a diagnostic.
 
 \1f
 File: automake.info,  Node: Other Objects,  Next: Other GNU Tools,  Prev: Programs,  Up: Top
@@ -6028,27 +5934,27 @@ File: automake.info,  Node: Scripts,  Next: Headers,  Up: Other Objects
 ======================
 
 It is possible to define and install programs that are scripts.  Such
-programs are listed using the `SCRIPTS' primary name.  When the script
-is distributed in its final, installable form, the `Makefile' usually
-looks as follows: 
+programs are listed using the ‘SCRIPTS’ primary name.  When the script
+is distributed in its final, installable form, the ‘Makefile’ usually
+looks as follows:
 
      # Install my_script in $(bindir) and distribute it.
      dist_bin_SCRIPTS = my_script
 
    Scripts are not distributed by default; as we have just seen, those
-that should be distributed can be specified using a `dist_' prefix as
+that should be distributed can be specified using a ‘dist_’ prefix as
 with other primaries.
 
-   Scripts can be installed in `bindir', `sbindir', `libexecdir',
-`pkglibexecdir', or `pkgdatadir'.
+   Scripts can be installed in ‘bindir’, ‘sbindir’, ‘libexecdir’,
+‘pkglibexecdir’, or ‘pkgdatadir’.
 
-   Scripts that need not be installed can be listed in
-`noinst_SCRIPTS', and among them, those which are needed only by `make
-check' should go in `check_SCRIPTS'.
+   Scripts that need not be installed can be listed in ‘noinst_SCRIPTS’,
+and among them, those which are needed only by ‘make check’ should go in
+‘check_SCRIPTS’.
 
-   When a script needs to be built, the `Makefile.am' should include
-the appropriate rules.  For instance the `automake' program itself is a
-Perl script that is generated from `automake.in'.  Here is how this is
+   When a script needs to be built, the ‘Makefile.am’ should include the
+appropriate rules.  For instance the ‘automake’ program itself is a Perl
+script that is generated from ‘automake.in’.  Here is how this is
 handled:
 
      bin_SCRIPTS = automake
@@ -6066,33 +5972,33 @@ handled:
              chmod +x automake
 
    Such scripts for which a build rule has been supplied need to be
-deleted explicitly using `CLEANFILES' (*note Clean::), and their
-sources have to be distributed, usually with `EXTRA_DIST' (*note Basics
-of Distribution::).
+deleted explicitly using ‘CLEANFILES’ (*note Clean::), and their sources
+have to be distributed, usually with ‘EXTRA_DIST’ (*note Basics of
+Distribution::).
 
    Another common way to build scripts is to process them from
-`configure' with `AC_CONFIG_FILES'.  In this situation Automake knows
+‘configure’ with ‘AC_CONFIG_FILES’.  In this situation Automake knows
 which files should be cleaned and distributed, and what the rebuild
 rules should look like.
 
-   For instance if `configure.ac' contains
+   For instance if ‘configure.ac’ contains
 
      AC_CONFIG_FILES([src/my_script], [chmod +x src/my_script])
 
-to build `src/my_script' from `src/my_script.in', then a
-`src/Makefile.am' to install this script in `$(bindir)' can be as
-simple as
+to build ‘src/my_script’ from ‘src/my_script.in’, then a
+‘src/Makefile.am’ to install this script in ‘$(bindir)’ can be as simple
+as
 
      bin_SCRIPTS = my_script
      CLEANFILES = $(bin_SCRIPTS)
 
-There is no need for `EXTRA_DIST' or any build rule: Automake infers
-them from `AC_CONFIG_FILES' (*note Requirements::).  `CLEANFILES' is
+There is no need for ‘EXTRA_DIST’ or any build rule: Automake infers
+them from ‘AC_CONFIG_FILES’ (*note Requirements::).  ‘CLEANFILES’ is
 still useful, because by default Automake will clean targets of
-`AC_CONFIG_FILES' in `distclean', not `clean'.
+‘AC_CONFIG_FILES’ in ‘distclean’, not ‘clean’.
 
    Although this looks simpler, building scripts this way has one
-drawback: directory variables such as `$(datadir)' are not fully
+drawback: directory variables such as ‘$(datadir)’ are not fully
 expanded and may refer to other directory variables.
 
 \1f
@@ -6101,41 +6007,41 @@ File: automake.info,  Node: Headers,  Next: Data,  Prev: Scripts,  Up: Other Obj
 9.2 Header files
 ================
 
-Header files that must be installed are specified by the `HEADERS'
-family of variables.  Headers can be installed in `includedir',
-`oldincludedir', `pkgincludedir' or any other directory you may have
+Header files that must be installed are specified by the ‘HEADERS’
+family of variables.  Headers can be installed in ‘includedir’,
+‘oldincludedir’, ‘pkgincludedir’ or any other directory you may have
 defined (*note Uniform::).  For instance,
 
      include_HEADERS = foo.h bar/bar.h
 
-will install the two files as `$(includedir)/foo.h' and
-`$(includedir)/bar.h'.
+will install the two files as ‘$(includedir)/foo.h’ and
+‘$(includedir)/bar.h’.
 
-   The `nobase_' prefix is also supported,
+   The ‘nobase_’ prefix is also supported,
 
      nobase_include_HEADERS = foo.h bar/bar.h
 
-will install the two files as `$(includedir)/foo.h' and
-`$(includedir)/bar/bar.h' (*note Alternative::).
+will install the two files as ‘$(includedir)/foo.h’ and
+‘$(includedir)/bar/bar.h’ (*note Alternative::).
 
    Usually, only header files that accompany installed libraries need to
-be installed.  Headers used by programs or convenience libraries are
-not installed.  The `noinst_HEADERS' variable can be used for such
-headers.  However when the header actually belongs to a single
-convenience library or program, we recommend listing it in the
-program's or library's `_SOURCES' variable (*note Program Sources::)
-instead of in `noinst_HEADERS'.  This is clearer for the `Makefile.am'
-reader.  `noinst_HEADERS' would be the right variable to use in a
-directory containing only headers and no associated library or program.
-
-   All header files must be listed somewhere; in a `_SOURCES' variable
-or in a `_HEADERS' variable.  Missing ones will not appear in the
+be installed.  Headers used by programs or convenience libraries are not
+installed.  The ‘noinst_HEADERS’ variable can be used for such headers.
+However when the header actually belongs to a single convenience library
+or program, we recommend listing it in the program’s or library’s
+‘_SOURCES’ variable (*note Program Sources::) instead of in
+‘noinst_HEADERS’.  This is clearer for the ‘Makefile.am’ reader.
+‘noinst_HEADERS’ would be the right variable to use in a directory
+containing only headers and no associated library or program.
+
+   All header files must be listed somewhere; in a ‘_SOURCES’ variable
+or in a ‘_HEADERS’ variable.  Missing ones will not appear in the
 distribution.
 
    For header files that are built and must not be distributed, use the
-`nodist_' prefix as in `nodist_include_HEADERS' or
-`nodist_prog_SOURCES'.  If these generated headers are needed during
-the build, you must also ensure they exist before they are used (*note
+‘nodist_’ prefix as in ‘nodist_include_HEADERS’ or
+‘nodist_prog_SOURCES’.  If these generated headers are needed during the
+build, you must also ensure they exist before they are used (*note
 Sources::).
 
 \1f
@@ -6145,13 +6051,13 @@ File: automake.info,  Node: Data,  Next: Sources,  Prev: Headers,  Up: Other Obj
 =======================================
 
 Automake supports the installation of miscellaneous data files using the
-`DATA' family of variables.  
+‘DATA’ family of variables.
 
-   Such data can be installed in the directories `datadir',
-`sysconfdir', `sharedstatedir', `localstatedir', or `pkgdatadir'.
+   Such data can be installed in the directories ‘datadir’,
+‘sysconfdir’, ‘sharedstatedir’, ‘localstatedir’, or ‘pkgdatadir’.
 
    By default, data files are _not_ included in a distribution.  Of
-course, you can use the `dist_' prefix to change this on a per-variable
+course, you can use the ‘dist_’ prefix to change this on a per-variable
 basis.
 
    Here is how Automake declares its auxiliary data files:
@@ -6164,49 +6070,49 @@ File: automake.info,  Node: Sources,  Prev: Data,  Up: Other Objects
 9.4 Built Sources
 =================
 
-Because Automake's automatic dependency tracking works as a side-effect
+Because Automakes automatic dependency tracking works as a side-effect
 of compilation (*note Dependencies::) there is a bootstrap issue: a
 target should not be compiled before its dependencies are made, but
 these dependencies are unknown until the target is first compiled.
 
    Ordinarily this is not a problem, because dependencies are
-distributed sources: they preexist and do not need to be built.
-Suppose that `foo.c' includes `foo.h'.  When it first compiles `foo.o',
-`make' only knows that `foo.o' depends on `foo.c'.  As a side-effect of
-this compilation `depcomp' records the `foo.h' dependency so that
-following invocations of `make' will honor it.  In these conditions,
-it's clear there is no problem: either `foo.o' doesn't exist and has to
-be built (regardless of the dependencies), or accurate dependencies
-exist and they can be used to decide whether `foo.o' should be rebuilt.
-
-   It's a different story if `foo.h' doesn't exist by the first `make'
-run.  For instance, there might be a rule to build `foo.h'.  This time
-`file.o''s build will fail because the compiler can't find `foo.h'.
-`make' failed to trigger the rule to build `foo.h' first by lack of
+distributed sources: they preexist and do not need to be built.  Suppose
+that ‘foo.c’ includes ‘foo.h’.  When it first compiles ‘foo.o’, ‘make’
+only knows that ‘foo.o’ depends on ‘foo.c’.  As a side-effect of this
+compilation ‘depcomp’ records the ‘foo.h’ dependency so that following
+invocations of ‘make’ will honor it.  In these conditions, it’s clear
+there is no problem: either ‘foo.o’ doesn’t exist and has to be built
+(regardless of the dependencies), or accurate dependencies exist and
+they can be used to decide whether ‘foo.o’ should be rebuilt.
+
+   It’s a different story if ‘foo.h’ doesn’t exist by the first ‘make’
+run.  For instance, there might be a rule to build ‘foo.h’.  This time
+‘file.o’’s build will fail because the compiler can’t find ‘foo.h’.
+‘make’ failed to trigger the rule to build ‘foo.h’ first by lack of
 dependency information.
 
-   The `BUILT_SOURCES' variable is a workaround for this problem.  A
-source file listed in `BUILT_SOURCES' is made on `make all' or `make
-check' (or even `make install') before other targets are processed.
+   The ‘BUILT_SOURCES’ variable is a workaround for this problem.  A
+source file listed in ‘BUILT_SOURCES’ is made on ‘make all’ or ‘make
+check’ (or even ‘make install’) before other targets are processed.
 However, such a source file is not _compiled_ unless explicitly
-requested by mentioning it in some other `_SOURCES' variable.
+requested by mentioning it in some other ‘_SOURCES’ variable.
 
-   So, to conclude our introductory example, we could use
-`BUILT_SOURCES = foo.h' to ensure `foo.h' gets built before any other
-target (including `foo.o') during `make all' or `make check'.
+   So, to conclude our introductory example, we could use ‘BUILT_SOURCES
+= foo.h’ to ensure ‘foo.h’ gets built before any other target (including
+‘foo.o’) during ‘make all’ or ‘make check’.
 
-   `BUILT_SOURCES' is actually a bit of a misnomer, as any file which
+   ‘BUILT_SOURCES’ is actually a bit of a misnomer, as any file which
 must be created early in the build process can be listed in this
 variable.  Moreover, all built sources do not necessarily have to be
-listed in `BUILT_SOURCES'.  For instance, a generated `.c' file doesn't
-need to appear in `BUILT_SOURCES' (unless it is included by another
-source), because it's a known dependency of the associated object.
+listed in ‘BUILT_SOURCES’.  For instance, a generated ‘.c’ file doesn’t
+need to appear in ‘BUILT_SOURCES’ (unless it is included by another
+source), because its a known dependency of the associated object.
 
-   It might be important to emphasize that `BUILT_SOURCES' is honored
-only by `make all', `make check' and `make install'.  This means you
-cannot build a specific target (e.g., `make foo') in a clean tree if it
+   It might be important to emphasize that ‘BUILT_SOURCES’ is honored
+only by ‘make all’, ‘make check’ and ‘make install’.  This means you
+cannot build a specific target (e.g., ‘make foo’) in a clean tree if it
 depends on a built source.  However it will succeed if you have run
-`make all' earlier, because accurate dependencies are already available.
+‘make all’ earlier, because accurate dependencies are already available.
 
    The next section illustrates and discusses the handling of built
 sources on a toy example.
@@ -6221,12 +6127,12 @@ File: automake.info,  Node: Built Sources Example,  Up: Sources
 9.4.1 Built Sources Example
 ---------------------------
 
-Suppose that `foo.c' includes `bindir.h', which is
+Suppose that ‘foo.c’ includes ‘bindir.h’, which is
 installation-dependent and not distributed: it needs to be built.  Here
-`bindir.h' defines the preprocessor macro `bindir' to the value of the
-`make' variable `bindir' (inherited from `configure').
+‘bindir.h’ defines the preprocessor macro ‘bindir’ to the value of the
+‘make’ variable ‘bindir’ (inherited from ‘configure’).
 
-   We suggest several implementations below.  It's not meant to be an
+   We suggest several implementations below.  Its not meant to be an
 exhaustive listing of all ways to handle built sources, but it will give
 you a few ideas if you encounter this issue.
 
@@ -6236,7 +6142,7 @@ First Try
 This first implementation will illustrate the bootstrap issue mentioned
 in the previous section (*note Sources::).
 
-   Here is a tentative `Makefile.am'.
+   Here is a tentative ‘Makefile.am’.
 
      # This won't work.
      bin_PROGRAMS = foo
@@ -6246,10 +6152,10 @@ in the previous section (*note Sources::).
      bindir.h: Makefile
              echo '#define bindir "$(bindir)"' >$@
 
-   This setup doesn't work, because Automake doesn't know that `foo.c'
-includes `bindir.h'.  Remember, automatic dependency tracking works as
-a side-effect of compilation, so the dependencies of `foo.o' will be
-known only after `foo.o' has been compiled (*note Dependencies::).  The
+   This setup doesn’t work, because Automake doesn’t know that ‘foo.c’
+includes ‘bindir.h’.  Remember, automatic dependency tracking works as a
+side-effect of compilation, so the dependencies of ‘foo.o’ will be known
+only after ‘foo.o’ has been compiled (*note Dependencies::).  The
 symptom is as follows.
 
      % make
@@ -6260,19 +6166,19 @@ symptom is as follows.
      foo.c:2: bindir.h: No such file or directory
      make: *** [foo.o] Error 1
 
-   In this example `bindir.h' is not distributed nor installed, and it
+   In this example ‘bindir.h’ is not distributed nor installed, and it
 is not even being built on-time.  One may wonder if the
-`nodist_foo_SOURCES = bindir.h' line has any use at all.  This line
-simply states that `bindir.h' is a source of `foo', so for instance, it
+‘nodist_foo_SOURCES = bindir.h’ line has any use at all.  This line
+simply states that ‘bindir.h’ is a source of ‘foo’, so for instance, it
 should be inspected while generating tags (*note Tags::).  In other
 words, it does not help our present problem, and the build would fail
 identically without it.
 
-Using `BUILT_SOURCES'
+Using ‘BUILT_SOURCES’
 .....................
 
-A solution is to require `bindir.h' to be built before anything else.
-This is what `BUILT_SOURCES' is meant for (*note Sources::).
+A solution is to require ‘bindir.h’ to be built before anything else.
+This is what ‘BUILT_SOURCES’ is meant for (*note Sources::).
 
      bin_PROGRAMS = foo
      foo_SOURCES = foo.c
@@ -6282,7 +6188,7 @@ This is what `BUILT_SOURCES' is meant for (*note Sources::).
      bindir.h: Makefile
              echo '#define bindir "$(bindir)"' >$@
 
-   See how `bindir.h' gets built first:
+   See how ‘bindir.h’ gets built first:
 
      % make
      echo '#define bindir "/usr/local/bin"' >bindir.h
@@ -6295,9 +6201,9 @@ This is what `BUILT_SOURCES' is meant for (*note Sources::).
      gcc  -g -O2   -o foo  foo.o
      make[1]: Leaving directory `/home/adl/tmp'
 
-   However, as said earlier, `BUILT_SOURCES' applies only to the `all',
-`check', and `install' targets.  It still fails if you try to run `make
-foo' explicitly:
+   However, as said earlier, ‘BUILT_SOURCES’ applies only to the ‘all’,
+‘check’, and ‘install’ targets.  It still fails if you try to run ‘make
+foo explicitly:
 
      % make clean
      test -z "bindir.h" || rm -f bindir.h
@@ -6315,10 +6221,10 @@ foo' explicitly:
 Recording Dependencies manually
 ...............................
 
-Usually people are happy enough with `BUILT_SOURCES' because they never
-build targets such as `make foo' before `make all', as in the previous
-example.  However if this matters to you, you can avoid `BUILT_SOURCES'
-and record such dependencies explicitly in the `Makefile.am'.
+Usually people are happy enough with ‘BUILT_SOURCES’ because they never
+build targets such as ‘make foo’ before ‘make all’, as in the previous
+example.  However if this matters to you, you can avoid ‘BUILT_SOURCES’
+and record such dependencies explicitly in the ‘Makefile.am’.
 
      bin_PROGRAMS = foo
      foo_SOURCES = foo.c
@@ -6328,51 +6234,51 @@ and record such dependencies explicitly in the `Makefile.am'.
      bindir.h: Makefile
              echo '#define bindir "$(bindir)"' >$@
 
-   You don't have to list _all_ the dependencies of `foo.o' explicitly,
-only those that might need to be built.  If a dependency already
-exists, it will not hinder the first compilation and will be recorded
-by the normal dependency tracking code.  (Note that after this first
+   You don’t have to list _all_ the dependencies of ‘foo.o’ explicitly,
+only those that might need to be built.  If a dependency already exists,
+it will not hinder the first compilation and will be recorded by the
+normal dependency tracking code.  (Note that after this first
 compilation the dependency tracking code will also have recorded the
-dependency between `foo.o' and `bindir.h'; so our explicit dependency
-is really useful to the first build only.)
+dependency between ‘foo.o’ and ‘bindir.h’; so our explicit dependency is
+really useful to the first build only.)
 
    Adding explicit dependencies like this can be a bit dangerous if you
 are not careful enough.  This is due to the way Automake tries not to
 overwrite your rules (it assumes you know better than it).
-`foo.$(OBJEXT): bindir.h' supersedes any rule Automake may want to
-output to build `foo.$(OBJEXT)'.  It happens to work in this case
-because Automake doesn't have to output any `foo.$(OBJEXT):' target: it
-relies on a suffix rule instead (i.e., `.c.$(OBJEXT):').  Always check
-the generated `Makefile.in' if you do this.
+‘foo.$(OBJEXT): bindir.h’ supersedes any rule Automake may want to
+output to build ‘foo.$(OBJEXT)’.  It happens to work in this case
+because Automake doesn’t have to output any ‘foo.$(OBJEXT):’ target: it
+relies on a suffix rule instead (i.e., ‘.c.$(OBJEXT):’).  Always check
+the generated ‘Makefile.in’ if you do this.
 
-Build `bindir.h' from `configure'
+Build ‘bindir.h’ from ‘configure’
 .................................
 
-It's possible to define this preprocessor macro from `configure',
-either in `config.h' (*note Defining Directories: (autoconf)Defining
-Directories.), or by processing a `bindir.h.in' file using
-`AC_CONFIG_FILES' (*note Configuration Actions: (autoconf)Configuration
+It’s possible to define this preprocessor macro from ‘configure’, either
+in ‘config.h’ (*note Defining Directories: (autoconf)Defining
+Directories.), or by processing a ‘bindir.h.in’ file using
+‘AC_CONFIG_FILES’ (*note Configuration Actions: (autoconf)Configuration
 Actions.).
 
-   At this point it should be clear that building `bindir.h' from
-`configure' works well for this example.  `bindir.h' will exist before
+   At this point it should be clear that building ‘bindir.h’ from
+‘configure’ works well for this example.  ‘bindir.h’ will exist before
 you build any target, hence will not cause any dependency issue.
 
    The Makefile can be shrunk as follows.  We do not even have to
-mention `bindir.h'.
+mention ‘bindir.h’.
 
      bin_PROGRAMS = foo
      foo_SOURCES = foo.c
 
-   However, it's not always possible to build sources from `configure',
+   However, it’s not always possible to build sources from ‘configure’,
 especially when these sources are generated by a tool that needs to be
 built first.
 
-Build `bindir.c', not `bindir.h'.
+Build ‘bindir.c’, not ‘bindir.h’.
 .................................
 
-Another attractive idea is to define `bindir' as a variable or function
-exported from `bindir.o', and build `bindir.c' instead of `bindir.h'.
+Another attractive idea is to define ‘bindir’ as a variable or function
+exported from ‘bindir.o’, and build ‘bindir.c’ instead of ‘bindir.h’.
 
      noinst_PROGRAMS = foo
      foo_SOURCES = foo.c bindir.h
@@ -6381,9 +6287,9 @@ exported from `bindir.o', and build `bindir.c' instead of `bindir.h'.
      bindir.c: Makefile
              echo 'const char bindir[] = "$(bindir)";' >$@
 
-   `bindir.h' contains just the variable's declaration and doesn't need
-to be built, so it won't cause any trouble.  `bindir.o' is always
-dependent on `bindir.c', so `bindir.c' will get built first.
+   ‘bindir.h’ contains just the variable’s declaration and doesn’t need
+to be built, so it won’t cause any trouble.  ‘bindir.o’ is always
+dependent on ‘bindir.c’, so ‘bindir.c’ will get built first.
 
 Which is best?
 ..............
@@ -6391,14 +6297,14 @@ Which is best?
 There is no panacea, of course.  Each solution has its merits and
 drawbacks.
 
-   You cannot use `BUILT_SOURCES' if the ability to run `make foo' on a
+   You cannot use ‘BUILT_SOURCES’ if the ability to run ‘make foo’ on a
 clean tree is important to you.
 
-   You won't add explicit dependencies if you are leery of overriding
-an Automake rule by mistake.
+   You won’t add explicit dependencies if you are leery of overriding an
+Automake rule by mistake.
 
-   Building files from `./configure' is not always possible, neither is
-converting `.h' files into `.c' files.
+   Building files from ‘./configure’ is not always possible, neither is
+converting ‘.h’ files into ‘.c’ files.
 
 \1f
 File: automake.info,  Node: Other GNU Tools,  Next: Documentation,  Prev: Other Objects,  Up: Top
@@ -6406,7 +6312,7 @@ File: automake.info,  Node: Other GNU Tools,  Next: Documentation,  Prev: Other
 10 Other GNU Tools
 ******************
 
-Since Automake is primarily intended to generate `Makefile.in's for use
+Since Automake is primarily intended to generate ‘Makefile.in’s for use
 in GNU programs, it tries hard to interoperate with other GNU tools.
 
 * Menu:
@@ -6423,22 +6329,25 @@ File: automake.info,  Node: Emacs Lisp,  Next: gettext,  Up: Other GNU Tools
 10.1 Emacs Lisp
 ===============
 
-Automake provides some support for Emacs Lisp.  The `LISP' primary is
-used to hold a list of `.el' files.  Possible prefixes for this primary
-are `lisp_' and `noinst_'.  Note that if `lisp_LISP' is defined, then
-`configure.ac' must run `AM_PATH_LISPDIR' (*note Macros::).
+Automake provides some support for Emacs Lisp.  The ‘LISP’ primary is
+used to hold a list of ‘.el’ files.  Possible prefixes for this primary
+are ‘lisp_’ and ‘noinst_’.  Note that if ‘lisp_LISP’ is defined, then
+‘configure.ac’ must run ‘AM_PATH_LISPDIR’ (*note Macros::).
 
    Lisp sources are not distributed by default.  You can prefix the
-`LISP' primary with `dist_', as in `dist_lisp_LISP' or
-`dist_noinst_LISP', to indicate that these files should be distributed.
+‘LISP’ primary with ‘dist_’, as in ‘dist_lisp_LISP’ or
+‘dist_noinst_LISP’, to indicate that these files should be distributed.
 
    Automake will byte-compile all Emacs Lisp source files using the
-Emacs found by `AM_PATH_LISPDIR', if any was found.
+Emacs found by ‘AM_PATH_LISPDIR’, if any was found.  When performing
+such byte-compilation, the flags specified in the (developer-reserved)
+‘AM_ELCFLAGS’ and (user-reserved) ‘ELCFLAGS’ make variables will be
+passed to the Emacs invocation.
 
    Byte-compiled Emacs Lisp files are not portable among all versions of
 Emacs, so it makes sense to turn this off if you expect sites to have
 more than one version of Emacs installed.  Furthermore, many packages
-don't actually benefit from byte-compilation.  Still, we recommend that
+dont actually benefit from byte-compilation.  Still, we recommend that
 you byte-compile your Emacs Lisp sources.  It is probably better for
 sites with strange setups to cope for themselves than to make the
 installation less nice for everybody else.
@@ -6449,17 +6358,17 @@ recommended the following construct.
      lisp_LISP = file1.el file2.el
      ELCFILES =
 
-`ELCFILES' is an internal Automake variable that normally lists all
-`.elc' files that must be byte-compiled.  Automake defines `ELCFILES'
-automatically from `lisp_LISP'.  Emptying this variable explicitly
+‘ELCFILES’ is an internal Automake variable that normally lists all
+‘.elc’ files that must be byte-compiled.  Automake defines ‘ELCFILES’
+automatically from ‘lisp_LISP’.  Emptying this variable explicitly
 prevents byte-compilation.
 
-   Since Automake 1.8, we now recommend using `lisp_DATA' instead:
+   Since Automake 1.8, we now recommend using ‘lisp_DATA’ instead:
 
      lisp_DATA = file1.el file2.el
 
-   Note that these two constructs are not equivalent.  `_LISP' will not
-install a file if Emacs is not installed, while `_DATA' will always
+   Note that these two constructs are not equivalent.  ‘_LISP’ will not
+install a file if Emacs is not installed, while ‘_DATA’ will always
 install its files.
 
 \1f
@@ -6468,15 +6377,15 @@ File: automake.info,  Node: gettext,  Next: Libtool,  Prev: Emacs Lisp,  Up: Oth
 10.2 Gettext
 ============
 
-If `AM_GNU_GETTEXT' is seen in `configure.ac', then Automake turns on
+If ‘AM_GNU_GETTEXT’ is seen in ‘configure.ac’, then Automake turns on
 support for GNU gettext, a message catalog system for
 internationalization (*note Introduction: (gettext)Top.).
 
-   The `gettext' support in Automake requires the addition of one or
-two subdirectories to the package: `po' and possibly also `intl'.  The
-latter is needed if `AM_GNU_GETTEXT' is not invoked with the `external'
-argument, or if `AM_GNU_GETTEXT_INTL_SUBDIR' is used.  Automake ensures
-that these directories exist and are mentioned in `SUBDIRS'.
+   The ‘gettext’ support in Automake requires the addition of one or two
+subdirectories to the package: ‘po’ and possibly also ‘intl’.  The
+latter is needed if ‘AM_GNU_GETTEXT’ is not invoked with the ‘external’
+argument, or if ‘AM_GNU_GETTEXT_INTL_SUBDIR’ is used.  Automake ensures
+that these directories exist and are mentioned in ‘SUBDIRS’.
 
 \1f
 File: automake.info,  Node: Libtool,  Next: Java,  Prev: gettext,  Up: Other GNU Tools
@@ -6485,7 +6394,7 @@ File: automake.info,  Node: Libtool,  Next: Java,  Prev: gettext,  Up: Other GNU
 ============
 
 Automake provides support for GNU Libtool (*note Introduction:
-(libtool)Top.) with the `LTLIBRARIES' primary.  *Note A Shared
+(libtool)Top.) with the ‘LTLIBRARIES’ primary.  *Note A Shared
 Library::.
 
 \1f
@@ -6495,53 +6404,55 @@ File: automake.info,  Node: Java,  Next: Python,  Prev: Libtool,  Up: Other GNU
 ===========================================
 
 Automake provides some minimal support for Java bytecode compilation
-with the `JAVA' primary (in addition to the support for compiling Java
+with the ‘JAVA’ primary (in addition to the support for compiling Java
 to native machine code; *note Java Support with gcj::).  Note however
-that _the interface and most features described here are deprecated_;
-the next automake release will strive to provide a better and cleaner
-interface, which however _won't be backward-compatible_; the present
-interface will probably be removed altogether in future automake
-releases (1.13 or later), so don't use it in new code.
+that _the interface and most features described here are deprecated_.
+Future Automake releases will strive to provide a better and cleaner
+interface, which however _won’t be backward-compatible_; the present
+interface will probably be removed altogether some time after the
+introduction of the new interface (if that ever materializes).  In any
+case, the current ‘JAVA’ primary features are frozen and will no longer
+be developed, not even to take bug fixes.
 
-   Any `.java' files listed in a `_JAVA' variable will be compiled with
-`JAVAC' at build time.  By default, `.java' files are not included in
-the distribution, you should use the `dist_' prefix to distribute them.
+   Any ‘.java’ files listed in a ‘_JAVA’ variable will be compiled with
+‘JAVAC’ at build time.  By default, ‘.java’ files are not included in
+the distribution, you should use the ‘dist_’ prefix to distribute them.
 
-   Here is a typical setup for distributing `.java' files and
-installing the `.class' files resulting from their compilation.
+   Here is a typical setup for distributing ‘.java’ files and installing
+the ‘.class’ files resulting from their compilation.
 
      javadir = $(datadir)/java
      dist_java_JAVA = a.java b.java ...
 
-   Currently Automake enforces the restriction that only one `_JAVA'
-primary can be used in a given `Makefile.am'.  The reason for this
-restriction is that, in general, it isn't possible to know which
-`.class' files were generated from which `.java' files, so it would be
+   Currently Automake enforces the restriction that only one ‘_JAVA’
+primary can be used in a given ‘Makefile.am’.  The reason for this
+restriction is that, in general, it isnt possible to know which
+‘.class’ files were generated from which ‘.java’ files, so it would be
 impossible to know which files to install where.  For instance, a
-`.java' file can define multiple classes; the resulting `.class' file
-names cannot be predicted without parsing the `.java' file.
+‘.java’ file can define multiple classes; the resulting ‘.class’ file
+names cannot be predicted without parsing the ‘.java’ file.
 
    There are a few variables that are used when compiling Java sources:
 
-`JAVAC'
-     The name of the Java compiler.  This defaults to `javac'.
+‘JAVAC’
+     The name of the Java compiler.  This defaults to ‘javac’.
 
-`JAVACFLAGS'
+‘JAVACFLAGS’
      The flags to pass to the compiler.  This is considered to be a user
      variable (*note User Variables::).
 
-`AM_JAVACFLAGS'
+‘AM_JAVACFLAGS’
      More flags to pass to the Java compiler.  This, and not
-     `JAVACFLAGS', should be used when it is necessary to put Java
-     compiler flags into `Makefile.am'.
+     ‘JAVACFLAGS’, should be used when it is necessary to put Java
+     compiler flags into ‘Makefile.am’.
 
-`JAVAROOT'
-     The value of this variable is passed to the `-d' option to
-     `javac'.  It defaults to `$(top_builddir)'.
+‘JAVAROOT’
+     The value of this variable is passed to the ‘-d’ option to ‘javac’.
+     It defaults to ‘$(top_builddir)’.
 
-`CLASSPATH_ENV'
+‘CLASSPATH_ENV’
      This variable is a shell expression that is used to set the
-     `CLASSPATH' environment variable on the `javac' command line.  (In
+     ‘CLASSPATH’ environment variable on the ‘javac’ command line.  (In
      the future we will probably handle class path setting differently.)
 
 \1f
@@ -6550,26 +6461,26 @@ File: automake.info,  Node: Python,  Prev: Java,  Up: Other GNU Tools
 10.5 Python
 ===========
 
-Automake provides support for Python compilation with the `PYTHON'
-primary.  A typical setup is to call `AM_PATH_PYTHON' in `configure.ac'
-and use a line like the following in `Makefile.am':
+Automake provides support for Python compilation with the ‘PYTHON’
+primary.  A typical setup is to call ‘AM_PATH_PYTHON’ in ‘configure.ac’
+and use a line like the following in ‘Makefile.am’:
 
      python_PYTHON = tree.py leave.py
 
-   Any files listed in a `_PYTHON' variable will be byte-compiled with
-`py-compile' at install time.  `py-compile' actually creates both
-standard (`.pyc') and optimized (`.pyo') byte-compiled versions of the
+   Any files listed in a ‘_PYTHON’ variable will be byte-compiled with
+‘py-compile’ at install time.  ‘py-compile’ actually creates both
+standard (‘.pyc’) and optimized (‘.pyo’) byte-compiled versions of the
 source files.  Note that because byte-compilation occurs at install
-time, any files listed in `noinst_PYTHON' will not be compiled.  Python
+time, any files listed in ‘noinst_PYTHON’ will not be compiled.  Python
 source files are included in the distribution by default, prepend
-`nodist_' (as in `nodist_python_PYTHON') to omit them.
+‘nodist_’ (as in ‘nodist_python_PYTHON’) to omit them.
 
-   Automake ships with an Autoconf macro called `AM_PATH_PYTHON' that
+   Automake ships with an Autoconf macro called ‘AM_PATH_PYTHON’ that
 will determine some Python-related directory variables (see below).  If
-you have called `AM_PATH_PYTHON' from `configure.ac', then you may use
-the variables `python_PYTHON' or `pkgpython_PYTHON' to list Python
-source files in your `Makefile.am', depending on where you want your
-files installed (see the definitions of `pythondir' and `pkgpythondir'
+you have called ‘AM_PATH_PYTHON’ from ‘configure.ac’, then you may use
+the variables ‘python_PYTHON’ or ‘pkgpython_PYTHON’ to list Python
+source files in your ‘Makefile.am’, depending on where you want your
+files installed (see the definitions of ‘pythondir’ and ‘pkgpythondir’
 below).
 
  -- Macro: AM_PATH_PYTHON ([VERSION], [ACTION-IF-FOUND],
@@ -6578,69 +6489,69 @@ below).
      Search for a Python interpreter on the system.  This macro takes
      three optional arguments.  The first argument, if present, is the
      minimum version of Python required for this package:
-     `AM_PATH_PYTHON' will skip any Python interpreter that is older
+     ‘AM_PATH_PYTHON’ will skip any Python interpreter that is older
      than VERSION.  If an interpreter is found and satisfies VERSION,
      then ACTION-IF-FOUND is run.  Otherwise, ACTION-IF-NOT-FOUND is
      run.
 
      If ACTION-IF-NOT-FOUND is not specified, as in the following
-     example, the default is to abort `configure'.
+     example, the default is to abort ‘configure’.
 
           AM_PATH_PYTHON([2.2])
 
      This is fine when Python is an absolute requirement for the
      package.  If Python >= 2.5 was only _optional_ to the package,
-     `AM_PATH_PYTHON' could be called as follows.
+     ‘AM_PATH_PYTHON’ could be called as follows.
 
           AM_PATH_PYTHON([2.5],, [:])
 
-     If the `PYTHON' variable is set when `AM_PATH_PYTHON' is called,
+     If the ‘PYTHON’ variable is set when ‘AM_PATH_PYTHON’ is called,
      then that will be the only Python interpreter that is tried.
 
-     `AM_PATH_PYTHON' creates the following output variables based on
+     ‘AM_PATH_PYTHON’ creates the following output variables based on
      the Python installation found during configuration.
 
-`PYTHON'
-     The name of the Python executable, or `:' if no suitable
+‘PYTHON’
+     The name of the Python executable, or ‘:’ if no suitable
      interpreter could be found.
 
-     Assuming ACTION-IF-NOT-FOUND is used (otherwise `./configure' will
-     abort if Python is absent), the value of `PYTHON' can be used to
+     Assuming ACTION-IF-NOT-FOUND is used (otherwise ‘./configure’ will
+     abort if Python is absent), the value of ‘PYTHON’ can be used to
      setup a conditional in order to disable the relevant part of a
      build as follows.
 
           AM_PATH_PYTHON(,, [:])
           AM_CONDITIONAL([HAVE_PYTHON], [test "$PYTHON" != :])
 
-`PYTHON_VERSION'
-     The Python version number, in the form MAJOR.MINOR (e.g., `2.5').
-     This is currently the value of `sys.version[:3]'.
+‘PYTHON_VERSION’
+     The Python version number, in the form MAJOR.MINOR (e.g., ‘2.5’).
+     This is currently the value of ‘sys.version[:3]’.
 
-`PYTHON_PREFIX'
-     The string `${prefix}'.  This term may be used in future work that
-     needs the contents of Python's `sys.prefix', but general consensus
-     is to always use the value from `configure'.
+‘PYTHON_PREFIX’
+     The string ‘${prefix}’.  This term may be used in future work that
+     needs the contents of Python’s ‘sys.prefix’, but general consensus
+     is to always use the value from ‘configure’.
 
-`PYTHON_EXEC_PREFIX'
-     The string `${exec_prefix}'.  This term may be used in future work
-     that needs the contents of Python's `sys.exec_prefix', but general
-     consensus is to always use the value from `configure'.
+‘PYTHON_EXEC_PREFIX’
+     The string ‘${exec_prefix}’.  This term may be used in future work
+     that needs the contents of Python’s ‘sys.exec_prefix’, but general
+     consensus is to always use the value from ‘configure’.
 
-`PYTHON_PLATFORM'
-     The canonical name used by Python to describe the operating
-     system, as given by `sys.platform'.  This value is sometimes
-     needed when building Python extensions.
+‘PYTHON_PLATFORM’
+     The canonical name used by Python to describe the operating system,
+     as given by ‘sys.platform’.  This value is sometimes needed when
+     building Python extensions.
 
-`pythondir'
-     The directory name for the `site-packages' subdirectory of the
+‘pythondir’
+     The directory name for the ‘site-packages’ subdirectory of the
      standard Python install tree.
 
-`pkgpythondir'
-     This is the directory under `pythondir' that is named after the
-     package.  That is, it is `$(pythondir)/$(PACKAGE)'.  It is provided
+‘pkgpythondir’
+     This is the directory under ‘pythondir’ that is named after the
+     package.  That is, it is ‘$(pythondir)/$(PACKAGE)’.  It is provided
      as a convenience.
 
-`pyexecdir'
+‘pyexecdir’
      This is the directory where Python extension modules (shared
      libraries) should be installed.  An extension module written in C
      could be declared as follows to Automake:
@@ -6649,18 +6560,18 @@ below).
           quaternion_la_SOURCES = quaternion.c support.c support.h
           quaternion_la_LDFLAGS = -avoid-version -module
 
-`pkgpyexecdir'
+‘pkgpyexecdir’
      This is a convenience variable that is defined as
-     `$(pyexecdir)/$(PACKAGE)'.
+     ‘$(pyexecdir)/$(PACKAGE)’.
 
-   All these directory variables have values that start with either
-`${prefix}' or `${exec_prefix}' unexpanded.  This works fine in
-`Makefiles', but it makes these variables hard to use in `configure'.
+   All of these directory variables have values that start with either
+‘${prefix}’ or ‘${exec_prefix}’ unexpanded.  This works fine in
+‘Makefiles’, but it makes these variables hard to use in ‘configure’.
 This is mandated by the GNU coding standards, so that the user can run
-`make prefix=/foo install'.  The Autoconf manual has a section with
-more details on this topic (*note Installation Directory Variables:
-(autoconf)Installation Directory Variables.).  See also *note
-Hard-Coded Install Paths::.
+‘make prefix=/foo install’.  The Autoconf manual has a section with more
+details on this topic (*note Installation Directory Variables:
+(autoconf)Installation Directory Variables.).  See also *note Hard-Coded
+Install Paths::.
 
 \1f
 File: automake.info,  Node: Documentation,  Next: Install,  Prev: Other GNU Tools,  Up: Top
@@ -6682,144 +6593,151 @@ File: automake.info,  Node: Texinfo,  Next: Man Pages,  Up: Documentation
 ============
 
 If the current directory contains Texinfo source, you must declare it
-with the `TEXINFOS' primary.  Generally Texinfo files are converted
-into info, and thus the `info_TEXINFOS' variable is most commonly used
-here.  Any Texinfo source file must end in the `.texi', `.txi', or
-`.texinfo' extension.  We recommend `.texi' for new manuals.
-
-   Automake generates rules to build `.info', `.dvi', `.ps', `.pdf' and
-`.html' files from your Texinfo sources.  Following the GNU Coding
-Standards, only the `.info' files are built by `make all' and installed
-by `make install' (unless you use `no-installinfo', see below).
-Furthermore, `.info' files are automatically distributed so that
-Texinfo is not a prerequisite for installing your package.
-
-   Other documentation formats can be built on request by `make dvi',
-`make ps', `make pdf' and `make html', and they can be installed with
-`make install-dvi', `make install-ps', `make install-pdf' and `make
-install-html' explicitly.  `make uninstall' will remove everything: the
+with the ‘TEXINFOS’ primary.  Generally Texinfo files are converted into
+info, and thus the ‘info_TEXINFOS’ variable is most commonly used here.
+Any Texinfo source file should have the ‘.texi’ extension.  Automake
+also accepts ‘.txi’ or ‘.texinfo’ extensions, but their use is
+discouraged now, and will elicit runtime warnings.
+
+   Automake generates rules to build ‘.info’, ‘.dvi’, ‘.ps’, ‘.pdf’ and
+‘.html’ files from your Texinfo sources.  Following the GNU Coding
+Standards, only the ‘.info’ files are built by ‘make all’ and installed
+by ‘make install’ (unless you use ‘no-installinfo’, see below).
+Furthermore, ‘.info’ files are automatically distributed so that Texinfo
+is not a prerequisite for installing your package.
+
+   It is worth noting that, contrary to what happens with the other
+formats, the generated ‘.info’ files are by default placed in ‘srcdir’
+rather than in the ‘builddir’.  This can be changed with the
+‘info-in-builddir’ option.
+
+   Other documentation formats can be built on request by ‘make dvi’,
+‘make ps’, ‘make pdf’ and ‘make html’, and they can be installed with
+‘make install-dvi’, ‘make install-ps’, ‘make install-pdf’ and ‘make
+install-html’ explicitly.  ‘make uninstall’ will remove everything: the
 Texinfo documentation installed by default as well as all the above
 optional formats.
 
-   All these targets can be extended using `-local' rules (*note
+   All of these targets can be extended using ‘-local’ rules (*note
 Extending::).
 
-   If the `.texi' file `@include's `version.texi', then that file will
-be automatically generated.  The file `version.texi' defines four
-Texinfo flag you can reference using `@value{EDITION}',
-`@value{VERSION}', `@value{UPDATED}', and `@value{UPDATED-MONTH}'.
+   If the ‘.texi’ file ‘@include’s ‘version.texi’, then that file will
+be automatically generated.  The file ‘version.texi’ defines four
+Texinfo flags you can reference using ‘@value{EDITION}’,
+‘@value{VERSION}’, ‘@value{UPDATED}’, and ‘@value{UPDATED-MONTH}’.
 
-`EDITION'
-`VERSION'
+‘EDITION’
+‘VERSION’
      Both of these flags hold the version number of your program.  They
      are kept separate for clarity.
 
-`UPDATED'
-     This holds the date the primary `.texi' file was last modified.
+‘UPDATED’
+     This holds the date the primary ‘.texi’ file was last modified.
 
-`UPDATED-MONTH'
-     This holds the name of the month in which the primary `.texi' file
+‘UPDATED-MONTH’
+     This holds the name of the month in which the primary ‘.texi’ file
      was last modified.
 
-   The `version.texi' support requires the `mdate-sh' script; this
+   The ‘version.texi’ support requires the ‘mdate-sh’ script; this
 script is supplied with Automake and automatically included when
-`automake' is invoked with the `--add-missing' option.
+‘automake’ is invoked with the ‘--add-missing’ option.
 
    If you have multiple Texinfo files, and you want to use the
-`version.texi' feature, then you have to have a separate version file
+‘version.texi’ feature, then you have to have a separate version file
 for each Texinfo file.  Automake will treat any include in a Texinfo
-file that matches `vers*.texi' just as an automatically generated
+file that matches ‘vers*.texi’ just as an automatically generated
 version file.
 
-   Sometimes an info file actually depends on more than one `.texi'
-file.  For instance, in GNU Hello, `hello.texi' includes the file
-`fdl.texi'.  You can tell Automake about these dependencies using the
-`TEXI_TEXINFOS' variable.  Here is how GNU Hello does it: 
+   Sometimes an info file actually depends on more than one ‘.texi’
+file.  For instance, in GNU Hello, ‘hello.texi’ includes the file
+‘fdl.texi’.  You can tell Automake about these dependencies using the
+‘TEXI_TEXINFOS’ variable.  Here is how GNU Hello does it:
 
      info_TEXINFOS = hello.texi
      hello_TEXINFOS = fdl.texi
 
-   By default, Automake requires the file `texinfo.tex' to appear in
-the same directory as the `Makefile.am' file that lists the `.texi'
-files.  If you used `AC_CONFIG_AUX_DIR' in `configure.ac' (*note
-Finding `configure' Input: (autoconf)Input.), then `texinfo.tex' is
-looked for there.  In both cases, `automake' then supplies
-`texinfo.tex' if `--add-missing' is given, and takes care of its
-distribution.  However, if you set the `TEXINFO_TEX' variable (see
-below), it overrides the location of the file and turns off its
-installation into the source as well as its distribution.
-
-   The option `no-texinfo.tex' can be used to eliminate the requirement
-for the file `texinfo.tex'.  Use of the variable `TEXINFO_TEX' is
-preferable, however, because that allows the `dvi', `ps', and `pdf'
+   By default, Automake requires the file ‘texinfo.tex’ to appear in the
+same directory as the ‘Makefile.am’ file that lists the ‘.texi’ files.
+If you used ‘AC_CONFIG_AUX_DIR’ in ‘configure.ac’ (*note Finding
+‘configure’ Input: (autoconf)Input.), then ‘texinfo.tex’ is looked for
+there.  In both cases, ‘automake’ then supplies ‘texinfo.tex’ if
+‘--add-missing’ is given, and takes care of its distribution.  However,
+if you set the ‘TEXINFO_TEX’ variable (see below), it overrides the
+location of the file and turns off its installation into the source as
+well as its distribution.
+
+   The option ‘no-texinfo.tex’ can be used to eliminate the requirement
+for the file ‘texinfo.tex’.  Use of the variable ‘TEXINFO_TEX’ is
+preferable, however, because that allows the ‘dvi’, ‘ps’, and ‘pdf’
 targets to still work.
 
-   Automake generates an `install-info' rule; some people apparently
-use this.  By default, info pages are installed by `make install', so
-running `make install-info' is pointless.  This can be prevented via
-the `no-installinfo' option.  In this case, `.info' files are not
-installed by default, and user must request this explicitly using `make
-install-info'.
+   Automake generates an ‘install-info’ rule; some people apparently use
+this.  By default, info pages are installed by ‘make install’, so
+running ‘make install-info’ is pointless.  This can be prevented via the
+‘no-installinfo’ option.  In this case, ‘.info’ files are not installed
+by default, and user must request this explicitly using ‘make
+install-info.
 
-   By default, `make install-info' and `make install-info' will try to
-run the `install-info' program (if available) to update (or create) the
-``${infodir}'/dir' index.  If this is undesired, it can be prevented by
-exporting the `AM_UPDATE_INFO_DIR' variable to "`no'".
+   By default, ‘make install-info’ and ‘make uninstall-info’ will try to
+run the ‘install-info’ program (if available) to update (or
+create/remove) the ‘${infodir}/dir’ index.  If this is undesired, it can
+be prevented by exporting the ‘AM_UPDATE_INFO_DIR’ variable to "‘no’".
 
    The following variables are used by the Texinfo build rules.
 
-`MAKEINFO'
-     The name of the program invoked to build `.info' files.  This
-     variable is defined by Automake.  If the `makeinfo' program is
+‘MAKEINFO’
+     The name of the program invoked to build ‘.info’ files.  This
+     variable is defined by Automake.  If the ‘makeinfo’ program is
      found on the system then it will be used by default; otherwise
-     `missing' will be used instead.
+     ‘missing’ will be used instead.
 
-`MAKEINFOHTML'
-     The command invoked to build `.html' files.  Automake defines this
-     to `$(MAKEINFO) --html'.
+‘MAKEINFOHTML’
+     The command invoked to build ‘.html’ files.  Automake defines this
+     to ‘$(MAKEINFO) --html’.
 
-`MAKEINFOFLAGS'
-     User flags passed to each invocation of `$(MAKEINFO)' and
-     `$(MAKEINFOHTML)'.  This user variable (*note User Variables::) is
-     not expected to be defined in any `Makefile'; it can be used by
+‘MAKEINFOFLAGS’
+     User flags passed to each invocation of ‘$(MAKEINFO)’ and
+     ‘$(MAKEINFOHTML)’.  This user variable (*note User Variables::) is
+     not expected to be defined in any ‘Makefile’; it can be used by
      users to pass extra flags to suit their needs.
 
-`AM_MAKEINFOFLAGS'
-`AM_MAKEINFOHTMLFLAGS'
-     Maintainer flags passed to each `makeinfo' invocation.  Unlike
-     `MAKEINFOFLAGS', these variables are meant to be defined by
-     maintainers in `Makefile.am'.  `$(AM_MAKEINFOFLAGS)' is passed to
-     `makeinfo' when building `.info' files; and
-     `$(AM_MAKEINFOHTMLFLAGS)' is used when building `.html' files.
+‘AM_MAKEINFOFLAGS’
+‘AM_MAKEINFOHTMLFLAGS’
+     Maintainer flags passed to each ‘makeinfo’ invocation.  Unlike
+     ‘MAKEINFOFLAGS’, these variables are meant to be defined by
+     maintainers in ‘Makefile.am’.  ‘$(AM_MAKEINFOFLAGS)’ is passed to
+     ‘makeinfo’ when building ‘.info’ files; and
+     ‘$(AM_MAKEINFOHTMLFLAGS)’ is used when building ‘.html’ files.
 
      For instance, the following setting can be used to obtain one
-     single `.html' file per manual, without node separators.
+     single ‘.html’ file per manual, without node separators.
           AM_MAKEINFOHTMLFLAGS = --no-headers --no-split
 
-     `AM_MAKEINFOHTMLFLAGS' defaults to `$(AM_MAKEINFOFLAGS)'.  This
-     means that defining `AM_MAKEINFOFLAGS' without defining
-     `AM_MAKEINFOHTMLFLAGS' will impact builds of both `.info' and
-     `.html' files.
+     ‘AM_MAKEINFOHTMLFLAGS’ defaults to ‘$(AM_MAKEINFOFLAGS)’.  This
+     means that defining ‘AM_MAKEINFOFLAGS’ without defining
+     ‘AM_MAKEINFOHTMLFLAGS’ will impact builds of both ‘.info’ and
+     ‘.html’ files.
 
-`TEXI2DVI'
-     The name of the command that converts a `.texi' file into a `.dvi'
-     file.  This defaults to `texi2dvi', a script that ships with the
+‘TEXI2DVI’
+     The name of the command that converts a ‘.texi’ file into a ‘.dvi’
+     file.  This defaults to ‘texi2dvi’, a script that ships with the
      Texinfo package.
 
-`TEXI2PDF'
-     The name of the command that translates a `.texi' file into a
-     `.pdf' file.  This defaults to `$(TEXI2DVI) --pdf --batch'.
+‘TEXI2PDF’
+     The name of the command that translates a ‘.texi’ file into a
+     ‘.pdf’ file.  This defaults to ‘$(TEXI2DVI) --pdf --batch’.
+
+‘DVIPS’
+     The name of the command that builds a ‘.ps’ file out of a ‘.dvi’
+     file.  This defaults to ‘dvips’.
 
-`DVIPS'
-     The name of the command that builds a `.ps' file out of a `.dvi'
-     file.  This defaults to `dvips'.
+‘TEXINFO_TEX’
 
-`TEXINFO_TEX'
      If your package has Texinfo files in many directories, you can use
-     the variable `TEXINFO_TEX' to tell Automake where to find the
-     canonical `texinfo.tex' for your package.  The value of this
-     variable should be the relative path from the current
-     `Makefile.am' to `texinfo.tex':
+     the variable ‘TEXINFO_TEX’ to tell Automake where to find the
+     canonical ‘texinfo.tex’ for your package.  The value of this
+     variable should be the relative path from the current ‘Makefile.am’
+     to ‘texinfo.tex’:
 
           TEXINFO_TEX = ../doc/texinfo.tex
 
@@ -6830,21 +6748,21 @@ File: automake.info,  Node: Man Pages,  Prev: Texinfo,  Up: Documentation
 ==============
 
 A package can also include man pages (but see the GNU standards on this
-matter, *note Man Pages: (standards)Man Pages.)  Man pages are declared
-using the `MANS' primary.  Generally the `man_MANS' variable is used.
-Man pages are automatically installed in the correct subdirectory of
-`mandir', based on the file extension.
+matter, *note (standards)Man Pages::.)  Man pages are declared using the
+‘MANS’ primary.  Generally the ‘man_MANS’ variable is used.  Man pages
+are automatically installed in the correct subdirectory of ‘mandir’,
+based on the file extension.
 
-   File extensions such as `.1c' are handled by looking for the valid
+   File extensions such as ‘.1c’ are handled by looking for the valid
 part of the extension and using that to determine the correct
-subdirectory of `mandir'.  Valid section names are the digits `0'
-through `9', and the letters `l' and `n'.
+subdirectory of ‘mandir’.  Valid section names are the digits ‘0’
+through ‘9’, and the letters ‘l’ and ‘n’.
 
    Sometimes developers prefer to name a man page something like
-`foo.man' in the source, and then rename it to have the correct suffix,
-for example `foo.1', when installing the file.  Automake also supports
+‘foo.man’ in the source, and then rename it to have the correct suffix,
+for example ‘foo.1’, when installing the file.  Automake also supports
 this mode.  For a valid section named SECTION, there is a corresponding
-directory named `manSECTIONdir', and a corresponding `_MANS' variable.
+directory named ‘manSECTIONdir’, and a corresponding ‘_MANS’ variable.
 Files listed in such a variable are installed in the indicated section.
 If the file already has a valid suffix, then it is installed as-is;
 otherwise the file suffix is changed to match the section.
@@ -6852,43 +6770,43 @@ otherwise the file suffix is changed to match the section.
    For instance, consider this example:
      man1_MANS = rename.man thesame.1 alsothesame.1c
 
-In this case, `rename.man' will be renamed to `rename.1' when
-installed, but the other files will keep their names.
+In this case, ‘rename.man’ will be renamed to ‘rename.1’ when installed,
+but the other files will keep their names.
 
-   By default, man pages are installed by `make install'.  However,
+   By default, man pages are installed by ‘make install’.  However,
 since the GNU project does not require man pages, many maintainers do
 not expend effort to keep the man pages up to date.  In these cases, the
-`no-installman' option will prevent the man pages from being installed
-by default.  The user can still explicitly install them via `make
-install-man'.
+‘no-installman’ option will prevent the man pages from being installed
+by default.  The user can still explicitly install them via make
+install-man.
 
    For fast installation, with many files it is preferable to use
-`manSECTION_MANS' over `man_MANS' as well as files that do not need to
+‘manSECTION_MANS’ over ‘man_MANS’ as well as files that do not need to
 be renamed.
 
    Man pages are not currently considered to be source, because it is
 not uncommon for man pages to be automatically generated.  Therefore
 they are not automatically included in the distribution.  However, this
-can be changed by use of the `dist_' prefix.  For instance here is how
-to distribute and install the two man pages of GNU `cpio' (which
+can be changed by use of the ‘dist_’ prefix.  For instance here is how
+to distribute and install the two man pages of GNU ‘cpio’ (which
 includes both Texinfo documentation and man pages):
 
      dist_man_MANS = cpio.1 mt.1
 
-   The `nobase_' prefix is meaningless for man pages and is disallowed.
+   The ‘nobase_’ prefix is meaningless for man pages and is disallowed.
 
    Executables and manpages may be renamed upon installation (*note
-Renaming::).  For manpages this can be avoided by use of the `notrans_'
-prefix.  For instance, suppose an executable `foo' allowing to access a
-library function `foo' from the command line.  The way to avoid
-renaming of the `foo.3' manpage is:
+Renaming::).  For manpages this can be avoided by use of the ‘notrans_’
+prefix.  For instance, suppose an executable ‘foo’ allowing to access a
+library function ‘foo’ from the command line.  The way to avoid renaming
+of the ‘foo.3’ manpage is:
 
      man_MANS = foo.1
      notrans_man_MANS = foo.3
 
-   `notrans_' must be specified first when used in conjunction with
-either `dist_' or `nodist_' (*note Fine-grained Distribution
-Control::).  For instance:
+   ‘notrans_’ must be specified first when used in conjunction with
+either ‘dist_’ or ‘nodist_’ (*note Fine-grained Distribution Control::).
+For instance:
 
      notrans_dist_man3_MANS = bar.3
 
@@ -6901,7 +6819,7 @@ File: automake.info,  Node: Install,  Next: Clean,  Prev: Documentation,  Up: To
 Naturally, Automake handles the details of actually installing your
 program once it has been built.  All files named by the various
 primaries are automatically installed in the appropriate places when the
-user runs `make install'.
+user runs ‘make install’.
 
 * Menu:
 
@@ -6923,25 +6841,25 @@ installing.
 
      bin_PROGRAMS = hello subdir/goodbye
 
-   In this example, both `hello' and `goodbye' will be installed in
-`$(bindir)'.
+   In this example, both ‘hello’ and ‘goodbye’ will be installed in
+‘$(bindir)’.
 
    Sometimes it is useful to avoid the basename step at install time.
 For instance, you might have a number of header files in subdirectories
 of the source tree that are laid out precisely how you want to install
-them.  In this situation you can use the `nobase_' prefix to suppress
+them.  In this situation you can use the ‘nobase_’ prefix to suppress
 the base name step.  For example:
 
      nobase_include_HEADERS = stdio.h sys/types.h
 
-will install `stdio.h' in `$(includedir)' and `types.h' in
-`$(includedir)/sys'.
+will install ‘stdio.h’ in ‘$(includedir)’ and ‘types.h’ in
+‘$(includedir)/sys’.
 
    For most file types, Automake will install multiple files at once,
 while avoiding command line length issues (*note Length Limitations::).
-Since some `install' programs will not install the same file twice in
+Since some ‘install’ programs will not install the same file twice in
 one invocation, you may need to ensure that file lists are unique within
-one variable such as `nobase_include_HEADERS' above.
+one variable such as ‘nobase_include_HEADERS’ above.
 
    You should not rely on the order in which files listed in one
 variable are installed.  Likewise, to cater for parallel make, you
@@ -6954,30 +6872,30 @@ File: automake.info,  Node: The Two Parts of Install,  Next: Extending Installat
 12.2 The Two Parts of Install
 =============================
 
-Automake generates separate `install-data' and `install-exec' rules, in
+Automake generates separate ‘install-data’ and ‘install-exec’ rules, in
 case the installer is installing on multiple machines that share
-directory structure--these targets allow the machine-independent parts
-to be installed only once.  `install-exec' installs platform-dependent
-files, and `install-data' installs platform-independent files.  The
-`install' target depends on both of these targets.  While Automake
-tries to automatically segregate objects into the correct category, the
-`Makefile.am' author is, in the end, responsible for making sure this
-is done correctly.  
+directory structure—these targets allow the machine-independent parts to
+be installed only once.  ‘install-exec’ installs platform-dependent
+files, and ‘install-data’ installs platform-independent files.  The
+‘install’ target depends on both of these targets.  While Automake tries
+to automatically segregate objects into the correct category, the
+‘Makefile.am’ author is, in the end, responsible for making sure this is
+done correctly.
 
-   Variables using the standard directory prefixes `data', `info',
-`man', `include', `oldinclude', `pkgdata', or `pkginclude' are
-installed by `install-data'.
+   Variables using the standard directory prefixes ‘data’, ‘info’,
+‘man’, ‘include’, ‘oldinclude’, ‘pkgdata’, or ‘pkginclude’ are installed
+by ‘install-data’.
 
-   Variables using the standard directory prefixes `bin', `sbin',
-`libexec', `sysconf', `localstate', `lib', or `pkglib' are installed by
-`install-exec'.
+   Variables using the standard directory prefixes ‘bin’, ‘sbin’,
+‘libexec’, ‘sysconf’, ‘localstate’, ‘lib’, or ‘pkglib’ are installed by
+‘install-exec’.
 
-   For instance, `data_DATA' files are installed by `install-data',
-while `bin_PROGRAMS' files are installed by `install-exec'.
+   For instance, ‘data_DATA’ files are installed by ‘install-data’,
+while ‘bin_PROGRAMS’ files are installed by ‘install-exec’.
 
-   Any variable using a user-defined directory prefix with `exec' in
-the name (e.g., `myexecbin_PROGRAMS') is installed by `install-exec'.
-All other user-defined prefixes are installed by `install-data'.
+   Any variable using a user-defined directory prefix with ‘exec’ in the
+name (e.g., ‘myexecbin_PROGRAMS’) is installed by ‘install-exec’.  All
+other user-defined prefixes are installed by ‘install-data’.
 
 \1f
 File: automake.info,  Node: Extending Installation,  Next: Staged Installs,  Prev: The Two Parts of Install,  Up: Install
@@ -6986,254 +6904,13 @@ File: automake.info,  Node: Extending Installation,  Next: Staged Installs,  Pre
 ===========================
 
 It is possible to extend this mechanism by defining an
-`install-exec-local' or `install-data-local' rule.  If these rules
-exist, they will be run at `make install' time.  These rules can do
-almost anything; care is required.  
+‘install-exec-local’ or ‘install-data-local’ rule.  If these rules
+exist, they will be run at ‘make install’ time.  These rules can do
+almost anything; care is required.
 
-   Automake also supports two install hooks, `install-exec-hook' and
-`install-data-hook'.  These hooks are run after all other install rules
+   Automake also supports two install hooks, ‘install-exec-hook’ and
+‘install-data-hook’.  These hooks are run after all other install rules
 of the appropriate type, exec or data, have completed.  So, for
 instance, it is possible to perform post-installation modifications
-using an install hook.  *Note Extending::, for some examples.  
-
-\1f
-File: automake.info,  Node: Staged Installs,  Next: Install Rules for the User,  Prev: Extending Installation,  Up: Install
-
-12.4 Staged Installs
-====================
-
-Automake generates support for the `DESTDIR' variable in all install
-rules.  `DESTDIR' is used during the `make install' step to relocate
-install objects into a staging area.  Each object and path is prefixed
-with the value of `DESTDIR' before being copied into the install area.
-Here is an example of typical DESTDIR usage:
-
-     mkdir /tmp/staging &&
-     make DESTDIR=/tmp/staging install
-
-   The `mkdir' command avoids a security problem if the attacker
-creates a symbolic link from `/tmp/staging' to a victim area; then
-`make' places install objects in a directory tree built under
-`/tmp/staging'.  If `/gnu/bin/foo' and `/gnu/share/aclocal/foo.m4' are
-to be installed, the above command would install
-`/tmp/staging/gnu/bin/foo' and `/tmp/staging/gnu/share/aclocal/foo.m4'.
-
-   This feature is commonly used to build install images and packages
-(*note DESTDIR::).
-
-   Support for `DESTDIR' is implemented by coding it directly into the
-install rules.  If your `Makefile.am' uses a local install rule (e.g.,
-`install-exec-local') or an install hook, then you must write that code
-to respect `DESTDIR'.
-
-   *Note Makefile Conventions: (standards)Makefile Conventions, for
-another usage example.
-
-\1f
-File: automake.info,  Node: Install Rules for the User,  Prev: Staged Installs,  Up: Install
-
-12.5 Install Rules for the User
-===============================
-
-Automake also generates rules for targets `uninstall', `installdirs',
-and `install-strip'.  
-
-   Automake supports `uninstall-local' and `uninstall-hook'.  There is
-no notion of separate uninstalls for "exec" and "data", as these
-features would not provide additional functionality.
-
-   Note that `uninstall' is not meant as a replacement for a real
-packaging tool.
-
-\1f
-File: automake.info,  Node: Clean,  Next: Dist,  Prev: Install,  Up: Top
-
-13 What Gets Cleaned
-********************
-
-The GNU Makefile Standards specify a number of different clean rules.
-*Note Standard Targets for Users: (standards)Standard Targets.
-
-   Generally the files that can be cleaned are determined automatically
-by Automake.  Of course, Automake also recognizes some variables that
-can be defined to specify additional files to clean.  These variables
-are `MOSTLYCLEANFILES', `CLEANFILES', `DISTCLEANFILES', and
-`MAINTAINERCLEANFILES'.  
-
-   When cleaning involves more than deleting some hard-coded list of
-files, it is also possible to supplement the cleaning rules with your
-own commands.  Simply define a rule for any of the `mostlyclean-local',
-`clean-local', `distclean-local', or `maintainer-clean-local' targets
-(*note Extending::).  A common case is deleting a directory, for
-instance, a directory created by the test suite:
-
-     clean-local:
-             -rm -rf testSubDir
-
-   Since `make' allows only one set of rules for a given target, a more
-extensible way of writing this is to use a separate target listed as a
-dependency:
-
-     clean-local: clean-local-check
-     .PHONY: clean-local-check
-     clean-local-check:
-             -rm -rf testSubDir
-
-   As the GNU Standards aren't always explicit as to which files should
-be removed by which rule, we've adopted a heuristic that we believe was
-first formulated by Franc,ois Pinard:
-
-   * If `make' built it, and it is commonly something that one would
-     want to rebuild (for instance, a `.o' file), then `mostlyclean'
-     should delete it.
-
-   * Otherwise, if `make' built it, then `clean' should delete it.
-
-   * If `configure' built it, then `distclean' should delete it.
-
-   * If the maintainer built it (for instance, a `.info' file), then
-     `maintainer-clean' should delete it.  However `maintainer-clean'
-     should not delete anything that needs to exist in order to run
-     `./configure && make'.
-
-   We recommend that you follow this same set of heuristics in your
-`Makefile.am'.
-
-\1f
-File: automake.info,  Node: Dist,  Next: Tests,  Prev: Clean,  Up: Top
-
-14 What Goes in a Distribution
-******************************
-
-* Menu:
-
-* Basics of Distribution::      Files distributed by default
-* Fine-grained Distribution Control::  `dist_' and `nodist_' prefixes
-* The dist Hook::               A target for last-minute distribution changes
-* Checking the Distribution::   `make distcheck' explained
-* The Types of Distributions::  A variety of formats and compression methods
-
-\1f
-File: automake.info,  Node: Basics of Distribution,  Next: Fine-grained Distribution Control,  Up: Dist
-
-14.1 Basics of Distribution
-===========================
-
-The `dist' rule in the generated `Makefile.in' can be used to generate
-a gzipped `tar' file and other flavors of archive for distribution.
-The file is named based on the `PACKAGE' and `VERSION' variables
-defined by `AM_INIT_AUTOMAKE' (*note Macros::); more precisely the
-gzipped `tar' file is named `PACKAGE-VERSION.tar.gz'.  You can use the
-`make' variable `GZIP_ENV' to control how gzip is run.  The default
-setting is `--best'.
-
-   For the most part, the files to distribute are automatically found by
-Automake: all source files are automatically included in a distribution,
-as are all `Makefile.am' and `Makefile.in' files.  Automake also has a
-built-in list of commonly used files that are automatically included if
-they are found in the current directory (either physically, or as the
-target of a `Makefile.am' rule); this list is printed by `automake
---help'.  Note that some files in this list are actually distributed
-only if other certain conditions hold (for example, the `config.h.top'
-and `config.h.bot' files are automatically distributed only if, e.g.,
-`AC_CONFIG_HEADERS([config.h])' is used in `configure.ac').  Also,
-files that are read by `configure' (i.e. the source files corresponding
-to the files specified in various Autoconf macros such as
-`AC_CONFIG_FILES' and siblings) are automatically distributed.  Files
-included in a `Makefile.am' (using `include') or in `configure.ac'
-(using `m4_include'), and helper scripts installed with `automake
---add-missing' are also distributed.
-
-   Still, sometimes there are files that must be distributed, but which
-are not covered in the automatic rules.  These files should be listed in
-the `EXTRA_DIST' variable.  You can mention files from subdirectories
-in `EXTRA_DIST'.
-
-   You can also mention a directory in `EXTRA_DIST'; in this case the
-entire directory will be recursively copied into the distribution.
-Please note that this will also copy _everything_ in the directory,
-including, e.g., Subversion's `.svn' private directories or CVS/RCS
-version control files.  We recommend against using this feature.
-
-   If you define `SUBDIRS', Automake will recursively include the
-subdirectories in the distribution.  If `SUBDIRS' is defined
-conditionally (*note Conditionals::), Automake will normally include
-all directories that could possibly appear in `SUBDIRS' in the
-distribution.  If you need to specify the set of directories
-conditionally, you can set the variable `DIST_SUBDIRS' to the exact
-list of subdirectories to include in the distribution (*note
-Conditional Subdirectories::).
-
-\1f
-File: automake.info,  Node: Fine-grained Distribution Control,  Next: The dist Hook,  Prev: Basics of Distribution,  Up: Dist
-
-14.2 Fine-grained Distribution Control
-======================================
-
-Sometimes you need tighter control over what does _not_ go into the
-distribution; for instance, you might have source files that are
-generated and that you do not want to distribute.  In this case
-Automake gives fine-grained control using the `dist' and `nodist'
-prefixes.  Any primary or `_SOURCES' variable can be prefixed with
-`dist_' to add the listed files to the distribution.  Similarly,
-`nodist_' can be used to omit the files from the distribution.
-
-   As an example, here is how you would cause some data to be
-distributed while leaving some source code out of the distribution:
-
-     dist_data_DATA = distribute-this
-     bin_PROGRAMS = foo
-     nodist_foo_SOURCES = do-not-distribute.c
-
-\1f
-File: automake.info,  Node: The dist Hook,  Next: Checking the Distribution,  Prev: Fine-grained Distribution Control,  Up: Dist
-
-14.3 The dist Hook
-==================
-
-Occasionally it is useful to be able to change the distribution before
-it is packaged up.  If the `dist-hook' rule exists, it is run after the
-distribution directory is filled, but before the actual distribution
-archives are created.  One way to use this is for removing unnecessary
-files that get recursively included by specifying a directory in
-`EXTRA_DIST':
-
-     EXTRA_DIST = doc
-     dist-hook:
-             rm -rf `find $(distdir)/doc -type d -name .svn`
-
-Note that the `dist-hook' recipe shouldn't assume that the regular
-files in the distribution directory are writable; this might not be the
-case if one is packaging from a read-only source tree, or when a `make
-distcheck' is being done.  For similar reasons, the recipe shouldn't
-assume that the subdirectories put into the distribution directory as
-effect of having them listed in `EXTRA_DIST' are writable.  So, if the
-`dist-hook' recipe wants to modify the content of an existing file (or
-`EXTRA_DIST' subdirectory) in the distribution directory, it should
-explicitly to make it writable first:
-
-     EXTRA_DIST = README doc
-     dist-hook:
-             chmod u+w $(distdir)/README $(distdir)/doc
-             echo "Distribution date: `date`" >> README
-             rm -f $(distdir)/doc/HACKING
-
-   Two variables that come handy when writing `dist-hook' rules are
-`$(distdir)' and `$(top_distdir)'.
-
-   `$(distdir)' points to the directory where the `dist' rule will copy
-files from the current directory before creating the tarball.  If you
-are at the top-level directory, then `distdir = $(PACKAGE)-$(VERSION)'.
-When used from subdirectory named `foo/', then `distdir =
-../$(PACKAGE)-$(VERSION)/foo'.  `$(distdir)' can be a relative or
-absolute path, do not assume any form.
-
-   `$(top_distdir)' always points to the root directory of the
-distributed tree.  At the top-level it's equal to `$(distdir)'.  In the
-`foo/' subdirectory `top_distdir = ../$(PACKAGE)-$(VERSION)'.
-`$(top_distdir)' too can be a relative or absolute path.
-
-   Note that when packages are nested using `AC_CONFIG_SUBDIRS' (*note
-Subpackages::), then `$(distdir)' and `$(top_distdir)' are relative to
-the package where `make dist' was run, not to any sub-packages involved.
+using an install hook.  *Note Extending::, for some examples.
 
index aaedf01..1f027e3 100644 (file)
@@ -1,19 +1,18 @@
-This is automake.info, produced by makeinfo version 4.13 from
-/home/stefano/src/am/branches/trunks/doc/automake.texi.
+This is automake.info, produced by makeinfo version 6.1 from
+automake.texi.
 
-This manual is for GNU Automake (version 1.12.1, 1 June 2012), a
+This manual is for GNU Automake (version 1.15.1, 17 June 2017), a
 program that creates GNU standards-compliant Makefiles from template
 files.
 
-   Copyright (C) 1995-2012 Free Software Foundation, Inc.
+   Copyright © 1995-2017 Free Software Foundation, Inc.
 
      Permission is granted to copy, distribute and/or modify this
      document under the terms of the GNU Free Documentation License,
      Version 1.3 or any later version published by the Free Software
      Foundation; with no Invariant Sections, with no Front-Cover texts,
-     and with no Back-Cover Texts.  A copy of the license is included
-     in the section entitled "GNU Free Documentation License."
-
+     and with no Back-Cover Texts.  A copy of the license is included in
+     the section entitled “GNU Free Documentation License.”
 
 INFO-DIR-SECTION Software development
 START-INFO-DIR-ENTRY
@@ -27,123 +26,371 @@ START-INFO-DIR-ENTRY
 END-INFO-DIR-ENTRY
 
 \1f
-File: automake.info,  Node: Checking the Distribution,  Next: The Types of Distributions,  Prev: The dist Hook,  Up: Dist
+File: automake.info,  Node: Staged Installs,  Next: Install Rules for the User,  Prev: Extending Installation,  Up: Install
 
-14.4 Checking the Distribution
-==============================
+12.4 Staged Installs
+====================
+
+Automake generates support for the ‘DESTDIR’ variable in all install
+rules.  ‘DESTDIR’ is used during the ‘make install’ step to relocate
+install objects into a staging area.  Each object and path is prefixed
+with the value of ‘DESTDIR’ before being copied into the install area.
+Here is an example of typical DESTDIR usage:
+
+     mkdir /tmp/staging &&
+     make DESTDIR=/tmp/staging install
+
+   The ‘mkdir’ command avoids a security problem if the attacker creates
+a symbolic link from ‘/tmp/staging’ to a victim area; then ‘make’ places
+install objects in a directory tree built under ‘/tmp/staging’.  If
+‘/gnu/bin/foo’ and ‘/gnu/share/aclocal/foo.m4’ are to be installed, the
+above command would install ‘/tmp/staging/gnu/bin/foo’ and
+‘/tmp/staging/gnu/share/aclocal/foo.m4’.
+
+   This feature is commonly used to build install images and packages
+(*note DESTDIR::).
+
+   Support for ‘DESTDIR’ is implemented by coding it directly into the
+install rules.  If your ‘Makefile.am’ uses a local install rule (e.g.,
+‘install-exec-local’) or an install hook, then you must write that code
+to respect ‘DESTDIR’.
+
+   *Note (standards)Makefile Conventions::, for another usage example.
+
+\1f
+File: automake.info,  Node: Install Rules for the User,  Prev: Staged Installs,  Up: Install
+
+12.5 Install Rules for the User
+===============================
+
+Automake also generates rules for targets ‘uninstall’, ‘installdirs’,
+and ‘install-strip’.
+
+   Automake supports ‘uninstall-local’ and ‘uninstall-hook’.  There is
+no notion of separate uninstalls for “exec” and “data”, as these
+features would not provide additional functionality.
+
+   Note that ‘uninstall’ is not meant as a replacement for a real
+packaging tool.
+
+\1f
+File: automake.info,  Node: Clean,  Next: Dist,  Prev: Install,  Up: Top
+
+13 What Gets Cleaned
+********************
+
+The GNU Makefile Standards specify a number of different clean rules.
+*Note Standard Targets for Users: (standards)Standard Targets.
+
+   Generally the files that can be cleaned are determined automatically
+by Automake.  Of course, Automake also recognizes some variables that
+can be defined to specify additional files to clean.  These variables
+are ‘MOSTLYCLEANFILES’, ‘CLEANFILES’, ‘DISTCLEANFILES’, and
+‘MAINTAINERCLEANFILES’.
+
+   When cleaning involves more than deleting some hard-coded list of
+files, it is also possible to supplement the cleaning rules with your
+own commands.  Simply define a rule for any of the ‘mostlyclean-local’,
+‘clean-local’, ‘distclean-local’, or ‘maintainer-clean-local’ targets
+(*note Extending::).  A common case is deleting a directory, for
+instance, a directory created by the test suite:
+
+     clean-local:
+             -rm -rf testSubDir
+
+   Since ‘make’ allows only one set of rules for a given target, a more
+extensible way of writing this is to use a separate target listed as a
+dependency:
+
+     clean-local: clean-local-check
+     .PHONY: clean-local-check
+     clean-local-check:
+             -rm -rf testSubDir
+
+   As the GNU Standards aren’t always explicit as to which files should
+be removed by which rule, we’ve adopted a heuristic that we believe was
+first formulated by François Pinard:
+
+   • If ‘make’ built it, and it is commonly something that one would
+     want to rebuild (for instance, a ‘.o’ file), then ‘mostlyclean’
+     should delete it.
 
-Automake also generates a `distcheck' rule that can be of help to
-ensure that a given distribution will actually work.  Simplifying a
-bit, we can say this rule first makes a distribution, and then,
-_operating from it_, takes the following steps:
-   * tries to do a `VPATH' build (*note VPATH Builds::), with the
-     `srcdir' and all its content made _read-only_;
+   • Otherwise, if ‘make’ built it, then ‘clean’ should delete it.
 
-   * runs the test suite (with `make check') on this fresh build;
+   • If ‘configure’ built it, then ‘distclean’ should delete it.
 
-   * installs the package in a temporary directory (with `make
-     install'), and tries runs the test suite on the resulting
-     installation (with `make installcheck');
+   • If the maintainer built it (for instance, a ‘.info’ file), then
+     ‘maintainer-clean’ should delete it.  However ‘maintainer-clean’
+     should not delete anything that needs to exist in order to run
+     ‘./configure && make’.
 
-   * checks that the package can be correctly uninstalled (by `make
-     uninstall') and cleaned (by `make distclean');
+   We recommend that you follow this same set of heuristics in your
+‘Makefile.am’.
 
-   * finally, makes another tarball to ensure the distribution is
+\1f
+File: automake.info,  Node: Dist,  Next: Tests,  Prev: Clean,  Up: Top
+
+14 What Goes in a Distribution
+******************************
+
+* Menu:
+
+* Basics of Distribution::      Files distributed by default
+* Fine-grained Distribution Control::  ‘dist_’ and ‘nodist_’ prefixes
+* The dist Hook::               A target for last-minute distribution changes
+* Checking the Distribution::   ‘make distcheck’ explained
+* The Types of Distributions::  A variety of formats and compression methods
+
+\1f
+File: automake.info,  Node: Basics of Distribution,  Next: Fine-grained Distribution Control,  Up: Dist
+
+14.1 Basics of Distribution
+===========================
+
+The ‘dist’ rule in the generated ‘Makefile.in’ can be used to generate a
+gzipped ‘tar’ file and other flavors of archive for distribution.  The
+file is named based on the ‘PACKAGE’ and ‘VERSION’ variables
+automatically defined by either the ‘AC_INIT’ invocation or by a
+_deprecated_ two-arguments invocation of the ‘AM_INIT_AUTOMAKE’ macro
+(see *note Public Macros:: for how these variables get their values,
+from either defaults or explicit values – it’s slightly trickier than
+one would expect).  More precisely the gzipped ‘tar’ file is named
+‘${PACKAGE}-${VERSION}.tar.gz’.  You can use the ‘make’ variable
+‘GZIP_ENV’ to control how gzip is run.  The default setting is ‘--best’.
+
+   For the most part, the files to distribute are automatically found by
+Automake: all source files are automatically included in a distribution,
+as are all ‘Makefile.am’ and ‘Makefile.in’ files.  Automake also has a
+built-in list of commonly used files that are automatically included if
+they are found in the current directory (either physically, or as the
+target of a ‘Makefile.am’ rule); this list is printed by ‘automake
+--help’.  Note that some files in this list are actually distributed
+only if other certain conditions hold (for example, the ‘config.h.top’
+and ‘config.h.bot’ files are automatically distributed only if, e.g.,
+‘AC_CONFIG_HEADERS([config.h])’ is used in ‘configure.ac’).  Also, files
+that are read by ‘configure’ (i.e. the source files corresponding to the
+files specified in various Autoconf macros such as ‘AC_CONFIG_FILES’ and
+siblings) are automatically distributed.  Files included in a
+‘Makefile.am’ (using ‘include’) or in ‘configure.ac’ (using
+‘m4_include’), and helper scripts installed with ‘automake
+--add-missing’ are also distributed.
+
+   Still, sometimes there are files that must be distributed, but which
+are not covered in the automatic rules.  These files should be listed in
+the ‘EXTRA_DIST’ variable.  You can mention files from subdirectories in
+‘EXTRA_DIST’.
+
+   You can also mention a directory in ‘EXTRA_DIST’; in this case the
+entire directory will be recursively copied into the distribution.
+Please note that this will also copy _everything_ in the directory,
+including, e.g., Subversion’s ‘.svn’ private directories or CVS/RCS
+version control files; thus we recommend against using this feature
+as-is.  However, you can use the ‘dist-hook’ feature to ameliorate the
+problem; *note The dist Hook::.
+
+   If you define ‘SUBDIRS’, Automake will recursively include the
+subdirectories in the distribution.  If ‘SUBDIRS’ is defined
+conditionally (*note Conditionals::), Automake will normally include all
+directories that could possibly appear in ‘SUBDIRS’ in the distribution.
+If you need to specify the set of directories conditionally, you can set
+the variable ‘DIST_SUBDIRS’ to the exact list of subdirectories to
+include in the distribution (*note Conditional Subdirectories::).
+
+\1f
+File: automake.info,  Node: Fine-grained Distribution Control,  Next: The dist Hook,  Prev: Basics of Distribution,  Up: Dist
+
+14.2 Fine-grained Distribution Control
+======================================
+
+Sometimes you need tighter control over what does _not_ go into the
+distribution; for instance, you might have source files that are
+generated and that you do not want to distribute.  In this case Automake
+gives fine-grained control using the ‘dist’ and ‘nodist’ prefixes.  Any
+primary or ‘_SOURCES’ variable can be prefixed with ‘dist_’ to add the
+listed files to the distribution.  Similarly, ‘nodist_’ can be used to
+omit the files from the distribution.
+
+   As an example, here is how you would cause some data to be
+distributed while leaving some source code out of the distribution:
+
+     dist_data_DATA = distribute-this
+     bin_PROGRAMS = foo
+     nodist_foo_SOURCES = do-not-distribute.c
+
+\1f
+File: automake.info,  Node: The dist Hook,  Next: Checking the Distribution,  Prev: Fine-grained Distribution Control,  Up: Dist
+
+14.3 The dist Hook
+==================
+
+Occasionally it is useful to be able to change the distribution before
+it is packaged up.  If the ‘dist-hook’ rule exists, it is run after the
+distribution directory is filled, but before the actual distribution
+archives are created.  One way to use this is for removing unnecessary
+files that get recursively included by specifying a directory in
+‘EXTRA_DIST’:
+
+     EXTRA_DIST = doc
+     dist-hook:
+             rm -rf `find $(distdir)/doc -type d -name .svn`
+
+Note that the ‘dist-hook’ recipe shouldn’t assume that the regular files
+in the distribution directory are writable; this might not be the case
+if one is packaging from a read-only source tree, or when a ‘make
+distcheck’ is being done.  For similar reasons, the recipe shouldn’t
+assume that the subdirectories put into the distribution directory as
+effect of having them listed in ‘EXTRA_DIST’ are writable.  So, if the
+‘dist-hook’ recipe wants to modify the content of an existing file (or
+‘EXTRA_DIST’ subdirectory) in the distribution directory, it should
+explicitly to make it writable first:
+
+     EXTRA_DIST = README doc
+     dist-hook:
+             chmod u+w $(distdir)/README $(distdir)/doc
+             echo "Distribution date: `date`" >> README
+             rm -f $(distdir)/doc/HACKING
+
+   Two variables that come handy when writing ‘dist-hook’ rules are
+‘$(distdir)’ and ‘$(top_distdir)’.
+
+   ‘$(distdir)’ points to the directory where the ‘dist’ rule will copy
+files from the current directory before creating the tarball.  If you
+are at the top-level directory, then ‘distdir = $(PACKAGE)-$(VERSION)’.
+When used from subdirectory named ‘foo/’, then ‘distdir =
+../$(PACKAGE)-$(VERSION)/foo’.  ‘$(distdir)’ can be a relative or
+absolute path, do not assume any form.
+
+   ‘$(top_distdir)’ always points to the root directory of the
+distributed tree.  At the top-level it’s equal to ‘$(distdir)’.  In the
+‘foo/’ subdirectory ‘top_distdir = ../$(PACKAGE)-$(VERSION)’.
+‘$(top_distdir)’ too can be a relative or absolute path.
+
+   Note that when packages are nested using ‘AC_CONFIG_SUBDIRS’ (*note
+Subpackages::), then ‘$(distdir)’ and ‘$(top_distdir)’ are relative to
+the package where ‘make dist’ was run, not to any sub-packages involved.
+
+\1f
+File: automake.info,  Node: Checking the Distribution,  Next: The Types of Distributions,  Prev: The dist Hook,  Up: Dist
+
+14.4 Checking the Distribution
+==============================
+
+Automake also generates a ‘distcheck’ rule that can be of help to ensure
+that a given distribution will actually work.  Simplifying a bit, we can
+say this rule first makes a distribution, and then, _operating from it_,
+takes the following steps:
+   • tries to do a ‘VPATH’ build (*note VPATH Builds::), with the
+     ‘srcdir’ and all its content made _read-only_;
+   • runs the test suite (with ‘make check’) on this fresh build;
+   • installs the package in a temporary directory (with ‘make
+     install’), and tries runs the test suite on the resulting
+     installation (with ‘make installcheck’);
+   • checks that the package can be correctly uninstalled (by ‘make
+     uninstall’) and cleaned (by ‘make distclean’);
+   • finally, makes another tarball to ensure the distribution is
      self-contained.
 
+   All of these actions are performed in a temporary directory.  Please
+note that the exact location and the exact structure of such a directory
+(where the read-only sources are placed, how the temporary build and
+install directories are named and how deeply they are nested, etc.)  is
+to be considered an implementation detail, which can change at any time;
+so do not reply on it.
+
 DISTCHECK_CONFIGURE_FLAGS
 -------------------------
 
-Building the package involves running `./configure'.  If you need to
-supply additional flags to `configure', define them in the
-`AM_DISTCHECK_CONFIGURE_FLAGS' variable in your top-level
-`Makefile.am'.  The user can still extend or override the flags
-provided there by defining the `DISTCHECK_CONFIGURE_FLAGS' variable, on
-the command line when invoking `make'.
-
-   Still, developers are encouraged to strive to make their code
+Building the package involves running ‘./configure’.  If you need to
+supply additional flags to ‘configure’, define them in the
+‘AM_DISTCHECK_CONFIGURE_FLAGS’ variable in your top-level ‘Makefile.am’.
+The user can still extend or override the flags provided there by
+defining the ‘DISTCHECK_CONFIGURE_FLAGS’ variable, on the command line
+when invoking ‘make’.  It’s worth nothing that ‘make distcheck’ needs
+complete control over the ‘configure’ options ‘--srcdir’ and ‘--prefix’,
+so those options cannot be overridden by ‘AM_DISTCHECK_CONFIGURE_FLAGS’
+nor by ‘DISTCHECK_CONFIGURE_FLAGS’.
+
+   Also note that developers are encouraged to strive to make their code
 buildable without requiring any special configure option; thus, in
-general, you shouldn't define `AM_DISTCHECK_CONFIGURE_FLAGS'. However,
+general, you shouldn’t define ‘AM_DISTCHECK_CONFIGURE_FLAGS’.  However,
 there might be few scenarios in which the use of this variable is
-justified.  GNU `m4' offers an example.  GNU `m4' configures by default
+justified.  GNU ‘m4’ offers an example.  GNU ‘m4’ configures by default
 with its experimental and seldom used "changeword" feature disabled; so
-in its case it is useful to have `make distcheck' run configure with
-the `--with-changeword' option, to ensure that the code for changeword
-support still compiles correctly.  GNU `m4' also employs the
-`AM_DISTCHECK_CONFIGURE_FLAGS' variable to stress-test the use of
-`--program-prefix=g', since at one point the `m4' build system had a
-bug where `make installcheck' was wrongly assuming it could blindly
-test "`m4'", rather than the just-installed "`gm4'".
+in its case it is useful to have ‘make distcheck’ run configure with the
+‘--with-changeword’ option, to ensure that the code for changeword
+support still compiles correctly.  GNU ‘m4’ also employs the
+‘AM_DISTCHECK_CONFIGURE_FLAGS’ variable to stress-test the use of
+‘--program-prefix=g’, since at one point the ‘m4’ build system had a bug
+where ‘make installcheck’ was wrongly assuming it could blindly test
+"‘m4’", rather than the just-installed "‘gm4’".
 
 distcheck-hook
 --------------
 
-If the `distcheck-hook' rule is defined in your top-level
-`Makefile.am', then it will be invoked by `distcheck' after the new
-distribution has been unpacked, but before the unpacked copy is
-configured and built.  Your `distcheck-hook' can do almost anything,
-though as always caution is advised.  Generally this hook is used to
-check for potential distribution errors not caught by the standard
-mechanism.  Note that `distcheck-hook' as well as
-`AM_DISTCHECK_CONFIGURE_FLAGS' and `DISTCHECK_CONFIGURE_FLAGS' are not
-honored in a subpackage `Makefile.am', but the flags from
-`AM_DISTCHECK_CONFIGURE_FLAGS' and `DISTCHECK_CONFIGURE_FLAGS' are
-passed down to the `configure' script of the subpackage.
+If the ‘distcheck-hook’ rule is defined in your top-level ‘Makefile.am’,
+then it will be invoked by ‘distcheck’ after the new distribution has
+been unpacked, but before the unpacked copy is configured and built.
+Your ‘distcheck-hook’ can do almost anything, though as always caution
+is advised.  Generally this hook is used to check for potential
+distribution errors not caught by the standard mechanism.  Note that
+‘distcheck-hook’ as well as ‘AM_DISTCHECK_CONFIGURE_FLAGS’ and
+‘DISTCHECK_CONFIGURE_FLAGS’ are not honored in a subpackage
+‘Makefile.am’, but the flags from ‘AM_DISTCHECK_CONFIGURE_FLAGS’ and
+‘DISTCHECK_CONFIGURE_FLAGS’ are passed down to the ‘configure’ script of
+the subpackage.
 
 distcleancheck
 --------------
 
-Speaking of potential distribution errors, `distcheck' also ensures
-that the `distclean' rule actually removes all built files.  This is
-done by running `make distcleancheck' at the end of the `VPATH' build.
-By default, `distcleancheck' will run `distclean' and then make sure
-the build tree has been emptied by running
-`$(distcleancheck_listfiles)'.  Usually this check will find generated
-files that you forgot to add to the `DISTCLEANFILES' variable (*note
-Clean::).
+Speaking of potential distribution errors, ‘distcheck’ also ensures that
+the ‘distclean’ rule actually removes all built files.  This is done by
+running ‘make distcleancheck’ at the end of the ‘VPATH’ build.  By
+default, ‘distcleancheck’ will run ‘distclean’ and then make sure the
+build tree has been emptied by running ‘$(distcleancheck_listfiles)’.
+Usually this check will find generated files that you forgot to add to
+the ‘DISTCLEANFILES’ variable (*note Clean::).
 
-   The `distcleancheck' behavior should be OK for most packages,
+   The ‘distcleancheck’ behavior should be OK for most packages,
 otherwise you have the possibility to override the definition of either
-the `distcleancheck' rule, or the `$(distcleancheck_listfiles)'
-variable.  For instance, to disable `distcleancheck' completely, add
-the following rule to your top-level `Makefile.am':
+the ‘distcleancheck’ rule, or the ‘$(distcleancheck_listfiles)’
+variable.  For instance, to disable ‘distcleancheck’ completely, add the
+following rule to your top-level ‘Makefile.am’:
 
      distcleancheck:
              @:
 
-   If you want `distcleancheck' to ignore built files that have not
-been cleaned because they are also part of the distribution, add the
+   If you want ‘distcleancheck’ to ignore built files that have not been
+cleaned because they are also part of the distribution, add the
 following definition instead:
 
      distcleancheck_listfiles = \
        find . -type f -exec sh -c 'test -f $(srcdir)/$$1 || echo $$1' \
             sh '{}' ';'
 
-   The above definition is not the default because it's usually an
-error if your Makefiles cause some distributed files to be rebuilt when
-the user build the package.  (Think about the user missing the tool
-required to build the file; or if the required tool is built by your
-package, consider the cross-compilation case where it can't be run.)
-There is an entry in the FAQ about this (*note Errors with
-distclean::), make sure you read it before playing with
-`distcleancheck_listfiles'.
+   The above definition is not the default because it’s usually an error
+if your Makefiles cause some distributed files to be rebuilt when the
+user build the package.  (Think about the user missing the tool required
+to build the file; or if the required tool is built by your package,
+consider the cross-compilation case where it can’t be run.)  There is an
+entry in the FAQ about this (*note Errors with distclean::), make sure
+you read it before playing with ‘distcleancheck_listfiles’.
 
 distuninstallcheck
 ------------------
 
-`distcheck' also checks that the `uninstall' rule works properly, both
-for ordinary and `DESTDIR' builds.  It does this by invoking `make
-uninstall', and then it checks the install tree to see if any files are
+‘distcheck’ also checks that the ‘uninstall’ rule works properly, both
+for ordinary and ‘DESTDIR’ builds.  It does this by invoking ‘make
+uninstall, and then it checks the install tree to see if any files are
 left over.  This check will make sure that you correctly coded your
-`uninstall'-related rules.
+‘uninstall’-related rules.
 
-   By default, the checking is done by the `distuninstallcheck' rule,
+   By default, the checking is done by the ‘distuninstallcheck’ rule,
 and the list of files in the install tree is generated by
-`$(distuninstallcheck_listfiles)' (this is a variable whose value is a
+‘$(distuninstallcheck_listfiles)’ (this is a variable whose value is a
 shell command to run that prints the list of files to stdout).
 
    Either of these can be overridden to modify the behavior of
-`distcheck'.  For instance, to disable this check completely, you would
+‘distcheck’.  For instance, to disable this check completely, you would
 write:
 
      distuninstallcheck:
@@ -158,41 +405,48 @@ File: automake.info,  Node: The Types of Distributions,  Prev: Checking the Dist
 Automake generates rules to provide archives of the project for
 distributions in various formats.  Their targets are:
 
-`dist-bzip2'
-     Generate a bzip2 tar archive of the distribution.  bzip2 archives
-     are frequently smaller than gzipped archives.  By default, this
-     rule makes `bzip2' use a compression option of `-9'.  To make it
-     use a different one, set the `BZIP2' environment variable.  For
-     example, `make dist-bzip2 BZIP2=-7'.  
-
-`dist-gzip'
-     Generate a gzip tar archive of the distribution.  
-
-`dist-lzip'
-     Generate an `lzip' tar archive of the distribution.  `lzip'
-     archives are frequently smaller than `bzip2'-compressed archives.  
-
-`dist-shar'
-     Generate a shar archive of the distribution.  
+‘dist-gzip’
+     Generate a ‘gzip’ tar archive of the distribution.  This is the
+     only format enabled by default.
 
-`dist-xz'
-     Generate an `xz' tar archive of the distribution.  `xz' archives
-     are frequently smaller than `bzip2'-compressed archives.  By
-     default, this rule makes `xz' use a compression option of `-e'.
-     To make it use a different one, set the `XZ_OPT' environment
-     variable.  For example, run this command to use the default
-     compression ratio, but with a progress indicator: `make dist-xz
-     XZ_OPT=-7e'.  
-
-`dist-zip'
-     Generate a zip archive of the distribution.  
-
-`dist-tarZ'
-     Generate a compressed tar archive of the distribution.  
-
-   The rule `dist' (and its historical synonym `dist-all') will create
-archives in all the enabled formats, *note Options::.  By default, only
-the `dist-gzip' target is hooked to `dist'.
+‘dist-bzip2’
+     Generate a ‘bzip2’ tar archive of the distribution.  bzip2 archives
+     are frequently smaller than gzipped archives.  By default, this
+     rule makes ‘bzip2’ use a compression option of ‘-9’.  To make it
+     use a different one, set the ‘BZIP2’ environment variable.  For
+     example, ‘make dist-bzip2 BZIP2=-7’.
+
+‘dist-lzip’
+     Generate an ‘lzip’ tar archive of the distribution.  ‘lzip’
+     archives are frequently smaller than ‘bzip2’-compressed archives.
+
+‘dist-xz’
+     Generate an ‘xz’ tar archive of the distribution.  ‘xz’ archives
+     are frequently smaller than ‘bzip2’-compressed archives.  By
+     default, this rule makes ‘xz’ use a compression option of ‘-e’.  To
+     make it use a different one, set the ‘XZ_OPT’ environment variable.
+     For example, run this command to use the default compression ratio,
+     but with a progress indicator: ‘make dist-xz XZ_OPT=-ve’.
+
+‘dist-zip’
+     Generate a ‘zip’ archive of the distribution.
+
+‘dist-tarZ’
+     Generate a tar archive of the distribution, compressed with the
+     historical (and obsolescent) program ‘compress’.  This option is
+     deprecated, and it and the corresponding functionality will be
+     removed altogether in Automake 2.0.
+
+‘dist-shar’
+     Generate a ‘shar’ archive of the distribution.  This format archive
+     is obsolescent, and use of this option is deprecated.  It and the
+     corresponding functionality will be removed altogether in Automake
+     2.0.
+
+   The rule ‘dist’ (and its historical synonym ‘dist-all’) will create
+archives in all the enabled formats (*note List of Automake options::
+for how to change this list).  By default, only the ‘dist-gzip’ target
+is hooked to ‘dist’.
 
 \1f
 File: automake.info,  Node: Tests,  Next: Rebuilding,  Prev: Dist,  Up: Top
@@ -201,23 +455,23 @@ File: automake.info,  Node: Tests,  Next: Rebuilding,  Prev: Dist,  Up: Top
 **************************
 
 Automake can generate code to handle two kinds of test suites.  One is
-based on integration with the `dejagnu' framework.  The other (and most
+based on integration with the ‘dejagnu’ framework.  The other (and most
 used) form is based on the use of generic test scripts, and its
-activation is triggered by the definition of the special `TESTS'
+activation is triggered by the definition of the special ‘TESTS’
 variable.  This second form allows for various degrees of sophistication
 and customization; in particular, it allows for concurrent execution of
 test scripts, use of established test protocols such as TAP, and
 definition of custom test drivers and test runners.
 
-In either case, the testsuite is invoked via `make check'.
+In either case, the testsuite is invoked via ‘make check’.
 
 * Menu:
 
 * Generalities about Testing::  Concepts and terminology about testing
-* Simple Tests::                Listing test scripts in `TESTS'
+* Simple Tests::                Listing test scripts in ‘TESTS’
 * Custom Test Drivers::         Writing and using custom test drivers
 * Using the TAP test protocol:: Integrating test scripts that use the TAP protocol
-* DejaGnu Tests::               Interfacing with the `dejagnu' testing framework
+* DejaGnu Tests::               Interfacing with the ‘dejagnu’ testing framework
 * Install Tests::               Running tests on installed packages
 
 \1f
@@ -234,7 +488,7 @@ not resurface).
    The minimal unit of testing is usually called _test case_, or simply
 _test_.  How a test case is defined or delimited, and even what exactly
 _constitutes_ a test case, depends heavily on the testing paradigm
-and/or framework in use, so we won't attempt any more precise
+and/or framework in use, so we wont attempt any more precise
 definition.  The set of the test cases for a given program or system
 constitutes its _testsuite_.
 
@@ -243,7 +497,7 @@ component that executes all (or part of) the defined test cases,
 analyzes their outcomes, and report or register these outcomes
 appropriately.  Again, the details of how this is accomplished (and how
 the developer and user can influence it or interface with it) varies
-wildly, and we'll attempt no precise definition.
+wildly, and well attempt no precise definition.
 
    A test is said to _pass_ when it can determine that the condition or
 behaviour it means to verify holds, and is said to _fail_ when it can
@@ -253,14 +507,14 @@ determine that such condition of behaviour does _not_ hold.
 simply make no sense on a given system (for example, a test checking a
 Windows-specific feature makes no sense on a GNU/Linux system).  In this
 case, accordingly to the definition above, the tests can neither be
-considered passed nor failed; instead, they are _skipped_ - i.e., they
+considered passed nor failed; instead, they are _skipped_  i.e., they
 are not run, or their result is anyway ignored for what concerns the
 count of failures an successes.  Skips are usually explicitly reported
-though, so that the user will be aware that not all of the testsuite
-has really run.
+though, so that the user will be aware that not all of the testsuite has
+really run.
 
-   It's not uncommon, especially during early development stages, that
-some tests fail for known reasons, and that the developer doesn't want
+   Its not uncommon, especially during early development stages, that
+some tests fail for known reasons, and that the developer doesnt want
 to tackle these failures immediately (this is especially true when the
 failing tests deal with corner cases).  In this situation, the better
 policy is to declare that each of those failures is an _expected
@@ -269,16 +523,13 @@ passing instead, many testing environments will flag the result as a
 special kind of failure called _unexpected pass_ (or _xpass_).
 
    Many testing environments and frameworks distinguish between test
-failures and hard errors.  As we've seen, a test failure happens when
+failures and hard errors.  As weve seen, a test failure happens when
 some invariant or expected behaviour of the software under test is not
 met.  An _hard error_ happens when e.g., the set-up of a test case
 scenario fails, or when some other unexpected or highly undesirable
 condition is encountered (for example, the program under test
 experiences a segmentation fault).
 
-   _TODO_: Links to other test harnesses (esp. those sharing our
-terminology)?
-
 \1f
 File: automake.info,  Node: Simple Tests,  Next: Custom Test Drivers,  Prev: Generalities about Testing,  Up: Tests
 
@@ -288,7 +539,7 @@ File: automake.info,  Node: Simple Tests,  Next: Custom Test Drivers,  Prev: Gen
 * Menu:
 
 * Scripts-based Testsuites::    Automake-specific concepts and terminology
-* Serial Test Harness::         Older (and obsolescent) serial test harness
+* Serial Test Harness::         Older (and discouraged) serial test harness
 * Parallel Test Harness::       Generic concurrent test harness
 
 \1f
@@ -297,57 +548,54 @@ File: automake.info,  Node: Scripts-based Testsuites,  Next: Serial Test Harness
 15.2.1 Scripts-based Testsuites
 -------------------------------
 
-If the special variable `TESTS' is defined, its value is taken to be a
+If the special variable ‘TESTS’ is defined, its value is taken to be a
 list of programs or scripts to run in order to do the testing.  Under
-the appropriate circumstances, it's possible for `TESTS' to list also
-data files to be passed to one or more test scripts defined by
-different means (the so-called "log compilers", *note Parallel Test
-Harness::).
+the appropriate circumstances, it’s possible for ‘TESTS’ to list also
+data files to be passed to one or more test scripts defined by different
+means (the so-called “log compilers”, *note Parallel Test Harness::).
 
    Test scripts can be executed serially or concurrently.  Automake
-supports both these kinds of test execution, with the serial test
-harness being the default (for backward-compatibility reasons only, as
-its use is nowadays discouraged).  The concurrent test harness relies
-on the concurrence capabilities (if any) offered by the underlying
-`make' implementation, and can thus only be as good as those are.
-
-   By default, only the exit statuses of the test scripts are
-considered when determining the testsuite outcome.  But Automake allows
-also the use of more complex test protocols, either standard (*note
-Using the TAP test protocol::) or custom (*note Custom Test Drivers::).
-Note that you can enable such protocols only when the parallel harness
-is used: they won't work with the serial test harness.  In the rest of
-this section we are going to concentrate mostly on protocol-less tests,
-since we cover test protocols in a later section (again, *note Custom
-Test Drivers::).
+supports both these kinds of test execution, with the parallel test
+harness being the default.  The concurrent test harness relies on the
+concurrence capabilities (if any) offered by the underlying ‘make’
+implementation, and can thus only be as good as those are.
+
+   By default, only the exit statuses of the test scripts are considered
+when determining the testsuite outcome.  But Automake allows also the
+use of more complex test protocols, either standard (*note Using the TAP
+test protocol::) or custom (*note Custom Test Drivers::).  Note that you
+can’t enable such protocols when the serial harness is used, though.  In
+the rest of this section we are going to concentrate mostly on
+protocol-less tests, since we cover test protocols in a later section
+(again, *note Custom Test Drivers::).
 
    When no test protocol is in use, an exit status of 0 from a test
 script will denote a success, an exit status of 77 a skipped test, an
-exit status of 99 an hard error, and any other exit status will denote
-failure.
+exit status of 99 an hard error, and any other exit status will denote a
+failure.
 
-   You may define the variable `XFAIL_TESTS' to a list of tests
-(usually a subset of `TESTS') that are expected to fail; this will
-effectively reverse the result of those tests (with the provision that
-skips and hard errors remain untouched).  You may also instruct the
-testsuite harness to treat hard errors like simple failures, by defining
-the `DISABLE_HARD_ERRORS' make variable to a nonempty value.
+   You may define the variable ‘XFAIL_TESTS’ to a list of tests (usually
+a subset of ‘TESTS’) that are expected to fail; this will effectively
+reverse the result of those tests (with the provision that skips and
+hard errors remain untouched).  You may also instruct the testsuite
+harness to treat hard errors like simple failures, by defining the
+‘DISABLE_HARD_ERRORS’ make variable to a nonempty value.
 
    Note however that, for tests based on more complex test protocols,
-the exact effects of `XFAIL_TESTS' and `DISABLE_HARD_ERRORS' might
+the exact effects of ‘XFAIL_TESTS’ and ‘DISABLE_HARD_ERRORS’ might
 change, or they might even have no effect at all (for example, in tests
 using TAP, there is not way to disable hard errors, and the
-`DISABLE_HARD_ERRORS' variable has no effect on them).
+‘DISABLE_HARD_ERRORS’ variable has no effect on them).
 
-   The result of each test case run by the scripts in `TESTS' will be
+   The result of each test case run by the scripts in ‘TESTS’ will be
 printed on standard output, along with the test name.  For test
 protocols that allow more test cases per test script (such as TAP), a
-number, identifier and/or brief description specific for the single
-test case is expected to be printed in addition to the name of the test
+number, identifier and/or brief description specific for the single test
+case is expected to be printed in addition to the name of the test
 script.  The possible results (whose meanings should be clear from the
-previous *note Generalities about Testing::) are `PASS', `FAIL',
-`SKIP', `XFAIL', `XPASS' and `ERROR'.  Here is an example of output
-from an hypothetical testsuite that uses both plain and TAP tests:
+previous *note Generalities about Testing::) are ‘PASS’, ‘FAIL’, ‘SKIP’,
+‘XFAIL’, ‘XPASS’ and ‘ERROR’.  Here is an example of output from an
+hypothetical testsuite that uses both plain and TAP tests:
      PASS: foo.sh
      PASS: zardoz.tap 1 - Daemon started
      PASS: zardoz.tap 2 - Daemon responding
@@ -361,46 +609,46 @@ A testsuite summary (expected to report at least the number of run,
 skipped and failed tests) will be printed at the end of the testsuite
 run.
 
-   If the Automake option `color-tests' is used (*note Options::) and
-standard output is connected to a capable terminal, then the test
-results and the summary are colored appropriately.  The user can disable
-colored output by setting the `make' variable `AM_COLOR_TESTS=no', or
-force colored output even without a connecting terminal with
-`AM_COLOR_TESTS=always'.  It's also worth noting that some `make'
-implementations, when used in parallel mode, have slightly different
-semantics (*note Parallel make: (autoconf)Parallel make.), which can
-break the automatic detection of a connection to a capable terminal.
-If this is the case, you'll have to resort to the use of
-`AM_COLOR_TESTS=always' in order to have the testsuite output colorized.
-
-   Test programs that need data files should look for them in `srcdir'
+   If the standard output is connected to a capable terminal, then the
+test results and the summary are colored appropriately.  The developer
+and the user can disable colored output by setting the ‘make’ variable
+‘AM_COLOR_TESTS=no’; the user can in addition force colored output even
+without a connecting terminal with ‘AM_COLOR_TESTS=always’.  It’s also
+worth noting that some ‘make’ implementations, when used in parallel
+mode, have slightly different semantics (*note (autoconf)Parallel
+make::), which can break the automatic detection of a connection to a
+capable terminal.  If this is the case, the user will have to resort to
+the use of ‘AM_COLOR_TESTS=always’ in order to have the testsuite output
+colorized.
+
+   Test programs that need data files should look for them in ‘srcdir’
 (which is both a make variable and an environment variable made
 available to the tests), so that they work when building in a separate
 directory (*note Build Directories: (autoconf)Build Directories.), and
-in particular for the `distcheck' rule (*note Checking the
+in particular for the ‘distcheck’ rule (*note Checking the
 Distribution::).
 
-   The `AM_TESTS_ENVIRONMENT' and `TESTS_ENVIRONMENT' variables can be
+   The ‘AM_TESTS_ENVIRONMENT’ and ‘TESTS_ENVIRONMENT’ variables can be
 used to run initialization code and set environment variables for the
 test scripts.  The former variable is developer-reserved, and can be
-defined in the `Makefile.am', while the latter is reserved for the
-user, which can employ it to extend or override the settings in the
-former; for this to work portably, however, the contents of a non-empty
-`AM_TESTS_ENVIRONMENT' _must_ be terminated by a semicolon.
+defined in the ‘Makefile.am’, while the latter is reserved for the user,
+which can employ it to extend or override the settings in the former;
+for this to work portably, however, the contents of a non-empty
+‘AM_TESTS_ENVIRONMENT’ _must_ be terminated by a semicolon.
 
-   The `AM_TESTS_FD_REDIRECT' variable can be used to define file
+   The ‘AM_TESTS_FD_REDIRECT’ variable can be used to define file
 descriptor redirections for the test scripts.  One might think that
-`AM_TESTS_ENVIRONMENT' could be used for this purpose, but experience
+‘AM_TESTS_ENVIRONMENT’ could be used for this purpose, but experience
 has shown that doing so portably is practically impossible.  The main
 hurdle is constituted by Korn shells, which usually set the
-close-on-exec flag on file descriptors opened with the `exec' builtin,
-thus rendering an idiom like `AM_TESTS_ENVIRONMENT = exec 9>&2;'
+close-on-exec flag on file descriptors opened with the ‘exec’ builtin,
+thus rendering an idiom like ‘AM_TESTS_ENVIRONMENT = exec 9>&2;’
 ineffectual.  This issue also affects some Bourne shells, such as the
-HP-UX's `/bin/sh',
+HP-UX’s ‘/bin/sh’,
 
      AM_TESTS_ENVIRONMENT = \
      ## Some environment initializations are kept in a separate shell
-     ## file `tests-env.sh', which can make it easier to also run tests
+     ## file 'tests-env.sh', which can make it easier to also run tests
      ## from the command line.
        . $(srcdir)/tests-env.sh; \
      ## On Solaris, prefer more POSIX-compliant versions of the standard
@@ -414,62 +662,63 @@ HP-UX's `/bin/sh',
      ## before executing them.
      AM_TESTS_FD_REDIRECT = 9>&2
 
-Note however that `AM_TESTS_ENVIRONMENT' is, for historical and
+Note however that ‘AM_TESTS_ENVIRONMENT’ is, for historical and
 implementation reasons, _not_ supported by the serial harness (*note
 Serial Test Harness::).
 
-   Automake ensures that each file listed in `TESTS' is built before it
+   Automake ensures that each file listed in ‘TESTS’ is built before it
 is run; you can list both source and derived programs (or scripts) in
-`TESTS'; the generated rule will look both in `srcdir' and `.'.  For
+‘TESTS’; the generated rule will look both in ‘srcdir’ and ‘.’.  For
 instance, you might want to run a C program as a test.  To do this you
-would list its name in `TESTS' and also in `check_PROGRAMS', and then
+would list its name in ‘TESTS’ and also in ‘check_PROGRAMS’, and then
 specify it as you would any other program.
 
-   Programs listed in `check_PROGRAMS' (and `check_LIBRARIES',
-`check_LTLIBRARIES'...) are only built during `make check', not during
-`make all'.  You should list there any program needed by your tests
-that does not need to be built by `make all'.  Note that
-`check_PROGRAMS' are _not_ automatically added to `TESTS' because
-`check_PROGRAMS' usually lists programs used by the tests, not the
-tests themselves.  Of course you can set `TESTS = $(check_PROGRAMS)' if
-all your programs are test cases.
+   Programs listed in ‘check_PROGRAMS’ (and ‘check_LIBRARIES’,
+‘check_LTLIBRARIES’...)  are only built during ‘make check’, not during
+‘make all’.  You should list there any program needed by your tests that
+does not need to be built by ‘make all’.  Note that ‘check_PROGRAMS’ are
+_not_ automatically added to ‘TESTS’ because ‘check_PROGRAMS’ usually
+lists programs used by the tests, not the tests themselves.  Of course
+you can set ‘TESTS = $(check_PROGRAMS)’ if all your programs are test
+cases.
 
 \1f
 File: automake.info,  Node: Serial Test Harness,  Next: Parallel Test Harness,  Prev: Scripts-based Testsuites,  Up: Simple Tests
 
-15.2.2 Serial Test Harness
---------------------------
+15.2.2 Older (and discouraged) serial test harness
+--------------------------------------------------
 
-_NOTE:_ This harness, while still being the default one, is
-obsolescent, and kept mostly for backward-compatibility reasons.  The
-user is advised to use the parallel test harness instead (*note
-Parallel Test Harness::).  Be warned that future Automake versions
-might switch to use that more modern and feature-rich harness by
-default.
+First, note that today the use of this harness is strongly discouraged
+in favour of the parallel test harness (*note Parallel Test Harness::).
+Still, there are _few_ situations when the advantages offered by the
+parallel harness are irrelevant, and when test concurrency can even
+cause tricky problems.  In those cases, it might make sense to still use
+the serial harness, for simplicity and reliability (we still suggest
+trying to give the parallel harness a shot though).
 
    The serial test harness is enabled by the Automake option
-`serial-tests'. It operates by simply running the tests serially, one
-at the time, without any I/O redirection.  It's up to the user to
-implement logging of tests' output, if that's requited or desired.
-
-   For historical and implementation reasons, the `AM_TESTS_ENVIRONMENT'
-variable is _not_ supported by this harness (it will be silently
-ignored if defined); only `TESTS_ENVIRONMENT' is, and it is to be
-considered a developer-reserved variable.  This is done so that, when
-using the serial harness, `TESTS_ENVIRONMENT' can be defined to an
-invocation of an interpreter through which the tests are to be run.
-For instance, the following setup may be used to run tests with Perl:
+‘serial-tests’.  It operates by simply running the tests serially, one
+at the time, without any I/O redirection.  Its up to the user to
+implement logging of tests’ output, if that’s required or desired.
+
+   For historical and implementation reasons, the ‘AM_TESTS_ENVIRONMENT’
+variable is _not_ supported by this harness (it will be silently ignored
+if defined); only ‘TESTS_ENVIRONMENT’ is, and it is to be considered a
+developer-reserved variable.  This is done so that, when using the
+serial harness, ‘TESTS_ENVIRONMENT’ can be defined to an invocation of
+an interpreter through which the tests are to be run.  For instance, the
+following setup may be used to run tests with Perl:
 
      TESTS_ENVIRONMENT = $(PERL) -Mstrict -w
      TESTS = foo.pl bar.pl baz.pl
 
-It's important to note that the use of `TESTS_ENVIRONMENT' endorsed
-here would be _invalid_ with the parallel harness.  That harness
-provides a more elegant way to achieve the same effect, with the further
-benefit of freeing the `TESTS_ENVIRONMENT' variable for the user (*note
-Parallel Test Harness::).
+It’s important to note that the use of ‘TESTS_ENVIRONMENT’ endorsed here
+would be _invalid_ with the parallel harness.  That harness provides a
+more elegant way to achieve the same effect, with the further benefit of
+freeing the ‘TESTS_ENVIRONMENT’ variable for the user (*note Parallel
+Test Harness::).
 
-   Another, less serious limit of the serial harness is that it doesn't
+   Another, less serious limit of the serial harness is that it doesnt
 really distinguish between simple failures and hard errors; this is due
 to historical reasons only, and might be fixed in future Automake
 versions.
@@ -480,58 +729,58 @@ File: automake.info,  Node: Parallel Test Harness,  Prev: Serial Test Harness,
 15.2.3 Parallel Test Harness
 ----------------------------
 
-The parallel (or concurrent) test harness is enabled by the Automake
-option `parallel-tests'.  It features automatic collection of the test
-scripts output in `.log' files, concurrent execution of tests with
-`make -j', specification of inter-test dependencies, lazy reruns of
-tests that have not completed in a prior run, and hard errors for
-exceptional failures.
-
-   This harness is still somewhat experimental and may undergo changes
-in order to satisfy additional portability requirements.
-
-   The parallel test harness operates by defining a set of `make' rules
-that run the test scripts listed in `TESTS', and, for each such script,
-save its output in a corresponding `.log' file and its results (and
-other "metadata", *note API for Custom Test Drivers::) in a
-corresponding `.trs' (as in Test ReSults) file.  The `.log' file will
+By default, Automake generated a parallel (concurrent) test harness.  It
+features automatic collection of the test scripts output in ‘.log’
+files, concurrent execution of tests with ‘make -j’, specification of
+inter-test dependencies, lazy reruns of tests that have not completed in
+a prior run, and hard errors for exceptional failures.
+
+   The parallel test harness operates by defining a set of ‘make’ rules
+that run the test scripts listed in ‘TESTS’, and, for each such script,
+save its output in a corresponding ‘.log’ file and its results (and
+other “metadata”, *note API for Custom Test Drivers::) in a
+corresponding ‘.trs’ (as in Test ReSults) file.  The ‘.log’ file will
 contain all the output emitted by the test on its standard output and
-its standard error.  The `.trs' file will contain, among the other
+its standard error.  The ‘.trs’ file will contain, among the other
 things, the results of the test cases run by the script.
 
    The parallel test harness will also create a summary log file,
-`TEST_SUITE_LOG', which defaults to `test-suite.log' and requires a
-`.log' suffix.  This file depends upon all the `.log' and `.trs' files
-created for the test scripts listed in `TESTS'.
+‘TEST_SUITE_LOG’, which defaults to ‘test-suite.log’ and requires a
+‘.log’ suffix.  This file depends upon all the ‘.log’ and ‘.trs’ files
+created for the test scripts listed in ‘TESTS’.
 
    As with the serial harness above, by default one status line is
 printed per completed test, and a short summary after the suite has
 completed.  However, standard output and standard error of the test are
 redirected to a per-test log file, so that parallel execution does not
 produce intermingled output.  The output from failed tests is collected
-in the `test-suite.log' file.  If the variable `VERBOSE' is set, this
-file is output after the summary.  For best results, the tests should
-be verbose by default now.
+in the ‘test-suite.log’ file.  If the variable ‘VERBOSE’ is set, this
+file is output after the summary.
 
-   Each couple of `.log' and `.trs' files is created when the
-corresponding test has completed.  The set of log files is listed in
-the read-only variable `TEST_LOGS', and defaults to `TESTS', with the
+   Each couple of ‘.log’ and ‘.trs’ files is created when the
+corresponding test has completed.  The set of log files is listed in the
+read-only variable ‘TEST_LOGS’, and defaults to ‘TESTS’, with the
 executable extension if any (*note EXEEXT::), as well as any suffix
-listed in `TEST_EXTENSIONS' removed, and `.log' appended.  Results are
+listed in ‘TEST_EXTENSIONS’ removed, and ‘.log’ appended.  Results are
 undefined if a test file name ends in several concatenated suffixes.
-`TEST_EXTENSIONS' defaults to `.test'; it can be overridden by the
-user, in which case any extension listed in it must be constituted by a
-dot, followed by a non-digit alphabetic character, followed by any
-number of alphabetic characters.  For example, `.sh', `.T' and `.t1'
-are valid extensions, while `.x-y', `.6c' and `.t.1' are not.
-
-   For tests that match an extension `.EXT' listed in
-`TEST_EXTENSIONS', you can provide a custom "test runner" using the
-variable `EXT_LOG_COMPILER' (note the upper-case extension) and pass
-options in `AM_EXT_LOG_FLAGS' and allow the user to pass options in
-`EXT_LOG_FLAGS'.  It will cause all tests with this extension to be
+‘TEST_EXTENSIONS’ defaults to ‘.test’; it can be overridden by the user,
+in which case any extension listed in it must be constituted by a dot,
+followed by a non-digit alphabetic character, followed by any number of
+alphabetic characters.  For example, ‘.sh’, ‘.T’ and ‘.t1’ are valid
+extensions, while ‘.x-y’, ‘.6c’ and ‘.t.1’ are not.
+
+   It is important to note that, due to current limitations (unlikely to
+be lifted), configure substitutions in the definition of ‘TESTS’ can
+only work if they will expand to a list of tests that have a suffix
+listed in ‘TEST_EXTENSIONS’.
+
+   For tests that match an extension ‘.EXT’ listed in ‘TEST_EXTENSIONS’,
+you can provide a custom “test runner” using the variable
+‘EXT_LOG_COMPILER’ (note the upper-case extension) and pass options in
+‘AM_EXT_LOG_FLAGS’ and allow the user to pass options in
+‘EXT_LOG_FLAGS’.  It will cause all tests with this extension to be
 called with this runner.  For all tests without a registered extension,
-the variables `LOG_COMPILER', `AM_LOG_FLAGS', and `LOG_FLAGS' may be
+the variables ‘LOG_COMPILER’, ‘AM_LOG_FLAGS’, and ‘LOG_FLAGS’ may be
 used.  For example,
 
      TESTS = foo.pl bar.py baz
@@ -543,16 +792,16 @@ used.  For example,
      LOG_COMPILER = ./wrapper-script
      AM_LOG_FLAGS = -d
 
-will invoke `$(PERL) -w foo.pl', `$(PYTHON) -v bar.py', and
-`./wrapper-script -d baz' to produce `foo.log', `bar.log', and
-`baz.log', respectively.  The `foo.trs', `bar.trs' and `baz.trs' files
+will invoke ‘$(PERL) -w foo.pl’, ‘$(PYTHON) -v bar.py’, and
+‘./wrapper-script -d baz’ to produce ‘foo.log’, ‘bar.log’, and
+‘baz.log’, respectively.  The ‘foo.trs’, ‘bar.trs’ and ‘baz.trs’ files
 will be automatically produced as a side-effect.
 
-   It's important to note that, differently from what we've seen for the
-serial test harness (*note Parallel Test Harness::), the
-`AM_TESTS_ENVIRONMENT' and `TESTS_ENVIRONMENT' variables _cannot_ be
-use to define a custom test runner; the `LOG_COMPILER' and `LOG_FLAGS'
-(or their extension-specific counterparts) should be used instead:
+   It’s important to note that, differently from what we’ve seen for the
+serial test harness (*note Serial Test Harness::), the
+‘AM_TESTS_ENVIRONMENT’ and ‘TESTS_ENVIRONMENT’ variables _cannot_ be use
+to define a custom test runner; the ‘LOG_COMPILER’ and ‘LOG_FLAGS’ (or
+their extension-specific counterparts) should be used instead:
 
      ## This is WRONG!
      AM_TESTS_ENVIRONMENT = PERL5LIB='$(srcdir)/lib' $(PERL) -Mstrict -w
@@ -565,95 +814,93 @@ use to define a custom test runner; the `LOG_COMPILER' and `LOG_FLAGS'
    By default, the test suite harness will run all tests, but there are
 several ways to limit the set of tests that are run:
 
-   * You can set the `TESTS' variable.  For example, you can use a
+   • You can set the ‘TESTS’ variable.  For example, you can use a
      command like this to run only a subset of the tests:
 
           env TESTS="foo.test bar.test" make -e check
 
      Note however that the command above will unconditionally overwrite
-     the `test-suite.log' file, thus clobbering the recorded results of
+     the ‘test-suite.log’ file, thus clobbering the recorded results of
      any previous testsuite run.  This might be undesirable for packages
      whose testsuite takes long time to execute.  Luckily, this problem
-     can easily be avoided by overriding also `TEST_SUITE_LOG' at
+     can easily be avoided by overriding also ‘TEST_SUITE_LOG’ at
      runtime; for example,
 
           env TEST_SUITE_LOG=partial.log TESTS="..." make -e check
 
      will write the result of the partial testsuite runs to the
-     `partial.log', without touching `test-suite.log'.
+     ‘partial.log’, without touching ‘test-suite.log’.
 
-   * You can set the `TEST_LOGS' variable.  By default, this variable is
-     computed at `make' run time from the value of `TESTS' as described
+   • You can set the ‘TEST_LOGS’ variable.  By default, this variable is
+     computed at ‘make’ run time from the value of ‘TESTS’ as described
      above.  For example, you can use the following:
 
           set x subset*.log; shift
           env TEST_LOGS="foo.log $*" make -e check
 
-     The comments made above about `TEST_SUITE_LOG' overriding applies
+     The comments made above about ‘TEST_SUITE_LOG’ overriding applies
      here too.
 
-   * By default, the test harness removes all old per-test `.log' and
-     `.trs' files before it starts running tests to regenerate them.
-     The variable `RECHECK_LOGS' contains the set of `.log' (and, by
-     implication, `.trs') files which are removed.  `RECHECK_LOGS'
-     defaults to `TEST_LOGS', which means all tests need to be
-     rechecked.  By overriding this variable, you can choose which
-     tests need to be reconsidered.  For example, you can lazily rerun
-     only those tests which are outdated, i.e., older than their
-     prerequisite test files, by setting this variable to the empty
-     value:
+   • By default, the test harness removes all old per-test ‘.log’ and
+     ‘.trs’ files before it starts running tests to regenerate them.
+     The variable ‘RECHECK_LOGS’ contains the set of ‘.log’ (and, by
+     implication, ‘.trs’) files which are removed.  ‘RECHECK_LOGS’
+     defaults to ‘TEST_LOGS’, which means all tests need to be
+     rechecked.  By overriding this variable, you can choose which tests
+     need to be reconsidered.  For example, you can lazily rerun only
+     those tests which are outdated, i.e., older than their prerequisite
+     test files, by setting this variable to the empty value:
 
           env RECHECK_LOGS= make -e check
 
-   * You can ensure that all tests are rerun which have failed or passed
-     unexpectedly, by running `make recheck' in the test directory.
-     This convenience target will set `RECHECK_LOGS' appropriately
+    You can ensure that all tests are rerun which have failed or passed
+     unexpectedly, by running ‘make recheck’ in the test directory.
+     This convenience target will set ‘RECHECK_LOGS’ appropriately
      before invoking the main test harness.
 
-In order to guarantee an ordering between tests even with `make -jN',
-dependencies between the corresponding `.log' files may be specified
-through usual `make' dependencies.  For example, the following snippet
-lets the test named `foo-execute.test' depend upon completion of the
-test `foo-compile.test':
+In order to guarantee an ordering between tests even with ‘make -jN’,
+dependencies between the corresponding ‘.log’ files may be specified
+through usual ‘make’ dependencies.  For example, the following snippet
+lets the test named ‘foo-execute.test’ depend upon completion of the
+test ‘foo-compile.test’:
 
      TESTS = foo-compile.test foo-execute.test
      foo-execute.log: foo-compile.log
 
 Please note that this ordering ignores the _results_ of required tests,
-thus the test `foo-execute.test' is run even if the test
-`foo-compile.test' failed or was skipped beforehand.  Further, please
+thus the test ‘foo-execute.test’ is run even if the test
+‘foo-compile.test’ failed or was skipped beforehand.  Further, please
 note that specifying such dependencies currently works only for tests
-that end in one of the suffixes listed in `TEST_EXTENSIONS'.
+that end in one of the suffixes listed in ‘TEST_EXTENSIONS’.
 
    Tests without such specified dependencies may be run concurrently
-with parallel `make -jN', so be sure they are prepared for concurrent
+with parallel ‘make -jN’, so be sure they are prepared for concurrent
 execution.
 
    The combination of lazy test execution and correct dependencies
 between tests and their sources may be exploited for efficient unit
 testing during development.  To further speed up the edit-compile-test
 cycle, it may even be useful to specify compiled programs in
-`EXTRA_PROGRAMS' instead of with `check_PROGRAMS', as the former allows
+‘EXTRA_PROGRAMS’ instead of with ‘check_PROGRAMS’, as the former allows
 intertwined compilation and test execution (but note that
-`EXTRA_PROGRAMS' are not cleaned automatically, *note Uniform::).
+‘EXTRA_PROGRAMS’ are not cleaned automatically, *note Uniform::).
 
-   The variables `TESTS' and `XFAIL_TESTS' may contain conditional
-parts as well as configure substitutions.  In the latter case, however,
+   The variables ‘TESTS’ and ‘XFAIL_TESTS’ may contain conditional parts
+as well as configure substitutions.  In the latter case, however,
 certain restrictions apply: substituted test names must end with a
-nonempty test suffix like `.test', so that one of the inference rules
-generated by `automake' can apply.  For literal test names, `automake'
+nonempty test suffix like ‘.test’, so that one of the inference rules
+generated by ‘automake’ can apply.  For literal test names, ‘automake’
 can generate per-target rules to avoid this limitation.
 
-   Please note that it is currently not possible to use `$(srcdir)/' or
-`$(top_srcdir)/' in the `TESTS' variable.  This technical limitation is
+   Please note that it is currently not possible to use ‘$(srcdir)/’ or
+‘$(top_srcdir)/’ in the ‘TESTS’ variable.  This technical limitation is
 necessary to avoid generating test logs in the source tree and has the
 unfortunate consequence that it is not possible to specify distributed
-tests that are themselves generated by means of explicit rules, in a
-way that is portable to all `make' implementations (*note Make Target
-Lookup: (autoconf)Make Target Lookup, the semantics of FreeBSD and
-OpenBSD `make' conflict with this).  In case of doubt you may want to
-require to use GNU `make', or work around the issue with inference
-rules to generate the tests.
+tests that are themselves generated by means of explicit rules, in a way
+that is portable to all ‘make’ implementations (*note (autoconf)Make
+Target Lookup::, the semantics of FreeBSD and OpenBSD ‘make’ conflict
+with this).  In case of doubt you may want to require to use GNU ‘make’,
+or work around the issue with inference rules to generate the tests.
 
 \1f
 File: automake.info,  Node: Custom Test Drivers,  Next: Using the TAP test protocol,  Prev: Simple Tests,  Up: Tests
@@ -680,58 +927,49 @@ testing protocol of choice.
 
    A custom test driver is expected to properly run the test programs
 passed to it (including the command-line arguments passed to those
-programs, if any), to analyze their execution and outcome, to create
-the `.log' and `.trs' files associated to these test runs, and to
-display the test results on the console. It is responsibility of the
-author of the test driver to ensure that it implements all the above
-steps meaningfully and correctly; Automake isn't and can't be of any
-help here.  On the other hand, the Automake-provided code for testsuite
-summary generation offers support for test drivers allowing several
-test results per test script, if they take care to register such
-results properly (*note Log files generation and test results
-recording::).
-
-   The exact details of how test scripts' results are to be determined
+programs, if any), to analyze their execution and outcome, to create the
+‘.log’ and ‘.trs’ files associated to these test runs, and to display
+the test results on the console.  It is responsibility of the author of
+the test driver to ensure that it implements all the above steps
+meaningfully and correctly; Automake isn’t and can’t be of any help
+here.  On the other hand, the Automake-provided code for testsuite
+summary generation offers support for test drivers allowing several test
+results per test script, if they take care to register such results
+properly (*note Log files generation and test results recording::).
+
+   The exact details of how test scripts’ results are to be determined
 and analyzed is left to the individual drivers.  Some drivers might only
 consider the test script exit status (this is done for example by the
 default test driver used by the parallel test harness, described in the
 previous section).  Other drivers might implement more complex and
 advanced test protocols, which might require them to parse and
-interpreter the output emitted by the test script they're running
+interpreter the output emitted by the test script theyre running
 (examples of such protocols are TAP and SubUnit).
 
-   It's very important to note that, even when using custom test
+   Its very important to note that, even when using custom test
 drivers, most of the infrastructure described in the previous section
 about the parallel harness remains in place; this includes:
 
-   * list of test scripts defined in `TESTS', and overridable at
-     runtime through the redefinition of `TESTS' or `TEST_LOGS';
-
-   * concurrency through the use of `make''s option `-j';
-
-   * per-test `.log' and `.trs' files, and generation of a summary
-     `.log' file from them;
-
-   * `recheck' target, `RECHECK_LOGS' variable, and lazy reruns of
+   • list of test scripts defined in ‘TESTS’, and overridable at runtime
+     through the redefinition of ‘TESTS’ or ‘TEST_LOGS’;
+   • concurrency through the use of ‘make’’s option ‘-j’;
+   • per-test ‘.log’ and ‘.trs’ files, and generation of a summary
+     ‘.log’ file from them;
+   • ‘recheck’ target, ‘RECHECK_LOGS’ variable, and lazy reruns of
      tests;
-
-   * inter-test dependencies;
-
-   * support for `check_*' variables (`check_PROGRAMS',
-     `check_LIBRARIES', ...);
-
-   * use of `VERBOSE' environment variable to get verbose output on
+   • inter-test dependencies;
+   • support for ‘check_*’ variables (‘check_PROGRAMS’,
+     ‘check_LIBRARIES’, ...);
+   • use of ‘VERBOSE’ environment variable to get verbose output on
      testsuite failures;
+   • definition and honoring of ‘TESTS_ENVIRONMENT’,
+     ‘AM_TESTS_ENVIRONMENT’ and ‘AM_TESTS_FD_REDIRECT’ variables;
+   • definition of generic and extension-specific ‘LOG_COMPILER’ and
+     ‘LOG_FLAGS’ variables.
 
-   * definition and honoring of `TESTS_ENVIRONMENT',
-     `AM_TESTS_ENVIRONMENT' and `AM_TESTS_FD_REDIRECT' variables;
-
-   * definition of generic and extension-specific `LOG_COMPILER' and
-     `LOG_FLAGS' variables.
-
-On the other hand, the exact semantics of how (and if) `color-tests',
-`XFAIL_TESTS', and hard errors are supported and handled is left to the
-individual test drivers.
+On the other hand, the exact semantics of how (and if) testsuite output
+colorization, ‘XFAIL_TESTS’, and hard errors are supported and handled
+is left to the individual test drivers.
 
 \1f
 File: automake.info,  Node: Declaring Custom Test Drivers,  Next: API for Custom Test Drivers,  Prev: Overview of Custom Test Drivers Support,  Up: Custom Test Drivers
@@ -740,24 +978,24 @@ File: automake.info,  Node: Declaring Custom Test Drivers,  Next: API for Custom
 ------------------------------------
 
 Custom testsuite drivers are declared by defining the make variables
-`LOG_DRIVER' or `EXT_LOG_DRIVER' (where EXT must be declared in
-`TEST_EXTENSIONS').  They must be defined to programs or scripts that
+‘LOG_DRIVER’ or ‘EXT_LOG_DRIVER’ (where EXT must be declared in
+‘TEST_EXTENSIONS’).  They must be defined to programs or scripts that
 will be used to drive the execution, logging, and outcome report of the
 tests with corresponding extensions (or of those with no registered
-extension in the case of `LOG_DRIVER').  Clearly, multiple distinct
-test drivers can be declared in the same `Makefile.am'.  Note moreover
-that the `LOG_DRIVER' variables are _not_ a substitute for the
-`LOG_COMPILER' variables: the two sets of variables can, and often do,
-usefully and legitimately coexist.
-
-   The developer-reserved variable `AM_LOG_DRIVER_FLAGS' and the
-user-reserved variable `LOG_DRIVER_FLAGS' can be used to define flags
-that will be passed to each invocation of `LOG_DRIVER', with the
+extension in the case of ‘LOG_DRIVER’).  Clearly, multiple distinct test
+drivers can be declared in the same ‘Makefile.am’.  Note moreover that
+the ‘LOG_DRIVER’ variables are _not_ a substitute for the ‘LOG_COMPILER’
+variables: the two sets of variables can, and often do, usefully and
+legitimately coexist.
+
+   The developer-reserved variable ‘AM_LOG_DRIVER_FLAGS’ and the
+user-reserved variable ‘LOG_DRIVER_FLAGS’ can be used to define flags
+that will be passed to each invocation of ‘LOG_DRIVER’, with the
 user-defined flags obviously taking precedence over the
 developer-reserved ones.  Similarly, for each extension EXT declared in
-`TEST_EXTENSIONS', flags listed in `AM_EXT_LOG_DRIVER_FLAGS' and
-`EXT_LOG_DRIVER_FLAGS' will be passed to invocations of
-`EXT_LOG_DRIVER'.
+‘TEST_EXTENSIONS’, flags listed in ‘AM_EXT_LOG_DRIVER_FLAGS’ and
+‘EXT_LOG_DRIVER_FLAGS’ will be passed to invocations of
+‘EXT_LOG_DRIVER’.
 
 \1f
 File: automake.info,  Node: API for Custom Test Drivers,  Prev: Declaring Custom Test Drivers,  Up: Custom Test Drivers
@@ -787,60 +1025,52 @@ File: automake.info,  Node: Command-line arguments for test drivers,  Next: Log
 ................................................
 
 A custom driver can rely on various command-line options and arguments
-being passed to it automatically by the Automake's `parallel-tests'
-harness.  It is _mandatory_ that it understands all of them (even if
-the exact interpretation of the associated semantics can legitimately
-change between a test driver and another, and even be a no-op in some
-drivers).
+being passed to it automatically by the Automake-generated test harness.
+It is _mandatory_ that it understands all of them (even if the exact
+interpretation of the associated semantics can legitimately change
+between a test driver and another, and even be a no-op in some drivers).
 
 Here is the list of options:
 
-`--test-name=NAME'
-     The name of the test, with VPATH prefix (if any) removed.  This
-     can have a suffix and a directory component (as in e.g.,
-     `sub/foo.test'), and is mostly meant to be used in console reports
+‘--test-name=NAME’
+     The name of the test, with VPATH prefix (if any) removed.  This can
+     have a suffix and a directory component (as in e.g.,
+     ‘sub/foo.test’), and is mostly meant to be used in console reports
      about testsuite advancements and results (*note Testsuite progress
      output::).
-
-`--log-file=`PATH.log''
-     The `.log' file the test driver must create (*note Basics of test
+‘--log-file=PATH.log’
+     The ‘.log’ file the test driver must create (*note Basics of test
      metadata::).  If it has a directory component (as in e.g.,
-     `sub/foo.log'), the test harness will ensure that such directory
+     ‘sub/foo.log’), the test harness will ensure that such directory
      exists _before_ the test driver is called.
-
-`--trs-file=`PATH.trs''
-     The `.trs' file the test driver must create (*note Basics of test
+‘--trs-file=PATH.trs’
+     The ‘.trs’ file the test driver must create (*note Basics of test
      metadata::).  If it has a directory component (as in e.g.,
-     `sub/foo.trs'), the test harness will ensure that such directory
+     ‘sub/foo.trs’), the test harness will ensure that such directory
      exists _before_ the test driver is called.
-
-`--color-tests={yes|no}'
-     Whether the console output should be colorized or not (*note
-     Simple tests and color-tests::, to learn when this option gets
-     activated and when it doesn't).
-
-`--expect-failure={yes|no}'
+‘--color-tests={yes|no}’
+     Whether the console output should be colorized or not (*note Simple
+     tests and color-tests::, to learn when this option gets activated
+     and when it doesn’t).
+‘--expect-failure={yes|no}’
      Whether the tested program is expected to fail.
-
-`--enable-hard-errors={yes|no}'
-     Whether "hard errors" in the tested program should be treated
+‘--enable-hard-errors={yes|no}’
+     Whether “hard errors” in the tested program should be treated
      differently from normal failures or not (the default should be
-     `yes').  The exact meaning of "hard error" is highly dependent
-     from the test protocols or conventions in use.
-
-`--'
+     ‘yes’).  The exact meaning of “hard error” is highly dependent from
+     the test protocols or conventions in use.
+‘--’
      Explicitly terminate the list of options.
 
 The first non-option argument passed to the test driver is the program
 to be run, and all the following ones are command-line options and
 arguments for this program.
 
-   Note that the exact semantics attached to the `--color-tests',
-`--expect-failure' and `--enable-hard-errors' options are left up to
-the individual test drivers.  Still, having a behaviour compatible or
-at least similar to that provided by the default `parallel-tests'
-driver is advised, as that would offer a better consistency and a more
-pleasant user experience.
+   Note that the exact semantics attached to the ‘--color-tests’,
+‘--expect-failure’ and ‘--enable-hard-errors’ options are left up to the
+individual test drivers.  Still, having a behaviour compatible or at
+least similar to that provided by the default driver is advised, as that
+would offer a better consistency and a more pleasant user experience.
 
 \1f
 File: automake.info,  Node: Log files generation and test results recording,  Next: Testsuite progress output,  Prev: Command-line arguments for test drivers,  Up: API for Custom Test Drivers
@@ -849,65 +1079,65 @@ File: automake.info,  Node: Log files generation and test results recording,  Ne
 ........................................................
 
 The test driver must correctly generate the files specified by the
-`--log-file' and `--trs-file' option (even when the tested program
-fails or crashes).
+‘--log-file’ and ‘--trs-file’ option (even when the tested program fails
+or crashes).
 
-   The `.log' file should ideally contain all the output produced by the
+   The ‘.log’ file should ideally contain all the output produced by the
 tested program, plus optionally other information that might facilitate
 debugging or analysis of bug reports.  Apart from that, its format is
 basically free.
 
-   The `.trs' file is used to register some metadata through the use of
+   The ‘.trs’ file is used to register some metadata through the use of
 custom reStructuredText fields.  This metadata is expected to be
 employed in various ways by the parallel test harness; for example, to
 count the test results when printing the testsuite summary, or to decide
-which tests to re-run upon `make reheck'.  Unrecognized metadata in a
-`.trs' file is currently ignored by the harness, but this might change
-in the future. The list of currently recognized metadata follows.
+which tests to re-run upon ‘make recheck’.  Unrecognized metadata in a
+‘.trs’ file is currently ignored by the harness, but this might change
+in the future.  The list of currently recognized metadata follows.
 
-`:test-result:'
+‘:test-result:’
      The test driver must use this field to register the results of
      _each_ test case run by a test script file.  Several
-     `:test-result:' fields can be present in the same `.trs' file;
-     this is done in order to support test protocols that allow a
-     single test script to run more test cases.
+     ‘:test-result:’ fields can be present in the same ‘.trs’ file; this
+     is done in order to support test protocols that allow a single test
+     script to run more test cases.
 
-     The only recognized test results are currently `PASS', `XFAIL',
-     `SKIP', `FAIL', `XPASS' and `ERROR'.  These results, when declared
-     with `:test-result:', can be optionally followed by text holding
+     The only recognized test results are currently ‘PASS’, ‘XFAIL’,
+     ‘SKIP’, ‘FAIL’, ‘XPASS’ and ‘ERROR’.  These results, when declared
+     with ‘:test-result:’, can be optionally followed by text holding
      the name and/or a brief description of the corresponding test; the
-     `parallel-tests' harness will ignore such extra text when
-     generating `test-suite.log' and preparing the testsuite summary.
-
-``:recheck:''
-     If this field is present and defined to `no', then the
-     corresponding test script will _not_ be run upon a `make recheck'.
-     What happens when two or more `:recheck:' fields are present in
-     the same `.trs' file is undefined behaviour.
-
-``:copy-in-global-log:''
-     If this field is present and defined to `no', then the content of
-     the `.log' file will _not_ be copied into the global
-     `test-suite.log'.  We allow to forsake such copying because, while
+     harness will ignore such extra text when generating
+     ‘test-suite.log’ and preparing the testsuite summary.
+
+‘:recheck:’
+     If this field is present and defined to ‘no’, then the
+     corresponding test script will _not_ be run upon a ‘make recheck’.
+     What happens when two or more ‘:recheck:’ fields are present in the
+     same ‘.trs’ file is undefined behaviour.
+
+‘:copy-in-global-log:’
+     If this field is present and defined to ‘no’, then the content of
+     the ‘.log’ file will _not_ be copied into the global
+     ‘test-suite.log’.  We allow to forsake such copying because, while
      it can be useful in debugging and analysis of bug report, it can
      also be just a waste of space in normal situations, e.g., when a
      test script is successful.  What happens when two or more
-     `:copy-in-global-log:' fields are present in the same `.trs' file
+     ‘:copy-in-global-log:’ fields are present in the same ‘.trs’ file
      is undefined behaviour.
 
-``:test-global-result:''
+‘:test-global-result:’
      This is used to declare the "global result" of the script.
      Currently, the value of this field is needed only to be reported
      (more or less verbatim) in the generated global log file
-     `$(TEST_SUITE_LOG)', so it's quite free-form.  For example, a test
+     ‘$(TEST_SUITE_LOG)’, so it’s quite free-form.  For example, a test
      script which run 10 test cases, 6 of which pass and 4 of which are
-     skipped, could reasonably have a `PASS/SKIP' value for this field,
+     skipped, could reasonably have a ‘PASS/SKIP’ value for this field,
      while a test script which run 19 successful tests and one failed
-     test could have an `ALMOST PASSED' value.  What happens when two
-     or more `:test-global-result:' fields are present in the same
-     `.trs' file is undefined behaviour.
+     test could have an ‘ALMOST PASSED’ value.  What happens when two or
+     more ‘:test-global-result:’ fields are present in the same ‘.trs’
+     file is undefined behaviour.
 
-Let's see a small example.  Assume a `.trs' file contains the following
+Let’s see a small example.  Assume a ‘.trs’ file contains the following
 lines:
 
      :test-result: PASS server starts
@@ -918,11 +1148,11 @@ lines:
      :test-result: SKIP HTTPS request (TLS library wasn't available)
      :test-result: PASS server stops
 
-Then the corresponding test script will be re-run by `make check', will
+Then the corresponding test script will be re-run by ‘make check’, will
 contribute with _five_ test results to the testsuite summary (three of
 these tests being successful, one failed, and one skipped), and the
-content of the corresponding `.log' file will _not_ be copied in the
-global log file `test-suite.log'.
+content of the corresponding ‘.log’ file will _not_ be copied in the
+global log file ‘test-suite.log’.
 
 \1f
 File: automake.info,  Node: Testsuite progress output,  Prev: Log files generation and test results recording,  Up: API for Custom Test Drivers
@@ -944,11 +1174,11 @@ granted here).
 
    Remember that consistency is good; so, if possible, try to be
 consistent with the output of the built-in Automake test drivers,
-providing a similar "look & feel".  In particular, the testsuite
-progress output should be colorized when the `--color-tests' is passed
+providing a similar “look & feel”.  In particular, the testsuite
+progress output should be colorized when the ‘--color-tests’ is passed
 to the driver.  On the other end, if you are using a known and
 widespread test protocol with well-established implementations, being
-consistent with those implementations' output might be a good idea too.
+consistent with those implementations output might be a good idea too.
 
 \1f
 File: automake.info,  Node: Using the TAP test protocol,  Next: DejaGnu Tests,  Prev: Custom Test Drivers,  Up: Tests
@@ -970,32 +1200,32 @@ File: automake.info,  Node: Introduction to TAP,  Next: Use TAP with the Automak
 --------------------------
 
 TAP, the Test Anything Protocol, is a simple text-based interface
-between testing modules or programs and a test harness.  The tests
-(also called "TAP producers" in this context) write test results in a
-simple format on standard output; a test harness (also called "TAP
-consumer") will parse and interpret these results, and properly present
-them to the user, and/or register them for later analysis.  The exact
-details of how this is accomplished can vary among different test
-harnesses.  The Automake parallel harness will present the results on
-the console in the usual fashion (*note Testsuite progress on
-console::), and will use the `.trs' files (*note Basics of test
-metadata::) to store the test results and related metadata.  Apart from
-that, it will try to remain as much compatible as possible with
-pre-existing and widespread utilities, such as the `prove' utility
-(http://search.cpan.org/~andya/Test-Harness/bin/prove), at least for
-the simpler usages.
+between testing modules or programs and a test harness.  The tests (also
+called “TAP producers” in this context) write test results in a simple
+format on standard output; a test harness (also called “TAP consumer”)
+will parse and interpret these results, and properly present them to the
+user, and/or register them for later analysis.  The exact details of how
+this is accomplished can vary among different test harnesses.  The
+Automake harness will present the results on the console in the usual
+fashion (*note Testsuite progress on console::), and will use the ‘.trs’
+files (*note Basics of test metadata::) to store the test results and
+related metadata.  Apart from that, it will try to remain as much
+compatible as possible with pre-existing and widespread utilities, such
+as the ‘prove’ utility
+(http://search.cpan.org/~andya/Test-Harness/bin/prove), at least for the
+simpler usages.
 
    TAP started its life as part of the test harness for Perl, but today
 it has been (mostly) standardized, and has various independent
 implementations in different languages; among them, C, C++, Perl,
 Python, PHP, and Java.  For a semi-official specification of the TAP
-protocol, please refer to the documentation of `Test::Harness::TAP'
+protocol, please refer to the documentation of ‘Test::Harness::TAP’
 (http://search.cpan.org/~petdance/Test-Harness/lib/Test/Harness/TAP.pod).
 
    The most relevant real-world usages of TAP are obviously in the
-testsuites of `perl' and of many perl modules.  Still, also other
-important third-party packages, such as `git' (http://git-scm.com/),
-use TAP in their testsuite.
+testsuites of ‘perl’ and of many perl modules.  Still, also other
+important third-party packages, such as ‘git’ (http://git-scm.com/), use
+TAP in their testsuite.
 
 \1f
 File: automake.info,  Node: Use TAP with the Automake test harness,  Next: Incompatibilities with other TAP parsers and drivers,  Prev: Introduction to TAP,  Up: Using the TAP test protocol
@@ -1004,69 +1234,62 @@ File: automake.info,  Node: Use TAP with the Automake test harness,  Next: Incom
 ---------------------------------------------
 
 Currently, the TAP driver that comes with Automake requires some by-hand
-steps on the developer's part (this situation should hopefully be
-improved in future Automake versions).  You'll have to grab the
-`tap-driver.sh' script from the Automake distribution by hand, copy it
-in your source tree, add a call to `AC_PROG_AWK' in `configure.ac' to
-search for a proper awk program, and use the Automake support for
-third-party test drivers to instruct the harness to use the
-`tap-driver.sh' script and that awk program to run your TAP-producing
+steps on the developer’s part (this situation should hopefully be
+improved in future Automake versions).  You’ll have to grab the
+‘tap-driver.sh’ script from the Automake distribution by hand, copy it
+in your source tree, and use the Automake support for third-party test
+drivers to instruct the harness to use the ‘tap-driver.sh’ script and
+the awk program found by ‘AM_INIT_AUTOMAKE’ to run your TAP-producing
 tests.  See the example below for clarification.
 
-   Apart from the options common to all the Automake test drivers
-(*note Command-line arguments for test drivers::), the `tap-driver.sh'
-supports the following options, whose names are chosen for enhanced
-compatibility with the `prove' utility.
+   Apart from the options common to all the Automake test drivers (*note
+Command-line arguments for test drivers::), the ‘tap-driver.sh’ supports
+the following options, whose names are chosen for enhanced compatibility
+with the ‘prove’ utility.
 
-`--ignore-exit'
+‘--ignore-exit’
      Causes the test driver to ignore the exit status of the test
      scripts; by default, the driver will report an error if the script
      exits with a non-zero status.  This option has effect also on
      non-zero exit statuses due to termination by a signal.
-
-`--comments'
+‘--comments’
      Instruct the test driver to display TAP diagnostic (i.e., lines
-     beginning with the `#' character) in the testsuite progress output
-     too; by default, TAP diagnostic is only copied to the `.log' file.
-
-`--no-comments'
-     Revert the effects of `--comments'.
-
-`--merge'
-     Instruct the test driver to merge the test scripts' standard error
+     beginning with the ‘#’ character) in the testsuite progress output
+     too; by default, TAP diagnostic is only copied to the ‘.log’ file.
+‘--no-comments’
+     Revert the effects of ‘--comments’.
+‘--merge’
+     Instruct the test driver to merge the test scripts’ standard error
      into their standard output.  This is necessary if you want to
      ensure that diagnostics from the test scripts are displayed in the
      correct order relative to test results; this can be of great help
-     in debugging (especially if your test scripts are shell scripts
-     run with shell tracing active).  As a downside, this option might
-     cause the test harness to get confused if anything that appears on
+     in debugging (especially if your test scripts are shell scripts run
+     with shell tracing active).  As a downside, this option might cause
+     the test harness to get confused if anything that appears on
      standard error looks like a test result.
-
-`--no-merge'
-     Revert the effects of `--merge'.
-
-`--diagnostic-string=STRING'
+‘--no-merge’
+     Revert the effects of ‘--merge’.
+‘--diagnostic-string=STRING’
      Change the string that introduces TAP diagnostic from the default
-     value of "`#'" to `STRING'.  This can be useful if your TAP-based
+     value of “‘#’” to ‘STRING’.  This can be useful if your TAP-based
      test scripts produce verbose output on which they have limited
-     control (because, say, the output comes from other tools invoked
-     in the scripts), and it might contain text that gets spuriously
+     control (because, say, the output comes from other tools invoked in
+     the scripts), and it might contain text that gets spuriously
      interpreted as TAP diagnostic: such an issue can be solved by
      redefining the string that activates TAP diagnostic to a value you
-     know won't appear by chance in the tests' output.  Note however
-     that this feature is non-standard, as the "official" TAP protocol
-     does not allow for such a customization; so don't use it if you
-     can avoid it.
+     know won’t appear by chance in the tests’ output.  Note however
+     that this feature is non-standard, as the “official” TAP protocol
+     does not allow for such a customization; so don’t use it if you can
+     avoid it.
 
 Here is an example of how the TAP driver can be set up and used.
 
      % cat configure.ac
      AC_INIT([GNU Try Tap], [1.0], [bug-automake@gnu.org])
      AC_CONFIG_AUX_DIR([build-aux])
-     AM_INIT_AUTOMAKE([foreign parallel-tests -Wall -Werror])
+     AM_INIT_AUTOMAKE([foreign -Wall -Werror])
      AC_CONFIG_FILES([Makefile])
      AC_REQUIRE_AUX_FILE([tap-driver.sh])
-     AC_PROG_AWK
      AC_OUTPUT
 
      % cat Makefile.am
@@ -1099,7 +1322,7 @@ Here is an example of how the TAP driver can be set up and used.
      # Exit with error, even if all the tests have been successful.
      exit 7
 
-     % cp PREFIX/share/automake-APIVERSION/tap-driver.pl .
+     % cp PREFIX/share/automake-APIVERSION/tap-driver.sh .
      % autoreconf -vi && ./configure && make check
      ...
      PASS: foo.test 1 - Swallows fly
@@ -1140,21 +1363,18 @@ For implementation or historical reasons, the TAP driver and harness as
 implemented by Automake have some minors incompatibilities with the
 mainstream versions, which you should be aware of.
 
-   * A `Bail out!' directive doesn't stop the whole testsuite, but only
-     the test script it occurs in.  This doesn't follow TAP
+   • A ‘Bail out!’ directive doesn’t stop the whole testsuite, but only
+     the test script it occurs in.  This doesnt follow TAP
      specifications, but on the other hand it maximizes compatibility
-     (and code sharing) with the "hard error" concept of the default
-     `parallel-tests' driver.
-
-   * The `version' and `pragma' directives are not supported.
-
-   * The `--diagnostic-string' option of our driver allows to modify
-     the string that introduces TAP diagnostic from the default value
-     of "`#'".  The standard TAP protocol has currently no way to allow
+     (and code sharing) with the “hard error” concept of the default
+     testsuite driver.
+   • The ‘version’ and ‘pragma’ directives are not supported.
+   • The ‘--diagnostic-string’ option of our driver allows to modify the
+     string that introduces TAP diagnostic from the default value of
+     “‘#’”.  The standard TAP protocol has currently no way to allow
      this, so if you use it your diagnostic will be lost to more
-     compliant tools like `prove' and `Test::Harness'
-
-   * And there are probably some other small and yet undiscovered
+     compliant tools like ‘prove’ and ‘Test::Harness’
+   • And there are probably some other small and yet undiscovered
      incompatibilities, especially in corner cases or with rare usages.
 
 \1f
@@ -1164,35 +1384,29 @@ File: automake.info,  Node: Links and external resources on TAP,  Prev: Incompat
 ------------------------------------------
 
 Here are some links to more extensive official or third-party
-documentation and resources about the TAP protocol and related tools
-and libraries.
-   * `Test::Harness::TAP'
+documentation and resources about the TAP protocol and related tools and
+libraries.
+   •  ‘Test::Harness::TAP’
      (http://search.cpan.org/~petdance/Test-Harness/lib/Test/Harness/TAP.pod),
      the (mostly) official documentation about the TAP format and
      protocol.
-
-   * `prove' (http://search.cpan.org/~andya/Test-Harness/bin/prove),
+   •  ‘prove’ (http://search.cpan.org/~andya/Test-Harness/bin/prove),
      the most famous command-line TAP test driver, included in the
-     distribution of `perl' and `Test::Harness'
+     distribution of ‘perl’ and ‘Test::Harness’
      (http://search.cpan.org/~andya/Test-Harness/lib/Test/Harness.pm).
-
-   * The TAP wiki (http://testanything.org/wiki/index.php/Main_Page).
-
-   * A "gentle introduction" to testing for perl coders:
-     `Test::Tutorial'
+   • The TAP wiki (http://testanything.org/wiki/index.php/Main_Page).
+   • A “gentle introduction” to testing for perl coders:
+     ‘Test::Tutorial’
      (http://search.cpan.org/dist/Test-Simple/lib/Test/Tutorial.pod).
-
-   * `Test::Simple'
+   •  ‘Test::Simple’
      (http://search.cpan.org/~mschwern/Test-Simple/lib/Test/Simple.pm)
-     and `Test::More'
+     and ‘Test::More’
      (http://search.cpan.org/~mschwern/Test-Simple/lib/Test/More.pm),
      the standard perl testing libraries, which are based on TAP.
-
-   * C TAP Harness
+   • C TAP Harness
      (http://www.eyrie.org/~eagle/software/c-tap-harness/), a C-based
      project implementing both a TAP producer and a TAP consumer.
-
-   * tap4j (http://www.tap4j.org/), a Java-based project implementing
+   • tap4j (http://www.tap4j.org/), a Java-based project implementing
      both a TAP producer and a TAP consumer.
 
 \1f
@@ -1201,43 +1415,43 @@ File: automake.info,  Node: DejaGnu Tests,  Next: Install Tests,  Prev: Using th
 15.5 DejaGnu Tests
 ==================
 
-If `dejagnu' (ftp://ftp.gnu.org/gnu/dejagnu/) appears in
-`AUTOMAKE_OPTIONS', then a `dejagnu'-based test suite is assumed.  The
-variable `DEJATOOL' is a list of names that are passed, one at a time,
-as the `--tool' argument to `runtest' invocations; it defaults to the
+If ‘dejagnu’ (ftp://ftp.gnu.org/gnu/dejagnu/) appears in
+‘AUTOMAKE_OPTIONS’, then a ‘dejagnu’-based test suite is assumed.  The
+variable ‘DEJATOOL’ is a list of names that are passed, one at a time,
+as the ‘--tool’ argument to ‘runtest’ invocations; it defaults to the
 name of the package.
 
-   The variable `RUNTESTDEFAULTFLAGS' holds the `--tool' and `--srcdir'
+   The variable ‘RUNTESTDEFAULTFLAGS’ holds the ‘--tool’ and ‘--srcdir’
 flags that are passed to dejagnu by default; this can be overridden if
-necessary.  
+necessary.
 
-   The variables `EXPECT' and `RUNTEST' can also be overridden to
-provide project-specific values.  For instance, you will need to do
-this if you are testing a compiler toolchain, because the default
-values do not take into account host and target names.  
+   The variables ‘EXPECT’ and ‘RUNTEST’ can also be overridden to
+provide project-specific values.  For instance, you will need to do this
+if you are testing a compiler toolchain, because the default values do
+not take into account host and target names.
 
-   The contents of the variable `RUNTESTFLAGS' are passed to the
-`runtest' invocation.  This is considered a "user variable" (*note User
-Variables::).  If you need to set `runtest' flags in `Makefile.am', you
-can use `AM_RUNTESTFLAGS' instead.  
+   The contents of the variable ‘RUNTESTFLAGS’ are passed to the
+‘runtest’ invocation.  This is considered a “user variable” (*note User
+Variables::).  If you need to set ‘runtest’ flags in ‘Makefile.am’, you
+can use ‘AM_RUNTESTFLAGS’ instead.
 
-   Automake will generate rules to create a local `site.exp' file,
-defining various variables detected by `configure'.  This file is
+   Automake will generate rules to create a local ‘site.exp’ file,
+defining various variables detected by ‘configure’.  This file is
 automatically read by DejaGnu.  It is OK for the user of a package to
-edit this file in order to tune the test suite.  However this is not
-the place where the test suite author should define new variables: this
+edit this file in order to tune the test suite.  However this is not the
+place where the test suite author should define new variables: this
 should be done elsewhere in the real test suite code.  Especially,
-`site.exp' should not be distributed.
+‘site.exp’ should not be distributed.
 
    Still, if the package author has legitimate reasons to extend
-`site.exp' at `make' time, he can do so by defining the variable
-`EXTRA_DEJAGNU_SITE_CONFIG'; the files listed there will be considered
-`site.exp' prerequisites, and their content will be appended to it (in
-the same order in which they appear in `EXTRA_DEJAGNU_SITE_CONFIG').
+‘site.exp’ at ‘make’ time, he can do so by defining the variable
+‘EXTRA_DEJAGNU_SITE_CONFIG’; the files listed there will be considered
+‘site.exp’ prerequisites, and their content will be appended to it (in
+the same order in which they appear in ‘EXTRA_DEJAGNU_SITE_CONFIG’).
 Note that files are _not_ distributed by default.
 
-   For more information regarding DejaGnu test suites, see *note Top:
-(dejagnu)Top.
+   For more information regarding DejaGnu test suites, see *note
+(dejagnu)Top::.
 
 \1f
 File: automake.info,  Node: Install Tests,  Prev: DejaGnu Tests,  Up: Tests
@@ -1245,9 +1459,9 @@ File: automake.info,  Node: Install Tests,  Prev: DejaGnu Tests,  Up: Tests
 15.6 Install Tests
 ==================
 
-The `installcheck' target is available to the user as a way to run any
+The ‘installcheck’ target is available to the user as a way to run any
 tests after the package has been installed.  You can add tests to this
-by writing an `installcheck-local' rule.
+by writing an ‘installcheck-local’ rule.
 
 \1f
 File: automake.info,  Node: Rebuilding,  Next: Options,  Prev: Tests,  Up: Top
@@ -1255,85 +1469,81 @@ File: automake.info,  Node: Rebuilding,  Next: Options,  Prev: Tests,  Up: Top
 16 Rebuilding Makefiles
 ***********************
 
-Automake generates rules to automatically rebuild `Makefile's,
-`configure', and other derived files like `Makefile.in'.
+Automake generates rules to automatically rebuild ‘Makefile’s,
+‘configure’, and other derived files like ‘Makefile.in’.
 
-   If you are using `AM_MAINTAINER_MODE' in `configure.ac', then these
+   If you are using ‘AM_MAINTAINER_MODE’ in ‘configure.ac’, then these
 automatic rebuilding rules are only enabled in maintainer mode.
 
-   Sometimes you need to run `aclocal' with an argument like `-I' to
-tell it where to find `.m4' files.  Since sometimes `make' will
-automatically run `aclocal', you need a way to specify these arguments.
-You can do this by defining `ACLOCAL_AMFLAGS'; this holds arguments
-that are passed verbatim to `aclocal'.  This variable is only useful in
-the top-level `Makefile.am'.
-
    Sometimes it is convenient to supplement the rebuild rules for
-`configure' or `config.status' with additional dependencies.  The
-variables `CONFIGURE_DEPENDENCIES' and `CONFIG_STATUS_DEPENDENCIES' can
+‘configure’ or ‘config.status’ with additional dependencies.  The
+variables ‘CONFIGURE_DEPENDENCIES’ and ‘CONFIG_STATUS_DEPENDENCIES’ can
 be used to list these extra dependencies.  These variables should be
-defined in all `Makefile's of the tree (because these two rebuild rules
-are output in all them), so it is safer and easier to `AC_SUBST' them
-from `configure.ac'.  For instance, the following statement will cause
-`configure' to be rerun each time `version.sh' is changed.
+defined in all ‘Makefile’s of the tree (because these two rebuild rules
+are output in all them), so it is safer and easier to ‘AC_SUBST’ them
+from ‘configure.ac’.  For instance, the following statement will cause
+‘configure’ to be rerun each time ‘version.sh’ is changed.
 
      AC_SUBST([CONFIG_STATUS_DEPENDENCIES], ['$(top_srcdir)/version.sh'])
 
-Note the `$(top_srcdir)/' in the file name.  Since this variable is to
-be used in all `Makefile's, its value must be sensible at any level in
+Note the ‘$(top_srcdir)/’ in the file name.  Since this variable is to
+be used in all ‘Makefile’s, its value must be sensible at any level in
 the build hierarchy.
 
-   Beware not to mistake `CONFIGURE_DEPENDENCIES' for
-`CONFIG_STATUS_DEPENDENCIES'.
-
-   `CONFIGURE_DEPENDENCIES' adds dependencies to the `configure' rule,
-whose effect is to run `autoconf'.  This variable should be seldom
-used, because `automake' already tracks `m4_include'd files.  However
-it can be useful when playing tricky games with `m4_esyscmd' or similar
-non-recommendable macros with side effects.
-
-   `CONFIG_STATUS_DEPENDENCIES' adds dependencies to the
-`config.status' rule, whose effect is to run `configure'.  This
-variable should therefore carry any non-standard source that may be
-read as a side effect of running `configure', like `version.sh' in the
-example above.
-
-   Speaking of `version.sh' scripts, we recommend against them today.
+   Beware not to mistake ‘CONFIGURE_DEPENDENCIES’ for
+‘CONFIG_STATUS_DEPENDENCIES’.
+
+   ‘CONFIGURE_DEPENDENCIES’ adds dependencies to the ‘configure’ rule,
+whose effect is to run ‘autoconf’.  This variable should be seldom used,
+because ‘automake’ already tracks ‘m4_include’d files.  However it can
+be useful when playing tricky games with ‘m4_esyscmd’ or similar
+non-recommendable macros with side effects.  Be also aware that
+interactions of this variable with the *note autom4te cache:
+(autoconf)Autom4te Cache. are quite problematic and can cause subtle
+breakage, so you might want to disable the cache if you want to use
+‘CONFIGURE_DEPENDENCIES’.
+
+   ‘CONFIG_STATUS_DEPENDENCIES’ adds dependencies to the ‘config.status’
+rule, whose effect is to run ‘configure’.  This variable should
+therefore carry any non-standard source that may be read as a side
+effect of running ‘configure’, like ‘version.sh’ in the example above.
+
+   Speaking of ‘version.sh’ scripts, we recommend against them today.
 They are mainly used when the version of a package is updated
 automatically by a script (e.g., in daily builds).  Here is what some
-old-style `configure.ac's may look like:
+old-style ‘configure.ac’s may look like:
 
      AC_INIT
      . $srcdir/version.sh
      AM_INIT_AUTOMAKE([name], $VERSION_NUMBER)
      ...
 
-Here, `version.sh' is a shell fragment that sets `VERSION_NUMBER'.  The
-problem with this example is that `automake' cannot track dependencies
-(listing `version.sh' in `CONFIG_STATUS_DEPENDENCIES', and distributing
+Here, ‘version.sh’ is a shell fragment that sets ‘VERSION_NUMBER’.  The
+problem with this example is that ‘automake’ cannot track dependencies
+(listing ‘version.sh’ in ‘CONFIG_STATUS_DEPENDENCIES’, and distributing
 this file is up to the user), and that it uses the obsolete form of
-`AC_INIT' and `AM_INIT_AUTOMAKE'.  Upgrading to the new syntax is not
-straightforward, because shell variables are not allowed in `AC_INIT''s
-arguments.  We recommend that `version.sh' be replaced by an M4 file
-that is included by `configure.ac':
+‘AC_INIT’ and ‘AM_INIT_AUTOMAKE’.  Upgrading to the new syntax is not
+straightforward, because shell variables are not allowed in ‘AC_INIT’’s
+arguments.  We recommend that ‘version.sh’ be replaced by an M4 file
+that is included by ‘configure.ac’:
 
      m4_include([version.m4])
      AC_INIT([name], VERSION_NUMBER)
      AM_INIT_AUTOMAKE
      ...
 
-Here `version.m4' could contain something like
-`m4_define([VERSION_NUMBER], [1.2])'.  The advantage of this second
-form is that `automake' will take care of the dependencies when
-defining the rebuild rule, and will also distribute the file
-automatically.  An inconvenience is that `autoconf' will now be rerun
-each time the version number is bumped, when only `configure' had to be
-rerun in the previous setup.
+Here ‘version.m4’ could contain something like
+‘m4_define([VERSION_NUMBER], [1.2])’.  The advantage of this second form
+is that ‘automake’ will take care of the dependencies when defining the
+rebuild rule, and will also distribute the file automatically.  An
+inconvenience is that ‘autoconf’ will now be rerun each time the version
+number is bumped, when only ‘configure’ had to be rerun in the previous
+setup.
 
 \1f
 File: automake.info,  Node: Options,  Next: Miscellaneous,  Prev: Rebuilding,  Up: Top
 
-17 Changing Automake's Behavior
+17 Changing Automakes Behavior
 *******************************
 
 * Menu:
@@ -1349,38 +1559,38 @@ File: automake.info,  Node: Options generalities,  Next: List of Automake option
 
 Various features of Automake can be controlled by options.  Except where
 noted otherwise, options can be specified in one of several ways.  Most
-options can be applied on a per-`Makefile' basis when listed in a
-special `Makefile' variable named `AUTOMAKE_OPTIONS'.  Some of these
-options only make sense when specified in the toplevel `Makefile.am'
-file.  Options are applied globally to all processed `Makefile' files
-when listed in the first argument of `AM_INIT_AUTOMAKE' in
-`configure.ac', and some options which require changes to the
-`configure' script can only be specified there.  These are annotated
+options can be applied on a per-‘Makefile’ basis when listed in a
+special ‘Makefile’ variable named ‘AUTOMAKE_OPTIONS’.  Some of these
+options only make sense when specified in the toplevel ‘Makefile.am’
+file.  Options are applied globally to all processed ‘Makefile’ files
+when listed in the first argument of ‘AM_INIT_AUTOMAKE’ in
+‘configure.ac’, and some options which require changes to the
+‘configure’ script can only be specified there.  These are annotated
 below.
 
-   As a general rule, options specified in `AUTOMAKE_OPTIONS' take
-precedence over those specified in `AM_INIT_AUTOMAKE', which in turn
+   As a general rule, options specified in ‘AUTOMAKE_OPTIONS’ take
+precedence over those specified in ‘AM_INIT_AUTOMAKE’, which in turn
 take precedence over those specified on the command line.
 
    Also, some care must be taken about the interactions among strictness
 level and warning categories.  As a general rule, strictness-implied
 warnings are overridden by those specified by explicit options.  For
-example, even if `portability' warnings are disabled by default in
-`foreign' strictness, an usage like this will end up enabling them:
+example, even if ‘portability’ warnings are disabled by default in
+‘foreign’ strictness, an usage like this will end up enabling them:
 
      AUTOMAKE_OPTIONS = -Wportability foreign
 
    However, a strictness level specified in a higher-priority context
 will override all the explicit warnings specified in a lower-priority
-context.  For example, if `configure.ac' contains:
+context.  For example, if ‘configure.ac’ contains:
 
      AM_INIT_AUTOMAKE([-Wportability])
 
-and `Makefile.am' contains:
+and ‘Makefile.am’ contains:
 
      AUTOMAKE_OPTIONS = foreign
 
-then `portability' warnings will be _disabled_ in `Makefile.am'.
+then ‘portability’ warnings will be _disabled_ in ‘Makefile.am’.
 
 \1f
 File: automake.info,  Node: List of Automake options,  Prev: Options generalities,  Up: Options
@@ -1388,194 +1598,192 @@ File: automake.info,  Node: List of Automake options,  Prev: Options generalitie
 17.2 List of Automake options
 =============================
 
-`gnits'
-`gnu'
-`foreign'
-`cygnus'
-     Set the strictness as appropriate.  The `gnits' option also
-     implies options `readme-alpha' and `check-news'.
+‘gnits’
+‘gnu’
+‘foreign’
 
-`check-news'
-     Cause `make dist' to fail unless the current version number appears
-     in the first few lines of the `NEWS' file.
+     Set the strictness as appropriate.  The ‘gnits’ option also implies
+     options ‘readme-alpha’ and ‘check-news’.
 
-`color-tests'
-     Cause output of the serial and parallel test harnesses (see *note
-     Simple Tests::) and of properly-written custom test drivers (*note
-     Custom Test Drivers::) to be colorized on capable terminals.
+‘check-news’
+     Cause ‘make dist’ to fail unless the current version number appears
+     in the first few lines of the ‘NEWS’ file.
 
-`dejagnu'
-     Cause `dejagnu'-specific rules to be generated.  *Note DejaGnu
+‘dejagnu’
+     Cause ‘dejagnu’-specific rules to be generated.  *Note DejaGnu
      Tests::.
 
-`dist-bzip2'
-     Hook `dist-bzip2' to `dist'.  
+‘dist-bzip2’
+     Hook ‘dist-bzip2’ to ‘dist’.
 
-`dist-lzip'
-     Hook `dist-lzip' to `dist'.  
+‘dist-lzip’
+     Hook ‘dist-lzip’ to ‘dist’.
 
-`dist-shar'
-     Hook `dist-shar' to `dist'.  
+‘dist-xz’
+     Hook ‘dist-xz’ to ‘dist’.
 
-`dist-zip'
-     Hook `dist-zip' to `dist'.  
+‘dist-zip’
+     Hook ‘dist-zip’ to ‘dist’.
 
-`dist-tarZ'
-     Hook `dist-tarZ' to `dist'.  
+‘dist-shar’
+     Hook ‘dist-shar’ to ‘dist’.  Use of this option is deprecated, as
+     the ‘shar’ format is obsolescent and problematic.  Support for it
+     will be removed altogether in Automake 2.0.
 
-`filename-length-max=99'
+‘dist-tarZ’
+     Hook ‘dist-tarZ’ to ‘dist’.  Use of this option is deprecated, as
+     the ‘compress’ program is obsolete.  Support for it will be removed
+     altogether in Automake 2.0.
+
+‘filename-length-max=99’
      Abort if file names longer than 99 characters are found during
-     `make dist'.  Such long file names are generally considered not to
-     be portable in tarballs.  See the `tar-v7' and `tar-ustar' options
-     below.  This option should be used in the top-level `Makefile.am'
-     or as an argument of `AM_INIT_AUTOMAKE' in `configure.ac', it will
+     ‘make dist’.  Such long file names are generally considered not to
+     be portable in tarballs.  See the ‘tar-v7’ and ‘tar-ustar’ options
+     below.  This option should be used in the top-level ‘Makefile.am’
+     or as an argument of ‘AM_INIT_AUTOMAKE’ in ‘configure.ac’, it will
      be ignored otherwise.  It will also be ignored in sub-packages of
      nested packages (*note Subpackages::).
 
-`no-define'
-     This option is meaningful only when passed as an argument to
-     `AM_INIT_AUTOMAKE'.  It will prevent the `PACKAGE' and `VERSION'
-     variables from being `AC_DEFINE'd.
+‘info-in-builddir’
+     Instruct Automake to place the generated ‘.info’ files in the
+     ‘builddir’ rather than in the ‘srcdir’.  Note that this might make
+     VPATH builds with some non-GNU make implementations more brittle.
 
-`no-dependencies'
-     This is similar to using `--ignore-deps' on the command line, but
-     is useful for those situations where you don't have the necessary
+‘no-define’
+     This option is meaningful only when passed as an argument to
+     ‘AM_INIT_AUTOMAKE’.  It will prevent the ‘PACKAGE’ and ‘VERSION’
+     variables from being ‘AC_DEFINE’d.  But notice that they will
+     remain defined as shell variables in the generated ‘configure’, and
+     as make variables in the generated ‘Makefile’; this is deliberate,
+     and required for backward compatibility.
+
+‘no-dependencies’
+     This is similar to using ‘--ignore-deps’ on the command line, but
+     is useful for those situations where you don’t have the necessary
      bits to make automatic dependency tracking work (*note
-     Dependencies::).  In this case the effect is to effectively
-     disable automatic dependency tracking.
+     Dependencies::).  In this case the effect is to effectively disable
+     automatic dependency tracking.
 
-`no-dist'
-     Don't emit any code related to `dist' target.  This is useful when
+‘no-dist’
+     Don’t emit any code related to ‘dist’ target.  This is useful when
      a package has its own method for making distributions.
 
-`no-dist-gzip'
-     Do not hook `dist-gzip' to `dist'.  
+‘no-dist-gzip’
+     Do not hook ‘dist-gzip’ to ‘dist’.
 
-`no-exeext'
-     If your `Makefile.am' defines a rule for target `foo', it will
-     override a rule for a target named `foo$(EXEEXT)'.  This is
-     necessary when `EXEEXT' is found to be empty.  However, by default
-     `automake' will generate an error for this use.  The `no-exeext'
+‘no-exeext’
+     If your ‘Makefile.am’ defines a rule for target ‘foo’, it will
+     override a rule for a target named ‘foo$(EXEEXT)’.  This is
+     necessary when ‘EXEEXT’ is found to be empty.  However, by default
+     ‘automake’ will generate an error for this use.  The ‘no-exeext’
      option will disable this error.  This is intended for use only
-     where it is known in advance that the package will not be ported
-     to Windows, or any other operating system using extensions on
+     where it is known in advance that the package will not be ported to
+     Windows, or any other operating system using extensions on
      executables.
 
-`no-installinfo'
-     The generated `Makefile.in' will not cause info pages to be built
-     or installed by default.  However, `info' and `install-info'
+‘no-installinfo’
+     The generated ‘Makefile.in’ will not cause info pages to be built
+     or installed by default.  However, ‘info’ and ‘install-info’
      targets will still be available.  This option is disallowed at
-     `gnu' strictness and above.  
+     ‘gnu’ strictness and above.
 
-`no-installman'
-     The generated `Makefile.in' will not cause man pages to be
-     installed by default.  However, an `install-man' target will still
+‘no-installman’
+     The generated ‘Makefile.in’ will not cause man pages to be
+     installed by default.  However, an ‘install-man’ target will still
      be available for optional installation.  This option is disallowed
-     at `gnu' strictness and above.  
+     at ‘gnu’ strictness and above.
 
-`nostdinc'
-     This option can be used to disable the standard `-I' options that
+‘nostdinc’
+     This option can be used to disable the standard ‘-I’ options that
      are ordinarily automatically provided by Automake.
 
-`no-texinfo.tex'
-     Don't require `texinfo.tex', even if there are texinfo files in
+‘no-texinfo.tex’
+     Don’t require ‘texinfo.tex’, even if there are texinfo files in
      this directory.
 
-`parallel-tests'
-     Enable test suite harness for `TESTS' that can run tests in
-     parallel (*note Parallel Test Harness::, for more information).
+‘serial-tests’
+     Enable the older serial test suite harness for ‘TESTS’ (*note
+     Serial Test Harness::, for more information).
 
-`serial-tests'
-     Enable the older serial test suite harness for `TESTS' (*note
-     Serial Test Harness::, for more information).  This is still the
-     default for the moment.
+‘parallel-tests’
+     Enable test suite harness for ‘TESTS’ that can run tests in
+     parallel (*note Parallel Test Harness::, for more information).
+     This option is only kept for backward-compatibility, since the
+     parallel test harness is the default now.
 
-`readme-alpha'
-     If this release is an alpha release, and the file `README-alpha'
+‘readme-alpha’
+     If this release is an alpha release, and the file ‘README-alpha’
      exists, then it will be added to the distribution.  If this option
      is given, version numbers are expected to follow one of two forms.
-     The first form is `MAJOR.MINOR.ALPHA', where each element is a
+     The first form is ‘MAJOR.MINOR.ALPHA’, where each element is a
      number; the final period and number should be left off for
-     non-alpha releases.  The second form is `MAJOR.MINORALPHA', where
+     non-alpha releases.  The second form is ‘MAJOR.MINORALPHA’, where
      ALPHA is a letter; it should be omitted for non-alpha releases.
 
-`silent-rules'
-     Enable less verbose build rules.  This can be used to let build
-     rules output status lines of the form:
-          GEN OUTPUT-FILE
-           CC OBJECT-FILE
-     instead of printing the command that will be executed to update
-     OUTPUT-FILE or to compile OBJECT-FILE.  It can also silence
-     `libtool' output.
-
-     For more information about how to use, enable, or disable silent
-     rules, *note Automake silent-rules Option::.
-
-`std-options'
-     Make the `installcheck' rule check that installed scripts and
-     programs support the `--help' and `--version' options.  This also
-     provides a basic check that the program's run-time dependencies
-     are satisfied after installation.
-
-     In a few situations, programs (or scripts) have to be exempted
-     from this test.  For instance, `false' (from GNU coreutils) is
-     never successful, even for `--help' or `--version'.  You can list
-     such programs in the variable `AM_INSTALLCHECK_STD_OPTIONS_EXEMPT'.
+‘std-options’
+
+     Make the ‘installcheck’ rule check that installed scripts and
+     programs support the ‘--help’ and ‘--version’ options.  This also
+     provides a basic check that the program’s run-time dependencies are
+     satisfied after installation.
+
+     In a few situations, programs (or scripts) have to be exempted from
+     this test.  For instance, ‘false’ (from GNU coreutils) is never
+     successful, even for ‘--help’ or ‘--version’.  You can list such
+     programs in the variable ‘AM_INSTALLCHECK_STD_OPTIONS_EXEMPT’.
      Programs (not scripts) listed in this variable should be suffixed
-     by `$(EXEEXT)' for the sake of Windows or OS/2.  For instance,
-     suppose we build `false' as a program but `true.sh' as a script,
-     and that neither of them support `--help' or `--version':
+     by ‘$(EXEEXT)’ for the sake of Windows or OS/2.  For instance,
+     suppose we build ‘false’ as a program but ‘true.sh’ as a script,
+     and that neither of them support ‘--help’ or ‘--version’:
 
           AUTOMAKE_OPTIONS = std-options
           bin_PROGRAMS = false ...
           bin_SCRIPTS = true.sh ...
           AM_INSTALLCHECK_STD_OPTIONS_EXEMPT = false$(EXEEXT) true.sh
 
-`subdir-objects'
+‘subdir-objects’
      If this option is specified, then objects are placed into the
      subdirectory of the build directory corresponding to the
      subdirectory of the source file.  For instance, if the source file
-     is `subdir/file.cxx', then the output file would be
-     `subdir/file.o'.
+     is ‘subdir/file.cxx’, then the output file would be
+     ‘subdir/file.o’.
 
-     In order to use this option with C sources, you should add
-     `AM_PROG_CC_C_O' to `configure.ac'.
+‘tar-v7’
+‘tar-ustar’
+‘tar-pax’
 
-`tar-v7'
-`tar-ustar'
-`tar-pax'
      These three mutually exclusive options select the tar format to use
-     when generating tarballs with `make dist'.  (The tar file created
-     is then compressed according to the set of `no-dist-gzip',
-     `dist-bzip2', `dist-lzip', `dist-xz' and `dist-tarZ' options in
+     when generating tarballs with ‘make dist’.  (The tar file created
+     is then compressed according to the set of ‘no-dist-gzip’,
+     ‘dist-bzip2’, ‘dist-lzip’, ‘dist-xz’ and ‘dist-tarZ’ options in
      use.)
 
-     These options must be passed as arguments to `AM_INIT_AUTOMAKE'
+     These options must be passed as arguments to ‘AM_INIT_AUTOMAKE’
      (*note Macros::) because they can require additional configure
      checks.  Automake will complain if it sees such options in an
-     `AUTOMAKE_OPTIONS' variable.
+     ‘AUTOMAKE_OPTIONS’ variable.
 
-     `tar-v7' selects the old V7 tar format.  This is the historical
+     ‘tar-v7’ selects the old V7 tar format.  This is the historical
      default.  This antiquated format is understood by all tar
      implementations and supports file names with up to 99 characters.
-     When given longer file names some tar implementations will
-     diagnose the problem while other will generate broken tarballs or
-     use non-portable extensions.  Furthermore, the V7 format cannot
-     store empty directories.  When using this format, consider using
-     the `filename-length-max=99' option to catch file names too long.
+     When given longer file names some tar implementations will diagnose
+     the problem while other will generate broken tarballs or use
+     non-portable extensions.  Furthermore, the V7 format cannot store
+     empty directories.  When using this format, consider using the
+     ‘filename-length-max=99’ option to catch file names too long.
 
-     `tar-ustar' selects the ustar format defined by POSIX 1003.1-1988.
+     ‘tar-ustar’ selects the ustar format defined by POSIX 1003.1-1988.
      This format is believed to be old enough to be portable.  It fully
-     supports empty directories.  It can store file names with up to
-     256 characters, provided that the file name can be split at
-     directory separator in two parts, first of them being at most 155
-     bytes long.  So, in most cases the maximum file name length will be
-     shorter than 256 characters.  However you may run against broken
-     tar implementations that incorrectly handle file names longer than
-     99 characters (please report them to <bug-automake@gnu.org> so we
-     can document this accurately).
-
-     `tar-pax' selects the new pax interchange format defined by POSIX
+     supports empty directories.  It can store file names with up to 256
+     characters, provided that the file name can be split at directory
+     separator in two parts, first of them being at most 155 bytes long.
+     So, in most cases the maximum file name length will be shorter than
+     256 characters.  However you may run against broken tar
+     implementations that incorrectly handle file names longer than 99
+     characters (please report them to <bug-automake@gnu.org> so we can
+     document this accurately).
+
+     ‘tar-pax’ selects the new pax interchange format defined by POSIX
      1003.1-2001.  It does not limit the length of file names.  However,
      this format is very young and should probably be restricted to
      packages that target only very modern platforms.  There are moves
@@ -1585,27 +1793,26 @@ File: automake.info,  Node: List of Automake options,  Prev: Options generalitie
      *Note Controlling the Archive Format: (tar)Formats, for further
      discussion about tar formats.
 
-     `configure' knows several ways to construct these formats.  It
-     will not abort if it cannot find a tool up to the task (so that the
-     package can still be built), but `make dist' will fail.
+     ‘configure’ knows several ways to construct these formats.  It will
+     not abort if it cannot find a tool up to the task (so that the
+     package can still be built), but ‘make dist’ will fail.
 
 VERSION
-     A version number (e.g., `0.30') can be specified.  If Automake is
-     not newer than the version specified, creation of the `Makefile.in'
+     A version number (e.g., ‘0.30’) can be specified.  If Automake is
+     not newer than the version specified, creation of the ‘Makefile.in’
      will be suppressed.
 
-`-WCATEGORY' or `--warnings=CATEGORY'
+‘-WCATEGORY’ or ‘--warnings=CATEGORY’
      These options behave exactly like their command-line counterpart
      (*note automake Invocation::).  This allows you to enable or
      disable some warning categories on a per-file basis.  You can also
      setup some warnings for your entire project; for instance, try
-     `AM_INIT_AUTOMAKE([-Wall])' in your `configure.ac'.
-
+     ‘AM_INIT_AUTOMAKE([-Wall])’ in your ‘configure.ac’.
 
-   Unrecognized options are diagnosed by `automake'.
+   Unrecognized options are diagnosed by ‘automake’.
 
    If you want an option to apply to all the files in the tree, you can
-use the `AM_INIT_AUTOMAKE' macro in `configure.ac'.  *Note Macros::.
+use the ‘AM_INIT_AUTOMAKE’ macro in ‘configure.ac’.  *Note Macros::.
 
 \1f
 File: automake.info,  Node: Miscellaneous,  Next: Include,  Prev: Options,  Up: Top
@@ -1613,7 +1820,7 @@ File: automake.info,  Node: Miscellaneous,  Next: Include,  Prev: Options,  Up:
 18 Miscellaneous Rules
 **********************
 
-There are a few rules and variables that didn't fit anywhere else.
+There are a few rules and variables that didnt fit anywhere else.
 
 * Menu:
 
@@ -1623,29 +1830,29 @@ There are a few rules and variables that didn't fit anywhere else.
 \1f
 File: automake.info,  Node: Tags,  Next: Suffixes,  Up: Miscellaneous
 
-18.1 Interfacing to `etags'
+18.1 Interfacing to ‘etags’
 ===========================
 
-Automake will generate rules to generate `TAGS' files for use with GNU
+Automake will generate rules to generate ‘TAGS’ files for use with GNU
 Emacs under some circumstances.
 
    If any C, C++ or Fortran 77 source code or headers are present, then
-`tags' and `TAGS' rules will be generated for the directory.  All files
-listed using the `_SOURCES', `_HEADERS', and `_LISP' primaries will be
+‘tags’ and ‘TAGS’ rules will be generated for the directory.  All files
+listed using the ‘_SOURCES’, ‘_HEADERS’, and ‘_LISP’ primaries will be
 used to generate tags.  Note that generated source files that are not
-distributed must be declared in variables like `nodist_noinst_HEADERS'
-or `nodist_PROG_SOURCES' or they will be ignored.
+distributed must be declared in variables like ‘nodist_noinst_HEADERS’
+or ‘nodist_PROG_SOURCES’ or they will be ignored.
 
-   A `tags' rule will be output at the topmost directory of a
-multi-directory package.  When run from this topmost directory, `make
-tags' will generate a `TAGS' file that includes by reference all `TAGS'
+   A ‘tags’ rule will be output at the topmost directory of a
+multi-directory package.  When run from this topmost directory, make
+tags’ will generate a ‘TAGS’ file that includes by reference all ‘TAGS’
 files from subdirectories.
 
-   The `tags' rule will also be generated if the variable `ETAGS_ARGS'
+   The ‘tags’ rule will also be generated if the variable ‘ETAGS_ARGS’
 is defined.  This variable is intended for use in directories that
-contain taggable source that `etags' does not understand.  The user can
-use the `ETAGSFLAGS' to pass additional flags to `etags';
-`AM_ETAGSFLAGS' is also available for use in `Makefile.am'.  
+contain taggable source that ‘etags’ does not understand.  The user can
+use the ‘ETAGSFLAGS’ to pass additional flags to ‘etags’;
+‘AM_ETAGSFLAGS’ is also available for use in ‘Makefile.am’.
 
    Here is how Automake generates tags for its source, and for nodes in
 its Texinfo file:
@@ -1653,34 +1860,34 @@ its Texinfo file:
      ETAGS_ARGS = automake.in --lang=none \
       --regex='/^@node[ \t]+\([^,]+\)/\1/' automake.texi
 
-   If you add file names to `ETAGS_ARGS', you will probably also want
-to define `TAGS_DEPENDENCIES'.  The contents of this variable are added
-directly to the dependencies for the `tags' rule.  
+   If you add file names to ‘ETAGS_ARGS’, you will probably also want to
+define ‘TAGS_DEPENDENCIES’.  The contents of this variable are added
+directly to the dependencies for the ‘tags’ rule.
 
-   Automake also generates a `ctags' rule that can be used to build
-`vi'-style `tags' files.  The variable `CTAGS' is the name of the
-program to invoke (by default `ctags'); `CTAGSFLAGS' can be used by the
-user to pass additional flags, and `AM_CTAGSFLAGS' can be used by the
-`Makefile.am'.
+   Automake also generates a ‘ctags’ rule that can be used to build
+‘vi’-style ‘tags’ files.  The variable ‘CTAGS’ is the name of the
+program to invoke (by default ‘ctags’); ‘CTAGSFLAGS’ can be used by the
+user to pass additional flags, and ‘AM_CTAGSFLAGS’ can be used by the
+‘Makefile.am’.
 
-   Automake will also generate an `ID' rule that will run `mkid' on the
+   Automake will also generate an ‘ID’ rule that will run ‘mkid’ on the
 source.  This is only supported on a directory-by-directory basis.
 
-   Similarly, the `cscope' rule will create a list of all the source
-files in the tree and run `cscope' to build an inverted index database.
-The variable `CSCOPE' is the name of the program to invoke (by default
-`cscope'); `CSCOPEFLAGS' and `CSCOPE_ARGS' can be used by the user to
+   Similarly, the ‘cscope’ rule will create a list of all the source
+files in the tree and run ‘cscope’ to build an inverted index database.
+The variable ‘CSCOPE’ is the name of the program to invoke (by default
+‘cscope’); ‘CSCOPEFLAGS’ and ‘CSCOPE_ARGS’ can be used by the user to
 pass additional flags and file names respectively, while
-`AM_CSCOPEFLAGS' can be used by the `Makefile.am'.  Note that,
-currently, the Automake-provided `cscope' support, when used in a VPATH
-build, might not work well with non-GNU make implementations
-(especially with make implementations performing *note VPATH rewrites:
+‘AM_CSCOPEFLAGS’ can be used by the ‘Makefile.am’.  Note that,
+currently, the Automake-provided ‘cscope’ support, when used in a VPATH
+build, might not work well with non-GNU make implementations (especially
+with make implementations performing *note VPATH rewrites:
 (autoconf)Automatic Rule Rewriting.).
 
    Finally, Automake also emits rules to support the GNU Global Tags
-program (http://www.gnu.org/software/global/).  The `GTAGS' rule runs
+program (http://www.gnu.org/software/global/).  The ‘GTAGS’ rule runs
 Global Tags and puts the result in the top build directory.  The
-variable `GTAGS_ARGS' holds arguments that are passed to `gtags'.  
+variable ‘GTAGS_ARGS’ holds arguments that are passed to ‘gtags’.
 
 \1f
 File: automake.info,  Node: Suffixes,  Prev: Tags,  Up: Miscellaneous
@@ -1691,14 +1898,14 @@ File: automake.info,  Node: Suffixes,  Prev: Tags,  Up: Miscellaneous
 It is sometimes useful to introduce a new implicit rule to handle a file
 type that Automake does not know about.
 
-   For instance, suppose you had a compiler that could compile `.foo'
-files to `.o' files.  You would simply define a suffix rule for your
+   For instance, suppose you had a compiler that could compile ‘.foo’
+files to ‘.o’ files.  You would simply define a suffix rule for your
 language:
 
      .foo.o:
              foocc -c -o $@ $<
 
-   Then you could directly use a `.foo' file in a `_SOURCES' variable
+   Then you could directly use a ‘.foo’ file in a ‘_SOURCES’ variable
 and expect the correct results:
 
      bin_PROGRAMS = doit
@@ -1708,23 +1915,23 @@ and expect the correct results:
 have to help Automake to figure out which extensions you are defining
 your suffix rule for.  This usually happens when your extension does not
 start with a dot.  Then, all you have to do is to put a list of new
-suffixes in the `SUFFIXES' variable *before* you define your implicit
+suffixes in the ‘SUFFIXES’ variable *before* you define your implicit
 rule.
 
    For instance, the following definition prevents Automake from
-misinterpreting the `.idlC.cpp:' rule as an attempt to transform
-`.idlC' files into `.cpp' files.
+misinterpreting the ‘.idlC.cpp:’ rule as an attempt to transform ‘.idlC’
+files into ‘.cpp’ files.
 
      SUFFIXES = .idl C.cpp
      .idlC.cpp:
              # whatever
 
-   As you may have noted, the `SUFFIXES' variable behaves like the
-`.SUFFIXES' special target of `make'.  You should not touch `.SUFFIXES'
-yourself, but use `SUFFIXES' instead and let Automake generate the
-suffix list for `.SUFFIXES'.  Any given `SUFFIXES' go at the start of
-the generated suffixes list, followed by Automake generated suffixes
-not already in the list.
+   As you may have noted, the ‘SUFFIXES’ variable behaves like the
+‘.SUFFIXES’ special target of ‘make’.  You should not touch ‘.SUFFIXES’
+yourself, but use ‘SUFFIXES’ instead and let Automake generate the
+suffix list for ‘.SUFFIXES’.  Any given ‘SUFFIXES’ go at the start of
+the generated suffixes list, followed by Automake generated suffixes not
+already in the list.
 
 \1f
 File: automake.info,  Node: Include,  Next: Conditionals,  Prev: Miscellaneous,  Up: Top
@@ -1732,18 +1939,18 @@ File: automake.info,  Node: Include,  Next: Conditionals,  Prev: Miscellaneous,
 19 Include
 **********
 
-Automake supports an `include' directive that  can be used to include
-other `Makefile' fragments when `automake' is run.  Note that these
-fragments are read and interpreted by `automake', not by `make'.  As
-with conditionals, `make' has no idea that `include' is in use.
+Automake supports an ‘include’ directive that can be used to include
+other ‘Makefile’ fragments when ‘automake’ is run.  Note that these
+fragments are read and interpreted by ‘automake’, not by ‘make’.  As
+with conditionals, ‘make’ has no idea that ‘include’ is in use.
 
-   There are two forms of `include':
+   There are two forms of ‘include’:
 
-`include $(srcdir)/file'
+‘include $(srcdir)/file’
      Include a fragment that is found relative to the current source
      directory.
 
-`include $(top_srcdir)/file'
+‘include $(top_srcdir)/file’
      Include a fragment that is found relative to the top source
      directory.
 
@@ -1751,7 +1958,23 @@ with conditionals, `make' has no idea that `include' is in use.
 condition applies to the entire contents of that fragment.
 
    Makefile fragments included this way are always distributed because
-they are needed to rebuild `Makefile.in'.
+they are needed to rebuild ‘Makefile.in’.
+
+   Inside a fragment, the construct ‘%reldir%’ is replaced with the
+directory of the fragment relative to the base ‘Makefile.am’.
+Similarly, ‘%canon_reldir%’ is replaced with the canonicalized (*note
+Canonicalization::) form of ‘%reldir%’.  As a convenience, ‘%D%’ is a
+synonym for ‘%reldir%’, and ‘%C%’ is a synonym for ‘%canon_reldir%’.
+
+   A special feature is that if the fragment is in the same directory as
+the base ‘Makefile.am’ (i.e., ‘%reldir%’ is ‘.’), then ‘%reldir%’ and
+‘%canon_reldir%’ will expand to the empty string as well as eat, if
+present, a following slash or underscore respectively.
+
+   Thus, a makefile fragment might look like this:
+
+     bin_PROGRAMS += %reldir%/mumble
+     %canon_reldir%_mumble_SOURCES = %reldir%/one.c
 
 \1f
 File: automake.info,  Node: Conditionals,  Next: Silencing Make,  Prev: Include,  Up: Top
@@ -1762,12 +1985,12 @@ File: automake.info,  Node: Conditionals,  Next: Silencing Make,  Prev: Include,
 Automake supports a simple type of conditionals.
 
    These conditionals are not the same as conditionals in GNU Make.
-Automake conditionals are checked at configure time by the `configure'
-script, and affect the translation from `Makefile.in' to `Makefile'.
-They are based on options passed to `configure' and on results that
-`configure' has discovered about the host system.  GNU Make
-conditionals are checked at `make' time, and are based on variables
-passed to the make program or defined in the `Makefile'.
+Automake conditionals are checked at configure time by the ‘configure’
+script, and affect the translation from ‘Makefile.in’ to ‘Makefile’.
+They are based on options passed to ‘configure’ and on results that
+‘configure’ has discovered about the host system.  GNU Make conditionals
+are checked at ‘make’ time, and are based on variables passed to the
+make program or defined in the ‘Makefile’.
 
    Automake conditionals will work with any make program.
 
@@ -1782,24 +2005,24 @@ File: automake.info,  Node: Usage of Conditionals,  Next: Limits of Conditionals
 20.1 Usage of Conditionals
 ==========================
 
-Before using a conditional, you must define it by using
-`AM_CONDITIONAL' in the `configure.ac' file (*note Macros::).
+Before using a conditional, you must define it by using ‘AM_CONDITIONAL’
+in the ‘configure.ac’ file (*note Macros::).
 
  -- Macro: AM_CONDITIONAL (CONDITIONAL, CONDITION)
      The conditional name, CONDITIONAL, should be a simple string
      starting with a letter and containing only letters, digits, and
-     underscores.  It must be different from `TRUE' and `FALSE' that
-     are reserved by Automake.
+     underscores.  It must be different from ‘TRUE’ and ‘FALSE’ that are
+     reserved by Automake.
 
-     The shell CONDITION (suitable for use in a shell `if' statement)
-     is evaluated when `configure' is run.  Note that you must arrange
-     for _every_ `AM_CONDITIONAL' to be invoked every time `configure'
-     is run.  If `AM_CONDITIONAL' is run conditionally (e.g., in a
-     shell `if' statement), then the result will confuse `automake'.
+     The shell CONDITION (suitable for use in a shell ‘if’ statement) is
+     evaluated when ‘configure’ is run.  Note that you must arrange for
+     _every_ ‘AM_CONDITIONAL’ to be invoked every time ‘configure’ is
+     run.  If ‘AM_CONDITIONAL’ is run conditionally (e.g., in a shell
+     ‘if’ statement), then the result will confuse ‘automake’.
 
    Conditionals typically depend upon options that the user provides to
-the `configure' script.  Here is an example of how to write a
-conditional that is true if the user uses the `--enable-debug' option.
+the ‘configure’ script.  Here is an example of how to write a
+conditional that is true if the user uses the ‘--enable-debug’ option.
 
      AC_ARG_ENABLE([debug],
      [  --enable-debug    Turn on debugging],
@@ -1810,7 +2033,7 @@ conditional that is true if the user uses the `--enable-debug' option.
      esac],[debug=false])
      AM_CONDITIONAL([DEBUG], [test x$debug = xtrue])
 
-   Here is an example of how to use that conditional in `Makefile.am':
+   Here is an example of how to use that conditional in ‘Makefile.am’:
 
      if DEBUG
      DBG = debug
@@ -1819,15 +2042,15 @@ conditional that is true if the user uses the `--enable-debug' option.
      endif
      noinst_PROGRAMS = $(DBG)
 
-   This trivial example could also be handled using `EXTRA_PROGRAMS'
+   This trivial example could also be handled using ‘EXTRA_PROGRAMS’
 (*note Conditional Programs::).
 
-   You may only test a single variable in an `if' statement, possibly
-negated using `!'.  The `else' statement may be omitted.  Conditionals
-may be nested to any depth.  You may specify an argument to `else' in
-which case it must be the negation of the condition used for the
-current `if'.  Similarly you may specify the condition that is closed
-on the `endif' line:
+   You may only test a single variable in an ‘if’ statement, possibly
+negated using ‘!’.  The ‘else’ statement may be omitted.  Conditionals
+may be nested to any depth.  You may specify an argument to ‘else’ in
+which case it must be the negation of the condition used for the current
+‘if’.  Similarly you may specify the condition that is closed on the
+‘endif’ line:
 
      if DEBUG
      DBG = debug
@@ -1835,25 +2058,25 @@ on the `endif' line:
      DBG =
      endif !DEBUG
 
-Unbalanced conditions are errors.  The `if', `else', and `endif'
+Unbalanced conditions are errors.  The ‘if’, ‘else’, and ‘endif’
 statements should not be indented, i.e., start on column one.
 
-   The `else' branch of the above two examples could be omitted, since
+   The ‘else’ branch of the above two examples could be omitted, since
 assigning the empty string to an otherwise undefined variable makes no
 difference.
 
    In order to allow access to the condition registered by
-`AM_CONDITIONAL' inside `configure.ac', and to allow conditional
-`AC_CONFIG_FILES', `AM_COND_IF' may be used:
+‘AM_CONDITIONAL’ inside ‘configure.ac’, and to allow conditional
+‘AC_CONFIG_FILES’, ‘AM_COND_IF’ may be used:
 
  -- Macro: AM_COND_IF (CONDITIONAL, [IF-TRUE], [IF-FALSE])
      If CONDITIONAL is fulfilled, execute IF-TRUE, otherwise execute
-     IF-FALSE.  If either branch contains `AC_CONFIG_FILES', it will
-     cause `automake' to output the rules for the respective files only
+     IF-FALSE.  If either branch contains ‘AC_CONFIG_FILES’, it will
+     cause ‘automake’ to output the rules for the respective files only
      for the given condition.
 
-   `AM_COND_IF' macros may be nested when m4 quotation is used properly
-(*note M4 Quotation: (autoconf)M4 Quotation.).
+   ‘AM_COND_IF’ macros may be nested when m4 quotation is used properly
+(*note (autoconf)M4 Quotation::).
 
    Here is an example of how to define a conditional config file:
 
@@ -1869,8 +2092,8 @@ File: automake.info,  Node: Limits of Conditionals,  Prev: Usage of Conditionals
 
 Conditionals should enclose complete statements like variables or rules
 definitions.  Automake cannot deal with conditionals used inside a
-variable definition, for instance, and is not even able to diagnose
-this situation.  The following example would not work:
+variable definition, for instance, and is not even able to diagnose this
+situation.  The following example would not work:
 
      # This syntax is not understood by Automake
      AM_CPPFLAGS = \
@@ -1880,7 +2103,7 @@ this situation.  The following example would not work:
      endif
        -DFEATURE_B
 
-   However the intended definition of `AM_CPPFLAGS' can be achieved with
+   However the intended definition of ‘AM_CPPFLAGS’ can be achieved with
 
      if WANT_DEBUG
        DEBUGFLAGS = -DDEBUG
@@ -1904,14 +2127,14 @@ Libtool Sources::).
 \1f
 File: automake.info,  Node: Silencing Make,  Next: Gnits,  Prev: Conditionals,  Up: Top
 
-21 Silencing `make'
+21 Silencing ‘make’
 *******************
 
 * Menu:
 
-* Make verbosity::               Make is verbose by default
-* Tricks For Silencing Make::    Standard and generic ways to silence make
-* Automake silent-rules Option:: How Automake can help in silencing make
+* Make verbosity::              Make is verbose by default
+* Tricks For Silencing Make::   Standard and generic ways to silence make
+* Automake Silent Rules::       How Automake can help in silencing make
 
 \1f
 File: automake.info,  Node: Make verbosity,  Next: Tricks For Silencing Make,  Up: Silencing Make
@@ -1920,9 +2143,9 @@ File: automake.info,  Node: Make verbosity,  Next: Tricks For Silencing Make,  U
 ===============================
 
 Normally, when executing the set of rules associated with a target,
-`make' prints each rule before it is executed.  This behaviour, while
+‘make’ prints each rule before it is executed.  This behaviour, while
 having been in place for a long time, and being even mandated by the
-POSIX standard, starkly violates the "silence is golden" UNIX
+POSIX standard, starkly violates the “silence is golden” UNIX
 principle(1):
 
      When a program has nothing interesting or surprising to say, it
@@ -1930,91 +2153,90 @@ principle(1):
      unobtrusively, with a minimum of fuss and bother.  Silence is
      golden.
 
-   In fact, while such verbosity of `make' can theoretically be useful
-to track bugs and understand reasons of failures right away, it can
-also hide warning and error messages from `make'-invoked tools,
-drowning them in a flood of uninteresting and seldom useful messages,
-and thus allowing them to go easily undetected.
+   In fact, while such verbosity of ‘make’ can theoretically be useful
+to track bugs and understand reasons of failures right away, it can also
+hide warning and error messages from ‘make’-invoked tools, drowning them
+in a flood of uninteresting and seldom useful messages, and thus
+allowing them to go easily undetected.
 
    This problem can be very annoying, especially for developers, who
-usually know quite well what's going on behind the scenes, and for whom
-the verbose output from `make' ends up being mostly noise that hampers
+usually know quite well whats going on behind the scenes, and for whom
+the verbose output from ‘make’ ends up being mostly noise that hampers
 the easy detection of potentially important warning messages.
 
    ---------- Footnotes ----------
 
-   (1) See also `http://catb.org/~esr/writings/taoup/html/ch11s09.html'.
+   (1) See also <http://catb.org/~esr/writings/taoup/html/ch11s09.html>.
 
 \1f
-File: automake.info,  Node: Tricks For Silencing Make,  Next: Automake silent-rules Option,  Prev: Make verbosity,  Up: Silencing Make
+File: automake.info,  Node: Tricks For Silencing Make,  Next: Automake Silent Rules,  Prev: Make verbosity,  Up: Silencing Make
 
 21.2 Standard and generic ways to silence make
 ==============================================
 
 Here we describe some common idioms/tricks to obtain a quieter make
 output, with their relative advantages and drawbacks.  In the next
-section (*note Automake silent-rules Option::) we'll see how Automake
-can help in this respect.
+section (*note Automake Silent Rules::) we’ll see how Automake can help
+in this respect, providing more elaborate and flexible idioms.
 
-   * `make -s'
+   • ‘make -s’
 
-     This simply causes `make' not to print _any_ rule before executing
+     This simply causes ‘make’ not to print _any_ rule before executing
      it.
 
-     The `-s' flag is mandated by POSIX, universally supported, and its
+     The ‘-s’ flag is mandated by POSIX, universally supported, and its
      purpose and function are easy to understand.
 
      But it also has its serious limitations too.  First of all, it
-     embodies an "all or nothing" strategy, i.e., either everything is
+     embodies an “all or nothing” strategy, i.e., either everything is
      silenced, or nothing is; this lack of granularity can sometimes be
-     a fatal flaw.  Moreover, when the `-s' flag is used, the `make'
+     a fatal flaw.  Moreover, when the ‘-s’ flag is used, the ‘make’
      output might turn out to be too much terse; in case of errors, the
-     user won't be able to easily see what rule or command have caused
-     them, or even, in case of tools with poor error reporting, what
-     the errors were!
+     user wont be able to easily see what rule or command have caused
+     them, or even, in case of tools with poor error reporting, what the
+     errors were!
 
-   * `make >/dev/null || make'
+   • ‘make >/dev/null || make’
 
-     Apparently, this perfectly obeys the "silence is golden" rule:
+     Apparently, this perfectly obeys the “silence is golden” rule:
      warnings from stderr are passed through, output reporting is done
      only in case of error, and in that case it should provide a
      verbose-enough report to allow an easy determination of the error
      location and causes.
 
-     However, calling `make' two times in a row might hide errors
+     However, calling ‘make’ two times in a row might hide errors
      (especially intermittent ones), or subtly change the expected
-     semantic of the `make' calls -- things these which can clearly make
+     semantic of the ‘make’ calls — things these which can clearly make
      debugging and error assessment very difficult.
 
-   * `make --no-print-directory'
+   • ‘make --no-print-directory’
 
-     This is GNU `make' specific.  When called with the
-     `--no-print-directory' option, GNU `make' will disable printing of
-     the working directory by invoked sub-`make's (the well-known
-     "Entering/Leaving directory ..." messages).  This helps to
-     decrease the verbosity of the output, but experience has shown that
-     it can also often render debugging considerably harder in projects
-     using deeply-nested `make' recursion.
-
-     As an aside, notice that the `--no-print-directory' option is
-     automatically activated if the `-s' flag is used.
+     This is GNU ‘make’ specific.  When called with the
+     ‘--no-print-directory’ option, GNU ‘make’ will disable printing of
+     the working directory by invoked sub-‘make’s (the well-known
+     “Entering/Leaving directory ...” messages).  This helps to decrease
+     the verbosity of the output, but experience has shown that it can
+     also often render debugging considerably harder in projects using
+     deeply-nested ‘make’ recursion.
 
+     As an aside, notice that the ‘--no-print-directory’ option is
+     automatically activated if the ‘-s’ flag is used.
 
 \1f
-File: automake.info,  Node: Automake silent-rules Option,  Prev: Tricks For Silencing Make,  Up: Silencing Make
+File: automake.info,  Node: Automake Silent Rules,  Prev: Tricks For Silencing Make,  Up: Silencing Make
 
 21.3 How Automake can help in silencing make
 ============================================
 
-The tricks and idioms for silencing `make' described in the previous
-section can be useful from time to time, but we've seen that they all
-have their serious drawbacks and limitations.  That's why automake
+The tricks and idioms for silencing ‘make’ described in the previous
+section can be useful from time to time, but weve seen that they all
+have their serious drawbacks and limitations.  Thats why automake
 provides support for a more advanced and flexible way of obtaining
-quieter output from `make': the `silent-rules' mode.
+quieter output from ‘make’ (for most rules at least).
 
-   To give the gist of what `silent-rules' can do, here is a simple
-comparison between a typical `make' output (where silent rules are
-disabled) and one with silent rules enabled:
+   To give the gist of what Automake can do in this respect, here is a
+simple comparison between a typical ‘make’ output (where silent rules
+are disabled) and one with silent rules enabled:
 
      % cat Makefile.am
      bin_PROGRAMS = foo
@@ -2059,8 +2281,8 @@ disabled) and one with silent rules enabled:
      func.c:4:3: warning: ‘i’ used uninitialized in this function
        CCLD   foo
 
-   Also, in projects using `libtool', the use of silent rules can
-automatically enable the `libtool''s `--silent' option:
+   Also, in projects using ‘libtool’, the use of silent rules can
+automatically enable the ‘libtool’’s ‘--silent’ option:
 
      % cat Makefile.am
      lib_LTLIBRARIES = libx.la
@@ -2082,74 +2304,65 @@ automatically enable the `libtool''s `--silent' option:
        CC     libx.lo
        CCLD   libx.la
 
-   Let's now see how the `silent-rules' mode interfaces with the
-package developer and the package user.
-
-   To enable the use of `silent-rules' in his package, a developer
-needs to do either of the following:
+   For Automake-generated ‘Makefile’s, the user may influence the
+verbosity at ‘configure’ run time as well as at ‘make’ run time:
 
-   * Add the `silent-rules' option as argument to `AM_INIT_AUTOMAKE'.
-
-   * Call the `AM_SILENT_RULES' macro from within the `configure.ac'
-     file.
-
-   It is not possible to instead specify `silent-rules' in a
-`Makefile.am' file.
-
-   If the developer has done either of the above, then the user of the
-package may influence the verbosity at `configure' run time as well as
-at `make' run time:
-
-   * Passing `--enable-silent-rules' to `configure' will cause build
-     rules to be less verbose; the option `--disable-silent-rules' will
+   • Passing ‘--enable-silent-rules’ to ‘configure’ will cause build
+     rules to be less verbose; the option ‘--disable-silent-rules’ will
      cause normal verbose output.
-
-   * At `make' run time, the default chosen at `configure' time may be
-     overridden: `make V=1' will produce verbose output, `make V=0'
-     less verbose output.
+   • At ‘make’ run time, the default chosen at ‘configure’ time may be
+     overridden: ‘make V=1’ will produce verbose output, ‘make V=0’ less
+     verbose output.
 
    Note that silent rules are _disabled_ by default; the user must
-enable them explicitly at either `configure' run time or at `make' run
-time.  We think that this is a good policy, since it provides the
-casual user with enough information to prepare a good bug report in
-case anything breaks.
+enable them explicitly at either ‘configure’ run time or at ‘make’ run
+time.  We think that this is a good policy, since it provides the casual
+user with enough information to prepare a good bug report in case
+anything breaks.
 
-   Still, notwithstanding the rationales above, a developer who wants to
-make silent rules enabled by default in his own package can do so by
-adding a `yes' argument to the `AM_SILENT_RULES' call in
-`configure.ac'.  We advise against this approach, though.
+   Still, notwithstanding the rationales above, a developer who really
+wants to make silent rules enabled by default in his own package can do
+so by calling ‘AM_SILENT_RULES([yes])’ in ‘configure.ac’.
 
    Users who prefer to have silent rules enabled by default can edit
-their `config.site' file to make the variable `enable_silent_rules'
-default to `yes'.  This should still allow disabling silent rules at
-`configure' time and at `make' time.
+their ‘config.site’ file to make the variable ‘enable_silent_rules’
+default to ‘yes’.  This should still allow disabling silent rules at
+‘configure’ time and at ‘make’ time.
 
-   For portability to different `make' implementations, package authors
-are advised to not set the variable `V' inside the `Makefile.am' file,
+   For portability to different ‘make’ implementations, package authors
+are advised to not set the variable ‘V’ inside the ‘Makefile.am’ file,
 to allow the user to override the value for subdirectories as well.
 
-   The current implementation of this feature normally uses nested
-variable expansion `$(VAR1$(V))', a `Makefile' feature that is not
-required by POSIX 2008 but is widely supported in practice.  The
-`silent-rules' option thus turns off warnings about recursive variable
-expansion, which are in turn enabled by `-Wportability' (*note automake
-Invocation::).  On the rare `make' implementations that do not support
-nested variable expansion, whether rules are silent is always
-determined at configure time, and cannot be overridden at make time.
-Future versions of POSIX are likely to require nested variable
-expansion, so this minor limitation should go away with time.
+   To work at its best, the current implementation of this feature
+normally uses nested variable expansion ‘$(VAR1$(V))’, a ‘Makefile’
+feature that is not required by POSIX 2008 but is widely supported in
+practice.  On the rare ‘make’ implementations that do not support nested
+variable expansion, whether rules are silent is always determined at
+configure time, and cannot be overridden at make time.  Future versions
+of POSIX are likely to require nested variable expansion, so this minor
+limitation should go away with time.
 
-   To extend the silent mode to your own rules, you have two choices:
+   To extend the silent mode to your own rules, you have few choices:
 
-   * You can use the predefined variable `AM_V_GEN' as a prefix to
+   • You can use the predefined variable ‘AM_V_GEN’ as a prefix to
      commands that should output a status line in silent mode, and
-     `AM_V_at' as a prefix to commands that should not output anything
+     ‘AM_V_at’ as a prefix to commands that should not output anything
      in silent mode.  When output is to be verbose, both of these
      variables will expand to the empty string.
 
-   * You can add your own variables, so strings of your own choice are
+   • You can silence a recipe unconditionally with ‘@’, and then use the
+     predefined variable ‘AM_V_P’ to know whether make is being run in
+     silent or verbose mode, adjust the verbose information your recipe
+     displays accordingly:
+
+          generate-headers:
+                          ... [commands defining a shell variable '$headers'] ...; \
+                  if $(AM_V_P); then set -x; else echo " GEN   [headers]"; fi; \
+                  rm -f $$headers && generate-header --flags $$headers
+
+   • You can add your own variables, so strings of your own choice are
      shown.  The following snippet shows how you would define your own
-     equivalent of `AM_V_GEN':
+     equivalent of ‘AM_V_GEN’:
 
           pkg_verbose = $(pkg_verbose_@AM_V@)
           pkg_verbose_ = $(pkg_verbose_@AM_DEFAULT_V@)
@@ -2158,197 +2371,147 @@ expansion, so this minor limitation should go away with time.
           foo: foo.in
                   $(pkg_verbose)cp $(srcdir)/foo.in $@
 
-
    As a final note, observe that, even when silent rules are enabled,
-the `--no-print-directory' option is still required with GNU `make' if
-the "Entering/Leaving directory ..." messages are to be disabled.
+the ‘--no-print-directory’ option is still required with GNU ‘make’ if
+the “Entering/Leaving directory ...” messages are to be disabled.
 
 \1f
-File: automake.info,  Node: Gnits,  Next: Cygnus,  Prev: Silencing Make,  Up: Top
+File: automake.info,  Node: Gnits,  Next: Not Enough,  Prev: Silencing Make,  Up: Top
 
-22 The effect of `--gnu' and `--gnits'
+22 The effect of ‘--gnu’ and ‘--gnits’
 **************************************
 
-The `--gnu' option (or `gnu' in the `AUTOMAKE_OPTIONS' variable) causes
-`automake' to check the following:
+The ‘--gnu’ option (or ‘gnu’ in the ‘AUTOMAKE_OPTIONS’ variable) causes
+‘automake’ to check the following:
 
-   * The files `INSTALL', `NEWS', `README', `AUTHORS', and `ChangeLog',
-     plus one of `COPYING.LIB', `COPYING.LESSER' or `COPYING', are
+   • The files ‘INSTALL’, ‘NEWS’, ‘README’, ‘AUTHORS’, and ‘ChangeLog’,
+     plus one of ‘COPYING.LIB’, ‘COPYING.LESSER’ or ‘COPYING’, are
      required at the topmost directory of the package.
 
-     If the `--add-missing' option is given, `automake' will add a
-     generic version of the `INSTALL' file as well as the `COPYING'
-     file containing the text of the current version of the GNU General
+     If the ‘--add-missing’ option is given, ‘automake’ will add a
+     generic version of the ‘INSTALL’ file as well as the ‘COPYING’ file
+     containing the text of the current version of the GNU General
      Public License existing at the time of this Automake release
      (version 3 as this is written,
-     `http://www.gnu.org/copyleft/gpl.html').  However, an existing
-     `COPYING' file will never be overwritten by `automake'.
+     <http://www.gnu.org/copyleft/gpl.html>).  However, an existing
+     ‘COPYING’ file will never be overwritten by ‘automake’.
 
-   * The options `no-installman' and `no-installinfo' are prohibited.
+   • The options ‘no-installman’ and ‘no-installinfo’ are prohibited.
 
    Note that this option will be extended in the future to do even more
 checking; it is advisable to be familiar with the precise requirements
-of the GNU standards.  Also, `--gnu' can require certain non-standard
+of the GNU standards.  Also, ‘--gnu’ can require certain non-standard
 GNU programs to exist for use by various maintainer-only rules; for
-instance, in the future `pathchk' might be required for `make dist'.
+instance, in the future ‘pathchk’ might be required for ‘make dist’.
 
-   The `--gnits' option does everything that `--gnu' does, and checks
+   The ‘--gnits’ option does everything that ‘--gnu’ does, and checks
 the following as well:
 
-   * `make installcheck' will check to make sure that the `--help' and
-     `--version' really print a usage message and a version string,
-     respectively.  This is the `std-options' option (*note Options::).
+   • ‘make installcheck’ will check to make sure that the ‘--help’ and
+     ‘--version’ really print a usage message and a version string,
+     respectively.  This is the ‘std-options’ option (*note Options::).
 
-   * `make dist' will check to make sure the `NEWS' file has been
+   • ‘make dist’ will check to make sure the ‘NEWS’ file has been
      updated to the current version.
 
-   * `VERSION' is checked to make sure its format complies with Gnits
+   • ‘VERSION’ is checked to make sure its format complies with Gnits
      standards.
 
-   * If `VERSION' indicates that this is an alpha release, and the file
-     `README-alpha' appears in the topmost directory of a package, then
-     it is included in the distribution.  This is done in `--gnits'
+   • If ‘VERSION’ indicates that this is an alpha release, and the file
+     ‘README-alpha’ appears in the topmost directory of a package, then
+     it is included in the distribution.  This is done in ‘--gnits’
      mode, and no other, because this mode is the only one where version
      number formats are constrained, and hence the only mode where
-     Automake can automatically determine whether `README-alpha' should
+     Automake can automatically determine whether ‘README-alpha’ should
      be included.
 
-   * The file `THANKS' is required.
+   • The file ‘THANKS’ is required.
 
 \1f
-File: automake.info,  Node: Cygnus,  Next: Not Enough,  Prev: Gnits,  Up: Top
+File: automake.info,  Node: Not Enough,  Next: Distributing,  Prev: Gnits,  Up: Top
 
-23 The effect of `--cygnus'
-***************************
-
-_The features described in this section are deprecated; you must not
-use any of them in new code, and should remove their use from older but
-still maintained code: they will be withdrawn the next major Automake
-release (1.13)._
-
-   Some packages, notably GNU GCC and GNU gdb, used to have a build
-environment originally written at Cygnus Support (subsequently renamed
-Cygnus Solutions, and then later purchased by Red Hat).  Packages with
-this ancestry are sometimes referred to as "Cygnus" trees.
-
-   A Cygnus tree has slightly different rules for how a `Makefile.in'
-is to be constructed.  Passing `--cygnus' to `automake' will cause any
-generated `Makefile.in' to comply with Cygnus rules.
-
-   Here are the precise effects of `--cygnus':
-
-   * The `foreign' strictness is implied.
-
-   * The options `no-installinfo', `no-dependencies' and `no-dist' are
-     implied (*note Options::).
-
-   * The macro `AM_MAINTAINER_MODE' is required.
-
-   * Info files are always created in the build directory, and not in
-     the source directory.  Packages that don't use the `cygnus' option
-     can emulate this effect by using the `no-installinfo' option and
-     listing the generated info files in the `CLEANFILES' variable.
-
-   * `texinfo.tex' is not required if a Texinfo source file is
-     specified.  The assumption is that the file will be supplied, but
-     in a place that Automake cannot find - it is an artifact of how
-     Cygnus packages are typically bundled.  This effect can be
-     emulated in packages not using the `cygnus' option with a proper
-     definition of the `TEXINFO_TEX' variable (*note Texinfo::).
-
-   * Certain tools will be searched for in the build tree as well as in
-     the user's `PATH'.  These tools are `runtest', `expect',
-     `makeinfo' and `texi2dvi'.
-
-   * The `check' target doesn't depend on `all'.
-
-\1f
-File: automake.info,  Node: Not Enough,  Next: Distributing,  Prev: Cygnus,  Up: Top
-
-24 When Automake Isn't Enough
+23 When Automake Isn’t Enough
 *****************************
 
 In some situations, where Automake is not up to one task, one has to
-resort to handwritten rules or even handwritten `Makefile's.
+resort to handwritten rules or even handwritten ‘Makefile’s.
 
 * Menu:
 
 * Extending::                   Adding new rules or overriding existing ones.
-* Third-Party Makefiles::       Integrating Non-Automake `Makefile's.
+* Third-Party Makefiles::       Integrating Non-Automake ‘Makefile’s.
 
 \1f
 File: automake.info,  Node: Extending,  Next: Third-Party Makefiles,  Up: Not Enough
 
-24.1 Extending Automake Rules
+23.1 Extending Automake Rules
 =============================
 
-With some minor exceptions (for example `_PROGRAMS' variables, `TESTS',
-or `XFAIL_TESTS') being rewritten to append `$(EXEEXT)'), the contents
-of a `Makefile.am' is copied to `Makefile.in' verbatim.
+With some minor exceptions (for example ‘_PROGRAMS’ variables, ‘TESTS’,
+or ‘XFAIL_TESTS’) being rewritten to append ‘$(EXEEXT)’), the contents
+of a ‘Makefile.am’ is copied to ‘Makefile.in’ verbatim.
 
    These copying semantics mean that many problems can be worked around
-by simply adding some `make' variables and rules to `Makefile.am'.
+by simply adding some ‘make’ variables and rules to ‘Makefile.am’.
 Automake will ignore these additions.
 
-   Since a `Makefile.in' is built from data gathered from three
-different places (`Makefile.am', `configure.ac', and `automake'
-itself), it is possible to have conflicting definitions of rules or
-variables.  When building `Makefile.in' the following priorities are
-respected by `automake' to ensure the user always has the last word:
+   Since a ‘Makefile.in’ is built from data gathered from three
+different places (‘Makefile.am’, ‘configure.ac’, and ‘automake’ itself),
+it is possible to have conflicting definitions of rules or variables.
+When building ‘Makefile.in’ the following priorities are respected by
+‘automake’ to ensure the user always has the last word:
 
-   * User defined variables in `Makefile.am' have priority over
-     variables `AC_SUBST'ed from `configure.ac', and `AC_SUBST'ed
-     variables have priority over `automake'-defined variables.
-
-   * As far as rules are concerned, a user-defined rule overrides any
-     `automake'-defined rule for the same target.
+   • User defined variables in ‘Makefile.am’ have priority over
+     variables ‘AC_SUBST’ed from ‘configure.ac’, and ‘AC_SUBST’ed
+     variables have priority over ‘automake’-defined variables.
+   • As far as rules are concerned, a user-defined rule overrides any
+     ‘automake’-defined rule for the same target.
 
    These overriding semantics make it possible to fine tune some default
-settings of Automake, or replace some of its rules.  Overriding
-Automake rules is often inadvisable, particularly in the topmost
-directory of a package with subdirectories.  The `-Woverride' option
-(*note automake Invocation::) comes in handy to catch overridden
-definitions.
+settings of Automake, or replace some of its rules.  Overriding Automake
+rules is often inadvisable, particularly in the topmost directory of a
+package with subdirectories.  The ‘-Woverride’ option (*note automake
+Invocation::) comes in handy to catch overridden definitions.
 
    Note that Automake does not make any distinction between rules with
 commands and rules that only specify dependencies.  So it is not
-possible to append new dependencies to an `automake'-defined target
+possible to append new dependencies to an ‘automake’-defined target
 without redefining the entire rule.
 
-   However, various useful targets have a `-local' version you can
-specify in your `Makefile.am'.  Automake will supplement the standard
+   However, various useful targets have a ‘-local’ version you can
+specify in your ‘Makefile.am’.  Automake will supplement the standard
 target with these user-supplied targets.
 
-   The targets that support a local version are `all', `info', `dvi',
-`ps', `pdf', `html', `check', `install-data', `install-dvi',
-`install-exec', `install-html', `install-info', `install-pdf',
-`install-ps', `uninstall', `installdirs', `installcheck' and the
-various `clean' targets (`mostlyclean', `clean', `distclean', and
-`maintainer-clean').
+   The targets that support a local version are ‘all’, ‘info’, ‘dvi’,
+‘ps’, ‘pdf’, ‘html’, ‘check’, ‘install-data’, ‘install-dvi’,
+‘install-exec’, ‘install-html’, ‘install-info’, ‘install-pdf’,
+‘install-ps’, ‘uninstall’, ‘installdirs’, ‘installcheck’ and the various
+‘clean’ targets (‘mostlyclean’, ‘clean’, ‘distclean’, and
+‘maintainer-clean’).
 
-   Note that there are no `uninstall-exec-local' or
-`uninstall-data-local' targets; just use `uninstall-local'.  It doesn't
+   Note that there are no ‘uninstall-exec-local’ or
+‘uninstall-data-local’ targets; just use ‘uninstall-local’.  It doesn’t
 make sense to uninstall just data or just executables.
 
-   For instance, here is one way to erase a subdirectory during `make
-clean' (*note Clean::).
+   For instance, here is one way to erase a subdirectory during make
+clean (*note Clean::).
 
      clean-local:
              -rm -rf testSubDir
 
-   You may be tempted to use `install-data-local' to install a file to
+   You may be tempted to use ‘install-data-local’ to install a file to
 some hard-coded location, but you should avoid this (*note Hard-Coded
 Install Paths::).
 
-   With the `-local' targets, there is no particular guarantee of
+   With the ‘-local’ targets, there is no particular guarantee of
 execution order; typically, they are run early, but with parallel make,
 there is no way to be sure of that.
 
    In contrast, some rules also have a way to run another rule, called a
-"hook"; hooks are always executed after the main rule's work is done.
-The hook is named after the principal target, with `-hook' appended.
-The targets allowing hooks are `install-data', `install-exec',
-`uninstall', `dist', and `distcheck'.
+“hook”; hooks are always executed after the main rule’s work is done.
+The hook is named after the principal target, with ‘-hook’ appended.
+The targets allowing hooks are ‘install-data’, ‘install-exec’,
+‘uninstall’, ‘dist’, and ‘distcheck’.
 
    For instance, here is how to create a hard link to an installed
 program:
@@ -2358,14 +2521,14 @@ program:
                 $(DESTDIR)$(bindir)/proglink$(EXEEXT)
 
    Although cheaper and more portable than symbolic links, hard links
-will not work everywhere (for instance, OS/2 does not have `ln').
-Ideally you should fall back to `cp -p' when `ln' does not work.  An
+will not work everywhere (for instance, OS/2 does not have ‘ln’).
+Ideally you should fall back to ‘cp -p’ when ‘ln’ does not work.  An
 easy way, if symbolic links are acceptable to you, is to add
-`AC_PROG_LN_S' to `configure.ac' (*note Particular Program Checks:
-(autoconf)Particular Programs.) and use `$(LN_S)' in `Makefile.am'.
+‘AC_PROG_LN_S’ to ‘configure.ac’ (*note Particular Program Checks:
+(autoconf)Particular Programs.) and use ‘$(LN_S)’ in ‘Makefile.am’.
 
    For instance, here is how you could install a versioned copy of a
-program using `$(LN_S)':
+program using ‘$(LN_S)’:
 
      install-exec-hook:
              cd $(DESTDIR)$(bindir) && \
@@ -2373,103 +2536,103 @@ program using `$(LN_S)':
                $(LN_S) prog-$(VERSION)$(EXEEXT) prog$(EXEEXT)
 
    Note that we rename the program so that a new version will erase the
-symbolic link, not the real binary.  Also we `cd' into the destination
+symbolic link, not the real binary.  Also we ‘cd’ into the destination
 directory in order to create relative links.
 
-   When writing `install-exec-hook' or `install-data-hook', please bear
+   When writing ‘install-exec-hook’ or ‘install-data-hook’, please bear
 in mind that the exec/data distinction is based on the installation
 directory, not on the primary used (*note The Two Parts of Install::).
-So a `foo_SCRIPTS' will be installed by `install-data', and a
-`barexec_SCRIPTS' will be installed by `install-exec'.  You should
+So a ‘foo_SCRIPTS’ will be installed by ‘install-data’, and a
+‘barexec_SCRIPTS’ will be installed by ‘install-exec’.  You should
 define your hooks consequently.
 
 \1f
 File: automake.info,  Node: Third-Party Makefiles,  Prev: Extending,  Up: Not Enough
 
-24.2 Third-Party `Makefile's
+23.2 Third-Party ‘Makefile’s
 ============================
 
-In most projects all `Makefile's are generated by Automake.  In some
+In most projects all ‘Makefile’s are generated by Automake.  In some
 cases, however, projects need to embed subdirectories with handwritten
-`Makefile's.  For instance, one subdirectory could be a third-party
+‘Makefile’s.  For instance, one subdirectory could be a third-party
 project with its own build system, not using Automake.
 
-   It is possible to list arbitrary directories in `SUBDIRS' or
-`DIST_SUBDIRS' provided each of these directories has a `Makefile' that
+   It is possible to list arbitrary directories in ‘SUBDIRS’ or
+‘DIST_SUBDIRS’ provided each of these directories has a ‘Makefile’ that
 recognizes all the following recursive targets.
 
    When a user runs one of these targets, that target is run recursively
 in all subdirectories.  This is why it is important that even
-third-party `Makefile's support them.
+third-party ‘Makefile’s support them.
 
-`all'
+‘all’
      Compile the entire package.  This is the default target in
-     Automake-generated `Makefile's, but it does not need to be the
-     default in third-party `Makefile's.
+     Automake-generated ‘Makefile’s, but it does not need to be the
+     default in third-party ‘Makefile’s.
 
-`distdir'
-     Copy files to distribute into `$(distdir)', before a tarball is
+‘distdir’
+     Copy files to distribute into ‘$(distdir)’, before a tarball is
      constructed.  Of course this target is not required if the
-     `no-dist' option (*note Options::) is used.
+     ‘no-dist’ option (*note Options::) is used.
 
-     The variables `$(top_distdir)' and `$(distdir)' (*note The dist
+     The variables ‘$(top_distdir)’ and ‘$(distdir)’ (*note The dist
      Hook::) will be passed from the outer package to the subpackage
-     when the `distdir' target is invoked.  These two variables have
+     when the ‘distdir’ target is invoked.  These two variables have
      been adjusted for the directory that is being recursed into, so
      they are ready to use.
 
-`install'
-`install-data'
-`install-exec'
-`uninstall'
+‘install’
+‘install-data’
+‘install-exec’
+‘uninstall’
      Install or uninstall files (*note Install::).
 
-`install-dvi'
-`install-html'
-`install-info'
-`install-ps'
-`install-pdf'
+‘install-dvi’
+‘install-html’
+‘install-info’
+‘install-ps’
+‘install-pdf’
      Install only some specific documentation format (*note Texinfo::).
 
-`installdirs'
+‘installdirs’
      Create install directories, but do not install any files.
 
-`check'
-`installcheck'
+‘check’
+‘installcheck’
      Check the package (*note Tests::).
 
-`mostlyclean'
-`clean'
-`distclean'
-`maintainer-clean'
+‘mostlyclean’
+‘clean’
+‘distclean’
+‘maintainer-clean’
      Cleaning rules (*note Clean::).
 
-`dvi'
-`pdf'
-`ps'
-`info'
-`html'
+‘dvi’
+‘pdf’
+‘ps’
+‘info’
+‘html’
      Build the documentation in various formats (*note Texinfo::).
 
-`tags'
-`ctags'
-     Build `TAGS' and `CTAGS' (*note Tags::).
+‘tags’
+‘ctags’
+     Build ‘TAGS’ and ‘CTAGS’ (*note Tags::).
 
    If you have ever used Gettext in a project, this is a good example of
-how third-party `Makefile's can be used with Automake.  The `Makefile's
-`gettextize' puts in the `po/' and `intl/' directories are handwritten
-`Makefile's that implement all these targets.  That way they can be
-added to `SUBDIRS' in Automake packages.
+how third-party ‘Makefile’s can be used with Automake.  The ‘Makefile’s
+‘gettextize’ puts in the ‘po/’ and ‘intl/’ directories are handwritten
+‘Makefile’s that implement all of these targets.  That way they can be
+added to ‘SUBDIRS’ in Automake packages.
 
-   Directories that are only listed in `DIST_SUBDIRS' but not in
-`SUBDIRS' need only the `distclean', `maintainer-clean', and `distdir'
+   Directories that are only listed in ‘DIST_SUBDIRS’ but not in
+‘SUBDIRS’ need only the ‘distclean’, ‘maintainer-clean’, and ‘distdir’
 rules (*note Conditional Subdirectories::).
 
    Usually, many of these rules are irrelevant to the third-party
-subproject, but they are required for the whole package to work.  It's
+subproject, but they are required for the whole package to work.  Its
 OK to have a rule that does nothing, so if you are integrating a
 third-party project with no documentation or tag support, you could
-simply augment its `Makefile' as follows:
+simply augment its ‘Makefile’ as follows:
 
      EMPTY_AUTOMAKE_TARGETS = dvi pdf ps info html tags ctags
      .PHONY: $(EMPTY_AUTOMAKE_TARGETS)
@@ -2478,32 +2641,31 @@ simply augment its `Makefile' as follows:
    Another aspect of integrating third-party build systems is whether
 they support VPATH builds (*note VPATH Builds::).  Obviously if the
 subpackage does not support VPATH builds the whole package will not
-support VPATH builds.  This in turns means that `make distcheck' will
+support VPATH builds.  This in turns means that ‘make distcheck’ will
 not work, because it relies on VPATH builds.  Some people can live
-without this (actually, many Automake users have never heard of `make
-distcheck').  Other people may prefer to revamp the existing
-`Makefile's to support VPATH.  Doing so does not necessarily require
-Automake, only Autoconf is needed (*note Build Directories:
-(autoconf)Build Directories.).  The necessary substitutions:
-`@srcdir@', `@top_srcdir@', and `@top_builddir@' are defined by
-`configure' when it processes a `Makefile' (*note Preset Output
-Variables: (autoconf)Preset Output Variables.), they are not computed
-by the Makefile like the aforementioned `$(distdir)' and
-`$(top_distdir)' variables.
-
-   It is sometimes inconvenient to modify a third-party `Makefile' to
+without this (actually, many Automake users have never heard of ‘make
+distcheck’).  Other people may prefer to revamp the existing ‘Makefile’s
+to support VPATH.  Doing so does not necessarily require Automake, only
+Autoconf is needed (*note Build Directories: (autoconf)Build
+Directories.).  The necessary substitutions: ‘@srcdir@’, ‘@top_srcdir@’,
+and ‘@top_builddir@’ are defined by ‘configure’ when it processes a
+‘Makefile’ (*note Preset Output Variables: (autoconf)Preset Output
+Variables.), they are not computed by the Makefile like the
+aforementioned ‘$(distdir)’ and ‘$(top_distdir)’ variables.
+
+   It is sometimes inconvenient to modify a third-party ‘Makefile’ to
 introduce the above required targets.  For instance, one may want to
 keep the third-party sources untouched to ease upgrades to new versions.
 
    Here are two other ideas.  If GNU make is assumed, one possibility is
-to add to that subdirectory a `GNUmakefile' that defines the required
-targets and includes the third-party `Makefile'.  For this to work in
-VPATH builds, `GNUmakefile' must lie in the build directory; the
-easiest way to do this is to write a `GNUmakefile.in' instead, and have
-it processed with `AC_CONFIG_FILES' from the outer package.  For
-example if we assume `Makefile' defines all targets except the
-documentation targets, and that the `check' target is actually called
-`test', we could write `GNUmakefile' (or `GNUmakefile.in') like this:
+to add to that subdirectory a ‘GNUmakefile’ that defines the required
+targets and includes the third-party ‘Makefile’.  For this to work in
+VPATH builds, ‘GNUmakefile’ must lie in the build directory; the easiest
+way to do this is to write a ‘GNUmakefile.in’ instead, and have it
+processed with ‘AC_CONFIG_FILES’ from the outer package.  For example if
+we assume ‘Makefile’ defines all targets except the documentation
+targets, and that the ‘check’ target is actually called ‘test’, we could
+write ‘GNUmakefile’ (or ‘GNUmakefile.in’) like this:
 
      # First, include the real Makefile
      include Makefile
@@ -2512,16 +2674,16 @@ documentation targets, and that the `check' target is actually called
      dvi pdf ps info html:
      check: test
 
-   A similar idea that does not use `include' is to write a proxy
-`Makefile' that dispatches rules to the real `Makefile', either with
-`$(MAKE) -f Makefile.real $(AM_MAKEFLAGS) target' (if it's OK to rename
-the original `Makefile') or with `cd subdir && $(MAKE) $(AM_MAKEFLAGS)
-target' (if it's OK to store the subdirectory project one directory
-deeper).  The good news is that this proxy `Makefile' can be generated
-with Automake.  All we need are `-local' targets (*note Extending::)
+   A similar idea that does not use ‘include’ is to write a proxy
+‘Makefile’ that dispatches rules to the real ‘Makefile’, either with
+‘$(MAKE) -f Makefile.real $(AM_MAKEFLAGS) target’ (if it’s OK to rename
+the original ‘Makefile’) or with ‘cd subdir && $(MAKE) $(AM_MAKEFLAGS)
+target’ (if it’s OK to store the subdirectory project one directory
+deeper).  The good news is that this proxy ‘Makefile’ can be generated
+with Automake.  All we need are ‘-local’ targets (*note Extending::)
 that perform the dispatch.  Of course the other Automake features are
 available, so you could decide to let Automake perform distribution or
-installation.  Here is a possible `Makefile.am':
+installation.  Here is a possible ‘Makefile.am’:
 
      all-local:
              cd subdir && $(MAKE) $(AM_MAKEFLAGS) all
@@ -2543,29 +2705,29 @@ installation.  Here is a possible `Makefile.am':
 
    Pushing this idea to the extreme, it is also possible to ignore the
 subproject build system and build everything from this proxy
-`Makefile.am'.  This might sound very sensible if you need VPATH builds
+‘Makefile.am’.  This might sound very sensible if you need VPATH builds
 but the subproject does not support them.
 
 \1f
 File: automake.info,  Node: Distributing,  Next: API Versioning,  Prev: Not Enough,  Up: Top
 
-25 Distributing `Makefile.in's
+24 Distributing ‘Makefile.in’s
 ******************************
 
 Automake places no restrictions on the distribution of the resulting
-`Makefile.in's.  We still encourage software authors to distribute
-their work under terms like those of the GPL, but doing so is not
-required to use Automake.
+‘Makefile.in’s.  We still encourage software authors to distribute their
+work under terms like those of the GPL, but doing so is not required to
+use Automake.
 
    Some of the files that can be automatically installed via the
-`--add-missing' switch do fall under the GPL.  However, these also have
+‘--add-missing’ switch do fall under the GPL.  However, these also have
 a special exception allowing you to distribute them with your package,
 regardless of the licensing you choose.
 
 \1f
 File: automake.info,  Node: API Versioning,  Next: Upgrading,  Prev: Distributing,  Up: Top
 
-26 Automake API Versioning
+25 Automake API Versioning
 **************************
 
 New Automake releases usually include bug fixes and new features.
@@ -2576,30 +2738,30 @@ version.
    Things get worse when maintaining a large tree of packages, each one
 requiring a different version of Automake.  In the past, this meant that
 any developer (and sometimes users) had to install several versions of
-Automake in different places, and switch `$PATH' appropriately for each
+Automake in different places, and switch ‘$PATH’ appropriately for each
 package.
 
    Starting with version 1.6, Automake installs versioned binaries.
 This means you can install several versions of Automake in the same
-`$prefix', and can select an arbitrary Automake version by running
-`automake-1.6' or `automake-1.7' without juggling with `$PATH'.
-Furthermore, `Makefile''s generated by Automake 1.6 will use
-`automake-1.6' explicitly in their rebuild rules.
+‘$prefix’, and can select an arbitrary Automake version by running
+‘automake-1.6’ or ‘automake-1.7’ without juggling with ‘$PATH’.
+Furthermore, ‘Makefile’’s generated by Automake 1.6 will use
+‘automake-1.6’ explicitly in their rebuild rules.
 
-   The number `1.6' in `automake-1.6' is Automake's API version, not
-Automake's version.  If a bug fix release is made, for instance
-Automake 1.6.1, the API version will remain 1.6.  This means that a
-package that works with Automake 1.6 should also work with 1.6.1; after
-all, this is what people expect from bug fix releases.
+   The number ‘1.6’ in ‘automake-1.6’ is Automake’s API version, not
+Automake’s version.  If a bug fix release is made, for instance Automake
+1.6.1, the API version will remain 1.6.  This means that a package that
+works with Automake 1.6 should also work with 1.6.1; after all, this is
+what people expect from bug fix releases.
 
    If your package relies on a feature or a bug fix introduced in a
 release, you can pass this version as an option to Automake to ensure
 older releases will not be used.  For instance, use this in your
-`configure.ac':
+‘configure.ac’:
 
        AM_INIT_AUTOMAKE([1.6.1])    dnl Require Automake 1.6.1 or better.
 
-or, in a particular `Makefile.am':
+or, in a particular ‘Makefile.am’:
 
        AUTOMAKE_OPTIONS = 1.6.1   # Require Automake 1.6.1 or better.
 
@@ -2609,11 +2771,11 @@ requested version.
 What is in the API
 ==================
 
-Automake's programming interface is not easy to define.  Basically it
+Automakes programming interface is not easy to define.  Basically it
 should include at least all *documented* variables and targets that a
-`Makefile.am' author can use, any behavior associated with them (e.g.,
-the places where `-hook''s are run), the command line interface of
-`automake' and `aclocal', ...
+‘Makefile.am’ author can use, any behavior associated with them (e.g.,
+the places where ‘-hook’’s are run), the command line interface of
+‘automake’ and ‘aclocal’, ...
 
 What is not in the API
 ======================
@@ -2630,25 +2792,22 @@ test-suite.
 \1f
 File: automake.info,  Node: Upgrading,  Next: FAQ,  Prev: API Versioning,  Up: Top
 
-27 Upgrading a Package to a Newer Automake Version
+26 Upgrading a Package to a Newer Automake Version
 **************************************************
 
 Automake maintains three kind of files in a package.
 
-   * `aclocal.m4'
-
-   * `Makefile.in's
+   • ‘aclocal.m4’
+   • ‘Makefile.in’s
+   • auxiliary tools like ‘install-sh’ or ‘py-compile’
 
-   * auxiliary tools like `install-sh' or `py-compile'
+   ‘aclocal.m4’ is generated by ‘aclocal’ and contains some
+Automake-supplied M4 macros.  Auxiliary tools are installed by ‘automake
+--add-missing’ when needed.  ‘Makefile.in’s are built from ‘Makefile.am’
+by ‘automake’, and rely on the definitions of the M4 macros put in
+‘aclocal.m4’ as well as the behavior of the auxiliary tools installed.
 
-   `aclocal.m4' is generated by `aclocal' and contains some
-Automake-supplied M4 macros.  Auxiliary tools are installed by
-`automake --add-missing' when needed.  `Makefile.in's are built from
-`Makefile.am' by `automake', and rely on the definitions of the M4
-macros put in `aclocal.m4' as well as the behavior of the auxiliary
-tools installed.
-
-   Because all these files are closely related, it is important to
+   Because all of these files are closely related, it is important to
 regenerate all of them when upgrading to a newer Automake release.  The
 usual way to do that is
 
@@ -2660,28 +2819,28 @@ or more conveniently:
 
      autoreconf -vfi
 
-   The use of `--force-missing' ensures that auxiliary tools will be
+   The use of ‘--force-missing’ ensures that auxiliary tools will be
 overridden by new versions (*note automake Invocation::).
 
-   It is important to regenerate all these files each time Automake is
-upgraded, even between bug fixes releases.  For instance, it is not
+   It is important to regenerate all of these files each time Automake
+is upgraded, even between bug fixes releases.  For instance, it is not
 unusual for a bug fix to involve changes to both the rules generated in
-`Makefile.in' and the supporting M4 macros copied to `aclocal.m4'.
+‘Makefile.in’ and the supporting M4 macros copied to ‘aclocal.m4’.
 
-   Presently `automake' is able to diagnose situations where
-`aclocal.m4' has been generated with another version of `aclocal'.
+   Presently ‘automake’ is able to diagnose situations where
+‘aclocal.m4’ has been generated with another version of ‘aclocal’.
 However it never checks whether auxiliary scripts are up-to-date.  In
-other words, `automake' will tell you when `aclocal' needs to be rerun,
-but it will never diagnose a missing `--force-missing'.
+other words, ‘automake’ will tell you when ‘aclocal’ needs to be rerun,
+but it will never diagnose a missing ‘--force-missing’.
 
    Before upgrading to a new major release, it is a good idea to read
-the file `NEWS'.  This file lists all changes between releases: new
+the file ‘NEWS’.  This file lists all changes between releases: new
 features, obsolete constructs, known incompatibilities, and workarounds.
 
 \1f
 File: automake.info,  Node: FAQ,  Next: Copying This Manual,  Prev: Upgrading,  Up: Top
 
-28 Frequently Asked Questions about Automake
+27 Frequently Asked Questions about Automake
 ********************************************
 
 This chapter covers some questions that often come up on the mailing
@@ -2691,7 +2850,7 @@ lists.
 
 * CVS::                         CVS and generated files
 * maintainer-mode::             missing and AM_MAINTAINER_MODE
-* Wildcards::                   Why doesn't Automake support wildcards?
+* Wildcards::                   Why doesnt Automake support wildcards?
 * Limitations on File Names::   Limitations on source and installed file names
 * Errors with distclean::       Files left in build directory after distclean
 * Flag Variables Ordering::     CFLAGS vs. AM_CFLAGS vs. mumble_CFLAGS
@@ -2699,54 +2858,54 @@ lists.
 * Per-Object Flags::            How to simulate per-object flags?
 * Multiple Outputs::            Writing rules for tools with many output files
 * Hard-Coded Install Paths::    Installing to hard-coded locations
-* Debugging Make Rules::        Strategies when things don't work as expected
+* Debugging Make Rules::        Strategies when things dont work as expected
 * Reporting Bugs::              Feedback on bugs and feature requests
 
 \1f
 File: automake.info,  Node: CVS,  Next: maintainer-mode,  Up: FAQ
 
-28.1 CVS and generated files
+27.1 CVS and generated files
 ============================
 
 Background: distributed generated Files
 ---------------------------------------
 
 Packages made with Autoconf and Automake ship with some generated files
-like `configure' or `Makefile.in'.  These files were generated on the
-developer's host and are distributed so that end-users do not have to
+like ‘configure’ or ‘Makefile.in’.  These files were generated on the
+developer’s machine and are distributed so that end-users do not have to
 install the maintainer tools required to rebuild them.  Other generated
 files like Lex scanners, Yacc parsers, or Info documentation, are
 usually distributed on similar grounds.
 
-   Automake outputs rules in `Makefile's to rebuild these files.  For
-instance, `make' will run `autoconf' to rebuild `configure' whenever
-`configure.ac' is changed.  This makes development safer by ensuring a
-`configure' is never out-of-date with respect to `configure.ac'.
+   Automake output rules in ‘Makefile’s to rebuild these files.  For
+instance, ‘make’ will run ‘autoconf’ to rebuild ‘configure’ whenever
+‘configure.ac’ is changed.  This makes development safer by ensuring a
+‘configure’ is never out-of-date with respect to ‘configure.ac’.
 
    As generated files shipped in packages are up-to-date, and because
-`tar' preserves times-tamps, these rebuild rules are not triggered when
+‘tar’ preserves times-tamps, these rebuild rules are not triggered when
 a user unpacks and builds a package.
 
 Background: CVS and Timestamps
 ------------------------------
 
 Unless you use CVS keywords (in which case files must be updated at
-commit time), CVS preserves timestamp during `cvs commit' and `cvs
-import -d' operations.
+commit time), CVS preserves timestamp during ‘cvs commit’ and ‘cvs
+import -d operations.
 
-   When you check out a file using `cvs checkout' its timestamp is set
+   When you check out a file using ‘cvs checkout’ its timestamp is set
 to that of the revision that is being checked out.
 
-   However, during `cvs update', files will have the date of the
-update, not the original timestamp of this revision.  This is meant to
-make sure that `make' notices sources files have been updated.
+   However, during ‘cvs update’, files will have the date of the update,
+not the original timestamp of this revision.  This is meant to make sure
+that ‘make’ notices sources files have been updated.
 
    This timestamp shift is troublesome when both sources and generated
-files are kept under CVS.  Because CVS processes files in lexical
-order, `configure.ac' will appear newer than `configure' after a `cvs
-update' that updates both files, even if `configure' was newer than
-`configure.ac' when it was checked in.  Calling `make' will then
-trigger a spurious rebuild of `configure'.
+files are kept under CVS.  Because CVS processes files in lexical order,
+‘configure.ac’ will appear newer than ‘configure’ after a ‘cvs update’
+that updates both files, even if ‘configure’ was newer than
+‘configure.ac’ when it was checked in.  Calling ‘make’ will then trigger
+a spurious rebuild of ‘configure’.
 
 Living with CVS in Autoconfiscated Projects
 -------------------------------------------
@@ -2758,77 +2917,104 @@ keep generated files _out_ of CVS.
 All Files in CVS
 ................
 
-   * The CVS repository contains all distributed files so you know
-     exactly what is distributed, and you can checkout any prior
-     version entirely.
+    The CVS repository contains all distributed files so you know
+     exactly what is distributed, and you can checkout any prior version
+     entirely.
 
-   * Maintainers can see how generated files evolve (for instance, you
-     can see what happens to your `Makefile.in's when you upgrade
+    Maintainers can see how generated files evolve (for instance, you
+     can see what happens to your ‘Makefile.in’s when you upgrade
      Automake and make sure they look OK).
 
-   * Users do not need the autotools to build a checkout of the
-     project, it works just like a released tarball.
+   • Users do not need the autotools to build a checkout of the project,
+     it works just like a released tarball.
 
-   * If users use `cvs update' to update their copy, instead of `cvs
-     checkout' to fetch a fresh one, timestamps will be inaccurate.
+   • If users use ‘cvs update’ to update their copy, instead of ‘cvs
+     checkout to fetch a fresh one, timestamps will be inaccurate.
      Some rebuild rules will be triggered and attempt to run developer
-     tools such as `autoconf' or `automake'.
-
-     Actually, calls to such tools are all wrapped into a call to the
-     `missing' script discussed later (*note maintainer-mode::).
-     `missing' will take care of fixing the timestamps when these tools
-     are not installed, so that the build can continue.
-
-   * In distributed development, developers are likely to have different
+     tools such as ‘autoconf’ or ‘automake’.
+
+     Calls to such tools are all wrapped into a call to the ‘missing’
+     script discussed later (*note maintainer-mode::), so that the user
+     will see more descriptive warnings about missing or out-of-date
+     tools, and possible suggestions about how to obtain them, rather
+     than just some “command not found” error, or (worse) some obscure
+     message from some older version of the required tool they happen to
+     have installed.
+
+     Maintainers interested in keeping their package buildable from a
+     CVS checkout even for those users that lack maintainer-specific
+     tools might want to provide an helper script (or to enhance their
+     existing bootstrap script) to fix the timestamps after a ‘cvs
+     update’ or a ‘git checkout’, to prevent spurious rebuilds.  In case
+     of a project committing the Autotools-generated files, as well as
+     the generated ‘.info’ files, such script might look something like
+     this:
+
+          #!/bin/sh
+          # fix-timestamp.sh: prevents useless rebuilds after "cvs update"
+          sleep 1
+          # aclocal-generated aclocal.m4 depends on locally-installed
+          # '.m4' macro files, as well as on 'configure.ac'
+          touch aclocal.m4
+          sleep 1
+          # autoconf-generated configure depends on aclocal.m4 and on
+          # configure.ac
+          touch configure
+          # so does autoheader-generated config.h.in
+          touch config.h.in
+          # and all the automake-generated Makefile.in files
+          touch `find . -name Makefile.in -print`
+          # finally, the makeinfo-generated '.info' files depend on the
+          # corresponding '.texi' files
+          touch doc/*.info
+
+   • In distributed development, developers are likely to have different
      version of the maintainer tools installed.  In this case rebuilds
      triggered by timestamp lossage will lead to spurious changes to
      generated files.  There are several solutions to this:
 
-        * All developers should use the same versions, so that the
+         All developers should use the same versions, so that the
           rebuilt files are identical to files in CVS.  (This starts to
           be difficult when each project you work on uses different
           versions.)
-
-        * Or people use a script to fix the timestamp after a checkout
+        • Or people use a script to fix the timestamp after a checkout
           (the GCC folks have such a script).
+        • Or ‘configure.ac’ uses ‘AM_MAINTAINER_MODE’, which will
+          disable all of these rebuild rules by default.  This is
+          further discussed in *note maintainer-mode::.
 
-        * Or `configure.ac' uses `AM_MAINTAINER_MODE', which will
-          disable all these rebuild rules by default.  This is further
-          discussed in *note maintainer-mode::.
-
-   * Although we focused on spurious rebuilds, the converse can also
-     happen.  CVS's timestamp handling can also let you think an
+   • Although we focused on spurious rebuilds, the converse can also
+     happen.  CVS’s timestamp handling can also let you think an
      out-of-date file is up-to-date.
 
-     For instance, suppose a developer has modified `Makefile.am' and
-     has rebuilt `Makefile.in', and then decides to do a last-minute
-     change to `Makefile.am' right before checking in both files
-     (without rebuilding `Makefile.in' to account for the change).
+     For instance, suppose a developer has modified ‘Makefile.am’ and
+     has rebuilt ‘Makefile.in’, and then decides to do a last-minute
+     change to ‘Makefile.am’ right before checking in both files
+     (without rebuilding ‘Makefile.in’ to account for the change).
 
-     This last change to `Makefile.am' makes the copy of `Makefile.in'
+     This last change to ‘Makefile.am’ makes the copy of ‘Makefile.in’
      out-of-date.  Since CVS processes files alphabetically, when
-     another developer `cvs update's his or her tree, `Makefile.in'
-     will happen to be newer than `Makefile.am'.  This other developer
-     will not see that `Makefile.in' is out-of-date.
-
+     another developer ‘cvs update’s his or her tree, ‘Makefile.in’ will
+     happen to be newer than ‘Makefile.am’.  This other developer will
+     not see that ‘Makefile.in’ is out-of-date.
 
 Generated Files out of CVS
 ..........................
 
-One way to get CVS and `make' working peacefully is to never store
+One way to get CVS and ‘make’ working peacefully is to never store
 generated files in CVS, i.e., do not CVS-control files that are
-`Makefile' targets (also called _derived_ files).
+‘Makefile’ targets (also called _derived_ files).
 
    This way developers are not annoyed by changes to generated files.
 It does not matter if they all have different versions (assuming they
 are compatible, of course).  And finally, timestamps are not lost,
-changes to sources files can't be missed as in the
-`Makefile.am'/`Makefile.in' example discussed earlier.
+changes to sources files cant be missed as in the
+‘Makefile.am’/‘Makefile.in’ example discussed earlier.
 
    The drawback is that the CVS repository is not an exact copy of what
 is distributed and that users now need to install various development
 tools (maybe even specific versions) before they can build a checkout.
-But, after all, CVS's job is versioning, not distribution.
+But, after all, CVSs job is versioning, not distribution.
 
    Allowing developers to use different versions of their tools can also
 hide bugs during distributed development.  Indeed, developers will be
@@ -2836,7 +3022,7 @@ using (hence testing) their own generated files, instead of the
 generated files that will be released actually.  The developer who
 prepares the tarball might be using a version of the tool that produces
 bogus output (for instance a non-portable C file), something other
-developers could have noticed if they weren't using their own versions
+developers could have noticed if they werent using their own versions
 of this tool.
 
 Third-party Files
@@ -2844,169 +3030,169 @@ Third-party Files
 
 Another class of files not discussed here (because they do not cause
 timestamp issues) are files that are shipped with a package, but
-maintained elsewhere.  For instance, tools like `gettextize' and
-`autopoint' (from Gettext) or `libtoolize' (from Libtool), will install
+maintained elsewhere.  For instance, tools like ‘gettextize’ and
+‘autopoint’ (from Gettext) or ‘libtoolize’ (from Libtool), will install
 or update files in your package.
 
    These files, whether they are kept under CVS or not, raise similar
-concerns about version mismatch between developers' tools.  The Gettext
+concerns about version mismatch between developers tools.  The Gettext
 manual has a section about this, see *note CVS Issues: (gettext)CVS
 Issues.
 
 \1f
 File: automake.info,  Node: maintainer-mode,  Next: Wildcards,  Prev: CVS,  Up: FAQ
 
-28.2 `missing' and `AM_MAINTAINER_MODE'
+27.2 ‘missing’ and ‘AM_MAINTAINER_MODE’
 =======================================
 
-`missing'
+‘missing’
 ---------
 
-The `missing' script is a wrapper around several maintainer tools,
+The ‘missing’ script is a wrapper around several maintainer tools,
 designed to warn users if a maintainer tool is required but missing.
-Typical maintainer tools are `autoconf', `automake', `bison', etc.
-Because file generated by these tools are shipped with the other
-sources of a package, these tools shouldn't be required during a user
-build and they are not checked for in `configure'.
+Typical maintainer tools are ‘autoconf’, ‘automake’, ‘bison’, etc.
+Because file generated by these tools are shipped with the other sources
+of a package, these tools shouldn’t be required during a user build and
+they are not checked for in ‘configure’.
 
    However, if for some reason a rebuild rule is triggered and involves
-a missing tool, `missing' will notice it and warn the user.  Besides
-the warning, when a tool is missing, `missing' will attempt to fix
-timestamps in a way that allows the build to continue.  For instance,
-`missing' will touch `configure' if `autoconf' is not installed.  When
-all distributed files are kept under version control, this feature of
-`missing' allows a user _with no maintainer tools_ to build a package
-off its version control repository, bypassing any timestamp
-inconsistency (implied by e.g. `cvs update' or `git clone').
-
-   If the required tool is installed, `missing' will run it and won't
-attempt to continue after failures.  This is correct during
-development: developers love fixing failures.  However, users with
-wrong versions of maintainer tools may get an error when the rebuild
-rule is spuriously triggered, halting the build.  This failure to let
-the build continue is one of the arguments of the `AM_MAINTAINER_MODE'
-advocates.
-
-`AM_MAINTAINER_MODE'
+a missing tool, ‘missing’ will notice it and warn the user, even
+suggesting how to obtain such a tool (at least in case it is a
+well-known one, like ‘makeinfo’ or ‘bison’).  This is more helpful and
+user-friendly than just having the rebuild rules spewing out a terse
+error message like ‘sh: TOOL: command not found’.  Similarly, ‘missing’
+will warn the user if it detects that a maintainer tool it attempted to
+use seems too old (be warned that diagnosing this correctly is typically
+more difficult that detecting missing tools, and requires cooperation
+from the tool itself, so it won’t always work).
+
+   If the required tool is installed, ‘missing’ will run it and won’t
+attempt to continue after failures.  This is correct during development:
+developers love fixing failures.  However, users with missing or too old
+maintainer tools may get an error when the rebuild rule is spuriously
+triggered, halting the build.  This failure to let the build continue is
+one of the arguments of the ‘AM_MAINTAINER_MODE’ advocates.
+
+‘AM_MAINTAINER_MODE’
 --------------------
 
-`AM_MAINTAINER_MODE' allows you to choose whether the so called
-"rebuild rules" should be enabled or disabled.  With
-`AM_MAINTAINER_MODE([enable])', they are enabled by default, otherwise
+‘AM_MAINTAINER_MODE’ allows you to choose whether the so called "rebuild
+rules" should be enabled or disabled.  With
+‘AM_MAINTAINER_MODE([enable])’, they are enabled by default, otherwise
 they are disabled by default.  In the latter case, if you have
-`AM_MAINTAINER_MODE' in `configure.ac', and run `./configure && make',
-then `make' will *never* attempt to rebuild `configure',
-`Makefile.in's, Lex or Yacc outputs, etc.  I.e., this disables build
-rules for files that are usually distributed and that users should
-normally not have to update.
+‘AM_MAINTAINER_MODE’ in ‘configure.ac’, and run ‘./configure && make’,
+then ‘make’ will *never* attempt to rebuild ‘configure’, ‘Makefile.in’s,
+Lex or Yacc outputs, etc.  I.e., this disables build rules for files
+that are usually distributed and that users should normally not have to
+update.
 
    The user can override the default setting by passing either
-`--enable-maintainer-mode' or `--disable-maintainer-mode' to
-`configure'.
+‘--enable-maintainer-mode’ or ‘--disable-maintainer-mode’ to
+‘configure’.
 
-   People use `AM_MAINTAINER_MODE' either because they do not want their
+   People use ‘AM_MAINTAINER_MODE’ either because they do not want their
 users (or themselves) annoyed by timestamps lossage (*note CVS::), or
-because they simply can't stand the rebuild rules and prefer running
+because they simply cant stand the rebuild rules and prefer running
 maintainer tools explicitly.
 
-   `AM_MAINTAINER_MODE' also allows you to disable some custom build
+   ‘AM_MAINTAINER_MODE’ also allows you to disable some custom build
 rules conditionally.  Some developers use this feature to disable rules
 that need exotic tools that users may not have available.
 
-   Several years ago Franc,ois Pinard pointed out several arguments
-against this `AM_MAINTAINER_MODE' macro.  Most of them relate to
+   Several years ago François Pinard pointed out several arguments
+against this ‘AM_MAINTAINER_MODE’ macro.  Most of them relate to
 insecurity.  By removing dependencies you get non-dependable builds:
 changes to sources files can have no effect on generated files and this
-can be very confusing when unnoticed.  He adds that security shouldn't
-be reserved to maintainers (what `--enable-maintainer-mode' suggests),
-on the contrary.  If one user has to modify a `Makefile.am', then
-either `Makefile.in' should be updated or a warning should be output
-(this is what Automake uses `missing' for) but the last thing you want
-is that nothing happens and the user doesn't notice it (this is what
-happens when rebuild rules are disabled by `AM_MAINTAINER_MODE').
-
-   Jim Meyering, the inventor of the `AM_MAINTAINER_MODE' macro was
-swayed by Franc,ois's arguments, and got rid of `AM_MAINTAINER_MODE' in
+can be very confusing when unnoticed.  He adds that security shouldnt
+be reserved to maintainers (what ‘--enable-maintainer-mode’ suggests),
+on the contrary.  If one user has to modify a ‘Makefile.am’, then either
+‘Makefile.in’ should be updated or a warning should be output (this is
+what Automake uses ‘missing’ for) but the last thing you want is that
+nothing happens and the user doesn’t notice it (this is what happens
+when rebuild rules are disabled by ‘AM_MAINTAINER_MODE’).
+
+   Jim Meyering, the inventor of the ‘AM_MAINTAINER_MODE’ macro was
+swayed by François’s arguments, and got rid of ‘AM_MAINTAINER_MODE’ in
 all of his packages.
 
-   Still many people continue to use `AM_MAINTAINER_MODE', because it
+   Still many people continue to use ‘AM_MAINTAINER_MODE’, because it
 helps them working on projects where all files are kept under version
-control, and because `missing' isn't enough if you have the wrong
+control, and because ‘missing’ isn’t enough if you have the wrong
 version of the tools.
 
 \1f
 File: automake.info,  Node: Wildcards,  Next: Limitations on File Names,  Prev: maintainer-mode,  Up: FAQ
 
-28.3 Why doesn't Automake support wildcards?
+27.3 Why doesn’t Automake support wildcards?
 ============================================
 
 Developers are lazy.  They would often like to use wildcards in
-`Makefile.am's, so that they would not need to remember to update
-`Makefile.am's every time they add, delete, or rename a file.
+‘Makefile.am’s, so that they would not need to remember to update
+‘Makefile.am’s every time they add, delete, or rename a file.
 
    There are several objections to this:
-   * When using CVS (or similar) developers need to remember they have
-     to run `cvs add' or `cvs rm' anyway.  Updating `Makefile.am'
+    When using CVS (or similar) developers need to remember they have
+     to run ‘cvs add’ or ‘cvs rm’ anyway.  Updating ‘Makefile.am’
      accordingly quickly becomes a reflex.
 
-     Conversely, if your application doesn't compile because you forgot
-     to add a file in `Makefile.am', it will help you remember to `cvs
-     add' it.
+     Conversely, if your application doesnt compile because you forgot
+     to add a file in ‘Makefile.am’, it will help you remember to ‘cvs
+     add it.
 
-   * Using wildcards makes it easy to distribute files by mistake.  For
+    Using wildcards makes it easy to distribute files by mistake.  For
      instance, some code a developer is experimenting with (a test case,
      say) that should not be part of the distribution.
 
-   * Using wildcards it's easy to omit some files by mistake.  For
+   • Using wildcards it’s easy to omit some files by mistake.  For
      instance, one developer creates a new file, uses it in many places,
      but forgets to commit it.  Another developer then checks out the
-     incomplete project and is able to run `make dist' successfully,
-     even though a file is missing. By listing files, `make dist'
+     incomplete project and is able to run ‘make dist’ successfully,
+     even though a file is missing.  By listing files, ‘make dist’
      _will_ complain.
 
-   * Wildcards are not portable to some non-GNU `make' implementations,
-     e.g., NetBSD `make' will not expand globs such as `*' in
+   • Wildcards are not portable to some non-GNU ‘make’ implementations,
+     e.g., NetBSD ‘make’ will not expand globs such as ‘*’ in
      prerequisites of a target.
 
-   * Finally, it's really hard to _forget_ to add a file to
-     `Makefile.am': files that are not listed in `Makefile.am' are not
-     compiled or installed, so you can't even test them.
+   • Finally, it’s really hard to _forget_ to add a file to
+     ‘Makefile.am’: files that are not listed in ‘Makefile.am’ are not
+     compiled or installed, so you cant even test them.
 
    Still, these are philosophical objections, and as such you may
 disagree, or find enough value in wildcards to dismiss all of them.
 Before you start writing a patch against Automake to teach it about
-wildcards, let's see the main technical issue: portability.
+wildcards, lets see the main technical issue: portability.
 
-   Although `$(wildcard ...)' works with GNU `make', it is not portable
-to other `make' implementations.
+   Although ‘$(wildcard ...)’ works with GNU ‘make’, it is not portable
+to other ‘make’ implementations.
 
-   The only way Automake could support `$(wildcard ...)' is by
-expending `$(wildcard ...)' when `automake' is run.  The resulting
-`Makefile.in's would be portable since they would list all files and
-not use `$(wildcard ...)'.  However that means developers would need to
-remember to run `automake' each time they add, delete, or rename files.
+   The only way Automake could support ‘$(wildcard ...)’ is by expanding
+‘$(wildcard ...)’ when ‘automake’ is run.  The resulting ‘Makefile.in’s
+would be portable since they would list all files and not use
+‘$(wildcard ...)’.  However that means developers would need to remember
+to run ‘automake’ each time they add, delete, or rename files.
 
-   Compared to editing `Makefile.am', this is a very small gain.  Sure,
-it's easier and faster to type `automake; make' than to type `emacs
-Makefile.am; make'.  But nobody bothered enough to write a patch to add
-support for this syntax.  Some people use scripts to generate file
-lists in `Makefile.am' or in separate `Makefile' fragments.
+   Compared to editing ‘Makefile.am’, this is a very small gain.  Sure,
+it’s easier and faster to type ‘automake; make’ than to type ‘emacs
+Makefile.am; make.  But nobody bothered enough to write a patch to add
+support for this syntax.  Some people use scripts to generate file lists
+in ‘Makefile.am’ or in separate ‘Makefile’ fragments.
 
-   Even if you don't care about portability, and are tempted to use
-`$(wildcard ...)' anyway because you target only GNU Make, you should
+   Even if you dont care about portability, and are tempted to use
+‘$(wildcard ...)’ anyway because you target only GNU Make, you should
 know there are many places where Automake needs to know exactly which
-files should be processed.  As Automake doesn't know how to expand
-`$(wildcard ...)', you cannot use it in these places.  `$(wildcard
-...)' is a black box comparable to `AC_SUBST'ed variables as far
-Automake is concerned.
+files should be processed.  As Automake doesnt know how to expand
+‘$(wildcard ...)’, you cannot use it in these places.  ‘$(wildcard ...)’
+is a black box comparable to ‘AC_SUBST’ed variables as far Automake is
+concerned.
 
-   You can get warnings about `$(wildcard ...') constructs using the
-`-Wportability' flag.
+   You can get warnings about ‘$(wildcard ...’) constructs using the
+‘-Wportability’ flag.
 
 \1f
 File: automake.info,  Node: Limitations on File Names,  Next: Errors with distclean,  Prev: Wildcards,  Up: FAQ
 
-28.4 Limitations on File Names
+27.4 Limitations on File Names
 ==============================
 
 Automake attempts to support all kinds of file names, even those that
@@ -3014,37 +3200,37 @@ contain unusual characters or are unusually long.  However, some
 limitations are imposed by the underlying operating system and tools.
 
    Most operating systems prohibit the use of the null byte in file
-names, and reserve `/' as a directory separator.  Also, they require
-that file names are properly encoded for the user's locale.  Automake
-is subject to these limits.
+names, and reserve ‘/’ as a directory separator.  Also, they require
+that file names are properly encoded for the user’s locale.  Automake is
+subject to these limits.
 
-   Portable packages should limit themselves to POSIX file names.
-These can contain ASCII letters and digits, `_', `.', and `-'.  File
-names consist of components separated by `/'.  File name components
-cannot begin with `-'.
+   Portable packages should limit themselves to POSIX file names.  These
+can contain ASCII letters and digits, ‘_’, ‘.’, and ‘-’.  File names
+consist of components separated by ‘/’.  File name components cannot
+begin with ‘-’.
 
    Portable POSIX file names cannot contain components that exceed a
-14-byte limit, but nowadays it's normally safe to assume the
+14-byte limit, but nowadays its normally safe to assume the
 more-generous XOPEN limit of 255 bytes.  POSIX limits file names to 255
 bytes (XOPEN allows 1023 bytes), but you may want to limit a source
 tarball to file names of 99 bytes to avoid interoperability problems
-with old versions of `tar'.
+with old versions of ‘tar’.
 
    If you depart from these rules (e.g., by using non-ASCII characters
-in file names, or by using lengthy file names), your installers may
-have problems for reasons unrelated to Automake.  However, if this does
-not concern you, you should know about the limitations imposed by
-Automake itself.  These limitations are undesirable, but some of them
-seem to be inherent to underlying tools like Autoconf, Make, M4, and
-the shell.  They fall into three categories: install directories, build
-directories, and file names.
+in file names, or by using lengthy file names), your installers may have
+problems for reasons unrelated to Automake.  However, if this does not
+concern you, you should know about the limitations imposed by Automake
+itself.  These limitations are undesirable, but some of them seem to be
+inherent to underlying tools like Autoconf, Make, M4, and the shell.
+They fall into three categories: install directories, build directories,
+and file names.
 
    The following characters:
 
      newline " # $ ' `
 
    should not appear in the names of install directories.  For example,
-the operand of `configure''s `--prefix' option should not contain these
+the operand of ‘configure’’s ‘--prefix’ option should not contain these
 characters.
 
    Build directories suffer the same limitations as install directories,
@@ -3055,46 +3241,45 @@ and in addition should not contain the following characters:
    For example, the full name of the directory containing the source
 files should not contain these characters.
 
-   Source and installation file names like `main.c' are limited even
+   Source and installation file names like ‘main.c’ are limited even
 further: they should conform to the POSIX/XOPEN rules described above.
 In addition, if you plan to port to non-POSIX environments, you should
-avoid file names that differ only in case (e.g., `makefile' and
-`Makefile').  Nowadays it is no longer worth worrying about the 8.3
+avoid file names that differ only in case (e.g., ‘makefile’ and
+‘Makefile’).  Nowadays it is no longer worth worrying about the 8.3
 limits of DOS file systems.
 
 \1f
 File: automake.info,  Node: Errors with distclean,  Next: Flag Variables Ordering,  Prev: Limitations on File Names,  Up: FAQ
 
-28.5 Errors with distclean
+27.5 Errors with distclean
 ==========================
 
-This is a diagnostic you might encounter while running `make distcheck'.
+This is a diagnostic you might encounter while running ‘make distcheck’.
 
-   As explained in *note Checking the Distribution::, `make distcheck'
+   As explained in *note Checking the Distribution::, ‘make distcheck’
 attempts to build and check your package for errors like this one.
 
-   `make distcheck' will perform a `VPATH' build of your package (*note
-VPATH Builds::), and then call `make distclean'.  Files left in the
-build directory after `make distclean' has run are listed after this
+   ‘make distcheck’ will perform a ‘VPATH’ build of your package (*note
+VPATH Builds::), and then call ‘make distclean’.  Files left in the
+build directory after ‘make distclean’ has run are listed after this
 error.
 
    This diagnostic really covers two kinds of errors:
 
-   * files that are forgotten by distclean;
-
-   * distributed files that are erroneously rebuilt.
+   • files that are forgotten by distclean;
+   • distributed files that are erroneously rebuilt.
 
    The former left-over files are not distributed, so the fix is to mark
-them for cleaning (*note Clean::), this is obvious and doesn't deserve
+them for cleaning (*note Clean::), this is obvious and doesnt deserve
 more explanations.
 
-   The latter bug is not always easy to understand and fix, so let's
+   The latter bug is not always easy to understand and fix, so lets
 proceed with an example.  Suppose our package contains a program for
-which we want to build a man page using `help2man'.  GNU `help2man'
-produces simple manual pages from the `--help' and `--version' output
-of other commands (*note Overview: (help2man)Top.).  Because we don't
-want to force our users to install `help2man', we decide to distribute
-the generated man page using the following setup.
+which we want to build a man page using ‘help2man’.  GNU ‘help2man’
+produces simple manual pages from the ‘--help’ and ‘--version’ output of
+other commands (*note Overview: (help2man)Top.).  Because we don’t want
+to force our users to install ‘help2man’, we decide to distribute the
+generated man page using the following setup.
 
      # This Makefile.am is bogus.
      bin_PROGRAMS = foo
@@ -3104,31 +3289,31 @@ the generated man page using the following setup.
      foo.1: foo$(EXEEXT)
              help2man --output=foo.1 ./foo$(EXEEXT)
 
-   This will effectively distribute the man page.  However, `make
-distcheck' will fail with:
+   This will effectively distribute the man page.  However, make
+distcheck will fail with:
 
      ERROR: files left in build directory after distclean:
      ./foo.1
 
-   Why was `foo.1' rebuilt?  Because although distributed, `foo.1'
-depends on a non-distributed built file: `foo$(EXEEXT)'.
-`foo$(EXEEXT)' is built by the user, so it will always appear to be
-newer than the distributed `foo.1'.
+   Why was ‘foo.1’ rebuilt?  Because although distributed, ‘foo.1’
+depends on a non-distributed built file: ‘foo$(EXEEXT)’.  ‘foo$(EXEEXT)’
+is built by the user, so it will always appear to be newer than the
+distributed ‘foo.1’.
 
-   `make distcheck' caught an inconsistency in our package.  Our intent
-was to distribute `foo.1' so users do not need to install `help2man',
+   ‘make distcheck’ caught an inconsistency in our package.  Our intent
+was to distribute ‘foo.1’ so users do not need to install ‘help2man’,
 however since this rule causes this file to be always rebuilt, users
-_do_ need `help2man'.  Either we should ensure that `foo.1' is not
-rebuilt by users, or there is no point in distributing `foo.1'.
+_do_ need ‘help2man’.  Either we should ensure that ‘foo.1’ is not
+rebuilt by users, or there is no point in distributing ‘foo.1’.
 
    More generally, the rule is that distributed files should never
 depend on non-distributed built files.  If you distribute something
 generated, distribute its sources.
 
-   One way to fix the above example, while still distributing `foo.1'
-is to not depend on `foo$(EXEEXT)'.  For instance, assuming `foo
---version' and `foo --help' do not change unless `foo.c' or
-`configure.ac' change, we could write the following `Makefile.am':
+   One way to fix the above example, while still distributing ‘foo.1’ is
+to not depend on ‘foo$(EXEEXT)’.  For instance, assuming ‘foo --version’
+and ‘foo --help’ do not change unless ‘foo.c’ or ‘configure.ac’ change,
+we could write the following ‘Makefile.am’:
 
      bin_PROGRAMS = foo
      foo_SOURCES = foo.c
@@ -3138,17 +3323,17 @@ is to not depend on `foo$(EXEEXT)'.  For instance, assuming `foo
              $(MAKE) $(AM_MAKEFLAGS) foo$(EXEEXT)
              help2man --output=foo.1 ./foo$(EXEEXT)
 
-   This way, `foo.1' will not get rebuilt every time `foo$(EXEEXT)'
-changes.  The `make' call makes sure `foo$(EXEEXT)' is up-to-date
-before `help2man'.  Another way to ensure this would be to use separate
-directories for binaries and man pages, and set `SUBDIRS' so that
+   This way, ‘foo.1’ will not get rebuilt every time ‘foo$(EXEEXT)’
+changes.  The ‘make’ call makes sure ‘foo$(EXEEXT)’ is up-to-date before
+‘help2man’.  Another way to ensure this would be to use separate
+directories for binaries and man pages, and set ‘SUBDIRS’ so that
 binaries are built before man pages.
 
-   We could also decide not to distribute `foo.1'.  In this case it's
-fine to have `foo.1' dependent upon `foo$(EXEEXT)', since both will
-have to be rebuilt.  However it would be impossible to build the
-package in a cross-compilation, because building `foo.1' involves an
-_execution_ of `foo$(EXEEXT)'.
+   We could also decide not to distribute ‘foo.1’.  In this case it’s
+fine to have ‘foo.1’ dependent upon ‘foo$(EXEEXT)’, since both will have
+to be rebuilt.  However it would be impossible to build the package in a
+cross-compilation, because building ‘foo.1’ involves an _execution_ of
+‘foo$(EXEEXT)’.
 
    Another context where such errors are common is when distributed
 files are built by tools that are built by the package.  The pattern is
@@ -3163,65 +3348,63 @@ should be changed to
              $(MAKE) $(AM_MAKEFLAGS) built-tools
              build-command
 
-or you could choose not to distribute `distributed-file', if
+or you could choose not to distribute ‘distributed-file’, if
 cross-compilation does not matter.
 
    The points made through these examples are worth a summary:
 
-   * Distributed files should never depend upon non-distributed built
+    Distributed files should never depend upon non-distributed built
      files.
-
-   * Distributed files should be distributed with all their
+   • Distributed files should be distributed with all their
      dependencies.
-
-   * If a file is _intended_ to be rebuilt by users, then there is no
+   • If a file is _intended_ to be rebuilt by users, then there is no
      point in distributing it.
 
-   For desperate cases, it's always possible to disable this check by
-setting `distcleancheck_listfiles' as documented in *note Checking the
-Distribution::.  Make sure you do understand the reason why `make
-distcheck' complains before you do this.  `distcleancheck_listfiles' is
+   For desperate cases, its always possible to disable this check by
+setting ‘distcleancheck_listfiles’ as documented in *note Checking the
+Distribution::.  Make sure you do understand the reason why make
+distcheck’ complains before you do this.  ‘distcleancheck_listfiles’ is
 a way to _hide_ errors, not to fix them.  You can always do better.
 
 \1f
 File: automake.info,  Node: Flag Variables Ordering,  Next: Renamed Objects,  Prev: Errors with distclean,  Up: FAQ
 
-28.6 Flag Variables Ordering
+27.6 Flag Variables Ordering
 ============================
 
-     What is the difference between `AM_CFLAGS', `CFLAGS', and
-     `mumble_CFLAGS'?
+     What is the difference between ‘AM_CFLAGS’, ‘CFLAGS’, and
+     ‘mumble_CFLAGS’?
 
-     Why does `automake' output `CPPFLAGS' after
-     `AM_CPPFLAGS' on compile lines?  Shouldn't it be the converse?
+     Why does ‘automake’ output ‘CPPFLAGS’ after
+     ‘AM_CPPFLAGS’ on compile lines?  Shouldn’t it be the converse?
 
-     My `configure' adds some warning flags into `CXXFLAGS'.  In
-     one `Makefile.am' I would like to append a new flag, however if I
-     put the flag into `AM_CXXFLAGS' it is prepended to the other
+     My ‘configure’ adds some warning flags into ‘CXXFLAGS’.  In
+     one ‘Makefile.am’ I would like to append a new flag, however if I
+     put the flag into ‘AM_CXXFLAGS’ it is prepended to the other
      flags, not appended.
 
 Compile Flag Variables
 ----------------------
 
-This section attempts to answer all the above questions.  We will
-mostly discuss `CPPFLAGS' in our examples, but actually the answer
-holds for all the compile flags used in Automake: `CCASFLAGS',
-`CFLAGS', `CPPFLAGS', `CXXFLAGS', `FCFLAGS', `FFLAGS', `GCJFLAGS',
-`LDFLAGS', `LFLAGS', `LIBTOOLFLAGS', `OBJCFLAGS', `OBJCXXFLAGS',
-`RFLAGS', `UPCFLAGS', and `YFLAGS'.
+This section attempts to answer all the above questions.  We will mostly
+discuss ‘CPPFLAGS’ in our examples, but actually the answer holds for
+all the compile flags used in Automake: ‘CCASFLAGS’, ‘CFLAGS’,
+‘CPPFLAGS’, ‘CXXFLAGS’, ‘FCFLAGS’, ‘FFLAGS’, ‘GCJFLAGS’, ‘LDFLAGS’,
+‘LFLAGS’, ‘LIBTOOLFLAGS’, ‘OBJCFLAGS’, ‘OBJCXXFLAGS’, ‘RFLAGS’,
+‘UPCFLAGS’, and ‘YFLAGS’.
 
-   `CPPFLAGS', `AM_CPPFLAGS', and `mumble_CPPFLAGS' are three variables
+   ‘CPPFLAGS’, ‘AM_CPPFLAGS’, and ‘mumble_CPPFLAGS’ are three variables
 that can be used to pass flags to the C preprocessor (actually these
 variables are also used for other languages like C++ or preprocessed
-Fortran).  `CPPFLAGS' is the user variable (*note User Variables::),
-`AM_CPPFLAGS' is the Automake variable, and `mumble_CPPFLAGS' is the
-variable specific to the `mumble' target (we call this a per-target
+Fortran).  ‘CPPFLAGS’ is the user variable (*note User Variables::),
+‘AM_CPPFLAGS’ is the Automake variable, and ‘mumble_CPPFLAGS’ is the
+variable specific to the ‘mumble’ target (we call this a per-target
 variable, *note Program and Library Variables::).
 
    Automake always uses two of these variables when compiling C sources
-files.  When compiling an object file for the `mumble' target, the
-first variable will be `mumble_CPPFLAGS' if it is defined, or
-`AM_CPPFLAGS' otherwise.  The second variable is always `CPPFLAGS'.
+files.  When compiling an object file for the ‘mumble’ target, the first
+variable will be ‘mumble_CPPFLAGS’ if it is defined, or ‘AM_CPPFLAGS’
+otherwise.  The second variable is always ‘CPPFLAGS’.
 
    In the following example,
 
@@ -3231,27 +3414,27 @@ first variable will be `mumble_CPPFLAGS' if it is defined, or
      foo_CPPFLAGS = -DFOO
      AM_CPPFLAGS = -DBAZ
 
-`xyz.o' will be compiled with `$(foo_CPPFLAGS) $(CPPFLAGS)', (because
-`xyz.o' is part of the `foo' target), while `main.o' will be compiled
-with `$(AM_CPPFLAGS) $(CPPFLAGS)' (because there is no per-target
-variable for target `bar').
+‘xyz.o’ will be compiled with ‘$(foo_CPPFLAGS) $(CPPFLAGS)’, (because
+‘xyz.o’ is part of the ‘foo’ target), while ‘main.o’ will be compiled
+with ‘$(AM_CPPFLAGS) $(CPPFLAGS)’ (because there is no per-target
+variable for target ‘bar’).
 
-   The difference between `mumble_CPPFLAGS' and `AM_CPPFLAGS' being
-clear enough, let's focus on `CPPFLAGS'.  `CPPFLAGS' is a user
-variable, i.e., a variable that users are entitled to modify in order
-to compile the package.  This variable, like many others, is documented
-at the end of the output of `configure --help'.
+   The difference between ‘mumble_CPPFLAGS’ and ‘AM_CPPFLAGS’ being
+clear enough, let’s focus on ‘CPPFLAGS’.  ‘CPPFLAGS’ is a user variable,
+i.e., a variable that users are entitled to modify in order to compile
+the package.  This variable, like many others, is documented at the end
+of the output of ‘configure --help’.
 
-   For instance, someone who needs to add `/home/my/usr/include' to the
-C compiler's search path would configure a package with
+   For instance, someone who needs to add ‘/home/my/usr/include’ to the
+C compilers search path would configure a package with
 
      ./configure CPPFLAGS='-I /home/my/usr/include'
 
 and this flag would be propagated to the compile rules of all
-`Makefile's.
+‘Makefile’s.
 
-   It is also not uncommon to override a user variable at `make'-time.
-Many installers do this with `prefix', but this can be useful with
+   It is also not uncommon to override a user variable at ‘make’-time.
+Many installers do this with ‘prefix’, but this can be useful with
 compiler flags too.  For instance, if, while debugging a C++ project,
 you need to disable optimization in one specific object file, you can
 run something like
@@ -3260,42 +3443,42 @@ run something like
      make CXXFLAGS=-O0 file.o
      make
 
-   The reason `$(CPPFLAGS)' appears after `$(AM_CPPFLAGS)' or
-`$(mumble_CPPFLAGS)' in the compile command is that users should always
+   The reason ‘$(CPPFLAGS)’ appears after ‘$(AM_CPPFLAGS)’ or
+‘$(mumble_CPPFLAGS)’ in the compile command is that users should always
 have the last say.  It probably makes more sense if you think about it
-while looking at the `CXXFLAGS=-O0' above, which should supersede any
-other switch from `AM_CXXFLAGS' or `mumble_CXXFLAGS' (and this of
-course replaces the previous value of `CXXFLAGS').
+while looking at the ‘CXXFLAGS=-O0’ above, which should supersede any
+other switch from ‘AM_CXXFLAGS’ or ‘mumble_CXXFLAGS’ (and this of course
+replaces the previous value of ‘CXXFLAGS’).
 
-   You should never redefine a user variable such as `CPPFLAGS' in
-`Makefile.am'.  Use `automake -Woverride' to diagnose such mistakes.
+   You should never redefine a user variable such as ‘CPPFLAGS’ in
+‘Makefile.am’.  Use ‘automake -Woverride’ to diagnose such mistakes.
 Even something like
 
      CPPFLAGS = -DDATADIR=\"$(datadir)\" @CPPFLAGS@
 
-is erroneous.  Although this preserves `configure''s value of
-`CPPFLAGS', the definition of `DATADIR' will disappear if a user
-attempts to override `CPPFLAGS' from the `make' command line.
+is erroneous.  Although this preserves ‘configure’’s value of
+‘CPPFLAGS’, the definition of ‘DATADIR’ will disappear if a user
+attempts to override ‘CPPFLAGS’ from the ‘make’ command line.
 
      AM_CPPFLAGS = -DDATADIR=\"$(datadir)\"
 
 is all that is needed here if no per-target flags are used.
 
-   You should not add options to these user variables within
-`configure' either, for the same reason.  Occasionally you need to
-modify these variables to perform a test, but you should reset their
-values afterwards.  In contrast, it is OK to modify the `AM_' variables
-within `configure' if you `AC_SUBST' them, but it is rather rare that
-you need to do this, unless you really want to change the default
-definitions of the `AM_' variables in all `Makefile's.
+   You should not add options to these user variables within ‘configure’
+either, for the same reason.  Occasionally you need to modify these
+variables to perform a test, but you should reset their values
+afterwards.  In contrast, it is OK to modify the ‘AM_’ variables within
+‘configure’ if you ‘AC_SUBST’ them, but it is rather rare that you need
+to do this, unless you really want to change the default definitions of
+the ‘AM_’ variables in all ‘Makefile’s.
 
    What we recommend is that you define extra flags in separate
 variables.  For instance, you may write an Autoconf macro that computes
-a set of warning options for the C compiler, and `AC_SUBST' them in
-`WARNINGCFLAGS'; you may also have an Autoconf macro that determines
+a set of warning options for the C compiler, and ‘AC_SUBST’ them in
+‘WARNINGCFLAGS’; you may also have an Autoconf macro that determines
 which compiler and which linker flags should be used to link with
-library `libfoo', and `AC_SUBST' these in `LIBFOOCFLAGS' and
-`LIBFOOLDFLAGS'.  Then, a `Makefile.am' could use these variables as
+library ‘libfoo’, and ‘AC_SUBST’ these in ‘LIBFOOCFLAGS’ and
+‘LIBFOOLDFLAGS’.  Then, a ‘Makefile.am’ could use these variables as
 follows:
 
      AM_CFLAGS = $(WARNINGCFLAGS)
@@ -3306,61 +3489,55 @@ follows:
      prog2_LDFLAGS = $(LIBFOOLDFLAGS)
 
    In this example both programs will be compiled with the flags
-substituted into `$(WARNINGCFLAGS)', and `prog2' will additionally be
-compiled with the flags required to link with `libfoo'.
+substituted into ‘$(WARNINGCFLAGS)’, and ‘prog2’ will additionally be
+compiled with the flags required to link with ‘libfoo’.
 
-   Note that listing `AM_CFLAGS' in a per-target `CFLAGS' variable is a
-common idiom to ensure that `AM_CFLAGS' applies to every target in a
-`Makefile.in'.
+   Note that listing ‘AM_CFLAGS’ in a per-target ‘CFLAGS’ variable is a
+common idiom to ensure that ‘AM_CFLAGS’ applies to every target in a
+‘Makefile.in’.
 
    Using variables like this gives you full control over the ordering of
 the flags.  For instance, if there is a flag in $(WARNINGCFLAGS) that
 you want to negate for a particular target, you can use something like
-`prog1_CFLAGS = $(AM_CFLAGS) -no-flag'.  If all these flags had been
-forcefully appended to `CFLAGS', there would be no way to disable one
+‘prog1_CFLAGS = $(AM_CFLAGS) -no-flag’.  If all of these flags had been
+forcefully appended to ‘CFLAGS’, there would be no way to disable one
 flag.  Yet another reason to leave user variables to users.
 
    Finally, we have avoided naming the variable of the example
-`LIBFOO_LDFLAGS' (with an underscore) because that would cause Automake
+‘LIBFOO_LDFLAGS’ (with an underscore) because that would cause Automake
 to think that this is actually a per-target variable (like
-`mumble_LDFLAGS') for some non-declared `LIBFOO' target.
+‘mumble_LDFLAGS’) for some non-declared ‘LIBFOO’ target.
 
 Other Variables
 ---------------
 
 There are other variables in Automake that follow similar principles to
 allow user options.  For instance, Texinfo rules (*note Texinfo::) use
-`MAKEINFOFLAGS' and `AM_MAKEINFOFLAGS'.  Similarly, DejaGnu tests
-(*note DejaGnu Tests::) use `RUNTESTDEFAULTFLAGS' and
-`AM_RUNTESTDEFAULTFLAGS'.  The tags and ctags rules (*note Tags::) use
-`ETAGSFLAGS', `AM_ETAGSFLAGS', `CTAGSFLAGS', and `AM_CTAGSFLAGS'.  Java
-rules (*note Java::) use `JAVACFLAGS' and `AM_JAVACFLAGS'.  None of
-these rules support per-target flags (yet).
-
-   To some extent, even `AM_MAKEFLAGS' (*note Subdirectories::) obeys
-this naming scheme.  The slight difference is that `MAKEFLAGS' is
-passed to sub-`make's implicitly by `make' itself.
-
-   However you should not think that all variables ending with `FLAGS'
-follow this convention.  For instance, `DISTCHECK_CONFIGURE_FLAGS'
-(*note Checking the Distribution::) and `ACLOCAL_AMFLAGS' (see *note
-Rebuilding:: and *note Local Macros::), are two variables that are only
-useful to the maintainer and have no user counterpart.
-
-   `ARFLAGS' (*note A Library::) is usually defined by Automake and has
-neither `AM_' nor per-target cousin.
+‘MAKEINFOFLAGS’ and ‘AM_MAKEINFOFLAGS’.  Similarly, DejaGnu tests (*note
+DejaGnu Tests::) use ‘RUNTESTDEFAULTFLAGS’ and ‘AM_RUNTESTDEFAULTFLAGS’.
+The tags and ctags rules (*note Tags::) use ‘ETAGSFLAGS’,
+‘AM_ETAGSFLAGS’, ‘CTAGSFLAGS’, and ‘AM_CTAGSFLAGS’.  Java rules (*note
+Java::) use ‘JAVACFLAGS’ and ‘AM_JAVACFLAGS’.  None of these rules
+support per-target flags (yet).
+
+   To some extent, even ‘AM_MAKEFLAGS’ (*note Subdirectories::) obeys
+this naming scheme.  The slight difference is that ‘MAKEFLAGS’ is passed
+to sub-‘make’s implicitly by ‘make’ itself.
+
+   ‘ARFLAGS’ (*note A Library::) is usually defined by Automake and has
+neither ‘AM_’ nor per-target cousin.
 
    Finally you should not think that the existence of a per-target
-variable implies the existence of an `AM_' variable or of a user
-variable.  For instance, the `mumble_LDADD' per-target variable
-overrides the makefile-wide `LDADD' variable (which is not a user
-variable), and `mumble_LIBADD' exists only as a per-target variable.
+variable implies the existence of an ‘AM_’ variable or of a user
+variable.  For instance, the ‘mumble_LDADD’ per-target variable
+overrides the makefile-wide ‘LDADD’ variable (which is not a user
+variable), and ‘mumble_LIBADD’ exists only as a per-target variable.
 *Note Program and Library Variables::.
 
 \1f
 File: automake.info,  Node: Renamed Objects,  Next: Per-Object Flags,  Prev: Flag Variables Ordering,  Up: FAQ
 
-28.7 Why are object files sometimes renamed?
+27.7 Why are object files sometimes renamed?
 ============================================
 
 This happens when per-target compilation flags are used.  Object files
@@ -3375,18 +3552,18 @@ following example.
      false_CPPFLAGS = -DEXIT_CODE=1
 
 Obviously the two programs are built from the same source, but it would
-be bad if they shared the same object, because `generic.o' cannot be
-built with both `-DEXIT_CODE=0' _and_ `-DEXIT_CODE=1'.  Therefore
-`automake' outputs rules to build two different objects:
-`true-generic.o' and `false-generic.o'.
+be bad if they shared the same object, because ‘generic.o’ cannot be
+built with both ‘-DEXIT_CODE=0’ _and_ ‘-DEXIT_CODE=1’.  Therefore
+‘automake’ outputs rules to build two different objects:
+‘true-generic.o’ and ‘false-generic.o’.
 
-   `automake' doesn't actually look whether source files are shared to
+   ‘automake’ doesn’t actually look whether source files are shared to
 decide if it must rename objects.  It will just rename all objects of a
 target as soon as it sees per-target compilation flags used.
 
-   It's OK to share object files when per-target compilation flags are
-not used.  For instance, `true' and `false' will both use `version.o'
-in the following example.
+   Its OK to share object files when per-target compilation flags are
+not used.  For instance, ‘true’ and ‘false’ will both use ‘version.o’ in
+the following example.
 
      AM_CPPFLAGS = -DVERSION=1.0
      bin_PROGRAMS = true false
@@ -3394,12 +3571,12 @@ in the following example.
      false_SOURCES = false.c version.c
 
    Note that the renaming of objects is also affected by the
-`_SHORTNAME' variable (*note Program and Library Variables::).
+‘_SHORTNAME’ variable (*note Program and Library Variables::).
 
 \1f
 File: automake.info,  Node: Per-Object Flags,  Next: Multiple Outputs,  Prev: Renamed Objects,  Up: FAQ
 
-28.8 Per-Object Flags Emulation
+27.8 Per-Object Flags Emulation
 ===============================
 
      One of my source files needs to be compiled with different flags.  How
@@ -3414,19 +3591,19 @@ all files compiled for a target.  For instance, in
      foo_SOURCES = foo.c foo.h bar.c bar.h main.c
      foo_CFLAGS = -some -flags
 
-`foo-foo.o', `foo-bar.o', and `foo-main.o' will all be compiled with
-`-some -flags'.  (If you wonder about the names of these object files,
-see *note Renamed Objects::.)  Note that `foo_CFLAGS' gives the flags
-to use when compiling all the C sources of the _program_ `foo', it has
-nothing to do with `foo.c' or `foo-foo.o' specifically.
+‘foo-foo.o’, ‘foo-bar.o’, and ‘foo-main.o’ will all be compiled with
+‘-some -flags’.  (If you wonder about the names of these object files,
+see *note Renamed Objects::.)  Note that ‘foo_CFLAGS’ gives the flags to
+use when compiling all the C sources of the _program_ ‘foo’, it has
+nothing to do with ‘foo.c’ or ‘foo-foo.o’ specifically.
 
-   What if `foo.c' needs to be compiled into `foo.o' using some
-specific flags, that none of the other files requires?  Obviously
-per-program flags are not directly applicable here.  Something like
-per-object flags are expected, i.e., flags that would be used only when
-creating `foo-foo.o'.  Automake does not support that, however this is
-easy to simulate using a library that contains only that object, and
-compiling this library with per-library flags.
+   What if ‘foo.c’ needs to be compiled into ‘foo.o’ using some specific
+flags, that none of the other files requires?  Obviously per-program
+flags are not directly applicable here.  Something like per-object flags
+are expected, i.e., flags that would be used only when creating
+‘foo-foo.o’.  Automake does not support that, however this is easy to
+simulate using a library that contains only that object, and compiling
+this library with per-library flags.
 
      bin_PROGRAMS = foo
      foo_SOURCES = bar.c bar.h main.c
@@ -3436,42 +3613,41 @@ compiling this library with per-library flags.
      libfoo_a_SOURCES = foo.c foo.h
      libfoo_a_CFLAGS = -some -other -flags
 
-   Here `foo-bar.o' and `foo-main.o' will all be compiled with `-some
--flags', while `libfoo_a-foo.o' will be compiled using `-some -other
--flags'.  Eventually, all three objects will be linked to form `foo'.
+   Here ‘foo-bar.o’ and ‘foo-main.o’ will all be compiled with ‘-some
+-flags’, while ‘libfoo_a-foo.o’ will be compiled using ‘-some -other
+-flags’.  Eventually, all three objects will be linked to form ‘foo’.
 
    This trick can also be achieved using Libtool convenience libraries,
-for instance `noinst_LTLIBRARIES = libfoo.la' (*note Libtool
-Convenience Libraries::).
+for instance ‘noinst_LTLIBRARIES = libfoo.la’ (*note Libtool Convenience
+Libraries::).
 
    Another tempting idea to implement per-object flags is to override
-the compile rules `automake' would output for these files.  Automake
-will not define a rule for a target you have defined, so you could
-think about defining the `foo-foo.o: foo.c' rule yourself.  We
-recommend against this, because this is error prone.  For instance, if
-you add such a rule to the first example, it will break the day you
-decide to remove `foo_CFLAGS' (because `foo.c' will then be compiled as
-`foo.o' instead of `foo-foo.o', *note Renamed Objects::).  Also in
-order to support dependency tracking, the two `.o'/`.obj' extensions,
-and all the other flags variables involved in a compilation, you will
-end up modifying a copy of the rule previously output by `automake' for
-this file.  If a new release of Automake generates a different rule,
-your copy will need to be updated by hand.
+the compile rules ‘automake’ would output for these files.  Automake
+will not define a rule for a target you have defined, so you could think
+about defining the ‘foo-foo.o: foo.c’ rule yourself.  We recommend
+against this, because this is error prone.  For instance, if you add
+such a rule to the first example, it will break the day you decide to
+remove ‘foo_CFLAGS’ (because ‘foo.c’ will then be compiled as ‘foo.o’
+instead of ‘foo-foo.o’, *note Renamed Objects::).  Also in order to
+support dependency tracking, the two ‘.o’/‘.obj’ extensions, and all the
+other flags variables involved in a compilation, you will end up
+modifying a copy of the rule previously output by ‘automake’ for this
+file.  If a new release of Automake generates a different rule, your
+copy will need to be updated by hand.
 
 \1f
 File: automake.info,  Node: Multiple Outputs,  Next: Hard-Coded Install Paths,  Prev: Per-Object Flags,  Up: FAQ
 
-28.9 Handling Tools that Produce Many Outputs
+27.9 Handling Tools that Produce Many Outputs
 =============================================
 
-This section describes a `make' idiom that can be used when a tool
+This section describes a ‘make’ idiom that can be used when a tool
 produces multiple output files.  It is not specific to Automake and can
-be used in ordinary `Makefile's.
+be used in ordinary ‘Makefile’s.
 
-   Suppose we have a program called `foo' that will read one file
-called `data.foo' and produce two files named `data.c' and `data.h'.
-We want to write a `Makefile' rule that captures this one-to-two
-dependency.
+   Suppose we have a program called ‘foo’ that will read one file called
+‘data.foo’ and produce two files named ‘data.c’ and ‘data.h’.  We want
+to write a ‘Makefile’ rule that captures this one-to-two dependency.
 
    The naive rule is incorrect:
 
@@ -3479,8 +3655,8 @@ dependency.
      data.c data.h: data.foo
              foo data.foo
 
-What the above rule really says is that `data.c' and `data.h' each
-depend on `data.foo', and can each be built by running `foo data.foo'.
+What the above rule really says is that ‘data.c’ and ‘data.h’ each
+depend on ‘data.foo’, and can each be built by running ‘foo data.foo’.
 In other words it is equivalent to:
 
      # We do not want this.
@@ -3489,20 +3665,19 @@ In other words it is equivalent to:
      data.h: data.foo
              foo data.foo
 
-which means that `foo' can be run twice.  Usually it will not be run
-twice, because `make' implementations are smart enough to check for the
+which means that ‘foo’ can be run twice.  Usually it will not be run
+twice, because ‘make’ implementations are smart enough to check for the
 existence of the second file after the first one has been built; they
 will therefore detect that it already exists.  However there are a few
 situations where it can run twice anyway:
 
-   * The most worrying case is when running a parallel `make'.  If
-     `data.c' and `data.h' are built in parallel, two `foo data.foo'
+   • The most worrying case is when running a parallel ‘make’.  If
+     ‘data.c’ and ‘data.h’ are built in parallel, two ‘foo data.foo’
      commands will run concurrently.  This is harmful.
-
-   * Another case is when the dependency (here `data.foo') is (or
+   • Another case is when the dependency (here ‘data.foo’) is (or
      depends upon) a phony target.
 
-   A solution that works with parallel `make' but not with phony
+   A solution that works with parallel ‘make’ but not with phony
 dependencies is the following:
 
      data.c data.h: data.foo
@@ -3516,8 +3691,8 @@ The above rules are equivalent to
      data.h: data.foo data.c
              foo data.foo
 
-therefore a parallel `make' will have to serialize the builds of
-`data.c' and `data.h', and will detect that the second is no longer
+therefore a parallel ‘make’ will have to serialize the builds of
+‘data.c’ and ‘data.h’, and will detect that the second is no longer
 needed once the first is over.
 
    Using this pattern is probably enough for most cases.  However it
@@ -3532,17 +3707,17 @@ explore a more complicated solution.
              foo data.foo
      data.h: data.c
 
-The idea is that `foo data.foo' is run only when `data.c' needs to be
-updated, but we further state that `data.h' depends upon `data.c'.
-That way, if `data.h' is required and `data.foo' is out of date, the
-dependency on `data.c' will trigger the build.
+The idea is that ‘foo data.foo’ is run only when ‘data.c’ needs to be
+updated, but we further state that ‘data.h’ depends upon ‘data.c’.  That
+way, if ‘data.h’ is required and ‘data.foo’ is out of date, the
+dependency on ‘data.c’ will trigger the build.
 
-   This is almost perfect, but suppose we have built `data.h' and
-`data.c', and then we erase `data.h'.  Then, running `make data.h' will
-not rebuild `data.h'.  The above rules just state that `data.c' must be
-up-to-date with respect to `data.foo', and this is already the case.
+   This is almost perfect, but suppose we have built ‘data.h’ and
+‘data.c’, and then we erase ‘data.h’.  Then, running ‘make data.h’ will
+not rebuild ‘data.h’.  The above rules just state that ‘data.c’ must be
+up-to-date with respect to ‘data.foo’, and this is already the case.
 
-   What we need is a rule that forces a rebuild when `data.h' is
+   What we need is a rule that forces a rebuild when ‘data.h’ is
 missing.  Here it is:
 
      data.c: data.foo
@@ -3557,8 +3732,8 @@ missing.  Here it is:
    The above scheme can be extended to handle more outputs and more
 inputs.  One of the outputs is selected to serve as a witness to the
 successful completion of the command, it depends upon all inputs, and
-all other outputs depend upon it.  For instance, if `foo' should
-additionally read `data.bar' and also produce `data.w' and `data.x', we
+all other outputs depend upon it.  For instance, if ‘foo’ should
+additionally read ‘data.bar’ and also produce ‘data.w’ and ‘data.x’, we
 would write:
 
      data.c: data.foo data.bar
@@ -3571,22 +3746,22 @@ would write:
              fi
 
    However there are now three minor problems in this setup.  One is
-related to the timestamp ordering of `data.h', `data.w', `data.x', and
-`data.c'.  Another one is a race condition if a parallel `make'
-attempts to run multiple instances of the recover block at once.
-Finally, the recursive rule breaks `make -n' when run with GNU `make'
-(as well as some other `make' implementations), as it may remove
-`data.h' even when it should not (*note How the `MAKE' Variable Works:
-(make)MAKE Variable.).
-
-   Let us deal with the first problem.  `foo' outputs four files, but
-we do not know in which order these files are created.  Suppose that
-`data.h' is created before `data.c'.  Then we have a weird situation.
-The next time `make' is run, `data.h' will appear older than `data.c',
+related to the timestamp ordering of ‘data.h’, ‘data.w’, ‘data.x’, and
+‘data.c’.  Another one is a race condition if a parallel ‘make’ attempts
+to run multiple instances of the recover block at once.  Finally, the
+recursive rule breaks ‘make -n’ when run with GNU ‘make’ (as well as
+some other ‘make’ implementations), as it may remove ‘data.h’ even when
+it should not (*note How the ‘MAKE’ Variable Works: (make)MAKE
+Variable.).
+
+   Let us deal with the first problem.  ‘foo’ outputs four files, but we
+do not know in which order these files are created.  Suppose that
+‘data.h’ is created before ‘data.c’.  Then we have a weird situation.
+The next time ‘make’ is run, ‘data.h’ will appear older than ‘data.c’,
 the second rule will be triggered, a shell will be started to execute
-the `if...fi' command, but actually it will just execute the `then'
+the ‘if...fi’ command, but actually it will just execute the ‘then’
 branch, that is: nothing.  In other words, because the witness we
-selected is not the first file created by `foo', `make' will start a
+selected is not the first file created by ‘foo’, ‘make’ will start a
 shell to do nothing each time it is run.
 
    A simple riposte is to fix the timestamps when this happens.
@@ -3603,7 +3778,7 @@ shell to do nothing each time it is run.
              fi
 
    Another solution is to use a different and dedicated file as witness,
-rather than using any of `foo''s outputs.
+rather than using any of ‘foo’’s outputs.
 
      data.stamp: data.foo data.bar
              @rm -f data.tmp
@@ -3617,28 +3792,28 @@ rather than using any of `foo''s outputs.
                $(MAKE) $(AM_MAKEFLAGS) data.stamp; \
              fi
 
-   `data.tmp' is created before `foo' is run, so it has a timestamp
-older than output files output by `foo'.  It is then renamed to
-`data.stamp' after `foo' has run, because we do not want to update
-`data.stamp' if `foo' fails.
+   ‘data.tmp’ is created before ‘foo’ is run, so it has a timestamp
+older than output files output by ‘foo’.  It is then renamed to
+‘data.stamp’ after ‘foo’ has run, because we do not want to update
+‘data.stamp’ if ‘foo’ fails.
 
    This solution still suffers from the second problem: the race
 condition in the recover rule.  If, after a successful build, a user
-erases `data.c' and `data.h', and runs `make -j', then `make' may start
+erases ‘data.c’ and ‘data.h’, and runs ‘make -j’, then ‘make’ may start
 both recover rules in parallel.  If the two instances of the rule
-execute `$(MAKE) $(AM_MAKEFLAGS) data.stamp' concurrently the build is
-likely to fail (for instance, the two rules will create `data.tmp', but
+execute ‘$(MAKE) $(AM_MAKEFLAGS) data.stamp’ concurrently the build is
+likely to fail (for instance, the two rules will create ‘data.tmp’, but
 only one can rename it).
 
    Admittedly, such a weird situation does not arise during ordinary
-builds.  It occurs only when the build tree is mutilated.  Here
-`data.c' and `data.h' have been explicitly removed without also
-removing `data.stamp' and the other output files.  `make clean; make'
-will always recover from these situations even with parallel makes, so
-you may decide that the recover rule is solely to help non-parallel
-make users and leave things as-is.  Fixing this requires some locking
-mechanism to ensure only one instance of the recover rule rebuilds
-`data.stamp'.  One could imagine something along the following lines.
+builds.  It occurs only when the build tree is mutilated.  Here ‘data.c’
+and ‘data.h’ have been explicitly removed without also removing
+‘data.stamp’ and the other output files.  ‘make clean; make’ will always
+recover from these situations even with parallel makes, so you may
+decide that the recover rule is solely to help non-parallel make users
+and leave things as-is.  Fixing this requires some locking mechanism to
+ensure only one instance of the recover rule rebuilds ‘data.stamp’.  One
+could imagine something along the following lines.
 
      data.c data.h data.w data.x: data.stamp
      ## Recover from the removal of $@
@@ -3659,10 +3834,10 @@ mechanism to ensure only one instance of the recover rule rebuilds
                fi; \
              fi
 
-   Using a dedicated witness, like `data.stamp', is very handy when the
+   Using a dedicated witness, like ‘data.stamp’, is very handy when the
 list of output files is not known beforehand.  As an illustration,
-consider the following rules to compile many `*.el' files into `*.elc'
-files in a single command.  It does not matter how `ELFILES' is defined
+consider the following rules to compile many ‘*.el’ files into ‘*.elc’
+files in a single command.  It does not matter how ‘ELFILES’ is defined
 (as long as it is not empty: empty targets are not accepted by POSIX).
 
      ELFILES = one.el two.el three.el ...
@@ -3693,14 +3868,14 @@ files in a single command.  It does not matter how `ELFILES' is defined
              fi
 
    These solutions all still suffer from the third problem, namely that
-they break the promise that `make -n' should not cause any actual
+they break the promise that ‘make -n’ should not cause any actual
 changes to the tree.  For those solutions that do not create lock files,
 it is possible to split the recover rules into two separate recipe
 commands, one of which does all work but the recursion, and the other
-invokes the recursive `$(MAKE)'.  The solutions involving locking could
-act upon the contents of the `MAKEFLAGS' variable, but parsing that
-portably is not easy (*note The Make Macro MAKEFLAGS: (autoconf)The
-Make Macro MAKEFLAGS.).  Here is an example:
+invokes the recursive ‘$(MAKE)’.  The solutions involving locking could
+act upon the contents of the ‘MAKEFLAGS’ variable, but parsing that
+portably is not easy (*note (autoconf)The Make Macro MAKEFLAGS::).  Here
+is an example:
 
      ELFILES = one.el two.el three.el ...
      ELCFILES = $(ELFILES:=c)
@@ -3737,64 +3912,65 @@ Make Macro MAKEFLAGS.).  Here is an example:
                fi; \
              fi
 
-   For completeness it should be noted that GNU `make' is able to
+   For completeness it should be noted that GNU ‘make’ is able to
 express rules with multiple output files using pattern rules (*note
 Pattern Rule Examples: (make)Pattern Examples.).  We do not discuss
 pattern rules here because they are not portable, but they can be
-convenient in packages that assume GNU `make'.
+convenient in packages that assume GNU ‘make’.
 
 \1f
 File: automake.info,  Node: Hard-Coded Install Paths,  Next: Debugging Make Rules,  Prev: Multiple Outputs,  Up: FAQ
 
-28.10 Installing to Hard-Coded Locations
+27.10 Installing to Hard-Coded Locations
 ========================================
 
      My package needs to install some configuration file.  I tried to use
-     the following rule, but `make distcheck' fails.  Why?
+     the following rule, but ‘make distcheck’ fails.  Why?
+
           # Do not do this.
           install-data-local:
                   $(INSTALL_DATA) $(srcdir)/afile $(DESTDIR)/etc/afile
 
      My package needs to populate the installation directory of another
      package at install-time.  I can easily compute that installation
-     directory in `configure', but if I install files therein,
-     `make distcheck' fails.  How else should I do?
-
-   These two setups share their symptoms: `make distcheck' fails
-because they are installing files to hard-coded paths.  In the later
-case the path is not really hard-coded in the package, but we can
-consider it to be hard-coded in the system (or in whichever tool that
-supplies the path).  As long as the path does not use any of the
-standard directory variables (`$(prefix)', `$(bindir)', `$(datadir)',
-etc.), the effect will be the same: user-installations are impossible.
-
-   As a (non-root) user who wants to install a package, you usually
-have no right to install anything in `/usr' or `/usr/local'.  So you do
-something like `./configure --prefix ~/usr' to install a package in
-your own `~/usr' tree.
+     directory in ‘configure’, but if I install files therein,
+     ‘make distcheck’ fails.  How else should I do?
+
+   These two setups share their symptoms: ‘make distcheck’ fails because
+they are installing files to hard-coded paths.  In the later case the
+path is not really hard-coded in the package, but we can consider it to
+be hard-coded in the system (or in whichever tool that supplies the
+path).  As long as the path does not use any of the standard directory
+variables (‘$(prefix)’, ‘$(bindir)’, ‘$(datadir)’, etc.), the effect
+will be the same: user-installations are impossible.
+
+   As a (non-root) user who wants to install a package, you usually have
+no right to install anything in ‘/usr’ or ‘/usr/local’.  So you do
+something like ‘./configure --prefix ~/usr’ to install a package in your
+own ‘~/usr’ tree.
 
    If a package attempts to install something to some hard-coded path
-(e.g., `/etc/afile'), regardless of this `--prefix' setting, then the
-installation will fail.  `make distcheck' performs such a `--prefix'
+(e.g., ‘/etc/afile’), regardless of this ‘--prefix’ setting, then the
+installation will fail.  ‘make distcheck’ performs such a ‘--prefix’
 installation, hence it will fail too.
 
    Now, there are some easy solutions.
 
-   The above `install-data-local' example for installing `/etc/afile'
+   The above ‘install-data-local’ example for installing ‘/etc/afile’
 would be better replaced by
 
      sysconf_DATA = afile
 
-by default `sysconfdir' will be `$(prefix)/etc', because this is what
+by default ‘sysconfdir’ will be ‘$(prefix)/etc’, because this is what
 the GNU Standards require.  When such a package is installed on an FHS
-compliant system, the installer will have to set `--sysconfdir=/etc'.
+compliant system, the installer will have to set ‘--sysconfdir=/etc’.
 As the maintainer of the package you should not be concerned by such
 site policies: use the appropriate standard directory variable to
 install your files so that the installer can easily redefine these
 variables to match their site conventions.
 
    Installing files that should be used by another package is slightly
-more involved.  Let's take an example and assume you want to install a
+more involved.  Lets take an example and assume you want to install a
 shared library that is a Python extension module.  If you ask Python
 where to install the library, it will answer something like this:
 
@@ -3806,33 +3982,33 @@ where to install the library, it will answer something like this:
 non-root users will not be able to install the package, hence distcheck
 fails.
 
-   Let's do better.  The `sysconfig.get_python_lib()' function actually
-accepts a third argument that will replace Python's installation prefix.
+   Let’s do better.  The ‘sysconfig.get_python_lib()’ function actually
+accepts a third argument that will replace Pythons installation prefix.
 
      % python -c 'from distutils import sysconfig;
                   print sysconfig.get_python_lib(1,0,"${exec_prefix}")'
      ${exec_prefix}/lib/python2.5/site-packages
 
    You can also use this new path.  If you do
-   * root users can install your package with the same `--prefix' as
+   • root users can install your package with the same ‘--prefix’ as
      Python (you get the behavior of the previous attempt)
 
-   * non-root users can install your package too, they will have the
+    non-root users can install your package too, they will have the
      extension module in a place that is not searched by Python but they
      can work around this using environment variables (and if you
-     installed scripts that use this shared library, it's easy to tell
+     installed scripts that use this shared library, its easy to tell
      Python were to look in the beginning of your script, so the script
      works in both cases).
 
-   The `AM_PATH_PYTHON' macro uses similar commands to define
-`$(pythondir)' and `$(pyexecdir)' (*note Python::).
+   The ‘AM_PATH_PYTHON’ macro uses similar commands to define
+‘$(pythondir)’ and ‘$(pyexecdir)’ (*note Python::).
 
    Of course not all tools are as advanced as Python regarding that
 substitution of PREFIX.  So another strategy is to figure the part of
 the installation directory that must be preserved.  For instance, here
-is how `AM_PATH_LISPDIR' (*note Emacs Lisp::) computes `$(lispdir)':
+is how ‘AM_PATH_LISPDIR’ (*note Emacs Lisp::) computes ‘$(lispdir)’:
 
-     $EMACS -batch -q -eval '(while load-path
+     $EMACS -batch -Q -eval '(while load-path
        (princ (concat (car load-path) "\n"))
        (setq load-path (cdr load-path)))' >conftest.out
      lispdir=`sed -n
@@ -3846,74 +4022,69 @@ is how `AM_PATH_LISPDIR' (*note Emacs Lisp::) computes `$(lispdir)':
        conftest.out`
 
    I.e., it just picks the first directory that looks like
-`*/lib/*emacs/site-lisp' or `*/share/*emacs/site-lisp' in the search
-path of emacs, and then substitutes `${libdir}' or `${datadir}'
+‘*/lib/*emacs/site-lisp’ or ‘*/share/*emacs/site-lisp’ in the search
+path of emacs, and then substitutes ‘${libdir}’ or ‘${datadir}’
 appropriately.
 
    The emacs case looks complicated because it processes a list and
-expects two possible layouts, otherwise it's easy, and the benefits for
-non-root users are really worth the extra `sed' invocation.
+expects two possible layouts, otherwise its easy, and the benefits for
+non-root users are really worth the extra ‘sed’ invocation.
 
 \1f
 File: automake.info,  Node: Debugging Make Rules,  Next: Reporting Bugs,  Prev: Hard-Coded Install Paths,  Up: FAQ
 
-28.11 Debugging Make Rules
+27.11 Debugging Make Rules
 ==========================
 
-The rules and dependency trees generated by `automake' can get rather
-complex, and leave the developer head-scratching when things don't work
-as expected.  Besides the debug options provided by the `make' command
-(*note Options Summary: (make)Options Summary.), here's a couple of
-further hints for debugging makefiles generated by `automake'
-effectively:
-
-   * If less verbose output has been enabled in the package with the
-     `silent-rules' option (*note Options::), you can use `make V=1' to
-     see the commands being executed.
+The rules and dependency trees generated by ‘automake’ can get rather
+complex, and leave the developer head-scratching when things don’t work
+as expected.  Besides the debug options provided by the ‘make’ command
+(*note (make)Options Summary::), here’s a couple of further hints for
+debugging makefiles generated by ‘automake’ effectively:
 
-   * `make -n' can help show what would be done without actually doing
+   • If less verbose output has been enabled in the package with the use
+     of silent rules (*note Automake Silent Rules::), you can use ‘make
+     V=1’ to see the commands being executed.
+   • ‘make -n’ can help show what would be done without actually doing
      it.  Note however, that this will _still execute_ commands prefixed
-     with `+', and, when using GNU `make', commands that contain the
-     strings `$(MAKE)' or `${MAKE}' (*note Instead of Execution:
-     (make)Instead of Execution.).  Typically, this is helpful to show
-     what recursive rules would do, but it means that, in your own
-     rules, you should not mix such recursion with actions that change
-     any files.(1)  Furthermore, note that GNU `make' will update
-     prerequisites for the `Makefile' file itself even with `-n' (*note
-     Remaking Makefiles: (make)Remaking Makefiles.).
-
-   * `make SHELL="/bin/bash -vx"' can help debug complex rules.  *Note
-     The Make Macro SHELL: (autoconf)The Make Macro SHELL, for some
-     portability quirks associated with this construct.
-
-   * `echo 'print: ; @echo "$(VAR)"' | make -f Makefile -f - print' can
+     with ‘+’, and, when using GNU ‘make’, commands that contain the
+     strings ‘$(MAKE)’ or ‘${MAKE}’ (*note (make)Instead of
+     Execution::).  Typically, this is helpful to show what recursive
+     rules would do, but it means that, in your own rules, you should
+     not mix such recursion with actions that change any files.(1)
+     Furthermore, note that GNU ‘make’ will update prerequisites for the
+     ‘Makefile’ file itself even with ‘-n’ (*note (make)Remaking
+     Makefiles::).
+   • ‘make SHELL="/bin/bash -vx"’ can help debug complex rules.  *Note
+     (autoconf)The Make Macro SHELL::, for some portability quirks
+     associated with this construct.
+   • ‘echo 'print: ; @echo "$(VAR)"' | make -f Makefile -f - print’ can
      be handy to examine the expanded value of variables.  You may need
-     to use a target other than `print' if that is already used or a
+     to use a target other than ‘print’ if that is already used or a
      file with that name exists.
-
-   * `http://bashdb.sourceforge.net/remake/' provides a modified GNU
-     `make' command called `remake' that copes with complex GNU
-     `make'-specific Makefiles and allows to trace execution, examine
+   • <http://bashdb.sourceforge.net/remake/> provides a modified GNU
+     ‘make’ command called ‘remake’ that copes with complex GNU
+     ‘make’-specific Makefiles and allows to trace execution, examine
      variables, and call rules interactively, much like a debugger.
 
    ---------- Footnotes ----------
 
-   (1) Automake's `dist' and `distcheck' rules had a bug in this regard
-in that they created directories even with `-n', but this has been
-fixed in Automake 1.11.
+   (1) Automake’s ‘dist’ and ‘distcheck’ rules had a bug in this regard
+in that they created directories even with ‘-n’, but this has been fixed
+in Automake 1.11.
 
 \1f
 File: automake.info,  Node: Reporting Bugs,  Prev: Debugging Make Rules,  Up: FAQ
 
-28.12 Reporting Bugs
+27.12 Reporting Bugs
 ====================
 
 Most nontrivial software has bugs.  Automake is no exception.  Although
 we cannot promise we can or will fix a bug, and we might not even agree
-that it is a bug, we want to hear about problems you encounter. Often we
-agree they are bugs and want to fix them.
+that it is a bug, we want to hear about problems you encounter.  Often
+we agree they are bugs and want to fix them.
 
-   To make it possible for us to fix a bug, please report it. In order
+   To make it possible for us to fix a bug, please report it.  In order
 to do so effectively, it helps to know when and how to do it.
 
    Before reporting a bug, it is a good idea to see if it is already
@@ -3937,10 +4108,10 @@ implementing more features.
    For a bug report, a feature request or other suggestions, please send
 email to <bug-automake@gnu.org>.  This will then open a new bug in the
 bug tracker (http://debbugs.gnu.org/automake).  Be sure to include the
-versions of Autoconf and Automake that you use.  Ideally, post a
-minimal `Makefile.am' and `configure.ac' that reproduces the problem
-you encounter.  If you have encountered test suite failures, please
-attach the `test-suite.log' file.
+versions of Autoconf and Automake that you use.  Ideally, post a minimal
+‘Makefile.am’ and ‘configure.ac’ that reproduces the problem you
+encounter.  If you have encountered test suite failures, please attach
+the ‘test-suite.log’ file.
 
 \1f
 File: automake.info,  Node: Copying This Manual,  Next: Indices,  Prev: FAQ,  Up: Top
@@ -3960,8 +4131,8 @@ A.1 GNU Free Documentation License
 
                      Version 1.3, 3 November 2008
 
-     Copyright (C) 2000-2012 Free Software Foundation, Inc.
-     `http://fsf.org/'
+     Copyright © 2000-2017 Free Software Foundation, Inc.
+     <http://fsf.org/>
 
      Everyone is permitted to copy and distribute verbatim copies
      of this license document, but changing it is not allowed.
@@ -3969,14 +4140,14 @@ A.1 GNU Free Documentation License
   0. PREAMBLE
 
      The purpose of this License is to make a manual, textbook, or other
-     functional and useful document "free" in the sense of freedom: to
+     functional and useful document “free” in the sense of freedom: to
      assure everyone the effective freedom to copy and redistribute it,
      with or without modifying it, either commercially or
      noncommercially.  Secondarily, this License preserves for the
      author and publisher a way to get credit for their work, while not
      being considered responsible for modifications made by others.
 
-     This License is a kind of "copyleft", which means that derivative
+     This License is a kind of “copyleft”, which means that derivative
      works of the document must themselves be free in the same sense.
      It complements the GNU General Public License, which is a copyleft
      license designed for free software.
@@ -3986,29 +4157,29 @@ A.1 GNU Free Documentation License
      free program should come with manuals providing the same freedoms
      that the software does.  But this License is not limited to
      software manuals; it can be used for any textual work, regardless
-     of subject matter or whether it is published as a printed book.
-     We recommend this License principally for works whose purpose is
+     of subject matter or whether it is published as a printed book.  We
+     recommend this License principally for works whose purpose is
      instruction or reference.
 
   1. APPLICABILITY AND DEFINITIONS
 
      This License applies to any manual or other work, in any medium,
-     that contains a notice placed by the copyright holder saying it
-     can be distributed under the terms of this License.  Such a notice
+     that contains a notice placed by the copyright holder saying it can
+     be distributed under the terms of this License.  Such a notice
      grants a world-wide, royalty-free license, unlimited in duration,
      to use that work under the conditions stated herein.  The
-     "Document", below, refers to any such manual or work.  Any member
-     of the public is a licensee, and is addressed as "you".  You
-     accept the license if you copy, modify or distribute the work in a
-     way requiring permission under copyright law.
+     “Document”, below, refers to any such manual or work.  Any member
+     of the public is a licensee, and is addressed as “you”.  You accept
+     the license if you copy, modify or distribute the work in a way
+     requiring permission under copyright law.
 
-     A "Modified Version" of the Document means any work containing the
+     A “Modified Version” of the Document means any work containing the
      Document or a portion of it, either copied verbatim, or with
      modifications and/or translated into another language.
 
-     A "Secondary Section" is a named appendix or a front-matter section
+     A “Secondary Section” is a named appendix or a front-matter section
      of the Document that deals exclusively with the relationship of the
-     publishers or authors of the Document to the Document's overall
+     publishers or authors of the Document to the Documents overall
      subject (or to related matters) and contains nothing that could
      fall directly within that overall subject.  (Thus, if the Document
      is in part a textbook of mathematics, a Secondary Section may not
@@ -4017,62 +4188,62 @@ A.1 GNU Free Documentation License
      of legal, commercial, philosophical, ethical or political position
      regarding them.
 
-     The "Invariant Sections" are certain Secondary Sections whose
-     titles are designated, as being those of Invariant Sections, in
-     the notice that says that the Document is released under this
-     License.  If a section does not fit the above definition of
-     Secondary then it is not allowed to be designated as Invariant.
-     The Document may contain zero Invariant Sections.  If the Document
-     does not identify any Invariant Sections then there are none.
+     The “Invariant Sections” are certain Secondary Sections whose
+     titles are designated, as being those of Invariant Sections, in the
+     notice that says that the Document is released under this License.
+     If a section does not fit the above definition of Secondary then it
+     is not allowed to be designated as Invariant.  The Document may
+     contain zero Invariant Sections.  If the Document does not identify
+     any Invariant Sections then there are none.
 
-     The "Cover Texts" are certain short passages of text that are
+     The “Cover Texts” are certain short passages of text that are
      listed, as Front-Cover Texts or Back-Cover Texts, in the notice
      that says that the Document is released under this License.  A
      Front-Cover Text may be at most 5 words, and a Back-Cover Text may
      be at most 25 words.
 
-     A "Transparent" copy of the Document means a machine-readable copy,
+     A “Transparent” copy of the Document means a machine-readable copy,
      represented in a format whose specification is available to the
      general public, that is suitable for revising the document
-     straightforwardly with generic text editors or (for images
-     composed of pixels) generic paint programs or (for drawings) some
-     widely available drawing editor, and that is suitable for input to
-     text formatters or for automatic translation to a variety of
-     formats suitable for input to text formatters.  A copy made in an
-     otherwise Transparent file format whose markup, or absence of
-     markup, has been arranged to thwart or discourage subsequent
-     modification by readers is not Transparent.  An image format is
-     not Transparent if used for any substantial amount of text.  A
-     copy that is not "Transparent" is called "Opaque".
+     straightforwardly with generic text editors or (for images composed
+     of pixels) generic paint programs or (for drawings) some widely
+     available drawing editor, and that is suitable for input to text
+     formatters or for automatic translation to a variety of formats
+     suitable for input to text formatters.  A copy made in an otherwise
+     Transparent file format whose markup, or absence of markup, has
+     been arranged to thwart or discourage subsequent modification by
+     readers is not Transparent.  An image format is not Transparent if
+     used for any substantial amount of text.  A copy that is not
+     “Transparent” is called “Opaque”.
 
      Examples of suitable formats for Transparent copies include plain
      ASCII without markup, Texinfo input format, LaTeX input format,
-     SGML or XML using a publicly available DTD, and
-     standard-conforming simple HTML, PostScript or PDF designed for
-     human modification.  Examples of transparent image formats include
-     PNG, XCF and JPG.  Opaque formats include proprietary formats that
-     can be read and edited only by proprietary word processors, SGML or
-     XML for which the DTD and/or processing tools are not generally
-     available, and the machine-generated HTML, PostScript or PDF
-     produced by some word processors for output purposes only.
-
-     The "Title Page" means, for a printed book, the title page itself,
+     SGML or XML using a publicly available DTD, and standard-conforming
+     simple HTML, PostScript or PDF designed for human modification.
+     Examples of transparent image formats include PNG, XCF and JPG.
+     Opaque formats include proprietary formats that can be read and
+     edited only by proprietary word processors, SGML or XML for which
+     the DTD and/or processing tools are not generally available, and
+     the machine-generated HTML, PostScript or PDF produced by some word
+     processors for output purposes only.
+
+     The “Title Page” means, for a printed book, the title page itself,
      plus such following pages as are needed to hold, legibly, the
      material this License requires to appear in the title page.  For
-     works in formats which do not have any title page as such, "Title
-     Page" means the text near the most prominent appearance of the
-     work's title, preceding the beginning of the body of the text.
+     works in formats which do not have any title page as such, Title
+     Page means the text near the most prominent appearance of the
+     works title, preceding the beginning of the body of the text.
 
-     The "publisher" means any person or entity that distributes copies
+     The “publisher” means any person or entity that distributes copies
      of the Document to the public.
 
-     A section "Entitled XYZ" means a named subunit of the Document
+     A section “Entitled XYZ” means a named subunit of the Document
      whose title either is precisely XYZ or contains XYZ in parentheses
      following text that translates XYZ in another language.  (Here XYZ
      stands for a specific section name mentioned below, such as
-     "Acknowledgements", "Dedications", "Endorsements", or "History".)
-     To "Preserve the Title" of such a section when you modify the
-     Document means that it remains a section "Entitled XYZ" according
+     “Acknowledgements”, “Dedications”, “Endorsements”, or “History”.)
+     To “Preserve the Title” of such a section when you modify the
+     Document means that it remains a section “Entitled XYZ” according
      to this definition.
 
      The Document may include Warranty Disclaimers next to the notice
@@ -4092,8 +4263,8 @@ A.1 GNU Free Documentation License
      may not use technical measures to obstruct or control the reading
      or further copying of the copies you make or distribute.  However,
      you may accept compensation in exchange for copies.  If you
-     distribute a large enough number of copies you must also follow
-     the conditions in section 3.
+     distribute a large enough number of copies you must also follow the
+     conditions in section 3.
 
      You may also lend copies, under the same conditions stated above,
      and you may publicly display copies.
@@ -4102,17 +4273,16 @@ A.1 GNU Free Documentation License
 
      If you publish printed copies (or copies in media that commonly
      have printed covers) of the Document, numbering more than 100, and
-     the Document's license notice requires Cover Texts, you must
+     the Documents license notice requires Cover Texts, you must
      enclose the copies in covers that carry, clearly and legibly, all
-     these Cover Texts: Front-Cover Texts on the front cover, and
+     of these Cover Texts: Front-Cover Texts on the front cover, and
      Back-Cover Texts on the back cover.  Both covers must also clearly
      and legibly identify you as the publisher of these copies.  The
-     front cover must present the full title with all words of the
-     title equally prominent and visible.  You may add other material
-     on the covers in addition.  Copying with changes limited to the
-     covers, as long as they preserve the title of the Document and
-     satisfy these conditions, can be treated as verbatim copying in
-     other respects.
+     front cover must present the full title with all words of the title
+     equally prominent and visible.  You may add other material on the
+     covers in addition.  Copying with changes limited to the covers, as
+     long as they preserve the title of the Document and satisfy these
+     conditions, can be treated as verbatim copying in other respects.
 
      If the required texts for either cover are too voluminous to fit
      legibly, you should put the first ones listed (as many as fit
@@ -4120,40 +4290,39 @@ A.1 GNU Free Documentation License
      adjacent pages.
 
      If you publish or distribute Opaque copies of the Document
-     numbering more than 100, you must either include a
-     machine-readable Transparent copy along with each Opaque copy, or
-     state in or with each Opaque copy a computer-network location from
-     which the general network-using public has access to download
-     using public-standard network protocols a complete Transparent
-     copy of the Document, free of added material.  If you use the
-     latter option, you must take reasonably prudent steps, when you
-     begin distribution of Opaque copies in quantity, to ensure that
-     this Transparent copy will remain thus accessible at the stated
-     location until at least one year after the last time you
-     distribute an Opaque copy (directly or through your agents or
-     retailers) of that edition to the public.
+     numbering more than 100, you must either include a machine-readable
+     Transparent copy along with each Opaque copy, or state in or with
+     each Opaque copy a computer-network location from which the general
+     network-using public has access to download using public-standard
+     network protocols a complete Transparent copy of the Document, free
+     of added material.  If you use the latter option, you must take
+     reasonably prudent steps, when you begin distribution of Opaque
+     copies in quantity, to ensure that this Transparent copy will
+     remain thus accessible at the stated location until at least one
+     year after the last time you distribute an Opaque copy (directly or
+     through your agents or retailers) of that edition to the public.
 
      It is requested, but not required, that you contact the authors of
-     the Document well before redistributing any large number of
-     copies, to give them a chance to provide you with an updated
-     version of the Document.
+     the Document well before redistributing any large number of copies,
+     to give them a chance to provide you with an updated version of the
+     Document.
 
   4. MODIFICATIONS
 
      You may copy and distribute a Modified Version of the Document
      under the conditions of sections 2 and 3 above, provided that you
-     release the Modified Version under precisely this License, with
-     the Modified Version filling the role of the Document, thus
-     licensing distribution and modification of the Modified Version to
-     whoever possesses a copy of it.  In addition, you must do these
-     things in the Modified Version:
+     release the Modified Version under precisely this License, with the
+     Modified Version filling the role of the Document, thus licensing
+     distribution and modification of the Modified Version to whoever
+     possesses a copy of it.  In addition, you must do these things in
+     the Modified Version:
 
        A. Use in the Title Page (and on the covers, if any) a title
-          distinct from that of the Document, and from those of
-          previous versions (which should, if there were any, be listed
-          in the History section of the Document).  You may use the
-          same title as a previous version if the original publisher of
-          that version gives permission.
+          distinct from that of the Document, and from those of previous
+          versions (which should, if there were any, be listed in the
+          History section of the Document).  You may use the same title
+          as a previous version if the original publisher of that
+          version gives permission.
 
        B. List on the Title Page, as authors, one or more persons or
           entities responsible for authorship of the modifications in
@@ -4176,72 +4345,71 @@ A.1 GNU Free Documentation License
           the Addendum below.
 
        G. Preserve in that license notice the full lists of Invariant
-          Sections and required Cover Texts given in the Document's
+          Sections and required Cover Texts given in the Documents
           license notice.
 
        H. Include an unaltered copy of this License.
 
-       I. Preserve the section Entitled "History", Preserve its Title,
+       I. Preserve the section Entitled “History”, Preserve its Title,
           and add to it an item stating at least the title, year, new
-          authors, and publisher of the Modified Version as given on
-          the Title Page.  If there is no section Entitled "History" in
-          the Document, create one stating the title, year, authors,
-          and publisher of the Document as given on its Title Page,
-          then add an item describing the Modified Version as stated in
-          the previous sentence.
+          authors, and publisher of the Modified Version as given on the
+          Title Page.  If there is no section Entitled “History” in the
+          Document, create one stating the title, year, authors, and
+          publisher of the Document as given on its Title Page, then add
+          an item describing the Modified Version as stated in the
+          previous sentence.
 
        J. Preserve the network location, if any, given in the Document
           for public access to a Transparent copy of the Document, and
           likewise the network locations given in the Document for
-          previous versions it was based on.  These may be placed in
-          the "History" section.  You may omit a network location for a
-          work that was published at least four years before the
-          Document itself, or if the original publisher of the version
-          it refers to gives permission.
-
-       K. For any section Entitled "Acknowledgements" or "Dedications",
-          Preserve the Title of the section, and preserve in the
-          section all the substance and tone of each of the contributor
+          previous versions it was based on.  These may be placed in the
+          “History” section.  You may omit a network location for a work
+          that was published at least four years before the Document
+          itself, or if the original publisher of the version it refers
+          to gives permission.
+
+       K. For any section Entitled “Acknowledgements” or “Dedications”,
+          Preserve the Title of the section, and preserve in the section
+          all the substance and tone of each of the contributor
           acknowledgements and/or dedications given therein.
 
-       L. Preserve all the Invariant Sections of the Document,
-          unaltered in their text and in their titles.  Section numbers
-          or the equivalent are not considered part of the section
-          titles.
+       L. Preserve all the Invariant Sections of the Document, unaltered
+          in their text and in their titles.  Section numbers or the
+          equivalent are not considered part of the section titles.
 
-       M. Delete any section Entitled "Endorsements".  Such a section
+       M. Delete any section Entitled “Endorsements”.  Such a section
           may not be included in the Modified Version.
 
        N. Do not retitle any existing section to be Entitled
-          "Endorsements" or to conflict in title with any Invariant
+          “Endorsements” or to conflict in title with any Invariant
           Section.
 
        O. Preserve any Warranty Disclaimers.
 
      If the Modified Version includes new front-matter sections or
      appendices that qualify as Secondary Sections and contain no
-     material copied from the Document, you may at your option
-     designate some or all of these sections as invariant.  To do this,
-     add their titles to the list of Invariant Sections in the Modified
-     Version's license notice.  These titles must be distinct from any
-     other section titles.
+     material copied from the Document, you may at your option designate
+     some or all of these sections as invariant.  To do this, add their
+     titles to the list of Invariant Sections in the Modified Version’s
+     license notice.  These titles must be distinct from any other
+     section titles.
 
-     You may add a section Entitled "Endorsements", provided it contains
+     You may add a section Entitled “Endorsements”, provided it contains
      nothing but endorsements of your Modified Version by various
-     parties--for example, statements of peer review or that the text
-     has been approved by an organization as the authoritative
-     definition of a standard.
+     parties—for example, statements of peer review or that the text has
+     been approved by an organization as the authoritative definition of
+     a standard.
 
      You may add a passage of up to five words as a Front-Cover Text,
-     and a passage of up to 25 words as a Back-Cover Text, to the end
-     of the list of Cover Texts in the Modified Version.  Only one
-     passage of Front-Cover Text and one of Back-Cover Text may be
-     added by (or through arrangements made by) any one entity.  If the
-     Document already includes a cover text for the same cover,
-     previously added by you or by arrangement made by the same entity
-     you are acting on behalf of, you may not add another; but you may
-     replace the old one, on explicit permission from the previous
-     publisher that added the old one.
+     and a passage of up to 25 words as a Back-Cover Text, to the end of
+     the list of Cover Texts in the Modified Version.  Only one passage
+     of Front-Cover Text and one of Back-Cover Text may be added by (or
+     through arrangements made by) any one entity.  If the Document
+     already includes a cover text for the same cover, previously added
+     by you or by arrangement made by the same entity you are acting on
+     behalf of, you may not add another; but you may replace the old
+     one, on explicit permission from the previous publisher that added
+     the old one.
 
      The author(s) and publisher(s) of the Document do not by this
      License give permission to use their names for publicity for or to
@@ -4251,8 +4419,8 @@ A.1 GNU Free Documentation License
 
      You may combine the Document with other documents released under
      this License, under the terms defined in section 4 above for
-     modified versions, provided that you include in the combination
-     all of the Invariant Sections of all of the original documents,
+     modified versions, provided that you include in the combination all
+     of the Invariant Sections of all of the original documents,
      unmodified, and list them all as Invariant Sections of your
      combined work in its license notice, and that you preserve all
      their Warranty Disclaimers.
@@ -4268,10 +4436,10 @@ A.1 GNU Free Documentation License
      combined work.
 
      In the combination, you must combine any sections Entitled
-     "History" in the various original documents, forming one section
-     Entitled "History"; likewise combine any sections Entitled
-     "Acknowledgements", and any sections Entitled "Dedications".  You
-     must delete all sections Entitled "Endorsements."
+     “History” in the various original documents, forming one section
+     Entitled “History”; likewise combine any sections Entitled
+     “Acknowledgements”, and any sections Entitled “Dedications”.  You
+     must delete all sections Entitled “Endorsements.”
 
   6. COLLECTIONS OF DOCUMENTS
 
@@ -4279,29 +4447,29 @@ A.1 GNU Free Documentation License
      documents released under this License, and replace the individual
      copies of this License in the various documents with a single copy
      that is included in the collection, provided that you follow the
-     rules of this License for verbatim copying of each of the
-     documents in all other respects.
+     rules of this License for verbatim copying of each of the documents
+     in all other respects.
 
      You may extract a single document from such a collection, and
      distribute it individually under this License, provided you insert
-     a copy of this License into the extracted document, and follow
-     this License in all other respects regarding verbatim copying of
-     that document.
+     a copy of this License into the extracted document, and follow this
+     License in all other respects regarding verbatim copying of that
+     document.
 
   7. AGGREGATION WITH INDEPENDENT WORKS
 
      A compilation of the Document or its derivatives with other
-     separate and independent documents or works, in or on a volume of
-     a storage or distribution medium, is called an "aggregate" if the
+     separate and independent documents or works, in or on a volume of a
+     storage or distribution medium, is called an “aggregate” if the
      copyright resulting from the compilation is not used to limit the
-     legal rights of the compilation's users beyond what the individual
+     legal rights of the compilations users beyond what the individual
      works permit.  When the Document is included in an aggregate, this
      License does not apply to the other works in the aggregate which
      are not themselves derivative works of the Document.
 
      If the Cover Text requirement of section 3 is applicable to these
      copies of the Document, then if the Document is less than one half
-     of the entire aggregate, the Document's Cover Texts may be placed
+     of the entire aggregate, the Documents Cover Texts may be placed
      on covers that bracket the Document within the aggregate, or the
      electronic equivalent of covers if the Document is in electronic
      form.  Otherwise they must appear on printed covers that bracket
@@ -4323,8 +4491,8 @@ A.1 GNU Free Documentation License
      this License or a notice or disclaimer, the original version will
      prevail.
 
-     If a section in the Document is Entitled "Acknowledgements",
-     "Dedications", or "History", the requirement (section 4) to
+     If a section in the Document is Entitled “Acknowledgements”,
+     “Dedications”, or “History”, the requirement (section 4) to
      Preserve its Title (section 1) will typically require changing the
      actual title.
 
@@ -4337,8 +4505,8 @@ A.1 GNU Free Documentation License
 
      However, if you cease all violation of this License, then your
      license from a particular copyright holder is reinstated (a)
-     provisionally, unless and until the copyright holder explicitly
-     and finally terminates your license, and (b) permanently, if the
+     provisionally, unless and until the copyright holder explicitly and
+     finally terminates your license, and (b) permanently, if the
      copyright holder fails to notify you of the violation by some
      reasonable means prior to 60 days after the cessation.
 
@@ -4350,52 +4518,52 @@ A.1 GNU Free Documentation License
      after your receipt of the notice.
 
      Termination of your rights under this section does not terminate
-     the licenses of parties who have received copies or rights from
-     you under this License.  If your rights have been terminated and
-     not permanently reinstated, receipt of a copy of some or all of
-     the same material does not give you any rights to use it.
+     the licenses of parties who have received copies or rights from you
+     under this License.  If your rights have been terminated and not
+     permanently reinstated, receipt of a copy of some or all of the
+     same material does not give you any rights to use it.
 
- 10. FUTURE REVISIONS OF THIS LICENSE
 10. FUTURE REVISIONS OF THIS LICENSE
 
      The Free Software Foundation may publish new, revised versions of
      the GNU Free Documentation License from time to time.  Such new
      versions will be similar in spirit to the present version, but may
      differ in detail to address new problems or concerns.  See
-     `http://www.gnu.org/copyleft/'.
+     <http://www.gnu.org/copyleft/>.
 
      Each version of the License is given a distinguishing version
      number.  If the Document specifies that a particular numbered
-     version of this License "or any later version" applies to it, you
+     version of this License “or any later version” applies to it, you
      have the option of following the terms and conditions either of
      that specified version or of any later version that has been
-     published (not as a draft) by the Free Software Foundation.  If
-     the Document does not specify a version number of this License,
-     you may choose any version ever published (not as a draft) by the
-     Free Software Foundation.  If the Document specifies that a proxy
-     can decide which future versions of this License can be used, that
-     proxy's public statement of acceptance of a version permanently
+     published (not as a draft) by the Free Software Foundation.  If the
+     Document does not specify a version number of this License, you may
+     choose any version ever published (not as a draft) by the Free
+     Software Foundation.  If the Document specifies that a proxy can
+     decide which future versions of this License can be used, that
+     proxys public statement of acceptance of a version permanently
      authorizes you to choose that version for the Document.
 
- 11. RELICENSING
 11. RELICENSING
 
-     "Massive Multiauthor Collaboration Site" (or "MMC Site") means any
+     “Massive Multiauthor Collaboration Site” (or “MMC Site”) means any
      World Wide Web server that publishes copyrightable works and also
      provides prominent facilities for anybody to edit those works.  A
      public wiki that anybody can edit is an example of such a server.
-     A "Massive Multiauthor Collaboration" (or "MMC") contained in the
+     A “Massive Multiauthor Collaboration” (or “MMC”) contained in the
      site means any set of copyrightable works thus published on the MMC
      site.
 
-     "CC-BY-SA" means the Creative Commons Attribution-Share Alike 3.0
+     “CC-BY-SA” means the Creative Commons Attribution-Share Alike 3.0
      license published by Creative Commons Corporation, a not-for-profit
      corporation with a principal place of business in San Francisco,
      California, as well as future copyleft versions of that license
      published by that same organization.
 
-     "Incorporate" means to publish or republish a Document, in whole or
+     “Incorporate” means to publish or republish a Document, in whole or
      in part, as part of another Document.
 
-     An MMC is "eligible for relicensing" if it is licensed under this
+     An MMC is “eligible for relicensing” if it is licensed under this
      License, and if all works that were first published under this
      License somewhere other than this MMC, and subsequently
      incorporated in whole or in part into the MMC, (1) had no cover
@@ -4406,7 +4574,6 @@ A.1 GNU Free Documentation License
      site under CC-BY-SA on the same site at any time before August 1,
      2009, provided the MMC is eligible for relicensing.
 
-
 ADDENDUM: How to use this License for your documents
 ====================================================
 
@@ -4423,7 +4590,7 @@ notices just after the title page:
        Free Documentation License''.
 
    If you have Invariant Sections, Front-Cover Texts and Back-Cover
-Texts, replace the "with...Texts." line with this:
+Texts, replace the “with...Texts.” line with this:
 
          with the Invariant Sections being LIST THEIR TITLES, with
          the Front-Cover Texts being LIST, and with the Back-Cover Texts
@@ -4434,9 +4601,9 @@ combination of the three, merge those two alternatives to suit the
 situation.
 
    If your document contains nontrivial examples of program code, we
-recommend releasing these examples in parallel under your choice of
-free software license, such as the GNU General Public License, to
-permit their use in free software.
+recommend releasing these examples in parallel under your choice of free
+software license, such as the GNU General Public License, to permit
+their use in free software.
 
 \1f
 File: automake.info,  Node: Indices,  Prev: Copying This Manual,  Up: Top
@@ -4463,77 +4630,78 @@ B.1 Macro Index
 * AC_CANONICAL_BUILD:                    Optional.            (line  11)
 * AC_CANONICAL_HOST:                     Optional.            (line  12)
 * AC_CANONICAL_TARGET:                   Optional.            (line  13)
-* AC_CONFIG_AUX_DIR <1>:                 Subpackages.         (line   6)
 * AC_CONFIG_AUX_DIR:                     Optional.            (line  19)
+* AC_CONFIG_AUX_DIR <1>:                 Subpackages.         (line   6)
 * AC_CONFIG_FILES:                       Requirements.        (line  15)
-* AC_CONFIG_HEADERS:                     Optional.            (line  46)
+* AC_CONFIG_HEADERS:                     Optional.            (line  44)
+* AC_CONFIG_LIBOBJ_DIR:                  Optional.            (line  40)
 * AC_CONFIG_LIBOBJ_DIR <1>:              LIBOBJS.             (line  51)
-* AC_CONFIG_LIBOBJ_DIR:                  Optional.            (line  41)
 * AC_CONFIG_LINKS:                       Optional.            (line  55)
 * AC_CONFIG_SUBDIRS:                     Subpackages.         (line   6)
 * AC_DEFUN:                              Extending aclocal.   (line  36)
 * AC_F77_LIBRARY_LDFLAGS:                Optional.            (line 101)
 * AC_FC_SRCEXT:                          Optional.            (line 107)
 * AC_INIT:                               Public Macros.       (line  15)
-* AC_LIBOBJ <1>:                         LIBOBJS.             (line  11)
-* AC_LIBOBJ <2>:                         LTLIBOBJS.           (line   6)
 * AC_LIBOBJ:                             Optional.            (line  65)
-* AC_LIBSOURCE <1>:                      LIBOBJS.             (line  17)
+* AC_LIBOBJ <1>:                         LTLIBOBJS.           (line   6)
+* AC_LIBOBJ <2>:                         LIBOBJS.             (line  11)
 * AC_LIBSOURCE:                          Optional.            (line  66)
+* AC_LIBSOURCE <1>:                      LIBOBJS.             (line  17)
 * AC_LIBSOURCES:                         Optional.            (line  67)
 * AC_OUTPUT:                             Requirements.        (line  15)
 * AC_PREREQ:                             Extending aclocal.   (line  36)
-* AC_PROG_CC_C_O:                        Public Macros.       (line  78)
 * AC_PROG_CXX:                           Optional.            (line  85)
 * AC_PROG_F77:                           Optional.            (line  97)
 * AC_PROG_FC:                            Optional.            (line 112)
-* AC_PROG_LEX <1>:                       Public Macros.       (line  84)
-* AC_PROG_LEX:                           Optional.            (line 127)
+* AC_PROG_LEX:                           Public Macros.       (line  95)
+* AC_PROG_LEX <1>:                       Optional.            (line 127)
 * AC_PROG_LIBTOOL:                       Optional.            (line 117)
 * AC_PROG_OBJC:                          Optional.            (line  89)
 * AC_PROG_OBJCXX:                        Optional.            (line  93)
 * AC_PROG_RANLIB:                        Optional.            (line  81)
 * AC_PROG_YACC:                          Optional.            (line 121)
 * AC_REQUIRE_AUX_FILE:                   Optional.            (line 131)
-* AC_SUBST:                              Optional.            (line 140)
-* AM_COND_IF <1>:                        Usage of Conditionals.
-                                                              (line  66)
-* AM_COND_IF:                            Optional.            (line 156)
+* AC_SUBST:                              Optional.            (line 139)
+* AM_CONDITIONAL:                        Optional.            (line 152)
 * AM_CONDITIONAL <1>:                    Usage of Conditionals.
                                                               (line   6)
-* AM_CONDITIONAL:                        Optional.            (line 153)
-* AM_CONFIG_HEADER:                      Obsolete Macros.     (line  14)
+* AM_CONDITIONAL <2>:                    Usage of Conditionals.
+                                                              (line   9)
+* AM_COND_IF:                            Optional.            (line 155)
+* AM_COND_IF <1>:                        Usage of Conditionals.
+                                                              (line  66)
+* AM_COND_IF <2>:                        Usage of Conditionals.
+                                                              (line  70)
 * AM_DEP_TRACK:                          Private Macros.      (line  14)
-* AM_GNU_GETTEXT:                        Optional.            (line 162)
-* AM_GNU_GETTEXT_INTL_SUBDIR:            Optional.            (line 168)
-* AM_HEADER_TIOCGWINSZ_NEEDS_SYS_IOCTL:  Obsolete Macros.     (line  19)
-* AM_INIT_AUTOMAKE <1>:                  Public Macros.       (line   7)
+* AM_GNU_GETTEXT:                        Optional.            (line 161)
+* AM_GNU_GETTEXT_INTL_SUBDIR:            Optional.            (line 167)
 * AM_INIT_AUTOMAKE:                      Requirements.        (line   6)
-* AM_MAINTAINER_MODE <1>:                maintainer-mode.     (line  37)
+* AM_INIT_AUTOMAKE <1>:                  Public Macros.       (line   7)
 * AM_MAINTAINER_MODE:                    Rebuilding.          (line   9)
-* AM_MAINTAINER_MODE([DEFAULT-MODE]):    Optional.            (line 173)
+* AM_MAINTAINER_MODE <1>:                maintainer-mode.     (line  37)
+* AM_MAINTAINER_MODE([DEFAULT-MODE]):    Optional.            (line 172)
 * AM_MAKE_INCLUDE:                       Private Macros.      (line  20)
+* AM_MISSING_PROG:                       Public Macros.       (line 111)
 * AM_OUTPUT_DEPENDENCY_COMMANDS:         Private Macros.      (line  15)
-* AM_PATH_LISPDIR:                       Public Macros.       (line  51)
-* AM_PATH_PYTHON:                        Python.              (line  29)
-* AM_PROG_AR:                            Public Macros.       (line  66)
-* AM_PROG_AS:                            Public Macros.       (line  73)
-* AM_PROG_CC_C_O:                        Public Macros.       (line  78)
-* AM_PROG_GCJ:                           Public Macros.       (line  89)
+* AM_PATH_LISPDIR:                       Public Macros.       (line  61)
+* AM_PATH_PYTHON:                        Python.              (line  28)
+* AM_PROG_AR:                            Public Macros.       (line  76)
+* AM_PROG_AS:                            Public Macros.       (line  83)
+* AM_PROG_CC_C_O:                        Public Macros.       (line  88)
+* AM_PROG_GCJ:                           Public Macros.       (line 100)
 * AM_PROG_INSTALL_STRIP:                 Private Macros.      (line  25)
-* AM_PROG_LEX:                           Public Macros.       (line  84)
-* AM_PROG_MKDIR_P:                       Obsolete Macros.     (line  25)
-* AM_PROG_UPC:                           Public Macros.       (line  94)
-* AM_PROG_VALAC:                         Vala Support.        (line  21)
+* AM_PROG_LEX:                           Public Macros.       (line  95)
+* AM_PROG_MKDIR_P:                       Obsolete Macros.     (line  14)
+* AM_PROG_UPC:                           Public Macros.       (line 105)
+* AM_PROG_VALAC:                         Vala Support.        (line  20)
 * AM_SANITY_CHECK:                       Private Macros.      (line  30)
 * AM_SET_DEPDIR:                         Private Macros.      (line  13)
-* AM_SILENT_RULES:                       Public Macros.       (line 100)
-* AM_SUBST_NOTMAKE(VAR):                 Optional.            (line 181)
-* AM_SYS_POSIX_TERMIOS:                  Obsolete Macros.     (line  40)
-* AM_WITH_DMALLOC:                       Public Macros.       (line 104)
-* m4_include <1>:                        Basics of Distribution.
-                                                              (line  14)
-* m4_include:                            Optional.            (line 191)
+* AM_SILENT_RULES:                       Public Macros.       (line 119)
+* AM_SUBST_NOTMAKE(VAR):                 Optional.            (line 180)
+* AM_WITH_DMALLOC:                       Public Macros.       (line 123)
+* m4_include:                            Basics of Distribution.
+                                                              (line  17)
+* m4_include <1>:                        Optional.            (line 190)
 
 \1f
 File: automake.info,  Node: Variable Index,  Next: General Index,  Prev: Macro Index,  Up: Indices
@@ -4560,31 +4728,31 @@ B.2 Variable Index
                                                               (line  51)
 * _LTLIBRARIES:                          Libtool Libraries.   (line   6)
 * _MANS:                                 Man Pages.           (line   6)
-* _PROGRAMS <1>:                         Program Sources.     (line   6)
 * _PROGRAMS:                             Uniform.             (line  11)
+* _PROGRAMS <1>:                         Program Sources.     (line   6)
 * _PYTHON:                               Python.              (line   6)
 * _SCRIPTS:                              Scripts.             (line   6)
-* _SOURCES <1>:                          Default _SOURCES.    (line   6)
 * _SOURCES:                              Program Sources.     (line  32)
+* _SOURCES <1>:                          Program Sources.     (line  33)
+* _SOURCES <2>:                          Default _SOURCES.    (line   6)
 * _TEXINFOS:                             Texinfo.             (line   6)
-* ACLOCAL_AMFLAGS <1>:                   Rebuilding.          (line  12)
-* ACLOCAL_AMFLAGS:                       Local Macros.        (line  19)
-* ALLOCA <1>:                            LIBOBJS.             (line   6)
+* _TEXINFOS <1>:                         Texinfo.             (line  65)
 * ALLOCA:                                LTLIBOBJS.           (line   6)
+* ALLOCA <1>:                            LIBOBJS.             (line   6)
 * AM_CCASFLAGS:                          Assembly Support.    (line  10)
-* AM_CFLAGS:                             Program Variables.   (line  51)
+* AM_CFLAGS:                             Program Variables.   (line  50)
 * AM_COLOR_TESTS:                        Scripts-based Testsuites.
-                                                              (line  70)
-* AM_CPPFLAGS <1>:                       Assembly Support.    (line  10)
+                                                              (line  67)
 * AM_CPPFLAGS:                           Program Variables.   (line  16)
+* AM_CPPFLAGS <1>:                       Assembly Support.    (line  10)
 * AM_CXXFLAGS:                           C++ Support.         (line  22)
 * AM_DEFAULT_SOURCE_EXT:                 Default _SOURCES.    (line   6)
-* AM_DEFAULT_V:                          Automake silent-rules Option.
-                                                              (line 139)
-* AM_DEFAULT_VERBOSITY:                  Automake silent-rules Option.
-                                                              (line 139)
+* AM_DEFAULT_V:                          Automake Silent Rules.
+                                                              (line 120)
+* AM_DEFAULT_VERBOSITY:                  Automake Silent Rules.
+                                                              (line 120)
 * AM_DISTCHECK_CONFIGURE_FLAGS:          Checking the Distribution.
-                                                              (line  25)
+                                                              (line  28)
 * AM_ETAGSFLAGS:                         Tags.                (line  25)
 * AM_EXT_LOG_DRIVER_FLAGS:               Declaring Custom Test Drivers.
                                                               (line   6)
@@ -4596,9 +4764,9 @@ B.2 Variable Index
                                                               (line  26)
 * AM_INSTALLCHECK_STD_OPTIONS_EXEMPT:    List of Automake options.
                                                               (line 135)
-* AM_JAVACFLAGS:                         Java.                (line  42)
-* AM_LDFLAGS <1>:                        Program Variables.   (line  61)
+* AM_JAVACFLAGS:                         Java.                (line  44)
 * AM_LDFLAGS:                            Linking.             (line  10)
+* AM_LDFLAGS <1>:                        Program Variables.   (line  59)
 * AM_LFLAGS:                             Yacc and Lex.        (line  60)
 * AM_LIBTOOLFLAGS:                       Libtool Flags.       (line   6)
 * AM_LOG_DRIVER_FLAGS:                   Declaring Custom Test Drivers.
@@ -4606,104 +4774,113 @@ B.2 Variable Index
 * AM_LOG_FLAGS:                          Parallel Test Harness.
                                                               (line  51)
 * AM_MAKEFLAGS:                          Subdirectories.      (line  29)
-* AM_MAKEINFOFLAGS:                      Texinfo.             (line 109)
-* AM_MAKEINFOHTMLFLAGS:                  Texinfo.             (line 110)
+* AM_MAKEINFOFLAGS:                      Texinfo.             (line 115)
+* AM_MAKEINFOHTMLFLAGS:                  Texinfo.             (line 116)
 * AM_OBJCFLAGS:                          Objective C Support. (line  22)
 * AM_OBJCXXFLAGS:                        Objective C++ Support.
                                                               (line  22)
 * AM_RFLAGS:                             Fortran 77 Support.  (line  28)
 * AM_RUNTESTFLAGS:                       DejaGnu Tests.       (line  24)
 * AM_TESTS_ENVIRONMENT:                  Scripts-based Testsuites.
-                                                              (line  89)
+                                                              (line  86)
 * AM_TESTS_FD_REDIRECT:                  Scripts-based Testsuites.
-                                                              (line  97)
+                                                              (line  94)
 * AM_UPCFLAGS:                           Unified Parallel C Support.
                                                               (line  21)
-* AM_UPDATE_INFO_DIR:                    Texinfo.             (line  86)
-* AM_V:                                  Automake silent-rules Option.
-                                                              (line 139)
-* AM_V_at:                               Automake silent-rules Option.
-                                                              (line 139)
-* AM_V_GEN:                              Automake silent-rules Option.
-                                                              (line 139)
-* AM_VALAFLAGS:                          Vala Support.        (line  35)
+* AM_UPDATE_INFO_DIR:                    Texinfo.             (line  92)
+* AM_V:                                  Automake Silent Rules.
+                                                              (line 120)
+* AM_VALAFLAGS:                          Vala Support.        (line  41)
+* AM_V_at:                               Automake Silent Rules.
+                                                              (line 120)
+* AM_V_GEN:                              Automake Silent Rules.
+                                                              (line 120)
 * AM_YFLAGS:                             Yacc and Lex.        (line  37)
-* AR:                                    Public Macros.       (line  66)
+* AR:                                    Public Macros.       (line  76)
 * AUTOCONF:                              automake Invocation. (line  28)
-* AUTOM4TE:                              aclocal Invocation.  (line  45)
-* AUTOMAKE_JOBS:                         automake Invocation. (line 192)
-* AUTOMAKE_OPTIONS <1>:                  List of Automake options.
-                                                              (line   6)
-* AUTOMAKE_OPTIONS <2>:                  Dependencies.        (line  34)
+* AUTOM4TE:                              aclocal Invocation.  (line  44)
+* AUTOMAKE_JOBS:                         automake Invocation. (line 174)
 * AUTOMAKE_OPTIONS:                      Public Macros.       (line  10)
+* AUTOMAKE_OPTIONS <1>:                  Dependencies.        (line  34)
+* AUTOMAKE_OPTIONS <2>:                  List of Automake options.
+                                                              (line   6)
 * bin_PROGRAMS:                          Program Sources.     (line   6)
 * bin_SCRIPTS:                           Scripts.             (line  18)
 * build_triplet:                         Optional.            (line  14)
 * BUILT_SOURCES:                         Sources.             (line  27)
 * BZIP2:                                 The Types of Distributions.
-                                                              (line   9)
+                                                              (line  13)
 * CC:                                    Program Variables.   (line  12)
+* CCAS:                                  Public Macros.       (line  83)
 * CCAS <1>:                              Assembly Support.    (line  10)
-* CCAS:                                  Public Macros.       (line  73)
+* CCASFLAGS:                             Public Macros.       (line  83)
 * CCASFLAGS <1>:                         Assembly Support.    (line  10)
-* CCASFLAGS:                             Public Macros.       (line  73)
 * CFLAGS:                                Program Variables.   (line  12)
-* check_:                                Uniform.             (line  96)
+* check_:                                Uniform.             (line  95)
 * check_LTLIBRARIES:                     Libtool Convenience Libraries.
                                                               (line   6)
-* check_PROGRAMS <1>:                    Default _SOURCES.    (line  28)
 * check_PROGRAMS:                        Program Sources.     (line   6)
+* check_PROGRAMS <1>:                    Default _SOURCES.    (line  28)
 * check_SCRIPTS:                         Scripts.             (line  18)
-* CLASSPATH_ENV:                         Java.                (line  51)
+* CLASSPATH_ENV:                         Java.                (line  53)
 * CLEANFILES:                            Clean.               (line  13)
-* COMPILE:                               Program Variables.   (line  57)
-* CONFIG_STATUS_DEPENDENCIES:            Rebuilding.          (line  19)
-* CONFIGURE_DEPENDENCIES:                Rebuilding.          (line  19)
-* CPPFLAGS <1>:                          Assembly Support.    (line  10)
+* COMPILE:                               Program Variables.   (line  55)
+* CONFIGURE_DEPENDENCIES:                Rebuilding.          (line  12)
+* CONFIG_STATUS_DEPENDENCIES:            Rebuilding.          (line  12)
 * CPPFLAGS:                              Program Variables.   (line  12)
+* CPPFLAGS <1>:                          Assembly Support.    (line  10)
 * CXX:                                   C++ Support.         (line  16)
 * CXXCOMPILE:                            C++ Support.         (line  25)
 * CXXFLAGS:                              C++ Support.         (line  19)
-* CXXLINK <1>:                           How the Linker is Chosen.
-                                                              (line  14)
 * CXXLINK:                               C++ Support.         (line  29)
+* CXXLINK <1>:                           How the Linker is Chosen.
+                                                              (line  12)
+* DATA:                                  Uniform.             (line 101)
 * DATA <1>:                              Data.                (line   7)
-* DATA:                                  Uniform.             (line 102)
 * data_DATA:                             Data.                (line   9)
 * DEFS:                                  Program Variables.   (line  12)
 * DEJATOOL:                              DejaGnu Tests.       (line  19)
-* DESTDIR <1>:                           Staged Installs.     (line   6)
 * DESTDIR:                               DESTDIR.             (line   6)
+* DESTDIR <1>:                           Staged Installs.     (line   6)
 * DISABLE_HARD_ERRORS:                   Scripts-based Testsuites.
-                                                              (line  35)
-* dist_ <1>:                             Fine-grained Distribution Control.
-                                                              (line   6)
-* dist_:                                 Alternative.         (line  29)
-* dist_lisp_LISP:                        Emacs Lisp.          (line  11)
-* dist_noinst_LISP:                      Emacs Lisp.          (line  11)
-* DIST_SUBDIRS <1>:                      Basics of Distribution.
-                                                              (line  42)
-* DIST_SUBDIRS:                          Subdirectories with AM_CONDITIONAL.
-                                                              (line  25)
+                                                              (line  32)
 * DISTCHECK_CONFIGURE_FLAGS:             Checking the Distribution.
-                                                              (line  25)
-* distcleancheck_listfiles <1>:          Errors with distclean.
-                                                              (line 115)
+                                                              (line  28)
 * distcleancheck_listfiles:              Checking the Distribution.
-                                                              (line  64)
-* DISTCLEANFILES <1>:                    Checking the Distribution.
-                                                              (line  64)
+                                                              (line  70)
+* distcleancheck_listfiles <1>:          Errors with distclean.
+                                                              (line 112)
 * DISTCLEANFILES:                        Clean.               (line  13)
+* DISTCLEANFILES <1>:                    Checking the Distribution.
+                                                              (line  70)
+* distdir:                               The dist Hook.       (line  33)
 * distdir <1>:                           Third-Party Makefiles.
                                                               (line  25)
-* distdir:                               The dist Hook.       (line  33)
 * distuninstallcheck_listfiles:          Checking the Distribution.
-                                                              (line 102)
-* DVIPS:                                 Texinfo.             (line 135)
-* EMACS:                                 Public Macros.       (line  51)
-* ETAGS_ARGS:                            Tags.                (line  25)
+                                                              (line 106)
+* dist_:                                 Alternative.         (line  29)
+* dist_ <1>:                             Fine-grained Distribution Control.
+                                                              (line   6)
+* dist_lisp_LISP:                        Emacs Lisp.          (line  11)
+* dist_noinst_LISP:                      Emacs Lisp.          (line  11)
+* DIST_SUBDIRS:                          Subdirectories with AM_CONDITIONAL.
+                                                              (line  25)
+* DIST_SUBDIRS <1>:                      Basics of Distribution.
+                                                              (line  47)
+* DVIPS:                                 Texinfo.             (line 141)
+* EMACS:                                 Public Macros.       (line  61)
 * ETAGSFLAGS:                            Tags.                (line  25)
+* ETAGS_ARGS:                            Tags.                (line  25)
 * EXPECT:                                DejaGnu Tests.       (line  19)
+* EXTRA_DIST:                            Basics of Distribution.
+                                                              (line  34)
+* EXTRA_maude_DEPENDENCIES:              Linking.             (line  41)
+* EXTRA_maude_DEPENDENCIES <1>:          Program and Library Variables.
+                                                              (line 119)
+* EXTRA_maude_SOURCES:                   Program and Library Variables.
+                                                              (line  53)
+* EXTRA_PROGRAMS:                        Conditional Programs.
+                                                              (line  15)
 * EXT_LOG_COMPILE:                       Parallel Test Harness.
                                                               (line  51)
 * EXT_LOG_COMPILER:                      Parallel Test Harness.
@@ -4714,66 +4891,57 @@ B.2 Variable Index
                                                               (line   6)
 * EXT_LOG_FLAGS:                         Parallel Test Harness.
                                                               (line  51)
-* EXTRA_DIST:                            Basics of Distribution.
-                                                              (line  31)
-* EXTRA_maude_DEPENDENCIES <1>:          Program and Library Variables.
-                                                              (line 119)
-* EXTRA_maude_DEPENDENCIES:              Linking.             (line  41)
-* EXTRA_maude_SOURCES:                   Program and Library Variables.
-                                                              (line  53)
-* EXTRA_PROGRAMS:                        Conditional Programs.
-                                                              (line  15)
 * F77:                                   Fortran 77 Support.  (line  16)
 * F77COMPILE:                            Fortran 77 Support.  (line  31)
 * F77LINK:                               How the Linker is Chosen.
-                                                              (line  16)
+                                                              (line  13)
 * FC:                                    Fortran 9x Support.  (line  16)
 * FCCOMPILE:                             Fortran 9x Support.  (line  25)
 * FCFLAGS:                               Fortran 9x Support.  (line  19)
-* FCLINK <1>:                            Fortran 9x Support.  (line  29)
 * FCLINK:                                How the Linker is Chosen.
-                                                              (line  18)
+                                                              (line  14)
+* FCLINK <1>:                            Fortran 9x Support.  (line  29)
 * FFLAGS:                                Fortran 77 Support.  (line  19)
 * FLIBS:                                 Mixing Fortran 77 With C and C++.
                                                               (line  21)
 * FLINK:                                 Fortran 77 Support.  (line  35)
-* GCJ:                                   Public Macros.       (line  89)
+* GCJ:                                   Public Macros.       (line 100)
+* GCJFLAGS:                              Public Macros.       (line 100)
 * GCJFLAGS <1>:                          Java Support with gcj.
                                                               (line  16)
-* GCJFLAGS:                              Public Macros.       (line  89)
 * GCJLINK:                               How the Linker is Chosen.
                                                               (line  10)
 * GTAGS_ARGS:                            Tags.                (line  60)
 * GZIP_ENV:                              Basics of Distribution.
-                                                              (line  10)
-* HEADERS:                               Uniform.             (line 102)
+                                                              (line  14)
+* HEADERS:                               Uniform.             (line 101)
 * host_triplet:                          Optional.            (line  14)
+* INCLUDES:                              Program Variables.   (line  44)
 * include_HEADERS:                       Headers.             (line   6)
-* INCLUDES:                              Program Variables.   (line  45)
 * info_TEXINFOS:                         Texinfo.             (line   6)
-* JAVA:                                  Uniform.             (line 102)
-* JAVAC:                                 Java.                (line  35)
-* JAVACFLAGS:                            Java.                (line  38)
-* JAVAROOT:                              Java.                (line  47)
+* JAVA:                                  Uniform.             (line 101)
+* JAVAC:                                 Java.                (line  37)
+* JAVACFLAGS:                            Java.                (line  40)
+* JAVAROOT:                              Java.                (line  49)
 * LDADD:                                 Linking.             (line  10)
 * LDFLAGS:                               Program Variables.   (line  12)
 * LFLAGS:                                Yacc and Lex.        (line  60)
-* lib_LIBRARIES:                         A Library.           (line   6)
-* lib_LTLIBRARIES:                       Libtool Libraries.   (line   6)
 * libexec_PROGRAMS:                      Program Sources.     (line   6)
 * libexec_SCRIPTS:                       Scripts.             (line  18)
-* LIBOBJS <1>:                           LIBOBJS.             (line   6)
-* LIBOBJS <2>:                           LTLIBOBJS.           (line   6)
 * LIBOBJS:                               Optional.            (line  68)
-* LIBRARIES:                             Uniform.             (line 102)
+* LIBOBJS <1>:                           LTLIBOBJS.           (line   6)
+* LIBOBJS <2>:                           LIBOBJS.             (line   6)
+* LIBRARIES:                             Uniform.             (line 101)
 * LIBS:                                  Program Variables.   (line  12)
 * LIBTOOLFLAGS:                          Libtool Flags.       (line   6)
-* LINK <1>:                              How the Linker is Chosen.
-                                                              (line  24)
-* LINK:                                  Program Variables.   (line  66)
-* LISP:                                  Uniform.             (line 102)
+* lib_LIBRARIES:                         A Library.           (line   6)
+* lib_LTLIBRARIES:                       Libtool Libraries.   (line   6)
+* LINK:                                  Program Variables.   (line  64)
+* LINK <1>:                              How the Linker is Chosen.
+                                                              (line  17)
+* LISP:                                  Uniform.             (line 101)
+* lispdir:                               Public Macros.       (line  61)
 * lisp_LISP:                             Emacs Lisp.          (line   6)
-* lispdir:                               Public Macros.       (line  51)
 * localstate_DATA:                       Data.                (line   9)
 * LOG_COMPILE:                           Parallel Test Harness.
                                                               (line  51)
@@ -4785,74 +4953,76 @@ B.2 Variable Index
                                                               (line   6)
 * LOG_FLAGS:                             Parallel Test Harness.
                                                               (line  51)
-* LTALLOCA <1>:                          LIBOBJS.             (line   6)
 * LTALLOCA:                              LTLIBOBJS.           (line   6)
-* LTLIBOBJS <1>:                         LIBOBJS.             (line   6)
+* LTALLOCA <1>:                          LIBOBJS.             (line   6)
 * LTLIBOBJS:                             LTLIBOBJS.           (line   6)
-* LTLIBRARIES:                           Uniform.             (line 102)
+* LTLIBOBJS <1>:                         LIBOBJS.             (line   6)
+* LTLIBRARIES:                           Uniform.             (line 101)
 * MAINTAINERCLEANFILES:                  Clean.               (line  13)
 * MAKE:                                  Subdirectories.      (line  29)
-* MAKEINFO:                              Texinfo.             (line  93)
-* MAKEINFOFLAGS:                         Texinfo.             (line 103)
-* MAKEINFOHTML:                          Texinfo.             (line  99)
+* MAKEINFO:                              Texinfo.             (line  99)
+* MAKEINFOFLAGS:                         Texinfo.             (line 109)
+* MAKEINFOHTML:                          Texinfo.             (line 105)
+* MANS:                                  Uniform.             (line 101)
 * man_MANS:                              Man Pages.           (line   6)
-* MANS:                                  Uniform.             (line 102)
 * maude_AR:                              Program and Library Variables.
                                                               (line  68)
 * maude_CCASFLAGS:                       Program and Library Variables.
-                                                              (line 171)
+                                                              (line 170)
 * maude_CFLAGS:                          Program and Library Variables.
-                                                              (line 172)
+                                                              (line 171)
 * maude_CPPFLAGS:                        Program and Library Variables.
-                                                              (line 173)
+                                                              (line 172)
 * maude_CXXFLAGS:                        Program and Library Variables.
-                                                              (line 174)
+                                                              (line 173)
+* maude_DEPENDENCIES:                    Linking.             (line  41)
 * maude_DEPENDENCIES <1>:                Program and Library Variables.
                                                               (line 118)
-* maude_DEPENDENCIES:                    Linking.             (line  41)
 * maude_FFLAGS:                          Program and Library Variables.
-                                                              (line 175)
+                                                              (line 174)
 * maude_GCJFLAGS:                        Program and Library Variables.
-                                                              (line 176)
+                                                              (line 175)
+* maude_LDADD:                           Linking.             (line  17)
 * maude_LDADD <1>:                       Program and Library Variables.
                                                               (line  86)
-* maude_LDADD:                           Linking.             (line  17)
+* maude_LDFLAGS:                         Linking.             (line  37)
 * maude_LDFLAGS <1>:                     Program and Library Variables.
                                                               (line 106)
-* maude_LDFLAGS:                         Linking.             (line  37)
 * maude_LFLAGS:                          Program and Library Variables.
-                                                              (line 177)
+                                                              (line 176)
+* maude_LIBADD:                          A Library.           (line  26)
 * maude_LIBADD <1>:                      Program and Library Variables.
                                                               (line  78)
-* maude_LIBADD:                          A Library.           (line  26)
+* maude_LIBTOOLFLAGS:                    Libtool Flags.       (line   6)
 * maude_LIBTOOLFLAGS <1>:                Program and Library Variables.
                                                               (line 111)
-* maude_LIBTOOLFLAGS:                    Libtool Flags.       (line   6)
 * maude_LINK:                            Program and Library Variables.
                                                               (line 154)
 * maude_OBJCFLAGS:                       Program and Library Variables.
-                                                              (line 178)
+                                                              (line 177)
 * maude_OBJCXXFLAGS:                     Program and Library Variables.
-                                                              (line 179)
+                                                              (line 178)
 * maude_RFLAGS:                          Program and Library Variables.
-                                                              (line 180)
+                                                              (line 179)
 * maude_SHORTNAME:                       Program and Library Variables.
-                                                              (line 213)
+                                                              (line 210)
 * maude_SOURCES:                         Program and Library Variables.
                                                               (line  18)
 * maude_UPCFLAGS:                        Program and Library Variables.
-                                                              (line 181)
+                                                              (line 180)
 * maude_YFLAGS:                          Program and Library Variables.
-                                                              (line 182)
-* mkdir_p:                               Obsolete Macros.     (line  25)
-* MKDIR_P:                               Obsolete Macros.     (line  25)
+                                                              (line 181)
+* MISSING:                               Public Macros.       (line 111)
+* MKDIR_P:                               Obsolete Macros.     (line  14)
+* mkdir_p:                               Obsolete Macros.     (line  14)
 * MOSTLYCLEANFILES:                      Clean.               (line  13)
 * nobase_:                               Alternative.         (line  23)
+* nodist_:                               Alternative.         (line  29)
 * nodist_ <1>:                           Fine-grained Distribution Control.
                                                               (line   6)
-* nodist_:                               Alternative.         (line  29)
-* noinst_:                               Uniform.             (line  91)
+* noinst_:                               Uniform.             (line  90)
 * noinst_HEADERS:                        Headers.             (line   6)
+* noinst_HEADERS <1>:                    Headers.             (line  23)
 * noinst_LIBRARIES:                      A Library.           (line   6)
 * noinst_LISP:                           Emacs Lisp.          (line   6)
 * noinst_LTLIBRARIES:                    Libtool Convenience Libraries.
@@ -4863,44 +5033,45 @@ B.2 Variable Index
 * OBJC:                                  Objective C Support. (line  16)
 * OBJCCOMPILE:                           Objective C Support. (line  25)
 * OBJCFLAGS:                             Objective C Support. (line  19)
-* OBJCLINK <1>:                          How the Linker is Chosen.
-                                                              (line  20)
 * OBJCLINK:                              Objective C Support. (line  29)
+* OBJCLINK <1>:                          How the Linker is Chosen.
+                                                              (line  15)
 * OBJCXX:                                Objective C++ Support.
                                                               (line  16)
 * OBJCXXCOMPILE:                         Objective C++ Support.
                                                               (line  25)
 * OBJCXXFLAGS:                           Objective C++ Support.
                                                               (line  19)
-* OBJCXXLINK <1>:                        How the Linker is Chosen.
-                                                              (line  12)
 * OBJCXXLINK:                            Objective C++ Support.
                                                               (line  29)
+* OBJCXXLINK <1>:                        How the Linker is Chosen.
+                                                              (line  11)
 * oldinclude_HEADERS:                    Headers.             (line   6)
 * PACKAGE:                               Basics of Distribution.
                                                               (line   6)
+* pkgdatadir:                            Uniform.             (line  19)
 * pkgdata_DATA:                          Data.                (line   9)
 * pkgdata_SCRIPTS:                       Scripts.             (line  18)
-* pkgdatadir:                            Uniform.             (line  19)
-* pkginclude_HEADERS:                    Headers.             (line   6)
 * pkgincludedir:                         Uniform.             (line  19)
-* pkglib_LIBRARIES:                      A Library.           (line   6)
-* pkglib_LTLIBRARIES:                    Libtool Libraries.   (line   6)
+* pkginclude_HEADERS:                    Headers.             (line   6)
 * pkglibdir:                             Uniform.             (line  19)
+* pkglibexecdir:                         Uniform.             (line  19)
 * pkglibexec_PROGRAMS:                   Program Sources.     (line   6)
 * pkglibexec_SCRIPTS:                    Scripts.             (line  18)
-* pkglibexecdir:                         Uniform.             (line  19)
+* pkglib_LIBRARIES:                      A Library.           (line   6)
+* pkglib_LTLIBRARIES:                    Libtool Libraries.   (line   6)
 * pkgpyexecdir:                          Python.              (line 105)
 * pkgpythondir:                          Python.              (line  91)
 * PROGRAMS:                              Uniform.             (line  17)
+* PROGRAMS <1>:                          Uniform.             (line 101)
 * pyexecdir:                             Python.              (line  96)
+* PYTHON:                                Uniform.             (line 101)
 * PYTHON <1>:                            Python.              (line  56)
-* PYTHON:                                Uniform.             (line 102)
+* pythondir:                             Python.              (line  87)
 * PYTHON_EXEC_PREFIX:                    Python.              (line  77)
 * PYTHON_PLATFORM:                       Python.              (line  82)
 * PYTHON_PREFIX:                         Python.              (line  72)
 * PYTHON_VERSION:                        Python.              (line  68)
-* pythondir:                             Python.              (line  87)
 * RECHECK_LOGS:                          Parallel Test Harness.
                                                               (line 118)
 * RFLAGS:                                Fortran 77 Support.  (line  25)
@@ -4909,64 +5080,1106 @@ B.2 Variable Index
 * RUNTESTFLAGS:                          DejaGnu Tests.       (line  24)
 * sbin_PROGRAMS:                         Program Sources.     (line   6)
 * sbin_SCRIPTS:                          Scripts.             (line  18)
+* SCRIPTS:                               Uniform.             (line 101)
 * SCRIPTS <1>:                           Scripts.             (line   9)
-* SCRIPTS:                               Uniform.             (line 102)
 * sharedstate_DATA:                      Data.                (line   9)
-* SOURCES <1>:                           Default _SOURCES.    (line   6)
 * SOURCES:                               Program Sources.     (line  33)
-* SUBDIRS <1>:                           Basics of Distribution.
-                                                              (line  42)
+* SOURCES <1>:                           Default _SOURCES.    (line   6)
 * SUBDIRS:                               Subdirectories.      (line   8)
+* SUBDIRS <1>:                           Basics of Distribution.
+                                                              (line  47)
 * SUFFIXES:                              Suffixes.            (line   6)
 * sysconf_DATA:                          Data.                (line   9)
 * TAGS_DEPENDENCIES:                     Tags.                (line  35)
 * target_triplet:                        Optional.            (line  14)
+* TESTS:                                 Scripts-based Testsuites.
+                                                              (line  86)
+* TESTS <1>:                             Parallel Test Harness.
+                                                              (line  12)
+* TESTS_ENVIRONMENT:                     Scripts-based Testsuites.
+                                                              (line  86)
 * TEST_EXTENSIONS:                       Parallel Test Harness.
-                                                              (line  39)
+                                                              (line  34)
 * TEST_LOGS:                             Parallel Test Harness.
-                                                              (line  39)
+                                                              (line  34)
 * TEST_SUITE_LOG:                        Parallel Test Harness.
-                                                              (line  16)
-* TESTS <1>:                             Parallel Test Harness.
-                                                              (line  16)
-* TESTS:                                 Scripts-based Testsuites.
-                                                              (line  89)
-* TESTS_ENVIRONMENT:                     Scripts-based Testsuites.
-                                                              (line  89)
-* TEXI2DVI:                              Texinfo.             (line 126)
-* TEXI2PDF:                              Texinfo.             (line 131)
-* TEXINFO_TEX:                           Texinfo.             (line 139)
-* TEXINFOS <1>:                          Texinfo.             (line  59)
-* TEXINFOS:                              Uniform.             (line 102)
+                                                              (line  12)
+* TEXI2DVI:                              Texinfo.             (line 132)
+* TEXI2PDF:                              Texinfo.             (line 137)
+* TEXINFOS:                              Uniform.             (line 101)
+* TEXINFOS <1>:                          Texinfo.             (line  65)
+* TEXINFO_TEX:                           Texinfo.             (line 145)
+* top_distdir:                           The dist Hook.       (line  33)
 * top_distdir <1>:                       Third-Party Makefiles.
                                                               (line  25)
-* top_distdir:                           The dist Hook.       (line  33)
+* UPC:                                   Public Macros.       (line 105)
 * UPC <1>:                               Unified Parallel C Support.
                                                               (line  15)
-* UPC:                                   Public Macros.       (line  94)
 * UPCCOMPILE:                            Unified Parallel C Support.
                                                               (line  24)
 * UPCFLAGS:                              Unified Parallel C Support.
                                                               (line  18)
-* UPCLINK <1>:                           How the Linker is Chosen.
-                                                              (line  22)
 * UPCLINK:                               Unified Parallel C Support.
                                                               (line  28)
-* V:                                     Automake silent-rules Option.
-                                                              (line 104)
-* VALAC:                                 Vala Support.        (line  29)
-* VALAFLAGS:                             Vala Support.        (line  32)
+* UPCLINK <1>:                           How the Linker is Chosen.
+                                                              (line  16)
+* V:                                     Automake Silent Rules.
+                                                              (line  88)
+* VALAC:                                 Vala Support.        (line  34)
+* VALAFLAGS:                             Vala Support.        (line  38)
 * VERBOSE:                               Parallel Test Harness.
-                                                              (line  30)
+                                                              (line  26)
 * VERSION:                               Basics of Distribution.
                                                               (line   6)
-* WARNINGS <1>:                          aclocal Options.     (line  96)
-* WARNINGS:                              automake Invocation. (line 184)
-* WITH_DMALLOC:                          Public Macros.       (line 104)
+* WARNINGS:                              automake Invocation. (line 167)
+* WARNINGS <1>:                          aclocal Options.     (line  91)
+* WITH_DMALLOC:                          Public Macros.       (line 123)
 * XFAIL_TESTS:                           Scripts-based Testsuites.
-                                                              (line  35)
+                                                              (line  32)
 * XZ_OPT:                                The Types of Distributions.
-                                                              (line  26)
+                                                              (line  24)
 * YACC:                                  Optional.            (line 122)
 * YFLAGS:                                Yacc and Lex.        (line  37)
 
+\1f
+File: automake.info,  Node: General Index,  Prev: Variable Index,  Up: Indices
+
+B.3 General Index
+=================
+
+\0\b[index\0\b]
+* Menu:
+
+* ## (special Automake comment):         General Operation.   (line  68)
+* #serial syntax:                        Serials.             (line   6)
+* $(LIBOBJS) and empty libraries:        LIBOBJS.             (line  72)
+* +=:                                    General Operation.   (line  24)
+* --add-missing:                         automake Invocation. (line  41)
+* --automake-acdir:                      aclocal Options.     (line   9)
+* --build=BUILD:                         Cross-Compilation.   (line  14)
+* --copy:                                automake Invocation. (line  71)
+* --diff:                                aclocal Options.     (line  18)
+* --disable-dependency-tracking:         Dependency Tracking. (line  33)
+* --disable-maintainer-mode:             Optional.            (line 173)
+* --disable-silent-rules:                Automake Silent Rules.
+                                                              (line  85)
+* --dry-run:                             aclocal Options.     (line  23)
+* --enable-debug, example:               Usage of Conditionals.
+                                                              (line  21)
+* --enable-dependency-tracking:          Dependency Tracking. (line  43)
+* --enable-maintainer-mode:              Optional.            (line 173)
+* --enable-silent-rules:                 Automake Silent Rules.
+                                                              (line  85)
+* --force:                               aclocal Options.     (line  45)
+* --force-missing:                       automake Invocation. (line  76)
+* --foreign:                             automake Invocation. (line  82)
+* --gnits:                               automake Invocation. (line  86)
+* --gnits, complete description:         Gnits.               (line  29)
+* --gnu:                                 automake Invocation. (line  90)
+* --gnu, complete description:           Gnits.               (line   6)
+* --gnu, required files:                 Gnits.               (line   6)
+* --help:                                automake Invocation. (line  94)
+* --help <1>:                            aclocal Options.     (line  27)
+* --help check:                          List of Automake options.
+                                                              (line 129)
+* --help=recursive:                      Nested Packages.     (line  30)
+* --host=HOST:                           Cross-Compilation.   (line  16)
+* --include-deps:                        automake Invocation. (line 102)
+* --install:                             aclocal Options.     (line  34)
+* --libdir:                              automake Invocation. (line  61)
+* --no-force:                            automake Invocation. (line 107)
+* --output:                              aclocal Options.     (line  55)
+* --output-dir:                          automake Invocation. (line 114)
+* --prefix:                              Standard Directory Variables.
+                                                              (line  33)
+* --print-ac-dir:                        aclocal Options.     (line  58)
+* --print-libdir:                        automake Invocation. (line  65)
+* --program-prefix=PREFIX:               Renaming.            (line  16)
+* --program-suffix=SUFFIX:               Renaming.            (line  18)
+* --program-transform-name=PROGRAM:      Renaming.            (line  20)
+* --system-acdir:                        aclocal Options.     (line  13)
+* --target=TARGET:                       Cross-Compilation.   (line  55)
+* --verbose:                             automake Invocation. (line 121)
+* --verbose <1>:                         aclocal Options.     (line  69)
+* --version:                             automake Invocation. (line 125)
+* --version <1>:                         aclocal Options.     (line  72)
+* --version check:                       List of Automake options.
+                                                              (line 129)
+* --warnings:                            automake Invocation. (line 129)
+* --warnings <1>:                        aclocal Options.     (line  76)
+* --with-dmalloc:                        Public Macros.       (line 123)
+* -a:                                    automake Invocation. (line  41)
+* -c:                                    automake Invocation. (line  70)
+* -f:                                    automake Invocation. (line  75)
+* -hook targets:                         Extending.           (line  66)
+* -i:                                    automake Invocation. (line  98)
+* -I:                                    aclocal Options.     (line  30)
+* -l and LDADD:                          Linking.             (line  70)
+* -local targets:                        Extending.           (line  37)
+* -module, libtool:                      Libtool Modules.     (line   6)
+* -o:                                    automake Invocation. (line 114)
+* -v:                                    automake Invocation. (line 121)
+* -W:                                    automake Invocation. (line 129)
+* -W <1>:                                aclocal Options.     (line  76)
+* -Wall:                                 amhello's configure.ac Setup Explained.
+                                                              (line  38)
+* -Werror:                               amhello's configure.ac Setup Explained.
+                                                              (line  38)
+* .la suffix, defined:                   Libtool Concept.     (line   6)
+* .log files:                            Parallel Test Harness.
+                                                              (line  12)
+* .trs files:                            Parallel Test Harness.
+                                                              (line  12)
+* :copy-in-global-log::                  Log files generation and test results recording.
+                                                              (line  44)
+* :recheck::                             Log files generation and test results recording.
+                                                              (line  38)
+* :test-global-result::                  Log files generation and test results recording.
+                                                              (line  54)
+* :test-result::                         Log files generation and test results recording.
+                                                              (line  24)
+* _DATA primary, defined:                Data.                (line   6)
+* _DEPENDENCIES, defined:                Linking.             (line  41)
+* _HEADERS primary, defined:             Headers.             (line   6)
+* _JAVA primary, defined:                Java.                (line   6)
+* _LDFLAGS, defined:                     Linking.             (line  37)
+* _LDFLAGS, libtool:                     Libtool Flags.       (line   6)
+* _LIBADD, libtool:                      Libtool Flags.       (line   6)
+* _LIBRARIES primary, defined:           A Library.           (line   6)
+* _LIBTOOLFLAGS, libtool:                Libtool Flags.       (line   6)
+* _LISP primary, defined:                Emacs Lisp.          (line   6)
+* _LTLIBRARIES primary, defined:         Libtool Libraries.   (line   6)
+* _MANS primary, defined:                Man Pages.           (line   6)
+* _PROGRAMS primary variable:            Uniform.             (line  11)
+* _PYTHON primary, defined:              Python.              (line   6)
+* _SCRIPTS primary, defined:             Scripts.             (line   6)
+* _SOURCES and header files:             Program Sources.     (line  39)
+* _SOURCES primary, defined:             Program Sources.     (line  32)
+* _SOURCES, default:                     Default _SOURCES.    (line   6)
+* _SOURCES, empty:                       Default _SOURCES.    (line  44)
+* _TEXINFOS primary, defined:            Texinfo.             (line   6)
+* acinclude.m4, defined:                 Complete.            (line  23)
+* aclocal and serial numbers:            Serials.             (line   6)
+* aclocal program, introduction:         Complete.            (line  23)
+* aclocal search path:                   Macro Search Path.   (line   6)
+* aclocal’s scheduled death:             Future of aclocal.   (line   6)
+* aclocal, extending:                    Extending aclocal.   (line   6)
+* aclocal, Invocation:                   aclocal Invocation.  (line   6)
+* aclocal, Invoking:                     aclocal Invocation.  (line   6)
+* aclocal, Options:                      aclocal Options.     (line   6)
+* aclocal, using:                        configure.           (line   6)
+* aclocal.m4, preexisting:               Complete.            (line  23)
+* ACLOCAL_PATH:                          Macro Search Path.   (line 116)
+* AC_CONFIG_FILES, conditional:          Usage of Conditionals.
+                                                              (line  79)
+* AC_SUBST and SUBDIRS:                  Subdirectories with AC_SUBST.
+                                                              (line   6)
+* Adding new SUFFIXES:                   Suffixes.            (line   6)
+* all:                                   Standard Targets.    (line  16)
+* all <1>:                               Extending.           (line  41)
+* all-local:                             Extending.           (line  41)
+* ALLOCA, and Libtool:                   LTLIBOBJS.           (line   6)
+* ALLOCA, example:                       LIBOBJS.             (line   6)
+* ALLOCA, special handling:              LIBOBJS.             (line   6)
+* amhello-1.0.tar.gz, creation:          Hello World.         (line   6)
+* amhello-1.0.tar.gz, location:          Use Cases.           (line   6)
+* amhello-1.0.tar.gz, use cases:         Use Cases.           (line   6)
+* AM_CCASFLAGS and CCASFLAGS:            Flag Variables Ordering.
+                                                              (line  20)
+* AM_CFLAGS and CFLAGS:                  Flag Variables Ordering.
+                                                              (line  20)
+* AM_CONDITIONAL and SUBDIRS:            Subdirectories with AM_CONDITIONAL.
+                                                              (line   6)
+* AM_CPPFLAGS and CPPFLAGS:              Flag Variables Ordering.
+                                                              (line  20)
+* AM_CXXFLAGS and CXXFLAGS:              Flag Variables Ordering.
+                                                              (line  20)
+* AM_FCFLAGS and FCFLAGS:                Flag Variables Ordering.
+                                                              (line  20)
+* AM_FFLAGS and FFLAGS:                  Flag Variables Ordering.
+                                                              (line  20)
+* AM_GCJFLAGS and GCJFLAGS:              Flag Variables Ordering.
+                                                              (line  20)
+* AM_INIT_AUTOMAKE, example use:         Complete.            (line  11)
+* AM_LDFLAGS and LDFLAGS:                Flag Variables Ordering.
+                                                              (line  20)
+* AM_LFLAGS and LFLAGS:                  Flag Variables Ordering.
+                                                              (line  20)
+* AM_LIBTOOLFLAGS and LIBTOOLFLAGS:      Flag Variables Ordering.
+                                                              (line  20)
+* AM_MAINTAINER_MODE, purpose:           maintainer-mode.     (line  37)
+* AM_OBJCFLAGS and OBJCFLAGS:            Flag Variables Ordering.
+                                                              (line  20)
+* AM_OBJCXXFLAGS and OBJXXCFLAGS:        Flag Variables Ordering.
+                                                              (line  20)
+* AM_RFLAGS and RFLAGS:                  Flag Variables Ordering.
+                                                              (line  20)
+* AM_UPCFLAGS and UPCFLAGS:              Flag Variables Ordering.
+                                                              (line  20)
+* AM_YFLAGS and YFLAGS:                  Flag Variables Ordering.
+                                                              (line  20)
+* Append operator:                       General Operation.   (line  24)
+* ARG_MAX:                               Length Limitations.  (line   6)
+* autogen.sh and autoreconf:             Error required file ltmain.sh not found.
+                                                              (line   6)
+* autom4te:                              aclocal Invocation.  (line  44)
+* Automake constraints:                  Introduction.        (line  21)
+* automake options:                      automake Invocation. (line  37)
+* Automake parser, limitations of:       General Operation.   (line  33)
+* Automake requirements:                 Introduction.        (line  26)
+* Automake requirements <1>:             Requirements.        (line   6)
+* automake, invocation:                  automake Invocation. (line   6)
+* automake, invoking:                    automake Invocation. (line   6)
+* Automake, recursive operation:         General Operation.   (line  58)
+* Automatic dependency tracking:         Dependencies.        (line  11)
+* Automatic linker selection:            How the Linker is Chosen.
+                                                              (line   6)
+* autoreconf and libtoolize:             Error required file ltmain.sh not found.
+                                                              (line   6)
+* autoreconf, example:                   Creating amhello.    (line  59)
+* autoscan:                              amhello's configure.ac Setup Explained.
+                                                              (line  89)
+* Autotools, introduction:               GNU Build System.    (line  43)
+* Autotools, purpose:                    Why Autotools.       (line   6)
+* autoupdate:                            Obsolete Macros.     (line   6)
+* Auxiliary programs:                    Auxiliary Programs.  (line   6)
+* Avoiding man page renaming:            Man Pages.           (line  54)
+* Avoiding path stripping:               Alternative.         (line  23)
+* Binary package:                        DESTDIR.             (line  22)
+* bootstrap and autoreconf:              Error required file ltmain.sh not found.
+                                                              (line   6)
+* Bugs, reporting:                       Introduction.        (line  30)
+* build tree and source tree:            VPATH Builds.        (line   6)
+* BUILT_SOURCES, defined:                Sources.             (line  27)
+* C++ support:                           C++ Support.         (line   6)
+* canonicalizing Automake variables:     Canonicalization.    (line   6)
+* CCASFLAGS and AM_CCASFLAGS:            Flag Variables Ordering.
+                                                              (line  20)
+* CFLAGS and AM_CFLAGS:                  Flag Variables Ordering.
+                                                              (line  20)
+* cfortran:                              Mixing Fortran 77 With C and C++.
+                                                              (line   6)
+* check:                                 Standard Targets.    (line  31)
+* check <1>:                             Tests.               (line   6)
+* check <2>:                             Extending.           (line  41)
+* check-local:                           Extending.           (line  41)
+* check-news:                            List of Automake options.
+                                                              (line  14)
+* check_ primary prefix, definition:     Uniform.             (line  95)
+* check_PROGRAMS example:                Default _SOURCES.    (line  28)
+* clean:                                 Standard Targets.    (line  27)
+* clean <1>:                             Extending.           (line  41)
+* clean-local:                           Clean.               (line  15)
+* clean-local <1>:                       Extending.           (line  41)
+* Colorized testsuite output:            Scripts-based Testsuites.
+                                                              (line  67)
+* command line length limit:             Length Limitations.  (line   6)
+* Comment, special to Automake:          General Operation.   (line  68)
+* Compilation of Java to bytecode:       Java.                (line   6)
+* Compilation of Java to native code:    Java Support with gcj.
+                                                              (line   6)
+* Compile Flag Variables:                Flag Variables Ordering.
+                                                              (line  20)
+* Complete example:                      Complete.            (line   6)
+* Conditional example, --enable-debug:   Usage of Conditionals.
+                                                              (line  21)
+* conditional libtool libraries:         Conditional Libtool Libraries.
+                                                              (line   6)
+* Conditional programs:                  Conditional Programs.
+                                                              (line   6)
+* Conditional subdirectories:            Conditional Subdirectories.
+                                                              (line   6)
+* Conditional SUBDIRS:                   Conditional Subdirectories.
+                                                              (line   6)
+* Conditionals:                          Conditionals.        (line   6)
+* config.guess:                          automake Invocation. (line  39)
+* config.site example:                   config.site.         (line   6)
+* configuration variables, overriding:   Standard Configuration Variables.
+                                                              (line   6)
+* Configuration, basics:                 Basic Installation.  (line   6)
+* Configure substitutions in TESTS:      Parallel Test Harness.
+                                                              (line  46)
+* configure.ac, Hello World:             amhello's configure.ac Setup Explained.
+                                                              (line   6)
+* configure.ac, scanning:                configure.           (line   6)
+* conflicting definitions:               Extending.           (line  14)
+* Constraints of Automake:               Introduction.        (line  21)
+* convenience libraries, libtool:        Libtool Convenience Libraries.
+                                                              (line   6)
+* copying semantics:                     Extending.           (line  10)
+* cpio example:                          Uniform.             (line  36)
+* CPPFLAGS and AM_CPPFLAGS:              Flag Variables Ordering.
+                                                              (line  20)
+* cross-compilation:                     Cross-Compilation.   (line   6)
+* cross-compilation example:             Cross-Compilation.   (line  25)
+* CVS and generated files:               CVS.                 (line  49)
+* CVS and third-party files:             CVS.                 (line 167)
+* CVS and timestamps:                    CVS.                 (line  28)
+* CXXFLAGS and AM_CXXFLAGS:              Flag Variables Ordering.
+                                                              (line  20)
+* DATA primary, defined:                 Data.                (line   6)
+* debug build, example:                  VPATH Builds.        (line  46)
+* debugging rules:                       Debugging Make Rules.
+                                                              (line   6)
+* default source, Libtool modules example: Default _SOURCES.  (line  38)
+* default verbosity for silent rules:    Automake Silent Rules.
+                                                              (line  92)
+* default _SOURCES:                      Default _SOURCES.    (line   6)
+* definitions, conflicts:                Extending.           (line  14)
+* dejagnu:                               DejaGnu Tests.       (line  19)
+* dejagnu <1>:                           List of Automake options.
+                                                              (line  18)
+* depcomp:                               Dependencies.        (line  22)
+* dependencies and distributed files:    Errors with distclean.
+                                                              (line   6)
+* Dependency tracking:                   Dependency Tracking. (line   6)
+* Dependency tracking <1>:               Dependencies.        (line  11)
+* Dependency tracking, disabling:        Dependencies.        (line  36)
+* directory variables:                   Standard Directory Variables.
+                                                              (line   6)
+* dirlist:                               Macro Search Path.   (line  52)
+* Disabling dependency tracking:         Dependencies.        (line  37)
+* Disabling hard errors:                 Scripts-based Testsuites.
+                                                              (line  32)
+* dist:                                  Standard Targets.    (line  35)
+* dist <1>:                              Basics of Distribution.
+                                                              (line   6)
+* dist-bzip2:                            The Types of Distributions.
+                                                              (line  18)
+* dist-bzip2 <1>:                        List of Automake options.
+                                                              (line  22)
+* dist-bzip2 <2>:                        List of Automake options.
+                                                              (line  22)
+* dist-gzip:                             The Types of Distributions.
+                                                              (line  11)
+* dist-hook:                             The dist Hook.       (line   6)
+* dist-hook <1>:                         Extending.           (line  66)
+* dist-lzip:                             The Types of Distributions.
+                                                              (line  22)
+* dist-lzip <1>:                         List of Automake options.
+                                                              (line  25)
+* dist-lzip <2>:                         List of Automake options.
+                                                              (line  25)
+* dist-shar:                             The Types of Distributions.
+                                                              (line  45)
+* dist-shar <1>:                         List of Automake options.
+                                                              (line  36)
+* dist-shar <2>:                         List of Automake options.
+                                                              (line  34)
+* dist-tarZ:                             The Types of Distributions.
+                                                              (line  39)
+* dist-tarZ <1>:                         List of Automake options.
+                                                              (line  41)
+* dist-tarZ <2>:                         List of Automake options.
+                                                              (line  39)
+* dist-xz:                               The Types of Distributions.
+                                                              (line  30)
+* dist-xz <1>:                           List of Automake options.
+                                                              (line  28)
+* dist-xz <2>:                           List of Automake options.
+                                                              (line  28)
+* dist-zip:                              The Types of Distributions.
+                                                              (line  33)
+* dist-zip <1>:                          List of Automake options.
+                                                              (line  31)
+* dist-zip <2>:                          List of Automake options.
+                                                              (line  31)
+* distcheck:                             Creating amhello.    (line 100)
+* distcheck <1>:                         Checking the Distribution.
+                                                              (line   6)
+* distcheck better than dist:            Preparing Distributions.
+                                                              (line  10)
+* distcheck example:                     Creating amhello.    (line 100)
+* distcheck-hook:                        Checking the Distribution.
+                                                              (line  55)
+* distclean:                             Standard Targets.    (line  29)
+* distclean <1>:                         Extending.           (line  41)
+* distclean <2>:                         Errors with distclean.
+                                                              (line   6)
+* distclean, diagnostic:                 Errors with distclean.
+                                                              (line   6)
+* distclean-local:                       Clean.               (line  15)
+* distclean-local <1>:                   Extending.           (line  41)
+* distcleancheck:                        Checking the Distribution.
+                                                              (line  70)
+* distdir:                               Third-Party Makefiles.
+                                                              (line  25)
+* Distinction between errors and failures in testsuites: Generalities about Testing.
+                                                              (line  48)
+* Distributions, preparation:            Preparing Distributions.
+                                                              (line   6)
+* distuninstallcheck:                    Checking the Distribution.
+                                                              (line 106)
+* dist_ and nobase_:                     Alternative.         (line  29)
+* dist_ and notrans_:                    Man Pages.           (line  63)
+* DIST_SUBDIRS, explained:               SUBDIRS vs DIST_SUBDIRS.
+                                                              (line   6)
+* dmalloc, support for:                  Public Macros.       (line 123)
+* dvi:                                   Texinfo.             (line  25)
+* dvi <1>:                               Extending.           (line  41)
+* DVI output using Texinfo:              Texinfo.             (line   6)
+* dvi-local:                             Extending.           (line  41)
+* E-mail, bug reports:                   Introduction.        (line  30)
+* EDITION Texinfo flag:                  Texinfo.             (line  35)
+* else:                                  Usage of Conditionals.
+                                                              (line  36)
+* Empty libraries:                       A Library.           (line  48)
+* Empty libraries and $(LIBOBJS):        LIBOBJS.             (line  72)
+* empty _SOURCES:                        Default _SOURCES.    (line  44)
+* endif:                                 Usage of Conditionals.
+                                                              (line  36)
+* Example conditional --enable-debug:    Usage of Conditionals.
+                                                              (line  21)
+* Example conditional AC_CONFIG_FILES:   Usage of Conditionals.
+                                                              (line  79)
+* Example Hello World:                   Hello World.         (line   6)
+* Example of recursive operation:        General Operation.   (line  58)
+* Example of shared libraries:           Libtool Libraries.   (line   6)
+* Example, EXTRA_PROGRAMS:               Uniform.             (line  36)
+* Example, false and true:               true.                (line   6)
+* Example, mixed language:               Mixing Fortran 77 With C and C++.
+                                                              (line  34)
+* Executable extension:                  EXEEXT.              (line   6)
+* Exit status 77, special interpretation: Scripts-based Testsuites.
+                                                              (line  27)
+* Exit status 99, special interpretation: Scripts-based Testsuites.
+                                                              (line  27)
+* expected failure:                      Generalities about Testing.
+                                                              (line  39)
+* expected test failure:                 Generalities about Testing.
+                                                              (line  39)
+* Expected test failure:                 Scripts-based Testsuites.
+                                                              (line  32)
+* Extending aclocal:                     Extending aclocal.   (line   6)
+* Extending list of installation directories: Uniform.        (line  56)
+* Extension, executable:                 EXEEXT.              (line   6)
+* Extra files distributed with Automake: automake Invocation. (line  39)
+* EXTRA_, prepending:                    Uniform.             (line  29)
+* EXTRA_PROGRAMS, defined:               Uniform.             (line  36)
+* EXTRA_PROGRAMS, defined <1>:           Conditional Programs.
+                                                              (line  15)
+* EXTRA_prog_SOURCES, defined:           Conditional Sources. (line  18)
+* false Example:                         true.                (line   6)
+* FCFLAGS and AM_FCFLAGS:                Flag Variables Ordering.
+                                                              (line  20)
+* Features of the GNU Build System:      Use Cases.           (line   6)
+* FFLAGS and AM_FFLAGS:                  Flag Variables Ordering.
+                                                              (line  20)
+* file names, limitations on:            Limitations on File Names.
+                                                              (line   6)
+* filename-length-max=99:                List of Automake options.
+                                                              (line  44)
+* Files distributed with Automake:       automake Invocation. (line  39)
+* First line of Makefile.am:             General Operation.   (line  74)
+* Flag variables, ordering:              Flag Variables Ordering.
+                                                              (line   6)
+* Flag Variables, Ordering:              Flag Variables Ordering.
+                                                              (line  20)
+* FLIBS, defined:                        Mixing Fortran 77 With C and C++.
+                                                              (line  21)
+* foreign:                               amhello's configure.ac Setup Explained.
+                                                              (line  38)
+* foreign <1>:                           List of Automake options.
+                                                              (line   9)
+* foreign strictness:                    Strictness.          (line  10)
+* Fortran 77 support:                    Fortran 77 Support.  (line   6)
+* Fortran 77, mixing with C and C++:     Mixing Fortran 77 With C and C++.
+                                                              (line   6)
+* Fortran 77, Preprocessing:             Preprocessing Fortran 77.
+                                                              (line   6)
+* Fortran 9x support:                    Fortran 9x Support.  (line   6)
+* GCJFLAGS and AM_GCJFLAGS:              Flag Variables Ordering.
+                                                              (line  20)
+* generated files and CVS:               CVS.                 (line  49)
+* generated files, distributed:          CVS.                 (line   9)
+* Gettext support:                       gettext.             (line   6)
+* git-dist:                              General Operation.   (line  12)
+* git-dist, non-standard example:        General Operation.   (line  12)
+* gnits:                                 List of Automake options.
+                                                              (line   9)
+* gnits strictness:                      Strictness.          (line  10)
+* gnu:                                   List of Automake options.
+                                                              (line   9)
+* GNU Build System, basics:              Basic Installation.  (line   6)
+* GNU Build System, features:            Use Cases.           (line   6)
+* GNU Build System, introduction:        GNU Build System.    (line   6)
+* GNU Build System, use cases:           Use Cases.           (line   6)
+* GNU Coding Standards:                  GNU Build System.    (line  29)
+* GNU Gettext support:                   gettext.             (line   6)
+* GNU make extensions:                   General Operation.   (line  20)
+* GNU Makefile standards:                Introduction.        (line  12)
+* gnu strictness:                        Strictness.          (line  10)
+* GNUmakefile including Makefile:        Third-Party Makefiles.
+                                                              (line 111)
+* hard error:                            Generalities about Testing.
+                                                              (line  48)
+* Header files in _SOURCES:              Program Sources.     (line  39)
+* HEADERS primary, defined:              Headers.             (line   6)
+* HEADERS, installation directories:     Headers.             (line   6)
+* Hello World example:                   Hello World.         (line   6)
+* hook targets:                          Extending.           (line  66)
+* HP-UX 10, lex problems:                Public Macros.       (line  95)
+* html:                                  Texinfo.             (line  25)
+* html <1>:                              Extending.           (line  41)
+* HTML output using Texinfo:             Texinfo.             (line   6)
+* html-local:                            Extending.           (line  41)
+* id:                                    Tags.                (line  43)
+* if:                                    Usage of Conditionals.
+                                                              (line  36)
+* include:                               Basics of Distribution.
+                                                              (line  17)
+* include <1>:                           Include.             (line   6)
+* include, distribution:                 Basics of Distribution.
+                                                              (line  17)
+* Including Makefile fragment:           Include.             (line   6)
+* indentation in Makefile.am:            General Operation.   (line  33)
+* info:                                  List of Automake options.
+                                                              (line  93)
+* info <1>:                              Extending.           (line  41)
+* info-in-builddir:                      List of Automake options.
+                                                              (line  53)
+* info-local:                            Extending.           (line  41)
+* install:                               Standard Targets.    (line  18)
+* install <1>:                           The Two Parts of Install.
+                                                              (line  14)
+* install <2>:                           Extending.           (line  41)
+* Install hook:                          Extending Installation.
+                                                              (line  15)
+* Install, two parts of:                 The Two Parts of Install.
+                                                              (line  14)
+* install-data:                          Two-Part Install.    (line  16)
+* install-data <1>:                      The Two Parts of Install.
+                                                              (line  14)
+* install-data <2>:                      Extending.           (line  41)
+* install-data-hook:                     Extending.           (line  66)
+* install-data-local:                    Extending Installation.
+                                                              (line   9)
+* install-data-local <1>:                Extending.           (line  41)
+* install-dvi:                           Texinfo.             (line  25)
+* install-dvi <1>:                       Extending.           (line  41)
+* install-dvi-local:                     Extending.           (line  41)
+* install-exec:                          Two-Part Install.    (line  16)
+* install-exec <1>:                      The Two Parts of Install.
+                                                              (line  14)
+* install-exec <2>:                      Extending.           (line  41)
+* install-exec-hook:                     Extending.           (line  66)
+* install-exec-local:                    Extending Installation.
+                                                              (line   9)
+* install-exec-local <1>:                Extending.           (line  41)
+* install-html:                          Texinfo.             (line  25)
+* install-html <1>:                      Extending.           (line  41)
+* install-html-local:                    Extending.           (line  41)
+* install-info:                          Texinfo.             (line  85)
+* install-info <1>:                      List of Automake options.
+                                                              (line  93)
+* install-info <2>:                      Extending.           (line  41)
+* install-info target:                   Texinfo.             (line  85)
+* install-info-local:                    Extending.           (line  41)
+* install-man:                           Man Pages.           (line  32)
+* install-man <1>:                       List of Automake options.
+                                                              (line  99)
+* install-man target:                    Man Pages.           (line  32)
+* install-pdf:                           Texinfo.             (line  25)
+* install-pdf <1>:                       Extending.           (line  41)
+* install-pdf-local:                     Extending.           (line  41)
+* install-ps:                            Texinfo.             (line  25)
+* install-ps <1>:                        Extending.           (line  41)
+* install-ps-local:                      Extending.           (line  41)
+* install-strip:                         Standard Targets.    (line  21)
+* install-strip <1>:                     Install Rules for the User.
+                                                              (line   7)
+* Installation directories, extending list: Uniform.          (line  56)
+* Installation support:                  Install.             (line   6)
+* Installation, basics:                  Basic Installation.  (line   6)
+* installcheck:                          Standard Targets.    (line  33)
+* installcheck <1>:                      Extending.           (line  41)
+* installcheck-local:                    Extending.           (line  41)
+* installdirs:                           Install Rules for the User.
+                                                              (line   7)
+* installdirs <1>:                       Extending.           (line  41)
+* installdirs-local:                     Extending.           (line  41)
+* Installing headers:                    Headers.             (line   6)
+* Installing scripts:                    Scripts.             (line   6)
+* installing versioned binaries:         Extending.           (line  86)
+* Interfacing with third-party packages: Third-Party Makefiles.
+                                                              (line   6)
+* Invocation of aclocal:                 aclocal Invocation.  (line   6)
+* Invocation of automake:                automake Invocation. (line   6)
+* Invoking aclocal:                      aclocal Invocation.  (line   6)
+* Invoking automake:                     automake Invocation. (line   6)
+* JAVA primary, defined:                 Java.                (line   6)
+* JAVA restrictions:                     Java.                (line  27)
+* Java support with gcj:                 Java Support with gcj.
+                                                              (line   6)
+* Java to bytecode, compilation:         Java.                (line   6)
+* Java to native code, compilation:      Java Support with gcj.
+                                                              (line   6)
+* lazy test execution:                   Parallel Test Harness.
+                                                              (line 118)
+* LDADD and -l:                          Linking.             (line  70)
+* LDFLAGS and AM_LDFLAGS:                Flag Variables Ordering.
+                                                              (line  20)
+* lex problems with HP-UX 10:            Public Macros.       (line  95)
+* lex, multiple lexers:                  Yacc and Lex.        (line  68)
+* LFLAGS and AM_LFLAGS:                  Flag Variables Ordering.
+                                                              (line  20)
+* libltdl, introduction:                 Libtool Concept.     (line  29)
+* LIBOBJS, and Libtool:                  LTLIBOBJS.           (line   6)
+* LIBOBJS, example:                      LIBOBJS.             (line   6)
+* LIBOBJS, special handling:             LIBOBJS.             (line   6)
+* LIBRARIES primary, defined:            A Library.           (line   6)
+* libtool convenience libraries:         Libtool Convenience Libraries.
+                                                              (line   6)
+* libtool libraries, conditional:        Conditional Libtool Libraries.
+                                                              (line   6)
+* libtool library, definition:           Libtool Concept.     (line   6)
+* libtool modules:                       Libtool Modules.     (line   6)
+* Libtool modules, default source example: Default _SOURCES.  (line  38)
+* libtool, introduction:                 Libtool Concept.     (line   6)
+* LIBTOOLFLAGS and AM_LIBTOOLFLAGS:      Flag Variables Ordering.
+                                                              (line  20)
+* libtoolize and autoreconf:             Error required file ltmain.sh not found.
+                                                              (line   6)
+* libtoolize, no longer run by automake: Error required file ltmain.sh not found.
+                                                              (line   6)
+* Limitations of automake parser:        General Operation.   (line  33)
+* Linking Fortran 77 with C and C++:     Mixing Fortran 77 With C and C++.
+                                                              (line   6)
+* LISP primary, defined:                 Emacs Lisp.          (line   6)
+* LN_S example:                          Extending.           (line  86)
+* local targets:                         Extending.           (line  37)
+* LTALLOCA, special handling:            LTLIBOBJS.           (line   6)
+* LTLIBOBJS, special handling:           LTLIBOBJS.           (line   6)
+* LTLIBRARIES primary, defined:          Libtool Libraries.   (line   6)
+* ltmain.sh not found:                   Error required file ltmain.sh not found.
+                                                              (line   6)
+* m4_include, distribution:              Basics of Distribution.
+                                                              (line  17)
+* Macro search path:                     Macro Search Path.   (line   6)
+* macro serial numbers:                  Serials.             (line   6)
+* Macros Automake recognizes:            Optional.            (line   6)
+* maintainer-clean-local:                Clean.               (line  15)
+* make check:                            Tests.               (line   6)
+* make clean support:                    Clean.               (line   6)
+* make dist:                             Basics of Distribution.
+                                                              (line   6)
+* make distcheck:                        Checking the Distribution.
+                                                              (line   6)
+* make distclean, diagnostic:            Errors with distclean.
+                                                              (line   6)
+* make distcleancheck:                   Checking the Distribution.
+                                                              (line  70)
+* make distuninstallcheck:               Checking the Distribution.
+                                                              (line 106)
+* make install support:                  Install.             (line   6)
+* make installcheck, testing --help and --version: List of Automake options.
+                                                              (line 129)
+* Make rules, overriding:                General Operation.   (line  46)
+* Make targets, overriding:              General Operation.   (line  46)
+* Makefile fragment, including:          Include.             (line   6)
+* Makefile.am, first line:               General Operation.   (line  74)
+* Makefile.am, Hello World:              amhello's Makefile.am Setup Explained.
+                                                              (line   6)
+* Man page renaming, avoiding:           Man Pages.           (line  54)
+* MANS primary, defined:                 Man Pages.           (line   6)
+* many outputs, rules with:              Multiple Outputs.    (line   6)
+* mdate-sh:                              Texinfo.             (line  35)
+* MinGW cross-compilation example:       Cross-Compilation.   (line  25)
+* missing, purpose:                      maintainer-mode.     (line   9)
+* Mixed language example:                Mixing Fortran 77 With C and C++.
+                                                              (line  34)
+* Mixing Fortran 77 with C and C++:      Mixing Fortran 77 With C and C++.
+                                                              (line   6)
+* Mixing Fortran 77 with C and/or C++:   Mixing Fortran 77 With C and C++.
+                                                              (line   6)
+* mkdir -p, macro check:                 Obsolete Macros.     (line  14)
+* modules, libtool:                      Libtool Modules.     (line   6)
+* mostlyclean:                           Extending.           (line  41)
+* mostlyclean-local:                     Clean.               (line  15)
+* mostlyclean-local <1>:                 Extending.           (line  41)
+* multiple configurations, example:      VPATH Builds.        (line  46)
+* Multiple configure.ac files:           automake Invocation. (line   6)
+* Multiple lex lexers:                   Yacc and Lex.        (line  68)
+* multiple outputs, rules with:          Multiple Outputs.    (line   6)
+* Multiple yacc parsers:                 Yacc and Lex.        (line  68)
+* Nested packages:                       Nested Packages.     (line   6)
+* Nesting packages:                      Subpackages.         (line   6)
+* no-define:                             Public Macros.       (line  55)
+* no-define <1>:                         List of Automake options.
+                                                              (line  58)
+* no-dependencies:                       Dependencies.        (line  34)
+* no-dependencies <1>:                   List of Automake options.
+                                                              (line  66)
+* no-dist:                               List of Automake options.
+                                                              (line  73)
+* no-dist-gzip:                          List of Automake options.
+                                                              (line  77)
+* no-dist-gzip <1>:                      List of Automake options.
+                                                              (line  77)
+* no-exeext:                             List of Automake options.
+                                                              (line  80)
+* no-installinfo:                        Texinfo.             (line  85)
+* no-installinfo <1>:                    List of Automake options.
+                                                              (line  90)
+* no-installinfo option:                 Texinfo.             (line  85)
+* no-installman:                         Man Pages.           (line  32)
+* no-installman <1>:                     List of Automake options.
+                                                              (line  96)
+* no-installman option:                  Man Pages.           (line  32)
+* no-texinfo.tex:                        List of Automake options.
+                                                              (line 106)
+* nobase_ and dist_ or nodist_:          Alternative.         (line  29)
+* nobase_ prefix:                        Alternative.         (line  23)
+* nodist_ and nobase_:                   Alternative.         (line  29)
+* nodist_ and notrans_:                  Man Pages.           (line  63)
+* noinst_ primary prefix, definition:    Uniform.             (line  90)
+* Non-GNU packages:                      Strictness.          (line   6)
+* Non-standard targets:                  General Operation.   (line  12)
+* nostdinc:                              List of Automake options.
+                                                              (line 102)
+* notrans_ and dist_ or nodist_:         Man Pages.           (line  63)
+* notrans_ prefix:                       Man Pages.           (line  54)
+* OBJCFLAGS and AM_OBJCFLAGS:            Flag Variables Ordering.
+                                                              (line  20)
+* OBJCXXFLAGS and AM_OBJCXXFLAGS:        Flag Variables Ordering.
+                                                              (line  20)
+* Objective C support:                   Objective C Support. (line   6)
+* Objective C++ support:                 Objective C++ Support.
+                                                              (line   6)
+* Objects in subdirectory:               Program and Library Variables.
+                                                              (line  51)
+* obsolete macros:                       Obsolete Macros.     (line   6)
+* optimized build, example:              VPATH Builds.        (line  46)
+* Option, --warnings=CATEGORY:           List of Automake options.
+                                                              (line 211)
+* Option, -WCATEGORY:                    List of Automake options.
+                                                              (line 211)
+* Option, check-news:                    List of Automake options.
+                                                              (line  14)
+* Option, dejagnu:                       List of Automake options.
+                                                              (line  18)
+* Option, dist-bzip2:                    List of Automake options.
+                                                              (line  22)
+* Option, dist-lzip:                     List of Automake options.
+                                                              (line  25)
+* Option, dist-shar:                     List of Automake options.
+                                                              (line  34)
+* Option, dist-tarZ:                     List of Automake options.
+                                                              (line  39)
+* Option, dist-xz:                       List of Automake options.
+                                                              (line  28)
+* Option, dist-zip:                      List of Automake options.
+                                                              (line  31)
+* Option, filename-length-max=99:        List of Automake options.
+                                                              (line  44)
+* Option, foreign:                       List of Automake options.
+                                                              (line   9)
+* Option, gnits:                         List of Automake options.
+                                                              (line   9)
+* Option, gnu:                           List of Automake options.
+                                                              (line   9)
+* Option, info-in-builddir:              List of Automake options.
+                                                              (line  53)
+* Option, no-define:                     List of Automake options.
+                                                              (line  58)
+* Option, no-dependencies:               List of Automake options.
+                                                              (line  66)
+* Option, no-dist:                       List of Automake options.
+                                                              (line  73)
+* Option, no-dist-gzip:                  List of Automake options.
+                                                              (line  77)
+* Option, no-exeext:                     List of Automake options.
+                                                              (line  80)
+* Option, no-installinfo:                Texinfo.             (line  85)
+* Option, no-installinfo <1>:            List of Automake options.
+                                                              (line  90)
+* Option, no-installman:                 Man Pages.           (line  32)
+* Option, no-installman <1>:             List of Automake options.
+                                                              (line  96)
+* Option, no-texinfo.tex:                List of Automake options.
+                                                              (line 106)
+* Option, nostdinc:                      List of Automake options.
+                                                              (line 102)
+* Option, parallel-tests:                List of Automake options.
+                                                              (line 114)
+* Option, readme-alpha:                  List of Automake options.
+                                                              (line 120)
+* Option, serial-tests:                  List of Automake options.
+                                                              (line 110)
+* Option, tar-pax:                       List of Automake options.
+                                                              (line 159)
+* Option, tar-ustar:                     List of Automake options.
+                                                              (line 159)
+* Option, tar-v7:                        List of Automake options.
+                                                              (line 159)
+* Option, VERSION:                       List of Automake options.
+                                                              (line 206)
+* Option, warnings:                      List of Automake options.
+                                                              (line 211)
+* Options, aclocal:                      aclocal Options.     (line   6)
+* Options, automake:                     automake Invocation. (line  37)
+* Options, std-options:                  List of Automake options.
+                                                              (line 129)
+* Options, subdir-objects:               List of Automake options.
+                                                              (line 150)
+* Ordering flag variables:               Flag Variables Ordering.
+                                                              (line   6)
+* Overriding make rules:                 General Operation.   (line  46)
+* Overriding make targets:               General Operation.   (line  46)
+* Overriding make variables:             General Operation.   (line  51)
+* overriding rules:                      Extending.           (line  26)
+* overriding semantics:                  Extending.           (line  26)
+* PACKAGE, directory:                    Uniform.             (line  19)
+* PACKAGE, prevent definition:           Public Macros.       (line  55)
+* Packages, nested:                      Nested Packages.     (line   6)
+* Packages, preparation:                 Preparing Distributions.
+                                                              (line   6)
+* Parallel build trees:                  VPATH Builds.        (line   6)
+* parallel-tests:                        List of Automake options.
+                                                              (line 114)
+* Path stripping, avoiding:              Alternative.         (line  23)
+* pax format:                            List of Automake options.
+                                                              (line 159)
+* pdf:                                   Texinfo.             (line  25)
+* pdf <1>:                               Extending.           (line  41)
+* PDF output using Texinfo:              Texinfo.             (line   6)
+* pdf-local:                             Extending.           (line  41)
+* Per-object flags, emulated:            Per-Object Flags.    (line   6)
+* per-target compilation flags, defined: Program and Library Variables.
+                                                              (line 182)
+* pkgdatadir, defined:                   Uniform.             (line  19)
+* pkgincludedir, defined:                Uniform.             (line  19)
+* pkglibdir, defined:                    Uniform.             (line  19)
+* pkglibexecdir, defined:                Uniform.             (line  19)
+* Preparing distributions:               Preparing Distributions.
+                                                              (line   6)
+* Preprocessing Fortran 77:              Preprocessing Fortran 77.
+                                                              (line   6)
+* Primary variable, DATA:                Data.                (line   6)
+* Primary variable, defined:             Uniform.             (line  11)
+* Primary variable, HEADERS:             Headers.             (line   6)
+* Primary variable, JAVA:                Java.                (line   6)
+* Primary variable, LIBRARIES:           A Library.           (line   6)
+* Primary variable, LISP:                Emacs Lisp.          (line   6)
+* Primary variable, LTLIBRARIES:         Libtool Libraries.   (line   6)
+* Primary variable, MANS:                Man Pages.           (line   6)
+* Primary variable, PROGRAMS:            Uniform.             (line  11)
+* Primary variable, PYTHON:              Python.              (line   6)
+* Primary variable, SCRIPTS:             Scripts.             (line   6)
+* Primary variable, SOURCES:             Program Sources.     (line  32)
+* Primary variable, TEXINFOS:            Texinfo.             (line   6)
+* PROGRAMS primary variable:             Uniform.             (line  11)
+* Programs, auxiliary:                   Auxiliary Programs.  (line   6)
+* PROGRAMS, bindir:                      Program Sources.     (line   6)
+* Programs, conditional:                 Conditional Programs.
+                                                              (line   6)
+* Programs, renaming during installation: Renaming.           (line   6)
+* prog_LDADD, defined:                   Linking.             (line  12)
+* Proxy Makefile for third-party packages: Third-Party Makefiles.
+                                                              (line 128)
+* ps:                                    Texinfo.             (line  25)
+* ps <1>:                                Extending.           (line  41)
+* PS output using Texinfo:               Texinfo.             (line   6)
+* ps-local:                              Extending.           (line  41)
+* PYTHON primary, defined:               Python.              (line   6)
+* Ratfor programs:                       Preprocessing Fortran 77.
+                                                              (line   6)
+* read-only source tree:                 VPATH Builds.        (line  89)
+* readme-alpha:                          List of Automake options.
+                                                              (line 120)
+* README-alpha:                          Gnits.               (line  42)
+* rebuild rules:                         Rebuilding.          (line   6)
+* rebuild rules <1>:                     CVS.                 (line   9)
+* recheck:                               Parallel Test Harness.
+                                                              (line 130)
+* Recognized macros by Automake:         Optional.            (line   6)
+* Recursive operation of Automake:       General Operation.   (line  58)
+* recursive targets and third-party Makefiles: Third-Party Makefiles.
+                                                              (line  15)
+* Register test case result:             Log files generation and test results recording.
+                                                              (line  24)
+* Register test result:                  Log files generation and test results recording.
+                                                              (line  24)
+* Renaming programs:                     Renaming.            (line   6)
+* Reporting bugs:                        Introduction.        (line  30)
+* Requirements of Automake:              Requirements.        (line   6)
+* Requirements, Automake:                Introduction.        (line  26)
+* Restrictions for JAVA:                 Java.                (line  27)
+* reStructuredText field, :copy-in-global-log:: Log files generation and test results recording.
+                                                              (line  44)
+* reStructuredText field, :recheck::     Log files generation and test results recording.
+                                                              (line  38)
+* reStructuredText field, :test-global-result:: Log files generation and test results recording.
+                                                              (line  54)
+* reStructuredText field, :test-result:: Log files generation and test results recording.
+                                                              (line  24)
+* RFLAGS and AM_RFLAGS:                  Flag Variables Ordering.
+                                                              (line  20)
+* rules with multiple outputs:           Multiple Outputs.    (line   6)
+* rules, conflicting:                    Extending.           (line  14)
+* rules, debugging:                      Debugging Make Rules.
+                                                              (line   6)
+* rules, overriding:                     Extending.           (line  26)
+* Scanning configure.ac:                 configure.           (line   6)
+* SCRIPTS primary, defined:              Scripts.             (line   6)
+* SCRIPTS, installation directories:     Scripts.             (line  18)
+* Selecting the linker automatically:    How the Linker is Chosen.
+                                                              (line   6)
+* serial number and --install:           aclocal Options.     (line  38)
+* serial numbers in macros:              Serials.             (line   6)
+* serial-tests:                          List of Automake options.
+                                                              (line 110)
+* serial-tests, Using:                   Serial Test Harness. (line   6)
+* Shared libraries, support for:         A Shared Library.    (line   6)
+* Silencing make:                        Silencing Make.      (line   6)
+* Silent make:                           Silencing Make.      (line   6)
+* Silent make rules:                     Silencing Make.      (line   6)
+* Silent rules:                          Silencing Make.      (line   6)
+* silent rules and libtool:              Automake Silent Rules.
+                                                              (line  59)
+* site.exp:                              DejaGnu Tests.       (line  26)
+* source tree and build tree:            VPATH Builds.        (line   6)
+* source tree, read-only:                VPATH Builds.        (line  89)
+* SOURCES primary, defined:              Program Sources.     (line  32)
+* Special Automake comment:              General Operation.   (line  68)
+* Staged installation:                   DESTDIR.             (line  14)
+* std-options:                           List of Automake options.
+                                                              (line 129)
+* Strictness, command line:              automake Invocation. (line  37)
+* Strictness, defined:                   Strictness.          (line  10)
+* Strictness, foreign:                   Strictness.          (line  10)
+* Strictness, gnits:                     Strictness.          (line  10)
+* Strictness, gnu:                       Strictness.          (line  10)
+* su, before make install:               Basic Installation.  (line  49)
+* subdir-objects:                        List of Automake options.
+                                                              (line 150)
+* Subdirectories, building conditionally: Conditional Subdirectories.
+                                                              (line   6)
+* Subdirectories, configured conditionally: Unconfigured Subdirectories.
+                                                              (line   6)
+* Subdirectories, not distributed:       Unconfigured Subdirectories.
+                                                              (line  55)
+* Subdirectory, objects in:              Program and Library Variables.
+                                                              (line  51)
+* SUBDIRS and AC_SUBST:                  Subdirectories with AC_SUBST.
+                                                              (line   6)
+* SUBDIRS and AM_CONDITIONAL:            Subdirectories with AM_CONDITIONAL.
+                                                              (line   6)
+* SUBDIRS, conditional:                  Conditional Subdirectories.
+                                                              (line   6)
+* SUBDIRS, explained:                    Subdirectories.      (line   6)
+* Subpackages:                           Nested Packages.     (line   6)
+* Subpackages <1>:                       Subpackages.         (line   6)
+* suffix .la, defined:                   Libtool Concept.     (line   6)
+* suffix .lo, defined:                   Libtool Concept.     (line  15)
+* SUFFIXES, adding:                      Suffixes.            (line   6)
+* Support for C++:                       C++ Support.         (line   6)
+* Support for Fortran 77:                Fortran 77 Support.  (line   6)
+* Support for Fortran 9x:                Fortran 9x Support.  (line   6)
+* Support for GNU Gettext:               gettext.             (line   6)
+* Support for Java with gcj:             Java Support with gcj.
+                                                              (line   6)
+* Support for Objective C:               Objective C Support. (line   6)
+* Support for Objective C++:             Objective C++ Support.
+                                                              (line   6)
+* Support for Unified Parallel C:        Unified Parallel C Support.
+                                                              (line   6)
+* Support for Vala:                      Vala Support.        (line   6)
+* tags:                                  Tags.                (line   9)
+* TAGS support:                          Tags.                (line   6)
+* tar formats:                           List of Automake options.
+                                                              (line 159)
+* tar-pax:                               List of Automake options.
+                                                              (line 159)
+* tar-ustar:                             List of Automake options.
+                                                              (line 159)
+* tar-v7:                                List of Automake options.
+                                                              (line 159)
+* Target, install-info:                  Texinfo.             (line  85)
+* Target, install-man:                   Man Pages.           (line  32)
+* test case:                             Generalities about Testing.
+                                                              (line  11)
+* Test case result, registering:         Log files generation and test results recording.
+                                                              (line  24)
+* test failure:                          Generalities about Testing.
+                                                              (line  25)
+* test harness:                          Generalities about Testing.
+                                                              (line  18)
+* test metadata:                         Parallel Test Harness.
+                                                              (line  12)
+* test pass:                             Generalities about Testing.
+                                                              (line  25)
+* Test result, registering:              Log files generation and test results recording.
+                                                              (line  24)
+* test skip:                             Generalities about Testing.
+                                                              (line  29)
+* Test suites:                           Tests.               (line   6)
+* Tests, expected failure:               Scripts-based Testsuites.
+                                                              (line  32)
+* testsuite harness:                     Generalities about Testing.
+                                                              (line  18)
+* Testsuite progress on console:         Scripts-based Testsuites.
+                                                              (line  45)
+* Texinfo flag, EDITION:                 Texinfo.             (line  35)
+* Texinfo flag, UPDATED:                 Texinfo.             (line  35)
+* Texinfo flag, UPDATED-MONTH:           Texinfo.             (line  35)
+* Texinfo flag, VERSION:                 Texinfo.             (line  35)
+* texinfo.tex:                           Texinfo.             (line  70)
+* TEXINFOS primary, defined:             Texinfo.             (line   6)
+* third-party files and CVS:             CVS.                 (line 167)
+* Third-party packages, interfacing with: Third-Party Makefiles.
+                                                              (line   6)
+* timestamps and CVS:                    CVS.                 (line  28)
+* Transforming program names:            Renaming.            (line   6)
+* trees, source vs. build:               VPATH Builds.        (line   6)
+* true Example:                          true.                (line   6)
+* underquoted AC_DEFUN:                  Extending aclocal.   (line  36)
+* unexpected pass:                       Generalities about Testing.
+                                                              (line  39)
+* unexpected test pass:                  Generalities about Testing.
+                                                              (line  39)
+* Unified Parallel C support:            Unified Parallel C Support.
+                                                              (line   6)
+* Uniform naming scheme:                 Uniform.             (line   6)
+* uninstall:                             Standard Targets.    (line  24)
+* uninstall <1>:                         Install Rules for the User.
+                                                              (line   7)
+* uninstall <2>:                         Extending.           (line  41)
+* uninstall-hook:                        Extending.           (line  66)
+* uninstall-local:                       Extending.           (line  41)
+* Unit tests:                            Parallel Test Harness.
+                                                              (line 154)
+* Unpacking:                             Basic Installation.  (line  27)
+* UPCFLAGS and AM_UPCFLAGS:              Flag Variables Ordering.
+                                                              (line  20)
+* UPDATED Texinfo flag:                  Texinfo.             (line  35)
+* UPDATED-MONTH Texinfo flag:            Texinfo.             (line  35)
+* Use Cases for the GNU Build System:    Use Cases.           (line   6)
+* user variables:                        User Variables.      (line   6)
+* Using aclocal:                         configure.           (line   6)
+* ustar format:                          List of Automake options.
+                                                              (line 159)
+* v7 tar format:                         List of Automake options.
+                                                              (line 159)
+* Vala Support:                          Vala Support.        (line   6)
+* variables, conflicting:                Extending.           (line  14)
+* Variables, overriding:                 General Operation.   (line  51)
+* variables, reserved for the user:      User Variables.      (line   6)
+* VERSION Texinfo flag:                  Texinfo.             (line  35)
+* VERSION, prevent definition:           Public Macros.       (line  55)
+* version.m4, example:                   Rebuilding.          (line  12)
+* version.sh, example:                   Rebuilding.          (line  12)
+* versioned binaries, installing:        Extending.           (line  86)
+* VPATH builds:                          VPATH Builds.        (line   6)
+* wildcards:                             Wildcards.           (line   6)
+* Windows:                               EXEEXT.              (line   6)
+* xfail:                                 Generalities about Testing.
+                                                              (line  39)
+* xpass:                                 Generalities about Testing.
+                                                              (line  39)
+* yacc, multiple parsers:                Yacc and Lex.        (line  68)
+* YFLAGS and AM_YFLAGS:                  Flag Variables Ordering.
+                                                              (line  20)
+* ylwrap:                                Yacc and Lex.        (line  68)
+* zardoz example:                        Complete.            (line  35)
+
diff --git a/doc/automake.info-3 b/doc/automake.info-3
deleted file mode 100644 (file)
index 8e4fc46..0000000
Binary files a/doc/automake.info-3 and /dev/null differ
index 939fe44..da0aa29 100644 (file)
@@ -2,6 +2,8 @@
 @c %**start of header
 @setfilename automake.info
 @settitle automake
+@documentencoding UTF-8
+@documentlanguage en
 @setchapternewpage off
 @c %**end of header
 
@@ -23,7 +25,7 @@ This manual is for GNU Automake (version @value{VERSION},
 @value{UPDATED}), a program that creates GNU standards-compliant
 Makefiles from template files.
 
-Copyright @copyright{} 1995-2012 Free Software Foundation, Inc.
+Copyright @copyright{} 1995-2017 Free Software Foundation, Inc.
 
 @quotation
 Permission is granted to copy, distribute and/or modify this document
@@ -53,6 +55,8 @@ section entitled ``GNU Free Documentation License.''
 @author David MacKenzie
 @author Tom Tromey
 @author Alexandre Duret-Lutz
+@author Ralf Wildenhues
+@author Stefano Lattarini
 @page
 @vskip 0pt plus 1filll
 @insertcopying
@@ -115,7 +119,6 @@ section entitled ``GNU Free Documentation License.''
 * Conditionals::                Conditionals
 * Silencing Make::              Obtain less verbose output from @command{make}
 * Gnits::                       The effect of @option{--gnu} and @option{--gnits}
-* Cygnus::                      The effect of @option{--cygnus} (deprecated, soon to be removed)
 * Not Enough::                  When Automake is not Enough
 * Distributing::                Distributing the Makefile.in
 * API Versioning::              About compatibility between Automake versions
@@ -190,7 +193,6 @@ Auto-generating aclocal.m4
 Autoconf macros supplied with Automake
 
 * Public Macros::               Macros that you can use.
-* Obsolete Macros::             Macros that will soon be removed.
 * Private Macros::              Macros that you should not use.
 
 Directories
@@ -321,7 +323,7 @@ Support for test suites
 Simple Tests
 
 * Scripts-based Testsuites::    Automake-specific concepts and terminology
-* Serial Test Harness::         Older (and obsolescent) serial test harness
+* Serial Test Harness::         Older (and discouraged) serial test harness
 * Parallel Test Harness::       Generic concurrent test harness
 
 Using the TAP test protocol
@@ -360,9 +362,9 @@ Conditionals
 
 Silencing Make
 
-* Make verbosity::               Make is verbose by default
-* Tricks For Silencing Make::    Standard and generic ways to silence make
-* Automake silent-rules Option:: How Automake can help in silencing make
+* Make verbosity::              Make is verbose by default
+* Tricks For Silencing Make::   Standard and generic ways to silence make
+* Automake Silent Rules::       How Automake can help in silencing make
 
 When Automake Isn't Enough
 
@@ -422,8 +424,7 @@ individual GNU maintainer (and put it on the back of the Automake
 maintainers).
 
 The typical Automake input file is simply a series of variable definitions.
-Each such file is processed to create a @file{Makefile.in}.  There
-should generally be one @file{Makefile.am} per directory of a project.
+Each such file is processed to create a @file{Makefile.in}.
 
 @cindex Constraints of Automake
 @cindex Automake constraints
@@ -540,7 +541,7 @@ illustration of the GNU Build System in action.
 @cindex @file{amhello-1.0.tar.gz}, use cases
 
 In this section we explore several use cases for the GNU Build System.
-You can replay all these examples on the @file{amhello-1.0.tar.gz}
+You can replay all of these examples on the @file{amhello-1.0.tar.gz}
 package distributed with Automake.  If Automake is installed on your
 system, you should find a copy of this file in
 @file{@var{prefix}/share/doc/automake/amhello-1.0.tar.gz}, where
@@ -1241,8 +1242,12 @@ uninstall} do not omit any file (@pxref{Standard Targets}),
 and it checks that @code{DESTDIR} installations work (@pxref{DESTDIR}).
 @end itemize
 
-All of these actions are performed in a temporary subdirectory, so
-that no root privileges are required.
+All of these actions are performed in a temporary directory, so that no
+root privileges are required.  Please note that the exact location and the
+exact structure of such a subdirectory (where the extracted sources are
+placed, how the temporary build and install directories are named and how
+deeply they are nested, etc.) is to be considered an implementation detail,
+which can change at any time; so do not rely on it.
 
 Releasing a package that fails @code{make distcheck} means that one of
 the scenarios we presented will not work and some users will be
@@ -1455,7 +1460,7 @@ package.
 @example
 ~/amhello % @kbd{cat README}
 This is a demonstration package for GNU Automake.
-Type `info Automake' to read the Automake manual.
+Type 'info Automake' to read the Automake manual.
 @end example
 
 @item
@@ -1497,9 +1502,10 @@ command as follows:
 
 @example
 ~/amhello % @kbd{autoreconf --install}
-configure.ac: installing `./install-sh'
-configure.ac: installing `./missing'
-src/Makefile.am: installing `./depcomp'
+configure.ac: installing './install-sh'
+configure.ac: installing './missing'
+configure.ac: installing './compile'
+src/Makefile.am: installing './depcomp'
 @end example
 
 At this point the build system is complete.
@@ -1567,7 +1573,7 @@ when you execute @command{make}.
 @command{autoreconf} is a script that calls @command{autoconf},
 @command{automake}, and a bunch of other commands in the right order.
 If you are beginning with these tools, it is not important to figure
-out in which order all these tools should be invoked and why.  However,
+out in which order all of these tools should be invoked and why.  However,
 because Autoconf and Automake have separate manuals, the important
 point to understand is that @command{autoconf} is in charge of
 creating @file{configure} from @file{configure.ac}, while
@@ -1828,7 +1834,7 @@ variable definitions.
 @cindex indentation in Makefile.am
 Generally, Automake is not particularly smart in the parsing of unusual
 Makefile constructs, so you're advised to avoid fancy constructs or
-``creative'' use of whitespaces.
+``creative'' use of whitespace.
 @c Keep this in sync with doc-parsing-buglets-tabs.sh
 For example, @key{TAB} characters cannot be used between a target name
 and the following ``@code{:}'' character, and variable assignments
@@ -1840,8 +1846,8 @@ Also, using more complex macro in target names can cause trouble:
 % @kbd{cat Makefile.am}
 $(FOO:=x): bar
 % @kbd{automake}
-Makefile.am:1: bad characters in variable name `$(FOO'
-Makefile.am:1: `:='-style assignments are not portable
+Makefile.am:1: bad characters in variable name '$(FOO'
+Makefile.am:1: ':='-style assignments are not portable
 @end example
 
 @cindex Make targets, overriding
@@ -1900,9 +1906,6 @@ It is customary to make the first line of @file{Makefile.am} read:
 ## Process this file with automake to produce Makefile.in
 @end example
 
-@c FIXME discuss putting a copyright into Makefile.am here?  I would but
-@c I don't know quite what to say.
-
 @c FIXME document customary ordering of Makefile.am here!
 
 
@@ -1955,14 +1958,6 @@ standard is actually published (which may never happen).
 @xref{Gnits}, for more information on the precise implications of the
 strictness level.
 
-Automake also has a special (and @emph{today deprecated}) ``cygnus'' mode
-that is similar to strictness but handled differently.  This mode is
-useful for packages that are put into a ``Cygnus'' style tree (e.g., older
-versions of the GCC and gdb trees).  @xref{Cygnus}, for more information
-on this mode.  Please note that this mode @emph{is deprecated and will be
-removed in the next major Automake release (1.13)}; you must avoid its use
-in new packages, and should stop using it in existing packages as well.
-
 
 @node Uniform
 @section The Uniform Naming Scheme
@@ -2291,9 +2286,6 @@ generate not only the desired output but also dependency information
 that is then used by the automatic dependency tracking feature
 (@pxref{Dependencies}).
 
-@item elisp-comp
-This program is used to byte-compile Emacs Lisp code.
-
 @item install-sh
 This is a replacement for the @command{install} program that works on
 platforms where @command{install} is unavailable or unusable.
@@ -2304,9 +2296,9 @@ a file and prints some date information about it.
 
 @item missing
 This wraps a number of programs that are typically only required by
-maintainers.  If the program in question doesn't exist,
-@command{missing} prints an informative warning and attempts to fix
-things so that the build can continue.
+maintainers.  If the program in question doesn't exist, or seems to old,
+@command{missing} will print an informative warning before failing out,
+to provide the user with more context and information.
 
 @item mkinstalldirs
 This script used to be a wrapper around @samp{mkdir -p}, which is not
@@ -2600,13 +2592,6 @@ scripts and data files (like e.g., @file{texinfo.texi} and
 When used with @option{--add-missing}, causes installed files to be
 copied.  The default is to make a symbolic link.
 
-@item --cygnus
-@opindex --cygnus
-Causes the generated @file{Makefile.in}s to follow Cygnus rules, instead
-of GNU or Gnits rules.  For more information, see @ref{Cygnus}.
-Note that @emph{this mode of operation is deprecated, and will be removed}
-in the next major Automake release (1.13).
-
 @item -f
 @opindex -f
 @itemx --force-missing
@@ -2710,11 +2695,9 @@ A category can be turned off by prefixing its name with @samp{no-}.  For
 instance, @option{-Wno-syntax} will hide the warnings about unused
 variables.
 
-The categories output by default are @samp{syntax} and
+The categories output by default are @samp{obsolete}, @samp{syntax} and
 @samp{unsupported}.  Additionally, @samp{gnu} and @samp{portability}
 are enabled in @option{--gnu} and @option{--gnits} strictness.
-On the other hand, the @option{silent-rules} options (@pxref{Options})
-turns off portability warnings about recursive variable expansions.
 
 @c Checked by extra-portability.sh
 Turning off @samp{portability} will also turn off @samp{extra-portability},
@@ -2868,7 +2851,7 @@ make reference to @samp{$file} as @samp{$@{file@}} (i.e., in a way
 that is compatible with @command{make}'s syntax) and furthermore use
 @code{AC_SUBST} to ensure that @samp{$@{file@}} is meaningful in a
 @file{Makefile}, then @command{automake} will be able to use
-@samp{$@{file@}} to generate all these rules.  For instance, here is
+@samp{$@{file@}} to generate all of these rules.  For instance, here is
 how the Automake package itself generates versioned scripts for its
 test suite:
 
@@ -2948,7 +2931,6 @@ Automake will look for various helper scripts, such as
 @file{config.guess},
 @file{config.sub},
 @file{depcomp},
-@file{elisp-comp},
 @file{compile},
 @file{install-sh},
 @file{ltmain.sh},
@@ -2980,9 +2962,11 @@ Automake will require the sources file declared with
 macro.
 
 @item AC_CONFIG_HEADERS
-Automake will generate rules to rebuild these headers.  Older versions
-of Automake required the use of @code{AM_CONFIG_HEADER}
-(@pxref{Macros}); this is no longer the case.
+Automake will generate rules to rebuild these headers from the
+corresponding templates (usually, the template for a @file{foo.h}
+header being @file{foo.h.in}).  Older versions of Automake
+required the use of @code{AM_CONFIG_HEADER}; this is no longer
+the case, and that macro has indeed been removed.
 
 As with @code{AC_CONFIG_FILES} (@pxref{Requirements}), parts of the
 specification using shell variables will be ignored as far as
@@ -3295,7 +3279,7 @@ find third-party @file{.m4} files.  When this option is given, normal
 processing is suppressed.  This option was used @emph{in the past} by
 third-party packages to determine where to install @file{.m4} macro
 files, but @emph{this usage is today discouraged}, since it causes
-@samp{$(prefix)} not to be thoroughly honoured (which violates the
+@samp{$(prefix)} not to be thoroughly honored (which violates the
 GNU Coding Standards), and a similar semantics can be better obtained
 with the @env{ACLOCAL_PATH} environment variable; @pxref{Extending aclocal}.
 
@@ -3491,7 +3475,7 @@ Also note that, if the @option{--install} option is used, any @file{.m4}
 file containing a required macro that is found in a directory listed in
 @env{ACLOCAL_PATH} will be installed locally.
 @c Keep in sync with aclocal-path-installed-serial.sh
-In this case, serial numbers in @file{.m4} are honoured too,
+In this case, serial numbers in @file{.m4} are honored too,
 @pxref{Serials}.
 
 Conversely to @file{dirlist}, @env{ACLOCAL_PATH} is useful if you are
@@ -3560,7 +3544,7 @@ lot of people, because @command{aclocal} was not so strict in the past
 and many third party macros are underquoted; and we have to apologize
 for this temporary inconvenience.  The reason we have to be stricter
 is that a future implementation of @command{aclocal} (@pxref{Future of
-aclocal}) will have to temporarily include all these third party
+aclocal}) will have to temporarily include all of these third party
 @file{.m4} files, maybe several times, including even files that are
 not actually needed.  Doing so should alleviate many problems of the
 current implementation, however it requires a stricter style from the
@@ -3624,32 +3608,19 @@ henceforth be visible to @command{autoconf}.  However if it contains
 numerous macros, it will rapidly become difficult to maintain, and it
 will be almost impossible to share macros between packages.
 
-@vindex ACLOCAL_AMFLAGS
 The second possibility, which we do recommend, is to write each macro
 in its own file and gather all these files in a directory.  This
-directory is usually called @file{m4/}.  To build @file{aclocal.m4},
-one should therefore instruct @command{aclocal} to scan @file{m4/}.
-From the command line, this is done with @samp{aclocal -I m4}.  The
-top-level @file{Makefile.am} should also be updated to define
+directory is usually called @file{m4/}.  Then it's enough to update
+@file{configure.ac} by adding a proper call to @code{AC_CONFIG_MACRO_DIRS}:
 
 @example
-ACLOCAL_AMFLAGS = -I m4
+AC_CONFIG_MACRO_DIRS([m4])
 @end example
 
-@code{ACLOCAL_AMFLAGS} contains options to pass to @command{aclocal}
-when @file{aclocal.m4} is to be rebuilt by @command{make}.  This line is
-also used by @command{autoreconf} (@pxref{autoreconf Invocation, ,
-Using @command{autoreconf} to Update @file{configure} Scripts,
-autoconf, The Autoconf Manual}) to run @command{aclocal} with suitable
-options, or by @command{autopoint} (@pxref{autopoint Invocation, ,
-Invoking the @command{autopoint} Program, gettext, GNU gettext tools})
-and @command{gettextize} (@pxref{gettextize Invocation, , Invoking the
-@command{gettextize} Program, gettext, GNU gettext tools}) to locate
-the place where Gettext's macros should be installed.  So even if you
-do not really care about the rebuild rules, you should define
-@code{ACLOCAL_AMFLAGS}.
+@command{aclocal} will then take care of automatically adding @file{m4/}
+to its search path for m4 files.
 
-When @samp{aclocal -I m4} is run, it will build an @file{aclocal.m4}
+When @samp{aclocal} is run, it will build an @file{aclocal.m4}
 that @code{m4_include}s any file from @file{m4/} that defines a
 required macro.  Macros not found locally will still be searched in
 system-wide directories, as explained in @ref{Macro Search Path}.
@@ -3678,19 +3649,14 @@ this requirement will hinder development.  An easy solution is to copy
 such third-party macros in your local @file{m4/} directory so they get
 distributed.
 
-Since Automake 1.10, @command{aclocal} offers an option to copy these
-system-wide third-party macros in your local macro directory, solving
-the above problem.  Simply use:
+Since Automake 1.10, @command{aclocal} offers the option @code{--install}
+to copy these system-wide third-party macros in your local macro directory,
+helping to solve the above problem.
 
-@example
-ACLOCAL_AMFLAGS = -I m4 --install
-@end example
-
-@noindent
 With this setup, system-wide macros will be copied to @file{m4/}
-the first time you run @command{autoreconf}.  Then the locally
-installed macros will have precedence over the system-wide installed
-macros each time @command{aclocal} is run again.
+the first time you run @command{aclocal}.  Then the locally installed
+macros will have precedence over the system-wide installed macros
+each time @command{aclocal} is run again.
 
 One reason why you should keep @option{--install} in the flags even
 after the first run is that when you later edit @file{configure.ac}
@@ -3771,16 +3737,14 @@ MyPackage uses an @file{m4/} directory to store local macros as
 explained in @ref{Local Macros}, and has
 
 @example
-ACLOCAL_AMFLAGS = -I m4 --install
+AC_CONFIG_MACRO_DIRS([m4])
 @end example
 
 @noindent
-in its top-level @file{Makefile.am}.
+in its @file{configure.ac}.
 
 Initially the @file{m4/} directory is empty.  The first time we run
-@command{autoreconf}, it will fetch the options to pass to
-@command{aclocal} in @file{Makefile.am}, and run @samp{aclocal -I m4
---install}.  @command{aclocal} will notice that
+@command{aclocal --install}, it will notice that
 
 @itemize @bullet
 @item
@@ -3798,9 +3762,8 @@ and @command{aclocal} was given the @option{--install} option, it will
 copy this file in @file{m4/thirdparty.m4}, and output an
 @file{aclocal.m4} that contains @samp{m4_include([m4/thirdparty.m4])}.
 
-The next time @samp{aclocal -I m4 --install} is run (either via
-@command{autoreconf}, by hand, or from the @file{Makefile} rebuild
-rules) something different happens.  @command{aclocal} notices that
+The next time @samp{aclocal --install} is run, something different
+happens.  @command{aclocal} notices that
 
 @itemize @bullet
 @item
@@ -3826,8 +3789,8 @@ the system-wide file in case of equal serial numbers.
 
 Now suppose the system-wide third-party macro is changed.  This can
 happen if the package installing this macro is updated.  Let's suppose
-the new macro has serial number 2.  The next time @samp{aclocal -I m4
---install} is run the situation is the following:
+the new macro has serial number 2.  The next time @samp{aclocal --install}
+is run the situation is the following:
 
 @itemize @bullet
 @item
@@ -3853,16 +3816,16 @@ macro in @file{m4/thirdparty.m4}, in this case overriding the old
 version.  MyPackage just had its macro updated as a side effect of
 running @command{aclocal}.
 
-If you are leery of letting @command{aclocal} update your local macro,
-you can run @samp{aclocal -I m4 --diff} to review the changes
-@samp{aclocal -I m4 --install} would perform on these macros.
+If you are leery of letting @command{aclocal} update your local
+macro, you can run @samp{aclocal --diff} to review the changes
+@samp{aclocal --install} would perform on these macros.
 
 Finally, note that the @option{--force} option of @command{aclocal} has
 absolutely no effect on the files installed by @option{--install}.  For
 instance, if you have modified your local macros, do not expect
 @option{--install --force} to replace the local macros by their
 system-wide versions.  If you want to do so, simply erase the local
-macros you want to revert, and run @samp{aclocal -I m4 --install}.
+macros you want to revert, and run @samp{aclocal --install}.
 
 
 @node Future of aclocal
@@ -3894,12 +3857,12 @@ will have been taken care of.  If otherwise you used to call
 @command{aclocal} directly yourself or from some script, you will
 quickly notice the change.
 
-Many packages come with a script called @file{bootstrap.sh} or
+Many packages come with a script called @file{bootstrap} or
 @file{autogen.sh}, that will just call @command{aclocal},
 @command{libtoolize}, @command{gettextize} or @command{autopoint},
 @command{autoconf}, @command{autoheader}, and @command{automake} in
 the right order.  Actually this is precisely what @command{autoreconf}
-can do for you.  If your package has such a @file{bootstrap.sh} or
+can do for you.  If your package has such a @file{bootstrap} or
 @file{autogen.sh} script, consider using @command{autoreconf}.  That
 should simplify its logic a lot (less things to maintain, yum!), it's
 even likely you will not need the script anymore, and more to the point
@@ -3940,18 +3903,27 @@ Runs many macros required for proper operation of the generated Makefiles.
 
 @vindex AUTOMAKE_OPTIONS
 Today, @code{AM_INIT_AUTOMAKE} is called with a single argument: a
-space-separated list of Automake options that should
-be applied to every @file{Makefile.am} in the tree.  The effect is as if
+space-separated list of Automake options that should be applied to
+every @file{Makefile.am} in the tree.  The effect is as if
 each option were listed in @code{AUTOMAKE_OPTIONS} (@pxref{Options}).
 
 @acindex AC_INIT
-This macro can also be called in @emph{another, deprecated form} (support
-for which will be @emph{removed in the next major Automake release (1.13)}):
+This macro can also be called in another, @emph{deprecated} form:
 @code{AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])}.  In this form,
 there are two required arguments: the package and the version number.
-This form is obsolete because the @var{package} and @var{version} can
-be obtained from Autoconf's @code{AC_INIT} macro (which itself has an
-old and a new form).
+This usage is mostly obsolete because the @var{package} and @var{version}
+can be obtained from Autoconf's @code{AC_INIT} macro.  However,
+differently from what happens for @code{AC_INIT} invocations, this
+@code{AM_INIT_AUTOMAKE} invocation supports shell variables' expansions
+in the @code{PACKAGE} and @code{VERSION} arguments (which otherwise
+defaults, respectively, to the @code{PACKAGE_TARNAME} and
+@code{PACKAGE_VERSION} defined via the @code{AC_INIT} invocation;
+@pxref{AC_INIT, , The @code{AC_INIT} macro, autoconf, The Autoconf Manual});
+and this can be still be useful in some selected situations.
+Our hope is that future Autoconf versions will improve their support
+for package versions defined dynamically at configure runtime; when
+(and if) this happens, support for the two-args @code{AM_INIT_AUTOMAKE}
+invocation will likely be removed from Automake.
 
 @anchor{Modernize AM_INIT_AUTOMAKE invocation}
 If your @file{configure.ac} has:
@@ -3987,9 +3959,9 @@ explicitly).
 @opindex no-define
 By default this macro @code{AC_DEFINE}'s @code{PACKAGE} and
 @code{VERSION}.  This can be avoided by passing the @option{no-define}
-option:
+option (@pxref{List of Automake options}):
 @example
-AM_INIT_AUTOMAKE([gnits 1.5 no-define dist-bzip2])
+AM_INIT_AUTOMAKE([no-define ...])
 @end example
 
 @item AM_PATH_LISPDIR
@@ -4030,11 +4002,11 @@ choose the assembler for you (by default the C compiler) and set
 
 @item AM_PROG_CC_C_O
 @acindex AM_PROG_CC_C_O
-@acindex AC_PROG_CC_C_O
-This is like @code{AC_PROG_CC_C_O}, but it generates its results in
-the manner required by Automake.  You must use this instead of
-@code{AC_PROG_CC_C_O} when you need this functionality, that is, when
-using per-target flags or subdir-objects with C sources.
+This is an obsolescent macro that checks that the C compiler supports
+the @option{-c} and @option{-o} options together.  Note that, since
+Automake 1.14, the @code{AC_PROG_CC} is rewritten to implement such
+checks itself, and thus the explicit use of @code{AM_PROG_CC_C_O}
+should no longer be required.
 
 @item AM_PROG_LEX
 @acindex AM_PROG_LEX
@@ -4062,9 +4034,20 @@ variable.  The default @var{compiler-search-list} is @samp{upcc upc}.
 This macro will abort @command{configure} if no Unified Parallel C
 compiler is found.
 
+@item AM_MISSING_PROG(@var{name}, @var{program})
+@acindex AM_MISSING_PROG
+@vindex MISSING
+Find a maintainer tool @var{program} and define the @var{name}
+environment variable with its location.  If @var{program} is not
+detected, then @var{name} will instead invoke the @command{missing}
+script, in order to give useful advice to the user about the missing
+maintainer tool.  @xref{maintainer-mode}, for more information on when
+the @command{missing} script is appropriate.
+
 @item AM_SILENT_RULES
 @acindex AM_SILENT_RULES
-Enable the machinery for less verbose build output (@pxref{Options}).
+Control the machinery for less verbose build output
+(@pxref{Automake Silent Rules}).
 
 @item AM_WITH_DMALLOC
 @acindex AM_WITH_DMALLOC
@@ -4094,19 +4077,6 @@ Invocation, , Using @command{autoupdate} to Modernize
 
 @table @code
 
-@item AM_CONFIG_HEADER
-@acindex AM_CONFIG_HEADER
-Automake will generate rules to automatically regenerate the config
-header.  This obsolete macro is a synonym of @code{AC_CONFIG_HEADERS}
-today (@pxref{Optional}).
-
-@item AM_HEADER_TIOCGWINSZ_NEEDS_SYS_IOCTL
-@acindex AM_HEADER_TIOCGWINSZ_NEEDS_SYS_IOCTL
-If the use of @code{TIOCGWINSZ} requires @file{<sys/ioctl.h>}, then
-define @code{GWINSZ_IN_SYS_IOCTL}.  Otherwise @code{TIOCGWINSZ} can be
-found in @file{<termios.h>}.  This macro is obsolete, you should
-use Autoconf's @code{AC_HEADER_TIOCGWINSZ} instead.
-
 @item AM_PROG_MKDIR_P
 @acindex AM_PROG_MKDIR_P
 @cindex @code{mkdir -p}, macro check
@@ -4124,17 +4094,8 @@ the output variable @code{MKDIR_P} instead.  In case you are still
 using the @code{AM_PROG_MKDIR_P} macro in your @file{configure.ac},
 or its provided variable @code{$(mkdir_p)} in your @file{Makefile.am},
 you are advised to switch ASAP to the more modern Autoconf-provided
-interface instead; both the macro and the variable @emph{will be
-removed} in the next major Automake release.
-
-@item AM_SYS_POSIX_TERMIOS
-@acindex AM_SYS_POSIX_TERMIOS
-@cindex POSIX termios headers
-@cindex termios POSIX headers
-Check to see if POSIX termios headers and functions are available on the
-system.  If so, set the shell variable @code{am_cv_sys_posix_termios} to
-@samp{yes}.  If not, set the variable to @samp{no}.  This macro is obsolete,
-you should use Autoconf's @code{AC_SYS_POSIX_TERMIOS} instead.
+interface instead; both the macro and the variable might be removed
+in a future major Automake release.
 
 @end table
 
@@ -4183,13 +4144,25 @@ For simple projects that distribute all files in the same directory
 it is enough to have a single @file{Makefile.am} that builds
 everything in place.
 
-In larger projects it is common to organize files in different
-directories, in a tree.  For instance one directory per program, per
-library or per module.  The traditional approach is to build these
-subdirectories recursively: each directory contains its @file{Makefile}
-(generated from @file{Makefile.am}), and when @command{make} is run
-from the top level directory it enters each subdirectory in turn to
-build its contents.
+In larger projects, it is common to organize files in different
+directories, in a tree.  For example, there could be a directory
+for the program's source, one for the testsuite, and one for the
+documentation; or, for very large projects, there could be one
+directory per program, per library or per module.
+
+The traditional approach is to build these subdirectories recursively,
+employing @emph{make recursion}: each directory contains its
+own @file{Makefile}, and when @command{make} is run from the top-level
+directory, it enters each subdirectory in turn, and invokes there a
+new @command{make} instance to build the directory's contents.
+
+Because this approach is very widespread, Automake offers built-in
+support for it.  However, it is worth nothing that the use of make
+recursion has its own serious issues and drawbacks, and that it's
+well possible to have packages with a multi directory layout that
+make little or no use of such recursion (examples of such packages
+are GNU Bison and GNU Automake itself); see also the @ref{Alternative}
+section below.
 
 @menu
 * Subdirectories::              Building subdirectories recursively
@@ -4203,7 +4176,7 @@ build its contents.
 
 @cindex @code{SUBDIRS}, explained
 
-In packages with subdirectories, the top level @file{Makefile.am} must
+In packages using make recursion, the top level @file{Makefile.am} must
 tell Automake which subdirectories are to be built.  This is done via
 the @code{SUBDIRS} variable.
 @vindex SUBDIRS
@@ -4261,7 +4234,33 @@ will be built.  It is customary to arrange test directories to be
 built after everything else since they are meant to test what has
 been constructed.
 
-All @code{clean} rules are run in reverse order of build rules.
+In addition to the built-in recursive targets defined by Automake
+(@code{all}, @code{check}, etc.), the developer can also define his
+own recursive targets.  That is done by passing the names of such
+targets as arguments to the m4 macro @code{AM_EXTRA_RECURSIVE_TARGETS}
+in @file{configure.ac}.  Automake generates rules to handle the
+recursion for such targets; and the developer can define real actions
+for them by defining corresponding @code{-local} targets.
+
+@example
+% @kbd{cat configure.ac}
+AC_INIT([pkg-name], [1.0]
+AM_INIT_AUTOMAKE
+AM_EXTRA_RECURSIVE_TARGETS([foo])
+AC_CONFIG_FILES([Makefile sub/Makefile sub/src/Makefile])
+AC_OUTPUT
+% @kbd{cat Makefile.am}
+SUBDIRS = sub
+foo-local:
+        @@echo This will be run by "make foo".
+% @kbd{cat sub/Makefile.am}
+SUBDIRS = src
+% @kbd{cat sub/src/Makefile.am}
+foo-local:
+        @@echo This too will be run by a "make foo" issued either in
+        @@echo the 'sub/src/' directory, the 'sub/' directory, or the
+        @@echo top-level directory.
+@end example
 
 @node Conditional Subdirectories
 @section Conditional Subdirectories
@@ -4340,7 +4339,7 @@ does not know the possible values of these variables.  In this case
 @cindex @code{SUBDIRS} and @code{AM_CONDITIONAL}
 @cindex @code{AM_CONDITIONAL} and @code{SUBDIRS}
 
-@c Keep in sync with subcond2.sh
+@c Keep in sync with subdir-am-cond.sh
 
 @file{configure} should output the @file{Makefile} for each directory
 and define a condition into which @file{opt/} should be built.
@@ -4380,7 +4379,7 @@ automatically because it knows that @code{MAYBE_OPT} can contain
 @cindex @code{SUBDIRS} and @code{AC_SUBST}
 @cindex @code{AC_SUBST} and @code{SUBDIRS}
 
-@c Keep in sync with subcond3.sh
+@c Keep in sync with subdir-ac-subst.sh
 
 Another possibility is to define @code{MAYBE_OPT} from
 @file{./configure} using @code{AC_SUBST}:
@@ -4486,7 +4485,7 @@ variables it cannot ensure the corresponding directory exists.
 If you've ever read Peter Miller's excellent paper,
 @uref{http://miller.emu.id.au/pmiller/books/rmch/,
 Recursive Make Considered Harmful}, the preceding sections on the use of
-subdirectories will probably come as unwelcome advice.  For those who
+make recursion will probably come as unwelcome advice.  For those who
 haven't read the paper, Miller's main thesis is that recursive
 @command{make} invocations are both slow and error-prone.
 
@@ -4496,7 +4495,6 @@ believe.  This work is new and there are probably warts.
 to write a single @file{Makefile.am} for a complex multi-directory
 package.
 
-
 By default an installable file specified in a subdirectory will have its
 directory name stripped before installation.  For instance, in this
 example, the header file will be installed as
@@ -5487,9 +5485,8 @@ The libtool rules also use a @code{LIBTOOLFLAGS} variable that should
 not be set in @file{Makefile.am}: this is a user variable (@pxref{Flag
 Variables Ordering}.  It allows users to run @samp{make
 LIBTOOLFLAGS=--silent}, for instance.  Note that the verbosity of
-@command{libtool} can also be influenced with the Automake
-@option{silent-rules} option (@pxref{Options}).
-
+@command{libtool} can also be influenced by the Automake support
+for silent rules (@pxref{Automake Silent Rules}).
 
 @node LTLIBOBJS, Libtool Issues, Libtool Flags, A Shared Library
 @subsection @code{LTLIBOBJS} and @code{LTALLOCA}
@@ -5527,7 +5524,7 @@ performed automatically by Autoconf (@pxref{AC_LIBOBJ vs LIBOBJS, ,
 @cindex @command{libtoolize}, no longer run by @command{automake}
 @cindex @command{libtoolize} and @command{autoreconf}
 @cindex @command{autoreconf} and @command{libtoolize}
-@cindex @file{bootstrap.sh} and @command{autoreconf}
+@cindex @file{bootstrap} and @command{autoreconf}
 @cindex @file{autogen.sh} and @command{autoreconf}
 
 Libtool comes with a tool called @command{libtoolize} that will
@@ -5546,7 +5543,7 @@ functionality has been moved into the @command{autoreconf} command
 (@pxref{autoreconf Invocation, , Using @command{autoreconf}, autoconf,
 The Autoconf Manual}).  If you do not want to remember what to run and
 when, just learn the @command{autoreconf} command.  Hopefully,
-replacing existing @file{bootstrap.sh} or @file{autogen.sh} scripts by
+replacing existing @file{bootstrap} or @file{autogen.sh} scripts by
 a call to @command{autoreconf} should also free you from any similar
 incompatible change in the future.
 
@@ -5581,7 +5578,7 @@ replace) @file{foo.$(OBJEXT)}, and this cannot be avoided.
 Therefore, when Automake detects this situation it will complain
 with a message such as
 @example
-object `foo.$(OBJEXT)' created both with libtool and without
+object 'foo.$(OBJEXT)' created both with libtool and without
 @end example
 
 A workaround for this issue is to ensure that these two objects get
@@ -5822,9 +5819,7 @@ different name for the intermediate object files.  Ordinarily a file
 like @file{sample.c} will be compiled to produce @file{sample.o}.
 However, if the program's @code{_CFLAGS} variable is set, then the
 object file will be named, for instance, @file{maude-sample.o}.  (See
-also @ref{Renamed Objects}.)  The use of per-target compilation flags
-with C sources requires that the macro @code{AM_PROG_CC_C_O} be called
-from @file{configure.ac}.
+also @ref{Renamed Objects}).
 
 In compilations with per-target flags, the ordinary @samp{AM_} form of
 the flags variable is @emph{not} automatically included in the
@@ -6118,9 +6113,9 @@ Automake already provides some @option{-I} options automatically, in a
 separate variable that is also passed to every compilation that invokes
 the C preprocessor.  In particular it generates @samp{-I.},
 @samp{-I$(srcdir)}, and a @option{-I} pointing to the directory holding
-@file{config.h} (if you've used @code{AC_CONFIG_HEADERS} or
-@code{AM_CONFIG_HEADER}).  You can disable the default @option{-I}
-options using the @option{nostdinc} option.
+@file{config.h} (if you've used @code{AC_CONFIG_HEADERS}).  You can
+disable the default @option{-I} options using the @option{nostdinc}
+option.
 
 When a file to be included is generated during the build and not part
 of a distribution tarball, its location is under @code{$(builddir)},
@@ -6145,9 +6140,9 @@ same functionality.  This variable is deprecated; we suggest using
 
 @item AM_CFLAGS
 This is the variable the @file{Makefile.am} author can use to pass
-in additional C compiler flags.  It is more fully documented elsewhere.
-In some situations, this is not used, in preference to the
-per-executable (or per-library) @code{_CFLAGS}.
+in additional C compiler flags.  In some situations, this is
+not used, in preference to the per-executable (or per-library)
+@code{_CFLAGS}.
 
 @item COMPILE
 This is the command used to actually compile a C source file.  The
@@ -6255,10 +6250,10 @@ rebuild rule for distributed Yacc and Lex sources are only used when
 @cindex Multiple @command{lex} lexers
 @cindex @command{lex}, multiple lexers
 
-When @command{lex} or @command{yacc} sources are used, @code{automake
--i} automatically installs an auxiliary program called
-@command{ylwrap} in your package (@pxref{Auxiliary Programs}).  This
-program is used by the build rules to rename the output of these
+When @command{lex} or @command{yacc} sources are used, @code{automake -a}
+automatically installs an auxiliary program called @command{ylwrap} in
+your package (@pxref{Auxiliary Programs}).
+This program is used by the build rules to rename the output of these
 tools, and makes it possible to include multiple @command{yacc} (or
 @command{lex}) source files in a single directory.  (This is necessary
 because yacc's output file name is fixed, and a parallel make could
@@ -6856,28 +6851,32 @@ foo_SOURCES = foo.vala bar.vala zardoc.c
 @end example
 
 Any @file{.vala} file listed in a @code{_SOURCES} variable will be
-compiled into C code by the Vala compiler. The generated @file{.c} files are
-distributed. The end user does not need to have a Vala compiler installed.
+compiled into C code by the Vala compiler. The generated @file{.c} files
+are distributed. The end user does not need to have a Vala compiler installed.
 
 Automake ships with an Autoconf macro called @code{AM_PROG_VALAC}
 that will locate the Vala compiler and optionally check its version
 number.
 
-@defmac AM_PROG_VALAC (@ovar{minimum-version})
-Try to find a Vala compiler in @env{PATH}. If it is found, the variable
-@code{VALAC} is set. Optionally a minimum release number of the compiler
-can be requested:
-
-@example
-AM_PROG_VALAC([0.7.0])
-@end example
+@defmac AM_PROG_VALAC (@ovar{minimum-version}, @ovar{action-if-found},
+  @ovar{action-if-not-found})
+Search for a Vala compiler in @env{PATH}.  If it is found, the variable
+@code{VALAC} is set to point to it (see below for more details).  This
+macro takes three optional arguments.  The first argument, if present,
+is the minimum version of the Vala compiler required to compile this
+package.  If a compiler is found and satisfies @var{minimum-version},
+then @var{action-if-found} is run (this defaults to do nothing).
+Otherwise, @var{action-if-not-found} is run.  If @var{action-if-not-found}
+is not specified, the default value is to print a warning in case no
+compiler is found, or if a too-old version of the compiler is found.
 @end defmac
 
 There are a few variables that are used when compiling Vala sources:
 
 @vtable @code
 @item VALAC
-Path to the Vala compiler.
+Absolute path to the Vala compiler, or simply @samp{valac} if no
+suitable compiler Vala could be found at configure runtime.
 
 @item VALAFLAGS
 Additional arguments for the Vala compiler.
@@ -7527,7 +7526,10 @@ Lisp sources are not distributed by default.  You can prefix the
 distributed.
 
 Automake will byte-compile all Emacs Lisp source files using the Emacs
-found by @code{AM_PATH_LISPDIR}, if any was found.
+found by @code{AM_PATH_LISPDIR}, if any was found.  When performing such
+byte-compilation, the flags specified in the (developer-reserved)
+@code{AM_ELCFLAGS} and (user-reserved) @code{ELCFLAGS} make variables
+will be passed to the Emacs invocation.
 
 Byte-compiled Emacs Lisp files are not portable among all versions of
 Emacs, so it makes sense to turn this off if you expect sites to have
@@ -7601,11 +7603,13 @@ libtool, The Libtool Manual}) with the @code{LTLIBRARIES} primary.
 Automake provides some minimal support for Java bytecode compilation with
 the @code{JAVA} primary (in addition to the support for compiling Java to
 native machine code; @pxref{Java Support with gcj}).  Note however that
-@emph{the interface and most features described here are deprecated}; the
-next automake release will strive to provide a better and cleaner
+@emph{the interface and most features described here are deprecated}.
+Future Automake releases will strive to provide a better and cleaner
 interface, which however @emph{won't be backward-compatible}; the present
-interface will probably be removed altogether in future automake releases
-(1.13 or later), so don't use it in new code.
+interface will probably be removed altogether some time after the
+introduction of the new interface (if that ever materializes).  In any
+case, the current @code{JAVA} primary features are frozen and will no
+longer be developed, not even to take bug fixes.
 
 Any @file{.java} files listed in a @code{_JAVA} variable will be
 compiled with @code{JAVAC} at build time.  By default, @file{.java}
@@ -7790,7 +7794,7 @@ This is a convenience variable that is defined as
 @samp{$(pyexecdir)/$(PACKAGE)}.
 @end vtable
 
-All these directory variables have values that start with either
+All of these directory variables have values that start with either
 @samp{$@{prefix@}} or @samp{$@{exec_prefix@}} unexpanded.  This works
 fine in @file{Makefiles}, but it makes these variables hard to use in
 @file{configure}.  This is mandated by the GNU coding standards, so
@@ -7828,9 +7832,9 @@ Currently Automake provides support for Texinfo and man pages.
 If the current directory contains Texinfo source, you must declare it
 with the @code{TEXINFOS} primary.  Generally Texinfo files are converted
 into info, and thus the @code{info_TEXINFOS} variable is most commonly used
-here.  Any Texinfo source file must end in the @file{.texi},
-@file{.txi}, or @file{.texinfo} extension.  We recommend @file{.texi}
-for new manuals.
+here.  Any Texinfo source file should have the @file{.texi} extension.
+Automake also accepts @file{.txi} or @file{.texinfo} extensions, but their
+use is discouraged now, and will elicit runtime warnings.
 
 Automake generates rules to build @file{.info}, @file{.dvi},
 @file{.ps}, @file{.pdf} and @file{.html} files from your Texinfo
@@ -7840,6 +7844,11 @@ install} (unless you use @option{no-installinfo}, see below).
 Furthermore, @file{.info} files are automatically distributed so that
 Texinfo is not a prerequisite for installing your package.
 
+It is worth noting that, contrary to what happens with the other formats,
+the generated @file{.info} files are by default placed in @code{srcdir}
+rather than in the @code{builddir}.  This can be changed with the
+@option{info-in-builddir} option.
+
 @trindex dvi
 @trindex html
 @trindex pdf
@@ -7856,7 +7865,7 @@ can be installed with @samp{make install-dvi}, @samp{make install-ps},
 documentation installed by default as well as all the above optional
 formats.
 
-All these targets can be extended using @samp{-local} rules
+All of these targets can be extended using @samp{-local} rules
 (@pxref{Extending}).
 
 @cindex Texinfo flag, @code{VERSION}
@@ -7873,7 +7882,7 @@ All these targets can be extended using @samp{-local} rules
 
 If the @file{.texi} file @code{@@include}s @file{version.texi}, then
 that file will be automatically generated.  The file @file{version.texi}
-defines four Texinfo flag you can reference using
+defines four Texinfo flags you can reference using
 @code{@@value@{EDITION@}}, @code{@@value@{VERSION@}},
 @code{@@value@{UPDATED@}}, and @code{@@value@{UPDATED-MONTH@}}.
 
@@ -7948,9 +7957,9 @@ be prevented via the @code{no-installinfo} option.  In this case,
 request this explicitly using @samp{make install-info}.
 
 @vindex AM_UPDATE_INFO_DIR
-By default, @code{make install-info} and @code{make install-info}
-will try to run the @command{install-info} program (if available)
-to update (or create) the @file{@code{$@{infodir@}}/dir} index.
+By default, @code{make install-info} and @code{make uninstall-info}
+will try to run the @command{install-info} program (if available) to
+update (or create/remove) the @file{@code{$@{infodir@}}/dir} index.
 If this is undesired, it can be prevented by exporting the
 @code{AM_UPDATE_INFO_DIR} variable to "@code{no}".
 
@@ -7982,7 +7991,7 @@ passed to @code{makeinfo} when building @file{.info} files; and
 @samp{$(AM_MAKEINFOHTMLFLAGS)} is used when building @file{.html}
 files.
 
-@c Keep in sync with txinfo21.sh
+@c Keep in sync with txinfo-many-output-formats.sh
 For instance, the following setting can be used to obtain one single
 @file{.html} file per manual, without node separators.
 @example
@@ -8378,9 +8387,13 @@ We recommend that you follow this same set of heuristics in your
 The @code{dist} rule in the generated @file{Makefile.in} can be used
 to generate a gzipped @code{tar} file and other flavors of archive for
 distribution.  The file is named based on the @code{PACKAGE} and
-@code{VERSION} variables defined by @code{AM_INIT_AUTOMAKE}
-(@pxref{Macros}); more precisely the gzipped @code{tar} file is named
-@samp{@var{package}-@var{version}.tar.gz}.
+@code{VERSION} variables automatically defined by either the
+@code{AC_INIT} invocation or by a @emph{deprecated} two-arguments
+invocation of the @code{AM_INIT_AUTOMAKE} macro (see @ref{Public Macros}
+for how these variables get their values, from either defaults or explicit
+values -- it's slightly trickier than one would expect).
+More precisely the gzipped @code{tar} file is named
+@samp{$@{PACKAGE@}-$@{VERSION@}.tar.gz}.
 @vindex GZIP_ENV
 You can use the @command{make} variable @code{GZIP_ENV} to control how gzip
 is run.  The default setting is @option{--best}.
@@ -8418,7 +8431,9 @@ You can also mention a directory in @code{EXTRA_DIST}; in this case the
 entire directory will be recursively copied into the distribution.
 Please note that this will also copy @emph{everything} in the directory,
 including, e.g., Subversion's @file{.svn} private directories or CVS/RCS
-version control files.  We recommend against using this feature.
+version control files; thus we recommend against using this feature
+as-is.  However, you can use the @code{dist-hook} feature to
+ameliorate the problem; @pxref{The dist Hook}.
 
 @vindex SUBDIRS
 @vindex DIST_SUBDIRS
@@ -8473,7 +8488,7 @@ dist-hook:
         rm -rf `find $(distdir)/doc -type d -name .svn`
 @end example
 
-@c The caveates described here should be documented in 'disthook.test'.
+@c The caveats described here should be documented in 'disthook.sh'.
 @noindent
 Note that the @code{dist-hook} recipe shouldn't assume that the regular
 files in the distribution directory are writable; this might not be the
@@ -8544,6 +8559,13 @@ finally, makes another tarball to ensure the distribution is
 self-contained.
 @end itemize
 
+All of these actions are performed in a temporary directory.  Please
+note that the exact location and the exact structure of such a directory
+(where the read-only sources are placed, how the temporary build and
+install directories are named and how deeply they are nested, etc.) is
+to be considered an implementation detail, which can change at any time;
+so do not reply on it.
+
 @vindex AM_DISTCHECK_CONFIGURE_FLAGS
 @vindex DISTCHECK_CONFIGURE_FLAGS
 @subheading DISTCHECK_CONFIGURE_FLAGS
@@ -8553,11 +8575,18 @@ to supply additional flags to @command{configure}, define them in the
 @file{Makefile.am}.  The user can still extend or override the flags
 provided there by defining the @code{DISTCHECK_CONFIGURE_FLAGS} variable,
 on the command line when invoking @command{make}.
-
-Still, developers are encouraged to strive to make their code buildable
-without requiring any special configure option; thus, in general, you
-shouldn't define @code{AM_DISTCHECK_CONFIGURE_FLAGS}. However, there
-might be few scenarios in which the use of this variable is justified.
+@c See automake bug#14991 for more details about how the following holds.
+It's worth nothing that @command{make distcheck} needs complete control
+over the @command{configure} options @option{--srcdir} and
+@option{--prefix}, so those options cannot be overridden by
+@code{AM_DISTCHECK_CONFIGURE_FLAGS} nor by
+@code{DISTCHECK_CONFIGURE_FLAGS}.
+
+Also note that developers are encouraged to strive to make their code
+buildable without requiring any special configure option; thus, in
+general, you shouldn't define @code{AM_DISTCHECK_CONFIGURE_FLAGS}.
+However, there might be few scenarios in which the use of this variable
+is justified.
 GNU @command{m4} offers an example.  GNU @command{m4} configures by
 default with its experimental and seldom used "changeword" feature
 disabled; so in its case it is useful to have @command{make distcheck}
@@ -8661,28 +8690,25 @@ Automake generates rules to provide archives of the project for
 distributions in various formats.  Their targets are:
 
 @table @asis
+@item @code{dist-gzip}
+Generate a @samp{gzip} tar archive of the distribution.  This is the
+only format enabled by default.
+@trindex dist-gzip
+
 @vindex BZIP2
 @item @code{dist-bzip2}
-Generate a bzip2 tar archive of the distribution.  bzip2 archives are
-frequently smaller than gzipped archives.
+Generate a @samp{bzip2} tar archive of the distribution.  bzip2 archives
+are frequently smaller than gzipped archives.
 By default, this rule makes @samp{bzip2} use a compression option of @option{-9}.
 To make it use a different one, set the @env{BZIP2} environment variable.
 For example, @samp{make dist-bzip2 BZIP2=-7}.
 @trindex dist-bzip2
 
-@item @code{dist-gzip}
-Generate a gzip tar archive of the distribution.
-@trindex dist-gzip
-
 @item @code{dist-lzip}
 Generate an @samp{lzip} tar archive of the distribution.  @command{lzip}
 archives are frequently smaller than @command{bzip2}-compressed archives.
 @trindex dist-lzip
 
-@item @code{dist-shar}
-Generate a shar archive of the distribution.
-@trindex dist-shar
-
 @vindex XZ_OPT
 @item @code{dist-xz}
 Generate an @samp{xz} tar archive of the distribution.  @command{xz}
@@ -8691,22 +8717,33 @@ By default, this rule makes @samp{xz} use a compression option of
 @option{-e}.  To make it use a different one, set the @env{XZ_OPT}
 environment variable.  For example, run this command to use the
 default compression ratio, but with a progress indicator:
-@samp{make dist-xz XZ_OPT=-7e}.
+@samp{make dist-xz XZ_OPT=-ve}.
 @trindex dist-xz
 
 @item @code{dist-zip}
-Generate a zip archive of the distribution.
+Generate a @samp{zip} archive of the distribution.
 @trindex dist-zip
 
 @item @code{dist-tarZ}
-Generate a compressed tar archive of
-the distribution.
+Generate a tar archive of the distribution, compressed with the
+historical (and obsolescent) program @command{compress}.  This
+option is deprecated, and it and the corresponding functionality
+will be removed altogether in Automake 2.0.
 @trindex dist-tarZ
+
+@item @code{dist-shar}
+Generate a @samp{shar} archive of the distribution.  This format
+archive is obsolescent, and use of this option is deprecated.
+It and the corresponding functionality will be removed altogether
+in Automake 2.0.
+@trindex dist-shar
+
 @end table
 
-The rule @code{dist} (and its historical synonym @code{dist-all}) will
-create archives in all the enabled formats, @ref{Options}.  By
-default, only the @code{dist-gzip} target is hooked to @code{dist}.
+The rule @code{dist} (and its historical synonym @code{dist-all})
+will create archives in all the enabled formats (@pxref{List of
+Automake options} for how to change this list).  By default, only
+the @code{dist-gzip} target is hooked to @code{dist}.
 
 
 @node Tests
@@ -8803,15 +8840,12 @@ error} happens when e.g., the set-up of a test case scenario fails, or when
 some other unexpected or highly undesirable condition is encountered (for
 example, the program under test experiences a segmentation fault).
 
-@emph{TODO}: Links to other test harnesses (esp. those sharing our
-terminology)?
-
 @node Simple Tests
 @section Simple Tests
 
 @menu
 * Scripts-based Testsuites::    Automake-specific concepts and terminology
-* Serial Test Harness::         Older (and obsolescent) serial test harness
+* Serial Test Harness::         Older (and discouraged) serial test harness
 * Parallel Test Harness::       Generic concurrent test harness
 @end menu
 
@@ -8825,21 +8859,20 @@ also data files to be passed to one or more test scripts defined by
 different means (the so-called ``log compilers'', @pxref{Parallel Test
 Harness}).
 
-Test scripts can be executed serially or concurrently.  Automake
-supports both these kinds of test execution, with the serial test harness
-being the default (for backward-compatibility reasons only, as its use
-is nowadays discouraged).  The concurrent test harness relies on the
-concurrence capabilities (if any) offered by the underlying @command{make}
+Test scripts can be executed serially or concurrently.  Automake supports
+both these kinds of test execution, with the parallel test harness being
+the default.  The concurrent test harness relies on the concurrence
+capabilities (if any) offered by the underlying @command{make}
 implementation, and can thus only be as good as those are.
 
 By default, only the exit statuses of the test scripts are considered when
 determining the testsuite outcome.  But Automake allows also the use of
 more complex test protocols, either standard (@pxref{Using the TAP test
-protocol}) or custom (@pxref{Custom Test Drivers}).  Note that you can
-enable such protocols only when the parallel harness is used: they won't
-work with the serial test harness.  In the rest of this section we are
-going to concentrate mostly on protocol-less tests, since we cover
-test protocols in a later section (again, @pxref{Custom Test Drivers}).
+protocol}) or custom (@pxref{Custom Test Drivers}).  Note that you can't
+enable such protocols when the serial harness is used, though.
+In the rest of this section we are going to concentrate mostly on
+protocol-less tests, since we cover test protocols in a later section
+(again, @pxref{Custom Test Drivers}).
 
 @cindex Exit status 77, special interpretation
 @cindex Exit status 99, special interpretation
@@ -8898,18 +8931,18 @@ run.
 @anchor{Simple tests and color-tests}
 @vindex AM_COLOR_TESTS
 @cindex Colorized testsuite output
-If the Automake option @code{color-tests} is used (@pxref{Options})
-and standard output is connected to a capable terminal, then the test
-results and the summary are colored appropriately.  The user can disable
-colored output by setting the @command{make} variable
-@samp{AM_COLOR_TESTS=no}, or force colored output even without a connecting
-terminal with @samp{AM_COLOR_TESTS=always}.  It's also worth noting that
-some @command{make} implementations, when used in parallel mode, have
-slightly different semantics (@pxref{Parallel make,,, autoconf,
-The Autoconf Manual}), which can break the automatic detection of a
-connection to a capable terminal.  If this is the case, you'll have to
-resort to the use of @samp{AM_COLOR_TESTS=always} in order to have the
-testsuite output colorized.
+If the standard output is connected to a capable terminal, then the test
+results and the summary are colored appropriately.  The developer and the
+user can disable colored output by setting the @command{make} variable
+@samp{AM_COLOR_TESTS=no}; the user can in addition force colored output
+even without a connecting terminal with @samp{AM_COLOR_TESTS=always}.
+It's also worth noting that some @command{make} implementations,
+when used in parallel mode, have slightly different semantics
+(@pxref{Parallel make,,, autoconf, The Autoconf Manual}), which can
+break the automatic detection of a connection to a capable terminal.
+If this is the case, the user will have to resort to the use of
+@samp{AM_COLOR_TESTS=always} in order to have the testsuite output
+colorized.
 
 Test programs that need data files should look for them in @code{srcdir}
 (which is both a make variable and an environment variable made available
@@ -8939,14 +8972,12 @@ flag on file descriptors opened with the @command{exec} builtin, thus
 rendering an idiom like @code{AM_TESTS_ENVIRONMENT = exec 9>&2;}
 ineffectual.  This issue also affects some Bourne shells, such as the
 HP-UX's @command{/bin/sh},
-@c FIXME: should we offer a link to the relevant discussions on the
-@c bug-autoconf list?
 
 @c Keep in sync with tests-environment-backcompat.sh
 @example
 AM_TESTS_ENVIRONMENT = \
 ## Some environment initializations are kept in a separate shell
-## file `tests-env.sh', which can make it easier to also run tests
+## file 'tests-env.sh', which can make it easier to also run tests
 ## from the command line.
   . $(srcdir)/tests-env.sh; \
 ## On Solaris, prefer more POSIX-compliant versions of the standard
@@ -8985,20 +9016,21 @@ by the tests, not the tests themselves.  Of course you can set
 @code{TESTS = $(check_PROGRAMS)} if all your programs are test cases.
 
 @node Serial Test Harness
-@subsection Serial Test Harness
+@subsection Older (and discouraged) serial test harness
 @cindex @option{serial-tests}, Using
 
-@emph{NOTE:} This harness, while still being the default one, is
-obsolescent, and kept mostly for backward-compatibility reasons.  The user
-is advised to use the parallel test harness instead (@pxref{Parallel Test
-Harness}).  Be warned that future Automake versions might switch to use
-that more modern and feature-rich harness by default.
+First, note that today the use of this harness is strongly discouraged in
+favour of the parallel test harness (@pxref{Parallel Test Harness}).
+Still, there are @emph{few} situations when the advantages offered by
+the parallel harness are irrelevant, and when test concurrency can
+even cause tricky problems.  In those cases, it might make sense to
+still use the serial harness, for simplicity and reliability (we still
+suggest trying to give the parallel harness a shot though).
 
 The serial test harness is enabled by the Automake option
 @option{serial-tests}. It operates by simply running the tests serially,
 one at the time, without any I/O redirection.  It's up to the user to
-implement logging of tests' output, if that's requited or desired.
-@c TODO: give an example of how this can be done.
+implement logging of tests' output, if that's required or desired.
 
 For historical and implementation reasons, the @code{AM_TESTS_ENVIRONMENT}
 variable is @emph{not} supported by this harness (it will be silently
@@ -9027,17 +9059,12 @@ versions.
 
 @node Parallel Test Harness
 @subsection Parallel Test Harness
-@cindex @option{parallel-tests}, Using
-
-The parallel (or concurrent) test harness is enabled by the Automake option
-@option{parallel-tests}.  It features automatic collection of the test
-scripts output in @file{.log} files, concurrent execution of tests with
-@code{make -j}, specification of inter-test dependencies, lazy reruns of
-tests that have not completed in a prior run, and hard errors for exceptional
-failures.
 
-This harness is still somewhat experimental and may undergo changes in
-order to satisfy additional portability requirements.
+By default, Automake generated a parallel (concurrent) test harness.  It
+features automatic collection of the test scripts output in @file{.log}
+files, concurrent execution of tests with @code{make -j}, specification
+of inter-test dependencies, lazy reruns of tests that have not completed
+in a prior run, and hard errors for exceptional failures.
 
 @anchor{Basics of test metadata}
 @vindex TEST_SUITE_LOG
@@ -9050,7 +9077,7 @@ rules that run the test scripts listed in @code{TESTS}, and, for each
 such script, save its output in a corresponding @file{.log} file and
 its results (and other ``metadata'', @pxref{API for Custom Test Drivers})
 in a corresponding @file{.trs} (as in @b{T}est @b{R}e@b{S}ults) file.
-@c We choose the `.trs' extension also because, at the time of writing,
+@c We choose the '.trs' extension also because, at the time of writing,
 @c it isn't already used for other significant purposes; see e.g.:
 @c   - http://filext.com/file-extension/trs
 @c   - http://www.file-extensions.org/search/?searchstring=trs
@@ -9072,8 +9099,6 @@ to a per-test log file, so that parallel execution does not produce
 intermingled output.  The output from failed tests is collected in the
 @file{test-suite.log} file.  If the variable @samp{VERBOSE} is set, this
 file is output after the summary.
-@c FIXME: we should be clearer about what we mean exactly here ...
-For best results, the tests should be verbose by default now.
 
 @vindex TEST_EXTENSIONS
 @vindex TEST_LOGS
@@ -9091,6 +9116,12 @@ followed by any number of alphabetic characters.
 For example, @samp{.sh}, @samp{.T} and @samp{.t1} are valid extensions,
 while @samp{.x-y}, @samp{.6c} and @samp{.t.1} are not.
 
+@cindex Configure substitutions in @code{TESTS}
+It is important to note that, due to current limitations (unlikely to be
+lifted), configure substitutions in the definition of @code{TESTS} can
+only work if they will expand to a list of tests that have a suffix listed
+in @code{TEST_EXTENSIONS}.
+
 @vindex _LOG_COMPILE
 @vindex _LOG_COMPILER
 @vindex _LOG_FLAGS
@@ -9131,7 +9162,7 @@ and @samp{./wrapper-script -d baz} to produce @file{foo.log},
 as a side-effect.
 
 It's important to note that, differently from what we've seen for the
-serial test harness (@pxref{Parallel Test Harness}), the
+serial test harness (@pxref{Serial Test Harness}), the
 @code{AM_TESTS_ENVIRONMENT} and @code{TESTS_ENVIRONMENT} variables
 @emph{cannot} be use to define a custom test runner; the
 @code{LOG_COMPILER} and @code{LOG_FLAGS} (or their extension-specific
@@ -9238,7 +9269,7 @@ parallel @command{make -j@var{N}}, so be sure they are prepared for
 concurrent execution.
 
 @cindex Unit tests
-@c Keep in sync with 'parallel-tests-extra-programs.test'.
+@c Keep in sync with 'parallel-tests-extra-programs.sh'.
 The combination of lazy test execution and correct dependencies between
 tests and their sources may be exploited for efficient unit testing
 during development.  To further speed up the edit-compile-test cycle, it
@@ -9338,9 +9369,9 @@ definition of generic and extension-specific @code{LOG_COMPILER} and
 @end itemize
 
 @noindent
-On the other hand, the exact semantics of how (and if)
-@option{color-tests}, @code{XFAIL_TESTS}, and hard errors are supported
-and handled is left to the individual test drivers.
+On the other hand, the exact semantics of how (and if) testsuite output
+colorization, @code{XFAIL_TESTS}, and hard errors are supported and
+handled is left to the individual test drivers.
 
 @c TODO: We should really add a working example in the doc/ directory,
 @c TODO: and reference if from here.
@@ -9402,11 +9433,10 @@ with the parallel test harness and its default driver.
 @subsubsection Command-line arguments for test drivers
 
 A custom driver can rely on various command-line options and arguments
-being passed to it automatically by the Automake's @option{parallel-tests}
-harness.  It is @emph{mandatory} that it understands all of them (even
-if the exact interpretation of the associated semantics can legitimately
-change between a test driver and another, and even be a no-op in some
-drivers).
+being passed to it automatically by the Automake-generated test harness.
+It is @emph{mandatory} that it understands all of them (even if the exact
+interpretation of the associated semantics can legitimately change
+between a test driver and another, and even be a no-op in some drivers).
 
 @noindent
 Here is the list of options:
@@ -9450,9 +9480,9 @@ for this program.
 Note that the exact semantics attached to the @option{--color-tests},
 @option{--expect-failure} and @option{--enable-hard-errors} options are
 left up to the individual test drivers.  Still, having a behaviour
-compatible or at least similar to that provided by the default
-@option{parallel-tests} driver is advised, as that would offer a better
-consistency and a more pleasant user experience.
+compatible or at least similar to that provided by the default driver
+is advised, as that would offer a better consistency and a more pleasant
+user experience.
 
 @node Log files generation and test results recording
 @subsubsection Log files generation and test results recording
@@ -9470,7 +9500,7 @@ The @file{.trs} file is used to register some metadata through the use
 of custom reStructuredText fields.  This metadata is expected to be
 employed in various ways by the parallel test harness; for example, to
 count the test results when printing the testsuite summary, or to decide
-which tests to re-run upon @command{make reheck}.  Unrecognized metadata
+which tests to re-run upon @command{make recheck}.  Unrecognized metadata
 in a @file{.trs} file is currently ignored by the harness, but this might
 change in the future. The list of currently recognized metadata follows.
 
@@ -9494,10 +9524,10 @@ The only recognized test results are currently @code{PASS}, @code{XFAIL},
 @code{SKIP}, @code{FAIL}, @code{XPASS} and @code{ERROR}.  These results,
 when declared with @code{:test-result:}, can be optionally followed by
 text holding the name and/or a brief description of the corresponding
-test; the @option{parallel-tests} harness will ignore such extra text when
-generating @file{test-suite.log} and preparing the testsuite summary.
+test; the harness will ignore such extra text when generating
+@file{test-suite.log} and preparing the testsuite summary.
 
-@c Keep in sync with 'test-metadata-recheck.test'.
+@c Keep in sync with 'test-metadata-recheck.sh'.
 @item @code{:recheck:}
 @cindex :recheck:
 @cindex reStructuredText field, @code{:recheck:}
@@ -9506,7 +9536,7 @@ test script will @emph{not} be run upon a @command{make recheck}.  What
 happens when two or more @code{:recheck:} fields are present in the same
 @file{.trs} file is undefined behaviour.
 
-@c Keep in sync with 'test-metadata-global-log.test'.
+@c Keep in sync with 'test-metadata-global-log.sh'.
 @item @code{:copy-in-global-log:}
 @cindex :copy-in-global-log:
 @cindex reStructuredText field, @code{:copy-in-global-log:}
@@ -9518,7 +9548,7 @@ just a waste of space in normal situations, e.g., when a test script is
 successful.  What happens when two or more @code{:copy-in-global-log:}
 fields are present in the same @file{.trs} file is undefined behaviour.
 
-@c Keep in sync with 'test-metadata-global-result.test'.
+@c Keep in sync with 'test-metadata-global-result.sh'.
 @item @code{:test-global-result:}
 @cindex :test-global-result:
 @cindex reStructuredText field, @code{:test-global-result:}
@@ -9577,12 +9607,6 @@ other end, if you are using a known and widespread test protocol with
 well-established implementations, being consistent with those
 implementations' output might be a good idea too.
 
-@c TODO: Give an example, maybe inspired to py.test-style output.
-@c TODO: That is a good idea because it shows a test driver that allows
-@c TODO: for different levels of verbosity in the progress output (could
-@c TODO: be implemented either using a driver cmdline flag, or an
-@c TODO: environment variable, or both).
-
 @node Using the TAP test protocol
 @section Using the TAP test protocol
 
@@ -9603,7 +9627,7 @@ on standard output; a test harness (also called ``TAP consumer'') will
 parse and interpret these results, and properly present them to the user,
 and/or register them for later analysis.  The exact details of how this
 is accomplished can vary among different test harnesses.  The Automake
-parallel harness will present the results on the console in the usual
+harness will present the results on the console in the usual
 fashion (@pxref{Testsuite progress on console}), and will use the
 @file{.trs} files (@pxref{Basics of test metadata}) to store the test
 results and related metadata.  Apart from that, it will try to remain
@@ -9631,10 +9655,9 @@ Currently, the TAP driver that comes with Automake requires some by-hand
 steps on the developer's part (this situation should hopefully be improved
 in future Automake versions).  You'll have to grab the @file{tap-driver.sh}
 script from the Automake distribution by hand, copy it in your source tree,
-add a call to @code{AC_PROG_AWK} in @file{configure.ac} to search for a
-proper awk program, and use the Automake support for third-party test
-drivers to instruct the harness to use the @file{tap-driver.sh} script
-and that awk program to run your TAP-producing tests.  See the example
+and use the Automake support for third-party test drivers to instruct the
+harness to use the @file{tap-driver.sh} script and the awk program found
+by @code{AM_INIT_AUTOMAKE} to run your TAP-producing tests.  See the example
 below for clarification.
 
 Apart from the options common to all the Automake test drivers
@@ -9643,7 +9666,7 @@ supports the following options, whose names are chosen for enhanced
 compatibility with the @command{prove} utility.
 
 @table @option
-@c Keep in sync with 'tap-exit.test' and 'tap-signal.tap'.
+@c Keep in sync with 'tap-exit.sh' and 'tap-signal.tap'.
 @item --ignore-exit
 Causes the test driver to ignore the exit status of the test scripts;
 by default, the driver will report an error if the script exits with a
@@ -9687,10 +9710,9 @@ Here is an example of how the TAP driver can be set up and used.
 % @kbd{cat configure.ac}
 AC_INIT([GNU Try Tap], [1.0], [bug-automake@@gnu.org])
 AC_CONFIG_AUX_DIR([build-aux])
-AM_INIT_AUTOMAKE([foreign parallel-tests -Wall -Werror])
+AM_INIT_AUTOMAKE([foreign -Wall -Werror])
 AC_CONFIG_FILES([Makefile])
 AC_REQUIRE_AUX_FILE([tap-driver.sh])
-AC_PROG_AWK
 AC_OUTPUT
 
 % @kbd{cat Makefile.am}
@@ -9723,7 +9745,7 @@ echo ok 1
 # Exit with error, even if all the tests have been successful.
 exit 7
 
-% @kbd{cp @var{PREFIX}/share/automake-@var{APIVERSION}/tap-driver.pl .}
+% @kbd{cp @var{PREFIX}/share/automake-@var{APIVERSION}/tap-driver.sh .}
 % @kbd{autoreconf -vi && ./configure && make check}
 ...
 PASS: foo.test 1 - Swallows fly
@@ -9768,7 +9790,7 @@ mainstream versions, which you should be aware of.
 A @code{Bail out!} directive doesn't stop the whole testsuite, but only
 the test script it occurs in.  This doesn't follow TAP specifications,
 but on the other hand it maximizes compatibility (and code sharing) with
-the ``hard error'' concept of the default @option{parallel-tests} driver.
+the ``hard error'' concept of the default testsuite driver.
 @item
 The @code{version} and @code{pragma} directives are not supported.
 @item
@@ -9892,15 +9914,6 @@ Automake generates rules to automatically rebuild @file{Makefile}s,
 If you are using @code{AM_MAINTAINER_MODE} in @file{configure.ac}, then
 these automatic rebuilding rules are only enabled in maintainer mode.
 
-@vindex ACLOCAL_AMFLAGS
-Sometimes you need to run @command{aclocal} with an argument like
-@option{-I} to tell it where to find @file{.m4} files.  Since
-sometimes @command{make} will automatically run @command{aclocal}, you
-need a way to specify these arguments.  You can do this by defining
-@code{ACLOCAL_AMFLAGS}; this holds arguments that are passed verbatim
-to @command{aclocal}.  This variable is only useful in the top-level
-@file{Makefile.am}.
-
 @vindex CONFIG_STATUS_DEPENDENCIES
 @vindex CONFIGURE_DEPENDENCIES
 @cindex @file{version.sh}, example
@@ -9917,6 +9930,7 @@ from @file{configure.ac}.  For instance, the following statement will
 cause @file{configure} to be rerun each time @file{version.sh} is
 changed.
 
+@c Keep in sync with remake-config-status-dependencies.sh
 @example
 AC_SUBST([CONFIG_STATUS_DEPENDENCIES], ['$(top_srcdir)/version.sh'])
 @end example
@@ -9929,12 +9943,17 @@ any level in the build hierarchy.
 Beware not to mistake @code{CONFIGURE_DEPENDENCIES} for
 @code{CONFIG_STATUS_DEPENDENCIES}.
 
+@c Keep in sync with remake-configure-dependencies.sh
 @code{CONFIGURE_DEPENDENCIES} adds dependencies to the
 @file{configure} rule, whose effect is to run @command{autoconf}.  This
 variable should be seldom used, because @command{automake} already tracks
 @code{m4_include}d files.  However it can be useful when playing
 tricky games with @code{m4_esyscmd} or similar non-recommendable
-macros with side effects.
+macros with side effects.  Be also aware that interactions of this
+variable with the @ref{Autom4te Cache, , autom4te cache, autoconf,
+The Autoconf Manual} are quite problematic and can cause subtle
+breakage, so you might want to disable the cache if you want to use
+@code{CONFIGURE_DEPENDENCIES}.
 
 @code{CONFIG_STATUS_DEPENDENCIES} adds dependencies to the
 @file{config.status} rule, whose effect is to run @file{configure}.
@@ -10047,15 +10066,12 @@ then @samp{portability} warnings will be @emph{disabled} in
 @item @option{gnits}
 @itemx @option{gnu}
 @itemx @option{foreign}
-@itemx @option{cygnus}
 @cindex Option, @option{gnits}
 @cindex Option, @option{gnu}
 @cindex Option, @option{foreign}
-@cindex Option, @option{cygnus}
 @opindex gnits
 @opindex gnu
 @opindex foreign
-@opindex cygnus
 
 Set the strictness as appropriate.  The @option{gnits} option also
 implies options @option{readme-alpha} and @option{check-news}.
@@ -10066,13 +10082,6 @@ implies options @option{readme-alpha} and @option{check-news}.
 Cause @samp{make dist} to fail unless the current version number appears
 in the first few lines of the @file{NEWS} file.
 
-@item @option{color-tests}
-@cindex Option, @option{color-tests}
-@opindex color-tests
-Cause output of the serial and parallel test harnesses (see @ref{Simple
-Tests}) and of properly-written custom test drivers (@pxref{Custom Test
-Drivers}) to be colorized on capable terminals.
-
 @item @option{dejagnu}
 @cindex Option, @option{dejagnu}
 @opindex dejagnu
@@ -10090,11 +10099,11 @@ Hook @code{dist-bzip2} to @code{dist}.
 Hook @code{dist-lzip} to @code{dist}.
 @trindex dist-lzip
 
-@item @option{dist-shar}
-@cindex Option, @option{dist-shar}
-@opindex dist-shar
-Hook @code{dist-shar} to @code{dist}.
-@trindex dist-shar
+@item @option{dist-xz}
+@cindex Option, @option{dist-xz}
+@opindex dist-xz
+Hook @code{dist-xz} to @code{dist}.
+@trindex dist-xz
 
 @item @option{dist-zip}
 @cindex Option, @option{dist-zip}
@@ -10102,10 +10111,21 @@ Hook @code{dist-shar} to @code{dist}.
 Hook @code{dist-zip} to @code{dist}.
 @trindex dist-zip
 
+@item @option{dist-shar}
+@cindex Option, @option{dist-shar}
+@opindex dist-shar
+Hook @code{dist-shar} to @code{dist}.  Use of this option
+is deprecated, as the @samp{shar} format is obsolescent and
+problematic.  Support for it will be removed altogether in
+Automake 2.0.
+@trindex dist-shar
+
 @item @option{dist-tarZ}
 @cindex Option, @option{dist-tarZ}
 @opindex dist-tarZ
-Hook @code{dist-tarZ} to @code{dist}.
+Hook @code{dist-tarZ} to @code{dist}.  Use of this option
+is deprecated, as the @samp{compress} program is obsolete.
+Support for it will be removed altogether in Automake 2.0.
 @trindex dist-tarZ
 
 @item @option{filename-length-max=99}
@@ -10119,12 +10139,24 @@ options below.  This option should be used in the top-level
 @file{configure.ac}, it will be ignored otherwise.  It will also be
 ignored in sub-packages of nested packages (@pxref{Subpackages}).
 
+@item @option{info-in-builddir}
+@cindex Option, @option{info-in-builddir}
+@opindex info-in-builddir
+Instruct Automake to place the generated @file{.info} files in the
+@code{builddir} rather than in the @code{srcdir}.  Note that this
+might make VPATH builds with some non-GNU make implementations more
+brittle.
+
 @item @option{no-define}
 @cindex Option, @option{no-define}
 @opindex no-define
 This option is meaningful only when passed as an argument to
 @code{AM_INIT_AUTOMAKE}.  It will prevent the @code{PACKAGE} and
-@code{VERSION} variables from being @code{AC_DEFINE}d.
+@code{VERSION} variables from being @code{AC_DEFINE}d.  But notice
+that they will remain defined as shell variables in the generated
+@code{configure}, and as make variables in the generated
+@code{Makefile}; this is deliberate, and required for backward
+compatibility.
 
 @item @option{no-dependencies}
 @cindex Option, @option{no-dependencies}
@@ -10190,18 +10222,19 @@ are ordinarily automatically provided by Automake.
 Don't require @file{texinfo.tex}, even if there are texinfo files in
 this directory.
 
-@item @option{parallel-tests}
-@cindex Option, @option{parallel-tests}
-@opindex parallel-tests
-Enable test suite harness for @code{TESTS} that can run tests in parallel
-(@pxref{Parallel Test Harness}, for more information).
-
 @item @option{serial-tests}
 @cindex Option, @option{serial-tests}
 @opindex serial-tests
 Enable the older serial test suite harness for @code{TESTS} (@pxref{Serial
-Test Harness}, for more information).  This is still the default for the
-moment.
+Test Harness}, for more information).
+
+@item @option{parallel-tests}
+@cindex Option, @option{parallel-tests}
+@opindex parallel-tests
+Enable test suite harness for @code{TESTS} that can run tests in parallel
+(@pxref{Parallel Test Harness}, for more information).  This option is
+only kept for backward-compatibility, since the parallel test harness is
+the default now.
 
 @item @option{readme-alpha}
 @cindex Option, @option{readme-alpha}
@@ -10215,23 +10248,6 @@ non-alpha releases.  The second form is
 @samp{@var{major}.@var{minor}@var{alpha}}, where @var{alpha} is a
 letter; it should be omitted for non-alpha releases.
 
-@item @option{silent-rules}
-@cindex Option, @option{silent-rules}
-@opindex silent-rules
-Enable less verbose build rules.  This can be used to let build rules
-output status lines of the form:
-@example
-GEN @var{output-file}
- CC @var{object-file}
-@end example
-@noindent
-instead of printing the command that will be executed to update
-@var{output-file} or to compile @var{object-file}.  It can also
-silence @command{libtool} output.
-
-For more information about how to use, enable, or disable silent
-rules, @pxref{Automake silent-rules Option}.
-
 @item @option{std-options}
 @cindex Options, @option{std-options}
 @cindex @samp{make installcheck}, testing @option{--help} and @option{--version}
@@ -10270,9 +10286,6 @@ the source file.  For instance, if the source file is
 @file{subdir/file.cxx}, then the output file would be
 @file{subdir/file.o}.
 
-In order to use this option with C sources, you should add
-@code{AM_PROG_CC_C_O} to @file{configure.ac}.
-
 @anchor{tar-formats}
 @item @option{tar-v7}
 @itemx @option{tar-ustar}
@@ -10527,6 +10540,26 @@ condition applies to the entire contents of that fragment.
 Makefile fragments included this way are always distributed because
 they are needed to rebuild @file{Makefile.in}.
 
+Inside a fragment, the construct @code{%reldir%} is replaced with the
+directory of the fragment relative to the base @file{Makefile.am}.
+Similarly, @code{%canon_reldir%} is replaced with the canonicalized
+(@pxref{Canonicalization}) form of @code{%reldir%}.  As a convenience,
+@code{%D%} is a synonym for @code{%reldir%}, and @code{%C%}
+is a synonym for @code{%canon_reldir%}.
+
+A special feature is that if the fragment is in the same directory as
+the base @file{Makefile.am} (i.e., @code{%reldir%} is @code{.}), then
+@code{%reldir%} and @code{%canon_reldir%} will expand to the empty
+string as well as eat, if present, a following slash or underscore
+respectively.
+
+Thus, a makefile fragment might look like this:
+
+@example
+bin_PROGRAMS += %reldir%/mumble
+%canon_reldir%_mumble_SOURCES = %reldir%/one.c
+@end example
+
 @node Conditionals
 @chapter Conditionals
 
@@ -10713,9 +10746,9 @@ Libtool Sources}).
 @cindex Silent @command{make} rules
 
 @menu
-* Make verbosity::               Make is verbose by default
-* Tricks For Silencing Make::    Standard and generic ways to silence make
-* Automake silent-rules Option:: How Automake can help in silencing make
+* Make verbosity::              Make is verbose by default
+* Tricks For Silencing Make::   Standard and generic ways to silence make
+* Automake Silent Rules::       How Automake can help in silencing make
 @end menu
 
 @node Make verbosity
@@ -10750,8 +10783,8 @@ the easy detection of potentially important warning messages.
 
 Here we describe some common idioms/tricks to obtain a quieter make
 output, with their relative advantages and drawbacks.  In the next
-section (@ref{Automake silent-rules Option}) we'll see how Automake
-can help in this respect.
+section (@ref{Automake Silent Rules}) we'll see how Automake can help
+in this respect, providing more elaborate and flexible idioms.
 
 @itemize @bullet
 
@@ -10803,20 +10836,16 @@ automatically activated if the @option{-s} flag is used.
 
 @end itemize
 
-@node Automake silent-rules Option
+@node Automake Silent Rules
 @section How Automake can help in silencing make
 
 The tricks and idioms for silencing @command{make} described in the
 previous section can be useful from time to time, but we've seen that
 they all have their serious drawbacks and limitations.  That's why
 automake provides support for a more advanced and flexible way of
-obtaining quieter output from @command{make}: the @option{silent-rules}
-mode.
+obtaining quieter output from @command{make} (for most rules at least).
 
-@c TODO: Maybe describe in brief the precedent set by the build system
-@c of the Linux Kernel, from which Automake took inspiration ... Links?
-
-To give the gist of what @option{silent-rules} can do, here is a simple
+To give the gist of what Automake can do in this respect, here is a simple
 comparison between a typical @command{make} output (where silent rules
 are disabled) and one with silent rules enabled:
 
@@ -10865,7 +10894,7 @@ func.c:4:3: warning: ‘i’ used uninitialized in this function
   CCLD   foo
 @end example
 
-@cindex silent-rules and libtool
+@cindex silent rules and libtool
 Also, in projects using @command{libtool}, the use of silent rules can
 automatically enable the @command{libtool}'s @option{--silent} option:
 
@@ -10891,26 +10920,9 @@ libtool: link: cd .libs && rm -f libx.so && ln -s libx.so.0.0.0 libx.so
   CCLD   libx.la
 @end example
 
-Let's now see how the @option{silent-rules} mode interfaces with the
-package developer and the package user.
-
-To enable the use of @option{silent-rules} in his package, a developer
-needs to do either of the following:
-
-@itemize @bullet
-@item
-Add the @option{silent-rules} option as argument to @code{AM_INIT_AUTOMAKE}.
-@item
-Call the @code{AM_SILENT_RULES} macro from within the @file{configure.ac}
-file.
-@end itemize
-
-It is not possible to instead specify @option{silent-rules} in a
-@file{Makefile.am} file.
-
-If the developer has done either of the above, then the user of the
-package may influence the verbosity at @command{configure} run time as
-well as at @command{make} run time:
+For Automake-generated @file{Makefile}s, the user may influence the
+verbosity at @command{configure} run time as well as at @command{make}
+run time:
 
 @itemize @bullet
 @item
@@ -10926,17 +10938,16 @@ time may be overridden: @code{make V=1} will produce verbose output,
 @code{make V=0} less verbose output.
 @end itemize
 
-@cindex default verbosity for silent-rules
+@cindex default verbosity for silent rules
 Note that silent rules are @emph{disabled} by default; the user must
 enable them explicitly at either @command{configure} run time or at
 @command{make} run time.  We think that this is a good policy, since
 it provides the casual user with enough information to prepare a good
 bug report in case anything breaks.
 
-Still, notwithstanding the rationales above, a developer who wants to
-make silent rules enabled by default in his own package can do so by
-adding a @samp{yes} argument to the @code{AM_SILENT_RULES} call in
-@file{configure.ac}.  We advise against this approach, though.
+Still, notwithstanding the rationales above, a developer who really
+wants to make silent rules enabled by default in his own package can
+do so by calling @code{AM_SILENT_RULES([yes])} in @file{configure.ac}.
 
 @c Keep in sync with silent-configsite.sh
 Users who prefer to have silent rules enabled by default can edit their
@@ -10949,16 +10960,13 @@ For portability to different @command{make} implementations, package authors
 are advised to not set the variable @code{V} inside the @file{Makefile.am}
 file, to allow the user to override the value for subdirectories as well.
 
-The current implementation of this feature normally uses nested
-variable expansion @samp{$(@var{var1}$(V))}, a @file{Makefile} feature
-that is not required by POSIX 2008 but is widely supported in
-practice.  The @option{silent-rules} option thus turns off warnings
-about recursive variable expansion, which are in turn enabled by
-@option{-Wportability} (@pxref{automake Invocation}).  On the rare
-@command{make} implementations that do not support nested variable
-expansion, whether rules are silent is always determined at configure
-time, and cannot be overridden at make time.  Future versions of POSIX
-are likely to require nested variable expansion, so this minor
+To work at its best, the current implementation of this feature normally
+uses nested variable expansion @samp{$(@var{var1}$(V))}, a @file{Makefile}
+feature that is not required by POSIX 2008 but is widely supported in
+practice.  On the rare @command{make} implementations that do not support
+nested variable expansion, whether rules are silent is always determined at
+configure time, and cannot be overridden at make time.  Future versions of
+POSIX are likely to require nested variable expansion, so this minor
 limitation should go away with time.
 
 @vindex @code{AM_V_GEN}
@@ -10966,15 +10974,31 @@ limitation should go away with time.
 @vindex @code{AM_DEFAULT_VERBOSITY}
 @vindex @code{AM_V}
 @vindex @code{AM_DEFAULT_V}
-To extend the silent mode to your own rules, you have two choices:
+To extend the silent mode to your own rules, you have few choices:
 
 @itemize @bullet
+
 @item
 You can use the predefined variable @code{AM_V_GEN} as a prefix to
 commands that should output a status line in silent mode, and
 @code{AM_V_at} as a prefix to commands that should not output anything
 in silent mode.  When output is to be verbose, both of these variables
 will expand to the empty string.
+
+@item
+You can silence a recipe unconditionally with @code{@@}, and then use
+the predefined variable @code{AM_V_P} to know whether make is being run
+in silent or verbose mode, adjust the verbose information your recipe
+displays accordingly:
+
+@example
+generate-headers:
+        @set -e; \
+        ... [commands defining a shell variable '$headers'] ...; \
+        if $(AM_V_P); then set -x; else echo " GEN   [headers]"; fi; \
+        rm -f $$headers && generate-header --flags $$headers
+@end example
+
 @item
 You can add your own variables, so strings of your own choice are shown.
 The following snippet shows how you would define your own equivalent of
@@ -11067,64 +11091,6 @@ The file @file{THANKS} is required.
 @end itemize
 
 
-@node Cygnus
-@chapter The effect of @option{--cygnus}
-
-@cindex @option{cygnus} strictness
-
-@emph{The features described in this section are deprecated; you must
-not use any of them in new code, and should remove their use from older
-but still maintained code: they will be withdrawn the next major Automake
-release (1.13).}
-
-Some packages, notably GNU GCC and GNU gdb, used to have a build
-environment originally written at Cygnus Support (subsequently renamed
-Cygnus Solutions, and then later purchased by Red Hat).  Packages with
-this ancestry are sometimes referred to as ``Cygnus'' trees.
-
-A Cygnus tree has slightly different rules for how a
-@file{Makefile.in} is to be constructed.  Passing @option{--cygnus} to
-@command{automake} will cause any generated @file{Makefile.in} to
-comply with Cygnus rules.
-
-Here are the precise effects of @option{--cygnus}:
-
-@itemize @bullet
-
-@item
-The @option{foreign} strictness is implied.
-
-@item
-The options @option{no-installinfo}, @option{no-dependencies} and
-@option{no-dist} are implied (@pxref{Options}).
-
-@item
-The macro @code{AM_MAINTAINER_MODE} is required.
-
-@item
-Info files are always created in the build directory, and not in the
-source directory.  Packages that don't use the @option{cygnus} option
-can emulate this effect by using the @option{no-installinfo} option
-and listing the generated info files in the @code{CLEANFILES} variable.
-
-@item
-@file{texinfo.tex} is not required if a Texinfo source file is
-specified.  The assumption is that the file will be supplied, but in a
-place that Automake cannot find -- it is an artifact of how Cygnus
-packages are typically bundled.  This effect can be emulated in
-packages not using the @option{cygnus} option with a proper definition
-of the @code{TEXINFO_TEX} variable (@pxref{Texinfo}).
-
-@item
-Certain tools will be searched for in the build tree as well as in the
-user's @env{PATH}.  These tools are @command{runtest}, @command{expect},
-@command{makeinfo} and @command{texi2dvi}.
-
-@item
-The @code{check} target doesn't depend on @code{all}.
-@end itemize
-
-
 @node Not Enough
 @chapter When Automake Isn't Enough
 
@@ -11410,7 +11376,7 @@ If you have ever used Gettext in a project, this is a good example of
 how third-party @file{Makefile}s can be used with Automake.  The
 @file{Makefile}s @command{gettextize} puts in the @file{po/} and
 @file{intl/} directories are handwritten @file{Makefile}s that
-implement all these targets.  That way they can be added to
+implement all of these targets.  That way they can be added to
 @code{SUBDIRS} in Automake packages.
 
 Directories that are only listed in @code{DIST_SUBDIRS} but not in
@@ -11611,7 +11577,7 @@ built from @file{Makefile.am} by @command{automake}, and rely on the
 definitions of the M4 macros put in @file{aclocal.m4} as well as the
 behavior of the auxiliary tools installed.
 
-Because all these files are closely related, it is important to
+Because all of these files are closely related, it is important to
 regenerate all of them when upgrading to a newer Automake release.
 The usual way to do that is
 
@@ -11631,7 +11597,7 @@ autoreconf -vfi
 The use of @option{--force-missing} ensures that auxiliary tools will be
 overridden by new versions (@pxref{automake Invocation}).
 
-It is important to regenerate all these files each time Automake is
+It is important to regenerate all of these files each time Automake is
 upgraded, even between bug fixes releases.  For instance, it is not
 unusual for a bug fix to involve changes to both the rules generated
 in @file{Makefile.in} and the supporting M4 macros copied to
@@ -11679,12 +11645,12 @@ lists.
 
 Packages made with Autoconf and Automake ship with some generated
 files like @file{configure} or @file{Makefile.in}.  These files were
-generated on the developer's host and are distributed so that
+generated on the developer's machine and are distributed so that
 end-users do not have to install the maintainer tools required to
 rebuild them.  Other generated files like Lex scanners, Yacc parsers,
 or Info documentation, are usually distributed on similar grounds.
 
-Automake outputs rules in @file{Makefile}s to rebuild these files.  For
+Automake output rules in @file{Makefile}s to rebuild these files.  For
 instance, @command{make} will run @command{autoconf} to rebuild
 @file{configure} whenever @file{configure.ac} is changed.  This makes
 development safer by ensuring a @file{configure} is never out-of-date
@@ -11747,10 +11713,41 @@ If users use @command{cvs update} to update their copy, instead of
 inaccurate.  Some rebuild rules will be triggered and attempt to
 run developer tools such as @command{autoconf} or @command{automake}.
 
-Actually, calls to such tools are all wrapped into a call to the
-@command{missing} script discussed later (@pxref{maintainer-mode}).
-@command{missing} will take care of fixing the timestamps when these
-tools are not installed, so that the build can continue.
+Calls to such tools are all wrapped into a call to the @command{missing}
+script discussed later (@pxref{maintainer-mode}), so that the user will
+see more descriptive warnings about missing or out-of-date tools, and
+possible suggestions about how to obtain them, rather than just some
+``command not found'' error, or (worse) some obscure message from some
+older version of the required tool they happen to have installed.
+
+Maintainers interested in keeping their package buildable from a CVS
+checkout even for those users that lack maintainer-specific tools might
+want to provide an helper script (or to enhance their existing bootstrap
+script) to fix the timestamps after a
+@command{cvs update} or a @command{git checkout}, to prevent spurious
+rebuilds.  In case of a project committing the Autotools-generated
+files, as well as the generated @file{.info} files, such script might
+look something like this:
+
+@smallexample
+#!/bin/sh
+# fix-timestamp.sh: prevents useless rebuilds after "cvs update"
+sleep 1
+# aclocal-generated aclocal.m4 depends on locally-installed
+# '.m4' macro files, as well as on 'configure.ac'
+touch aclocal.m4
+sleep 1
+# autoconf-generated configure depends on aclocal.m4 and on
+# configure.ac
+touch configure
+# so does autoheader-generated config.h.in
+touch config.h.in
+# and all the automake-generated Makefile.in files
+touch `find . -name Makefile.in -print`
+# finally, the makeinfo-generated '.info' files depend on the
+# corresponding '.texi' files
+touch doc/*.info
+@end smallexample
 
 @item
 In distributed development, developers are likely to have different
@@ -11768,7 +11765,7 @@ Or people use a script to fix the timestamp after a checkout (the GCC
 folks have such a script).
 @item
 Or @file{configure.ac} uses @code{AM_MAINTAINER_MODE}, which will
-disable all these rebuild rules by default.  This is further discussed
+disable all of these rebuild rules by default.  This is further discussed
 in @ref{maintainer-mode}.
 @end itemize
 
@@ -11847,20 +11844,20 @@ tools shouldn't be required during a user build and they are not
 checked for in @file{configure}.
 
 However, if for some reason a rebuild rule is triggered and involves a
-missing tool, @command{missing} will notice it and warn the user.
-Besides the warning, when a tool is missing, @command{missing} will
-attempt to fix timestamps in a way that allows the build to continue.
-For instance, @command{missing} will touch @file{configure} if
-@command{autoconf} is not installed.  When all distributed files are
-kept under version control, this feature of @command{missing} allows a
-user @emph{with no maintainer tools} to build a package off its version
-control repository, bypassing any timestamp inconsistency (implied by
-e.g.@: @samp{cvs update} or @samp{git clone}).
+missing tool, @command{missing} will notice it and warn the user, even
+suggesting how to obtain such a tool (at least in case it is a well-known
+one, like @command{makeinfo} or @command{bison}).  This is more helpful
+and user-friendly than just having the rebuild rules spewing out a terse
+error message like @samp{sh: @var{tool}: command not found}.  Similarly,
+@command{missing} will warn the user if it detects that a maintainer
+tool it attempted to use seems too old (be warned that diagnosing this
+correctly is typically more difficult that detecting missing tools, and
+requires cooperation from the tool itself, so it won't always work).
 
 If the required tool is installed, @command{missing} will run it and
 won't attempt to continue after failures.  This is correct during
 development: developers love fixing failures.  However, users with
-wrong versions of maintainer tools may get an error when the rebuild
+missing or too old maintainer tools may get an error when the rebuild
 rule is spuriously triggered, halting the build.  This failure to let
 the build continue is one of the arguments of the
 @code{AM_MAINTAINER_MODE} advocates.
@@ -11968,7 +11965,7 @@ Although @samp{$(wildcard ...)} works with GNU @command{make}, it is
 not portable to other @command{make} implementations.
 
 The only way Automake could support @command{$(wildcard ...)} is by
-expending @command{$(wildcard ...)} when @command{automake} is run.
+expanding @command{$(wildcard ...)} when @command{automake} is run.
 The resulting @file{Makefile.in}s would be portable since they would
 list all files and not use @samp{$(wildcard ...)}.  However that
 means developers would need to remember to run @command{automake} each
@@ -12398,7 +12395,7 @@ every target in a @file{Makefile.in}.
 Using variables like this gives you full control over the ordering of
 the flags.  For instance, if there is a flag in $(WARNINGCFLAGS) that
 you want to negate for a particular target, you can use something like
-@samp{prog1_CFLAGS = $(AM_CFLAGS) -no-flag}.  If all these flags had
+@samp{prog1_CFLAGS = $(AM_CFLAGS) -no-flag}.  If all of these flags had
 been forcefully appended to @code{CFLAGS}, there would be no way to
 disable one flag.  Yet another reason to leave user variables to
 users.
@@ -12425,13 +12422,6 @@ obeys this naming scheme.  The slight difference is that
 @code{MAKEFLAGS} is passed to sub-@command{make}s implicitly by
 @command{make} itself.
 
-However you should not think that all variables ending with
-@code{FLAGS} follow this convention.  For instance,
-@code{DISTCHECK_CONFIGURE_FLAGS} (@pxref{Checking the Distribution}) and
-@code{ACLOCAL_AMFLAGS} (see @ref{Rebuilding} and @ref{Local Macros}),
-are two variables that are only useful to the maintainer and have no
-user counterpart.
-
 @code{ARFLAGS} (@pxref{A Library}) is usually defined by Automake and
 has neither @code{AM_} nor per-target cousin.
 
@@ -12992,7 +12982,7 @@ instance, here is how @code{AM_PATH_LISPDIR} (@pxref{Emacs Lisp})
 computes @samp{$(lispdir)}:
 
 @example
-$EMACS -batch -q -eval '(while load-path
+$EMACS -batch -Q -eval '(while load-path
   (princ (concat (car load-path) "\n"))
   (setq load-path (cdr load-path)))' >conftest.out
 lispdir=`sed -n
@@ -13030,8 +13020,8 @@ generated by @command{automake} effectively:
 
 @itemize
 @item
-If less verbose output has been enabled in the package with the
-@samp{silent-rules} option (@pxref{Options}), you can use
+If less verbose output has been enabled in the package with the use
+of silent rules (@pxref{Automake Silent Rules}), you can use
 @code{make V=1} to see the commands being executed.
 @item
 @code{make -n} can help show what would be done without actually doing
@@ -13148,7 +13138,7 @@ suite failures, please attach the @file{test-suite.log} file.
 @c  LocalWords:  texinfo setfilename settitle setchapternewpage texi direntry
 @c  LocalWords:  dircategory in's aclocal ifinfo titlepage Tromey vskip pt sp
 @c  LocalWords:  filll defcodeindex ov cv op tr syncodeindex fn cp vr ifnottex
-@c  LocalWords:  dir Automake's ac Dist Gnits gnits cygnus dfn Autoconf's pxref
+@c  LocalWords:  dir Automake's ac Dist Gnits gnits dfn Autoconf's pxref
 @c  LocalWords:  cindex Autoconf autoconf perl samp cvs dist trindex SUBST foo
 @c  LocalWords:  xs emph FIXME ref vindex pkglibdir pkgincludedir pkgdatadir mt
 @c  LocalWords:  pkg libdir cpio bindir sbindir rmt pax sbin zar zardir acindex
index 38bfdd2..16589f9 100644 (file)
@@ -5,7 +5,7 @@
 @c hence no sectioning command or @node.
 
 @display
-Copyright @copyright{} 2000-2012 Free Software Foundation, Inc.
+Copyright @copyright{} 2000-2017 Free Software Foundation, Inc.
 @uref{http://fsf.org/}
 
 Everyone is permitted to copy and distribute verbatim copies
@@ -151,7 +151,7 @@ COPYING IN QUANTITY
 If you publish printed copies (or copies in media that commonly have
 printed covers) of the Document, numbering more than 100, and the
 Document's license notice requires Cover Texts, you must enclose the
-copies in covers that carry, clearly and legibly, all these Cover
+copies in covers that carry, clearly and legibly, all of these Cover
 Texts: Front-Cover Texts on the front cover, and Back-Cover Texts on
 the back cover.  Both covers must also clearly and legibly identify
 you as the publisher of these copies.  The front cover must present
index 6b915bc..e651b8d 100755 (executable)
@@ -1,7 +1,7 @@
 #!/usr/bin/perl -w
 
 # Generate a short man page from --help and --version output.
-# Copyright (C) 1997-2012 Free Software Foundation, Inc.
+# Copyright (C) 1997-2017 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 ec4f76e..7e17bc5 100644 (file)
@@ -1,4 +1,4 @@
-@set UPDATED 1 June 2012
-@set UPDATED-MONTH June 2012
-@set EDITION 1.12.1
-@set VERSION 1.12.1
+@set UPDATED 17 June 2017
+@set UPDATED-MONTH June 2017
+@set EDITION 1.15.1
+@set VERSION 1.15.1
index ec4f76e..7e17bc5 100644 (file)
@@ -1,4 +1,4 @@
-@set UPDATED 1 June 2012
-@set UPDATED-MONTH June 2012
-@set EDITION 1.12.1
-@set VERSION 1.12.1
+@set UPDATED 17 June 2017
+@set UPDATED-MONTH June 2017
+@set EDITION 1.15.1
+@set VERSION 1.15.1
index 34e10a8..53b5f39 100755 (executable)
@@ -3,7 +3,7 @@
 # of the Automake testsuite.  Also, automatically generate some more
 # tests from them (for particular cases/setups only).
 
-# Copyright (C) 2011-2012 Free Software Foundation, Inc.
+# Copyright (C) 2011-2017 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
@@ -31,6 +31,13 @@ my $me = File::Basename::basename $0;
 # For use in VPATH builds.
 my $srcdir = ".";
 
+# The testsuite subdirectory, relative to the top-lever source directory.
+my $testdir = "t";
+
+# Where testsuite-related helper scripts, data files and shell libraries
+# are placed.  Relative to the top-lever source directory.
+my $testauxdir = "$testdir/ax";
+
 #--------------------------------------------------------------------------
 
 sub unindent ($)
@@ -86,23 +93,21 @@ sub line_match ($$)
 sub write_wrapper_script ($$$)
 {
   my ($file_handle, $wrapped_test, $shell_setup_code, $creator_name) = @_;
-  # FIXME: we use some creative quoting in the generated scripts,
-  # FIXME: to please maintainer-check.
   print $file_handle unindent <<EOF;
     #! /bin/sh
     # This file has been automatically generated.  DO NOT EDIT BY HAND!
-    . ./defs-static || exit '99';
+    . test-lib.sh
     $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 "\$?"
+        . "\$dir/$wrapped_test"; exit \$?
       fi
     done
     echo "\$0: cannot find wrapped test '$wrapped_test'" >&2
-    exit '99'
+    exit 99
 EOF
 }
 
@@ -111,7 +116,7 @@ sub get_list_of_tests ()
   my $make = defined $ENV{MAKE} ? $ENV{MAKE} : "make";
   # Unset MAKEFLAGS, for when we are called from make itself.
   my $cmd = "MAKEFLAGS= && unset MAKEFLAGS && cd '$srcdir' && "
-            . "$make -s -f t/list-of-tests.mk print-list-of-tests";
+            . "$make -s -f $testdir/list-of-tests.mk print-list-of-tests";
   my @tests_list = split /\s+/, `$cmd`;
   die "$me: cannot get list of tests\n" unless $? == 0 && @tests_list;
   my $ok = 1;
@@ -137,52 +142,53 @@ sub parse_options (@)
 
 #--------------------------------------------------------------------------
 
-# Where testsuite-related helper scripts, data files and shell libraries
-# are placed.  Relative to the 't/' subdirectory.
-my $auxdir = "ax";
-
 my %deps_extractor =
   (
     libtool_macros =>
       {
         line_matcher => qr/^\s*required=.*\blibtool/,
-        nodist_prereqs => "t/libtool-macros.log",
+        nodist_prereqs => "$testdir/libtool-macros.log",
       },
     gettext_macros =>
       {
         line_matcher => qr/^\s*required=.*\bgettext/,
-        nodist_prereqs => "t/gettext-macros.log",
+        nodist_prereqs => "$testdir/gettext-macros.log",
+      },
+    pkgconfig_macros =>
+      {
+        line_matcher => qr/^\s*required=.*\bpkg-config/,
+        nodist_prereqs => "$testdir/pkg-config-macros.log",
       },
     use_trivial_test_driver =>
       {
         line_matcher => qr/\btrivial-test-driver\b/,
-        dist_prereqs => "t/$auxdir/trivial-test-driver",
+        dist_prereqs => "$testauxdir/trivial-test-driver",
       },
     check_testsuite_summary =>
       {
         line_matcher => qr/\btestsuite-summary-checks\.sh\b/,
-        dist_prereqs => "t/$auxdir/testsuite-summary-checks.sh",
+        dist_prereqs => "$testauxdir/testsuite-summary-checks.sh",
       },
     extract_testsuite_summary =>
       {
         line_matcher => qr/\bextract-testsuite-summary\.pl\b/,
-        dist_prereqs => "t/$auxdir/extract-testsuite-summary.pl",
+        dist_prereqs => "$testauxdir/extract-testsuite-summary.pl",
       },
     check_tap_testsuite_summary =>
       {
         line_matcher => qr/\btap-summary-aux\.sh\b/,
-        dist_prereqs => "t/$auxdir/tap-summary-aux.sh",
+        dist_prereqs => "$testauxdir/tap-summary-aux.sh",
       },
     on_tap_with_common_setup =>
       {
         line_matcher => qr/\btap-setup\.sh\b/,
-        dist_prereqs => "t/$auxdir/tap-setup.sh",
-        nodist_prereqs => "t/tap-common-setup.log",
+        dist_prereqs => "$testauxdir/tap-setup.sh",
+        nodist_prereqs => "$testdir/tap-common-setup.log",
       },
     depcomp =>
       {
         line_matcher => qr/\bdepcomp\.sh\b/,
-        dist_prereqs => "t/$auxdir/depcomp.sh",
+        dist_prereqs => "$testauxdir/depcomp.sh",
       },
   );
 
@@ -235,20 +241,6 @@ my %test_generators =
         shell_setup_code =>
           'am_test_prefer_config_shell=yes',
       },
-    #
-    # Tests on tap support should be run with both the perl and awk
-    # implementations of the TAP driver (they run with the awk one
-    # by default).
-    #
-    perl_tap_driver =>
-      {
-        line_matcher =>
-          qr<(?:\bfetch_tap_driver\b|[\s/]tap-setup\.sh\b)>,
-        line_rejecter =>
-          qr/\bam_tap_implementation=/,
-        shell_setup_code =>
-          'am_tap_implementation=perl',
-      },
   );
 
 #--------------------------------------------------------------------------
@@ -269,37 +261,56 @@ print <<EOF;
 
 EOF
 
-# FIXME: the following is not really right, since cannot compose wrapping
-# of tests matching more than one condition.  Still, there should be no
-# such test at the moment, so the limitation is (temporarily) acceptable.
-while (my ($k, $g) = each %test_generators)
+# A test script '$test' can possibly match more than one condition, so
+# for each tests we need to keep a list of generated wrapper tests.
+# Since what defines these wrapper scripts is the set of initializations
+# that are issued before sourcing the original, wrapped tests, these
+# initializations is what we put in our list entries.
+# The list will be saved in the hash entry '$wrapper_setups{$test}'.
+my %wrapper_setups = ();
+foreach my $test (@all_tests)
+  {
+    my @setups = ('');
+    foreach my $x (values %test_generators)
+    {
+      next
+        if not line_match $x->{line_matcher}, $test;
+      next
+        if $x->{line_rejecter} and line_match $x->{line_rejecter}, $test;
+      @setups = map { ($_, "$_\n$x->{shell_setup_code}") } @setups;
+    }
+    @setups = grep { $_ ne '' } @setups;
+    $wrapper_setups{$test} = \@setups if @setups;
+  }
+# And now create all the wrapper tests.
+for my $wrapped_test (sort keys %wrapper_setups)
   {
-    my @wrapped_tests = grep {
-      line_match ($g->{line_matcher}, $_)
-        && (!$g->{line_rejecter} || !line_match ($g->{line_rejecter}, $_))
-    } @all_tests;
-    foreach my $wrapped_test (@wrapped_tests)
+    my $setup_list = $wrapper_setups{$wrapped_test};
+    (my $base = $wrapped_test) =~ s/\.([^.]*)$//;
+    my $suf = $1 or die "$me: test '$wrapped_test' lacks a suffix\n";
+    my $count = 0;
+    foreach my $setup (@$setup_list)
       {
-        (my $base = $wrapped_test) =~ s/\.([^.]*)$//;
-        my $suf = $1 or die "$me: test '$wrapped_test' lacks a suffix\n";
-        my $wrapper_test =  "$base-w.$suf";
+        $count++;
+        my $wbase = "$base-w" . ($count > 1 ? $count : '');
+        my $wrapper_test =  "$wbase.$suf";
         # Register wrapper test as "autogenerated".
         push @generated_tests, $wrapper_test;
         # Create wrapper test.
         atomic_write $wrapper_test,
                      sub { write_wrapper_script $_[0], $wrapped_test,
-                           $g->{shell_setup_code} },
-                     0555;
+                                                $setup },
+                     0444;
         # The generated test works by sourcing the original test, so that
         # it has to be re-run every time that changes ...
-        print "$base-w.log: $wrapped_test\n";
+        print "$wbase.log: $wrapped_test\n";
         # ... but also every time the prerequisites of the wrapped test
         # changes.  The simpler (although suboptimal) way to do so is to
-        # ensure that the wrapped tests runs before the wrappee one (in
-        # case it needs to be re-run *at all*.
+        # ensure that the wrapped tests runs before the wrapper one (in
+        # case it needs to be re-run *at all*).
         # FIXME: we could maybe refactor the script to find a more
         # granular way to express such implicit dependencies.
-        print "$base-w.log: $base.log\n";
+        print "$wbase.log: $base.log\n";
       }
   }
 
@@ -318,11 +329,14 @@ my %depmodes =
   (
     auto         => ["cc"],
     disabled     => ["cc"],
-    makedepend   => ["cc", "makedepend"],
+    makedepend   => ["cc", "makedepend", "-c-o"],
     dashmstdout  => ["gcc"],
     cpp          => ["gcc"],
-# This is for older (pre-3.x) GCC versions.  Newer versions
-# have depmode "gcc3".
+# This was for older (pre-3.x) GCC versions (newer versions
+# have depmode "gcc3").  But other compilers use this depmode
+# as well (for example, the IMB xlc/xlC compilers, and the HP
+# C compiler, see 'lib/depcomp' for more info), so it's not
+# obsolete, and it's worth giving it some coverage.
     gcc          => ["gcc"],
 # This is for older (pre-7) msvc versions.  Newer versions
 # have depmodes "msvc7" and "msvc7msys".
@@ -332,7 +346,7 @@ my %depmodes =
 
 foreach my $lt (TRUE, FALSE)
   {
-    foreach my $m (keys %depmodes)
+    foreach my $m (sort keys %depmodes)
       {
         my $planned = ($lt && $m eq "auto") ? 84 : 28;
         my @required =
@@ -346,7 +360,7 @@ foreach my $lt (TRUE, FALSE)
             "depmode=$m",
             "depcomp_with_libtool=" . ($lt ? "yes" : "no"),
           );
-        my $test = "t/depcomp" . ($lt ? "-lt-" : "-") . $m . ".tap";
+        my $test = "$testdir/depcomp" . ($lt ? "-lt-" : "-") . "$m.tap";
         # Register wrapper test as "autogenerated" ...
         push @generated_tests, $test;
         # ... and create it.
@@ -358,12 +372,13 @@ foreach my $lt (TRUE, FALSE)
               # Automatically generated test.  DO NOT EDIT BY HAND!
               @vars_init
               required="@required"
-              . ./defs || Exit 1
+              . test-init.sh
               plan_ $planned
-              . "\$am_testauxdir/depcomp.sh"; exit "\$?"
+              . depcomp.sh
+              exit \$?
 EOF
           },
-          0555);
+          0444);
       }
    }
 
@@ -386,8 +401,9 @@ print <<EOF;
 
 EOF
 
-while (my ($k, $x) = each %deps_extractor)
+for my $k (sort keys %deps_extractor)
   {
+    my $x = $deps_extractor{$k};
     my $dist_prereqs = $x->{dist_prereqs} || "";
     my $nodist_prereqs = $x->{nodist_prereqs} || "";
     my @tests = grep { line_match $x->{line_matcher}, $_ } @all_tests;
index 02ce849..145ff47 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright (C) 2002-2012 Free Software Foundation, Inc.
+# Copyright (C) 2002-2017 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
@@ -156,7 +156,7 @@ register_channel 'automake', type => 'fatal', backtrace => 1,
 
 register_channel 'extra-portability', type => 'warning', silent => 1;
 register_channel 'gnu', type => 'warning';
-register_channel 'obsolete', type => 'warning', silent => 1;
+register_channel 'obsolete', type => 'warning';
 register_channel 'override', type => 'warning', silent => 1;
 register_channel 'portability', type => 'warning', silent => 1;
 register_channel 'portability-recursive', type => 'warning', silent => 1;
index 724a114..a98fb51 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright (C) 2002-2012 Free Software Foundation, Inc.
+# Copyright (C) 2002-2017 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 cc753d9..7955f36 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright (C) 1997-2012 Free Software Foundation, Inc.
+# Copyright (C) 1997-2017 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 bbf55ac..9437eca 100644 (file)
@@ -1,5 +1,5 @@
 #  -*- Perl -*-
-# Copyright (C) 2003-2012 Free Software Foundation, Inc.
+# Copyright (C) 2003-2017 Free Software Foundation, Inc.
 # @configure_input@
 
 # This program is free software; you can redistribute it and/or modify
@@ -33,7 +33,14 @@ our $PACKAGE_BUGREPORT = '@PACKAGE_BUGREPORT@';
 our $VERSION = '@VERSION@';
 our $RELEASE_YEAR = '@RELEASE_YEAR@';
 our $libdir = '@datadir@/@PACKAGE@-@APIVERSION@';
-our $perl_threads = @PERL_THREADS@;
+
+our $perl_threads = 0;
+# We need at least this version for CLONE support.
+if (eval { require 5.007_002; })
+  {
+    use Config;
+    $perl_threads = $Config{useithreads};
+  }
 
 1;
 
index 53e62a5..fa20691 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright (C) 2003-2012 Free Software Foundation, Inc.
+# Copyright (C) 2003-2017 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
@@ -75,19 +75,21 @@ sub find_configure_ac (;@)
   my $configure_in =
     File::Spec->canonpath (File::Spec->catfile ($directory, 'configure.in'));
 
-  if (-f $configure_ac)
+  if (-f $configure_in)
     {
-      if (-f $configure_in)
+      msg ('obsolete', "autoconf input should be named 'configure.ac'," .
+                       " not 'configure.in'");
+      if (-f $configure_ac)
        {
          msg ('unsupported',
               "'$configure_ac' and '$configure_in' both present.\n"
               . "proceeding with '$configure_ac'");
+          return $configure_ac
        }
-      return $configure_ac
-    }
-  elsif (-f $configure_in)
-    {
-      return $configure_in;
+      else
+        {
+          return $configure_in;
+        }
     }
   return $configure_ac;
 }
@@ -102,8 +104,7 @@ Like C<find_configure_ac>, but fail if neither is present.
 sub require_configure_ac (;$)
 {
   my $res = find_configure_ac (@_);
-  fatal "'configure.ac' or 'configure.in' is required"
-    unless -f $res;
+  fatal "'configure.ac' is required" unless -f $res;
   return $res
 }
 
index e449121..2f43391 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright (C) 1997-2012 Free Software Foundation, Inc.
+# Copyright (C) 1997-2017 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 fc2347b..1a4fbc7 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright (C) 2003-2012 Free Software Foundation, Inc.
+# Copyright (C) 2003-2017 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 2a4a527..e0e4c60 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright (C) 2001-2012 Free Software Foundation, Inc.
+# Copyright (C) 2001-2017 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 ea1c7ca..0f4d853 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright (C) 2012 Free Software Foundation, Inc.
+# Copyright (C) 2012-2017 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 6da070e..f220479 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright (C) 2003-2012 Free Software Foundation, Inc.
+# Copyright (C) 2003-2017 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 8b64562..b6d2655 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright (C) 2003-2012 Free Software Foundation, Inc.
+# Copyright (C) 2003-2017 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
diff --git a/lib/Automake/Language.pm b/lib/Automake/Language.pm
new file mode 100644 (file)
index 0000000..995e8b5
--- /dev/null
@@ -0,0 +1,122 @@
+# Copyright (C) 2013-2017 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/>.
+
+package Automake::Language;
+
+use 5.006;
+use strict;
+
+use Class::Struct ();
+Class::Struct::struct (
+       # Short name of the language (c, f77...).
+       'name' => "\$",
+       # Nice name of the language (C, Fortran 77...).
+       'Name' => "\$",
+
+       # List of configure variables which must be defined.
+       'config_vars' => '@',
+
+       # 'pure' is '1' or ''.  A 'pure' language is one where, if
+       # all the files in a directory are of that language, then we
+       # do not require the C compiler or any code to call it.
+       'pure'   => "\$",
+
+       'autodep' => "\$",
+
+       # Name of the compiling variable (COMPILE).
+       'compiler'  => "\$",
+       # Content of the compiling variable.
+       'compile'  => "\$",
+       # Flag to require compilation without linking (-c).
+       'compile_flag' => "\$",
+       'extensions' => '@',
+       # A subroutine to compute a list of possible extensions of
+       # the product given the input extensions.
+       # (defaults to a subroutine which returns ('.$(OBJEXT)', '.lo'))
+       'output_extensions' => "\$",
+       # A list of flag variables used in 'compile'.
+       # (defaults to [])
+       'flags' => "@",
+
+       # Any tag to pass to libtool while compiling.
+       'libtool_tag' => "\$",
+
+       # The file to use when generating rules for this language.
+       # The default is 'depend2'.
+       'rule_file' => "\$",
+
+       # Name of the linking variable (LINK).
+       'linker' => "\$",
+       # Content of the linking variable.
+       'link' => "\$",
+
+       # Name of the compiler variable (CC).
+       'ccer' => "\$",
+
+       # Name of the linker variable (LD).
+       'lder' => "\$",
+       # Content of the linker variable ($(CC)).
+       'ld' => "\$",
+
+       # Flag to specify the output file (-o).
+       'output_flag' => "\$",
+       '_finish' => "\$",
+
+       # This is a subroutine which is called whenever we finally
+       # determine the context in which a source file will be
+       # compiled.
+       '_target_hook' => "\$",
+
+       # If TRUE, nodist_ sources will be compiled using specific rules
+       # (i.e. not inference rules).  The default is FALSE.
+       'nodist_specific' => "\$");
+
+
+sub finish ($)
+{
+  my ($self) = @_;
+  if (defined $self->_finish)
+    {
+      &{$self->_finish} (@_);
+    }
+}
+
+sub target_hook ($$$$%)
+{
+    my ($self) = @_;
+    if (defined $self->_target_hook)
+    {
+       $self->_target_hook->(@_);
+    }
+}
+
+1;
+
+### Setup "GNU" style for perl-mode and cperl-mode.
+## Local Variables:
+## perl-indent-level: 2
+## perl-continued-statement-offset: 2
+## perl-continued-brace-offset: 0
+## perl-brace-offset: 0
+## perl-brace-imaginary-offset: 0
+## perl-label-offset: -2
+## cperl-indent-level: 2
+## cperl-brace-offset: 0
+## cperl-continued-brace-offset: 0
+## cperl-label-offset: -2
+## cperl-extra-newline-before-brace: t
+## cperl-merge-trailing-else: nil
+## cperl-continued-statement-offset: 2
+## End:
index 290db73..9aa69de 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright (C) 2002-2012 Free Software Foundation, Inc.
+# Copyright (C) 2002-2017 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
diff --git a/lib/Automake/Makefile.inc b/lib/Automake/Makefile.inc
new file mode 100644 (file)
index 0000000..c0d8a47
--- /dev/null
@@ -0,0 +1,57 @@
+## Included by top-level Makefile for Automake.
+
+## Copyright (C) 1995-2017 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/>.
+
+## ---------------------------------------------------- ##
+##  Private perl modules used by automake and aclocal.  ##
+## ---------------------------------------------------- ##
+
+perllibdir = $(pkgvdatadir)/Automake
+
+dist_perllib_DATA = \
+  %D%/ChannelDefs.pm \
+  %D%/Channels.pm \
+  %D%/Condition.pm \
+  %D%/Configure_ac.pm \
+  %D%/DisjConditions.pm \
+  %D%/FileUtils.pm \
+  %D%/General.pm \
+  %D%/Getopt.pm \
+  %D%/Item.pm \
+  %D%/ItemDef.pm \
+  %D%/Language.pm \
+  %D%/Location.pm \
+  %D%/Options.pm \
+  %D%/Rule.pm \
+  %D%/RuleDef.pm \
+  %D%/Variable.pm \
+  %D%/VarDef.pm \
+  %D%/Version.pm \
+  %D%/XFile.pm \
+  %D%/Wrap.pm
+
+nodist_perllib_DATA = %D%/Config.pm
+CLEANFILES += $(nodist_perllib_DATA)
+
+%D%/Config.pm: %D%/Config.in Makefile
+       $(AM_V_at)rm -f $@ $@-t
+       $(AM_V_at)$(MKDIR_P) %D%
+       $(AM_V_GEN)in=Config.in \
+         && $(do_subst) <$(srcdir)/%D%/Config.in >$@-t
+       $(generated_file_finalize)
+EXTRA_DIST += %D%/Config.in
+
+# vim: ft=automake noet
index 2f977bd..426a157 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright (C) 2003-2012 Free Software Foundation, Inc.
+# Copyright (C) 2003-2017 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
@@ -241,24 +241,27 @@ These functions should be called at most once for each set of options
 having the same precedence; i.e., do not call it twice for two options
 from C<AM_INIT_AUTOMAKE>.
 
-Return 1 on error, 0 otherwise.
+Return 0 on error, 1 otherwise.
 
 =cut
 
-# _option_must_be_from_configure ($OPTION, $WHERE)
+# $BOOL
+# _option_is_from_configure ($OPTION, $WHERE)
 # ----------------------------------------------
 # Check that the $OPTION given in location $WHERE is specified with
 # AM_INIT_AUTOMAKE, not with AUTOMAKE_OPTIONS.
-sub _option_must_be_from_configure ($$)
+sub _option_is_from_configure ($$)
 {
   my ($opt, $where)= @_;
-  return
+  return 1
     if $where->get =~ /^configure\./;
   error $where,
         "option '$opt' can only be used as argument to AM_INIT_AUTOMAKE\n" .
         "but not in AUTOMAKE_OPTIONS makefile statements";
+  return 0;
 }
 
+# $BOOL
 # _is_valid_easy_option ($OPTION)
 # -------------------------------
 # Explicitly recognize valid automake options that require no
@@ -269,14 +272,12 @@ sub _is_valid_easy_option ($)
   return scalar grep { $opt eq $_ } qw(
     check-news
     color-tests
-    cygnus
     dejagnu
     dist-bzip2
     dist-lzip
-    dist-shar
-    dist-tarZ
     dist-xz
     dist-zip
+    info-in-builddir
     no-define
     no-dependencies
     no-dist
@@ -287,6 +288,9 @@ sub _is_valid_easy_option ($)
     no-texinfo.tex
     nostdinc
     readme-alpha
+    serial-tests
+    parallel-tests
+    silent-rules
     std-options
     subdir-objects
   );
@@ -303,6 +307,7 @@ sub _process_option_list (\%@)
 {
   my ($options, @list) = @_;
   my @warnings = ();
+  my $ret = 1;
 
   foreach my $h (@list)
     {
@@ -313,45 +318,60 @@ sub _process_option_list (\%@)
         {
           set_strictness ($_);
         }
+      # TODO: Remove this special check in Automake 3.0.
       elsif (/^(.*\/)?ansi2knr$/)
         {
           # Obsolete (and now removed) de-ANSI-fication support.
           error ($where,
                  "automatic de-ANSI-fication support has been removed");
+          $ret = 0;
         }
+      # TODO: Remove this special check in Automake 3.0.
+      elsif ($_ eq 'cygnus')
+        {
+          error $where, "support for Cygnus-style trees has been removed";
+          $ret = 0;
+        }
+      # TODO: Remove this special check in Automake 3.0.
       elsif ($_ eq 'dist-lzma')
         {
           error ($where, "support for lzma-compressed distribution " .
                          "archives has been removed");
+          $ret = 0;
         }
-      elsif ($_ eq 'parallel-tests')
+      # TODO: Make this a fatal error in Automake 2.0.
+      elsif ($_ eq 'dist-shar')
         {
-          # Just recognize it explicitly.
+          msg ('obsolete', $where,
+               "support for shar distribution archives is deprecated.\n" .
+               "  It will be removed in Automake 2.0");
         }
-      elsif ($_ eq 'serial-tests')
+      # TODO: Make this a fatal error in Automake 2.0.
+      elsif ($_ eq 'dist-tarZ')
         {
-          # This is a little of an hack, but good enough for the moment.
-          delete $options->{'parallel-tests'};
+          msg ('obsolete', $where,
+               "support for distribution archives compressed with " .
+               "legacy program 'compress' is deprecated.\n" .
+               "  It will be removed in Automake 2.0");
         }
       elsif (/^filename-length-max=(\d+)$/)
         {
           delete $options->{$_};
           $options->{'filename-length-max'} = [$_, $1];
         }
-      elsif ($_ eq 'silent-rules')
-        {
-          _option_must_be_from_configure ($_, $where);
-        }
       elsif ($_ eq 'tar-v7' || $_ eq 'tar-ustar' || $_ eq 'tar-pax')
         {
-          _option_must_be_from_configure ($_, $where);
+          if (not _option_is_from_configure ($_, $where))
+            {
+              $ret = 0;
+            }
           for my $opt ('tar-v7', 'tar-ustar', 'tar-pax')
             {
               next
                 if $opt eq $_ or ! exists $options->{$opt};
               error ($where,
                      "options '$_' and '$opt' are mutually exclusive");
-              last;
+              $ret = 0;
             }
         }
       elsif (/^\d+\.\d+(?:\.\d+)?[a-z]?(?:-[A-Za-z0-9]+)?$/)
@@ -359,9 +379,8 @@ sub _process_option_list (\%@)
           # Got a version number.
           if (Automake::Version::check ($VERSION, $&))
             {
-              error ($where, "require Automake $_, but have $VERSION",
-                     uniq_scope => US_GLOBAL);
-              return 1;
+              error ($where, "require Automake $_, but have $VERSION");
+              $ret = 0;
             }
         }
       elsif (/^(?:--warnings=|-W)(.*)$/)
@@ -371,11 +390,11 @@ sub _process_option_list (\%@)
         }
       elsif (! _is_valid_easy_option $_)
         {
-          error ($where, "option '$_' not recognized",
-                 uniq_scope => US_GLOBAL);
-          return 1;
+          error ($where, "option '$_' not recognized");
+          $ret = 0;
         }
     }
+
   # We process warnings here, so that any explicitly-given warning setting
   # will take precedence over warning settings defined implicitly by the
   # strictness.
@@ -385,23 +404,24 @@ sub _process_option_list (\%@)
           "unknown warning category '$w->{'cat'}'"
         if switch_warning $w->{cat};
     }
-  return 0;
+
+  return $ret;
 }
 
 sub process_option_list (@)
 {
   prog_error "local options already processed"
     if $_options_processed;
-  return _process_option_list (%_options, @_);
   $_options_processed = 1;
+  _process_option_list (%_options, @_);
 }
 
 sub process_global_option_list (@)
 {
   prog_error "global options already processed"
     if $_global_options_processed;
-  return _process_option_list (%_global_options, @_);
   $_global_options_processed = 1;
+  _process_option_list (%_global_options, @_);
 }
 
 =item C<set_strictness ($name)>
index 3f17daa..58b2d4b 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright (C) 2003-2012 Free Software Foundation, Inc.
+# Copyright (C) 2003-2017 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
@@ -29,8 +29,8 @@ use Automake::DisjConditions;
 require Exporter;
 use vars '@ISA', '@EXPORT', '@EXPORT_OK';
 @ISA = qw/Automake::Item Exporter/;
-@EXPORT = qw (reset register_suffix_rule suffix_rules_count
-             suffixes rules $suffix_rules $KNOWN_EXTENSIONS_PATTERN
+@EXPORT = qw (reset register_suffix_rule next_in_suffix_chain
+             suffixes rules $KNOWN_EXTENSIONS_PATTERN
              depend %dependencies %actions register_action
              accept_extensions
              reject_rule msg_rule msg_cond_rule err_rule err_cond_rule
@@ -98,12 +98,17 @@ non-object).
 my $_SUFFIX_RULE_PATTERN =
   '^(\.[a-zA-Z0-9_(){}$+@\-]+)(\.[a-zA-Z0-9_(){}$+@\-]+)' . "\$";
 
-# Suffixes found during a run.
-use vars '@_suffixes';
+my @_suffixes = ();
+my @_known_extensions_list = ();
+my %_rule_dict = ();
 
-# Same as $suffix_rules (declared below), but records only the
-# default rules supplied by the languages Automake supports.
-use vars '$_suffix_rules_default';
+# See comments in the implementation of the 'next_in_suffix_chain()'
+# variable for details.
+my %_suffix_rules;
+
+# Same as $suffix_rules, but records only the default rules
+# supplied by the languages Automake supports.
+my %_suffix_rules_builtin;
 
 =item C<%dependencies>
 
@@ -126,36 +131,6 @@ only when keys exists in C<%dependencies>.
 
 use vars '%actions';
 
-=item <$suffix_rules>
-
-This maps the source extension for all suffix rules seen to
-a C<hash> whose keys are the possible output extensions.
-
-Note that this is transitively closed by construction:
-if we have
-      exists $suffix_rules{$ext1}{$ext2}
-   && exists $suffix_rules{$ext2}{$ext3}
-then we also have
-      exists $suffix_rules{$ext1}{$ext3}
-
-So it's easy to check whether C<.foo> can be transformed to
-C<.$(OBJEXT)> by checking whether
-C<$suffix_rules{'.foo'}{'.$(OBJEXT)'}> exists.  This will work even if
-transforming C<.foo> to C<.$(OBJEXT)> involves a chain of several
-suffix rules.
-
-The value of C<$suffix_rules{$ext1}{$ext2}> is a pair
-C<[ $next_sfx, $dist ]> where C<$next_sfx> is target suffix
-for the next rule to use to reach C<$ext2>, and C<$dist> the
-distance to C<$ext2'>.
-
-The content of this variable should be updated via the
-C<register_suffix_rule> function.
-
-=cut
-
-use vars '$suffix_rules';
-
 =item C<$KNOWN_EXTENSIONS_PATTERN>
 
 Pattern that matches all know input extensions (i.e. extensions used
@@ -167,9 +142,8 @@ New extensions should be registered with C<accept_extensions>.
 
 =cut
 
-use vars qw ($KNOWN_EXTENSIONS_PATTERN @_known_extensions_list);
+use vars qw ($KNOWN_EXTENSIONS_PATTERN);
 $KNOWN_EXTENSIONS_PATTERN = "";
-@_known_extensions_list = ();
 
 =back
 
@@ -278,7 +252,6 @@ rules defined so far.)
 
 =cut
 
-use vars '%_rule_dict';
 sub rules ()
 {
   return values %_rule_dict;
@@ -317,16 +290,7 @@ sub reset()
 {
   %_rule_dict = ();
   @_suffixes = ();
-  # The first time we initialize the variables,
-  # we save the value of $suffix_rules.
-  if (defined $_suffix_rules_default)
-    {
-      $suffix_rules = $_suffix_rules_default;
-    }
-  else
-    {
-      $_suffix_rules_default = $suffix_rules;
-    }
+  %_suffix_rules = %_suffix_rules_builtin;
 
   %dependencies =
     (
@@ -376,26 +340,41 @@ sub reset()
      # Tarballing.
      'dist-all'             => [],
 
-     # Phonying.
      '.PHONY'               => [],
+     '.PRECIOUS'            => [],
      # Recursive install targets (so "make -n install" works for BSD Make).
      '.MAKE'               => [],
      );
   %actions = ();
 }
 
+=item C<next_in_suffix_chain ($ext1, $ext2)>
+
+Return the target suffix for the next rule to use to reach C<$ext2>
+from C<$ext1>, or C<undef> if no such rule exists.
+
+=cut
+
+sub next_in_suffix_chain ($$)
+{
+  my ($ext1, $ext2) = @_;
+  return undef unless (exists $_suffix_rules{$ext1} and
+                       exists $_suffix_rules{$ext1}{$ext2});
+  return $_suffix_rules{$ext1}{$ext2}[0];
+}
+
 =item C<register_suffix_rule ($where, $src, $dest)>
 
 Register a suffix rule defined on C<$where> that transforms
 files ending in C<$src> into files ending in C<$dest>.
 
-This upgrades the C<$suffix_rules> variables.
-
 =cut
 
 sub register_suffix_rule ($$$)
 {
   my ($where, $src, $dest) = @_;
+  my $suffix_rules = $where->{'position'} ? \%_suffix_rules
+                                          : \%_suffix_rules_builtin;
 
   verb "Sources ending in $src become $dest";
   push @_suffixes, $src, $dest;
@@ -411,8 +390,29 @@ sub register_suffix_rule ($$$)
   # output suffix rules for '.o' or '.obj' ...
   $dest = '.$(OBJEXT)' if ($dest eq '.o' || $dest eq '.obj');
 
-  # Reading the comments near the declaration of $suffix_rules might
-  # help to understand the update of $suffix_rules that follows ...
+  # ----------------------------------------------------------------------
+  # The $suffix_rules variable maps the source extension for all suffix
+  # rules seen to a hash whose keys are the possible output extensions.
+  #
+  # Note that this is transitively closed by construction:
+  # if we have
+  #
+  #       exists $suffix_rules{$ext1}{$ext2}
+  #    && exists $suffix_rules{$ext2}{$ext3}
+  #
+  # then we also have
+  #
+  #       exists $suffix_rules{$ext1}{$ext3}
+  #
+  # So it's easy to check whether '.foo' can be transformed to
+  # '.$(OBJEXT)' by checking whether $suffix_rules{'.foo'}{'.$(OBJEXT)'}
+  # exists.  This will work even if transforming '.foo' to '.$(OBJEXT)'
+  # involves a chain of several suffix rules.
+  #
+  # The value of $suffix_rules{$ext1}{$ext2} is a pair [$next_sfx, $dist]
+  # where $next_sfx is target suffix for the next rule to use to reach
+  # $ext2, and $dist the distance to $ext2.
+  # ----------------------------------------------------------------------
 
   # Register $dest as a possible destination from $src.
   # We might have the create the \hash.
@@ -464,18 +464,6 @@ sub register_suffix_rule ($$$)
     }
 }
 
-=item C<$count = suffix_rules_count>
-
-Return the number of suffix rules added while processing the current
-F<Makefile> (excluding predefined suffix rules).
-
-=cut
-
-sub suffix_rules_count ()
-{
-  return (scalar keys %$suffix_rules) - (scalar keys %$_suffix_rules_default);
-}
-
 =item C<@list = suffixes>
 
 Return the list of known suffixes.
@@ -630,7 +618,7 @@ sub _maybe_warn_about_duplicated_target ($$$$$$)
               ## from rules that only add dependencies.  E.g.,
               ##   .PHONY: foo
               ##   .PHONY: bar
-              ## is legitimate. (This is phony.test.)
+              ## is legitimate.  This is checked in the 'phony.sh' test.
 
               # msg ('syntax', $where,
               #      "redefinition of '$target'$condmsg ...", partial => 1);
@@ -733,7 +721,7 @@ sub _conditionals_for_rule ($$$$)
   # condition.  So for now we do our best *here*.  If 'foo:'
   # was already defined in condition COND1 and we want to define
   # it in condition TRUE, then define it only in condition !COND1.
-  # (See cond14.test and cond15.test for some test cases.)
+  # (See cond14.sh and cond15.sh for some test cases.)
   @conds = $rule->not_always_defined_in_cond ($cond)->conds;
 
   # No conditions left to define the rule.
index 571111c..b8a6bda 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright (C) 2003-2012 Free Software Foundation, Inc.
+# Copyright (C) 2003-2017 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 dde99ac..1948ef1 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright (C) 2003-2012 Free Software Foundation, Inc.
+# Copyright (C) 2003-2017 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 d4d230f..6febf60 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright (C) 2003-2012 Free Software Foundation, Inc.
+# Copyright (C) 2003-2017 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
@@ -317,21 +317,21 @@ use vars '%_variable_dict', '%_primary_dict';
 sub variables (;$)
 {
   my ($suffix) = @_;
+  my @vars = ();
   if ($suffix)
     {
       if (exists $_primary_dict{$suffix})
        {
-         return values %{$_primary_dict{$suffix}};
-       }
-      else
-       {
-         return ();
+         @vars = values %{$_primary_dict{$suffix}};
        }
     }
   else
     {
-      return values %_variable_dict;
+      @vars = values %_variable_dict;
     }
+  # The behaviour of the 'sort' built-in is undefined in scalar
+  # context, hence we need an ad-hoc handling for such context.
+  return wantarray ? sort { $a->name cmp $b->name } @vars : scalar @vars;
 }
 
 =item C<Automake::Variable::reset>
@@ -1080,7 +1080,7 @@ For debugging.
 sub variables_dump ()
 {
   my $text = "all variables:\n{\n";
-  foreach my $var (sort { $a->name cmp $b->name } variables)
+  foreach my $var (variables())
     {
       $text .= $var->dump;
     }
index 423375b..282af77 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright (C) 2001-2012 Free Software Foundation, Inc.
+# Copyright (C) 2001-2017 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 34b349e..908b06e 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright (C) 2003-2012 Free Software Foundation, Inc.
+# Copyright (C) 2003-2017 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 177dad9..a71fba8 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright (C) 2001-2012 Free Software Foundation, Inc.
+# Copyright (C) 2001-2017 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 6e90e07..8865734 100644 (file)
@@ -1,8 +1,8 @@
 Installation Instructions
 *************************
 
-Copyright (C) 1994-1996, 1999-2002, 2004-2012 Free Software Foundation,
-Inc.
+   Copyright (C) 1994-1996, 1999-2002, 2004-2016 Free Software
+Foundation, Inc.
 
    Copying and distribution of this file, with or without modification,
 are permitted in any medium without royalty provided the copyright
@@ -12,97 +12,96 @@ without warranty of any kind.
 Basic Installation
 ==================
 
-   Briefly, the shell commands `./configure; make; make install' should
-configure, build, and install this package.  The following
-more-detailed instructions are generic; see the `README' file for
+   Briefly, the shell command './configure && make && make install'
+should configure, build, and install this package.  The following
+more-detailed instructions are generic; see the 'README' file for
 instructions specific to this package.  Some packages provide this
-`INSTALL' file but do not implement all of the features documented
+'INSTALL' file but do not implement all of the features documented
 below.  The lack of an optional feature in a given package is not
 necessarily a bug.  More recommendations for GNU packages can be found
 in *note Makefile Conventions: (standards)Makefile Conventions.
 
-   The `configure' shell script attempts to guess correct values for
+   The 'configure' shell script attempts to guess correct values for
 various system-dependent variables used during compilation.  It uses
-those values to create a `Makefile' in each directory of the package.
-It may also create one or more `.h' files containing system-dependent
-definitions.  Finally, it creates a shell script `config.status' that
+those values to create a 'Makefile' in each directory of the package.
+It may also create one or more '.h' files containing system-dependent
+definitions.  Finally, it creates a shell script 'config.status' that
 you can run in the future to recreate the current configuration, and a
-file `config.log' containing compiler output (useful mainly for
-debugging `configure').
+file 'config.log' containing compiler output (useful mainly for
+debugging 'configure').
 
-   It can also use an optional file (typically called `config.cache'
-and enabled with `--cache-file=config.cache' or simply `-C') that saves
-the results of its tests to speed up reconfiguring.  Caching is
-disabled by default to prevent problems with accidental use of stale
-cache files.
+   It can also use an optional file (typically called 'config.cache' and
+enabled with '--cache-file=config.cache' or simply '-C') that saves the
+results of its tests to speed up reconfiguring.  Caching is disabled by
+default to prevent problems with accidental use of stale cache files.
 
    If you need to do unusual things to compile the package, please try
-to figure out how `configure' could check whether to do them, and mail
-diffs or instructions to the address given in the `README' so they can
+to figure out how 'configure' could check whether to do them, and mail
+diffs or instructions to the address given in the 'README' so they can
 be considered for the next release.  If you are using the cache, and at
-some point `config.cache' contains results you don't want to keep, you
+some point 'config.cache' contains results you don't want to keep, you
 may remove or edit it.
 
-   The file `configure.ac' (or `configure.in') is used to create
-`configure' by a program called `autoconf'.  You need `configure.ac' if
-you want to change it or regenerate `configure' using a newer version
-of `autoconf'.
+   The file 'configure.ac' (or 'configure.in') is used to create
+'configure' by a program called 'autoconf'.  You need 'configure.ac' if
+you want to change it or regenerate 'configure' using a newer version of
+'autoconf'.
 
    The simplest way to compile this package is:
 
-  1. `cd' to the directory containing the package's source code and type
-     `./configure' to configure the package for your system.
+  1. 'cd' to the directory containing the package's source code and type
+     './configure' to configure the package for your system.
 
-     Running `configure' might take a while.  While running, it prints
+     Running 'configure' might take a while.  While running, it prints
      some messages telling which features it is checking for.
 
-  2. Type `make' to compile the package.
+  2. Type 'make' to compile the package.
 
-  3. Optionally, type `make check' to run any self-tests that come with
+  3. Optionally, type 'make check' to run any self-tests that come with
      the package, generally using the just-built uninstalled binaries.
 
-  4. Type `make install' to install the programs and any data files and
+  4. Type 'make install' to install the programs and any data files and
      documentation.  When installing into a prefix owned by root, it is
      recommended that the package be configured and built as a regular
-     user, and only the `make install' phase executed with root
+     user, and only the 'make install' phase executed with root
      privileges.
 
-  5. Optionally, type `make installcheck' to repeat any self-tests, but
+  5. Optionally, type 'make installcheck' to repeat any self-tests, but
      this time using the binaries in their final installed location.
      This target does not install anything.  Running this target as a
-     regular user, particularly if the prior `make install' required
+     regular user, particularly if the prior 'make install' required
      root privileges, verifies that the installation completed
      correctly.
 
   6. You can remove the program binaries and object files from the
-     source code directory by typing `make clean'.  To also remove the
-     files that `configure' created (so you can compile the package for
-     a different kind of computer), type `make distclean'.  There is
-     also a `make maintainer-clean' target, but that is intended mainly
+     source code directory by typing 'make clean'.  To also remove the
+     files that 'configure' created (so you can compile the package for
+     a different kind of computer), type 'make distclean'.  There is
+     also a 'make maintainer-clean' target, but that is intended mainly
      for the package's developers.  If you use it, you may have to get
      all sorts of other programs in order to regenerate files that came
      with the distribution.
 
-  7. Often, you can also type `make uninstall' to remove the installed
+  7. Often, you can also type 'make uninstall' to remove the installed
      files again.  In practice, not all packages have tested that
      uninstallation works correctly, even though it is required by the
      GNU Coding Standards.
 
-  8. Some packages, particularly those that use Automake, provide `make
+  8. Some packages, particularly those that use Automake, provide 'make
      distcheck', which can by used by developers to test that all other
-     targets like `make install' and `make uninstall' work correctly.
+     targets like 'make install' and 'make uninstall' work correctly.
      This target is generally not run by end users.
 
 Compilers and Options
 =====================
 
    Some systems require unusual options for compilation or linking that
-the `configure' script does not know about.  Run `./configure --help'
+the 'configure' script does not know about.  Run './configure --help'
 for details on some of the pertinent environment variables.
 
-   You can give `configure' initial values for configuration parameters
-by setting variables in the command line or in the environment.  Here
-is an example:
+   You can give 'configure' initial values for configuration parameters
+by setting variables in the command line or in the environment.  Here is
+an example:
 
      ./configure CC=c99 CFLAGS=-g LIBS=-lposix
 
@@ -113,21 +112,21 @@ Compiling For Multiple Architectures
 
    You can compile the package for more than one kind of computer at the
 same time, by placing the object files for each architecture in their
-own directory.  To do this, you can use GNU `make'.  `cd' to the
+own directory.  To do this, you can use GNU 'make'.  'cd' to the
 directory where you want the object files and executables to go and run
-the `configure' script.  `configure' automatically checks for the
-source code in the directory that `configure' is in and in `..'.  This
-is known as a "VPATH" build.
+the 'configure' script.  'configure' automatically checks for the source
+code in the directory that 'configure' is in and in '..'.  This is known
+as a "VPATH" build.
 
-   With a non-GNU `make', it is safer to compile the package for one
+   With a non-GNU 'make', it is safer to compile the package for one
 architecture at a time in the source code directory.  After you have
-installed the package for one architecture, use `make distclean' before
+installed the package for one architecture, use 'make distclean' before
 reconfiguring for another architecture.
 
    On MacOS X 10.5 and later systems, you can create libraries and
 executables that work on multiple system types--known as "fat" or
-"universal" binaries--by specifying multiple `-arch' options to the
-compiler but only a single `-arch' option to the preprocessor.  Like
+"universal" binaries--by specifying multiple '-arch' options to the
+compiler but only a single '-arch' option to the preprocessor.  Like
 this:
 
      ./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
@@ -136,105 +135,104 @@ this:
 
    This is not guaranteed to produce working output in all cases, you
 may have to build one architecture at a time and combine the results
-using the `lipo' tool if you have problems.
+using the 'lipo' tool if you have problems.
 
 Installation Names
 ==================
 
-   By default, `make install' installs the package's commands under
-`/usr/local/bin', include files under `/usr/local/include', etc.  You
-can specify an installation prefix other than `/usr/local' by giving
-`configure' the option `--prefix=PREFIX', where PREFIX must be an
+   By default, 'make install' installs the package's commands under
+'/usr/local/bin', include files under '/usr/local/include', etc.  You
+can specify an installation prefix other than '/usr/local' by giving
+'configure' the option '--prefix=PREFIX', where PREFIX must be an
 absolute file name.
 
    You can specify separate installation prefixes for
 architecture-specific files and architecture-independent files.  If you
-pass the option `--exec-prefix=PREFIX' to `configure', the package uses
+pass the option '--exec-prefix=PREFIX' to 'configure', the package uses
 PREFIX as the prefix for installing programs and libraries.
 Documentation and other data files still use the regular prefix.
 
    In addition, if you use an unusual directory layout you can give
-options like `--bindir=DIR' to specify different values for particular
-kinds of files.  Run `configure --help' for a list of the directories
-you can set and what kinds of files go in them.  In general, the
-default for these options is expressed in terms of `${prefix}', so that
-specifying just `--prefix' will affect all of the other directory
+options like '--bindir=DIR' to specify different values for particular
+kinds of files.  Run 'configure --help' for a list of the directories
+you can set and what kinds of files go in them.  In general, the default
+for these options is expressed in terms of '${prefix}', so that
+specifying just '--prefix' will affect all of the other directory
 specifications that were not explicitly provided.
 
    The most portable way to affect installation locations is to pass the
-correct locations to `configure'; however, many packages provide one or
+correct locations to 'configure'; however, many packages provide one or
 both of the following shortcuts of passing variable assignments to the
-`make install' command line to change installation locations without
+'make install' command line to change installation locations without
 having to reconfigure or recompile.
 
    The first method involves providing an override variable for each
-affected directory.  For example, `make install
+affected directory.  For example, 'make install
 prefix=/alternate/directory' will choose an alternate location for all
 directory configuration variables that were expressed in terms of
-`${prefix}'.  Any directories that were specified during `configure',
-but not in terms of `${prefix}', must each be overridden at install
-time for the entire installation to be relocated.  The approach of
-makefile variable overrides for each directory variable is required by
-the GNU Coding Standards, and ideally causes no recompilation.
-However, some platforms have known limitations with the semantics of
-shared libraries that end up requiring recompilation when using this
-method, particularly noticeable in packages that use GNU Libtool.
-
-   The second method involves providing the `DESTDIR' variable.  For
-example, `make install DESTDIR=/alternate/directory' will prepend
-`/alternate/directory' before all installation names.  The approach of
-`DESTDIR' overrides is not required by the GNU Coding Standards, and
+'${prefix}'.  Any directories that were specified during 'configure',
+but not in terms of '${prefix}', must each be overridden at install time
+for the entire installation to be relocated.  The approach of makefile
+variable overrides for each directory variable is required by the GNU
+Coding Standards, and ideally causes no recompilation.  However, some
+platforms have known limitations with the semantics of shared libraries
+that end up requiring recompilation when using this method, particularly
+noticeable in packages that use GNU Libtool.
+
+   The second method involves providing the 'DESTDIR' variable.  For
+example, 'make install DESTDIR=/alternate/directory' will prepend
+'/alternate/directory' before all installation names.  The approach of
+'DESTDIR' overrides is not required by the GNU Coding Standards, and
 does not work on platforms that have drive letters.  On the other hand,
 it does better at avoiding recompilation issues, and works well even
-when some directory options were not specified in terms of `${prefix}'
-at `configure' time.
+when some directory options were not specified in terms of '${prefix}'
+at 'configure' time.
 
 Optional Features
 =================
 
    If the package supports it, you can cause programs to be installed
-with an extra prefix or suffix on their names by giving `configure' the
-option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
-
-   Some packages pay attention to `--enable-FEATURE' options to
-`configure', where FEATURE indicates an optional part of the package.
-They may also pay attention to `--with-PACKAGE' options, where PACKAGE
-is something like `gnu-as' or `x' (for the X Window System).  The
-`README' should mention any `--enable-' and `--with-' options that the
+with an extra prefix or suffix on their names by giving 'configure' the
+option '--program-prefix=PREFIX' or '--program-suffix=SUFFIX'.
+
+   Some packages pay attention to '--enable-FEATURE' options to
+'configure', where FEATURE indicates an optional part of the package.
+They may also pay attention to '--with-PACKAGE' options, where PACKAGE
+is something like 'gnu-as' or 'x' (for the X Window System).  The
+'README' should mention any '--enable-' and '--with-' options that the
 package recognizes.
 
-   For packages that use the X Window System, `configure' can usually
+   For packages that use the X Window System, 'configure' can usually
 find the X include and library files automatically, but if it doesn't,
-you can use the `configure' options `--x-includes=DIR' and
-`--x-libraries=DIR' to specify their locations.
+you can use the 'configure' options '--x-includes=DIR' and
+'--x-libraries=DIR' to specify their locations.
 
    Some packages offer the ability to configure how verbose the
-execution of `make' will be.  For these packages, running `./configure
+execution of 'make' will be.  For these packages, running './configure
 --enable-silent-rules' sets the default to minimal output, which can be
-overridden with `make V=1'; while running `./configure
+overridden with 'make V=1'; while running './configure
 --disable-silent-rules' sets the default to verbose, which can be
-overridden with `make V=0'.
+overridden with 'make V=0'.
 
 Particular systems
 ==================
 
-   On HP-UX, the default C compiler is not ANSI C compatible.  If GNU
-CC is not installed, it is recommended to use the following options in
+   On HP-UX, the default C compiler is not ANSI C compatible.  If GNU CC
+is not installed, it is recommended to use the following options in
 order to use an ANSI C compiler:
 
      ./configure CC="cc -Ae -D_XOPEN_SOURCE=500"
 
 and if that doesn't work, install pre-built binaries of GCC for HP-UX.
 
-   HP-UX `make' updates targets which have the same time stamps as
-their prerequisites, which makes it generally unusable when shipped
-generated files such as `configure' are involved.  Use GNU `make'
-instead.
+   HP-UX 'make' updates targets which have the same time stamps as their
+prerequisites, which makes it generally unusable when shipped generated
+files such as 'configure' are involved.  Use GNU 'make' instead.
 
    On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot
-parse its `<wchar.h>' header file.  The option `-nodtk' can be used as
-a workaround.  If GNU CC is not installed, it is therefore recommended
-to try
+parse its '<wchar.h>' header file.  The option '-nodtk' can be used as a
+workaround.  If GNU CC is not installed, it is therefore recommended to
+try
 
      ./configure CC="cc"
 
@@ -242,26 +240,26 @@ and if that doesn't work, try
 
      ./configure CC="cc -nodtk"
 
-   On Solaris, don't put `/usr/ucb' early in your `PATH'.  This
+   On Solaris, don't put '/usr/ucb' early in your 'PATH'.  This
 directory contains several dysfunctional programs; working variants of
-these programs are available in `/usr/bin'.  So, if you need `/usr/ucb'
-in your `PATH', put it _after_ `/usr/bin'.
+these programs are available in '/usr/bin'.  So, if you need '/usr/ucb'
+in your 'PATH', put it _after_ '/usr/bin'.
 
-   On Haiku, software installed for all users goes in `/boot/common',
-not `/usr/local'.  It is recommended to use the following options:
+   On Haiku, software installed for all users goes in '/boot/common',
+not '/usr/local'.  It is recommended to use the following options:
 
      ./configure --prefix=/boot/common
 
 Specifying the System Type
 ==========================
 
-   There may be some features `configure' cannot figure out
+   There may be some features 'configure' cannot figure out
 automatically, but needs to determine by the type of machine the package
 will run on.  Usually, assuming the package is built to be run on the
-_same_ architectures, `configure' can figure that out, but if it prints
+_same_ architectures, 'configure' can figure that out, but if it prints
 a message saying it cannot guess the machine type, give it the
-`--build=TYPE' option.  TYPE can either be a short name for the system
-type, such as `sun4', or a canonical name which has the form:
+'--build=TYPE' option.  TYPE can either be a short name for the system
+type, such as 'sun4', or a canonical name which has the form:
 
      CPU-COMPANY-SYSTEM
 
@@ -270,101 +268,101 @@ where SYSTEM can have one of these forms:
      OS
      KERNEL-OS
 
-   See the file `config.sub' for the possible values of each field.  If
-`config.sub' isn't included in this package, then this package doesn't
+   See the file 'config.sub' for the possible values of each field.  If
+'config.sub' isn't included in this package, then this package doesn't
 need to know the machine type.
 
    If you are _building_ compiler tools for cross-compiling, you should
-use the option `--target=TYPE' to select the type of system they will
+use the option '--target=TYPE' to select the type of system they will
 produce code for.
 
    If you want to _use_ a cross compiler, that generates code for a
 platform different from the build platform, you should specify the
 "host" platform (i.e., that on which the generated programs will
-eventually be run) with `--host=TYPE'.
+eventually be run) with '--host=TYPE'.
 
 Sharing Defaults
 ================
 
-   If you want to set default values for `configure' scripts to share,
-you can create a site shell script called `config.site' that gives
-default values for variables like `CC', `cache_file', and `prefix'.
-`configure' looks for `PREFIX/share/config.site' if it exists, then
-`PREFIX/etc/config.site' if it exists.  Or, you can set the
-`CONFIG_SITE' environment variable to the location of the site script.
-A warning: not all `configure' scripts look for a site script.
+   If you want to set default values for 'configure' scripts to share,
+you can create a site shell script called 'config.site' that gives
+default values for variables like 'CC', 'cache_file', and 'prefix'.
+'configure' looks for 'PREFIX/share/config.site' if it exists, then
+'PREFIX/etc/config.site' if it exists.  Or, you can set the
+'CONFIG_SITE' environment variable to the location of the site script.
+A warning: not all 'configure' scripts look for a site script.
 
 Defining Variables
 ==================
 
    Variables not defined in a site shell script can be set in the
-environment passed to `configure'.  However, some packages may run
+environment passed to 'configure'.  However, some packages may run
 configure again during the build, and the customized values of these
 variables may be lost.  In order to avoid this problem, you should set
-them in the `configure' command line, using `VAR=value'.  For example:
+them in the 'configure' command line, using 'VAR=value'.  For example:
 
      ./configure CC=/usr/local2/bin/gcc
 
-causes the specified `gcc' to be used as the C compiler (unless it is
+causes the specified 'gcc' to be used as the C compiler (unless it is
 overridden in the site shell script).
 
-Unfortunately, this technique does not work for `CONFIG_SHELL' due to
-an Autoconf limitation.  Until the limitation is lifted, you can use
-this workaround:
+Unfortunately, this technique does not work for 'CONFIG_SHELL' due to an
+Autoconf limitation.  Until the limitation is lifted, you can use this
+workaround:
 
      CONFIG_SHELL=/bin/bash ./configure CONFIG_SHELL=/bin/bash
 
-`configure' Invocation
+'configure' Invocation
 ======================
 
-   `configure' recognizes the following options to control how it
+   'configure' recognizes the following options to control how it
 operates.
 
-`--help'
-`-h'
-     Print a summary of all of the options to `configure', and exit.
+'--help'
+'-h'
+     Print a summary of all of the options to 'configure', and exit.
 
-`--help=short'
-`--help=recursive'
+'--help=short'
+'--help=recursive'
      Print a summary of the options unique to this package's
-     `configure', and exit.  The `short' variant lists options used
-     only in the top level, while the `recursive' variant lists options
-     also present in any nested packages.
+     'configure', and exit.  The 'short' variant lists options used only
+     in the top level, while the 'recursive' variant lists options also
+     present in any nested packages.
 
-`--version'
-`-V'
-     Print the version of Autoconf used to generate the `configure'
+'--version'
+'-V'
+     Print the version of Autoconf used to generate the 'configure'
      script, and exit.
 
-`--cache-file=FILE'
+'--cache-file=FILE'
      Enable the cache: use and save the results of the tests in FILE,
-     traditionally `config.cache'.  FILE defaults to `/dev/null' to
+     traditionally 'config.cache'.  FILE defaults to '/dev/null' to
      disable caching.
 
-`--config-cache'
-`-C'
-     Alias for `--cache-file=config.cache'.
+'--config-cache'
+'-C'
+     Alias for '--cache-file=config.cache'.
 
-`--quiet'
-`--silent'
-`-q'
+'--quiet'
+'--silent'
+'-q'
      Do not print messages saying which checks are being made.  To
-     suppress all normal output, redirect it to `/dev/null' (any error
+     suppress all normal output, redirect it to '/dev/null' (any error
      messages will still be shown).
 
-`--srcdir=DIR'
+'--srcdir=DIR'
      Look for the package's source code in directory DIR.  Usually
-     `configure' can determine that directory automatically.
+     'configure' can determine that directory automatically.
 
-`--prefix=DIR'
-     Use DIR as the installation prefix.  *note Installation Names::
-     for more details, including other options available for fine-tuning
-     the installation locations.
+'--prefix=DIR'
+     Use DIR as the installation prefix.  *note Installation Names:: for
+     more details, including other options available for fine-tuning the
+     installation locations.
 
-`--no-create'
-`-n'
+'--no-create'
+'-n'
      Run the configure checks, but stop before creating any output
      files.
 
-`configure' also accepts some other, not widely useful, options.  Run
-`configure --help' for more details.
+'configure' also accepts some other, not widely useful, options.  Run
+'configure --help' for more details.
diff --git a/lib/Makefile.inc b/lib/Makefile.inc
new file mode 100644 (file)
index 0000000..50035de
--- /dev/null
@@ -0,0 +1,67 @@
+## Included by top-level Makefile for Automake.
+
+## Copyright (C) 1995-2017 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/>.
+
+## -------------------------------------------------------------------- ##
+##  Auxiliary scripts and files for use with "automake --add-missing".  ##
+## -------------------------------------------------------------------- ##
+
+dist_pkgvdata_DATA = \
+  %D%/COPYING \
+  %D%/INSTALL \
+  %D%/texinfo.tex
+
+# These must all be executable when installed.  However, if we use
+# _SCRIPTS, then the program transform will be applied, which is not
+# what we want.  So we make them executable by hand.
+dist_script_DATA = \
+  %D%/config.guess \
+  %D%/config.sub \
+  %D%/install-sh \
+  %D%/mdate-sh \
+  %D%/missing \
+  %D%/mkinstalldirs \
+  %D%/ylwrap \
+  %D%/depcomp \
+  %D%/compile \
+  %D%/py-compile \
+  %D%/ar-lib \
+  %D%/test-driver \
+  %D%/tap-driver.sh
+
+install-data-hook:
+       @$(POST_INSTALL)
+       @for f in $(dist_script_DATA); do echo $$f; done \
+         | sed 's,^%D%/,,' \
+         | ( st=0; \
+             while read f; do \
+               echo " chmod +x '$(DESTDIR)$(scriptdir)/$$f'"; \
+               chmod +x "$(DESTDIR)$(scriptdir)/$$f" || st=1; \
+             done; \
+             exit $$st )
+
+installcheck-local: installcheck-executable-scripts
+installcheck-executable-scripts:
+       @for f in $(dist_script_DATA); do echo $$f; done \
+         | sed 's,^%D%/,,' \
+         | while read f; do \
+             path="$(pkgvdatadir)/$$f"; \
+             test -x "$$path" || echo $$path; \
+           done \
+         | sed 's/$$/: not executable/' \
+         | grep . 1>&2 && exit 1; exit 0
+
+# vim: ft=automake noet
diff --git a/lib/am/Makefile.inc b/lib/am/Makefile.inc
new file mode 100644 (file)
index 0000000..270bb73
--- /dev/null
@@ -0,0 +1,65 @@
+## Included by top-level Makefile for Automake.
+
+## Copyright (C) 1995-2017 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/>.
+
+## --------------------- ##
+##  Makefile fragments.  ##
+## --------------------- ##
+
+amdir = @amdir@
+
+dist_am_DATA = \
+  %D%/check.am \
+  %D%/check2.am \
+  %D%/clean-hdr.am \
+  %D%/clean.am \
+  %D%/compile.am \
+  %D%/configure.am \
+  %D%/data.am \
+  %D%/dejagnu.am \
+  %D%/depend.am \
+  %D%/depend2.am \
+  %D%/distdir.am \
+  %D%/footer.am \
+  %D%/header-vars.am \
+  %D%/header.am \
+  %D%/install.am \
+  %D%/inst-vars.am \
+  %D%/java.am \
+  %D%/lang-compile.am \
+  %D%/lex.am \
+  %D%/library.am \
+  %D%/libs.am \
+  %D%/libtool.am \
+  %D%/lisp.am \
+  %D%/ltlib.am \
+  %D%/ltlibrary.am \
+  %D%/mans-vars.am \
+  %D%/mans.am \
+  %D%/program.am \
+  %D%/progs.am \
+  %D%/python.am \
+  %D%/remake-hdr.am \
+  %D%/scripts.am \
+  %D%/subdirs.am \
+  %D%/tags.am \
+  %D%/texi-vers.am \
+  %D%/texibuild.am \
+  %D%/texinfos.am \
+  %D%/vala.am \
+  %D%/yacc.am
+
+# vim: ft=automake noet
index 9cda82a..741a5c0 100644 (file)
@@ -1,5 +1,5 @@
 ## automake - create Makefile.in from Makefile.am
-## Copyright (C) 2001-2012 Free Software Foundation, Inc.
+## Copyright (C) 2001-2017 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
@@ -17,7 +17,7 @@
 am__tty_colors_dummy = \
   mgn= red= grn= lgn= blu= brg= std=; \
   am__color_tests=no
-if %?COLOR%
+
 am__tty_colors = { \
   $(am__tty_colors_dummy); \
   if test "X$(AM_COLOR_TESTS)" = Xno; then \
@@ -40,13 +40,10 @@ am__tty_colors = { \
     std='\e[m'; \
   fi; \
 }
-else !%?COLOR%
-am__tty_colors = $(am__tty_colors_dummy)
-endif !%?COLOR%
 
 .PHONY: check-TESTS
 
-if %?PARALLEL_TESTS%
+if !%?SERIAL_TESTS%
 
 include inst-vars.am
 
@@ -56,7 +53,7 @@ include inst-vars.am
 ## originally written at EPITA/LRDE, further developed at Gostai, then made
 ## its way from GNU coreutils to end up, largely rewritten, in Automake.
 ## The current version is an heavy rewrite of that, to allow for support
-## of more test metadata, and the use of custom test derivers and protocols
+## of more test metadata, and the use of custom test drivers and protocols
 ## (among them, TAP).
 
 am__recheck_rx = ^[    ]*:recheck:[    ]*
@@ -221,7 +218,7 @@ $(AM_TESTS_ENVIRONMENT) $(TESTS_ENVIRONMENT)
 # '$bases'.  This honors runtime overriding of TESTS and TEST_LOGS.  Sadly,
 # we cannot use something simpler, involving e.g., "$(TEST_LOGS:.log=)",
 # since that might cause problem with VPATH rewrites for suffix-less tests.
-# See also 'test-harness-vpath-rewrite.test' and 'test-trs-basic.test'.
+# See also 'test-harness-vpath-rewrite.sh' and 'test-trs-basic.sh'.
 am__set_TESTS_bases = \
   bases='$(TEST_LOGS)'; \
   bases=`for i in $$bases; do echo $$i; done | sed 's/\.log$$//'`; \
@@ -240,6 +237,12 @@ am__set_TESTS_bases = \
        rm -f $< $@
        $(MAKE) $(AM_MAKEFLAGS) $<
 
+# Leading 'am--fnord' is there to ensure the list of targets does not
+# expand to empty, as could happen e.g. with make check TESTS=''.
+am--fnord $(TEST_LOGS) $(TEST_LOGS:.log=.trs): $(am__force_recheck)
+am--force-recheck:
+       @:
+
 $(TEST_SUITE_LOG): $(TEST_LOGS)
        @$(am__set_TESTS_bases); \
 ## Helper shell function, tells whether a path refers to an existing,
@@ -271,7 +274,9 @@ $(TEST_SUITE_LOG): $(TEST_LOGS)
        if test -n "$$am__remaking_logs"; then \
          echo "fatal: making $(TEST_SUITE_LOG): possible infinite" \
               "recursion detected" >&2; \
-       else \
+## Invoking this unconditionally could cause a useless "make all" to
+## be invoked when '$redo_logs' expands to empty (automake bug#16302).
+       elif test -n "$$redo_logs"; then \
          am__remaking_logs=yes $(MAKE) $(AM_MAKEFLAGS) $$redo_logs; \
        fi; \
        if $(am__make_dryrun); then :; else \
@@ -396,21 +401,10 @@ RECHECK_LOGS = $(TEST_LOGS)
 ## Running all tests, or rechecking failures. ##
 ## ------------------------------------------ ##
 
-check-TESTS recheck:
-## If we are running "make recheck", it's not the user which can decide
-## which tests to consider for re-execution, so we must ignore the value
-## of $(RECHECK_LOGS).
-## Here and below, we expand $(RECHECK_LOGS) only once, to avoid exceeding
-## line length limits.
-       @if test $@ != recheck; then \
-          list='$(RECHECK_LOGS)'; \
-          test -z "$$list" || rm -f $$list; \
-        fi
-       @if test $@ != recheck; then \
-          list='$(RECHECK_LOGS:.log=.trs)'; \
-          test -z "$$list" || rm -f $$list; \
-        fi
-## We always have to remove TEST_SUITE_LOG, to ensure its rule is run
+check-TESTS:
+       @list='$(RECHECK_LOGS)';           test -z "$$list" || rm -f $$list
+       @list='$(RECHECK_LOGS:.log=.trs)'; test -z "$$list" || rm -f $$list
+## We always have to remove $(TEST_SUITE_LOG), to ensure its rule is run
 ## in any case even in lazy mode: otherwise, if no test needs rerunning,
 ## or a prior run plus reruns all happen within the same timestamp (can
 ## happen with a prior "make TESTS=<subset>"), then we get no log output.
@@ -418,41 +412,59 @@ check-TESTS recheck:
 ## cannot use '$?' to compute the set of lazily rerun tests, lest
 ## we rely on .PHONY to work portably.
        @test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG)
-       @$(am__set_TESTS_bases); \
-       if test $@ = recheck; then \
-## If running a "make recheck", we must only consider tests that had an
-## unexpected outcome (FAIL or XPASS) in the earlier run.
-         bases=`for i in $$bases; do echo $$i; done \
-                  | $(am__list_recheck_tests)` || exit 1; \
-       fi; \
+       @set +e; $(am__set_TESTS_bases); \
        log_list=`for i in $$bases; do echo $$i.log; done`; \
        trs_list=`for i in $$bases; do echo $$i.trs; done`; \
-## Remove newlines and normalize whitespace, being careful to avoid extra
-## whitespace in the definition of $log_list, since its value will be
-## passed to the recursive make invocation below through the TEST_LOGS
-## macro, and leading/trailing white space in a make macro definition can
-## be problematic.  In this particular case, trailing white space is known
-## to have caused segmentation faults on Solaris 10 XPG4 make:
+## Remove newlines and normalize whitespace.  Trailing (and possibly
+## leading) whitespace is known to cause segmentation faults on
+## Solaris 10 XPG4 make.
        log_list=`echo $$log_list`; trs_list=`echo $$trs_list`; \
-## Under "make recheck", remove the .log and .trs files associated
-## with the files to recheck, so that those will be rerun by the
-## "make test-suite.log" recursive invocation below.  But use a proper
-## hack to avoid extra files removal when running under "make -n".
-       if test $@ != recheck || $(am__make_dryrun); then :; else \
-         test -z "$$log_list" || rm -f $$log_list; \
-         test -z "$$trs_list" || rm -f $$trs_list; \
-       fi; \
-       $(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_LOG) TEST_LOGS="$$log_list"
+       $(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_LOG) TEST_LOGS="$$log_list"; \
+## Be sure to exit with the proper exit status (automake bug#9245).  See
+## comments in the recipe of $(TEST_SUITE_LOG) above for more information.
+       exit $$?;
 
 ## Recheck must depend on $(check_SCRIPTS), $(check_PROGRAMS), etc.
 ## It must also depend on the 'all' target.  See automake bug#11252.
 recheck: all %CHECK_DEPS%
+## See comments above in the check-TESTS recipe for why remove
+## $(TEST_SUITE_LOG) here.
+       @test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG)
+       @set +e; $(am__set_TESTS_bases); \
+## We must only consider tests that had an unexpected outcome (FAIL
+## or XPASS) in the earlier run.
+       bases=`for i in $$bases; do echo $$i; done \
+                | $(am__list_recheck_tests)` || exit 1; \
+       log_list=`for i in $$bases; do echo $$i.log; done`; \
+## Remove newlines and normalize whitespace.  Trailing (and possibly
+## leading) whitespace is known to cause segmentation faults on
+## Solaris 10 XPG4 make.
+       log_list=`echo $$log_list`; \
+## Move the '.log' and '.trs' files associated with the tests to be
+## re-run out of the way, so that those tests will be re-run by the
+## "make test-suite.log" recursive invocation below.
+## Two tricky requirements:
+##   - we must avoid extra files removal when running under "make -n";
+##   - in case the test is a compiled program whose compilation fails,
+##     we must ensure that any '.log' and '.trs' file referring to such
+##     test are preserved, so that future "make recheck" invocations
+##     will still try to re-compile and re-run it (automake bug#11791).
+## The tricky recursive make invocation below should cater to such
+## requirements.
+       $(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_LOG) \
+               am__force_recheck=am--force-recheck \
+               TEST_LOGS="$$log_list"; \
+## Be sure to exit with the proper exit status (automake bug#9245).  See
+## comments in the recipe of $(TEST_SUITE_LOG) above for more information.
+       exit $$?
 
 AM_RECURSIVE_TARGETS += check recheck
 
 .PHONY: recheck
 
-else !%?PARALLEL_TESTS%
+else %?SERIAL_TESTS%
+
+## Obsolescent serial testsuite driver.
 
 check-TESTS: $(TESTS)
        @failed=0; all=0; xfail=0; xpass=0; skip=0; \
@@ -558,4 +570,4 @@ check-TESTS: $(TESTS)
          test "$$failed" -eq 0; \
        else :; fi
 
-endif !%?PARALLEL_TESTS%
+endif %?SERIAL_TESTS%
index 9847a44..1a1c34f 100644 (file)
@@ -1,5 +1,5 @@
 ## automake - create Makefile.in from Makefile.am
-## Copyright (C) 2008-2012 Free Software Foundation, Inc.
+## Copyright (C) 2008-2017 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 3f377c8..9a12b69 100644 (file)
@@ -1,5 +1,5 @@
 ## automake - create Makefile.in from Makefile.am
-## Copyright (C) 1994-2012 Free Software Foundation, Inc.
+## Copyright (C) 1994-2017 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 da46435..59d9544 100644 (file)
@@ -1,5 +1,5 @@
 ## automake - create Makefile.in from Makefile.am
-## Copyright (C) 1994-2012 Free Software Foundation, Inc.
+## Copyright (C) 1994-2017 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 7b37da2..c45b04f 100644 (file)
@@ -1,5 +1,5 @@
 ## automake - create Makefile.in from Makefile.am
-## Copyright (C) 1994-2012 Free Software Foundation, Inc.
+## Copyright (C) 1994-2017 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 20534c7..76ecbff 100644 (file)
@@ -1,5 +1,5 @@
 ## automake - create Makefile.in from Makefile.am
-## Copyright (C) 2001-2012 Free Software Foundation, Inc.
+## Copyright (C) 2001-2017 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
@@ -83,7 +83,11 @@ endif %?TOPDIR_P%
        esac;
 
 ## Avoid the "deleted header file" problem for the dependencies.
-?HAVE-MAKEFILE-IN-DEPS?%MAKEFILE-IN-DEPS%:
+##  Add the trailing "$(am__empty)" to trick Automake into not spuriously
+## complaining about "duplicated targets" in case the %MAKEFILE-IN-DEPS%
+## list expands to a single target that is also declared in some
+## user-defined rule.
+?HAVE-MAKEFILE-IN-DEPS?%MAKEFILE-IN-DEPS% $(am__empty):
 
 DIST_COMMON += %MAKEFILE-AM%
 
@@ -113,13 +117,13 @@ $(top_srcdir)/configure: %MAINTAINER-MODE% $(am__configure_deps)
 ## aclocal.m4.  ##
 ## ------------ ##
 
-## aclocal.m4 must be built by the top-level Makefile, because this is
-## where the user is expected to define $(ACLOCAL_AMFLAGS).
-##
 ## Whenever a configure dependency changes we need to rebuild
 ## aclocal.m4 too.  Changing configure.ac, or any file included by
 ## aclocal.m4 might require adding more files to aclocal.m4.  Hence
 ## the $(am__configure_deps) dependency.
+## We still need $(ACLOCAL_AMFLAGS) for sake of backward-compatibility;
+## we should hopefully be able to get rid of it in a not-so-distant
+## future.
 if %?REGEN-ACLOCAL-M4%
 $(ACLOCAL_M4): %MAINTAINER-MODE% $(am__aclocal_m4_deps)
 ?TOPDIR_P?     $(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
index b8b6588..6facf0a 100644 (file)
@@ -1,5 +1,5 @@
 ## automake - create Makefile.in from Makefile.am
-## Copyright (C) 1994-2012 Free Software Foundation, Inc.
+## Copyright (C) 1994-2017 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
@@ -24,7 +24,8 @@ endif %?INSTALL%
 
 if %?INSTALL%
 am__installdirs += "$(DESTDIR)$(%NDIR%dir)"
-.PHONY install-%EXEC?exec:data%-am: install-%DIR%%PRIMARY%
+?EXEC?.PHONY install-exec-am: install-%DIR%%PRIMARY%
+?!EXEC?.PHONY install-data-am: install-%DIR%%PRIMARY%
 install-%DIR%%PRIMARY%: $(%DIR%_%PRIMARY%)
        @$(NORMAL_INSTALL)
 if %?BASE%
index f1ee471..75ec97d 100644 (file)
@@ -1,5 +1,5 @@
 ## automake - create Makefile.in from Makefile.am
-## Copyright (C) 1994-2012 Free Software Foundation, Inc.
+## Copyright (C) 1994-2017 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
@@ -20,24 +20,8 @@ DEJATOOL = $(PACKAGE)
 ## Default flags to pass to dejagnu.  The user can override this.
 RUNTESTDEFAULTFLAGS = --tool $$tool --srcdir $$srcdir
 
-## In Cygnus mode, these are found in the build tree.
-## Otherwise they are looked for in $PATH.
-if %?CYGNUS%
-EXPECT = `if test -f $(top_builddir)/../expect/expect; then \
-           echo $(top_builddir)/../expect/expect; \
-         else \
-           echo expect; \
-         fi`
-
-RUNTEST = `if test -f $(top_srcdir)/../dejagnu/runtest; then \
-            echo $(top_srcdir)/../dejagnu/runtest; \
-          else \
-            echo runtest; \
-          fi`
-else ! %?CYGNUS%
 EXPECT = expect
 RUNTEST = runtest
-endif ! %?CYGNUS%
 
 
 .PHONY: check-DEJAGNU
@@ -45,21 +29,14 @@ check-DEJAGNU: site.exp
 ## Life is easiest with an absolute srcdir, so do that.
        srcdir='$(srcdir)'; export srcdir; \
        EXPECT=$(EXPECT); export EXPECT; \
-## Allow this to work when expect and DejaGnu are in tree.
-## Only required when --cygnus in force.
-?CYGNUS?       if [ -f $(top_builddir)/../expect/expect ]; then \
-?CYGNUS?         TCL_LIBRARY=`$(am__cd) $(top_srcdir)/../tcl/library && pwd`; \
-?CYGNUS?         export TCL_LIBRARY; \
-?CYGNUS?       fi; \
-       runtest=$(RUNTEST); \
 ## If runtest can't be found, print a warning but don't die.  It is
 ## pointless to cause a failure if the tests cannot be run at all.
-       if $(SHELL) -c "$$runtest --version" > /dev/null 2>&1; then \
+       if $(SHELL) -c "$(RUNTEST) --version" > /dev/null 2>&1; then \
          exit_status=0; l='$(DEJATOOL)'; for tool in $$l; do \
-           if $$runtest $(AM_RUNTESTFLAGS) $(RUNTESTDEFAULTFLAGS) $(RUNTESTFLAGS); \
+           if $(RUNTEST) $(AM_RUNTESTFLAGS) $(RUNTESTDEFAULTFLAGS) $(RUNTESTFLAGS); \
            then :; else exit_status=1; fi; \
          done; \
-       else echo "WARNING: could not find 'runtest'" 1>&2; :;\
+       else echo "WARNING: could not find '$(RUNTEST)'" 1>&2; :;\
        fi; \
        exit $$exit_status
 
index 643c6ab..e9875f0 100644 (file)
@@ -1,5 +1,5 @@
 ## automake - create Makefile.in from Makefile.am
-## Copyright (C) 1994-2012 Free Software Foundation, Inc.
+## Copyright (C) 1994-2017 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 845472f..e7a90bf 100644 (file)
@@ -1,5 +1,5 @@
 ## automake - create Makefile.in from Makefile.am
-## Copyright (C) 1994-2012 Free Software Foundation, Inc.
+## Copyright (C) 1994-2017 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 "if AMDEP" chunk is prefix with @AMDEP_TRUE@ just like for any
 ##   other configure-time conditional.
 ##
-## We do likewise for %FASTDEP%; this expands to an ordinary
-## configure-time conditional.  %FASTDEP% is used to speed up the
-## common case of building a package with gcc 3.x.  In this case we
-## can skip the use of depcomp and easily inline the dependency
-## tracking.
-
-## Verbosity of FASTDEP rules
-## --------------------------
-## (1) Some people want to see what happens during make.  They think
-##     @-commands are evil because hiding things hinders debugging.
-## (2) Other people want to see only the important commands--those that
-##     may produce diagnostics, such as compiler invocations.  They
-##     do not care about build details such as dependency generation
-##     (the if/then/else machinery in FASTDEP rules).  Their point is
-##     that it is hard to spot diagnostics in a verbose output.
-## (3) Other people want "make -s" to work as expected: silently.
-##     This way they can spot any diagnostic really easily.
-##
-## The second point suggests we hide rules with @ and that we 'echo'
-## only the relevant parts.  However this goes against the two others.
-## There are regular complaints about this on the mailing list, but
-## it's hard to please everybody.  On April 2003, William Fulton (from
-## clan (3)) and Karl Berry (from clan (2)) agreed that folding the
-## compile rules so that they are output on a single line (instead of 5)
-## would be a good compromise.  Actually we use two lines rather than one,
-## because this way %SOURCE% is always located at the end of the first
-## line and is therefore easier to spot.  (We need an extra line when
-## depbase is used.)
+## We do likewise for %FASTDEP%; this expands to an ordinary configure-time
+## conditional.  %FASTDEP% is used to speed up the common case of building
+## a package with gcc 3.x or later.  In this case we can skip the use of
+## depcomp and easily inline the dependency tracking.
 
 if %?NONLIBTOOL%
 ?GENERIC?%EXT%.o:
index e27b650..200bdba 100644 (file)
@@ -1,5 +1,5 @@
 ## automake - create Makefile.in from Makefile.am
-## Copyright (C) 2001-2012 Free Software Foundation, Inc.
+## Copyright (C) 2001-2017 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
@@ -14,7 +14,7 @@
 ## You should have received a copy of the GNU General Public License
 ## along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
-## DIST_COMMON comes first so that README can be the very first file.
+DIST_COMMON += $(am__DIST_COMMON)
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 
 if %?TOPDIR_P%
@@ -91,32 +91,6 @@ if  %?CK-NEWS%
 endif  %?CK-NEWS%
 endif %?TOPDIR_P%
 ##
-## 'missing help2man' may have created some bogus man pages.  Ensure they
-## are not distributed.
-##
-if %?INSTALL-MAN%
-if %?HAVE-MANS%
-       @list='$(MANS)'; if test -n "$$list"; then \
-         list=`for p in $$list; do \
-           if test -f $$p; then d=; else d="$(srcdir)/"; fi; \
-## Note that we check existing man pages here only.  If there are man pages
-## which are not distributed, and may be generated only conditionally, then
-## we should not error out because of them.  This could be refined to take
-## into account only dist_*_MANS, but then we'd be missing out on those
-## the user distributes with EXTRA_DIST.
-           if test -f "$$d$$p"; then echo "$$d$$p"; else :; fi; done`; \
-         if test -n "$$list" && \
-           grep 'ab help2man is required to generate this page' $$list >/dev/null; then \
-           echo "error: found man pages containing the 'missing help2man' replacement text:" >&2; \
-           grep -l 'ab help2man is required to generate this page' $$list | sed 's/^/         /' >&2; \
-           echo "       to fix them, install help2man, remove and regenerate the man pages;" >&2; \
-           echo "       typically 'make maintainer-clean' will remove them" >&2; \
-           exit 1; \
-         else :; fi; \
-       else :; fi
-endif %?HAVE-MANS%
-endif %?INSTALL-MAN%
-##
 ## Only for the top dir.
 ##
 if %?TOPDIR_P%
@@ -224,7 +198,7 @@ endif %?TOPDIR_P%
 ## Test for file existence because sometimes a file gets included in
 ## DISTFILES twice.  For example this happens when a single source
 ## file is used in building more than one program.
-## See also test 'dist-repeated.test'.
+## See also test 'dist-repeated.sh'.
            test -f "$(distdir)/$$file" \
            || cp -p $$d/$$file "$(distdir)/$$file" \
            || exit 1; \
@@ -335,6 +309,16 @@ endif %?TOPDIR_P%
 ## We order DIST_TARGETS by expected duration of the compressors,
 ## slowest first, for better parallelism in "make dist".  Do not
 ## reorder DIST_ARCHIVES, users may expect gzip to be first.
+##
+## Traditionally, gzip prepended the contents of the GZIP environment
+## variable to its arguments, and the commands below formerly used
+## this by invoking 'GZIP=$(GZIP_ENV) gzip'.  The GZIP environment
+## variable is now considered to be obsolescent, so the commands below
+## now use 'eval GZIP= gzip $(GZIP_ENV)' instead; this should work
+## with both older and newer gzip implementations.  The 'eval' is to
+## support makefile assignments like 'GZIP_ENV = "-9 -n"' that quote
+## the GZIP_ENV right-hand side because that was needed with the
+## former invocation pattern.
 
 if %?TOPDIR_P%
 
@@ -342,7 +326,7 @@ if %?TOPDIR_P%
 GZIP_ENV = --best
 .PHONY: dist-gzip
 dist-gzip: distdir
-       tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
+       tardir=$(distdir) && $(am__tar) | eval GZIP= gzip $(GZIP_ENV) -c >$(distdir).tar.gz
        $(am__post_remove_distdir)
 
 ?BZIP2?DIST_ARCHIVES += $(distdir).tar.bz2
@@ -366,13 +350,19 @@ dist-xz: distdir
 ?COMPRESS?DIST_ARCHIVES += $(distdir).tar.Z
 .PHONY: dist-tarZ
 dist-tarZ: distdir
+       @echo WARNING: "Support for distribution archives compressed with" \
+                      "legacy program 'compress' is deprecated." >&2
+       @echo WARNING: "It will be removed altogether in Automake 2.0" >&2
        tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z
        $(am__post_remove_distdir)
 
 ?SHAR?DIST_ARCHIVES += $(distdir).shar.gz
 .PHONY: dist-shar
 dist-shar: distdir
-       shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz
+       @echo WARNING: "Support for shar distribution archives is" \
+                      "deprecated." >&2
+       @echo WARNING: "It will be removed altogether in Automake 2.0" >&2
+       shar $(distdir) | eval GZIP= gzip $(GZIP_ENV) -c >$(distdir).shar.gz
        $(am__post_remove_distdir)
 
 ?ZIP?DIST_ARCHIVES += $(distdir).zip
@@ -432,7 +422,7 @@ endif %?SUBDIRS%
 distcheck: dist
        case '$(DIST_ARCHIVES)' in \
        *.tar.gz*) \
-         GZIP=$(GZIP_ENV) gzip -dc $(distdir).tar.gz | $(am__untar) ;;\
+         eval GZIP= gzip $(GZIP_ENV) -dc $(distdir).tar.gz | $(am__untar) ;;\
        *.tar.bz2*) \
          bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\
        *.tar.lz*) \
@@ -442,16 +432,16 @@ distcheck: dist
        *.tar.Z*) \
          uncompress -c $(distdir).tar.Z | $(am__untar) ;;\
        *.shar.gz*) \
-         GZIP=$(GZIP_ENV) gzip -dc $(distdir).shar.gz | unshar ;;\
+         eval GZIP= gzip $(GZIP_ENV) -dc $(distdir).shar.gz | unshar ;;\
        *.zip*) \
          unzip $(distdir).zip ;;\
        esac
 ## Make the new source tree read-only.  Distributions ought to work in
 ## this case.  However, make the top-level directory writable so we
 ## can make our new subdirs.
-       chmod -R a-w $(distdir); chmod a+w $(distdir)
-       mkdir $(distdir)/_build
-       mkdir $(distdir)/_inst
+       chmod -R a-w $(distdir)
+       chmod u+w $(distdir)
+       mkdir $(distdir)/_build $(distdir)/_build/sub $(distdir)/_inst
 ## Undo the write access.
        chmod a-w $(distdir)
 ## With GNU make, the following command will be executed even with "make -n",
@@ -472,14 +462,21 @@ distcheck: dist
 ## Parallel BSD make may not start a new shell for each command in a recipe,
 ## so be sure to 'cd' back to the original directory after this.
          && am__cwd=`pwd` \
-         && $(am__cd) $(distdir)/_build \
-         && ../configure --srcdir=.. --prefix="$$dc_install_base" \
+## If we merely used '$(distdir)/_build' here, "make distcheck" could
+## sometimes fail to detect missing files in the distribution tarball,
+## especially in those cases where both the generated files and their
+## dependencies are explicitly in $(srcdir).  See automake bug#18286.
+         && $(am__cd) $(distdir)/_build/sub \
+         && ../../configure \
 ?GETTEXT?          --with-included-gettext \
-## Additional flags for configure.  Keep this last in the configure
-## invocation so the developer and user can override previous options,
-## and let the user's flags take precedence over the developer's ones.
+## Additional flags for configure.
            $(AM_DISTCHECK_CONFIGURE_FLAGS) \
            $(DISTCHECK_CONFIGURE_FLAGS) \
+## At the moment, the code doesn't actually support changes in these --srcdir
+## and --prefix values, so don't allow them to be overridden by the user or
+## the developer.  That used to be allowed, and caused issues in practice
+## (in corner-case usages); see automake bug#14991.
+           --srcdir=../.. --prefix="$$dc_install_base" \
          && $(MAKE) $(AM_MAKEFLAGS) \
          && $(MAKE) $(AM_MAKEFLAGS) dvi \
          && $(MAKE) $(AM_MAKEFLAGS) check \
index 71ac76b..07f5388 100644 (file)
@@ -1,5 +1,5 @@
 ## automake - create Makefile.in from Makefile.am
-## Copyright (C) 1994-2012 Free Software Foundation, Inc.
+## Copyright (C) 1994-2017 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 ba4aa0b..3094684 100644 (file)
@@ -1,5 +1,5 @@
 ## automake - create Makefile.in from Makefile.am
-## Copyright (C) 1994-2012 Free Software Foundation, Inc.
+## Copyright (C) 1994-2017 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
@@ -26,34 +26,119 @@ VPATH = @srcdir@
 ## a vendor make.
 ## DESTDIR =
 
-## Shell code that determines whether make is running in "dry mode"
-## ("make -n") or not.  Useful in rules that invoke make recursively,
-## and are thus executed also with "make -n" -- either because they
-## are declared as dependencies to '.MAKE' (NetBSD make), or because
-## their recipes contain the "$(MAKE)" string (GNU and Solaris make).
+## Shell code that determines whether we are running under GNU make.
+##
+## Why the this needs to be so convoluted?
+##
+## (1) We can't unconditionally use make functions or special variables
+##     starting with a dot, as those cause non-GNU implmentations to
+##     crash hard.
+##
+## (2) We can't use $(MAKE_VERSION) here, as it is also defined in some
+##     non-GNU make implementations (e.g., FreeBSD make).  But at least
+##     BSD make does *not* define the $(CURDIR) variable -- it uses
+##     $(.CURDIR) instead.
+##
+## (3) We can't use $(MAKEFILE_LIST) here, as in some situations it
+##     might cause the shell to die with "Arg list too long" (see
+##     automake bug#18744).
+##
+## (4) We can't use $(MAKE_HOST) unconditionally, as it is only
+##     defined in GNU make 4.0 or later.
+##
+am__is_gnu_make = { \
+  if test -z '$(MAKELEVEL)'; then \
+    false; \
+  elif test -n '$(MAKE_HOST)'; then \
+    true; \
+  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+    true; \
+  else \
+    false; \
+  fi; \
+}
 
-am__make_dryrun = \
-  { \
-    am__dry=no; \
+## Shell code that determines whether the current make instance is
+## running with a given one-letter option (e.g., -k, -n) that takes
+## no argument.
+am__make_running_with_option = \
+  case $${target_option-} in \
+      ?) ;; \
+      *) echo "am__make_running_with_option: internal error: invalid" \
+              "target option '$${target_option-}' specified" >&2; \
+         exit 1;; \
+  esac; \
+  has_opt=no; \
+  sane_makeflags=$$MAKEFLAGS; \
+  if $(am__is_gnu_make); then \
+## The format of $(MAKEFLAGS) is quite tricky with GNU make; the
+## variable $(MFLAGS) behaves much better in that regard.  So use it.
+    sane_makeflags=$$MFLAGS; \
+  else \
+## Non-GNU make: we must rely on $(MAKEFLAGS).  This is tricker and more
+## brittle, but is the best we can do.
     case $$MAKEFLAGS in \
-## If we run "make TESTS='snooze nap'", GNU make will export MAKEFLAGS
-## to "TESTS=foo\ nap", so that the simpler loop below (on word-splitted
+## If we run "make TESTS='snooze nap'", FreeBSD make will export MAKEFLAGS
+## to " TESTS=foo\ nap", so that the simpler loop below (on word-split
 ## $$MAKEFLAGS) would see a "make flag" equal to "nap", and would wrongly
 ## misinterpret that as and indication that make is running in dry mode.
 ## This has already happened in practice.  So we need this hack.
       *\\[\ \  ]*) \
-        echo 'am--echo: ; @echo "AM"  OK' | $(MAKE) -f - 2>/dev/null \
-          | grep '^AM OK$$' >/dev/null || am__dry=yes;; \
-      *) \
-        for am__flg in $$MAKEFLAGS; do \
-          case $$am__flg in \
-            *=*|--*) ;; \
-            *n*) am__dry=yes; break;; \
-          esac; \
-        done;; \
+## Extra indirection with ${bs} required by FreeBSD 8.x make.
+## Not sure why (so sorry for the cargo-cult programming here).
+        bs=\\; \
+        sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
+          | sed "s/$$bs$$bs[$$bs $$bs  ]*//g"`;; \
+    esac; \
+  fi; \
+  skip_next=no; \
+  strip_trailopt () \
+  { \
+    flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
+  }; \
+  for flg in $$sane_makeflags; do \
+    test $$skip_next = yes && { skip_next=no; continue; }; \
+    case $$flg in \
+      *=*|--*) continue;; \
+##
+## GNU make 4.0 has changed the format of $MFLAGS, and removed the space
+## between an option and its argument (e.g., from "-I dir" to "-Idir").
+## So we need to handle both formats, at least for options valid in GNU
+## make.  OTOH, BSD make formats $(MAKEFLAGS) by separating all options,
+## and separating any option from its argument, so things are easier
+## there.
+##
+## For GNU make and BSD make.
+        -*I) strip_trailopt 'I'; skip_next=yes;; \
+      -*I?*) strip_trailopt 'I';; \
+## For GNU make >= 4.0.
+        -*O) strip_trailopt 'O'; skip_next=yes;; \
+      -*O?*) strip_trailopt 'O';; \
+## For GNU make (possibly overkill, this one).
+        -*l) strip_trailopt 'l'; skip_next=yes;; \
+      -*l?*) strip_trailopt 'l';; \
+## For BSD make.
+      -[dEDm]) skip_next=yes;; \
+## For NetBSD make.
+      -[JT]) skip_next=yes;; \
     esac; \
-    test $$am__dry = yes; \
-  }
+    case $$flg in \
+      *$$target_option*) has_opt=yes; break;; \
+    esac; \
+  done; \
+  test $$has_opt = yes
+
+## Shell code that determines whether make is running in "dry mode"
+## ("make -n") or not.  Useful in rules that invoke make recursively,
+## and are thus executed also with "make -n" -- either because they
+## are declared as dependencies to '.MAKE' (NetBSD make), or because
+## their recipes contain the "$(MAKE)" string (GNU and Solaris make).
+am__make_dryrun = (target_option=n; $(am__make_running_with_option))
+
+## Shell code that determines whether make is running in "keep-going mode"
+## ("make -k") or not.  Useful in rules that must recursively descend into
+## subdirectories, and decide whether to stop at the first error or not.
+am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
 
 ## Some derived variables that have been found to be useful.
 pkgdatadir = $(datadir)/@PACKAGE@
index 752af19..f2a0e95 100644 (file)
@@ -1,5 +1,5 @@
 ## automake - create Makefile.in from Makefile.am
-## Copyright (C) 1994-2012 Free Software Foundation, Inc.
+## Copyright (C) 1994-2017 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 3096f0a..5581f67 100644 (file)
@@ -1,5 +1,5 @@
 ## automake - create Makefile.in from Makefile.am
-## Copyright (C) 2004-2012 Free Software Foundation, Inc.
+## Copyright (C) 2004-2017 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 b587d08..5adcb52 100644 (file)
@@ -1,5 +1,5 @@
 ## automake - create Makefile.in from Makefile.am
-## Copyright (C) 2001-2012 Free Software Foundation, Inc.
+## Copyright (C) 2001-2017 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 6c163b5..6398f0e 100644 (file)
@@ -1,5 +1,5 @@
 ## automake - create Makefile.in from Makefile.am
-## Copyright (C) 1998-2012 Free Software Foundation, Inc.
+## Copyright (C) 1998-2017 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 04cafb3..545e0cf 100644 (file)
@@ -1,5 +1,5 @@
 ## automake - create Makefile.in from Makefile.am
-## Copyright (C) 2001-2012 Free Software Foundation, Inc.
+## Copyright (C) 2001-2017 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 7467f4f..c28674d 100644 (file)
@@ -1,5 +1,5 @@
 ## automake - create Makefile.in from Makefile.am
-## Copyright (C) 2001-2012 Free Software Foundation, Inc.
+## Copyright (C) 2001-2017 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 686b648..8bb1390 100644 (file)
@@ -1,5 +1,5 @@
 ## automake - create Makefile.in from Makefile.am
-## Copyright (C) 1994-2012 Free Software Foundation, Inc.
+## Copyright (C) 1994-2017 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
@@ -13,6 +13,7 @@
 
 ## You should have received a copy of the GNU General Public License
 ## along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
 %LIBRARY%: $(%XLIBRARY%_OBJECTS) $(%XLIBRARY%_DEPENDENCIES) $(EXTRA_%XLIBRARY%_DEPENDENCIES) %DIRSTAMP%
        %SILENT%-rm -f %LIBRARY%
        %VERBOSE%$(%XLIBRARY%_AR) %LIBRARY% $(%XLIBRARY%_OBJECTS) $(%XLIBRARY%_LIBADD)
index d1f63ae..77f9178 100644 (file)
@@ -1,5 +1,5 @@
 ## automake - create Makefile.in from Makefile.am
-## Copyright (C) 1994-2012 Free Software Foundation, Inc.
+## Copyright (C) 1994-2017 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
@@ -24,7 +24,8 @@ endif %?INSTALL%
 
 if %?INSTALL%
 am__installdirs += "$(DESTDIR)$(%NDIR%dir)"
-.PHONY install-%EXEC?exec:data%-am: install-%DIR%LIBRARIES
+?EXEC?.PHONY install-exec-am: install-%DIR%LIBRARIES
+?!EXEC?.PHONY install-data-am: install-%DIR%LIBRARIES
 install-%DIR%LIBRARIES: $(%DIR%_LIBRARIES)
        @$(NORMAL_INSTALL)
 if %?BASE%
@@ -69,7 +70,8 @@ endif !%?BASE%
        @list='$(%DIR%_LIBRARIES)'; test -n "$(%NDIR%dir)" || list=; \
        for p in $$list; do \
          if test -f $$p; then \
-           %BASE?$(am__strip_dir):f=$$p;% \
+?BASE?     $(am__strip_dir) \
+?!BASE?            f=$$p; \
 ## Must ranlib after installing because mod time changes.
 ## cd to target directory because AIX ranlib messes up with whitespace
 ## in the argument.
index 3681c45..a2f1ae5 100644 (file)
@@ -1,5 +1,5 @@
 ## automake - create Makefile.in from Makefile.am
-## Copyright (C) 1994-2012 Free Software Foundation, Inc.
+## Copyright (C) 1994-2017 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 ba5c92a..8085e3f 100644 (file)
@@ -1,5 +1,5 @@
 ## automake - create Makefile.in from Makefile.am
-## Copyright (C) 1996-2012 Free Software Foundation, Inc.
+## Copyright (C) 1996-2017 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
@@ -22,59 +22,28 @@ endif %?INSTALL%
 ## Building.  ##
 ## ---------- ##
 
-elc-stamp: $(LISP)
-       @echo 'WARNING: Warnings can be ignored. :-)'
-       @rm -f elc-temp && touch elc-temp
-       if test "$(EMACS)" != no; then \
-## Make sure "$@" isn't empty initially.
-         set x; \
-## Populate "$@" with elisp files (found in the current directory
-## or in $srcdir).
-         list='$(LISP)'; for p in $$list; do \
-           if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
-           set x "$$@" "$$d$$p"; shift; \
-         done; \
-## Finally call elisp-comp for all files.
-         shift; \
-         EMACS="$(EMACS)" $(SHELL) $(elisp_comp) "$$@" || exit 1; \
-       else : ; fi
-       @mv -f elc-temp $@
-
-## Do not use $(ELCFILES) as target, because it may have been emptied
-## by the user (to disable byte-compilation), and POSIX does not allow
-## an empty target.
-$(am__ELCFILES): elc-stamp
-## Recover from the removal of $@.
-##
-## Do not call "make elc-stamp" if emacs is not available, because it would
-## be useless.
-##
-## If "make -n" is called, do not execute any command in the recipe that
-## changes the tree; however, invoke the recursive make for debuggability.
-       @if $(am__make_dryrun); then dry=:; else dry=; fi; \
-       if test "$(EMACS)" != no && test ! -f $@; then \
-## If "make -j" is used and more than one file has been erased, several
-## processes can execute this block.  We have to make sure that only
-## the first one will run "$(MAKE) $(AM_MAKEFLAGS) elc-stamp", and the
-## other ones will wait.
-##
-## There is a race here if only one child of make receive a signal.
-## In that case the build may fail.  We remove elc-stamp when we receive
-## a signal so we are sure the build will succeed the next time.
-         $$dry trap 'rm -rf elc-lock elc-stamp' 1 2 13 15; \
-         if $$dry mkdir elc-lock 2>/dev/null; then \
-## This code is being executed by the first process.
-           $$dry rm -f elc-stamp; \
-           $(MAKE) $(AM_MAKEFLAGS) elc-stamp; \
-           $$dry rmdir elc-lock; \
-         else \
-## This code is being executed by the follower processes.
-## Wait until the first process is done.
-           while test -d elc-lock && test -z "$$dry"; do sleep 1; done; \
-## Succeed if and only if the first process succeeded.
-           $$dry test -f elc-stamp; exit $$?; \
-         fi; \
-       else : ; fi
+.el.elc:
+## We add $(builddir) and $(srcdir) to load-path, so that any '.el' files
+## that $< depends upon can be found (including generated ones).
+## We prefer files from the build directory to those from the source
+## directory, in true VPATH spirit.
+## The destination file is normally determined by appending "c" to the
+## input (which would erronously put it in $(srcdir) in VPATH builds),
+## so we override that, too.
+       if test "$(EMACS)" != "no"; then \
+         am__dir=. am__subdir_includes=''; \
+         case $@ in */*) \
+           am__dir=`echo '$@' | sed 's,/[^/]*$$,,'`; \
+           am__subdir_includes="-L $$am__dir -L $(srcdir)/$$am__dir"; \
+         esac; \
+## Emacs byte-compilation won't create this automatically, sadly.
+         test -d "$$am__dir" || $(MKDIR_P) "$$am__dir" || exit 1; \
+         $(EMACS) --batch \
+           $(AM_ELCFLAGS) $(ELCFLAGS) \
+           $$am__subdir_includes -L $(builddir) -L $(srcdir) \
+           --eval "(defun byte-compile-dest-file (f) \"$@\")" \
+           --eval "(unless (byte-compile-file \"$<\") (kill-emacs 1))"; \
+       else :; fi
 
 
 ## ------------ ##
@@ -83,8 +52,13 @@ $(am__ELCFILES): elc-stamp
 
 if %?INSTALL%
 am__installdirs += "$(DESTDIR)$(%NDIR%dir)"
-%DIR%LISP_INSTALL = %BASE?$(INSTALL_DATA):$(install_sh_DATA)%
-.PHONY install-%EXEC?exec:data%-am: install-%DIR%LISP
+
+?BASE?%DIR%LISP_INSTALL = $(INSTALL_DATA)
+?!BASE?%DIR%LISP_INSTALL = $(install_sh_DATA)
+
+?EXEC?.PHONY install-exec-am: install-%DIR%LISP
+?!EXEC?.PHONY install-data-am: install-%DIR%LISP
+
 install-%DIR%LISP: $(%DIR%_LISP) $(ELCFILES)
        @$(NORMAL_INSTALL)
 ## Do not install anything if EMACS was not found.
@@ -100,7 +74,8 @@ install-%DIR%LISP: $(%DIR%_LISP) $(ELCFILES)
          for p in $$list; do \
 ## A lisp file can be in the source directory or the build directory.
            if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
-           %BASE?$(am__strip_dir):$(am__vpath_adj)% \
+?BASE?     $(am__strip_dir) \
+?!BASE?            $(am__vpath_adj) \
            echo " $(%DIR%LISP_INSTALL) '$$d$$p' '$(DESTDIR)$(%NDIR%dir)/$$f'"; \
            $(%DIR%LISP_INSTALL) "$$d$$p" "$(DESTDIR)$(%NDIR%dir)/$$f" || exit $$?; \
 ## Only install .elc file if it exists.
@@ -137,7 +112,7 @@ endif %?INSTALL%
 
 .PHONY clean-am: clean-lisp
 clean-lisp:
-       -rm -f elc-stamp $(ELCFILES)
+       -rm -f $(ELCFILES)
 
 
 ## -------------- ##
index 1ca26b5..45f0203 100644 (file)
@@ -1,5 +1,5 @@
 ## automake - create Makefile.in from Makefile.am
-## Copyright (C) 1994-2012 Free Software Foundation, Inc.
+## Copyright (C) 1994-2017 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
@@ -23,8 +23,12 @@ endif %?INSTALL%
 ## ------------ ##
 
 if %?INSTALL%
+
 am__installdirs += "$(DESTDIR)$(%NDIR%dir)"
-.PHONY install-%EXEC?exec:data%-am: install-%DIR%LTLIBRARIES
+
+?EXEC?.PHONY install-exec-am: install-%DIR%LTLIBRARIES
+?!EXEC?.PHONY install-data-am: install-%DIR%LTLIBRARIES
+
 install-%DIR%LTLIBRARIES: $(%DIR%_LTLIBRARIES)
        @$(NORMAL_INSTALL)
 if %?BASE%
@@ -89,7 +93,8 @@ uninstall-%DIR%LTLIBRARIES:
        @$(NORMAL_UNINSTALL)
        @list='$(%DIR%_LTLIBRARIES)'; test -n "$(%NDIR%dir)" || list=; \
        for p in $$list; do \
-         %BASE?$(am__strip_dir):f=$$p;% \
+?BASE?   $(am__strip_dir) \
+?!BASE?          f=$$p; \
 ?LIBTOOL?        echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(%NDIR%dir)/$$f'"; \
 ?LIBTOOL?        $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(%NDIR%dir)/$$f"; \
 ?!LIBTOOL?       echo " rm -f '$(DESTDIR)$(%NDIR%dir)/$$f'"; \
index b758880..ce4c1fa 100644 (file)
@@ -1,5 +1,5 @@
 ## automake - create Makefile.in from Makefile.am
-## Copyright (C) 1994-2012 Free Software Foundation, Inc.
+## Copyright (C) 1994-2017 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
@@ -13,5 +13,6 @@
 
 ## You should have received a copy of the GNU General Public License
 ## along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
 %LTLIBRARY%: $(%XLTLIBRARY%_OBJECTS) $(%XLTLIBRARY%_DEPENDENCIES) $(EXTRA_%XLTLIBRARY%_DEPENDENCIES) %DIRSTAMP%
        %VERBOSE%$(%XLINK%) %RPATH% $(%XLTLIBRARY%_OBJECTS) $(%XLTLIBRARY%_LIBADD) $(LIBS)
index 5d582d7..24b9e20 100644 (file)
@@ -1,5 +1,5 @@
 ## automake - create Makefile.in from Makefile.am
-## Copyright (C) 1994-2012 Free Software Foundation, Inc.
+## Copyright (C) 1994-2017 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 bfc71dc..85c1808 100644 (file)
@@ -1,5 +1,5 @@
 ## automake - create Makefile.in from Makefile.am
-## Copyright (C) 1998-2012 Free Software Foundation, Inc.
+## Copyright (C) 1998-2017 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 699afb5..ba1bbb5 100644 (file)
@@ -1,5 +1,5 @@
 ## automake - create Makefile.in from Makefile.am
-## Copyright (C) 1994-2012 Free Software Foundation, Inc.
+## Copyright (C) 1994-2017 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
@@ -13,6 +13,7 @@
 
 ## You should have received a copy of the GNU General Public License
 ## along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
 %PROGRAM%%EXEEXT%: $(%XPROGRAM%_OBJECTS) $(%XPROGRAM%_DEPENDENCIES) $(EXTRA_%XPROGRAM%_DEPENDENCIES) %DIRSTAMP%
 ## Remove program before linking.  Otherwise the link will fail if the
 ## program is running somewhere.  FIXME: this could be a loss if
index 2be8bca..4c94b5b 100644 (file)
@@ -1,5 +1,5 @@
 ## automake - create Makefile.in from Makefile.am
-## Copyright (C) 1994-2012 Free Software Foundation, Inc.
+## Copyright (C) 1994-2017 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
@@ -20,7 +20,8 @@
 
 if %?INSTALL%
 am__installdirs += "$(DESTDIR)$(%NDIR%dir)"
-.PHONY install-%EXEC?exec:data%-am: install-%DIR%PROGRAMS
+?EXEC?.PHONY install-exec-am: install-%DIR%PROGRAMS
+?!EXEC?.PHONY install-data-am: install-%DIR%PROGRAMS
 install-%DIR%PROGRAMS: $(%DIR%_PROGRAMS)
        @$(NORMAL_INSTALL)
 ## Funny invocation because Makefile variable can be empty, leading to
@@ -34,13 +35,16 @@ install-%DIR%PROGRAMS: $(%DIR%_PROGRAMS)
 ## On Cygwin with libtool test won't see 'foo.exe' but instead 'foo'.
 ## So we check for both.
        sed 's/$(EXEEXT)$$//' | \
-       while read p p1; do if test -f $$p%LIBTOOL? || test -f $$p1%; \
-         then echo "$$p"; echo "$$p"; else :; fi; \
+       while read p p1; do if test -f $$p \
+?LIBTOOL?       || test -f $$p1 \
+         ; then echo "$$p"; echo "$$p"; else :; fi; \
        done | \
 ## We now have a list of sourcefile pairs, separated by newline.
 ## Turn that into "sourcefile source_base target_dir xformed_target_base",
 ## with newlines being turned into spaces in a second step.
-       sed -e 'p;s,.*/,,;n;h' -e '%BASE?s|.*|.|:s|[^/]*$$||; s|^$$|.|%' \
+       sed -e 'p;s,.*/,,;n;h' \
+?BASE?     -e 's|.*|.|' \
+?!BASE?            -e 's|[^/]*$$||; s|^$$|.|' \
            -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \
        sed 'N;N;N;s,\n, ,g' | \
 ## The following awk script turns that into one line containing directories
@@ -86,7 +90,9 @@ uninstall-%DIR%PROGRAMS:
 ## but keep the directory part in the hold buffer, in order to
 ## reapply it again afterwards in the nobase case.  Append $(EXEEXT).
          sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \
-             -e 's/$$/$(EXEEXT)/'%BASE? : -e 'x;s,[^/]*$$,,;G;s,\n,,'%`; \
+             -e 's/$$/$(EXEEXT)/' \
+?!BASE?              -e 'x;s,[^/]*$$,,;G;s,\n,,' \
+       `; \
        test -n "$$list" || exit 0; \
        echo " ( cd '$(DESTDIR)$(%NDIR%dir)' && rm -f" $$files ")"; \
        cd "$(DESTDIR)$(%NDIR%dir)" && rm -f $$files
index cab6129..e20f602 100644 (file)
@@ -1,5 +1,5 @@
 ## automake - create Makefile.in from Makefile.am
-## Copyright (C) 1999-2012 Free Software Foundation, Inc.
+## Copyright (C) 1999-2017 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
@@ -26,7 +26,8 @@ endif %?INSTALL%
 
 if %?INSTALL%
 am__installdirs += "$(DESTDIR)$(%NDIR%dir)"
-.PHONY install-%EXEC?exec:data%-am: install-%DIR%PYTHON
+?EXEC?.PHONY install-exec-am: install-%DIR%PYTHON
+?!EXEC?.PHONY install-data-am: install-%DIR%PYTHON
 install-%DIR%PYTHON: $(%DIR%_PYTHON)
        @$(NORMAL_INSTALL)
 if %?BASE%
@@ -65,7 +66,7 @@ else !%?BASE%
          echo " $(MKDIR_P) '$(DESTDIR)$(%NDIR%dir)'"; \
          $(MKDIR_P) "$(DESTDIR)$(%NDIR%dir)" || exit 1; \
        fi; \
-       $(am__nobase_list) | while read dir files; do \
+       $(am__nobase_list) | while read dir files; do \
          xfiles=; for p in $$files; do \
 ## A file can be in the source directory or the build directory.
            if test -f "$$p"; then b=; else b="$(srcdir)/"; fi; \
@@ -78,13 +79,13 @@ else !%?BASE%
 ## Don't perform translation, since script name is important.
            echo " $(INSTALL_DATA) $$xfiles '$(DESTDIR)$(%NDIR%dir)/$$dir'"; \
            $(INSTALL_DATA) $$xfiles "$(DESTDIR)$(%NDIR%dir)/$$dir" || exit $$?; }; \
+       done; \
 ## Byte-compile must be done at install time, since file times are
 ## encoded in the actual files.
-         if test -n "$$dlist"; then \
-           $(am__py_compile) --destdir "$(DESTDIR)" \
-                             --basedir "$(%NDIR%dir)" $$dlist; \
-         else :; fi \
-       done
+       if test -n "$$dlist"; then \
+         $(am__py_compile) --destdir "$(DESTDIR)" \
+                           --basedir "$(%NDIR%dir)" $$dlist; \
+       else :; fi; }
 endif !%?BASE%
 endif %?INSTALL%
 
@@ -94,19 +95,37 @@ endif %?INSTALL%
 ## -------------- ##
 
 if %?INSTALL%
+
+?FIRST?am__pep3147_tweak = \
+?FIRST?  sed -e 's|\.py$$||' -e 's|[^/]*$$|__pycache__/&.*.py|'
+
 .PHONY uninstall-am: uninstall-%DIR%PYTHON
 uninstall-%DIR%PYTHON:
        @$(NORMAL_UNINSTALL)
        @list='$(%DIR%_PYTHON)'; test -n "$(%NDIR%dir)" || list=; \
-?BASE? files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
-?!BASE?        $(am__nobase_strip_setup); files=`$(am__nobase_strip)`; \
-       test -n "$$files" || exit 0; \
+?BASE? py_files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+?!BASE?        $(am__nobase_strip_setup); py_files=`$(am__nobase_strip)`; \
+       test -n "$$py_files" || exit 0; \
        dir='$(DESTDIR)$(%NDIR%dir)'; \
 ## Also remove the .pyc and .pyo byte compiled versions.
-       filesc=`echo "$$files" | sed 's|$$|c|'`; \
-       fileso=`echo "$$files" | sed 's|$$|o|'`; \
+## This is somewhat tricky, because for newer pythons we have to take
+## PEP-3147 into account.
+       pyc_files=`echo "$$py_files" | sed 's|$$|c|'`; \
+       pyo_files=`echo "$$py_files" | sed 's|$$|o|'`; \
+       py_files_pep3147=`echo "$$py_files" | $(am__pep3147_tweak)`; \
+       echo "$$py_files_pep3147";\
+       pyc_files_pep3147=`echo "$$py_files_pep3147" | sed 's|$$|c|'`; \
+       pyo_files_pep3147=`echo "$$py_files_pep3147" | sed 's|$$|o|'`; \
        st=0; \
-       for files in "$$files" "$$filesc" "$$fileso"; do \
+       for files in \
+         "$$py_files" \
+         "$$pyc_files" \
+         "$$pyo_files" \
+## Installation of '.py' files is not influenced by PEP-3147, so it
+## is correct *not* to have $pyfiles_pep3147 here.
+         "$$pyc_files_pep3147" \
+         "$$pyo_files_pep3147" \
+       ; do \
          $(am__uninstall_files_from_dir) || st=$$?; \
        done; \
        exit $$st
index f61400a..dd26e4e 100644 (file)
@@ -1,5 +1,5 @@
 ## automake - create Makefile.in from Makefile.am
-## Copyright (C) 1994-2012 Free Software Foundation, Inc.
+## Copyright (C) 1994-2017 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/>.
 
-## Explicitly look in srcdir for benefit of non-GNU makes.
-
-
 %CONFIG_H%: %STAMP%
-## Recover from removal of CONFIG_HEADER
-       @if test ! -f $@; then rm -f %STAMP%; else :; fi
-       @if test ! -f $@; then $(MAKE) $(AM_MAKEFLAGS) %STAMP%; else :; fi
+## Recover from removal of CONFIG_HEADER.
+       @test -f $@ || rm -f %STAMP%
+       @test -f $@ || $(MAKE) $(AM_MAKEFLAGS) %STAMP%
 
 
 %STAMP%: %CONFIG_H_DEPS% $(top_builddir)/config.status
@@ -30,7 +27,7 @@
 
 ## Only the first file of AC_CONFIG_HEADERS is assumed to be generated
 ## by autoheader.
-if %?FIRST%
+if %?FIRST-HDR%
 %CONFIG_HIN%: %MAINTAINER-MODE% $(am__configure_deps) %FILES%
 ## Cater to parallel BSD make.
        ($(am__cd) $(top_srcdir) && $(AUTOHEADER))
@@ -71,4 +68,4 @@ if %?FIRST%
 ## by config.status, there is no reason to make things complex for
 ## config.hin.
        touch $@
-endif %?FIRST%
+endif %?FIRST-HDR%
index 64e093e..5422392 100644 (file)
@@ -1,5 +1,5 @@
 ## automake - create Makefile.in from Makefile.am
-## Copyright (C) 1994-2012 Free Software Foundation, Inc.
+## Copyright (C) 1994-2017 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
@@ -25,7 +25,8 @@ endif %?INSTALL%
 if %?INSTALL%
 ## if doesn't work properly for Automake variables yet.
 am__installdirs += "$(DESTDIR)$(%NDIR%dir)"
-.PHONY install-%EXEC?exec:data%-am: install-%DIR%SCRIPTS
+?EXEC?.PHONY install-exec-am: install-%DIR%SCRIPTS
+?!EXEC?.PHONY install-data-am: install-%DIR%SCRIPTS
 install-%DIR%SCRIPTS: $(%DIR%_SCRIPTS)
        @$(NORMAL_INSTALL)
 ## Funny invocation because Makefile variable can be empty, leading to
index 1d1295e..8410249 100644 (file)
@@ -1,5 +1,5 @@
 ## automake - create Makefile.in from Makefile.am
-## Copyright (C) 1994-2012 Free Software Foundation, Inc.
+## Copyright (C) 1994-2017 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
 RECURSIVE_TARGETS += all-recursive check-recursive installcheck-recursive
 RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive        \
   distclean-recursive maintainer-clean-recursive
+
+am__recursive_targets = \
+  $(RECURSIVE_TARGETS) \
+  $(RECURSIVE_CLEAN_TARGETS) \
+  $(am__extra_recursive_targets)
+
 ## All documented targets which invoke 'make' recursively, or depend
-## on targets that do so.
-AM_RECURSIVE_TARGETS += $(RECURSIVE_TARGETS:-recursive=) \
-  $(RECURSIVE_CLEAN_TARGETS:-recursive=)
+## on targets that do so.  GNUmakefile from gnulib depends on this.
+AM_RECURSIVE_TARGETS += $(am__recursive_targets:-recursive=)
 
-.PHONY: $(RECURSIVE_TARGETS) $(RECURSIVE_CLEAN_TARGETS)
-.MAKE: $(RECURSIVE_TARGETS) $(RECURSIVE_CLEAN_TARGETS)
+.PHONY .MAKE: $(am__recursive_targets)
 
 # This directory's subdirectories are mostly independent; you can cd
 # into them and run 'make' without going through this Makefile.
@@ -32,19 +36,25 @@ AM_RECURSIVE_TARGETS += $(RECURSIVE_TARGETS:-recursive=) \
 #     (which will cause the Makefiles to be regenerated when you run 'make');
 # (2) otherwise, pass the desired values on the 'make' command line.
 
-$(RECURSIVE_TARGETS):
+$(am__recursive_targets):
 ## Using $failcom allows "-k" to keep its natural meaning when running a
 ## recursive rule.
-       @fail= failcom='exit 1'; \
-       for f in x $$MAKEFLAGS; do \
-         case $$f in \
-           *=* | --[!k]*);; \
-           *k*) failcom='fail=yes';; \
-         esac; \
-       done; \
+       @fail=; \
+       if $(am__make_keepgoing); then \
+         failcom='fail=yes'; \
+       else \
+         failcom='exit 1'; \
+       fi; \
        dot_seen=no; \
        target=`echo $@ | sed s/-recursive//`; \
-       list='$(SUBDIRS)'; for subdir in $$list; do \
+## For distclean and maintainer-clean we make sure to use the full
+## list of subdirectories.  We do this so that 'configure; make
+## distclean' really is a no-op, even if SUBDIRS is conditional.
+       case "$@" in \
+         distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
+         *) list='$(SUBDIRS)' ;; \
+       esac; \
+       for subdir in $$list; do \
          echo "Making $$target in $$subdir"; \
          if test "$$subdir" = "."; then \
            dot_seen=yes; \
@@ -59,52 +69,8 @@ $(RECURSIVE_TARGETS):
          $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
        fi; test -z "$$fail"
 
-
 mostlyclean: mostlyclean-recursive
 clean: clean-recursive
 distclean: distclean-recursive
 maintainer-clean: maintainer-clean-recursive
 
-## We run all 'clean' targets in reverse order.  Why?  It's an attempt
-## to alleviate a problem that can happen when dependencies are
-## enabled.  In this case, the .P file in one directory can depend on
-## some automatically generated header in an earlier directory.  Since
-## the dependencies are required before any target is examined, make
-## bombs.
-$(RECURSIVE_CLEAN_TARGETS):
-## Using $failcom allows "-k" to keep its natural meaning when running a
-## recursive rule.
-       @fail= failcom='exit 1'; \
-       for f in x $$MAKEFLAGS; do \
-         case $$f in \
-           *=* | --[!k]*);; \
-           *k*) failcom='fail=yes';; \
-         esac; \
-       done; \
-       dot_seen=no; \
-## For distclean and maintainer-clean we make sure to use the full
-## list of subdirectories.  We do this so that 'configure; make
-## distclean' really is a no-op, even if SUBDIRS is conditional.  For
-## other clean targets this doesn't matter.
-       case "$@" in \
-         distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
-         *) list='$(SUBDIRS)' ;; \
-       esac; \
-       rev=''; for subdir in $$list; do \
-         if test "$$subdir" = "."; then :; else \
-           rev="$$subdir $$rev"; \
-         fi; \
-       done; \
-## Always do '.' last.
-       rev="$$rev ."; \
-       target=`echo $@ | sed s/-recursive//`; \
-       for subdir in $$rev; do \
-         echo "Making $$target in $$subdir"; \
-         if test "$$subdir" = "."; then \
-           local_target="$$target-am"; \
-         else \
-           local_target="$$target"; \
-         fi; \
-         ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
-         || eval $$failcom; \
-       done && test -z "$$fail"
index fccacca..7a93cde 100644 (file)
@@ -1,5 +1,5 @@
 ## automake - create Makefile.in from Makefile.am
-## Copyright (C) 1994-2012 Free Software Foundation, Inc.
+## Copyright (C) 1994-2017 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/>.
 
+# Read a list of newline-separated strings from the standard input,
+# and print each of them once, without duplicates.  Input order is
+# *not* preserved.
+am__uniquify_input = $(AWK) '\
+  BEGIN { nonempty = 0; } \
+  { items[$$0] = 1; nonempty = 1; } \
+  END { if (nonempty) { for (i in items) print i; }; } \
+'
+
+# Make sure the list of sources is unique.  This is necessary because,
+# e.g., the same source file might be shared among _SOURCES variables
+# for different programs/libraries.
+am__define_uniq_tagged_files = \
+  list='$(am__tagged_files)'; \
+  unique=`for i in $$list; do \
+## Handle VPATH correctly.
+    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+  done | $(am__uniquify_input)`
+
 ## ---- ##
 ## ID.  ##
 ## ---- ##
 
-ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
-## Make sure the list of sources is unique.
-       list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
-       unique=`for i in $$list; do \
-## Handle VPATH correctly.
-           if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
-         done | \
-         $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
-             END { if (nonempty) { for (i in files) print i; }; }'`; \
-       mkid -fID $$unique
+ID: $(am__tagged_files)
+       $(am__define_uniq_tagged_files); mkid -fID $$unique
 
 
 ## ------ ##
@@ -35,14 +46,17 @@ ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
 ## ------ ##
 
 ETAGS = etags
-.PHONY: tags
+.PHONY: TAGS tags
 if %?SUBDIRS%
-AM_RECURSIVE_TARGETS += tags TAGS
-endif %?SUBDIRS%
-tags: TAGS
-
-TAGS: %TAGSDIRS% $(HEADERS) $(SOURCES) %CONFIG% $(TAGS_DEPENDENCIES) \
-               $(TAGS_FILES) $(LISP)
+AM_RECURSIVE_TARGETS += TAGS
+RECURSIVE_TARGETS += tags-recursive
+tags: tags-recursive
+else !%?SUBDIRS%
+tags: tags-am
+endif !%?SUBDIRS%
+TAGS: tags
+
+tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
 ## We use the positional parameters to build the subdir list with
 ## absolute names, without the need to worry about white space in `pwd`.
        set x; \
@@ -67,14 +81,7 @@ TAGS: %TAGSDIRS% $(HEADERS) $(SOURCES) %CONFIG% $(TAGS_DEPENDENCIES) \
 ?SUBDIRS?            set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \
 ?SUBDIRS?        fi; \
 ?SUBDIRS?      done; \
-## Make sure the list of sources is unique.
-       list='$(SOURCES) $(HEADERS) %CONFIG% $(LISP) $(TAGS_FILES)'; \
-       unique=`for i in $$list; do \
-## Handle VPATH correctly.
-           if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
-         done | \
-         $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
-             END { if (nonempty) { for (i in files) print i; }; }'`; \
+       $(am__define_uniq_tagged_files); \
 ## Remove the 'x' we added first:
        shift; \
 ## Make sure we have something to run etags on.
@@ -97,23 +104,16 @@ TAGS: %TAGSDIRS% $(HEADERS) $(SOURCES) %CONFIG% $(TAGS_DEPENDENCIES) \
 CTAGS = ctags
 .PHONY: CTAGS ctags
 if %?SUBDIRS%
-AM_RECURSIVE_TARGETS += ctags CTAGS
-endif %?SUBDIRS%
-ctags: CTAGS
-
-## We have a dummy name here because 'tags' has already been in use
-## for a long time to mean Emacs-style tags.  Oops.  This means the
-## dependencies here are useless.
-CTAGS: %CTAGSDIRS% $(HEADERS) $(SOURCES) %CONFIG% $(TAGS_DEPENDENCIES) \
-               $(TAGS_FILES) $(LISP)
-## Make sure the list of sources is unique.
-       list='$(SOURCES) $(HEADERS) %CONFIG% $(LISP) $(TAGS_FILES)'; \
-       unique=`for i in $$list; do \
-## Handle VPATH correctly.
-           if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
-         done | \
-         $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
-             END { if (nonempty) { for (i in files) print i; }; }'`; \
+AM_RECURSIVE_TARGETS += CTAGS
+RECURSIVE_TARGETS += ctags-recursive
+ctags: ctags-recursive
+else !%?SUBDIRS%
+ctags: ctags-am
+endif !%?SUBDIRS%
+
+CTAGS: ctags
+ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
+       $(am__define_uniq_tagged_files); \
 ## Make sure we have something to run ctags on.
        test -z "$(CTAGS_ARGS)$$unique" \
          || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
@@ -136,25 +136,26 @@ GTAGS:
 ## ------- ##
 
 if %?TOPDIR_P%
-
 CSCOPE = cscope
 .PHONY: cscope clean-cscope
 AM_RECURSIVE_TARGETS += cscope
-
 cscope: cscope.files
        test ! -s cscope.files \
          || $(CSCOPE) -b -q $(AM_CSCOPEFLAGS) $(CSCOPEFLAGS) -i cscope.files $(CSCOPE_ARGS)
-
 clean-cscope:
        -rm -f cscope.files
-
-cscope.files: clean-cscope %CSCOPEDIRS% cscopelist
-
+cscope.files: clean-cscope cscopelist
 endif %?TOPDIR_P%
 
-.PHONY: cscopelist
-cscopelist: %CSCOPEDIRS% $(HEADERS) $(SOURCES) $(LISP)
-       list='$(SOURCES) $(HEADERS) $(LISP)'; \
+if %?SUBDIRS%
+RECURSIVE_TARGETS += cscopelist-recursive
+cscopelist: cscopelist-recursive
+else !%?SUBDIRS%
+cscopelist: cscopelist-am
+endif !%?SUBDIRS%
+
+cscopelist-am: $(am__tagged_files)
+       list='$(am__tagged_files)'; \
        case "$(srcdir)" in \
          [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
          *) sdir=$(subdir)/$(srcdir) ;; \
index 4065524..1806c3e 100644 (file)
@@ -1,5 +1,5 @@
 ## automake - create Makefile.in from Makefile.am
-## Copyright (C) 1994-2012 Free Software Foundation, Inc.
+## Copyright (C) 1994-2017 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
@@ -31,25 +31,25 @@ DIST_COMMON += %VTEXI% %STAMPVTI%
 ## %STAMPVTI% is distributed and %DIRSTAMP% isn't: a distributed file
 ## should never be dependent upon a non-distributed built file.
 ## Therefore we ensure that %DIRSTAMP% exists in the rule.
-?DIRSTAMP?     test -f %DIRSTAMP% || $(MAKE) $(AM_MAKEFLAGS) %DIRSTAMP%
+## Use cp + mv so that the update of %VTEXI% is atomic even if
+## the source directory is on a different file system.
+?DIRSTAMP?     @test -f %DIRSTAMP% || $(MAKE) $(AM_MAKEFLAGS) %DIRSTAMP%
        @(dir=.; test -f ./%TEXI% || dir=$(srcdir); \
        set `$(SHELL) %MDDIR%mdate-sh $$dir/%TEXI%`; \
        echo "@set UPDATED $$1 $$2 $$3"; \
        echo "@set UPDATED-MONTH $$2 $$3"; \
        echo "@set EDITION $(VERSION)"; \
-       echo "@set VERSION $(VERSION)") > %VTI%.tmp
-## Use cp and rm here because some older "mv"s can't move across
-## filesystems.  Furthermore, GNU "mv" in the AmigaDOS environment
-## can't handle this.
-       @cmp -s %VTI%.tmp %VTEXI% \
-         || (echo "Updating %VTEXI%"; \
-             cp %VTI%.tmp %VTEXI%)
-       -@rm -f %VTI%.tmp
+       echo "@set VERSION $(VERSION)") > %VTI%.tmp$$$$ && \
+       (cmp -s %VTI%.tmp$$$$ %VTEXI% \
+         || (echo "Updating %VTEXI%" && \
+             cp %VTI%.tmp$$$$ %VTEXI%.tmp$$$$ && \
+             mv %VTEXI%.tmp$$$$ %VTEXI%)) && \
+       rm -f %VTI%.tmp$$$$ %VTEXI%.$$$$
        @cp %VTEXI% $@
 
 mostlyclean-am: mostlyclean-%VTI%
 mostlyclean-%VTI%:
-       -rm -f %VTI%.tmp
+       -rm -f %VTI%.tmp* %VTEXI%.tmp*
 
 maintainer-clean-am: maintainer-clean-%VTI%
 maintainer-clean-%VTI%:
index f77748a..6c9265b 100644 (file)
@@ -1,5 +1,5 @@
 ## automake - create Makefile.in from Makefile.am
-## Copyright (C) 1994-2012 Free Software Foundation, Inc.
+## Copyright (C) 1994-2017 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
@@ -65,14 +65,18 @@ INFO_DEPS += %DEST_INFO_PREFIX%%DEST_SUFFIX%
 ## Must set MAKEINFO like this so that version.texi will be found even
 ## if it is in srcdir (-I $(srcdir) is set in %MAKEINFOFLAGS%).
        MAKEINFO='$(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) %MAKEINFOFLAGS%' \
-## Do not use '-o' unless necessary: it is only supported since Texinfo 4.1.
 ## texi2dvi doesn't silence everything with -q, redirect to /dev/null instead.
 ## We still want -q (%TEXIQUIET%) because it turns on batch mode.
-## Use '--clean' to avoid leaving auxiliary files behind cluttering the build
-## directory (see automake bug#11146).  We should start using '--tidy' when we
-## can assume Texinf 4.9 or later.
-?GENERIC?      $(TEXI2DVI) %TEXIQUIET% --clean %SOURCE% %TEXIDEVNULL%
-?!GENERIC?     $(TEXI2DVI) %TEXIQUIET% --clean -o $@ `test -f '%SOURCE%' || echo '$(srcdir)/'`%SOURCE% %TEXIDEVNULL%
+## Use '--build-dir' so that TeX and Texinfo auxiliary files and build
+## by-products are left in there, instead of cluttering the current
+## directory (see automake bug#11146).  Use a different build-dir for
+## each file (and distinct from that of the corresponding PDF file) to
+## avoid hitting a Texinfop bug that could cause low-probability racy
+## failure when doing parallel builds; see:
+## http://lists.gnu.org/archive/html/automake-patches/2012-06/msg00073.html
+       $(TEXI2DVI) %TEXIQUIET% --build-dir=$(@:.dvi=.t2d) -o $@ %TEXIDEVNULL% \
+?GENERIC?      %SOURCE%
+?!GENERIC?     `test -f '%SOURCE%' || echo '$(srcdir)/'`%SOURCE%
 
 ?GENERIC?%SOURCE_SUFFIX%.pdf:
 ?!GENERIC?%DEST_PREFIX%.pdf: %SOURCE% %DEPS% %DIRSTAMP%
@@ -80,14 +84,18 @@ INFO_DEPS += %DEST_INFO_PREFIX%%DEST_SUFFIX%
 ## Must set MAKEINFO like this so that version.texi will be found even
 ## if it is in srcdir (-I $(srcdir) is set in %MAKEINFOFLAGS%).
        MAKEINFO='$(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) %MAKEINFOFLAGS%' \
-## Do not use '-o' unless necessary: it is only supported since Texinfo 4.1.
 ## texi2pdf doesn't silence everything with -q, redirect to /dev/null instead.
 ## We still want -q (%TEXIQUIET%) because it turns on batch mode.
-## Use '--clean' to avoid leaving auxiliary files behind cluttering the build
-## directory (see automake bug#11146).  We should start using '--tidy' when we
-## can assume Texinf 4.9 or later.
-?GENERIC?      $(TEXI2PDF) %TEXIQUIET% --clean %SOURCE% %TEXIDEVNULL%
-?!GENERIC?     $(TEXI2PDF) %TEXIQUIET% --clean -o $@ `test -f '%SOURCE%' || echo '$(srcdir)/'`%SOURCE% %TEXIDEVNULL%
+## Use '--build-dir' so that TeX and Texinfo auxiliary files and build
+## by-products are left in there, instead of cluttering the current
+## directory (see automake bug#11146).  Use a different build-dir for
+## each file (and distinct from that of the corresponding DVI file) to
+## avoid hitting a Texinfop bug that could cause low-probability racy
+## failure when doing parallel builds; see:
+## http://lists.gnu.org/archive/html/automake-patches/2012-06/msg00073.html
+       $(TEXI2PDF) %TEXIQUIET% --build-dir=$(@:.pdf=.t2p) -o $@ %TEXIDEVNULL% \
+?GENERIC?      %SOURCE%
+?!GENERIC?     `test -f '%SOURCE%' || echo '$(srcdir)/'`%SOURCE%
 
 ?GENERIC?%SOURCE_SUFFIX%.html:
 ?!GENERIC?%DEST_PREFIX%.html: %SOURCE% %DEPS% %DIRSTAMP%
@@ -102,15 +110,9 @@ INFO_DEPS += %DEST_INFO_PREFIX%%DEST_SUFFIX%
 ?GENERIC?       -o $(@:.html=.htp) %SOURCE%; \
 ?!GENERIC?      -o $(@:.html=.htp) `test -f '%SOURCE%' || echo '$(srcdir)/'`%SOURCE%; \
        then \
-         rm -rf $@; \
-## Work around a bug in Texinfo 4.1 (-o foo.html outputs files in foo/
-## instead of foo.html/).
-         if test ! -d $(@:.html=.htp) && test -d $(@:.html=); then \
-           mv $(@:.html=) $@; else mv $(@:.html=.htp) $@; fi; \
+         rm -rf $@ && mv $(@:.html=.htp) $@; \
        else \
-         if test ! -d $(@:.html=.htp) && test -d $(@:.html=); then \
-           rm -rf $(@:.html=); else rm -Rf $(@:.html=.htp) $@; fi; \
-         exit 1; \
+         rm -rf $(@:.html=.htp); exit 1; \
        fi
 
 ## If we are using the generic rules, we need separate dependencies.
index 42787c7..2997a16 100644 (file)
@@ -1,6 +1,6 @@
 ## automake - create Makefile.in from Makefile.am
 
-## Copyright (C) 1994-2012 Free Software Foundation, Inc.
+## Copyright (C) 1994-2017 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
 ## ----------- ##
 
 if %?LOCAL-TEXIS%
-if ! %?CYGNUS%
 TEXI2DVI = texi2dvi
-
-else %?CYGNUS%
-
-## Find these programs wherever they may lie.  Yes, this has
-## intimate knowledge of the structure of the texinfo distribution.
-MAKEINFO = `if test -f $(top_builddir)/../texinfo/makeinfo/makeinfo; then \
-            echo $(top_builddir)/../texinfo/makeinfo/makeinfo; \
-          else \
-            echo makeinfo; \
-          fi`
-
-TEXI2DVI = `if test -f $(top_srcdir)/../texinfo/util/texi2dvi; then \
-             echo $(top_srcdir)/../texinfo/util/texi2dvi; \
-           else \
-             echo texi2dvi; \
-           fi`
-endif %?CYGNUS%
-
 TEXI2PDF = $(TEXI2DVI) --pdf --batch
 MAKEINFOHTML = $(MAKEINFO) --html
 AM_MAKEINFOHTMLFLAGS = $(AM_MAKEINFOFLAGS)
@@ -98,13 +79,11 @@ endif ! %?LOCAL-TEXIS%
 ## if the user doesn't request it not to be run (through the
 ## 'AM_UPDATE_INFO_DIR' environment variable).  See automake bug#9773
 ## and Debian Bug#543992.
-if %?FIRST%
 am__can_run_installinfo = \
   case $$AM_UPDATE_INFO_DIR in \
     n|no|NO) false;; \
     *) (install-info --version) >/dev/null 2>&1;; \
   esac
-endif
 
 ## Look in both . and srcdir because the info pages might have been
 ## rebuilt in the build directory.  Can't cd to srcdir; that might
@@ -405,13 +384,14 @@ if %?LOCAL-TEXIS%
 .PHONY: mostlyclean-aminfo
 mostlyclean-aminfo:
 ## Use '-rf', not just '-f', because the %*CLEAN% substitutions can also
-## contain any directory created by "makeinfo --html".
+## contain any directory created by "makeinfo --html", as well as the
+## '*.t2d' and '*.t2p' directories used by texi2dvi and texi2pdf.
        -rm -rf %MOSTLYCLEAN%
 
 .PHONY clean-am: clean-aminfo
 clean-aminfo:
-## Use '-rf', not just '-f', because the %*CLEAN% substitutions can also
-## contain any directory created by "makeinfo --html".
+## Use '-rf', not just '-f'; see comments in 'mostlyclean-aminfo'
+## above for details.
 ?TEXICLEAN?    -test -z "%TEXICLEAN%" \
 ?TEXICLEAN?    || rm -rf %TEXICLEAN%
 
@@ -423,11 +403,9 @@ maintainer-clean-aminfo:
          echo " rm -f $$i $$i-[0-9] $$i-[0-9][0-9] $$i_i[0-9] $$i_i[0-9][0-9]"; \
          rm -f $$i $$i-[0-9] $$i-[0-9][0-9] $$i_i[0-9] $$i_i[0-9][0-9]; \
        done
-## Use '-rf', not just '-f', because the %*CLEAN% substitutions can also
-## contain any directory created by "makeinfo --html".
+## Use '-rf', not just '-f'; see comments in 'mostlyclean-aminfo'
+## above for details.
 ?MAINTCLEAN?   -test -z "%MAINTCLEAN%" \
 ?MAINTCLEAN?   || rm -rf %MAINTCLEAN%
 
-?CYGNUS?.PHONY: clean-info
-?CYGNUS?clean-info: mostlyclean-aminfo clean-aminfo
 endif %?LOCAL-TEXIS%
index b4d0190..836e12e 100644 (file)
@@ -1,5 +1,5 @@
 ## automake - create Makefile.in from Makefile.am
-## Copyright (C) 2008-2012 Free Software Foundation, Inc.
+## Copyright (C) 2008-2017 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 e74259f..be1bf77 100644 (file)
@@ -1,5 +1,5 @@
 ## automake - create Makefile.in from Makefile.am
-## Copyright (C) 1998-2012 Free Software Foundation, Inc.
+## Copyright (C) 1998-2017 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 67f5f36..05094d3 100755 (executable)
@@ -4,7 +4,7 @@
 me=ar-lib
 scriptversion=2012-03-01.08; # UTC
 
-# Copyright (C) 2010-2012 Free Software Foundation, Inc.
+# Copyright (C) 2010-2017 Free Software Foundation, Inc.
 # Written by Peter Rosin <peda@lysator.liu.se>.
 #
 # This program is free software; you can redistribute it and/or modify
index 7b4a9a7..2ab71e4 100755 (executable)
@@ -1,9 +1,9 @@
 #! /bin/sh
 # Wrapper for compilers which do not understand '-c -o'.
 
-scriptversion=2012-03-05.13; # UTC
+scriptversion=2016-01-11.22; # UTC
 
-# Copyright (C) 1999-2012 Free Software Foundation, Inc.
+# Copyright (C) 1999-2017 Free Software Foundation, Inc.
 # Written by Tom Tromey <tromey@cygnus.com>.
 #
 # This program is free software; you can redistribute it and/or modify
@@ -112,6 +112,11 @@ func_cl_dashl ()
       lib=$dir/$lib.lib
       break
     fi
+    if test -f "$dir/lib$lib.a"; then
+      found=yes
+      lib=$dir/lib$lib.a
+      break
+    fi
   done
   IFS=$save_IFS
 
@@ -250,7 +255,8 @@ EOF
     echo "compile $scriptversion"
     exit $?
     ;;
-  cl | *[/\\]cl | cl.exe | *[/\\]cl.exe )
+  cl | *[/\\]cl | cl.exe | *[/\\]cl.exe | \
+  icl | *[/\\]icl | icl.exe | *[/\\]icl.exe )
     func_cl_wrapper "$@"      # Doesn't return...
     ;;
 esac
@@ -337,6 +343,6 @@ exit $ret
 # eval: (add-hook 'write-file-hooks 'time-stamp)
 # time-stamp-start: "scriptversion="
 # time-stamp-format: "%:y-%02m-%02d.%02H"
-# time-stamp-time-zone: "UTC"
+# time-stamp-time-zone: "UTC0"
 # time-stamp-end: "; # UTC"
 # End:
index d622a44..2193702 100755 (executable)
@@ -1,14 +1,12 @@
 #! /bin/sh
 # Attempt to guess a canonical system name.
-#   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
-#   2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
-#   2011, 2012 Free Software Foundation, Inc.
+#   Copyright 1992-2017 Free Software Foundation, Inc.
 
-timestamp='2012-02-10'
+timestamp='2017-05-27'
 
 # This file 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 of the License, or
+# the Free Software Foundation; either version 3 of the License, or
 # (at your option) any later version.
 #
 # This program is distributed in the hope that it will be useful, but
@@ -22,19 +20,17 @@ timestamp='2012-02-10'
 # As a special exception to the GNU General Public License, if you
 # distribute this file as part of a program that contains a
 # configuration script generated by Autoconf, you may include it under
-# the same distribution terms that you use for the rest of that program.
-
-
-# Originally written by Per Bothner.  Please send patches (context
-# diff format) to <config-patches@gnu.org> and include a ChangeLog
-# entry.
+# the same distribution terms that you use for the rest of that
+# program.  This Exception is an additional permission under section 7
+# of the GNU General Public License, version 3 ("GPLv3").
 #
-# This script attempts to guess a canonical system name similar to
-# config.sub.  If it succeeds, it prints the system name on stdout, and
-# exits with 0.  Otherwise, it exits with 1.
+# Originally written by Per Bothner; maintained since 2000 by Ben Elliston.
 #
 # You can get the latest version of this script from:
-# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
+# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess
+#
+# Please send patches to <config-patches@gnu.org>.
+
 
 me=`echo "$0" | sed -e 's,.*/,,'`
 
@@ -54,9 +50,7 @@ version="\
 GNU config.guess ($timestamp)
 
 Originally written by Per Bothner.
-Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
-2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012
-Free Software Foundation, Inc.
+Copyright 1992-2017 Free Software Foundation, Inc.
 
 This is free software; see the source for copying conditions.  There is NO
 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
@@ -138,6 +132,27 @@ UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
 UNAME_SYSTEM=`(uname -s) 2>/dev/null`  || UNAME_SYSTEM=unknown
 UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
 
+case "${UNAME_SYSTEM}" in
+Linux|GNU|GNU/*)
+       # If the system lacks a compiler, then just pick glibc.
+       # We could probably try harder.
+       LIBC=gnu
+
+       eval $set_cc_for_build
+       cat <<-EOF > $dummy.c
+       #include <features.h>
+       #if defined(__UCLIBC__)
+       LIBC=uclibc
+       #elif defined(__dietlibc__)
+       LIBC=dietlibc
+       #else
+       LIBC=gnu
+       #endif
+       EOF
+       eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC' | sed 's, ,,g'`
+       ;;
+esac
+
 # Note: order is significant - the case branches are not exclusive.
 
 case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
@@ -153,19 +168,29 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
        # Note: NetBSD doesn't particularly care about the vendor
        # portion of the name.  We always set it to "unknown".
        sysctl="sysctl -n hw.machine_arch"
-       UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \
-           /usr/sbin/$sysctl 2>/dev/null || echo unknown)`
+       UNAME_MACHINE_ARCH=`(uname -p 2>/dev/null || \
+           /sbin/$sysctl 2>/dev/null || \
+           /usr/sbin/$sysctl 2>/dev/null || \
+           echo unknown)`
        case "${UNAME_MACHINE_ARCH}" in
            armeb) machine=armeb-unknown ;;
            arm*) machine=arm-unknown ;;
            sh3el) machine=shl-unknown ;;
            sh3eb) machine=sh-unknown ;;
            sh5el) machine=sh5le-unknown ;;
+           earmv*)
+               arch=`echo ${UNAME_MACHINE_ARCH} | sed -e 's,^e\(armv[0-9]\).*$,\1,'`
+               endian=`echo ${UNAME_MACHINE_ARCH} | sed -ne 's,^.*\(eb\)$,\1,p'`
+               machine=${arch}${endian}-unknown
+               ;;
            *) machine=${UNAME_MACHINE_ARCH}-unknown ;;
        esac
        # The Operating System including object format, if it has switched
-       # to ELF recently, or will in the future.
+       # to ELF recently (or will in the future) and ABI.
        case "${UNAME_MACHINE_ARCH}" in
+           earm*)
+               os=netbsdelf
+               ;;
            arm*|i386|m68k|ns32k|sh3*|sparc|vax)
                eval $set_cc_for_build
                if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
@@ -182,6 +207,13 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
                os=netbsd
                ;;
        esac
+       # Determine ABI tags.
+       case "${UNAME_MACHINE_ARCH}" in
+           earm*)
+               expr='s/^earmv[0-9]/-eabi/;s/eb$//'
+               abi=`echo ${UNAME_MACHINE_ARCH} | sed -e "$expr"`
+               ;;
+       esac
        # The OS release
        # Debian GNU/NetBSD machines have a different userland, and
        # thus, need a distinct triplet. However, they do not need
@@ -192,18 +224,26 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
                release='-gnu'
                ;;
            *)
-               release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
+               release=`echo ${UNAME_RELEASE} | sed -e 's/[-_].*//' | cut -d. -f1,2`
                ;;
        esac
        # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM:
        # contains redundant information, the shorter form:
        # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
-       echo "${machine}-${os}${release}"
+       echo "${machine}-${os}${release}${abi}"
+       exit ;;
+    *:Bitrig:*:*)
+       UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'`
+       echo ${UNAME_MACHINE_ARCH}-unknown-bitrig${UNAME_RELEASE}
        exit ;;
     *:OpenBSD:*:*)
        UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'`
        echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE}
        exit ;;
+    *:LibertyBSD:*:*)
+       UNAME_MACHINE_ARCH=`arch | sed 's/^.*BSD\.//'`
+       echo ${UNAME_MACHINE_ARCH}-unknown-libertybsd${UNAME_RELEASE}
+       exit ;;
     *:ekkoBSD:*:*)
        echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE}
        exit ;;
@@ -216,6 +256,9 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
     *:MirBSD:*:*)
        echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE}
        exit ;;
+    *:Sortix:*:*)
+       echo ${UNAME_MACHINE}-unknown-sortix
+       exit ;;
     alpha:OSF1:*:*)
        case $UNAME_RELEASE in
        *4.0)
@@ -232,42 +275,42 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
        ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^  The alpha \(.*\) processor.*$/\1/p' | head -n 1`
        case "$ALPHA_CPU_TYPE" in
            "EV4 (21064)")
-               UNAME_MACHINE="alpha" ;;
+               UNAME_MACHINE=alpha ;;
            "EV4.5 (21064)")
-               UNAME_MACHINE="alpha" ;;
+               UNAME_MACHINE=alpha ;;
            "LCA4 (21066/21068)")
-               UNAME_MACHINE="alpha" ;;
+               UNAME_MACHINE=alpha ;;
            "EV5 (21164)")
-               UNAME_MACHINE="alphaev5" ;;
+               UNAME_MACHINE=alphaev5 ;;
            "EV5.6 (21164A)")
-               UNAME_MACHINE="alphaev56" ;;
+               UNAME_MACHINE=alphaev56 ;;
            "EV5.6 (21164PC)")
-               UNAME_MACHINE="alphapca56" ;;
+               UNAME_MACHINE=alphapca56 ;;
            "EV5.7 (21164PC)")
-               UNAME_MACHINE="alphapca57" ;;
+               UNAME_MACHINE=alphapca57 ;;
            "EV6 (21264)")
-               UNAME_MACHINE="alphaev6" ;;
+               UNAME_MACHINE=alphaev6 ;;
            "EV6.7 (21264A)")
-               UNAME_MACHINE="alphaev67" ;;
+               UNAME_MACHINE=alphaev67 ;;
            "EV6.8CB (21264C)")
-               UNAME_MACHINE="alphaev68" ;;
+               UNAME_MACHINE=alphaev68 ;;
            "EV6.8AL (21264B)")
-               UNAME_MACHINE="alphaev68" ;;
+               UNAME_MACHINE=alphaev68 ;;
            "EV6.8CX (21264D)")
-               UNAME_MACHINE="alphaev68" ;;
+               UNAME_MACHINE=alphaev68 ;;
            "EV6.9A (21264/EV69A)")
-               UNAME_MACHINE="alphaev69" ;;
+               UNAME_MACHINE=alphaev69 ;;
            "EV7 (21364)")
-               UNAME_MACHINE="alphaev7" ;;
+               UNAME_MACHINE=alphaev7 ;;
            "EV7.9 (21364A)")
-               UNAME_MACHINE="alphaev79" ;;
+               UNAME_MACHINE=alphaev79 ;;
        esac
        # A Pn.n version is a patched version.
        # A Vn.n version is a released version.
        # A Tn.n version is a released field test version.
        # A Xn.n version is an unreleased experimental baselevel.
        # 1.2 uses "1.2" for uname -r.
-       echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+       echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz`
        # Reset EXIT trap before exiting to avoid spurious non-zero exit code.
        exitcode=$?
        trap '' 0
@@ -302,7 +345,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
     arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
        echo arm-acorn-riscix${UNAME_RELEASE}
        exit ;;
-    arm:riscos:*:*|arm:RISCOS:*:*)
+    arm*:riscos:*:*|arm*:RISCOS:*:*)
        echo arm-unknown-riscos
        exit ;;
     SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*)
@@ -340,16 +383,16 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
        exit ;;
     i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*)
        eval $set_cc_for_build
-       SUN_ARCH="i386"
+       SUN_ARCH=i386
        # If there is a compiler, see if it is configured for 64-bit objects.
        # Note that the Sun cc does not turn __LP64__ into 1 like gcc does.
        # This test works for both compilers.
-       if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
+       if [ "$CC_FOR_BUILD" != no_compiler_found ]; then
            if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \
-               (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
+               (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \
                grep IS_64BIT_ARCH >/dev/null
            then
-               SUN_ARCH="x86_64"
+               SUN_ARCH=x86_64
            fi
        fi
        echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
@@ -374,7 +417,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
        exit ;;
     sun*:*:4.2BSD:*)
        UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
-       test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3
+       test "x${UNAME_RELEASE}" = x && UNAME_RELEASE=3
        case "`/bin/arch`" in
            sun3)
                echo m68k-sun-sunos${UNAME_RELEASE}
@@ -560,8 +603,9 @@ EOF
        else
                IBM_ARCH=powerpc
        fi
-       if [ -x /usr/bin/oslevel ] ; then
-               IBM_REV=`/usr/bin/oslevel`
+       if [ -x /usr/bin/lslpp ] ; then
+               IBM_REV=`/usr/bin/lslpp -Lqc bos.rte.libc |
+                          awk -F: '{ print $3 }' | sed s/[0-9]*$/0/`
        else
                IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
        fi
@@ -598,13 +642,13 @@ EOF
                    sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
                    sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
                    case "${sc_cpu_version}" in
-                     523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0
-                     528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1
+                     523) HP_ARCH=hppa1.0 ;; # CPU_PA_RISC1_0
+                     528) HP_ARCH=hppa1.1 ;; # CPU_PA_RISC1_1
                      532)                      # CPU_PA_RISC2_0
                        case "${sc_kernel_bits}" in
-                         32) HP_ARCH="hppa2.0n" ;;
-                         64) HP_ARCH="hppa2.0w" ;;
-                         '') HP_ARCH="hppa2.0" ;;   # HP-UX 10.20
+                         32) HP_ARCH=hppa2.0n ;;
+                         64) HP_ARCH=hppa2.0w ;;
+                         '') HP_ARCH=hppa2.0 ;;   # HP-UX 10.20
                        esac ;;
                    esac
                fi
@@ -643,11 +687,11 @@ EOF
                    exit (0);
                }
 EOF
-                   (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy`
+                   (CCOPTS="" $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy`
                    test -z "$HP_ARCH" && HP_ARCH=hppa
                fi ;;
        esac
-       if [ ${HP_ARCH} = "hppa2.0w" ]
+       if [ ${HP_ARCH} = hppa2.0w ]
        then
            eval $set_cc_for_build
 
@@ -660,12 +704,12 @@ EOF
            # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess
            # => hppa64-hp-hpux11.23
 
-           if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) |
+           if echo __LP64__ | (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) |
                grep -q __LP64__
            then
-               HP_ARCH="hppa2.0w"
+               HP_ARCH=hppa2.0w
            else
-               HP_ARCH="hppa64"
+               HP_ARCH=hppa64
            fi
        fi
        echo ${HP_ARCH}-hp-hpux${HPUX_REV}
@@ -770,14 +814,14 @@ EOF
        echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
        exit ;;
     F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
-       FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
-       FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
+       FUJITSU_PROC=`uname -m | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz`
+       FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'`
        FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
        echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
        exit ;;
     5000:UNIX_System_V:4.*:*)
-       FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
-       FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'`
+       FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'`
+       FUJITSU_REL=`echo ${UNAME_RELEASE} | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/ /_/'`
        echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
        exit ;;
     i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
@@ -793,18 +837,22 @@ EOF
        UNAME_PROCESSOR=`/usr/bin/uname -p`
        case ${UNAME_PROCESSOR} in
            amd64)
-               echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
-           *)
-               echo ${UNAME_PROCESSOR}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
+               UNAME_PROCESSOR=x86_64 ;;
+           i386)
+               UNAME_PROCESSOR=i586 ;;
        esac
+       echo ${UNAME_PROCESSOR}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
        exit ;;
     i*:CYGWIN*:*)
        echo ${UNAME_MACHINE}-pc-cygwin
        exit ;;
+    *:MINGW64*:*)
+       echo ${UNAME_MACHINE}-pc-mingw64
+       exit ;;
     *:MINGW*:*)
        echo ${UNAME_MACHINE}-pc-mingw32
        exit ;;
-    i*:MSYS*:*)
+    *:MSYS*:*)
        echo ${UNAME_MACHINE}-pc-msys
        exit ;;
     i*:windows32*:*)
@@ -852,21 +900,21 @@ EOF
        exit ;;
     *:GNU:*:*)
        # the GNU system
-       echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
+       echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-${LIBC}`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
        exit ;;
     *:GNU/*:*:*)
        # other systems with GNU libc and userland
-       echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu
+       echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr "[:upper:]" "[:lower:]"``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-${LIBC}
        exit ;;
     i*86:Minix:*:*)
        echo ${UNAME_MACHINE}-pc-minix
        exit ;;
     aarch64:Linux:*:*)
-       echo ${UNAME_MACHINE}-unknown-linux-gnu
+       echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
        exit ;;
     aarch64_be:Linux:*:*)
        UNAME_MACHINE=aarch64_be
-       echo ${UNAME_MACHINE}-unknown-linux-gnu
+       echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
        exit ;;
     alpha:Linux:*:*)
        case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
@@ -879,59 +927,60 @@ EOF
          EV68*) UNAME_MACHINE=alphaev68 ;;
        esac
        objdump --private-headers /bin/sh | grep -q ld.so.1
-       if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
-       echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
+       if test "$?" = 0 ; then LIBC=gnulibc1 ; fi
+       echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+       exit ;;
+    arc:Linux:*:* | arceb:Linux:*:*)
+       echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
        exit ;;
     arm*:Linux:*:*)
        eval $set_cc_for_build
        if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \
            | grep -q __ARM_EABI__
        then
-           echo ${UNAME_MACHINE}-unknown-linux-gnu
+           echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
        else
            if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \
                | grep -q __ARM_PCS_VFP
            then
-               echo ${UNAME_MACHINE}-unknown-linux-gnueabi
+               echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabi
            else
-               echo ${UNAME_MACHINE}-unknown-linux-gnueabihf
+               echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabihf
            fi
        fi
        exit ;;
     avr32*:Linux:*:*)
-       echo ${UNAME_MACHINE}-unknown-linux-gnu
+       echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
        exit ;;
     cris:Linux:*:*)
-       echo ${UNAME_MACHINE}-axis-linux-gnu
+       echo ${UNAME_MACHINE}-axis-linux-${LIBC}
        exit ;;
     crisv32:Linux:*:*)
-       echo ${UNAME_MACHINE}-axis-linux-gnu
+       echo ${UNAME_MACHINE}-axis-linux-${LIBC}
+       exit ;;
+    e2k:Linux:*:*)
+       echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
        exit ;;
     frv:Linux:*:*)
-       echo ${UNAME_MACHINE}-unknown-linux-gnu
+       echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
        exit ;;
     hexagon:Linux:*:*)
-       echo ${UNAME_MACHINE}-unknown-linux-gnu
+       echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
        exit ;;
     i*86:Linux:*:*)
-       LIBC=gnu
-       eval $set_cc_for_build
-       sed 's/^        //' << EOF >$dummy.c
-       #ifdef __dietlibc__
-       LIBC=dietlibc
-       #endif
-EOF
-       eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'`
-       echo "${UNAME_MACHINE}-pc-linux-${LIBC}"
+       echo ${UNAME_MACHINE}-pc-linux-${LIBC}
        exit ;;
     ia64:Linux:*:*)
-       echo ${UNAME_MACHINE}-unknown-linux-gnu
+       echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+       exit ;;
+    k1om:Linux:*:*)
+       echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
        exit ;;
     m32r*:Linux:*:*)
-       echo ${UNAME_MACHINE}-unknown-linux-gnu
+       echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
        exit ;;
     m68*:Linux:*:*)
-       echo ${UNAME_MACHINE}-unknown-linux-gnu
+       echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
        exit ;;
     mips:Linux:*:* | mips64:Linux:*:*)
        eval $set_cc_for_build
@@ -950,54 +999,69 @@ EOF
        #endif
 EOF
        eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'`
-       test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
+       test x"${CPU}" != x && { echo "${CPU}-unknown-linux-${LIBC}"; exit; }
        ;;
-    or32:Linux:*:*)
-       echo ${UNAME_MACHINE}-unknown-linux-gnu
+    mips64el:Linux:*:*)
+       echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+       exit ;;
+    openrisc*:Linux:*:*)
+       echo or1k-unknown-linux-${LIBC}
+       exit ;;
+    or32:Linux:*:* | or1k*:Linux:*:*)
+       echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
        exit ;;
     padre:Linux:*:*)
-       echo sparc-unknown-linux-gnu
+       echo sparc-unknown-linux-${LIBC}
        exit ;;
     parisc64:Linux:*:* | hppa64:Linux:*:*)
-       echo hppa64-unknown-linux-gnu
+       echo hppa64-unknown-linux-${LIBC}
        exit ;;
     parisc:Linux:*:* | hppa:Linux:*:*)
        # Look for CPU level
        case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
-         PA7*) echo hppa1.1-unknown-linux-gnu ;;
-         PA8*) echo hppa2.0-unknown-linux-gnu ;;
-         *)    echo hppa-unknown-linux-gnu ;;
+         PA7*) echo hppa1.1-unknown-linux-${LIBC} ;;
+         PA8*) echo hppa2.0-unknown-linux-${LIBC} ;;
+         *)    echo hppa-unknown-linux-${LIBC} ;;
        esac
        exit ;;
     ppc64:Linux:*:*)
-       echo powerpc64-unknown-linux-gnu
+       echo powerpc64-unknown-linux-${LIBC}
        exit ;;
     ppc:Linux:*:*)
-       echo powerpc-unknown-linux-gnu
+       echo powerpc-unknown-linux-${LIBC}
+       exit ;;
+    ppc64le:Linux:*:*)
+       echo powerpc64le-unknown-linux-${LIBC}
+       exit ;;
+    ppcle:Linux:*:*)
+       echo powerpcle-unknown-linux-${LIBC}
+       exit ;;
+    riscv32:Linux:*:* | riscv64:Linux:*:*)
+       echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
        exit ;;
     s390:Linux:*:* | s390x:Linux:*:*)
-       echo ${UNAME_MACHINE}-ibm-linux
+       echo ${UNAME_MACHINE}-ibm-linux-${LIBC}
        exit ;;
     sh64*:Linux:*:*)
-       echo ${UNAME_MACHINE}-unknown-linux-gnu
+       echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
        exit ;;
     sh*:Linux:*:*)
-       echo ${UNAME_MACHINE}-unknown-linux-gnu
+       echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
        exit ;;
     sparc:Linux:*:* | sparc64:Linux:*:*)
-       echo ${UNAME_MACHINE}-unknown-linux-gnu
+       echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
        exit ;;
     tile*:Linux:*:*)
-       echo ${UNAME_MACHINE}-unknown-linux-gnu
+       echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
        exit ;;
     vax:Linux:*:*)
-       echo ${UNAME_MACHINE}-dec-linux-gnu
+       echo ${UNAME_MACHINE}-dec-linux-${LIBC}
        exit ;;
     x86_64:Linux:*:*)
-       echo ${UNAME_MACHINE}-unknown-linux-gnu
+       echo ${UNAME_MACHINE}-pc-linux-${LIBC}
        exit ;;
     xtensa*:Linux:*:*)
-       echo ${UNAME_MACHINE}-unknown-linux-gnu
+       echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
        exit ;;
     i*86:DYNIX/ptx:4*:*)
        # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
@@ -1073,7 +1137,7 @@ EOF
        # uname -m prints for DJGPP always 'pc', but it prints nothing about
        # the processor, so we play safe by assuming i586.
        # Note: whatever this is, it MUST be the same as what config.sub
-       # prints for the "djgpp" host, or else GDB configury will decide that
+       # prints for the "djgpp" host, or else GDB configure will decide that
        # this is a cross-build.
        echo i586-pc-msdosdjgpp
        exit ;;
@@ -1201,6 +1265,9 @@ EOF
     BePC:Haiku:*:*)    # Haiku running on Intel PC compatible.
        echo i586-pc-haiku
        exit ;;
+    x86_64:Haiku:*:*)
+       echo x86_64-unknown-haiku
+       exit ;;
     SX-4:SUPER-UX:*:*)
        echo sx4-nec-superux${UNAME_RELEASE}
        exit ;;
@@ -1219,6 +1286,9 @@ EOF
     SX-8R:SUPER-UX:*:*)
        echo sx8r-nec-superux${UNAME_RELEASE}
        exit ;;
+    SX-ACE:SUPER-UX:*:*)
+       echo sxace-nec-superux${UNAME_RELEASE}
+       exit ;;
     Power*:Rhapsody:*:*)
        echo powerpc-apple-rhapsody${UNAME_RELEASE}
        exit ;;
@@ -1227,24 +1297,43 @@ EOF
        exit ;;
     *:Darwin:*:*)
        UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
-       case $UNAME_PROCESSOR in
-           i386)
-               eval $set_cc_for_build
-               if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
-                 if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
-                     (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
-                     grep IS_64BIT_ARCH >/dev/null
-                 then
-                     UNAME_PROCESSOR="x86_64"
-                 fi
-               fi ;;
-           unknown) UNAME_PROCESSOR=powerpc ;;
-       esac
+       eval $set_cc_for_build
+       if test "$UNAME_PROCESSOR" = unknown ; then
+           UNAME_PROCESSOR=powerpc
+       fi
+       if test `echo "$UNAME_RELEASE" | sed -e 's/\..*//'` -le 10 ; then
+           if [ "$CC_FOR_BUILD" != no_compiler_found ]; then
+               if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
+                      (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \
+                      grep IS_64BIT_ARCH >/dev/null
+               then
+                   case $UNAME_PROCESSOR in
+                       i386) UNAME_PROCESSOR=x86_64 ;;
+                       powerpc) UNAME_PROCESSOR=powerpc64 ;;
+                   esac
+               fi
+               # On 10.4-10.6 one might compile for PowerPC via gcc -arch ppc
+               if (echo '#ifdef __POWERPC__'; echo IS_PPC; echo '#endif') | \
+                      (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \
+                      grep IS_PPC >/dev/null
+               then
+                   UNAME_PROCESSOR=powerpc
+               fi
+           fi
+       elif test "$UNAME_PROCESSOR" = i386 ; then
+           # Avoid executing cc on OS X 10.9, as it ships with a stub
+           # that puts up a graphical alert prompting to install
+           # developer tools.  Any system running Mac OS X 10.7 or
+           # later (Darwin 11 and later) is required to have a 64-bit
+           # processor. This is not true of the ARM version of Darwin
+           # that Apple uses in portable devices.
+           UNAME_PROCESSOR=x86_64
+       fi
        echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
        exit ;;
     *:procnto*:*:* | *:QNX:[0123456789]*:*)
        UNAME_PROCESSOR=`uname -p`
-       if test "$UNAME_PROCESSOR" = "x86"; then
+       if test "$UNAME_PROCESSOR" = x86; then
                UNAME_PROCESSOR=i386
                UNAME_MACHINE=pc
        fi
@@ -1253,15 +1342,18 @@ EOF
     *:QNX:*:4*)
        echo i386-pc-qnx
        exit ;;
-    NEO-?:NONSTOP_KERNEL:*:*)
+    NEO-*:NONSTOP_KERNEL:*:*)
        echo neo-tandem-nsk${UNAME_RELEASE}
        exit ;;
-    NSE-?:NONSTOP_KERNEL:*:*)
+    NSE-*:NONSTOP_KERNEL:*:*)
        echo nse-tandem-nsk${UNAME_RELEASE}
        exit ;;
-    NSR-?:NONSTOP_KERNEL:*:*)
+    NSR-*:NONSTOP_KERNEL:*:*)
        echo nsr-tandem-nsk${UNAME_RELEASE}
        exit ;;
+    NSX-*:NONSTOP_KERNEL:*:*)
+       echo nsx-tandem-nsk${UNAME_RELEASE}
+       exit ;;
     *:NonStop-UX:*:*)
        echo mips-compaq-nonstopux
        exit ;;
@@ -1275,7 +1367,7 @@ EOF
        # "uname -m" is not consistent, so use $cputype instead. 386
        # is converted to i386 for consistency with other x86
        # operating systems.
-       if test "$cputype" = "386"; then
+       if test "$cputype" = 386; then
            UNAME_MACHINE=i386
        else
            UNAME_MACHINE="$cputype"
@@ -1317,7 +1409,7 @@ EOF
        echo i386-pc-xenix
        exit ;;
     i*86:skyos:*:*)
-       echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//'
+       echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE} | sed -e 's/ .*$//'`
        exit ;;
     i*86:rdos:*:*)
        echo ${UNAME_MACHINE}-pc-rdos
@@ -1328,174 +1420,25 @@ EOF
     x86_64:VMkernel:*:*)
        echo ${UNAME_MACHINE}-unknown-esx
        exit ;;
-esac
-
-#echo '(No uname command or uname output not recognized.)' 1>&2
-#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2
-
-eval $set_cc_for_build
-cat >$dummy.c <<EOF
-#ifdef _SEQUENT_
-# include <sys/types.h>
-# include <sys/utsname.h>
-#endif
-main ()
-{
-#if defined (sony)
-#if defined (MIPSEB)
-  /* BFD wants "bsd" instead of "newsos".  Perhaps BFD should be changed,
-     I don't know....  */
-  printf ("mips-sony-bsd\n"); exit (0);
-#else
-#include <sys/param.h>
-  printf ("m68k-sony-newsos%s\n",
-#ifdef NEWSOS4
-       "4"
-#else
-       ""
-#endif
-       ); exit (0);
-#endif
-#endif
-
-#if defined (__arm) && defined (__acorn) && defined (__unix)
-  printf ("arm-acorn-riscix\n"); exit (0);
-#endif
-
-#if defined (hp300) && !defined (hpux)
-  printf ("m68k-hp-bsd\n"); exit (0);
-#endif
-
-#if defined (NeXT)
-#if !defined (__ARCHITECTURE__)
-#define __ARCHITECTURE__ "m68k"
-#endif
-  int version;
-  version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`;
-  if (version < 4)
-    printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version);
-  else
-    printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version);
-  exit (0);
-#endif
-
-#if defined (MULTIMAX) || defined (n16)
-#if defined (UMAXV)
-  printf ("ns32k-encore-sysv\n"); exit (0);
-#else
-#if defined (CMU)
-  printf ("ns32k-encore-mach\n"); exit (0);
-#else
-  printf ("ns32k-encore-bsd\n"); exit (0);
-#endif
-#endif
-#endif
-
-#if defined (__386BSD__)
-  printf ("i386-pc-bsd\n"); exit (0);
-#endif
-
-#if defined (sequent)
-#if defined (i386)
-  printf ("i386-sequent-dynix\n"); exit (0);
-#endif
-#if defined (ns32000)
-  printf ("ns32k-sequent-dynix\n"); exit (0);
-#endif
-#endif
-
-#if defined (_SEQUENT_)
-    struct utsname un;
-
-    uname(&un);
-
-    if (strncmp(un.version, "V2", 2) == 0) {
-       printf ("i386-sequent-ptx2\n"); exit (0);
-    }
-    if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */
-       printf ("i386-sequent-ptx1\n"); exit (0);
-    }
-    printf ("i386-sequent-ptx\n"); exit (0);
-
-#endif
-
-#if defined (vax)
-# if !defined (ultrix)
-#  include <sys/param.h>
-#  if defined (BSD)
-#   if BSD == 43
-      printf ("vax-dec-bsd4.3\n"); exit (0);
-#   else
-#    if BSD == 199006
-      printf ("vax-dec-bsd4.3reno\n"); exit (0);
-#    else
-      printf ("vax-dec-bsd\n"); exit (0);
-#    endif
-#   endif
-#  else
-    printf ("vax-dec-bsd\n"); exit (0);
-#  endif
-# else
-    printf ("vax-dec-ultrix\n"); exit (0);
-# endif
-#endif
-
-#if defined (alliant) && defined (i860)
-  printf ("i860-alliant-bsd\n"); exit (0);
-#endif
-
-  exit (1);
-}
-EOF
-
-$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` &&
-       { echo "$SYSTEM_NAME"; exit; }
-
-# Apollos put the system type in the environment.
-
-test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; }
-
-# Convex versions that predate uname can use getsysinfo(1)
-
-if [ -x /usr/convex/getsysinfo ]
-then
-    case `getsysinfo -f cpu_type` in
-    c1*)
-       echo c1-convex-bsd
-       exit ;;
-    c2*)
-       if getsysinfo -f scalar_acc
-       then echo c32-convex-bsd
-       else echo c2-convex-bsd
-       fi
-       exit ;;
-    c34*)
-       echo c34-convex-bsd
-       exit ;;
-    c38*)
-       echo c38-convex-bsd
+    amd64:Isilon\ OneFS:*:*)
+       echo x86_64-unknown-onefs
        exit ;;
-    c4*)
-       echo c4-convex-bsd
-       exit ;;
-    esac
-fi
+esac
 
 cat >&2 <<EOF
 $0: unable to guess system type
 
-This script, last modified $timestamp, has failed to recognize
-the operating system you are using. It is advised that you
-download the most up to date version of the config scripts from
+This script (version $timestamp), has failed to recognize the
+operating system you are using. If your script is old, overwrite
+config.guess and config.sub with the latest versions from:
 
-  http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
+  http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess
 and
-  http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD
+  http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub
 
-If the version you run ($0) is already up to date, please
-send the following data and any information you think might be
-pertinent to <config-patches@gnu.org> in order to provide the needed
-information to handle your system.
+If $0 has already been updated, send the following data and any
+information you think might be pertinent to config-patches@gnu.org to
+provide the necessary information to handle your system.
 
 config.guess timestamp = $timestamp
 
index 59bb593..40ea5df 100755 (executable)
@@ -1,24 +1,18 @@
 #! /bin/sh
 # Configuration validation subroutine script.
-#   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
-#   2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
-#   2011, 2012 Free Software Foundation, Inc.
+#   Copyright 1992-2017 Free Software Foundation, Inc.
 
-timestamp='2012-04-18'
+timestamp='2017-04-02'
 
-# This file is (in principle) common to ALL GNU software.
-# The presence of a machine in this file suggests that SOME GNU software
-# can handle that machine.  It does not imply ALL GNU software can.
-#
-# This file 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 of the License, or
+# This file 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 3 of the License, 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.
+# 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/>.
@@ -26,11 +20,12 @@ timestamp='2012-04-18'
 # As a special exception to the GNU General Public License, if you
 # distribute this file as part of a program that contains a
 # configuration script generated by Autoconf, you may include it under
-# the same distribution terms that you use for the rest of that program.
+# the same distribution terms that you use for the rest of that
+# program.  This Exception is an additional permission under section 7
+# of the GNU General Public License, version 3 ("GPLv3").
 
 
-# Please send patches to <config-patches@gnu.org>.  Submit a context
-# diff and a properly formatted GNU ChangeLog entry.
+# Please send patches to <config-patches@gnu.org>.
 #
 # Configuration subroutine to validate and canonicalize a configuration type.
 # Supply the specified configuration type as an argument.
@@ -38,7 +33,7 @@ timestamp='2012-04-18'
 # Otherwise, we print the canonical config type on stdout and succeed.
 
 # You can get the latest version of this script from:
-# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD
+# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub
 
 # This file is supposed to be the same for all GNU packages
 # and recognize all the CPU types, system types and aliases
@@ -58,8 +53,7 @@ timestamp='2012-04-18'
 me=`echo "$0" | sed -e 's,.*/,,'`
 
 usage="\
-Usage: $0 [OPTION] CPU-MFR-OPSYS
-       $0 [OPTION] ALIAS
+Usage: $0 [OPTION] CPU-MFR-OPSYS or ALIAS
 
 Canonicalize a configuration name.
 
@@ -73,9 +67,7 @@ Report bugs and patches to <config-patches@gnu.org>."
 version="\
 GNU config.sub ($timestamp)
 
-Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
-2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012
-Free Software Foundation, Inc.
+Copyright 1992-2017 Free Software Foundation, Inc.
 
 This is free software; see the source for copying conditions.  There is NO
 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
@@ -123,9 +115,9 @@ esac
 maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
 case $maybe_os in
   nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \
-  linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \
-  knetbsd*-gnu* | netbsd*-gnu* | \
-  kopensolaris*-gnu* | \
+  linux-musl* | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \
+  knetbsd*-gnu* | netbsd*-gnu* | netbsd*-eabi* | \
+  kopensolaris*-gnu* | cloudabi*-eabi* | \
   storm-chaos* | os2-emx* | rtmk-nova*)
     os=-$maybe_os
     basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
@@ -156,7 +148,7 @@ case $os in
        -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
        -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
        -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
-       -apple | -axis | -knuth | -cray | -microblaze)
+       -apple | -axis | -knuth | -cray | -microblaze*)
                os=
                basic_machine=$1
                ;;
@@ -259,21 +251,25 @@ case $basic_machine in
        | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
        | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
        | am33_2.0 \
-       | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \
-        | be32 | be64 \
+       | arc | arceb \
+       | arm | arm[bl]e | arme[lb] | armv[2-8] | armv[3-8][lb] | armv7[arm] \
+       | avr | avr32 \
+       | ba \
+       | be32 | be64 \
        | bfin \
-       | c4x | clipper \
+       | c4x | c8051 | clipper \
        | d10v | d30v | dlx | dsp16xx \
-       | epiphany \
-       | fido | fr30 | frv \
+       | e2k | epiphany \
+       | fido | fr30 | frv | ft32 \
        | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
        | hexagon \
-       | i370 | i860 | i960 | ia64 \
+       | i370 | i860 | i960 | ia16 | ia64 \
        | ip2k | iq2000 \
+       | k1om \
        | le32 | le64 \
        | lm32 \
        | m32c | m32r | m32rle | m68000 | m68k | m88k \
-       | maxq | mb | microblaze | mcore | mep | metag \
+       | maxq | mb | microblaze | microblazeel | mcore | mep | metag \
        | mips | mipsbe | mipseb | mipsel | mipsle \
        | mips16 \
        | mips64 | mips64el \
@@ -287,26 +283,30 @@ case $basic_machine in
        | mips64vr5900 | mips64vr5900el \
        | mipsisa32 | mipsisa32el \
        | mipsisa32r2 | mipsisa32r2el \
+       | mipsisa32r6 | mipsisa32r6el \
        | mipsisa64 | mipsisa64el \
        | mipsisa64r2 | mipsisa64r2el \
+       | mipsisa64r6 | mipsisa64r6el \
        | mipsisa64sb1 | mipsisa64sb1el \
        | mipsisa64sr71k | mipsisa64sr71kel \
+       | mipsr5900 | mipsr5900el \
        | mipstx39 | mipstx39el \
        | mn10200 | mn10300 \
        | moxie \
        | mt \
        | msp430 \
        | nds32 | nds32le | nds32be \
-       | nios | nios2 \
+       | nios | nios2 | nios2eb | nios2el \
        | ns16k | ns32k \
-       | open8 \
-       | or32 \
+       | open8 | or1k | or1knd | or32 \
        | pdp10 | pdp11 | pj | pjl \
        | powerpc | powerpc64 | powerpc64le | powerpcle \
+       | pru \
        | pyramid \
+       | riscv32 | riscv64 \
        | rl78 | rx \
        | score \
-       | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
+       | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[234]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
        | sh64 | sh64le \
        | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \
        | sparcv8 | sparcv9 | sparcv9b | sparcv9v \
@@ -314,6 +314,8 @@ case $basic_machine in
        | tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \
        | ubicom32 \
        | v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \
+       | visium \
+       | wasm32 \
        | we32k \
        | x86 | xc16x | xstormy16 | xtensa \
        | z8k | z80)
@@ -328,7 +330,10 @@ case $basic_machine in
        c6x)
                basic_machine=tic6x-unknown
                ;;
-       m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | picochip)
+       leon|leon[3-9])
+               basic_machine=sparc-$basic_machine
+               ;;
+       m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | nvptx | picochip)
                basic_machine=$basic_machine-unknown
                os=-none
                ;;
@@ -370,26 +375,29 @@ case $basic_machine in
        | aarch64-* | aarch64_be-* \
        | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \
        | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
-       | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \
+       | alphapca5[67]-* | alpha64pca5[67]-* | arc-* | arceb-* \
        | arm-*  | armbe-* | armle-* | armeb-* | armv*-* \
        | avr-* | avr32-* \
+       | ba-* \
        | be32-* | be64-* \
        | bfin-* | bs2000-* \
        | c[123]* | c30-* | [cjt]90-* | c4x-* \
-       | clipper-* | craynv-* | cydra-* \
+       | c8051-* | clipper-* | craynv-* | cydra-* \
        | d10v-* | d30v-* | dlx-* \
-       | elxsi-* \
+       | e2k-* | elxsi-* \
        | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \
        | h8300-* | h8500-* \
        | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
        | hexagon-* \
-       | i*86-* | i860-* | i960-* | ia64-* \
+       | i*86-* | i860-* | i960-* | ia16-* | ia64-* \
        | ip2k-* | iq2000-* \
+       | k1om-* \
        | le32-* | le64-* \
        | lm32-* \
        | m32c-* | m32r-* | m32rle-* \
        | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
-       | m88110-* | m88k-* | maxq-* | mcore-* | metag-* | microblaze-* \
+       | m88110-* | m88k-* | maxq-* | mcore-* | metag-* \
+       | microblaze-* | microblazeel-* \
        | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
        | mips16-* \
        | mips64-* | mips64el-* \
@@ -403,28 +411,34 @@ case $basic_machine in
        | mips64vr5900-* | mips64vr5900el-* \
        | mipsisa32-* | mipsisa32el-* \
        | mipsisa32r2-* | mipsisa32r2el-* \
+       | mipsisa32r6-* | mipsisa32r6el-* \
        | mipsisa64-* | mipsisa64el-* \
        | mipsisa64r2-* | mipsisa64r2el-* \
+       | mipsisa64r6-* | mipsisa64r6el-* \
        | mipsisa64sb1-* | mipsisa64sb1el-* \
        | mipsisa64sr71k-* | mipsisa64sr71kel-* \
+       | mipsr5900-* | mipsr5900el-* \
        | mipstx39-* | mipstx39el-* \
        | mmix-* \
        | mt-* \
        | msp430-* \
        | nds32-* | nds32le-* | nds32be-* \
-       | nios-* | nios2-* \
+       | nios-* | nios2-* | nios2eb-* | nios2el-* \
        | none-* | np1-* | ns16k-* | ns32k-* \
        | open8-* \
+       | or1k*-* \
        | orion-* \
        | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
        | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \
+       | pru-* \
        | pyramid-* \
+       | riscv32-* | riscv64-* \
        | rl78-* | romp-* | rs6000-* | rx-* \
        | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \
        | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
        | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \
        | sparclite-* \
-       | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx?-* \
+       | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx*-* \
        | tahoe-* \
        | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
        | tile*-* \
@@ -432,6 +446,8 @@ case $basic_machine in
        | ubicom32-* \
        | v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \
        | vax-* \
+       | visium-* \
+       | wasm32-* \
        | we32k-* \
        | x86-* | x86_64-* | xc16x-* | xps100-* \
        | xstormy16-* | xtensa*-* \
@@ -508,6 +524,9 @@ case $basic_machine in
                basic_machine=i386-pc
                os=-aros
                ;;
+       asmjs)
+               basic_machine=asmjs-unknown
+               ;;
        aux)
                basic_machine=m68k-apple
                os=-aux
@@ -628,6 +647,14 @@ case $basic_machine in
                basic_machine=m68k-bull
                os=-sysv3
                ;;
+       e500v[12])
+               basic_machine=powerpc-unknown
+               os=$os"spe"
+               ;;
+       e500v[12]-*)
+               basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
+               os=$os"spe"
+               ;;
        ebmon29k)
                basic_machine=a29k-amd
                os=-ebmon
@@ -769,6 +796,9 @@ case $basic_machine in
                basic_machine=m68k-isi
                os=-sysv
                ;;
+       leon-*|leon[3-9]-*)
+               basic_machine=sparc-`echo $basic_machine | sed 's/-.*//'`
+               ;;
        m68knommu)
                basic_machine=m68k-unknown
                os=-linux
@@ -788,11 +818,15 @@ case $basic_machine in
                basic_machine=ns32k-utek
                os=-sysv
                ;;
-       microblaze)
+       microblaze*)
                basic_machine=microblaze-xilinx
                ;;
+       mingw64)
+               basic_machine=x86_64-pc
+               os=-mingw64
+               ;;
        mingw32)
-               basic_machine=i386-pc
+               basic_machine=i686-pc
                os=-mingw32
                ;;
        mingw32ce)
@@ -820,6 +854,10 @@ case $basic_machine in
                basic_machine=powerpc-unknown
                os=-morphos
                ;;
+       moxiebox)
+               basic_machine=moxie-unknown
+               os=-moxiebox
+               ;;
        msdos)
                basic_machine=i386-pc
                os=-msdos
@@ -828,7 +866,7 @@ case $basic_machine in
                basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'`
                ;;
        msys)
-               basic_machine=i386-pc
+               basic_machine=i686-pc
                os=-msys
                ;;
        mvs)
@@ -912,6 +950,9 @@ case $basic_machine in
        nsr-tandem)
                basic_machine=nsr-tandem
                ;;
+       nsx-tandem)
+               basic_machine=nsx-tandem
+               ;;
        op50n-* | op60c-*)
                basic_machine=hppa1.1-oki
                os=-proelf
@@ -996,7 +1037,7 @@ case $basic_machine in
        ppc-* | ppcbe-*)
                basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
                ;;
-       ppcle | powerpclittle | ppc-le | powerpc-little)
+       ppcle | powerpclittle)
                basic_machine=powerpcle-unknown
                ;;
        ppcle-* | powerpclittle-*)
@@ -1006,7 +1047,7 @@ case $basic_machine in
                ;;
        ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'`
                ;;
-       ppc64le | powerpc64little | ppc64-le | powerpc64-little)
+       ppc64le | powerpc64little)
                basic_machine=powerpc64le-unknown
                ;;
        ppc64le-* | powerpc64little-*)
@@ -1019,7 +1060,11 @@ case $basic_machine in
                basic_machine=i586-unknown
                os=-pw32
                ;;
-       rdos)
+       rdos | rdos64)
+               basic_machine=x86_64-pc
+               os=-rdos
+               ;;
+       rdos32)
                basic_machine=i386-pc
                os=-rdos
                ;;
@@ -1203,6 +1248,9 @@ case $basic_machine in
                basic_machine=a29k-wrs
                os=-vxworks
                ;;
+       wasm32)
+               basic_machine=wasm32-unknown
+               ;;
        w65*)
                basic_machine=w65-wdc
                os=-none
@@ -1346,29 +1394,30 @@ case $os in
        -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
              | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\
              | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \
-             | -sym* | -kopensolaris* \
+             | -sym* | -kopensolaris* | -plan9* \
              | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
-             | -aos* | -aros* \
+             | -aos* | -aros* | -cloudabi* | -sortix* \
              | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
              | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
              | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \
-             | -openbsd* | -solidbsd* \
+             | -bitrig* | -openbsd* | -solidbsd* | -libertybsd* \
              | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \
              | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
              | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
              | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
-             | -chorusos* | -chorusrdb* | -cegcc* \
+             | -chorusos* | -chorusrdb* | -cegcc* | -glidix* \
              | -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
-             | -mingw32* | -linux-gnu* | -linux-android* \
-             | -linux-newlib* | -linux-uclibc* \
-             | -uxpv* | -beos* | -mpeix* | -udk* \
+             | -midipix* | -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \
+             | -linux-newlib* | -linux-musl* | -linux-uclibc* \
+             | -uxpv* | -beos* | -mpeix* | -udk* | -moxiebox* \
              | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
              | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
              | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
              | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
              | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
              | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
-             | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es*)
+             | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es* \
+             | -onefs* | -tirtos* | -phoenix* | -fuchsia* | -redox*)
        # Remember, each alternative MUST END IN *, to match a version number.
                ;;
        -qnx*)
@@ -1492,9 +1541,6 @@ case $os in
        -aros*)
                os=-aros
                ;;
-       -kaos*)
-               os=-kaos
-               ;;
        -zvmoe)
                os=-zvmoe
                ;;
@@ -1503,6 +1549,8 @@ case $os in
                ;;
        -nacl*)
                ;;
+       -ios)
+               ;;
        -none)
                ;;
        *)
@@ -1543,6 +1591,12 @@ case $basic_machine in
        c4x-* | tic4x-*)
                os=-coff
                ;;
+       c8051-*)
+               os=-elf
+               ;;
+       hexagon-*)
+               os=-elf
+               ;;
        tic54x-*)
                os=-coff
                ;;
@@ -1592,6 +1646,9 @@ case $basic_machine in
        sparc-* | *-sun)
                os=-sunos4.1.1
                ;;
+       pru-*)
+               os=-elf
+               ;;
        *-be)
                os=-beos
                ;;
index debb6ff..b39f98f 100755 (executable)
@@ -1,9 +1,9 @@
 #! /bin/sh
 # depcomp - compile a program generating dependencies as side-effects
 
-scriptversion=2012-03-27.16; # UTC
+scriptversion=2016-01-11.22; # UTC
 
-# Copyright (C) 1999-2012 Free Software Foundation, Inc.
+# Copyright (C) 1999-2017 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
@@ -27,9 +27,9 @@ scriptversion=2012-03-27.16; # UTC
 
 case $1 in
   '')
-     echo "$0: No command.  Try '$0 --help' for more information." 1>&2
-     exit 1;
-     ;;
+    echo "$0: No command.  Try '$0 --help' for more information." 1>&2
+    exit 1;
+    ;;
   -h | --h*)
     cat <<\EOF
 Usage: depcomp [--help] [--version] PROGRAM [ARGS]
@@ -56,11 +56,65 @@ EOF
     ;;
 esac
 
+# Get the directory component of the given path, and save it in the
+# global variables '$dir'.  Note that this directory component will
+# be either empty or ending with a '/' character.  This is deliberate.
+set_dir_from ()
+{
+  case $1 in
+    */*) dir=`echo "$1" | sed -e 's|/[^/]*$|/|'`;;
+      *) dir=;;
+  esac
+}
+
+# Get the suffix-stripped basename of the given path, and save it the
+# global variable '$base'.
+set_base_from ()
+{
+  base=`echo "$1" | sed -e 's|^.*/||' -e 's/\.[^.]*$//'`
+}
+
+# If no dependency file was actually created by the compiler invocation,
+# we still have to create a dummy depfile, to avoid errors with the
+# Makefile "include basename.Plo" scheme.
+make_dummy_depfile ()
+{
+  echo "#dummy" > "$depfile"
+}
+
+# Factor out some common post-processing of the generated depfile.
+# Requires the auxiliary global variable '$tmpdepfile' to be set.
+aix_post_process_depfile ()
+{
+  # If the compiler actually managed to produce a dependency file,
+  # post-process it.
+  if test -f "$tmpdepfile"; then
+    # Each line is of the form 'foo.o: dependency.h'.
+    # Do two passes, one to just change these to
+    #   $object: dependency.h
+    # and one to simply output
+    #   dependency.h:
+    # which is needed to avoid the deleted-header problem.
+    { sed -e "s,^.*\.[$lower]*:,$object:," < "$tmpdepfile"
+      sed -e "s,^.*\.[$lower]*:[$tab ]*,," -e 's,$,:,' < "$tmpdepfile"
+    } > "$depfile"
+    rm -f "$tmpdepfile"
+  else
+    make_dummy_depfile
+  fi
+}
+
 # A tabulation character.
 tab='  '
 # A newline character.
 nl='
 '
+# Character ranges might be problematic outside the C locale.
+# These definitions help.
+upper=ABCDEFGHIJKLMNOPQRSTUVWXYZ
+lower=abcdefghijklmnopqrstuvwxyz
+digits=0123456789
+alpha=${upper}${lower}
 
 if test -z "$depmode" || test -z "$source" || test -z "$object"; then
   echo "depcomp: Variables source, object and depmode must be set" 1>&2
@@ -74,6 +128,9 @@ tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`}
 
 rm -f "$tmpdepfile"
 
+# Avoid interferences from the environment.
+gccflag= dashmflag=
+
 # Some modes work just like other modes, but use different flags.  We
 # parameterize here, but still list the modes in the big case below,
 # to make depend.m4 easier to write.  Note that we *cannot* use a case
@@ -85,32 +142,32 @@ if test "$depmode" = hp; then
 fi
 
 if test "$depmode" = dashXmstdout; then
-   # This is just like dashmstdout with a different argument.
-   dashmflag=-xM
-   depmode=dashmstdout
+  # This is just like dashmstdout with a different argument.
+  dashmflag=-xM
+  depmode=dashmstdout
 fi
 
 cygpath_u="cygpath -u -f -"
 if test "$depmode" = msvcmsys; then
-   # This is just like msvisualcpp but w/o cygpath translation.
-   # Just convert the backslash-escaped backslashes to single forward
-   # slashes to satisfy depend.m4
-   cygpath_u='sed s,\\\\,/,g'
-   depmode=msvisualcpp
+  # This is just like msvisualcpp but w/o cygpath translation.
+  # Just convert the backslash-escaped backslashes to single forward
+  # slashes to satisfy depend.m4
+  cygpath_u='sed s,\\\\,/,g'
+  depmode=msvisualcpp
 fi
 
 if test "$depmode" = msvc7msys; then
-   # This is just like msvc7 but w/o cygpath translation.
-   # Just convert the backslash-escaped backslashes to single forward
-   # slashes to satisfy depend.m4
-   cygpath_u='sed s,\\\\,/,g'
-   depmode=msvc7
+  # This is just like msvc7 but w/o cygpath translation.
+  # Just convert the backslash-escaped backslashes to single forward
+  # slashes to satisfy depend.m4
+  cygpath_u='sed s,\\\\,/,g'
+  depmode=msvc7
 fi
 
 if test "$depmode" = xlc; then
-   # IBM C/C++ Compilers xlc/xlC can output gcc-like dependency informations.
-   gccflag=-qmakedep=gcc,-MF
-   depmode=gcc
+  # IBM C/C++ Compilers xlc/xlC can output gcc-like dependency information.
+  gccflag=-qmakedep=gcc,-MF
+  depmode=gcc
 fi
 
 case "$depmode" in
@@ -133,8 +190,7 @@ gcc3)
   done
   "$@"
   stat=$?
-  if test $stat -eq 0; then :
-  else
+  if test $stat -ne 0; then
     rm -f "$tmpdepfile"
     exit $stat
   fi
@@ -142,13 +198,17 @@ gcc3)
   ;;
 
 gcc)
+## Note that this doesn't just cater to obsosete pre-3.x GCC compilers.
+## but also to in-use compilers like IMB xlc/xlC and the HP C compiler.
+## (see the conditional assignment to $gccflag above).
 ## There are various ways to get dependency output from gcc.  Here's
 ## why we pick this rather obscure method:
 ## - Don't want to use -MD because we'd like the dependencies to end
 ##   up in a subdir.  Having to rename by hand is ugly.
 ##   (We might end up doing this anyway to support other compilers.)
 ## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like
-##   -MM, not -M (despite what the docs say).
+##   -MM, not -M (despite what the docs say).  Also, it might not be
+##   supported by the other compilers which use the 'gcc' depmode.
 ## - Using -M directly means running the compiler twice (even worse
 ##   than renaming).
   if test -z "$gccflag"; then
@@ -156,15 +216,14 @@ gcc)
   fi
   "$@" -Wp,"$gccflag$tmpdepfile"
   stat=$?
-  if test $stat -eq 0; then :
-  else
+  if test $stat -ne 0; then
     rm -f "$tmpdepfile"
     exit $stat
   fi
   rm -f "$depfile"
   echo "$object : \\" > "$depfile"
-  alpha=ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz
-## The second -e expression handles DOS-style file names with drive letters.
+  # The second -e expression handles DOS-style file names with drive
+  # letters.
   sed -e 's/^[^:]*: / /' \
       -e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile"
 ## This next piece of magic avoids the "deleted header file" problem.
@@ -173,15 +232,15 @@ gcc)
 ## typically no way to rebuild the header).  We avoid this by adding
 ## dummy dependencies for each header file.  Too bad gcc doesn't do
 ## this for us directly.
-  tr ' ' "$nl" < "$tmpdepfile" |
 ## Some versions of gcc put a space before the ':'.  On the theory
 ## that the space means something, we add a space to the output as
 ## well.  hp depmode also adds that space, but also prefixes the VPATH
 ## to the object.  Take care to not repeat it in the output.
 ## Some versions of the HPUX 10.20 sed can't process this invocation
 ## correctly.  Breaking it into two sed invocations is a workaround.
-    sed -e 's/^\\$//' -e '/^$/d' -e "s|.*$object$||" -e '/:$/d' \
-      | sed -e 's/$/ :/' >> "$depfile"
+  tr ' ' "$nl" < "$tmpdepfile" \
+    | sed -e 's/^\\$//' -e '/^$/d' -e "s|.*$object$||" -e '/:$/d' \
+    | sed -e 's/$/ :/' >> "$depfile"
   rm -f "$tmpdepfile"
   ;;
 
@@ -199,8 +258,7 @@ sgi)
     "$@" -MDupdate "$tmpdepfile"
   fi
   stat=$?
-  if test $stat -eq 0; then :
-  else
+  if test $stat -ne 0; then
     rm -f "$tmpdepfile"
     exit $stat
   fi
@@ -208,7 +266,6 @@ sgi)
 
   if test -f "$tmpdepfile"; then  # yes, the sourcefile depend on other files
     echo "$object : \\" > "$depfile"
-
     # Clip off the initial element (the dependent).  Don't try to be
     # clever and replace this with sed code, as IRIX sed won't handle
     # lines with more than a fixed number of characters (4096 in
@@ -216,19 +273,15 @@ sgi)
     # the IRIX cc adds comments like '#:fec' to the end of the
     # dependency line.
     tr ' ' "$nl" < "$tmpdepfile" \
-    | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \
-    tr "$nl" ' ' >> "$depfile"
+      | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' \
+      | tr "$nl" ' ' >> "$depfile"
     echo >> "$depfile"
-
     # The second pass generates a dummy entry for each header file.
     tr ' ' "$nl" < "$tmpdepfile" \
-   | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \
-   >> "$depfile"
+      | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \
+      >> "$depfile"
   else
-    # The sourcefile does not contain any dependencies, so just
-    # store a dummy comment line, to avoid errors with the Makefile
-    # "include basename.Plo" scheme.
-    echo "#dummy" > "$depfile"
+    make_dummy_depfile
   fi
   rm -f "$tmpdepfile"
   ;;
@@ -246,9 +299,8 @@ aix)
   # current directory.  Also, the AIX compiler puts '$object:' at the
   # start of each line; $object doesn't have directory information.
   # Version 6 uses the directory in both cases.
-  dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
-  test "x$dir" = "x$object" && dir=
-  base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
+  set_dir_from "$object"
+  set_base_from "$object"
   if test "$libtool" = yes; then
     tmpdepfile1=$dir$base.u
     tmpdepfile2=$base.u
@@ -261,9 +313,7 @@ aix)
     "$@" -M
   fi
   stat=$?
-
-  if test $stat -eq 0; then :
-  else
+  if test $stat -ne 0; then
     rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
     exit $stat
   fi
@@ -272,65 +322,113 @@ aix)
   do
     test -f "$tmpdepfile" && break
   done
-  if test -f "$tmpdepfile"; then
-    # Each line is of the form 'foo.o: dependent.h'.
-    # Do two passes, one to just change these to
-    # '$object: dependent.h' and one to simply 'dependent.h:'.
-    sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile"
-    sed -e 's,^.*\.[a-z]*:['"$tab"' ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile"
-  else
-    # The sourcefile does not contain any dependencies, so just
-    # store a dummy comment line, to avoid errors with the Makefile
-    # "include basename.Plo" scheme.
-    echo "#dummy" > "$depfile"
+  aix_post_process_depfile
+  ;;
+
+tcc)
+  # tcc (Tiny C Compiler) understand '-MD -MF file' since version 0.9.26
+  # FIXME: That version still under development at the moment of writing.
+  #        Make that this statement remains true also for stable, released
+  #        versions.
+  # It will wrap lines (doesn't matter whether long or short) with a
+  # trailing '\', as in:
+  #
+  #   foo.o : \
+  #    foo.c \
+  #    foo.h \
+  #
+  # It will put a trailing '\' even on the last line, and will use leading
+  # spaces rather than leading tabs (at least since its commit 0394caf7
+  # "Emit spaces for -MD").
+  "$@" -MD -MF "$tmpdepfile"
+  stat=$?
+  if test $stat -ne 0; then
+    rm -f "$tmpdepfile"
+    exit $stat
   fi
+  rm -f "$depfile"
+  # Each non-empty line is of the form 'foo.o : \' or ' dep.h \'.
+  # We have to change lines of the first kind to '$object: \'.
+  sed -e "s|.*:|$object :|" < "$tmpdepfile" > "$depfile"
+  # And for each line of the second kind, we have to emit a 'dep.h:'
+  # dummy dependency, to avoid the deleted-header problem.
+  sed -n -e 's|^  *\(.*\) *\\$|\1:|p' < "$tmpdepfile" >> "$depfile"
   rm -f "$tmpdepfile"
   ;;
 
-icc)
-  # Intel's C compiler anf tcc (Tiny C Compiler) understand '-MD -MF file'.
-  # However on
-  #    $CC -MD -MF foo.d -c -o sub/foo.o sub/foo.c
-  # ICC 7.0 will fill foo.d with something like
-  #    foo.o: sub/foo.c
-  #    foo.o: sub/foo.h
-  # which is wrong.  We want
-  #    sub/foo.o: sub/foo.c
-  #    sub/foo.o: sub/foo.h
-  #    sub/foo.c:
-  #    sub/foo.h:
-  # ICC 7.1 will output
+## The order of this option in the case statement is important, since the
+## shell code in configure will try each of these formats in the order
+## listed in this file.  A plain '-MD' option would be understood by many
+## compilers, so we must ensure this comes after the gcc and icc options.
+pgcc)
+  # Portland's C compiler understands '-MD'.
+  # Will always output deps to 'file.d' where file is the root name of the
+  # source file under compilation, even if file resides in a subdirectory.
+  # The object file name does not affect the name of the '.d' file.
+  # pgcc 10.2 will output
   #    foo.o: sub/foo.c sub/foo.h
-  # and will wrap long lines using '\':
+  # and will wrap long lines using '\' :
   #    foo.o: sub/foo.c ... \
   #     sub/foo.h ... \
   #     ...
-  # tcc 0.9.26 (FIXME still under development at the moment of writing)
-  # will emit a similar output, but also prepend the continuation lines
-  # with horizontal tabulation characters.
-  "$@" -MD -MF "$tmpdepfile"
-  stat=$?
-  if test $stat -eq 0; then :
-  else
+  set_dir_from "$object"
+  # Use the source, not the object, to determine the base name, since
+  # that's sadly what pgcc will do too.
+  set_base_from "$source"
+  tmpdepfile=$base.d
+
+  # For projects that build the same source file twice into different object
+  # files, the pgcc approach of using the *source* file root name can cause
+  # problems in parallel builds.  Use a locking strategy to avoid stomping on
+  # the same $tmpdepfile.
+  lockdir=$base.d-lock
+  trap "
+    echo '$0: caught signal, cleaning up...' >&2
+    rmdir '$lockdir'
+    exit 1
+  " 1 2 13 15
+  numtries=100
+  i=$numtries
+  while test $i -gt 0; do
+    # mkdir is a portable test-and-set.
+    if mkdir "$lockdir" 2>/dev/null; then
+      # This process acquired the lock.
+      "$@" -MD
+      stat=$?
+      # Release the lock.
+      rmdir "$lockdir"
+      break
+    else
+      # If the lock is being held by a different process, wait
+      # until the winning process is done or we timeout.
+      while test -d "$lockdir" && test $i -gt 0; do
+        sleep 1
+        i=`expr $i - 1`
+      done
+    fi
+    i=`expr $i - 1`
+  done
+  trap - 1 2 13 15
+  if test $i -le 0; then
+    echo "$0: failed to acquire lock after $numtries attempts" >&2
+    echo "$0: check lockdir '$lockdir'" >&2
+    exit 1
+  fi
+
+  if test $stat -ne 0; then
     rm -f "$tmpdepfile"
     exit $stat
   fi
   rm -f "$depfile"
-  # Each line is of the form 'foo.o: dependent.h',
-  # or 'foo.o: dep1.h dep2.h \', or ' dep3.h dep4.h \'.
+  # Each line is of the form `foo.o: dependent.h',
+  # or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'.
   # Do two passes, one to just change these to
-  # '$object: dependent.h' and one to simply 'dependent.h:'.
-  sed -e "s/^[ $tab][ $tab]*/  /" -e "s,^[^:]*:,$object :," \
-    < "$tmpdepfile" > "$depfile"
-  sed '
-    s/[ '"$tab"'][ '"$tab"']*/ /g
-    s/^ *//
-    s/ *\\*$//
-    s/^[^:]*: *//
-    /^$/d
-    /:$/d
-    s/$/ :/
-  ' < "$tmpdepfile" >> "$depfile"
+  # `$object: dependent.h' and one to simply `dependent.h:'.
+  sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile"
+  # Some versions of the HPUX 10.20 sed can't process this invocation
+  # correctly.  Breaking it into two sed invocations is a workaround.
+  sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" \
+    | sed -e 's/$/ :/' >> "$depfile"
   rm -f "$tmpdepfile"
   ;;
 
@@ -341,9 +439,8 @@ hp2)
   # 'foo.d', which lands next to the object file, wherever that
   # happens to be.
   # Much of this is similar to the tru64 case; see comments there.
-  dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
-  test "x$dir" = "x$object" && dir=
-  base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
+  set_dir_from  "$object"
+  set_base_from "$object"
   if test "$libtool" = yes; then
     tmpdepfile1=$dir$base.d
     tmpdepfile2=$dir.libs/$base.d
@@ -354,8 +451,7 @@ hp2)
     "$@" +Maked
   fi
   stat=$?
-  if test $stat -eq 0; then :
-  else
+  if test $stat -ne 0; then
      rm -f "$tmpdepfile1" "$tmpdepfile2"
      exit $stat
   fi
@@ -365,76 +461,61 @@ hp2)
     test -f "$tmpdepfile" && break
   done
   if test -f "$tmpdepfile"; then
-    sed -e "s,^.*\.[a-z]*:,$object:," "$tmpdepfile" > "$depfile"
+    sed -e "s,^.*\.[$lower]*:,$object:," "$tmpdepfile" > "$depfile"
     # Add 'dependent.h:' lines.
     sed -ne '2,${
-              s/^ *//
-              s/ \\*$//
-              s/$/:/
-              p
-            }' "$tmpdepfile" >> "$depfile"
+               s/^ *//
+               s/ \\*$//
+               s/$/:/
+               p
+             }' "$tmpdepfile" >> "$depfile"
   else
-    echo "#dummy" > "$depfile"
+    make_dummy_depfile
   fi
   rm -f "$tmpdepfile" "$tmpdepfile2"
   ;;
 
 tru64)
-   # The Tru64 compiler uses -MD to generate dependencies as a side
-   # effect.  'cc -MD -o foo.o ...' puts the dependencies into 'foo.o.d'.
-   # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put
-   # dependencies in 'foo.d' instead, so we check for that too.
-   # Subdirectories are respected.
-   dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
-   test "x$dir" = "x$object" && dir=
-   base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
-
-   if test "$libtool" = yes; then
-      # With Tru64 cc, shared objects can also be used to make a
-      # static library.  This mechanism is used in libtool 1.4 series to
-      # handle both shared and static libraries in a single compilation.
-      # With libtool 1.4, dependencies were output in $dir.libs/$base.lo.d.
-      #
-      # With libtool 1.5 this exception was removed, and libtool now
-      # generates 2 separate objects for the 2 libraries.  These two
-      # compilations output dependencies in $dir.libs/$base.o.d and
-      # in $dir$base.o.d.  We have to check for both files, because
-      # one of the two compilations can be disabled.  We should prefer
-      # $dir$base.o.d over $dir.libs/$base.o.d because the latter is
-      # automatically cleaned when .libs/ is deleted, while ignoring
-      # the former would cause a distcleancheck panic.
-      tmpdepfile1=$dir.libs/$base.lo.d   # libtool 1.4
-      tmpdepfile2=$dir$base.o.d          # libtool 1.5
-      tmpdepfile3=$dir.libs/$base.o.d    # libtool 1.5
-      tmpdepfile4=$dir.libs/$base.d      # Compaq CCC V6.2-504
-      "$@" -Wc,-MD
-   else
-      tmpdepfile1=$dir$base.o.d
-      tmpdepfile2=$dir$base.d
-      tmpdepfile3=$dir$base.d
-      tmpdepfile4=$dir$base.d
-      "$@" -MD
-   fi
-
-   stat=$?
-   if test $stat -eq 0; then :
-   else
-      rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4"
-      exit $stat
-   fi
-
-   for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4"
-   do
-     test -f "$tmpdepfile" && break
-   done
-   if test -f "$tmpdepfile"; then
-      sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile"
-      sed -e 's,^.*\.[a-z]*:['"$tab"' ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile"
-   else
-      echo "#dummy" > "$depfile"
-   fi
-   rm -f "$tmpdepfile"
-   ;;
+  # The Tru64 compiler uses -MD to generate dependencies as a side
+  # effect.  'cc -MD -o foo.o ...' puts the dependencies into 'foo.o.d'.
+  # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put
+  # dependencies in 'foo.d' instead, so we check for that too.
+  # Subdirectories are respected.
+  set_dir_from  "$object"
+  set_base_from "$object"
+
+  if test "$libtool" = yes; then
+    # Libtool generates 2 separate objects for the 2 libraries.  These
+    # two compilations output dependencies in $dir.libs/$base.o.d and
+    # in $dir$base.o.d.  We have to check for both files, because
+    # one of the two compilations can be disabled.  We should prefer
+    # $dir$base.o.d over $dir.libs/$base.o.d because the latter is
+    # automatically cleaned when .libs/ is deleted, while ignoring
+    # the former would cause a distcleancheck panic.
+    tmpdepfile1=$dir$base.o.d          # libtool 1.5
+    tmpdepfile2=$dir.libs/$base.o.d    # Likewise.
+    tmpdepfile3=$dir.libs/$base.d      # Compaq CCC V6.2-504
+    "$@" -Wc,-MD
+  else
+    tmpdepfile1=$dir$base.d
+    tmpdepfile2=$dir$base.d
+    tmpdepfile3=$dir$base.d
+    "$@" -MD
+  fi
+
+  stat=$?
+  if test $stat -ne 0; then
+    rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
+    exit $stat
+  fi
+
+  for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
+  do
+    test -f "$tmpdepfile" && break
+  done
+  # Same post-processing that is required for AIX mode.
+  aix_post_process_depfile
+  ;;
 
 msvc7)
   if test "$libtool" = yes; then
@@ -445,8 +526,7 @@ msvc7)
   "$@" $showIncludes > "$tmpdepfile"
   stat=$?
   grep -v '^Note: including file: ' "$tmpdepfile"
-  if test "$stat" = 0; then :
-  else
+  if test $stat -ne 0; then
     rm -f "$tmpdepfile"
     exit $stat
   fi
@@ -472,6 +552,7 @@ $ {
   G
   p
 }' >> "$depfile"
+  echo >> "$depfile" # make sure the fragment doesn't end with a backslash
   rm -f "$tmpdepfile"
   ;;
 
@@ -523,13 +604,14 @@ dashmstdout)
   # in the target name.  This is to cope with DOS-style filenames:
   # a dependency such as 'c:/foo/bar' could be seen as target 'c' otherwise.
   "$@" $dashmflag |
-    sed 's:^['"$tab"' ]*[^:'"$tab"' ][^:][^:]*\:['"$tab"' ]*:'"$object"'\: :' > "$tmpdepfile"
+    sed "s|^[$tab ]*[^:$tab ][^:][^:]*:[$tab ]*|$object: |" > "$tmpdepfile"
   rm -f "$depfile"
   cat < "$tmpdepfile" > "$depfile"
-  tr ' ' "$nl" < "$tmpdepfile" | \
-## Some versions of the HPUX 10.20 sed can't process this invocation
-## correctly.  Breaking it into two sed invocations is a workaround.
-    sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
+  # Some versions of the HPUX 10.20 sed can't process this sed invocation
+  # correctly.  Breaking it into two sed invocations is a workaround.
+  tr ' ' "$nl" < "$tmpdepfile" \
+    | sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' \
+    | sed -e 's/$/ :/' >> "$depfile"
   rm -f "$tmpdepfile"
   ;;
 
@@ -582,10 +664,12 @@ makedepend)
   # makedepend may prepend the VPATH from the source file name to the object.
   # No need to regex-escape $object, excess matching of '.' is harmless.
   sed "s|^.*\($object *:\)|\1|" "$tmpdepfile" > "$depfile"
-  sed '1,2d' "$tmpdepfile" | tr ' ' "$nl" | \
-## Some versions of the HPUX 10.20 sed can't process this invocation
-## correctly.  Breaking it into two sed invocations is a workaround.
-    sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
+  # Some versions of the HPUX 10.20 sed can't process the last invocation
+  # correctly.  Breaking it into two sed invocations is a workaround.
+  sed '1,2d' "$tmpdepfile" \
+    | tr ' ' "$nl" \
+    | sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' \
+    | sed -e 's/$/ :/' >> "$depfile"
   rm -f "$tmpdepfile" "$tmpdepfile".bak
   ;;
 
@@ -621,10 +705,10 @@ cpp)
     esac
   done
 
-  "$@" -E |
-    sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \
-       -e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' |
-    sed '$ s: \\$::' > "$tmpdepfile"
+  "$@" -E \
+    sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \
+             -e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \
+    sed '$ s: \\$::' > "$tmpdepfile"
   rm -f "$depfile"
   echo "$object : \\" > "$depfile"
   cat < "$tmpdepfile" >> "$depfile"
@@ -656,15 +740,15 @@ msvisualcpp)
       shift
       ;;
     "-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI")
-       set fnord "$@"
-       shift
-       shift
-       ;;
+        set fnord "$@"
+        shift
+        shift
+        ;;
     *)
-       set fnord "$@" "$arg"
-       shift
-       shift
-       ;;
+        set fnord "$@" "$arg"
+        shift
+        shift
+        ;;
     esac
   done
   "$@" -E 2>/dev/null |
@@ -702,6 +786,6 @@ exit 0
 # eval: (add-hook 'write-file-hooks 'time-stamp)
 # time-stamp-start: "scriptversion="
 # time-stamp-format: "%:y-%02m-%02d.%02H"
-# time-stamp-time-zone: "UTC"
+# time-stamp-time-zone: "UTC0"
 # time-stamp-end: "; # UTC"
 # End:
diff --git a/lib/elisp-comp b/lib/elisp-comp
deleted file mode 100755 (executable)
index 7766db4..0000000
+++ /dev/null
@@ -1,93 +0,0 @@
-#!/bin/sh
-# Copyright (C) 1995-2012 Free Software Foundation, Inc.
-
-scriptversion=2010-02-06.18; # UTC
-
-# Franc,ois Pinard <pinard@iro.umontreal.ca>, 1995.
-#
-# 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/>.
-
-# As a special exception to the GNU General Public License, if you
-# distribute this file as part of a program that contains a
-# configuration script generated by Autoconf, you may include it under
-# the same distribution terms that you use for the rest of that program.
-
-# This file is maintained in Automake, please report
-# bugs to <bug-automake@gnu.org> or send patches to
-# <automake-patches@gnu.org>.
-
-case $1 in
-  '')
-     echo "$0: No files.  Try '$0 --help' for more information." 1>&2
-     exit 1;
-     ;;
-  -h | --h*)
-    cat <<\EOF
-Usage: elisp-comp [--help] [--version] FILES...
-
-This script byte-compiles all '.el' files listed as FILES using GNU
-Emacs, and put the resulting '.elc' files into the current directory,
-so disregarding the original directories used in '.el' arguments.
-
-This script manages in such a way that all Emacs LISP files to
-be compiled are made visible between themselves, in the event
-they require or load-library one another.
-
-Report bugs to <bug-automake@gnu.org>.
-EOF
-    exit $?
-    ;;
-  -v | --v*)
-    echo "elisp-comp $scriptversion"
-    exit $?
-    ;;
-esac
-
-if test -z "$EMACS" || test "$EMACS" = "t"; then
-  # Value of "t" means we are running in a shell under Emacs.
-  # Just assume Emacs is called "emacs".
-  EMACS=emacs
-fi
-
-tempdir=elc.$$
-
-# Cleanup the temporary directory on exit.
-trap 'ret=$?; rm -rf "$tempdir" && exit $ret' 0
-do_exit='(exit $ret); exit $ret'
-trap "ret=129; $do_exit" 1
-trap "ret=130; $do_exit" 2
-trap "ret=141; $do_exit" 13
-trap "ret=143; $do_exit" 15
-
-mkdir $tempdir
-cp "$@" $tempdir
-
-(
-  cd $tempdir
-  echo "(setq load-path (cons nil load-path))" > script
-  $EMACS -batch -q -l script -f batch-byte-compile *.el || exit $?
-  mv *.elc ..
-) || exit $?
-
-(exit 0); exit 0
-
-# Local Variables:
-# mode: shell-script
-# sh-indentation: 2
-# eval: (add-hook 'write-file-hooks 'time-stamp)
-# time-stamp-start: "scriptversion="
-# time-stamp-format: "%:y-%02m-%02d.%02H"
-# time-stamp-time-zone: "UTC"
-# time-stamp-end: "; # UTC"
-# End:
diff --git a/lib/gendocs.sh b/lib/gendocs.sh
new file mode 100755 (executable)
index 0000000..3b71b36
--- /dev/null
@@ -0,0 +1,504 @@
+#!/bin/sh -e
+# gendocs.sh -- generate a GNU manual in many formats.  This script is
+#   mentioned in maintain.texi.  See the help message below for usage details.
+
+scriptversion=2016-12-31.18
+
+# Copyright 2003-2017 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 3 of the License, 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/>.
+#
+# Original author: Mohit Agarwal.
+# Send bug reports and any other correspondence to bug-gnulib@gnu.org.
+#
+# The latest version of this script, and the companion template, is
+# available from the Gnulib repository:
+#
+# http://git.savannah.gnu.org/cgit/gnulib.git/tree/build-aux/gendocs.sh
+# http://git.savannah.gnu.org/cgit/gnulib.git/tree/doc/gendocs_template
+
+# TODO:
+# - image importing was only implemented for HTML generated by
+#   makeinfo.  But it should be simple enough to adjust.
+# - images are not imported in the source tarball.  All the needed
+#   formats (PDF, PNG, etc.) should be included.
+
+prog=`basename "$0"`
+srcdir=`pwd`
+
+scripturl="http://git.savannah.gnu.org/cgit/gnulib.git/plain/build-aux/gendocs.sh"
+templateurl="http://git.savannah.gnu.org/cgit/gnulib.git/plain/doc/gendocs_template"
+
+: ${SETLANG="env LANG= LC_MESSAGES= LC_ALL= LANGUAGE="}
+: ${MAKEINFO="makeinfo"}
+: ${TEXI2DVI="texi2dvi"}
+: ${DOCBOOK2HTML="docbook2html"}
+: ${DOCBOOK2PDF="docbook2pdf"}
+: ${DOCBOOK2TXT="docbook2txt"}
+: ${GENDOCS_TEMPLATE_DIR="."}
+: ${PERL='perl'}
+: ${TEXI2HTML="texi2html"}
+unset CDPATH
+unset use_texi2html
+
+MANUAL_TITLE=
+PACKAGE=
+EMAIL=webmasters@gnu.org  # please override with --email
+commonarg= # passed to all makeinfo/texi2html invcations.
+dirargs=   # passed to all tools (-I dir).
+dirs=      # -I directories.
+htmlarg="--css-ref=/software/gnulib/manual.css -c TOP_NODE_UP_URL=/manual"
+infoarg=--no-split
+generate_ascii=true
+generate_html=true
+generate_info=true
+generate_tex=true
+outdir=manual
+source_extra=
+split=node
+srcfile=
+texarg="-t @finalout"
+
+version="gendocs.sh $scriptversion
+
+Copyright 2017 Free Software Foundation, Inc.
+There is NO warranty.  You may redistribute this software
+under the terms of the GNU General Public License.
+For more information about these matters, see the files named COPYING."
+
+usage="Usage: $prog [OPTION]... PACKAGE MANUAL-TITLE
+
+Generate output in various formats from PACKAGE.texinfo (or .texi or
+.txi) source.  See the GNU Maintainers document for a more extensive
+discussion:
+  http://www.gnu.org/prep/maintain_toc.html
+
+Options:
+  --email ADR use ADR as contact in generated web pages; always give this.
+
+  -s SRCFILE   read Texinfo from SRCFILE, instead of PACKAGE.{texinfo|texi|txi}
+  -o OUTDIR    write files into OUTDIR, instead of manual/.
+  -I DIR       append DIR to the Texinfo search path.
+  --common ARG pass ARG in all invocations.
+  --html ARG   pass ARG to makeinfo or texi2html for HTML targets,
+                 instead of '$htmlarg'.
+  --info ARG   pass ARG to makeinfo for Info, instead of --no-split.
+  --no-ascii   skip generating the plain text output.
+  --no-html    skip generating the html output.
+  --no-info    skip generating the info output.
+  --no-tex     skip generating the dvi and pdf output.
+  --source ARG include ARG in tar archive of sources.
+  --split HOW  make split HTML by node, section, chapter; default node.
+  --tex ARG    pass ARG to texi2dvi for DVI and PDF, instead of -t @finalout.
+
+  --texi2html  use texi2html to make HTML target, with all split versions.
+  --docbook    convert through DocBook too (xml, txt, html, pdf).
+
+  --help       display this help and exit successfully.
+  --version    display version information and exit successfully.
+
+Simple example: $prog --email bug-gnu-emacs@gnu.org emacs \"GNU Emacs Manual\"
+
+Typical sequence:
+  cd PACKAGESOURCE/doc
+  wget \"$scripturl\"
+  wget \"$templateurl\"
+  $prog --email BUGLIST MANUAL \"GNU MANUAL - One-line description\"
+
+Output will be in a new subdirectory \"manual\" (by default;
+use -o OUTDIR to override).  Move all the new files into your web CVS
+tree, as explained in the Web Pages node of maintain.texi.
+
+Please use the --email ADDRESS option so your own bug-reporting
+address will be used in the generated HTML pages.
+
+MANUAL-TITLE is included as part of the HTML <title> of the overall
+manual/index.html file.  It should include the name of the package being
+documented.  manual/index.html is created by substitution from the file
+$GENDOCS_TEMPLATE_DIR/gendocs_template.  (Feel free to modify the
+generic template for your own purposes.)
+
+If you have several manuals, you'll need to run this script several
+times with different MANUAL values, specifying a different output
+directory with -o each time.  Then write (by hand) an overall index.html
+with links to them all.
+
+If a manual's Texinfo sources are spread across several directories,
+first copy or symlink all Texinfo sources into a single directory.
+(Part of the script's work is to make a tar.gz of the sources.)
+
+As implied above, by default monolithic Info files are generated.
+If you want split Info, or other Info options, use --info to override.
+
+You can set the environment variables MAKEINFO, TEXI2DVI, TEXI2HTML,
+and PERL to control the programs that get executed, and
+GENDOCS_TEMPLATE_DIR to control where the gendocs_template file is
+looked for.  With --docbook, the environment variables DOCBOOK2HTML,
+DOCBOOK2PDF, and DOCBOOK2TXT are also consulted.
+
+By default, makeinfo and texi2dvi are run in the default (English)
+locale, since that's the language of most Texinfo manuals.  If you
+happen to have a non-English manual and non-English web site, see the
+SETLANG setting in the source.
+
+Email bug reports or enhancement requests to bug-gnulib@gnu.org.
+"
+
+while test $# -gt 0; do
+  case $1 in
+    -s)          shift; srcfile=$1;;
+    -o)          shift; outdir=$1;;
+    -I)          shift; dirargs="$dirargs -I '$1'"; dirs="$dirs $1";;
+    --common)    shift; commonarg=$1;;
+    --docbook)   docbook=yes;;
+    --email)     shift; EMAIL=$1;;
+    --html)      shift; htmlarg=$1;;
+    --info)      shift; infoarg=$1;;
+    --no-ascii)  generate_ascii=false;;
+    --no-html)   generate_ascii=false;;
+    --no-info)   generate_info=false;;
+    --no-tex)    generate_tex=false;;
+    --source)    shift; source_extra=$1;;
+    --split)     shift; split=$1;;
+    --tex)       shift; texarg=$1;;
+    --texi2html) use_texi2html=1;;
+
+    --help)      echo "$usage"; exit 0;;
+    --version)   echo "$version"; exit 0;;
+    -*)
+      echo "$0: Unknown option \`$1'." >&2
+      echo "$0: Try \`--help' for more information." >&2
+      exit 1;;
+    *)
+      if test -z "$PACKAGE"; then
+        PACKAGE=$1
+      elif test -z "$MANUAL_TITLE"; then
+        MANUAL_TITLE=$1
+      else
+        echo "$0: extra non-option argument \`$1'." >&2
+        exit 1
+      fi;;
+  esac
+  shift
+done
+
+# makeinfo uses the dirargs, but texi2dvi doesn't.
+commonarg=" $dirargs $commonarg"
+
+# For most of the following, the base name is just $PACKAGE
+base=$PACKAGE
+
+if test -n "$srcfile"; then
+  # but here, we use the basename of $srcfile
+  base=`basename "$srcfile"`
+  case $base in
+    *.txi|*.texi|*.texinfo) base=`echo "$base"|sed 's/\.[texinfo]*$//'`;;
+  esac
+  PACKAGE=$base
+elif test -s "$srcdir/$PACKAGE.texinfo"; then
+  srcfile=$srcdir/$PACKAGE.texinfo
+elif test -s "$srcdir/$PACKAGE.texi"; then
+  srcfile=$srcdir/$PACKAGE.texi
+elif test -s "$srcdir/$PACKAGE.txi"; then
+  srcfile=$srcdir/$PACKAGE.txi
+else
+  echo "$0: cannot find .texinfo or .texi or .txi for $PACKAGE in $srcdir." >&2
+  exit 1
+fi
+
+if test ! -r $GENDOCS_TEMPLATE_DIR/gendocs_template; then
+  echo "$0: cannot read $GENDOCS_TEMPLATE_DIR/gendocs_template." >&2
+  echo "$0: it is available from $templateurl." >&2
+  exit 1
+fi
+
+# Function to return size of $1 in something resembling kilobytes.
+calcsize()
+{
+  size=`ls -ksl $1 | awk '{print $1}'`
+  echo $size
+}
+
+# copy_images OUTDIR HTML-FILE...
+# -------------------------------
+# Copy all the images needed by the HTML-FILEs into OUTDIR.
+# Look for them in . and the -I directories; this is simpler than what
+# makeinfo supports with -I, but hopefully it will suffice.
+copy_images()
+{
+  local odir
+  odir=$1
+  shift
+  $PERL -n -e "
+BEGIN {
+  \$me = '$prog';
+  \$odir = '$odir';
+  @dirs = qw(. $dirs);
+}
+" -e '
+/<img src="(.*?)"/g && ++$need{$1};
+
+END {
+  #print "$me: @{[keys %need]}\n";  # for debugging, show images found.
+  FILE: for my $f (keys %need) {
+    for my $d (@dirs) {
+      if (-f "$d/$f") {
+        use File::Basename;
+        my $dest = dirname ("$odir/$f");
+        #
+        use File::Path;
+        -d $dest || mkpath ($dest)
+          || die "$me: cannot mkdir $dest: $!\n";
+        #
+        use File::Copy;
+        copy ("$d/$f", $dest)
+          || die "$me: cannot copy $d/$f to $dest: $!\n";
+        next FILE;
+      }
+    }
+    die "$me: $ARGV: cannot find image $f\n";
+  }
+}
+' -- "$@" || exit 1
+}
+
+case $outdir in
+  /*) abs_outdir=$outdir;;
+  *)  abs_outdir=$srcdir/$outdir;;
+esac
+
+echo "Making output for $srcfile"
+echo " in `pwd`"
+mkdir -p "$outdir/"
+
+# \f
+if $generate_info; then
+  cmd="$SETLANG $MAKEINFO -o $PACKAGE.info $commonarg $infoarg \"$srcfile\""
+  echo "Generating info... ($cmd)"
+  rm -f $PACKAGE.info* # get rid of any strays
+  eval "$cmd"
+  tar czf "$outdir/$PACKAGE.info.tar.gz" $PACKAGE.info*
+  ls -l "$outdir/$PACKAGE.info.tar.gz"
+  info_tgz_size=`calcsize "$outdir/$PACKAGE.info.tar.gz"`
+  # do not mv the info files, there's no point in having them available
+  # separately on the web.
+fi  # end info
+
+# \f
+if $generate_tex; then
+  cmd="$SETLANG $TEXI2DVI $dirargs $texarg \"$srcfile\""
+  printf "\nGenerating dvi... ($cmd)\n"
+  eval "$cmd"
+  # compress/finish dvi:
+  gzip -f -9 $PACKAGE.dvi
+  dvi_gz_size=`calcsize $PACKAGE.dvi.gz`
+  mv $PACKAGE.dvi.gz "$outdir/"
+  ls -l "$outdir/$PACKAGE.dvi.gz"
+
+  cmd="$SETLANG $TEXI2DVI --pdf $dirargs $texarg \"$srcfile\""
+  printf "\nGenerating pdf... ($cmd)\n"
+  eval "$cmd"
+  pdf_size=`calcsize $PACKAGE.pdf`
+  mv $PACKAGE.pdf "$outdir/"
+  ls -l "$outdir/$PACKAGE.pdf"
+fi # end tex (dvi + pdf)
+
+# \f
+if $generate_ascii; then
+  opt="-o $PACKAGE.txt --no-split --no-headers $commonarg"
+  cmd="$SETLANG $MAKEINFO $opt \"$srcfile\""
+  printf "\nGenerating ascii... ($cmd)\n"
+  eval "$cmd"
+  ascii_size=`calcsize $PACKAGE.txt`
+  gzip -f -9 -c $PACKAGE.txt >"$outdir/$PACKAGE.txt.gz"
+  ascii_gz_size=`calcsize "$outdir/$PACKAGE.txt.gz"`
+  mv $PACKAGE.txt "$outdir/"
+  ls -l "$outdir/$PACKAGE.txt" "$outdir/$PACKAGE.txt.gz"
+fi
+
+# \f
+
+if $generate_html; then
+# Split HTML at level $1.  Used for texi2html.
+html_split()
+{
+  opt="--split=$1 --node-files $commonarg $htmlarg"
+  cmd="$SETLANG $TEXI2HTML --output $PACKAGE.html $opt \"$srcfile\""
+  printf "\nGenerating html by $1... ($cmd)\n"
+  eval "$cmd"
+  split_html_dir=$PACKAGE.html
+  (
+    cd ${split_html_dir} || exit 1
+    ln -sf ${PACKAGE}.html index.html
+    tar -czf "$abs_outdir/${PACKAGE}.html_$1.tar.gz" -- *.html
+  )
+  eval html_$1_tgz_size=`calcsize "$outdir/${PACKAGE}.html_$1.tar.gz"`
+  rm -f "$outdir"/html_$1/*.html
+  mkdir -p "$outdir/html_$1/"
+  mv ${split_html_dir}/*.html "$outdir/html_$1/"
+  rmdir ${split_html_dir}
+}
+
+if test -z "$use_texi2html"; then
+  opt="--no-split --html -o $PACKAGE.html $commonarg $htmlarg"
+  cmd="$SETLANG $MAKEINFO $opt \"$srcfile\""
+  printf "\nGenerating monolithic html... ($cmd)\n"
+  rm -rf $PACKAGE.html  # in case a directory is left over
+  eval "$cmd"
+  html_mono_size=`calcsize $PACKAGE.html`
+  gzip -f -9 -c $PACKAGE.html >"$outdir/$PACKAGE.html.gz"
+  html_mono_gz_size=`calcsize "$outdir/$PACKAGE.html.gz"`
+  copy_images "$outdir/" $PACKAGE.html
+  mv $PACKAGE.html "$outdir/"
+  ls -l "$outdir/$PACKAGE.html" "$outdir/$PACKAGE.html.gz"
+
+  # Before Texinfo 5.0, makeinfo did not accept a --split=HOW option,
+  # it just always split by node.  So if we're splitting by node anyway,
+  # leave it out.
+  if test "x$split" = xnode; then
+    split_arg=
+  else
+    split_arg=--split=$split
+  fi
+  #
+  opt="--html -o $PACKAGE.html $split_arg $commonarg $htmlarg"
+  cmd="$SETLANG $MAKEINFO $opt \"$srcfile\""
+  printf "\nGenerating html by $split... ($cmd)\n"
+  eval "$cmd"
+  split_html_dir=$PACKAGE.html
+  copy_images $split_html_dir/ $split_html_dir/*.html
+  (
+    cd $split_html_dir || exit 1
+    tar -czf "$abs_outdir/$PACKAGE.html_$split.tar.gz" -- *
+  )
+  eval \
+    html_${split}_tgz_size=`calcsize "$outdir/$PACKAGE.html_$split.tar.gz"`
+  rm -rf "$outdir/html_$split/"
+  mv $split_html_dir "$outdir/html_$split/"
+  du -s "$outdir/html_$split/"
+  ls -l "$outdir/$PACKAGE.html_$split.tar.gz"
+
+else # use texi2html:
+  opt="--output $PACKAGE.html $commonarg $htmlarg"
+  cmd="$SETLANG $TEXI2HTML $opt \"$srcfile\""
+  printf "\nGenerating monolithic html with texi2html... ($cmd)\n"
+  rm -rf $PACKAGE.html  # in case a directory is left over
+  eval "$cmd"
+  html_mono_size=`calcsize $PACKAGE.html`
+  gzip -f -9 -c $PACKAGE.html >"$outdir/$PACKAGE.html.gz"
+  html_mono_gz_size=`calcsize "$outdir/$PACKAGE.html.gz"`
+  mv $PACKAGE.html "$outdir/"
+
+  html_split node
+  html_split chapter
+  html_split section
+fi
+fi # end html
+
+# \f
+printf "\nMaking .tar.gz for sources...\n"
+d=`dirname $srcfile`
+(
+  cd "$d"
+  srcfiles=`ls -d *.texinfo *.texi *.txi *.eps $source_extra 2>/dev/null` || true
+  tar czfh "$abs_outdir/$PACKAGE.texi.tar.gz" $srcfiles
+  ls -l "$abs_outdir/$PACKAGE.texi.tar.gz"
+)
+texi_tgz_size=`calcsize "$outdir/$PACKAGE.texi.tar.gz"`
+
+# \f
+# Do everything again through docbook.
+if test -n "$docbook"; then
+  opt="-o - --docbook $commonarg"
+  cmd="$SETLANG $MAKEINFO $opt \"$srcfile\" >${srcdir}/$PACKAGE-db.xml"
+  printf "\nGenerating docbook XML... ($cmd)\n"
+  eval "$cmd"
+  docbook_xml_size=`calcsize $PACKAGE-db.xml`
+  gzip -f -9 -c $PACKAGE-db.xml >"$outdir/$PACKAGE-db.xml.gz"
+  docbook_xml_gz_size=`calcsize "$outdir/$PACKAGE-db.xml.gz"`
+  mv $PACKAGE-db.xml "$outdir/"
+
+  split_html_db_dir=html_node_db
+  opt="$commonarg -o $split_html_db_dir"
+  cmd="$DOCBOOK2HTML $opt \"${outdir}/$PACKAGE-db.xml\""
+  printf "\nGenerating docbook HTML... ($cmd)\n"
+  eval "$cmd"
+  (
+    cd ${split_html_db_dir} || exit 1
+    tar -czf "$abs_outdir/${PACKAGE}.html_node_db.tar.gz" -- *.html
+  )
+  html_node_db_tgz_size=`calcsize "$outdir/${PACKAGE}.html_node_db.tar.gz"`
+  rm -f "$outdir"/html_node_db/*.html
+  mkdir -p "$outdir/html_node_db"
+  mv ${split_html_db_dir}/*.html "$outdir/html_node_db/"
+  rmdir ${split_html_db_dir}
+
+  cmd="$DOCBOOK2TXT \"${outdir}/$PACKAGE-db.xml\""
+  printf "\nGenerating docbook ASCII... ($cmd)\n"
+  eval "$cmd"
+  docbook_ascii_size=`calcsize $PACKAGE-db.txt`
+  mv $PACKAGE-db.txt "$outdir/"
+
+  cmd="$DOCBOOK2PDF \"${outdir}/$PACKAGE-db.xml\""
+  printf "\nGenerating docbook PDF... ($cmd)\n"
+  eval "$cmd"
+  docbook_pdf_size=`calcsize $PACKAGE-db.pdf`
+  mv $PACKAGE-db.pdf "$outdir/"
+fi
+
+# \f
+printf "\nMaking index.html for $PACKAGE...\n"
+if test -z "$use_texi2html"; then
+  CONDS="/%%IF  *HTML_SECTION%%/,/%%ENDIF  *HTML_SECTION%%/d;\
+         /%%IF  *HTML_CHAPTER%%/,/%%ENDIF  *HTML_CHAPTER%%/d"
+else
+  # should take account of --split here.
+  CONDS="/%%ENDIF.*%%/d;/%%IF  *HTML_SECTION%%/d;/%%IF  *HTML_CHAPTER%%/d"
+fi
+
+curdate=`$SETLANG date '+%B %d, %Y'`
+sed \
+   -e "s!%%TITLE%%!$MANUAL_TITLE!g" \
+   -e "s!%%EMAIL%%!$EMAIL!g" \
+   -e "s!%%PACKAGE%%!$PACKAGE!g" \
+   -e "s!%%DATE%%!$curdate!g" \
+   -e "s!%%HTML_MONO_SIZE%%!$html_mono_size!g" \
+   -e "s!%%HTML_MONO_GZ_SIZE%%!$html_mono_gz_size!g" \
+   -e "s!%%HTML_NODE_TGZ_SIZE%%!$html_node_tgz_size!g" \
+   -e "s!%%HTML_SECTION_TGZ_SIZE%%!$html_section_tgz_size!g" \
+   -e "s!%%HTML_CHAPTER_TGZ_SIZE%%!$html_chapter_tgz_size!g" \
+   -e "s!%%INFO_TGZ_SIZE%%!$info_tgz_size!g" \
+   -e "s!%%DVI_GZ_SIZE%%!$dvi_gz_size!g" \
+   -e "s!%%PDF_SIZE%%!$pdf_size!g" \
+   -e "s!%%ASCII_SIZE%%!$ascii_size!g" \
+   -e "s!%%ASCII_GZ_SIZE%%!$ascii_gz_size!g" \
+   -e "s!%%TEXI_TGZ_SIZE%%!$texi_tgz_size!g" \
+   -e "s!%%DOCBOOK_HTML_NODE_TGZ_SIZE%%!$html_node_db_tgz_size!g" \
+   -e "s!%%DOCBOOK_ASCII_SIZE%%!$docbook_ascii_size!g" \
+   -e "s!%%DOCBOOK_PDF_SIZE%%!$docbook_pdf_size!g" \
+   -e "s!%%DOCBOOK_XML_SIZE%%!$docbook_xml_size!g" \
+   -e "s!%%DOCBOOK_XML_GZ_SIZE%%!$docbook_xml_gz_size!g" \
+   -e "s,%%SCRIPTURL%%,$scripturl,g" \
+   -e "s!%%SCRIPTNAME%%!$prog!g" \
+   -e "$CONDS" \
+$GENDOCS_TEMPLATE_DIR/gendocs_template >"$outdir/index.html"
+
+echo "Done, see $outdir/ subdirectory for new files."
+
+# Local variables:
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "scriptversion="
+# time-stamp-format: "%:y-%02m-%02d.%02H"
+# time-stamp-end: "$"
+# End:
diff --git a/lib/gendocs_template b/lib/gendocs_template
new file mode 100644 (file)
index 0000000..178f6cb
--- /dev/null
@@ -0,0 +1,91 @@
+<!--#include virtual="/server/header.html" -->
+<!-- Parent-Version: 1.77 -->
+<title>%%TITLE%% - GNU Project - Free Software Foundation</title>
+<!--#include virtual="/server/banner.html" -->
+<h2>%%TITLE%%</h2>
+
+<address>Free Software Foundation</address>
+<address>last updated %%DATE%%</address>
+
+<p>This manual (%%PACKAGE%%) is available in the following formats:</p>
+
+<ul>
+<li><a href="%%PACKAGE%%.html">HTML
+    (%%HTML_MONO_SIZE%%K bytes)</a> - entirely on one web page.</li>
+<li><a href="html_node/index.html">HTML</a> - with one web page per
+    node.</li>
+%%IF HTML_SECTION%%
+<li><a href="html_section/index.html">HTML</a> - with one web page per
+    section.</li>
+%%ENDIF HTML_SECTION%%
+%%IF HTML_CHAPTER%%
+<li><a href="html_chapter/index.html">HTML</a> - with one web page per
+    chapter.</li>
+%%ENDIF HTML_CHAPTER%%
+<li><a href="%%PACKAGE%%.html.gz">HTML compressed
+    (%%HTML_MONO_GZ_SIZE%%K gzipped characters)</a> - entirely on
+    one web page.</li>
+<li><a href="%%PACKAGE%%.html_node.tar.gz">HTML compressed
+    (%%HTML_NODE_TGZ_SIZE%%K gzipped tar file)</a> -
+    with one web page per node.</li>
+%%IF HTML_SECTION%%
+<li><a href="%%PACKAGE%%.html_section.tar.gz">HTML compressed
+    (%%HTML_SECTION_TGZ_SIZE%%K gzipped tar file)</a> -
+    with one web page per section.</li>
+%%ENDIF HTML_SECTION%%
+%%IF HTML_CHAPTER%%
+<li><a href="%%PACKAGE%%.html_chapter.tar.gz">HTML compressed
+    (%%HTML_CHAPTER_TGZ_SIZE%%K gzipped tar file)</a> -
+    with one web page per chapter.</li>
+%%ENDIF HTML_CHAPTER%%
+<li><a href="%%PACKAGE%%.info.tar.gz">Info document
+    (%%INFO_TGZ_SIZE%%K bytes gzipped tar file)</a>.</li>
+<li><a href="%%PACKAGE%%.txt">ASCII text
+    (%%ASCII_SIZE%%K bytes)</a>.</li>
+<li><a href="%%PACKAGE%%.txt.gz">ASCII text compressed
+    (%%ASCII_GZ_SIZE%%K bytes gzipped)</a>.</li>
+<li><a href="%%PACKAGE%%.dvi.gz">TeX dvi file
+    (%%DVI_GZ_SIZE%%K bytes gzipped)</a>.</li>
+<li><a href="%%PACKAGE%%.pdf">PDF file
+    (%%PDF_SIZE%%K bytes)</a>.</li>
+<li><a href="%%PACKAGE%%.texi.tar.gz">Texinfo source
+    (%%TEXI_TGZ_SIZE%%K bytes gzipped tar file).</a></li>
+</ul>
+
+<p>You can <a href="http://shop.fsf.org/">buy printed copies of
+some manuals</a> (among other items) from the Free Software Foundation;
+this helps support FSF activities.</p>
+
+<p>(This page generated by the <a href="%%SCRIPTURL%%">%%SCRIPTNAME%%
+script</a>.)</p>
+
+<!-- If needed, change the copyright block at the bottom. In general,
+     all pages on the GNU web server should have the section about
+     verbatim copying.  Please do NOT remove this without talking
+     with the webmasters first.
+     Please make sure the copyright date is consistent with the document
+     and that it is like this: "2001, 2002", not this: "2001-2002". -->
+</div><!-- for id="content", starts in the include above -->
+<!--#include virtual="/server/footer.html" -->
+<div id="footer">
+<div class="unprintable">
+
+<p>Please send general FSF &amp; GNU inquiries to
+<a href="mailto:gnu@gnu.org">&lt;gnu@gnu.org&gt;</a>.
+There are also <a href="/contact/">other ways to contact</a>
+the FSF.  Broken links and other corrections or suggestions can be sent
+to <a href="mailto:%%EMAIL%%">&lt;%%EMAIL%%&gt;</a>.</p>
+</div>
+
+<p>Copyright &copy; 2017 Free Software Foundation, Inc.</p>
+
+<p>This page is licensed under a <a rel="license"
+href="http://creativecommons.org/licenses/by-nd/3.0/us/">Creative
+Commons Attribution-NoDerivs 3.0 United States License</a>.</p>
+
+<!--#include virtual="/server/bottom-notes.html" -->
+
+</div>
+</div>
+</body>
+</html>
index 38c6f3a..cf16425 100755 (executable)
@@ -1,15 +1,15 @@
-eval '(exit $?0)' && eval 'exec perl -wS "$0" ${1+"$@"}'
+eval '(exit $?0)' && eval 'exec perl -wS "$0" "$@"'
   & eval 'exec perl -wS "$0" $argv:q'
     if 0;
 # Convert git log output to ChangeLog format.
 
-my $VERSION = '2012-01-18 07:50'; # UTC
+my $VERSION = '2016-03-22 21:49'; # UTC
 # The definition above must lie within the first 8 lines in order
 # for the Emacs time-stamp write hook (at end) to update it.
 # If you change this file with Emacs, please let the write hook
 # do its job.  Otherwise, update this string manually.
 
-# Copyright (C) 2008-2012 Free Software Foundation, Inc.
+# Copyright (C) 2008-2017 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
@@ -68,12 +68,20 @@ OPTIONS:
                   header; the default is to cluster adjacent commit messages
                   if their headers are the same and neither commit message
                   contains multiple paragraphs.
+   --srcdir=DIR the root of the source tree, from which the .git/
+                  directory can be derived.
    --since=DATE convert only the logs since DATE;
                   the default is to convert all log entries.
+   --until=DATE convert only the logs older than DATE.
+   --ignore-matching=PAT ignore commit messages whose first lines match PAT.
+   --ignore-line=PAT ignore lines of commit messages that match PAT.
    --format=FMT set format string for commit subject and body;
                   see 'man git-log' for the list of format metacharacters;
                   the default is '%s%n%b%n'
-
+   --strip-tab  remove one additional leading TAB from commit message lines.
+   --strip-cherry-pick  remove data inserted by "git cherry-pick";
+                  this includes the "cherry picked from commit ..." line,
+                  and the possible final "Conflicts:" paragraph.
    --help       display this help and exit
    --version    output version information and exit
 
@@ -189,32 +197,71 @@ sub parse_amend_file($)
   return $h;
 }
 
+# git_dir_option $SRCDIR
+#
+# From $SRCDIR, the --git-dir option to pass to git (none if $SRCDIR
+# is undef).  Return as a list (0 or 1 element).
+sub git_dir_option($)
+{
+  my ($srcdir) = @_;
+  my @res = ();
+  if (defined $srcdir)
+    {
+      my $qdir = shell_quote $srcdir;
+      my $cmd = "cd $qdir && git rev-parse --show-toplevel";
+      my $qcmd = shell_quote $cmd;
+      my $git_dir = qx($cmd);
+      defined $git_dir
+        or die "$ME: cannot run $qcmd: $!\n";
+      $? == 0
+        or die "$ME: $qcmd had unexpected exit code or signal ($?)\n";
+      chomp $git_dir;
+      push @res, "--git-dir=$git_dir/.git";
+    }
+  @res;
+}
+
 {
   my $since_date;
+  my $until_date;
   my $format_string = '%s%n%b%n';
   my $amend_file;
   my $append_dot = 0;
   my $cluster = 1;
+  my $ignore_matching;
+  my $ignore_line;
+  my $strip_tab = 0;
+  my $strip_cherry_pick = 0;
+  my $srcdir;
   GetOptions
     (
      help => sub { usage 0 },
      version => sub { print "$ME version $VERSION\n"; exit },
      'since=s' => \$since_date,
+     'until=s' => \$until_date,
      'format=s' => \$format_string,
      'amend=s' => \$amend_file,
      'append-dot' => \$append_dot,
      'cluster!' => \$cluster,
+     'ignore-matching=s' => \$ignore_matching,
+     'ignore-line=s' => \$ignore_line,
+     'strip-tab' => \$strip_tab,
+     'strip-cherry-pick' => \$strip_cherry_pick,
+     'srcdir=s' => \$srcdir,
     ) or usage 1;
 
-
   defined $since_date
     and unshift @ARGV, "--since=$since_date";
+  defined $until_date
+    and unshift @ARGV, "--until=$until_date";
 
   # This is a hash that maps an SHA1 to perl code (i.e., s/old/new/)
   # that makes a correction in the log or attribution of that commit.
   my $amend_code = defined $amend_file ? parse_amend_file $amend_file : {};
 
-  my @cmd = (qw (git log --log-size),
+  my @cmd = ('git',
+             git_dir_option $srcdir,
+             qw(log --log-size),
              '--pretty=format:%H:%ct  %an  <%ae>%n%n'.$format_string, @ARGV);
   open PIPE, '-|', @cmd
     or die ("$ME: failed to run '". quoted_cmd (@cmd) ."': $!\n"
@@ -223,6 +270,7 @@ sub parse_amend_file($)
   my $prev_multi_paragraph;
   my $prev_date_line = '';
   my @prev_coauthors = ();
+  my @skipshas = ();
   while (1)
     {
       defined (my $in = <PIPE>)
@@ -243,6 +291,19 @@ sub parse_amend_file($)
       $sha =~ /^[0-9a-fA-F]{40}$/
         or die "$ME:$.: invalid SHA1: $sha\n";
 
+      my $skipflag = 0;
+      if (@skipshas)
+        {
+          foreach(@skipshas)
+            {
+              if ($sha =~ /^$_/)
+                {
+                  $skipflag = $_;
+                  last;
+                }
+            }
+        }
+
       # If this commit's log requires any transformation, do it now.
       my $code = $amend_code->{$sha};
       if (defined $code)
@@ -263,7 +324,14 @@ sub parse_amend_file($)
           $rest = $_;
         }
 
-      my @line = split "\n", $rest;
+      # Remove lines inserted by "git cherry-pick".
+      if ($strip_cherry_pick)
+        {
+          $rest =~ s/^\s*Conflicts:\n.*//sm;
+          $rest =~ s/^\s*\(cherry picked from commit [\da-f]+\)\n//m;
+        }
+
+      my @line = split /[ \t]*\n/, $rest;
       my $author_line = shift @line;
       defined $author_line
         or die "$ME:$.: unexpected EOF\n";
@@ -273,17 +341,18 @@ sub parse_amend_file($)
 
       # Format 'Copyright-paperwork-exempt: Yes' as a standard ChangeLog
       # `(tiny change)' annotation.
-      my $tiny = (grep (/^Copyright-paperwork-exempt:\s+[Yy]es$/, @line)
+      my $tiny = (grep (/^(?:Copyright-paperwork-exempt|Tiny-change):\s+[Yy]es$/, @line)
                   ? '  (tiny change)' : '');
 
       my $date_line = sprintf "%s  %s$tiny\n",
-        strftime ("%F", localtime ($1)), $2;
+        strftime ("%Y-%m-%d", localtime ($1)), $2;
 
       my @coauthors = grep /^Co-authored-by:.*$/, @line;
       # Omit meta-data lines we've already interpreted.
       @line = grep !/^(?:Signed-off-by:[ ].*>$
                        |Co-authored-by:[ ]
                        |Copyright-paperwork-exempt:[ ]
+                       |Tiny-change:[ ]
                        )/x, @line;
 
       # Remove leading and trailing blank lines.
@@ -293,64 +362,109 @@ sub parse_amend_file($)
           while ($line[$#line] =~ /^\s*$/) { pop @line; }
         }
 
-      # Record whether there are two or more paragraphs.
-      my $multi_paragraph = grep /^\s*$/, @line;
-
-      # Format 'Co-authored-by: A U Thor <email@example.com>' lines in
-      # standard multi-author ChangeLog format.
-      for (@coauthors)
+      # Handle Emacs gitmerge.el "skipped" commits.
+      # Yes, this should be controlled by an option.  So sue me.
+      if ( grep /^(; )?Merge from /, @line )
+      {
+          my $found = 0;
+          foreach (@line)
+          {
+              if (grep /^The following commit.*skipped:$/, $_)
+              {
+                  $found = 1;
+                  ## Reset at each merge to reduce chance of false matches.
+                  @skipshas = ();
+                  next;
+              }
+              if ($found && $_ =~ /^([0-9a-fA-F]{7,}) [^ ]/)
+              {
+                  push ( @skipshas, $1 );
+              }
+          }
+      }
+
+      # Ignore commits that match the --ignore-matching pattern, if specified.
+      if (defined $ignore_matching && @line && $line[0] =~ /$ignore_matching/)
         {
-          s/^Co-authored-by:\s*/\t    /;
-          s/\s*</  </;
-
-          /<.*?@.*\..*>/
-            or warn "$ME: warning: missing email address for "
-              . substr ($_, 5) . "\n";
+          $skipflag = 1;
         }
-
-      # If clustering of commit messages has been disabled, if this header
-      # would be different from the previous date/name/email/coauthors header,
-      # or if this or the previous entry consists of two or more paragraphs,
-      # then print the header.
-      if ( ! $cluster
-          || $date_line ne $prev_date_line
-          || "@coauthors" ne "@prev_coauthors"
-          || $multi_paragraph
-          || $prev_multi_paragraph)
+      elsif ($skipflag)
         {
-          $prev_date_line eq ''
-            or print "\n";
-          print $date_line;
-          @coauthors
-            and print join ("\n", @coauthors), "\n";
+          ## Perhaps only warn if a pattern matches more than once?
+          warn "$ME: warning: skipping $sha due to $skipflag\n";
         }
-      $prev_date_line = $date_line;
-      @prev_coauthors = @coauthors;
-      $prev_multi_paragraph = $multi_paragraph;
 
-      # If there were any lines
-      if (@line == 0)
+      if (! $skipflag)
         {
-          warn "$ME: warning: empty commit message:\n  $date_line\n";
-        }
-      else
-        {
-          if ($append_dot)
+          if (defined $ignore_line && @line)
+            {
+              @line = grep ! /$ignore_line/, @line;
+              while ($line[$#line] =~ /^\s*$/) { pop @line; }
+            }
+
+          # Record whether there are two or more paragraphs.
+          my $multi_paragraph = grep /^\s*$/, @line;
+
+          # Format 'Co-authored-by: A U Thor <email@example.com>' lines in
+          # standard multi-author ChangeLog format.
+          for (@coauthors)
             {
-              # If the first line of the message has enough room, then
-              if (length $line[0] < 72)
+              s/^Co-authored-by:\s*/\t    /;
+              s/\s*</  </;
+
+              /<.*?@.*\..*>/
+                or warn "$ME: warning: missing email address for "
+                  . substr ($_, 5) . "\n";
+            }
+
+          # If clustering of commit messages has been disabled, if this header
+          # would be different from the previous date/name/etc. header,
+          # or if this or the previous entry consists of two or more paragraphs,
+          # then print the header.
+          if ( ! $cluster
+              || $date_line ne $prev_date_line
+              || "@coauthors" ne "@prev_coauthors"
+              || $multi_paragraph
+              || $prev_multi_paragraph)
+            {
+              $prev_date_line eq ''
+                or print "\n";
+              print $date_line;
+              @coauthors
+                and print join ("\n", @coauthors), "\n";
+            }
+          $prev_date_line = $date_line;
+          @prev_coauthors = @coauthors;
+          $prev_multi_paragraph = $multi_paragraph;
+
+          # If there were any lines
+          if (@line == 0)
+            {
+              warn "$ME: warning: empty commit message:\n  $date_line\n";
+            }
+          else
+            {
+              if ($append_dot)
                 {
-                  # append a dot if there is no other punctuation or blank
-                  # at the end.
-                  $line[0] =~ /[[:punct:]\s]$/
-                    or $line[0] .= '.';
+                  # If the first line of the message has enough room, then
+                  if (length $line[0] < 72)
+                    {
+                      # append a dot if there is no other punctuation or blank
+                      # at the end.
+                      $line[0] =~ /[[:punct:]\s]$/
+                        or $line[0] .= '.';
+                    }
                 }
-            }
 
-          # Prefix each non-empty line with a TAB.
-          @line = map { length $_ ? "\t$_" : '' } @line;
+              # Remove one additional leading TAB from each line.
+              $strip_tab
+                and map { s/^\t// } @line;
 
-          print "\n", join ("\n", @line), "\n";
+              # Prefix each non-empty line with a TAB.
+              @line = map { length $_ ? "\t$_" : '' } @line;
+
+              print "\n", join ("\n", @line), "\n";
+            }
         }
 
       defined ($in = <PIPE>)
@@ -380,6 +494,6 @@ sub parse_amend_file($)
 # eval: (add-hook 'write-file-hooks 'time-stamp)
 # time-stamp-start: "my $VERSION = '"
 # time-stamp-format: "%:y-%02m-%02d %02H:%02M"
-# time-stamp-time-zone: "UTC"
+# time-stamp-time-zone: "UTC0"
 # time-stamp-end: "'; # UTC"
 # End:
index b71ddfd..d4192cd 100755 (executable)
@@ -1,9 +1,9 @@
 #!/bin/sh
 # Sign files and upload them.
 
-scriptversion=2012-01-15.15; # UTC
+scriptversion=2016-01-11.22; # UTC
 
-# Copyright (C) 2004-2012 Free Software Foundation, Inc.
+# Copyright (C) 2004-2017 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
@@ -28,6 +28,7 @@ GPG='gpg --batch --no-tty'
 conffile=.gnuploadrc
 to=
 dry_run=false
+replace=
 symlink_files=
 delete_files=
 delete_symlinks=
@@ -38,9 +39,8 @@ nl='
 
 usage="Usage: $0 [OPTION]... [CMD] FILE... [[CMD] FILE...]
 
-Sign all FILES, and process them at selected destinations according to CMD.
-<http://www.gnu.org/prep/maintain/html_node/Automated-FTP-Uploads.html>
-explains further.
+Sign all FILES, and process them at the destinations specified with --to.
+If CMD is not given, it defaults to uploading.  See examples below.
 
 Commands:
   --delete                 delete FILES from destination
@@ -49,17 +49,18 @@ Commands:
   --                       treat the remaining arguments as files to upload
 
 Options:
-  --help                   print this help text and exit
-  --to DEST                specify one destination for FILES
+  --to DEST                specify a destination DEST for FILES
                            (multiple --to options are allowed)
   --user NAME              sign with key NAME
+  --replace                allow replacements of existing files
   --symlink-regex[=EXPR]   use sed script EXPR to compute symbolic link names
   --dry-run                do nothing, show what would have been done
+                           (including the constructed directive file)
   --version                output version information and exit
+  --help                   print this help text and exit
 
 If --symlink-regex is given without EXPR, then the link target name
 is created by replacing the version information with '-latest', e.g.:
-
   foo-1.3.4.tar.gz -> foo-latest.tar.gz
 
 Recognized destinations are:
@@ -77,6 +78,9 @@ in the current working directory, its contents are prepended to the
 actual command line options.  Use this to keep your defaults.  Comments
 (#) and empty lines in $conffile are allowed.
 
+<http://www.gnu.org/prep/maintain/html_node/Automated-FTP-Uploads.html>
+gives some further background.
+
 Examples:
 1. Upload foobar-1.0.tar.gz to ftp.gnu.org:
   gnupload --to ftp.gnu.org:foobar foobar-1.0.tar.gz
@@ -101,7 +105,7 @@ Examples:
            --delete oopsbar-0.9.91.tar.gz \\
            -- foobar-0.9.91.tar.gz
 
-gnupload uses the ncftpput program to do the transfers; if you don't
+gnupload executes a program ncftpput to do the transfers; if you don't
 happen to have an ncftp package installed, the ncftpput-ftp script in
 the build-aux/ directory of the gnulib package
 (http://savannah.gnu.org/projects/gnulib) may serve as a replacement.
@@ -129,6 +133,12 @@ while test -n "$1"; do
       if test -z "$2"; then
         echo "$0: Missing argument for --to" 1>&2
         exit 1
+      elif echo "$2" | grep 'ftp-upload\.gnu\.org' >/dev/null; then
+        echo "$0: Use ftp.gnu.org:PKGNAME or alpha.gnu.org:PKGNAME" >&2
+        echo "$0: for the destination, not ftp-upload.gnu.org (which" >&2
+        echo "$0:  is used for direct ftp uploads, not with gnupload)." >&2
+        echo "$0: See --help and its examples if need be." >&2
+        exit 1
       else
         to="$to $2"
         shift
@@ -146,6 +156,9 @@ while test -n "$1"; do
     --delete)
       collect_var=delete_files
       ;;
+    --replace)
+      replace="replace: true"
+      ;;
     --rmsymlink)
       collect_var=delete_symlinks
       ;;
@@ -236,6 +249,8 @@ fi
 
 # Make sure passphrase is not exported in the environment.
 unset passphrase
+unset passphrase_fd_0
+GNUPGHOME=${GNUPGHOME:-$HOME/.gnupg}
 
 # Reset PATH to be sure that echo is a built-in.  We will later use
 # 'echo $passphrase' to output the passphrase, so it is important that
@@ -243,18 +258,21 @@ unset passphrase
 # listings with their arguments...).
 # Remember this script runs with 'set -e', so if echo is not built-in
 # it will exit now.
-PATH=/empty echo -n "Enter GPG passphrase: "
-stty -echo
-read -r passphrase
-stty echo
-echo
+if $dry_run || grep -q "^use-agent" $GNUPGHOME/gpg.conf; then :; else
+  PATH=/empty echo -n "Enter GPG passphrase: "
+  stty -echo
+  read -r passphrase
+  stty echo
+  echo
+  passphrase_fd_0="--passphrase-fd 0"
+fi
 
 if test $# -ne 0; then
   for file
   do
     echo "Signing $file ..."
     rm -f $file.sig
-    echo "$passphrase" | $dbg $GPG --passphrase-fd 0 -ba -o $file.sig $file
+    echo "$passphrase" | $dbg $GPG $passphrase_fd_0 -ba -o $file.sig $file
   done
 fi
 
@@ -270,7 +288,7 @@ filename: $3$stmt"
   fi
 
   cat >${2}.directive<<EOF
-version: 1.1
+version: 1.2
 directory: $1
 comment: gnupload v. $scriptversion$stmt
 EOF
@@ -312,12 +330,12 @@ upload ()
   case $dest in
     alpha.gnu.org:*)
       mkdirective "$destdir" "$base" "$file" "$stmt"
-      echo "$passphrase" | $dbg $GPG --passphrase-fd 0 --clearsign $base.directive
+      echo "$passphrase" | $dbg $GPG $passphrase_fd_0 --clearsign $base.directive
       $dbg ncftpput ftp-upload.gnu.org /incoming/alpha $files $base.directive.asc
       ;;
     ftp.gnu.org:*)
       mkdirective "$destdir" "$base" "$file" "$stmt"
-      echo "$passphrase" | $dbg $GPG --passphrase-fd 0 --clearsign $base.directive
+      echo "$passphrase" | $dbg $GPG $passphrase_fd_0 --clearsign $base.directive
       $dbg ncftpput ftp-upload.gnu.org /incoming/ftp $files $base.directive.asc
       ;;
     savannah.gnu.org:*)
@@ -336,7 +354,7 @@ upload ()
       destdir_p1=`echo "$destdir" | sed 's,^[^/]*/,,'`
       destdir_topdir=`echo "$destdir" | sed 's,/.*,,'`
       mkdirective "$destdir_p1" "$base" "$file" "$stmt"
-      echo "$passphrase" | $dbg $GPG --passphrase-fd 0 --clearsign $base.directive
+      echo "$passphrase" | $dbg $GPG $passphrase_fd_0 --clearsign $base.directive
       for f in $files $base.directive.asc
       do
         echo put $f
@@ -345,7 +363,7 @@ upload ()
     /*)
       dest_host=`echo "$dest" | sed 's,:.*,,'`
       mkdirective "$destdir" "$base" "$file" "$stmt"
-      echo "$passphrase" | $dbg $GPG --passphrase-fd 0 --clearsign $base.directive
+      echo "$passphrase" | $dbg $GPG $passphrase_fd_0 --clearsign $base.directive
       $dbg cp $files $base.directive.asc $dest_host
       ;;
     *)
@@ -393,6 +411,12 @@ do
   do
     echo "Uploading $file to $dest ..."
     stmt=
+    #
+    # allowing file replacement is all or nothing.
+    if test -n "$replace"; then stmt="$stmt
+$replace"
+    fi
+    #
     files="$file $file.sig"
     destdir=`echo $dest | sed 's/[^:]*://'`
     if test -n "$symlink_expr"; then
@@ -411,6 +435,6 @@ exit 0
 # eval: (add-hook 'write-file-hooks 'time-stamp)
 # time-stamp-start: "scriptversion="
 # time-stamp-format: "%:y-%02m-%02d.%02H"
-# time-stamp-time-zone: "UTC"
+# time-stamp-time-zone: "UTC0"
 # time-stamp-end: "; # UTC"
 # End:
index 377bb86..0360b79 100755 (executable)
@@ -1,7 +1,7 @@
 #!/bin/sh
 # install - install a program, script, or datafile
 
-scriptversion=2011-11-20.07; # UTC
+scriptversion=2016-01-11.22; # UTC
 
 # This originates from X11R5 (mit/util/scripts/install.sh), which was
 # later released in X11R6 (xc/config/util/install.sh) with the
@@ -41,19 +41,15 @@ scriptversion=2011-11-20.07; # UTC
 # This script is compatible with the BSD install script, but was written
 # from scratch.
 
+tab='  '
 nl='
 '
-IFS=" ""       $nl"
+IFS=" $tab$nl"
 
-# set DOITPROG to echo to test this script
+# Set DOITPROG to "echo" to test this script.
 
-# Don't use :- since 4.3BSD and earlier shells don't like it.
 doit=${DOITPROG-}
-if test -z "$doit"; then
-  doit_exec=exec
-else
-  doit_exec=$doit
-fi
+doit_exec=${doit:-exec}
 
 # Put in absolute file names if you don't have them in your path;
 # or use environment vars.
@@ -68,17 +64,6 @@ mvprog=${MVPROG-mv}
 rmprog=${RMPROG-rm}
 stripprog=${STRIPPROG-strip}
 
-posix_glob='?'
-initialize_posix_glob='
-  test "$posix_glob" != "?" || {
-    if (set -f) 2>/dev/null; then
-      posix_glob=
-    else
-      posix_glob=:
-    fi
-  }
-'
-
 posix_mkdir=
 
 # Desired mode of installed file.
@@ -97,7 +82,7 @@ dir_arg=
 dst_arg=
 
 copy_on_change=false
-no_target_directory=
+is_target_a_directory=possibly
 
 usage="\
 Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE
@@ -137,46 +122,57 @@ while test $# -ne 0; do
     -d) dir_arg=true;;
 
     -g) chgrpcmd="$chgrpprog $2"
-       shift;;
+        shift;;
 
     --help) echo "$usage"; exit $?;;
 
     -m) mode=$2
-       case $mode in
-         *' '* | *'    '* | *'
-'*       | *'*'* | *'?'* | *'['*)
-           echo "$0: invalid mode: $mode" >&2
-           exit 1;;
-       esac
-       shift;;
+        case $mode in
+          *' '* | *"$tab"* | *"$nl"* | *'*'* | *'?'* | *'['*)
+            echo "$0: invalid mode: $mode" >&2
+            exit 1;;
+        esac
+        shift;;
 
     -o) chowncmd="$chownprog $2"
-       shift;;
+        shift;;
 
     -s) stripcmd=$stripprog;;
 
-    -t) dst_arg=$2
-       # Protect names problematic for 'test' and other utilities.
-       case $dst_arg in
-         -* | [=\(\)!]) dst_arg=./$dst_arg;;
-       esac
-       shift;;
+    -t)
+        is_target_a_directory=always
+        dst_arg=$2
+        # Protect names problematic for 'test' and other utilities.
+        case $dst_arg in
+          -* | [=\(\)!]) dst_arg=./$dst_arg;;
+        esac
+        shift;;
 
-    -T) no_target_directory=true;;
+    -T) is_target_a_directory=never;;
 
     --version) echo "$0 $scriptversion"; exit $?;;
 
-    --)        shift
-       break;;
+    --) shift
+        break;;
 
-    -*)        echo "$0: invalid option: $1" >&2
-       exit 1;;
+    -*) echo "$0: invalid option: $1" >&2
+        exit 1;;
 
     *)  break;;
   esac
   shift
 done
 
+# We allow the use of options -d and -T together, by making -d
+# take the precedence; this is for compatibility with GNU install.
+
+if test -n "$dir_arg"; then
+  if test -n "$dst_arg"; then
+    echo "$0: target directory not allowed when installing a directory." >&2
+    exit 1
+  fi
+fi
+
 if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then
   # When -d is used, all remaining arguments are directories to create.
   # When -t is used, the destination is already specified.
@@ -208,6 +204,15 @@ if test $# -eq 0; then
 fi
 
 if test -z "$dir_arg"; then
+  if test $# -gt 1 || test "$is_target_a_directory" = always; then
+    if test ! -d "$dst_arg"; then
+      echo "$0: $dst_arg: Is not a directory." >&2
+      exit 1
+    fi
+  fi
+fi
+
+if test -z "$dir_arg"; then
   do_exit='(exit $ret); exit $ret'
   trap "ret=129; $do_exit" 1
   trap "ret=130; $do_exit" 2
@@ -223,16 +228,16 @@ if test -z "$dir_arg"; then
 
     *[0-7])
       if test -z "$stripcmd"; then
-       u_plus_rw=
+        u_plus_rw=
       else
-       u_plus_rw='% 200'
+        u_plus_rw='% 200'
       fi
       cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;;
     *)
       if test -z "$stripcmd"; then
-       u_plus_rw=
+        u_plus_rw=
       else
-       u_plus_rw=,u+rw
+        u_plus_rw=,u+rw
       fi
       cp_umask=$mode$u_plus_rw;;
   esac
@@ -269,41 +274,15 @@ do
     # If destination is a directory, append the input filename; won't work
     # if double slashes aren't ignored.
     if test -d "$dst"; then
-      if test -n "$no_target_directory"; then
-       echo "$0: $dst_arg: Is a directory" >&2
-       exit 1
+      if test "$is_target_a_directory" = never; then
+        echo "$0: $dst_arg: Is a directory" >&2
+        exit 1
       fi
       dstdir=$dst
       dst=$dstdir/`basename "$src"`
       dstdir_status=0
     else
-      # Prefer dirname, but fall back on a substitute if dirname fails.
-      dstdir=`
-       (dirname "$dst") 2>/dev/null ||
-       expr X"$dst" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
-            X"$dst" : 'X\(//\)[^/]' \| \
-            X"$dst" : 'X\(//\)$' \| \
-            X"$dst" : 'X\(/\)' \| . 2>/dev/null ||
-       echo X"$dst" |
-           sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
-                  s//\1/
-                  q
-                }
-                /^X\(\/\/\)[^/].*/{
-                  s//\1/
-                  q
-                }
-                /^X\(\/\/\)$/{
-                  s//\1/
-                  q
-                }
-                /^X\(\/\).*/{
-                  s//\1/
-                  q
-                }
-                s/.*/./; q'
-      `
-
+      dstdir=`dirname "$dst"`
       test -d "$dstdir"
       dstdir_status=$?
     fi
@@ -314,74 +293,74 @@ do
   if test $dstdir_status != 0; then
     case $posix_mkdir in
       '')
-       # Create intermediate dirs using mode 755 as modified by the umask.
-       # This is like FreeBSD 'install' as of 1997-10-28.
-       umask=`umask`
-       case $stripcmd.$umask in
-         # Optimize common cases.
-         *[2367][2367]) mkdir_umask=$umask;;
-         .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;;
-
-         *[0-7])
-           mkdir_umask=`expr $umask + 22 \
-             - $umask % 100 % 40 + $umask % 20 \
-             - $umask % 10 % 4 + $umask % 2
-           `;;
-         *) mkdir_umask=$umask,go-w;;
-       esac
-
-       # With -d, create the new directory with the user-specified mode.
-       # Otherwise, rely on $mkdir_umask.
-       if test -n "$dir_arg"; then
-         mkdir_mode=-m$mode
-       else
-         mkdir_mode=
-       fi
-
-       posix_mkdir=false
-       case $umask in
-         *[123567][0-7][0-7])
-           # POSIX mkdir -p sets u+wx bits regardless of umask, which
-           # is incompatible with FreeBSD 'install' when (umask & 300) != 0.
-           ;;
-         *)
-           tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$
-           trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0
-
-           if (umask $mkdir_umask &&
-               exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1
-           then
-             if test -z "$dir_arg" || {
-                  # Check for POSIX incompatibilities with -m.
-                  # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or
-                  # other-writable bit of parent directory when it shouldn't.
-                  # FreeBSD 6.1 mkdir -m -p sets mode of existing directory.
-                  ls_ld_tmpdir=`ls -ld "$tmpdir"`
-                  case $ls_ld_tmpdir in
-                    d????-?r-*) different_mode=700;;
-                    d????-?--*) different_mode=755;;
-                    *) false;;
-                  esac &&
-                  $mkdirprog -m$different_mode -p -- "$tmpdir" && {
-                    ls_ld_tmpdir_1=`ls -ld "$tmpdir"`
-                    test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1"
-                  }
-                }
-             then posix_mkdir=:
-             fi
-             rmdir "$tmpdir/d" "$tmpdir"
-           else
-             # Remove any dirs left behind by ancient mkdir implementations.
-             rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null
-           fi
-           trap '' 0;;
-       esac;;
+        # Create intermediate dirs using mode 755 as modified by the umask.
+        # This is like FreeBSD 'install' as of 1997-10-28.
+        umask=`umask`
+        case $stripcmd.$umask in
+          # Optimize common cases.
+          *[2367][2367]) mkdir_umask=$umask;;
+          .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;;
+
+          *[0-7])
+            mkdir_umask=`expr $umask + 22 \
+              - $umask % 100 % 40 + $umask % 20 \
+              - $umask % 10 % 4 + $umask % 2
+            `;;
+          *) mkdir_umask=$umask,go-w;;
+        esac
+
+        # With -d, create the new directory with the user-specified mode.
+        # Otherwise, rely on $mkdir_umask.
+        if test -n "$dir_arg"; then
+          mkdir_mode=-m$mode
+        else
+          mkdir_mode=
+        fi
+
+        posix_mkdir=false
+        case $umask in
+          *[123567][0-7][0-7])
+            # POSIX mkdir -p sets u+wx bits regardless of umask, which
+            # is incompatible with FreeBSD 'install' when (umask & 300) != 0.
+            ;;
+          *)
+            tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$
+            trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0
+
+            if (umask $mkdir_umask &&
+                exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1
+            then
+              if test -z "$dir_arg" || {
+                   # Check for POSIX incompatibilities with -m.
+                   # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or
+                   # other-writable bit of parent directory when it shouldn't.
+                   # FreeBSD 6.1 mkdir -m -p sets mode of existing directory.
+                   ls_ld_tmpdir=`ls -ld "$tmpdir"`
+                   case $ls_ld_tmpdir in
+                     d????-?r-*) different_mode=700;;
+                     d????-?--*) different_mode=755;;
+                     *) false;;
+                   esac &&
+                   $mkdirprog -m$different_mode -p -- "$tmpdir" && {
+                     ls_ld_tmpdir_1=`ls -ld "$tmpdir"`
+                     test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1"
+                   }
+                 }
+              then posix_mkdir=:
+              fi
+              rmdir "$tmpdir/d" "$tmpdir"
+            else
+              # Remove any dirs left behind by ancient mkdir implementations.
+              rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null
+            fi
+            trap '' 0;;
+        esac;;
     esac
 
     if
       $posix_mkdir && (
-       umask $mkdir_umask &&
-       $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir"
+        umask $mkdir_umask &&
+        $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir"
       )
     then :
     else
@@ -391,53 +370,51 @@ do
       # directory the slow way, step by step, checking for races as we go.
 
       case $dstdir in
-       /*) prefix='/';;
-       [-=\(\)!]*) prefix='./';;
-       *)  prefix='';;
+        /*) prefix='/';;
+        [-=\(\)!]*) prefix='./';;
+        *)  prefix='';;
       esac
 
-      eval "$initialize_posix_glob"
-
       oIFS=$IFS
       IFS=/
-      $posix_glob set -f
+      set -f
       set fnord $dstdir
       shift
-      $posix_glob set +f
+      set +f
       IFS=$oIFS
 
       prefixes=
 
       for d
       do
-       test X"$d" = X && continue
-
-       prefix=$prefix$d
-       if test -d "$prefix"; then
-         prefixes=
-       else
-         if $posix_mkdir; then
-           (umask=$mkdir_umask &&
-            $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break
-           # Don't fail if two instances are running concurrently.
-           test -d "$prefix" || exit 1
-         else
-           case $prefix in
-             *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;;
-             *) qprefix=$prefix;;
-           esac
-           prefixes="$prefixes '$qprefix'"
-         fi
-       fi
-       prefix=$prefix/
+        test X"$d" = X && continue
+
+        prefix=$prefix$d
+        if test -d "$prefix"; then
+          prefixes=
+        else
+          if $posix_mkdir; then
+            (umask=$mkdir_umask &&
+             $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break
+            # Don't fail if two instances are running concurrently.
+            test -d "$prefix" || exit 1
+          else
+            case $prefix in
+              *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;;
+              *) qprefix=$prefix;;
+            esac
+            prefixes="$prefixes '$qprefix'"
+          fi
+        fi
+        prefix=$prefix/
       done
 
       if test -n "$prefixes"; then
-       # Don't fail if two instances are running concurrently.
-       (umask $mkdir_umask &&
-        eval "\$doit_exec \$mkdirprog $prefixes") ||
-         test -d "$dstdir" || exit 1
-       obsolete_mkdir_used=true
+        # Don't fail if two instances are running concurrently.
+        (umask $mkdir_umask &&
+         eval "\$doit_exec \$mkdirprog $prefixes") ||
+          test -d "$dstdir" || exit 1
+        obsolete_mkdir_used=true
       fi
     fi
   fi
@@ -472,15 +449,12 @@ do
 
     # If -C, don't bother to copy if it wouldn't change the file.
     if $copy_on_change &&
-       old=`LC_ALL=C ls -dlL "$dst"    2>/dev/null` &&
-       new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` &&
-
-       eval "$initialize_posix_glob" &&
-       $posix_glob set -f &&
+       old=`LC_ALL=C ls -dlL "$dst"     2>/dev/null` &&
+       new=`LC_ALL=C ls -dlL "$dsttmp"  2>/dev/null` &&
+       set -f &&
        set X $old && old=:$2:$4:$5:$6 &&
        set X $new && new=:$2:$4:$5:$6 &&
-       $posix_glob set +f &&
-
+       set +f &&
        test "$old" = "$new" &&
        $cmpprog "$dst" "$dsttmp" >/dev/null 2>&1
     then
@@ -493,24 +467,24 @@ do
       # to itself, or perhaps because mv is so ancient that it does not
       # support -f.
       {
-       # Now remove or move aside any old file at destination location.
-       # We try this two ways since rm can't unlink itself on some
-       # systems and the destination file might be busy for other
-       # reasons.  In this case, the final cleanup might fail but the new
-       # file should still install successfully.
-       {
-         test ! -f "$dst" ||
-         $doit $rmcmd -f "$dst" 2>/dev/null ||
-         { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null &&
-           { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; }
-         } ||
-         { echo "$0: cannot unlink or rename $dst" >&2
-           (exit 1); exit 1
-         }
-       } &&
-
-       # Now rename the file to the real destination.
-       $doit $mvcmd "$dsttmp" "$dst"
+        # Now remove or move aside any old file at destination location.
+        # We try this two ways since rm can't unlink itself on some
+        # systems and the destination file might be busy for other
+        # reasons.  In this case, the final cleanup might fail but the new
+        # file should still install successfully.
+        {
+          test ! -f "$dst" ||
+          $doit $rmcmd -f "$dst" 2>/dev/null ||
+          { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null &&
+            { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; }
+          } ||
+          { echo "$0: cannot unlink or rename $dst" >&2
+            (exit 1); exit 1
+          }
+        } &&
+
+        # Now rename the file to the real destination.
+        $doit $mvcmd "$dsttmp" "$dst"
       }
     fi || exit 1
 
@@ -522,6 +496,6 @@ done
 # eval: (add-hook 'write-file-hooks 'time-stamp)
 # time-stamp-start: "scriptversion="
 # time-stamp-format: "%:y-%02m-%02d.%02H"
-# time-stamp-time-zone: "UTC"
+# time-stamp-time-zone: "UTC0"
 # time-stamp-end: "; # UTC"
 # End:
index 4614441..f80075c 100755 (executable)
@@ -1,9 +1,9 @@
 #!/bin/sh
 # Get modification time of a file or directory and pretty-print it.
 
-scriptversion=2010-08-21.06; # UTC
+scriptversion=2016-01-11.22; # UTC
 
-# Copyright (C) 1995-2012 Free Software Foundation, Inc.
+# Copyright (C) 1995-2017 Free Software Foundation, Inc.
 # written by Ulrich Drepper <drepper@gnu.ai.mit.edu>, June 1995
 #
 # This program is free software; you can redistribute it and/or modify
@@ -219,6 +219,6 @@ echo $day $month $year
 # eval: (add-hook 'write-file-hooks 'time-stamp)
 # time-stamp-start: "scriptversion="
 # time-stamp-format: "%:y-%02m-%02d.%02H"
-# time-stamp-time-zone: "UTC"
+# time-stamp-time-zone: "UTC0"
 # time-stamp-end: "; # UTC"
 # End:
index 9a55648..c6e3795 100755 (executable)
@@ -1,10 +1,10 @@
 #! /bin/sh
-# Common stub for a few missing GNU programs while installing.
+# Common wrapper for a few potentially missing GNU programs.
 
-scriptversion=2012-01-06.18; # UTC
+scriptversion=2016-01-11.22; # UTC
 
-# Copyright (C) 1996-2012 Free Software Foundation, Inc.
-# Originally by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996.
+# Copyright (C) 1996-2017 Free Software Foundation, Inc.
+# Originally written by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996.
 
 # 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
@@ -29,61 +29,33 @@ if test $# -eq 0; then
   exit 1
 fi
 
-run=:
-sed_output='s/.* --output[ =]\([^ ]*\).*/\1/p'
-sed_minuso='s/.* -o \([^ ]*\).*/\1/p'
-
-# In the cases where this matters, 'missing' is being run in the
-# srcdir already.
-if test -f configure.ac; then
-  configure_ac=configure.ac
-else
-  configure_ac=configure.in
-fi
+case $1 in
 
-msg="missing on your system"
+  --is-lightweight)
+    # Used by our autoconf macros to check whether the available missing
+    # script is modern enough.
+    exit 0
+    ;;
 
-case $1 in
---run)
-  # Try to run requested program, and just exit if it succeeds.
-  run=
-  shift
-  "$@" && exit 0
-  # Exit code 63 means version mismatch.  This often happens
-  # when the user try to use an ancient version of a tool on
-  # a file that requires a minimum version.  In this case we
-  # we should proceed has if the program had been absent, or
-  # if --run hadn't been passed.
-  if test $? = 63; then
-    run=:
-    msg="probably too old"
-  fi
-  ;;
+  --run)
+    # Back-compat with the calling convention used by older automake.
+    shift
+    ;;
 
   -h|--h|--he|--hel|--help)
     echo "\
 $0 [OPTION]... PROGRAM [ARGUMENT]...
 
-Handle 'PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an
-error status if there is no known handling for PROGRAM.
+Run 'PROGRAM [ARGUMENT]...', returning a proper advice when this fails due
+to PROGRAM being missing or too old.
 
 Options:
   -h, --help      display this help and exit
   -v, --version   output version information and exit
-  --run           try to run the given command, and emulate it if it fails
 
 Supported PROGRAM values:
-  aclocal      touch file 'aclocal.m4'
-  autoconf     touch file 'configure'
-  autoheader   touch file 'config.h.in'
-  autom4te     touch the output file, or create a stub one
-  automake     touch all 'Makefile.in' files
-  bison        create 'y.tab.[ch]', if possible, from existing .[ch]
-  flex         create 'lex.yy.c', if possible, from existing .c
-  help2man     touch the output file
-  lex          create 'lex.yy.c', if possible, from existing .c
-  makeinfo     touch the output file
-  yacc         create 'y.tab.[ch]', if possible, from existing .[ch]
+  aclocal   autoconf  autoheader   autom4te  automake  makeinfo
+  bison     yacc      flex         lex       help2man
 
 Version suffixes to PROGRAM as well as the prefixes 'gnu-', 'gnu', and
 'g' are ignored when checking the name.
@@ -98,233 +70,146 @@ Send bug reports to <bug-automake@gnu.org>."
     ;;
 
   -*)
-    echo 1>&2 "$0: Unknown '$1' option"
+    echo 1>&2 "$0: unknown '$1' option"
     echo 1>&2 "Try '$0 --help' for more information"
     exit 1
     ;;
 
 esac
 
-# normalize program name to check for.
-program=`echo "$1" | sed '
-  s/^gnu-//; t
-  s/^gnu//; t
-  s/^g//; t'`
-
-# Now exit if we have it, but it failed.  Also exit now if we
-# don't have it and --version was passed (most likely to detect
-# the program).  This is about non-GNU programs, so use $1 not
-# $program.
-case $1 in
-  lex*|yacc*)
-    # Not GNU programs, they don't have --version.
-    ;;
-
-  *)
-    if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
-       # We have it, but it failed.
-       exit 1
-    elif test "x$2" = "x--version" || test "x$2" = "x--help"; then
-       # Could not run --version or --help.  This is probably someone
-       # running '$TOOL --version' or '$TOOL --help' to check whether
-       # $TOOL exists and not knowing $TOOL uses missing.
-       exit 1
-    fi
-    ;;
-esac
-
-# If it does not exist, or fails to run (possibly an outdated version),
-# try to emulate it.
-case $program in
-  aclocal*)
-    echo 1>&2 "\
-WARNING: '$1' is $msg.  You should only need it if
-         you modified 'acinclude.m4' or '${configure_ac}'.  You might want
-         to install the Automake and Perl packages.  Grab them from
-         any GNU archive site."
-    touch aclocal.m4
-    ;;
-
-  autoconf*)
-    echo 1>&2 "\
-WARNING: '$1' is $msg.  You should only need it if
-         you modified '${configure_ac}'.  You might want to install the
-         Autoconf and GNU m4 packages.  Grab them from any GNU
-         archive site."
-    touch configure
-    ;;
-
-  autoheader*)
-    echo 1>&2 "\
-WARNING: '$1' is $msg.  You should only need it if
-         you modified 'acconfig.h' or '${configure_ac}'.  You might want
-         to install the Autoconf and GNU m4 packages.  Grab them
-         from any GNU archive site."
-    files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}`
-    test -z "$files" && files="config.h"
-    touch_files=
-    for f in $files; do
-      case $f in
-      *:*) touch_files="$touch_files "`echo "$f" |
-                                      sed -e 's/^[^:]*://' -e 's/:.*//'`;;
-      *) touch_files="$touch_files $f.in";;
-      esac
-    done
-    touch $touch_files
-    ;;
-
-  automake*)
-    echo 1>&2 "\
-WARNING: '$1' is $msg.  You should only need it if
-         you modified 'Makefile.am', 'acinclude.m4' or '${configure_ac}'.
-         You might want to install the Automake and Perl packages.
-         Grab them from any GNU archive site."
-    find . -type f -name Makefile.am -print |
-          sed 's/\.am$/.in/' |
-          while read f; do touch "$f"; done
-    ;;
-
-  autom4te*)
-    echo 1>&2 "\
-WARNING: '$1' is needed, but is $msg.
-         You might have modified some files without having the
-         proper tools for further handling them.
-         You can get '$1' as part of Autoconf from any GNU
-         archive site."
-
-    file=`echo "$*" | sed -n "$sed_output"`
-    test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
-    if test -f "$file"; then
-       touch $file
-    else
-       test -z "$file" || exec >$file
-       echo "#! /bin/sh"
-       echo "# Created by GNU Automake missing as a replacement of"
-       echo "#  $ $@"
-       echo "exit 0"
-       chmod +x $file
-       exit 1
-    fi
-    ;;
-
-  bison*|yacc*)
-    echo 1>&2 "\
-WARNING: '$1' $msg.  You should only need it if
-         you modified a '.y' file.  You may need the Bison package
-         in order for those modifications to take effect.  You can get
-         Bison from any GNU archive site."
-    rm -f y.tab.c y.tab.h
-    if test $# -ne 1; then
-        eval LASTARG=\${$#}
-       case $LASTARG in
-       *.y)
-           SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'`
-           if test -f "$SRCFILE"; then
-                cp "$SRCFILE" y.tab.c
-           fi
-           SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'`
-           if test -f "$SRCFILE"; then
-                cp "$SRCFILE" y.tab.h
-           fi
-         ;;
-       esac
-    fi
-    if test ! -f y.tab.h; then
-       echo >y.tab.h
-    fi
-    if test ! -f y.tab.c; then
-       echo 'main() { return 0; }' >y.tab.c
-    fi
-    ;;
-
-  lex*|flex*)
-    echo 1>&2 "\
-WARNING: '$1' is $msg.  You should only need it if
-         you modified a '.l' file.  You may need the Flex package
-         in order for those modifications to take effect.  You can get
-         Flex from any GNU archive site."
-    rm -f lex.yy.c
-    if test $# -ne 1; then
-        eval LASTARG=\${$#}
-       case $LASTARG in
-       *.l)
-           SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'`
-           if test -f "$SRCFILE"; then
-                cp "$SRCFILE" lex.yy.c
-           fi
-         ;;
-       esac
-    fi
-    if test ! -f lex.yy.c; then
-       echo 'main() { return 0; }' >lex.yy.c
-    fi
-    ;;
-
-  help2man*)
-    echo 1>&2 "\
-WARNING: '$1' is $msg.  You should only need it if
-        you modified a dependency of a manual page.  You may need the
-        Help2man package in order for those modifications to take
-        effect.  You can get Help2man from any GNU archive site."
-
-    file=`echo "$*" | sed -n "$sed_output"`
-    test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
-    if test -f "$file"; then
-       touch $file
-    else
-       test -z "$file" || exec >$file
-       echo ".ab help2man is required to generate this page"
-       exit $?
-    fi
-    ;;
-
-  makeinfo*)
-    echo 1>&2 "\
-WARNING: '$1' is $msg.  You should only need it if
-         you modified a '.texi' or '.texinfo' file, or any other file
-         indirectly affecting the aspect of the manual.  The spurious
-         call might also be the consequence of using a buggy 'make' (AIX,
-         DU, IRIX).  You might want to install the Texinfo package or
-         the GNU make package.  Grab either from any GNU archive site."
-    # The file to touch is that specified with -o ...
-    file=`echo "$*" | sed -n "$sed_output"`
-    test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
-    if test -z "$file"; then
-      # ... or it is the one specified with @setfilename ...
-      infile=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'`
-      file=`sed -n '
-       /^@setfilename/{
-         s/.* \([^ ]*\) *$/\1/
-         p
-         q
-       }' $infile`
-      # ... or it is derived from the source name (dir/f.texi becomes f.info)
-      test -z "$file" && file=`echo "$infile" | sed 's,.*/,,;s,.[^.]*$,,'`.info
-    fi
-    # If the file does not exist, the user really needs makeinfo;
-    # let's fail without touching anything.
-    test -f $file || exit 1
-    touch $file
-    ;;
+# Run the given program, remember its exit status.
+"$@"; st=$?
+
+# If it succeeded, we are done.
+test $st -eq 0 && exit 0
+
+# Also exit now if we it failed (or wasn't found), and '--version' was
+# passed; such an option is passed most likely to detect whether the
+# program is present and works.
+case $2 in --version|--help) exit $st;; esac
+
+# Exit code 63 means version mismatch.  This often happens when the user
+# tries to use an ancient version of a tool on a file that requires a
+# minimum version.
+if test $st -eq 63; then
+  msg="probably too old"
+elif test $st -eq 127; then
+  # Program was missing.
+  msg="missing on your system"
+else
+  # Program was found and executed, but failed.  Give up.
+  exit $st
+fi
 
-  *)
-    echo 1>&2 "\
-WARNING: '$1' is needed, and is $msg.
-         You might have modified some files without having the
-         proper tools for further handling them.  Check the 'README' file,
-         it often tells you about the needed prerequisites for installing
-         this package.  You may also peek at any GNU archive site, in case
-         some other package would contain this missing '$1' program."
-    exit 1
+perl_URL=http://www.perl.org/
+flex_URL=http://flex.sourceforge.net/
+gnu_software_URL=http://www.gnu.org/software
+
+program_details ()
+{
+  case $1 in
+    aclocal|automake)
+      echo "The '$1' program is part of the GNU Automake package:"
+      echo "<$gnu_software_URL/automake>"
+      echo "It also requires GNU Autoconf, GNU m4 and Perl in order to run:"
+      echo "<$gnu_software_URL/autoconf>"
+      echo "<$gnu_software_URL/m4/>"
+      echo "<$perl_URL>"
+      ;;
+    autoconf|autom4te|autoheader)
+      echo "The '$1' program is part of the GNU Autoconf package:"
+      echo "<$gnu_software_URL/autoconf/>"
+      echo "It also requires GNU m4 and Perl in order to run:"
+      echo "<$gnu_software_URL/m4/>"
+      echo "<$perl_URL>"
+      ;;
+  esac
+}
+
+give_advice ()
+{
+  # Normalize program name to check for.
+  normalized_program=`echo "$1" | sed '
+    s/^gnu-//; t
+    s/^gnu//; t
+    s/^g//; t'`
+
+  printf '%s\n' "'$1' is $msg."
+
+  configure_deps="'configure.ac' or m4 files included by 'configure.ac'"
+  case $normalized_program in
+    autoconf*)
+      echo "You should only need it if you modified 'configure.ac',"
+      echo "or m4 files included by it."
+      program_details 'autoconf'
+      ;;
+    autoheader*)
+      echo "You should only need it if you modified 'acconfig.h' or"
+      echo "$configure_deps."
+      program_details 'autoheader'
+      ;;
+    automake*)
+      echo "You should only need it if you modified 'Makefile.am' or"
+      echo "$configure_deps."
+      program_details 'automake'
+      ;;
+    aclocal*)
+      echo "You should only need it if you modified 'acinclude.m4' or"
+      echo "$configure_deps."
+      program_details 'aclocal'
+      ;;
+   autom4te*)
+      echo "You might have modified some maintainer files that require"
+      echo "the 'autom4te' program to be rebuilt."
+      program_details 'autom4te'
+      ;;
+    bison*|yacc*)
+      echo "You should only need it if you modified a '.y' file."
+      echo "You may want to install the GNU Bison package:"
+      echo "<$gnu_software_URL/bison/>"
+      ;;
+    lex*|flex*)
+      echo "You should only need it if you modified a '.l' file."
+      echo "You may want to install the Fast Lexical Analyzer package:"
+      echo "<$flex_URL>"
+      ;;
+    help2man*)
+      echo "You should only need it if you modified a dependency" \
+           "of a man page."
+      echo "You may want to install the GNU Help2man package:"
+      echo "<$gnu_software_URL/help2man/>"
     ;;
-esac
-
-exit 0
+    makeinfo*)
+      echo "You should only need it if you modified a '.texi' file, or"
+      echo "any other file indirectly affecting the aspect of the manual."
+      echo "You might want to install the Texinfo package:"
+      echo "<$gnu_software_URL/texinfo/>"
+      echo "The spurious makeinfo call might also be the consequence of"
+      echo "using a buggy 'make' (AIX, DU, IRIX), in which case you might"
+      echo "want to install GNU make:"
+      echo "<$gnu_software_URL/make/>"
+      ;;
+    *)
+      echo "You might have modified some files without having the proper"
+      echo "tools for further handling them.  Check the 'README' file, it"
+      echo "often tells you about the needed prerequisites for installing"
+      echo "this package.  You may also peek at any GNU archive site, in"
+      echo "case some other package contains this missing '$1' program."
+      ;;
+  esac
+}
+
+give_advice "$1" | sed -e '1s/^/WARNING: /' \
+                       -e '2,$s/^/         /' >&2
+
+# Propagate the correct exit status (expected to be 127 for a program
+# not found, 63 for a program that failed due to version mismatch).
+exit $st
 
 # Local variables:
 # eval: (add-hook 'write-file-hooks 'time-stamp)
 # time-stamp-start: "scriptversion="
 # time-stamp-format: "%:y-%02m-%02d.%02H"
-# time-stamp-time-zone: "UTC"
+# time-stamp-time-zone: "UTC0"
 # time-stamp-end: "; # UTC"
 # End:
index 55d537f..a31ce6d 100755 (executable)
@@ -1,7 +1,7 @@
 #! /bin/sh
 # mkinstalldirs --- make directory hierarchy
 
-scriptversion=2009-04-28.21; # UTC
+scriptversion=2016-01-11.22; # UTC
 
 # Original author: Noah Friedman <friedman@prep.ai.mit.edu>
 # Created: 1993-05-16
@@ -157,6 +157,6 @@ exit $errstatus
 # eval: (add-hook 'write-file-hooks 'time-stamp)
 # time-stamp-start: "scriptversion="
 # time-stamp-format: "%:y-%02m-%02d.%02H"
-# time-stamp-time-zone: "UTC"
+# time-stamp-time-zone: "UTC0"
 # time-stamp-end: "; # UTC"
 # End:
index 699e28f..3693d96 100755 (executable)
@@ -1,9 +1,9 @@
 #!/bin/sh
 # py-compile - Compile a Python program
 
-scriptversion=2011-06-08.12; # UTC
+scriptversion=2016-01-11.22; # UTC
 
-# Copyright (C) 2000-2012 Free Software Foundation, Inc.
+# Copyright (C) 2000-2017 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
@@ -36,7 +36,7 @@ me=py-compile
 usage_error ()
 {
   echo "$me: $*" >&2
-  echo "Try \`$me --help' for more information." >&2
+  echo "Try '$me --help' for more information." >&2
   exit 1
 }
 
@@ -116,7 +116,7 @@ else
 fi
 
 $PYTHON -c "
-import sys, os, py_compile
+import sys, os, py_compile, imp
 
 files = '''$files'''
 
@@ -129,12 +129,19 @@ for file in files.split():
            continue
     sys.stdout.write(file)
     sys.stdout.flush()
-    py_compile.compile(filepath, filepath + 'c', path)
+    if hasattr(imp, 'get_tag'):
+        py_compile.compile(filepath, imp.cache_from_source(filepath), path)
+    else:
+        py_compile.compile(filepath, filepath + 'c', path)
 sys.stdout.write('\n')" || exit $?
 
 # this will fail for python < 1.5, but that doesn't matter ...
 $PYTHON -O -c "
-import sys, os, py_compile
+import sys, os, py_compile, imp
+
+# pypy does not use .pyo optimization
+if hasattr(sys, 'pypy_translation_info'):
+    sys.exit(0)
 
 files = '''$files'''
 sys.stdout.write('Byte-compiling python modules (optimized versions) ...\n')
@@ -146,7 +153,10 @@ for file in files.split():
            continue
     sys.stdout.write(file)
     sys.stdout.flush()
-    py_compile.compile(filepath, filepath + 'o', path)
+    if hasattr(imp, 'get_tag'):
+        py_compile.compile(filepath, imp.cache_from_source(filepath, False), path)
+    else:
+        py_compile.compile(filepath, filepath + 'o', path)
 sys.stdout.write('\n')" 2>/dev/null || :
 
 # Local Variables:
@@ -155,6 +165,6 @@ sys.stdout.write('\n')" 2>/dev/null || :
 # eval: (add-hook 'write-file-hooks 'time-stamp)
 # time-stamp-start: "scriptversion="
 # time-stamp-format: "%:y-%02m-%02d.%02H"
-# time-stamp-time-zone: "UTC"
+# time-stamp-time-zone: "UTC0"
 # time-stamp-end: "; # UTC"
 # End:
index 259ca0d..82efa96 100755 (executable)
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2011-2012 Free Software Foundation, Inc.
+# Copyright (C) 2011-2017 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
@@ -23,7 +23,7 @@
 # bugs to <bug-automake@gnu.org> or send patches to
 # <automake-patches@gnu.org>.
 
-scriptversion=2011-12-27.17; # UTC
+scriptversion=2013-12-23.17; # UTC
 
 # Make unconditional expansion of undefined variables an error.  This
 # helps a lot in preventing typo-related bugs.
@@ -53,7 +53,7 @@ Usage:
                 [--enable-hard-errors={yes|no}] [--ignore-exit]
                 [--diagnostic-string=STRING] [--merge|--no-merge]
                 [--comments|--no-comments] [--] TEST-COMMAND
-The \`--test-name', \`--log-file' and \`--trs-file' options are mandatory.
+The '--test-name', '-log-file' and '--trs-file' options are mandatory.
 END
 }
 
@@ -153,8 +153,8 @@ fi
         -v comments="$comments" \
         -v diag_string="$diag_string" \
 '
-# FIXME: the usages of "cat >&3" below could be optimized when using
-# FIXME: GNU awk, and/on on systems that supports /dev/fd/.
+# TODO: the usages of "cat >&3" below could be optimized when using
+#       GNU awk, and/on on systems that supports /dev/fd/.
 
 # Implementation note: in what follows, `result_obj` will be an
 # associative array that (partly) simulates a TAP result object
@@ -209,7 +209,6 @@ function copy_in_global_log()
   return 0
 }
 
-# FIXME: this can certainly be improved ...
 function get_global_test_result()
 {
     if ("ERROR" in test_results_seen)
@@ -647,6 +646,6 @@ test $? -eq 0 || fatal "I/O or internal error"
 # eval: (add-hook 'write-file-hooks 'time-stamp)
 # time-stamp-start: "scriptversion="
 # time-stamp-format: "%:y-%02m-%02d.%02H"
-# time-stamp-time-zone: "UTC"
+# time-stamp-time-zone: "UTC0"
 # time-stamp-end: "; # UTC"
 # End:
index 2398a06..0218a01 100755 (executable)
@@ -1,9 +1,9 @@
 #! /bin/sh
-# test-driver - basic driver script for the `parallel-tests' mode.
+# test-driver - basic testsuite driver script.
 
-scriptversion=2011-08-17.14; # UTC
+scriptversion=2016-01-11.22; # UTC
 
-# Copyright (C) 2011-2012 Free Software Foundation, Inc.
+# Copyright (C) 2011-2017 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
@@ -44,13 +44,12 @@ print_usage ()
 Usage:
   test-driver --test-name=NAME --log-file=PATH --trs-file=PATH
               [--expect-failure={yes|no}] [--color-tests={yes|no}]
-              [--enable-hard-errors={yes|no}] [--] TEST-SCRIPT
-The \`--test-name', \`--log-file' and \`--trs-file' options are mandatory.
+              [--enable-hard-errors={yes|no}] [--]
+              TEST-SCRIPT [TEST-SCRIPT-ARGUMENTS]
+The '--test-name', '--log-file' and '--trs-file' options are mandatory.
 END
 }
 
-# TODO: better error handling in option parsing (in particular, ensure
-# TODO: $log_file, $trs_file and $test_name are defined).
 test_name= # Used for reporting.
 log_file=  # Where to save the output of the test script.
 trs_file=  # Where to save the metadata of the test run.
@@ -69,12 +68,25 @@ while test $# -gt 0; do
   --enable-hard-errors) enable_hard_errors=$2; shift;;
   --) shift; break;;
   -*) usage_error "invalid option: '$1'";;
+   *) break;;
   esac
   shift
 done
 
+missing_opts=
+test x"$test_name" = x && missing_opts="$missing_opts --test-name"
+test x"$log_file"  = x && missing_opts="$missing_opts --log-file"
+test x"$trs_file"  = x && missing_opts="$missing_opts --trs-file"
+if test x"$missing_opts" != x; then
+  usage_error "the following mandatory options are missing:$missing_opts"
+fi
+
+if test $# -eq 0; then
+  usage_error "missing argument"
+fi
+
 if test $color_tests = yes; then
-  # Keep this in sync with `lib/am/check.am:$(am__tty_colors)'.
+  # Keep this in sync with 'lib/am/check.am:$(am__tty_colors)'.
   red='\e[0;31m' # Red.
   grn='\e[0;32m' # Green.
   lgn='\e[1;32m' # Light green.
@@ -94,11 +106,14 @@ trap "st=143; $do_exit" 15
 # Test script is run here.
 "$@" >$log_file 2>&1
 estatus=$?
+
 if test $enable_hard_errors = no && test $estatus -eq 99; then
-  estatus=1
+  tweaked_estatus=1
+else
+  tweaked_estatus=$estatus
 fi
 
-case $estatus:$expect_failure in
+case $tweaked_estatus:$expect_failure in
   0:yes) col=$red res=XPASS recheck=yes gcopy=yes;;
   0:*)   col=$grn res=PASS  recheck=no  gcopy=no;;
   77:*)  col=$blu res=SKIP  recheck=no  gcopy=yes;;
@@ -107,6 +122,12 @@ case $estatus:$expect_failure in
   *:*)   col=$red res=FAIL  recheck=yes gcopy=yes;;
 esac
 
+# Report the test outcome and exit status in the logs, so that one can
+# know whether the test passed or failed simply by looking at the '.log'
+# file, without the need of also peaking into the corresponding '.trs'
+# file (automake bug#11814).
+echo "$res $test_name (exit status: $estatus)" >>$log_file
+
 # Report outcome to console.
 echo "${col}${res}${std}: $test_name"
 
@@ -122,6 +143,6 @@ echo ":copy-in-global-log: $gcopy" >> $trs_file
 # eval: (add-hook 'write-file-hooks 'time-stamp)
 # time-stamp-start: "scriptversion="
 # time-stamp-format: "%:y-%02m-%02d.%02H"
-# time-stamp-time-zone: "UTC"
+# time-stamp-time-zone: "UTC0"
 # time-stamp-end: "; # UTC"
 # End:
index e4dca02..b40a6e2 100644 (file)
@@ -3,11 +3,12 @@
 % Load plain if necessary, i.e., if running under initex.
 \expandafter\ifx\csname fmtname\endcsname\relax\input plain\fi
 %
-\def\texinfoversion{2012-04-06.11}
+\def\texinfoversion{2017-06-04.19}
 %
 % Copyright 1985, 1986, 1988, 1990, 1991, 1992, 1993, 1994, 1995,
 % 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
-% 2007, 2008, 2009, 2010, 2011, 2012 Free Software Foundation, Inc.
+% 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017
+% Free Software Foundation, Inc.
 %
 % This texinfo.tex file is free software: you can redistribute it and/or
 % modify it under the terms of the GNU General Public License as
 %
 % As a special exception, when this file is read by TeX when processing
 % a Texinfo source document, you may use the result without
-% restriction.  (This has been our intent since Texinfo was invented.)
+% restriction. This Exception is an additional permission under section 7
+% of the GNU General Public License, version 3 ("GPLv3").
 %
 % Please try the latest version of texinfo.tex before submitting bug
 % reports; you can get the latest version from:
-%   http://www.gnu.org/software/texinfo/ (the Texinfo home page), or
-%   ftp://tug.org/tex/texinfo.tex
-%     (and all CTAN mirrors, see http://www.ctan.org).
+%   http://ftp.gnu.org/gnu/texinfo/ (the Texinfo release area), or
+%   http://ftpmirror.gnu.org/texinfo/ (same, via a mirror), or
+%   http://www.gnu.org/software/texinfo/ (the Texinfo home page)
 % The texinfo.tex in any given distribution could well be out
 % of date, so if that's what you're using, please check.
 %
 \everyjob{\message{[Texinfo version \texinfoversion]}%
   \catcode`+=\active \catcode`\_=\active}
 
+% LaTeX's \typeout.  This ensures that the messages it is used for
+% are identical in format to the corresponding ones from latex/pdflatex.
+\def\typeout{\immediate\write17}%
+
 \chardef\other=12
 
 % We never want plain's \outer definition of \+ in Texinfo.
 \let\ptexraggedright=\raggedright
 \let\ptexrbrace=\}
 \let\ptexslash=\/
+\let\ptexsp=\sp
 \let\ptexstar=\*
+\let\ptexsup=\sup
 \let\ptext=\t
 \let\ptextop=\top
 {\catcode`\'=\active \global\let\ptexquoteright'}% active in plain's math mode
 \ifx\putwordDefopt\undefined    \gdef\putwordDefopt{User Option}\fi
 \ifx\putwordDeffunc\undefined   \gdef\putwordDeffunc{Function}\fi
 
-% Since the category of space is not known, we have to be careful.
-\chardef\spacecat = 10
-\def\spaceisspace{\catcode`\ =\spacecat}
+% Give the space character the catcode for a space.
+\def\spaceisspace{\catcode`\ =10\relax}
+
+% Likewise for ^^M, the end of line character.
+\def\endlineisspace{\catcode13=10\relax}
 
-% sometimes characters are active, so we need control sequences.
-\chardef\ampChar   = `\&
-\chardef\colonChar = `\:
-\chardef\commaChar = `\,
 \chardef\dashChar  = `\-
-\chardef\dotChar   = `\.
-\chardef\exclamChar= `\!
-\chardef\hashChar  = `\#
-\chardef\lquoteChar= `\`
-\chardef\questChar = `\?
-\chardef\rquoteChar= `\'
-\chardef\semiChar  = `\;
 \chardef\slashChar = `\/
 \chardef\underChar = `\_
 
   wide-spread wrap-around
 }
 
-% Margin to add to right of even pages, to left of odd pages.
-\newdimen\bindingoffset
-\newdimen\normaloffset
-\newdimen\pagewidth \newdimen\pageheight
-
-% For a final copy, take out the rectangles
-% that mark overfull boxes (in case you have decided
-% that the text looks ok even though it passes the margin).
-%
-\def\finalout{\overfullrule=0pt }
-
 % Sometimes it is convenient to have everything in the transcript file
 % and nothing on the terminal.  We don't just call \tracingall here,
 % since that produces some useless output on the terminal.  We also make
 \def\bigbreak{\ifnum\lastpenalty<10000\par\ifdim\lastskip<\bigskipamount
   \removelastskip\penalty-200\bigskip\fi\fi}
 
+%\f Output routine
+%
+
+% For a final copy, take out the rectangles
+% that mark overfull boxes (in case you have decided
+% that the text looks ok even though it passes the margin).
+%
+\def\finalout{\overfullrule=0pt }
+
 % Do @cropmarks to get crop marks.
 %
 \newif\ifcropmarks
 %
 % Another complication is to let the user choose whether \thischapter
 % (\thissection) refers to the chapter (section) in effect at the top
-% of a page, or that at the bottom of a page.  The solution is
-% described on page 260 of The TeXbook.  It involves outputting two
-% marks for the sectioning macros, one before the section break, and
-% one after.  I won't pretend I can describe this better than DEK...
+% of a page, or that at the bottom of a page.
+
+% \domark is called twice inside \chapmacro, to add one
+% mark before the section break, and one after.
+%   In the second call \prevchapterdefs is the same as \lastchapterdefs,
+% and \prevsectiondefs is the same as \lastsectiondefs.
+%   Then if the page is not broken at the mark, some of the previous
+% section appears on the page, and we can get the name of this section
+% from \firstmark for @everyheadingmarks top.
+%   @everyheadingmarks bottom uses \botmark.
+%
+% See page 260 of The TeXbook.
 \def\domark{%
   \toks0=\expandafter{\lastchapterdefs}%
   \toks2=\expandafter{\lastsectiondefs}%
   \toks6=\expandafter{\prevsectiondefs}%
   \toks8=\expandafter{\lastcolordefs}%
   \mark{%
-                   \the\toks0 \the\toks2
-      \noexpand\or \the\toks4 \the\toks6
-    \noexpand\else \the\toks8
+                   \the\toks0 \the\toks2  % 0: marks for @everyheadingmarks top
+      \noexpand\or \the\toks4 \the\toks6  % 1: for @everyheadingmarks bottom
+    \noexpand\else \the\toks8             % 2: color marks
   }%
 }
+
+% \gettopheadingmarks, \getbottomheadingmarks,
+% \getcolormarks - extract needed part of mark.
+%
 % \topmark doesn't work for the very first chapter (after the title
 % page or the contents), so we use \firstmark there -- this gets us
 % the mark with the chapter defs, unless the user sneaks in, e.g.,
 % Avoid "undefined control sequence" errors.
 \def\lastchapterdefs{}
 \def\lastsectiondefs{}
+\def\lastsection{}
 \def\prevchapterdefs{}
 \def\prevsectiondefs{}
 \def\lastcolordefs{}
 
+% Margin to add to right of even pages, to left of odd pages.
+\newdimen\bindingoffset
+\newdimen\normaloffset
+\newdimen\txipagewidth \newdimen\txipageheight
+
 % Main output routine.
+%
 \chardef\PAGE = 255
 \output = {\onepageout{\pagecontents\PAGE}}
 
 \newbox\headlinebox
 \newbox\footlinebox
 
-% \onepageout takes a vbox as an argument.  Note that \pagecontents
-% does insertions, but you have to call it yourself.
+% \onepageout takes a vbox as an argument.
+% \shipout a vbox for a single page, adding an optional header, footer,
+% cropmarks, and footnote.  This also causes index entries for this page
+% to be written to the auxiliary files.
+%
 \def\onepageout#1{%
   \ifcropmarks \hoffset=0pt \else \hoffset=\normaloffset \fi
   %
   \ifodd\pageno  \advance\hoffset by \bindingoffset
   \else \advance\hoffset by -\bindingoffset\fi
   %
+  % Common context changes for both heading and footing.
   % Do this outside of the \shipout so @code etc. will be expanded in
   % the headline as they should be, not taken literally (outputting ''code).
+  \def\commmonheadfootline{\let\hsize=\txipagewidth \texinfochars}
+  %
+  % Retrieve the information for the headings from the marks in the page,
+  % and call Plain TeX's \makeheadline and \makefootline, which use the
+  % values in \headline and \footline.
+  %
+  % This is used to check if we are on the first page of a chapter.
+  \ifcase1\topmark\fi
+  \let\prevchaptername\thischaptername
+  \ifcase0\firstmark\fi
+  \let\curchaptername\thischaptername
+  %
   \ifodd\pageno \getoddheadingmarks \else \getevenheadingmarks \fi
-  \setbox\headlinebox = \vbox{\let\hsize=\pagewidth \makeheadline}%
   \ifodd\pageno \getoddfootingmarks \else \getevenfootingmarks \fi
-  \setbox\footlinebox = \vbox{\let\hsize=\pagewidth \makefootline}%
+  %
+  \ifx\curchaptername\prevchaptername
+    \let\thischapterheading\thischapter
+  \else
+    % \thischapterheading is the same as \thischapter except it is blank
+    % for the first page of a chapter.  This is to prevent the chapter name 
+    % being shown twice.
+    \def\thischapterheading{}%
+  \fi
+  %
+  \global\setbox\headlinebox = \vbox{\commmonheadfootline \makeheadline}%
+  \global\setbox\footlinebox = \vbox{\commmonheadfootline \makefootline}%
   %
   {%
+    % Set context for writing to auxiliary files like index files.
     % Have to do this stuff outside the \shipout because we want it to
     % take effect in \write's, yet the group defined by the \vbox ends
     % before the \shipout runs.
     \normalturnoffactive  % \ in index entries must not stay \, e.g., if
                % the page break happens to be in the middle of an example.
                % We don't want .vr (or whatever) entries like this:
-               % \entry{{\tt \indexbackslash }acronym}{32}{\code {\acronym}}
+               % \entry{{\indexbackslash }acronym}{32}{\code {\acronym}}
                % "\acronym" won't work when it's read back in;
                % it needs to be
-               % {\code {{\tt \backslashcurfont }acronym}
+               % {\code {{\backslashcurfont }acronym}
     \shipout\vbox{%
       % Do this early so pdf references go to the beginning of the page.
       \ifpdfmakepagedest \pdfdest name{\the\pageno} xyz\fi
 
 \newinsert\margin \dimen\margin=\maxdimen
 
-\def\pagebody#1{\vbox to\pageheight{\boxmaxdepth=\maxdepth #1}}
+% Main part of page, including any footnotes
+\def\pagebody#1{\vbox to\txipageheight{\boxmaxdepth=\maxdepth #1}}
 {\catcode`\@ =11
 \gdef\pagecontents#1{\ifvoid\topins\else\unvbox\topins\fi
 % marginal hacks, juha@viisa.uucp (Juha Takala)
 \def\nsbot{\vbox
   {\hrule height\cornerlong depth\cornerthick width\cornerthick}}
 
+
+% Argument parsing
+
 % Parse an argument, then pass it to #1.  The argument is the rest of
 % the input line (except we remove a trailing comment).  #1 should be a
 % macro which expects an ordinary undelimited TeX argument.
+% For example, \def\foo{\parsearg\fooxxx}.
 %
 \def\parsearg{\parseargusing{}}
 \def\parseargusing#1#2{%
   }%
 }
 
-% First remove any @comment, then any @c comment.
+% First remove any @comment, then any @c comment.  Also remove a @texinfoc
+% comment (see \scanmacro for details).  Pass the result on to \argcheckspaces.
 \def\argremovecomment#1\comment#2\ArgTerm{\argremovec #1\c\ArgTerm}
-\def\argremovec#1\c#2\ArgTerm{\argcheckspaces#1\^^M\ArgTerm}
+\def\argremovec#1\c#2\ArgTerm{\argremovetexinfoc #1\texinfoc\ArgTerm}
+\def\argremovetexinfoc#1\texinfoc#2\ArgTerm{\argcheckspaces#1\^^M\ArgTerm}
 
 % Each occurrence of `\^^M' or `<space>\^^M' is replaced by a single space.
 %
 %
 \def\finishparsearg#1 \ArgTerm{\expandafter\argtorun\expandafter{#1}}
 
+
+% \parseargdef - define a command taking an argument on the line
+%
 % \parseargdef\foo{...}
 %      is roughly equivalent to
 % \def\foo{\parsearg\Xfoo}
 % \def\Xfoo#1{...}
-%
-% Actually, I use \csname\string\foo\endcsname, ie. \\foo, as it is my
-% favourite TeX trick.  --kasal, 16nov03
-
 \def\parseargdef#1{%
   \expandafter \doparseargdef \csname\string#1\endcsname #1%
 }
 \def\:{\spacefactor=1000 }
 
 % @* forces a line break.
-\def\*{\hfil\break\hbox{}\ignorespaces}
+\def\*{\unskip\hfil\break\hbox{}\ignorespaces}
 
 % @/ allows a line break.
 \let\/=\allowbreak
     \endgraf % Not \par, as it may have been set to \lisppar.
     \global\dimen1 = \prevdepth
   \egroup           % End the \vtop.
+  \addgroupbox
+  \prevdepth = \dimen1
+  \checkinserts
+}
+
+\def\addgroupbox{
   % \dimen0 is the vertical size of the group's box.
   \dimen0 = \ht\groupbox  \advance\dimen0 by \dp\groupbox
   % \dimen2 is how much space is left on the page (more or less).
-  \dimen2 = \pageheight   \advance\dimen2 by -\pagetotal
+  \dimen2 = \txipageheight   \advance\dimen2 by -\pagetotal
   % if the group doesn't fit on the current page, and it's a big big
   % group, force a page break.
   \ifdim \dimen0 > \dimen2
-    \ifdim \pagetotal < \vfilllimit\pageheight
+    \ifdim \pagetotal < \vfilllimit\txipageheight
       \page
     \fi
   \fi
   \box\groupbox
-  \prevdepth = \dimen1
-  \checkinserts
 }
+
 %
 % TeX puts in an \escapechar (i.e., `@') at the beginning of the help
 % message, so this ends up printing `@group can only ...'.
@@ -811,36 +865,6 @@ where each line of input produces a line of output.}
   \temp
 }
 
-% @| inserts a changebar to the left of the current line.  It should
-% surround any changed text.  This approach does *not* work if the
-% change spans more than two lines of output.  To handle that, we would
-% have adopt a much more difficult approach (putting marks into the main
-% vertical list for the beginning and end of each change).  This command
-% is not documented, not supported, and doesn't work.
-%
-\def\|{%
-  % \vadjust can only be used in horizontal mode.
-  \leavevmode
-  %
-  % Append this vertical mode material after the current line in the output.
-  \vadjust{%
-    % We want to insert a rule with the height and depth of the current
-    % leading; that is exactly what \strutbox is supposed to record.
-    \vskip-\baselineskip
-    %
-    % \vadjust-items are inserted at the left edge of the type.  So
-    % the \llap here moves out into the left-hand margin.
-    \llap{%
-      %
-      % For a thicker or thinner bar, change the `1pt'.
-      \vrule height\baselineskip width1pt
-      %
-      % This is the space between the bar and the text.
-      \hskip 12pt
-    }%
-  }%
-}
-
 % @include FILE -- \input text of FILE.
 %
 \def\include{\parseargusing\filenamecatcodes\includezzz}
@@ -929,13 +953,14 @@ where each line of input produces a line of output.}
 % @comment ...line which is ignored...
 % @c is the same as @comment
 % @ignore ... @end ignore  is another way to write a comment
-%
-\def\comment{\begingroup \catcode`\^^M=\other%
+
+
+\def\c{\begingroup \catcode`\^^M=\active%
 \catcode`\@=\other \catcode`\{=\other \catcode`\}=\other%
-\commentxxx}
-{\catcode`\^^M=\other \gdef\commentxxx#1^^M{\endgroup}}
+\cxxx}
+{\catcode`\^^M=\active \gdef\cxxx#1^^M{\endgroup}}
 %
-\let\c=\comment
+\let\comment\c
 
 % @paragraphindent NCHARS
 % We'll use ems for NCHARS, close enough.
@@ -1006,69 +1031,23 @@ where each line of input produces a line of output.}
 % paragraph.
 %
 \gdef\dosuppressfirstparagraphindent{%
-  \gdef\indent{%
-    \restorefirstparagraphindent
-    \indent
-  }%
-  \gdef\noindent{%
-    \restorefirstparagraphindent
-    \noindent
-  }%
-  \global\everypar = {%
-    \kern -\parindent
-    \restorefirstparagraphindent
-  }%
+  \gdef\indent  {\restorefirstparagraphindent \indent}%
+  \gdef\noindent{\restorefirstparagraphindent \noindent}%
+  \global\everypar = {\kern -\parindent \restorefirstparagraphindent}%
 }
-
+%
 \gdef\restorefirstparagraphindent{%
-  \global \let \indent = \ptexindent
-  \global \let \noindent = \ptexnoindent
-  \global \everypar = {}%
+  \global\let\indent = \ptexindent
+  \global\let\noindent = \ptexnoindent
+  \global\everypar = {}%
 }
 
 
 % @refill is a no-op.
 \let\refill=\relax
 
-% If working on a large document in chapters, it is convenient to
-% be able to disable indexing, cross-referencing, and contents, for test runs.
-% This is done with @novalidate (before @setfilename).
-%
-\newif\iflinks \linkstrue % by default we want the aux files.
-\let\novalidate = \linksfalse
-
-% @setfilename is done at the beginning of every texinfo file.
-% So open here the files we need to have open while reading the input.
-% This makes it possible to make a .fmt file for texinfo.
-\def\setfilename{%
-   \fixbackslash  % Turn off hack to swallow `\input texinfo'.
-   \iflinks
-     \tryauxfile
-     % Open the new aux file.  TeX will close it automatically at exit.
-     \immediate\openout\auxfile=\jobname.aux
-   \fi % \openindices needs to do some work in any case.
-   \openindices
-   \let\setfilename=\comment % Ignore extra @setfilename cmds.
-   %
-   % If texinfo.cnf is present on the system, read it.
-   % Useful for site-wide @afourpaper, etc.
-   \openin 1 texinfo.cnf
-   \ifeof 1 \else \input texinfo.cnf \fi
-   \closein 1
-   %
-   \comment % Ignore the actual filename.
-}
-
-% Called from \setfilename.
-%
-\def\openindices{%
-  \newindex{cp}%
-  \newcodeindex{fn}%
-  \newcodeindex{vr}%
-  \newcodeindex{tp}%
-  \newcodeindex{ky}%
-  \newcodeindex{pg}%
-}
+% @setfilename INFO-FILENAME - ignored
+\let\setfilename=\comment
 
 % @bye.
 \outer\def\bye{\pagealignmacro\tracingstats=1\ptexend}
@@ -1086,10 +1065,91 @@ where each line of input produces a line of output.}
 \newtoks\toksC
 \newtoks\toksD
 \newbox\boxA
+\newbox\boxB
 \newcount\countA
 \newif\ifpdf
 \newif\ifpdfmakepagedest
 
+%
+% For LuaTeX
+%
+
+\newif\iftxiuseunicodedestname
+\txiuseunicodedestnamefalse % For pdfTeX etc.
+
+\ifx\luatexversion\thisisundefined
+\else
+  % Use Unicode destination names
+  \txiuseunicodedestnametrue
+  % Escape PDF strings with converting UTF-16 from UTF-8
+  \begingroup
+    \catcode`\%=12
+    \directlua{
+      function UTF16oct(str)
+        tex.sprint(string.char(0x5c) .. '376' .. string.char(0x5c) .. '377')
+        for c in string.utfvalues(str) do
+          if c < 0x10000 then
+            tex.sprint(
+              string.format(string.char(0x5c) .. string.char(0x25) .. '03o' ..
+                            string.char(0x5c) .. string.char(0x25) .. '03o',
+                            (c / 256), (c % 256)))
+          else
+            c = c - 0x10000
+            local c_hi = c / 1024 + 0xd800
+            local c_lo = c % 1024 + 0xdc00
+            tex.sprint(
+              string.format(string.char(0x5c) .. string.char(0x25) .. '03o' ..
+                            string.char(0x5c) .. string.char(0x25) .. '03o' ..
+                            string.char(0x5c) .. string.char(0x25) .. '03o' ..
+                            string.char(0x5c) .. string.char(0x25) .. '03o',
+                            (c_hi / 256), (c_hi % 256),
+                            (c_lo / 256), (c_lo % 256)))
+          end
+        end
+      end
+    }
+  \endgroup
+  \def\pdfescapestrutfsixteen#1{\directlua{UTF16oct('\luaescapestring{#1}')}}
+  % Escape PDF strings without converting
+  \begingroup
+    \directlua{
+      function PDFescstr(str)
+        for c in string.bytes(str) do
+          if c <= 0x20 or c >= 0x80 or c == 0x28 or c == 0x29 or c == 0x5c then
+            tex.sprint(
+              string.format(string.char(0x5c) .. string.char(0x25) .. '03o',
+                            c))
+          else
+            tex.sprint(string.char(c))
+          end
+        end
+      end
+    }
+  \endgroup
+  \def\pdfescapestring#1{\directlua{PDFescstr('\luaescapestring{#1}')}}
+  \ifnum\luatexversion>84
+    % For LuaTeX >= 0.85
+    \def\pdfdest{\pdfextension dest}
+    \let\pdfoutput\outputmode
+    \def\pdfliteral{\pdfextension literal}
+    \def\pdfcatalog{\pdfextension catalog}
+    \def\pdftexversion{\numexpr\pdffeedback version\relax}
+    \let\pdfximage\saveimageresource
+    \let\pdfrefximage\useimageresource
+    \let\pdflastximage\lastsavedimageresourceindex
+    \def\pdfendlink{\pdfextension endlink\relax}
+    \def\pdfoutline{\pdfextension outline}
+    \def\pdfstartlink{\pdfextension startlink}
+    \def\pdffontattr{\pdfextension fontattr}
+    \def\pdfobj{\pdfextension obj}
+    \def\pdflastobj{\numexpr\pdffeedback lastobj\relax}
+    \let\pdfpagewidth\pagewidth
+    \let\pdfpageheight\pageheight
+    \edef\pdfhorigin{\pdfvariable horigin}
+    \edef\pdfvorigin{\pdfvariable vorigin}
+  \fi
+\fi
+
 % when pdftex is run in dvi mode, \pdfoutput is defined (so \pdfoutput=1
 % can be set).  So we test for \relax and 0 as well as being undefined.
 \ifx\pdfoutput\thisisundefined
@@ -1117,15 +1177,24 @@ where each line of input produces a line of output.}
 % #1 is a control sequence in which to do the replacements,
 % which we \xdef.
 \def\txiescapepdf#1{%
-  \ifx\pdfescapestring\relax
+  \ifx\pdfescapestring\thisisundefined
     % No primitive available; should we give a warning or log?
     % Many times it won't matter.
+    \xdef#1{#1}%
   \else
     % The expandable \pdfescapestring primitive escapes parentheses,
     % backslashes, and other special chars.
     \xdef#1{\pdfescapestring{#1}}%
   \fi
 }
+\def\txiescapepdfutfsixteen#1{%
+  \ifx\pdfescapestrutfsixteen\thisisundefined
+    % No UTF-16 converting macro available.
+    \txiescapepdf{#1}%
+  \else
+    \xdef#1{\pdfescapestrutfsixteen{#1}}%
+  \fi
+}
 
 \newhelp\nopdfimagehelp{Texinfo supports .png, .jpg, .jpeg, and .pdf images
 with PDF output, and none of those formats could be found.  (.eps cannot
@@ -1134,15 +1203,17 @@ output) for that.)}
 
 \ifpdf
   %
-  % Color manipulation macros based on pdfcolor.tex,
+  % Color manipulation macros using ideas from pdfcolor.tex,
   % except using rgb instead of cmyk; the latter is said to render as a
   % very dark gray on-screen and a very dark halftone in print, instead
-  % of actual black.
+  % of actual black. The dark red here is dark enough to print on paper as
+  % nearly black, but still distinguishable for online viewing.  We use
+  % black by default, though.
   \def\rgbDarkRed{0.50 0.09 0.12}
   \def\rgbBlack{0 0 0}
   %
-  % k sets the color for filling (usual text, etc.);
-  % K sets the color for stroking (thin rules, e.g., normal _'s).
+  % rg sets the color for filling (usual text, etc.);
+  % RG sets the color for stroking (thin rules, e.g., normal _'s).
   \def\pdfsetcolor#1{\pdfliteral{#1 rg  #1 RG}}
   %
   % Set color, and create a mark which defines \thiscolor accordingly,
@@ -1233,24 +1304,83 @@ output) for that.)}
       \pdfrefximage \pdflastximage
     \fi}
   %
-  \def\pdfmkdest#1{{%
+  \def\setpdfdestname#1{{%
     % We have to set dummies so commands such as @code, and characters
     % such as \, aren't expanded when present in a section title.
     \indexnofonts
-    \turnoffactive
     \makevalueexpandable
+    \turnoffactive
+    \iftxiuseunicodedestname
+      \ifx \declaredencoding \latone
+        % Pass through Latin-1 characters.
+        % LuaTeX with byte wise I/O converts Latin-1 characters to Unicode.
+      \else
+        \ifx \declaredencoding \utfeight
+          % Pass through Unicode characters.
+        \else
+          % Use ASCII approximations in destination names.
+          \passthroughcharsfalse
+        \fi
+      \fi
+    \else
+      % Use ASCII approximations in destination names.
+      \passthroughcharsfalse
+    \fi
     \def\pdfdestname{#1}%
     \txiescapepdf\pdfdestname
-    \safewhatsit{\pdfdest name{\pdfdestname} xyz}%
   }}
   %
+  \def\setpdfoutlinetext#1{{%
+    \indexnofonts
+    \makevalueexpandable
+    \turnoffactive
+    \ifx \declaredencoding \latone
+      % The PDF format can use an extended form of Latin-1 in bookmark
+      % strings.  See Appendix D of the PDF Reference, Sixth Edition, for
+      % the "PDFDocEncoding".
+      \passthroughcharstrue
+      % Pass through Latin-1 characters.
+      %   LuaTeX: Convert to Unicode
+      %   pdfTeX: Use Latin-1 as PDFDocEncoding
+      \def\pdfoutlinetext{#1}%
+    \else
+      \ifx \declaredencoding \utfeight
+        \ifx\luatexversion\thisisundefined
+          % For pdfTeX  with UTF-8.
+          % TODO: the PDF format can use UTF-16 in bookmark strings,
+          % but the code for this isn't done yet.
+          % Use ASCII approximations.
+          \passthroughcharsfalse
+          \def\pdfoutlinetext{#1}%
+        \else
+          % For LuaTeX with UTF-8.
+          % Pass through Unicode characters for title texts.
+          \passthroughcharstrue
+          \def\pdfoutlinetext{#1}%
+        \fi
+      \else
+        % For non-Latin-1 or non-UTF-8 encodings.
+        % Use ASCII approximations.
+        \passthroughcharsfalse
+        \def\pdfoutlinetext{#1}%
+      \fi
+    \fi
+    % LuaTeX: Convert to UTF-16
+    % pdfTeX: Use Latin-1 as PDFDocEncoding
+    \txiescapepdfutfsixteen\pdfoutlinetext
+  }}
+  %
+  \def\pdfmkdest#1{%
+    \setpdfdestname{#1}%
+    \safewhatsit{\pdfdest name{\pdfdestname} xyz}%
+  }
+  %
   % used to mark target names; must be expandable.
   \def\pdfmkpgn#1{#1}
   %
-  % by default, use a color that is dark enough to print on paper as
-  % nearly black, but still distinguishable for online viewing.
-  \def\urlcolor{\rgbDarkRed}
-  \def\linkcolor{\rgbDarkRed}
+  % by default, use black for everything.
+  \def\urlcolor{\rgbBlack}
+  \def\linkcolor{\rgbBlack}
   \def\endlink{\setcolor{\maincolor}\pdfendlink}
   %
   % Adding outlines to PDF; macros for calculating structure of outlines
@@ -1272,18 +1402,13 @@ output) for that.)}
     % page number.  We could generate a destination for the section
     % text in the case where a section has no node, but it doesn't
     % seem worth the trouble, since most documents are normally structured.
-    \edef\pdfoutlinedest{#3}%
-    \ifx\pdfoutlinedest\empty
-      \def\pdfoutlinedest{#4}%
-    \else
-      \txiescapepdf\pdfoutlinedest
+    \setpdfoutlinetext{#1}
+    \setpdfdestname{#3}
+    \ifx\pdfdestname\empty
+      \def\pdfdestname{#4}%
     \fi
     %
-    % Also escape PDF chars in the display string.
-    \edef\pdfoutlinetext{#1}%
-    \txiescapepdf\pdfoutlinetext
-    %
-    \pdfoutline goto name{\pdfmkpgn{\pdfoutlinedest}}#2{\pdfoutlinetext}%
+    \pdfoutline goto name{\pdfmkpgn{\pdfdestname}}#2{\pdfoutlinetext}%
   }
   %
   \def\pdfmakeoutlines{%
@@ -1367,9 +1492,8 @@ output) for that.)}
   \def\skipspaces#1{\def\PP{#1}\def\D{|}%
     \ifx\PP\D\let\nextsp\relax
     \else\let\nextsp\skipspaces
-      \ifx\p\space\else\addtokens{\filename}{\PP}%
-        \advance\filenamelength by 1
-      \fi
+      \addtokens{\filename}{\PP}%
+      \advance\filenamelength by 1
     \fi
     \nextsp}
   \def\getfilename#1{%
@@ -1439,44 +1563,297 @@ output) for that.)}
   \let\pdfmakeoutlines = \relax
 \fi  % \ifx\pdfoutput
 
-
-\message{fonts,}
-
-% Change the current font style to #1, remembering it in \curfontstyle.
-% For now, we do not accumulate font styles: @b{@i{foo}} prints foo in
-% italics, not bold italics.
 %
-\def\setfontstyle#1{%
-  \def\curfontstyle{#1}% not as a control sequence, because we are \edef'd.
-  \csname ten#1\endcsname  % change the current font
-}
-
-% Select #1 fonts with the current style.
+% For XeTeX
 %
-\def\selectfonts#1{\csname #1fonts\endcsname \csname\curfontstyle\endcsname}
-
-\def\rm{\fam=0 \setfontstyle{rm}}
-\def\it{\fam=\itfam \setfontstyle{it}}
-\def\sl{\fam=\slfam \setfontstyle{sl}}
-\def\bf{\fam=\bffam \setfontstyle{bf}}\def\bfstylename{bf}
-\def\tt{\fam=\ttfam \setfontstyle{tt}}
-
-% Unfortunately, we have to override this for titles and the like, since
-% in those cases "rm" is bold.  Sigh.
-\def\rmisbold{\rm\def\curfontstyle{bf}}
-
-% Texinfo sort of supports the sans serif font style, which plain TeX does not.
-% So we set up a \sf.
-\newfam\sffam
-\def\sf{\fam=\sffam \setfontstyle{sf}}
-\let\li = \sf % Sometimes we call it \li, not \sf.
+\ifx\XeTeXrevision\thisisundefined
+\else
+  %
+  % XeTeX version check
+  %
+  \ifnum\strcmp{\the\XeTeXversion\XeTeXrevision}{0.99996}>-1
+    % TeX Live 2016 contains XeTeX 0.99996 and xdvipdfmx 20160307.
+    % It can use the `dvipdfmx:config' special (from TeX Live SVN r40941).
+    % For avoiding PDF destination name replacement, we use this special
+    % instead of xdvipdfmx's command line option `-C 0x0010'.
+    \special{dvipdfmx:config C 0x0010}
+    % XeTeX 0.99995+ comes with xdvipdfmx 20160307+.
+    % It can handle Unicode destination names for PDF.
+    \txiuseunicodedestnametrue
+  \else
+    % XeTeX < 0.99996 (TeX Live < 2016) cannot use the
+    % `dvipdfmx:config' special.
+    % So for avoiding PDF destination name replacement,
+    % xdvipdfmx's command line option `-C 0x0010' is necessary.
+    %
+    % XeTeX < 0.99995 can not handle Unicode destination names for PDF
+    % because xdvipdfmx 20150315 has a UTF-16 conversion issue.
+    % It is fixed by xdvipdfmx 20160106 (TeX Live SVN r39753).
+    \txiuseunicodedestnamefalse
+  \fi
+  %
+  % Color support
+  %
+  \def\rgbDarkRed{0.50 0.09 0.12}
+  \def\rgbBlack{0 0 0}
+  %
+  \def\pdfsetcolor#1{\special{pdf:scolor [#1]}}
+  %
+  % Set color, and create a mark which defines \thiscolor accordingly,
+  % so that \makeheadline knows which color to restore.
+  \def\setcolor#1{%
+    \xdef\lastcolordefs{\gdef\noexpand\thiscolor{#1}}%
+    \domark
+    \pdfsetcolor{#1}%
+  }
+  %
+  \def\maincolor{\rgbBlack}
+  \pdfsetcolor{\maincolor}
+  \edef\thiscolor{\maincolor}
+  \def\lastcolordefs{}
+  %
+  \def\makefootline{%
+    \baselineskip24pt
+    \line{\pdfsetcolor{\maincolor}\the\footline}%
+  }
+  %
+  \def\makeheadline{%
+    \vbox to 0pt{%
+      \vskip-22.5pt
+      \line{%
+        \vbox to8.5pt{}%
+        % Extract \thiscolor definition from the marks.
+        \getcolormarks
+        % Typeset the headline with \maincolor, then restore the color.
+        \pdfsetcolor{\maincolor}\the\headline\pdfsetcolor{\thiscolor}%
+      }%
+      \vss
+    }%
+    \nointerlineskip
+  }
+  %
+  % PDF outline support
+  %
+  % Emulate pdfTeX primitive
+  \def\pdfdest name#1 xyz{%
+    \special{pdf:dest (#1) [@thispage /XYZ @xpos @ypos null]}%
+  }
+  %
+  \def\setpdfdestname#1{{%
+    % We have to set dummies so commands such as @code, and characters
+    % such as \, aren't expanded when present in a section title.
+    \indexnofonts
+    \makevalueexpandable
+    \turnoffactive
+    \iftxiuseunicodedestname
+      % Pass through Unicode characters.
+    \else
+      % Use ASCII approximations in destination names.
+      \passthroughcharsfalse
+    \fi
+    \def\pdfdestname{#1}%
+    \txiescapepdf\pdfdestname
+  }}
+  %
+  \def\setpdfoutlinetext#1{{%
+    \turnoffactive
+    % Always use Unicode characters in title texts.
+    \def\pdfoutlinetext{#1}%
+    % For XeTeX, xdvipdfmx converts to UTF-16.
+    % So we do not convert.
+    \txiescapepdf\pdfoutlinetext
+  }}
+  %
+  \def\pdfmkdest#1{%
+    \setpdfdestname{#1}%
+    \safewhatsit{\pdfdest name{\pdfdestname} xyz}%
+  }
+  %
+  % by default, use black for everything.
+  \def\urlcolor{\rgbBlack}
+  \def\linkcolor{\rgbBlack}
+  \def\endlink{\setcolor{\maincolor}\pdfendlink}
+  %
+  \def\dopdfoutline#1#2#3#4{%
+    \setpdfoutlinetext{#1}
+    \setpdfdestname{#3}
+    \ifx\pdfdestname\empty
+      \def\pdfdestname{#4}%
+    \fi
+    %
+    \special{pdf:out [-] #2 << /Title (\pdfoutlinetext) /A
+      << /S /GoTo /D (\pdfdestname) >> >> }%
+  }
+  %
+  \def\pdfmakeoutlines{%
+    \begingroup
+      %
+      % For XeTeX, counts of subentries are not necessary.
+      % Therefore, we read toc only once.
+      %
+      % We use node names as destinations.
+      \def\partentry##1##2##3##4{}% ignore parts in the outlines
+      \def\numchapentry##1##2##3##4{%
+        \dopdfoutline{##1}{1}{##3}{##4}}%
+      \def\numsecentry##1##2##3##4{%
+        \dopdfoutline{##1}{2}{##3}{##4}}%
+      \def\numsubsecentry##1##2##3##4{%
+        \dopdfoutline{##1}{3}{##3}{##4}}%
+      \def\numsubsubsecentry##1##2##3##4{%
+        \dopdfoutline{##1}{4}{##3}{##4}}%
+      %
+      \let\appentry\numchapentry%
+      \let\appsecentry\numsecentry%
+      \let\appsubsecentry\numsubsecentry%
+      \let\appsubsubsecentry\numsubsubsecentry%
+      \let\unnchapentry\numchapentry%
+      \let\unnsecentry\numsecentry%
+      \let\unnsubsecentry\numsubsecentry%
+      \let\unnsubsubsecentry\numsubsubsecentry%
+      %
+      % For XeTeX, xdvipdfmx converts strings to UTF-16.
+      % Therefore, the encoding and the language may not be considered.
+      %
+      \indexnofonts
+      \setupdatafile
+      % We can have normal brace characters in the PDF outlines, unlike
+      % Texinfo index files.  So set that up.
+      \def\{{\lbracecharliteral}%
+      \def\}{\rbracecharliteral}%
+      \catcode`\\=\active \otherbackslash
+      \input \tocreadfilename
+    \endgroup
+  }
+  {\catcode`[=1 \catcode`]=2
+   \catcode`{=\other \catcode`}=\other
+   \gdef\lbracecharliteral[{]%
+   \gdef\rbracecharliteral[}]%
+  ]
 
-% We don't need math for this font style.
-\def\ttsl{\setfontstyle{ttsl}}
+  \special{pdf:docview << /PageMode /UseOutlines >> }
+  % ``\special{pdf:tounicode ...}'' is not necessary
+  % because xdvipdfmx converts strings from UTF-8 to UTF-16 without it.
+  % However, due to a UTF-16 conversion issue of xdvipdfmx 20150315,
+  % ``\special{pdf:dest ...}'' cannot handle non-ASCII strings.
+  % It is fixed by xdvipdfmx 20160106 (TeX Live SVN r39753).
+%
+  \def\skipspaces#1{\def\PP{#1}\def\D{|}%
+    \ifx\PP\D\let\nextsp\relax
+    \else\let\nextsp\skipspaces
+      \addtokens{\filename}{\PP}%
+      \advance\filenamelength by 1
+    \fi
+    \nextsp}
+  \def\getfilename#1{%
+    \filenamelength=0
+    % If we don't expand the argument now, \skipspaces will get
+    % snagged on things like "@value{foo}".
+    \edef\temp{#1}%
+    \expandafter\skipspaces\temp|\relax
+  }
+  % make a live url in pdf output.
+  \def\pdfurl#1{%
+    \begingroup
+      % it seems we really need yet another set of dummies; have not
+      % tried to figure out what each command should do in the context
+      % of @url.  for now, just make @/ a no-op, that's the only one
+      % people have actually reported a problem with.
+      %
+      \normalturnoffactive
+      \def\@{@}%
+      \let\/=\empty
+      \makevalueexpandable
+      % do we want to go so far as to use \indexnofonts instead of just
+      % special-casing \var here?
+      \def\var##1{##1}%
+      %
+      \leavevmode\setcolor{\urlcolor}%
+      \special{pdf:bann << /Border [0 0 0]
+        /Subtype /Link /A << /S /URI /URI (#1) >> >>}%
+    \endgroup}
+  \def\endlink{\setcolor{\maincolor}\special{pdf:eann}}
+  \def\pdfgettoks#1.{\setbox\boxA=\hbox{\toksA={#1.}\toksB={}\maketoks}}
+  \def\addtokens#1#2{\edef\addtoks{\noexpand#1={\the#1#2}}\addtoks}
+  \def\adn#1{\addtokens{\toksC}{#1}\global\countA=1\let\next=\maketoks}
+  \def\poptoks#1#2|ENDTOKS|{\let\first=#1\toksD={#1}\toksA={#2}}
+  \def\maketoks{%
+    \expandafter\poptoks\the\toksA|ENDTOKS|\relax
+    \ifx\first0\adn0
+    \else\ifx\first1\adn1 \else\ifx\first2\adn2 \else\ifx\first3\adn3
+    \else\ifx\first4\adn4 \else\ifx\first5\adn5 \else\ifx\first6\adn6
+    \else\ifx\first7\adn7 \else\ifx\first8\adn8 \else\ifx\first9\adn9
+    \else
+      \ifnum0=\countA\else\makelink\fi
+      \ifx\first.\let\next=\done\else
+        \let\next=\maketoks
+        \addtokens{\toksB}{\the\toksD}
+        \ifx\first,\addtokens{\toksB}{\space}\fi
+      \fi
+    \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi
+    \next}
+  \def\makelink{\addtokens{\toksB}%
+    {\noexpand\pdflink{\the\toksC}}\toksC={}\global\countA=0}
+  \def\pdflink#1{%
+    \special{pdf:bann << /Border [0 0 0]
+      /Type /Annot /Subtype /Link /A << /S /GoTo /D (#1) >> >>}%
+    \setcolor{\linkcolor}#1\endlink}
+  \def\done{\edef\st{\global\noexpand\toksA={\the\toksB}}\st}
+%
+  %
+  % @image support
+  %
+  % #1 is image name, #2 width (might be empty/whitespace), #3 height (ditto).
+  \def\doxeteximage#1#2#3{%
+    \def\xeteximagewidth{#2}\setbox0 = \hbox{\ignorespaces #2}%
+    \def\xeteximageheight{#3}\setbox2 = \hbox{\ignorespaces #3}%
+    %
+    % XeTeX (and the PDF format) supports .pdf, .png, .jpg (among
+    % others).  Let's try in that order, PDF first since if
+    % someone has a scalable image, presumably better to use that than a
+    % bitmap.
+    \let\xeteximgext=\empty
+    \begingroup
+      \openin 1 #1.pdf \ifeof 1
+        \openin 1 #1.PDF \ifeof 1
+          \openin 1 #1.png \ifeof 1
+            \openin 1 #1.jpg \ifeof 1
+              \openin 1 #1.jpeg \ifeof 1
+                \openin 1 #1.JPG \ifeof 1
+                  \errmessage{Could not find image file #1 for XeTeX}%
+                \else \gdef\xeteximgext{JPG}%
+                \fi
+              \else \gdef\xeteximgext{jpeg}%
+              \fi
+            \else \gdef\xeteximgext{jpg}%
+            \fi
+          \else \gdef\xeteximgext{png}%
+          \fi
+        \else \gdef\xeteximgext{PDF}%
+        \fi
+      \else \gdef\xeteximgext{pdf}%
+      \fi
+      \closein 1
+    \endgroup
+    %
+    \def\xetexpdfext{pdf}%
+    \ifx\xeteximgext\xetexpdfext
+      \XeTeXpdffile "#1".\xeteximgext ""
+    \else
+      \def\xetexpdfext{PDF}%
+      \ifx\xeteximgext\xetexpdfext
+        \XeTeXpdffile "#1".\xeteximgext ""
+      \else
+        \XeTeXpicfile "#1".\xeteximgext ""
+      \fi
+    \fi
+    \ifdim \wd0 >0pt width \xeteximagewidth \fi
+    \ifdim \wd2 >0pt height \xeteximageheight \fi \relax
+  }
+\fi
 
 
-% Default leading.
-\newdimen\textleading  \textleading = 13.2pt
+%
+\message{fonts,}
 
 % Set the baselineskip to #1, and the lineskip and strut size
 % correspondingly.  There is no deep meaning behind these magic numbers
@@ -1489,6 +1866,7 @@ output) for that.)}
 % can get a sort of poor man's double spacing by redefining this.
 \def\baselinefactor{1}
 %
+\newdimen\textleading
 \def\setleading#1{%
   \dimen0 = #1\relax
   \normalbaselineskip = \baselinefactor\dimen0
@@ -1761,18 +2139,24 @@ end
 \fi\fi
 
 
-% Set the font macro #1 to the font named #2, adding on the
-% specified font prefix (normally `cm').
+% Set the font macro #1 to the font named \fontprefix#2.
 % #3 is the font's design size, #4 is a scale factor, #5 is the CMap
-% encoding (currently only OT1, OT1IT and OT1TT are allowed, pass
-% empty to omit).
+% encoding (only OT1, OT1IT and OT1TT are allowed, or empty to omit).
+% Example:
+% #1 = \textrm
+% #2 = \rmshape
+% #3 = 10
+% #4 = \mainmagstep
+% #5 = OT1
+%
 \def\setfont#1#2#3#4#5{%
   \font#1=\fontprefix#2#3 scaled #4
   \csname cmap#5\endcsname#1%
 }
 % This is what gets called when #5 of \setfont is empty.
 \let\cmap\gobble
-% emacs-page end of cmaps
+%
+% (end of cmaps)
 
 % Use cm as the default font prefix.
 % To specify the font prefix, you must define \fontprefix
@@ -1782,7 +2166,7 @@ end
 \fi
 % Support font families that don't use the same naming scheme as CM.
 \def\rmshape{r}
-\def\rmbshape{bx}               %where the normal face is bold
+\def\rmbshape{bx}               % where the normal face is bold
 \def\bfshape{b}
 \def\bxshape{bx}
 \def\ttshape{tt}
@@ -1797,8 +2181,7 @@ end
 \def\scshape{csc}
 \def\scbshape{csc}
 
-% Definitions for a main text size of 11pt.  This is the default in
-% Texinfo.
+% Definitions for a main text size of 11pt.  (The default in Texinfo.)
 %
 \def\definetextfontsizexi{%
 % Text fonts (11.2pt, magstep1).
@@ -1819,8 +2202,10 @@ end
 % A few fonts for @defun names and args.
 \setfont\defbf\bfshape{10}{\magstep1}{OT1}
 \setfont\deftt\ttshape{10}{\magstep1}{OT1TT}
+\setfont\defsl\slshape{10}{\magstep1}{OT1TT}
 \setfont\defttsl\ttslshape{10}{\magstep1}{OT1TT}
-\def\df{\let\tentt=\deftt \let\tenbf = \defbf \let\tenttsl=\defttsl \bf}
+\def\df{\let\ttfont=\deftt \let\bffont = \defbf
+\let\ttslfont=\defttsl \let\slfont=\defsl \bf}
 
 % Fonts for indices, footnotes, small examples (9pt).
 \def\smallnominalsize{9pt}
@@ -1881,6 +2266,7 @@ end
 % Section fonts (14.4pt).
 \def\secnominalsize{14pt}
 \setfont\secrm\rmbshape{12}{\magstep1}{OT1}
+\setfont\secrmnotbold\rmshape{12}{\magstep1}{OT1}
 \setfont\secit\itbshape{10}{\magstep2}{OT1IT}
 \setfont\secsl\slbshape{10}{\magstep2}{OT1}
 \setfont\sectt\ttbshape{12}{\magstep1}{OT1TT}
@@ -1906,7 +2292,7 @@ end
 \font\ssecsy=cmsy10 scaled 1315
 \def\ssececsize{1200}
 
-% Reduced fonts for @acro in text (10pt).
+% Reduced fonts for @acronym in text (10pt).
 \def\reducednominalsize{10pt}
 \setfont\reducedrm\rmshape{10}{1000}{OT1}
 \setfont\reducedtt\ttshape{10}{1000}{OT1TT}
@@ -1923,7 +2309,7 @@ end
 \textleading = 13.2pt % line spacing for 11pt CM
 \textfonts            % reset the current fonts
 \rm
-} % end of 11pt text font size definitions
+} % end of 11pt text font size definitions, \definetextfontsizexi
 
 
 % Definitions to make the main text be 10pt Computer Modern, with
@@ -1950,8 +2336,10 @@ end
 % A few fonts for @defun names and args.
 \setfont\defbf\bfshape{10}{\magstephalf}{OT1}
 \setfont\deftt\ttshape{10}{\magstephalf}{OT1TT}
+\setfont\defsl\slshape{10}{\magstephalf}{OT1TT}
 \setfont\defttsl\ttslshape{10}{\magstephalf}{OT1TT}
-\def\df{\let\tentt=\deftt \let\tenbf = \defbf \let\tenttsl=\defttsl \bf}
+\def\df{\let\ttfont=\deftt \let\bffont = \defbf
+\let\slfont=\defsl \let\ttslfont=\defttsl \bf}
 
 % Fonts for indices, footnotes, small examples (9pt).
 \def\smallnominalsize{9pt}
@@ -2037,7 +2425,7 @@ end
 \font\ssecsy=cmsy10
 \def\ssececsize{1000}
 
-% Reduced fonts for @acro in text (9pt).
+% Reduced fonts for @acronym in text (9pt).
 \def\reducednominalsize{9pt}
 \setfont\reducedrm\rmshape{9}{1000}{OT1}
 \setfont\reducedtt\ttshape{9}{1000}{OT1TT}
@@ -2055,7 +2443,13 @@ end
 \textleading = 12pt   % line spacing for 10pt CM
 \textfonts            % reset the current fonts
 \rm
-} % end of 10pt text font size definitions
+} % end of 10pt text font size definitions, \definetextfontsizex
+
+% Fonts for short table of contents.
+\setfont\shortcontrm\rmshape{12}{1000}{OT1}
+\setfont\shortcontbf\bfshape{10}{\magstep1}{OT1}  % no cmb12
+\setfont\shortcontsl\slshape{12}{1000}{OT1}
+\setfont\shortconttt\ttshape{12}{1000}{OT1TT}
 
 
 % We provide the user-level command
@@ -2083,102 +2477,111 @@ end
  \endgroup
 }
 
+%
+% Change the current font style to #1, remembering it in \curfontstyle.
+% For now, we do not accumulate font styles: @b{@i{foo}} prints foo in
+% italics, not bold italics.
+%
+\def\setfontstyle#1{%
+  \def\curfontstyle{#1}% not as a control sequence, because we are \edef'd.
+  \csname #1font\endcsname  % change the current font
+}
+
+\def\rm{\fam=0 \setfontstyle{rm}}
+\def\it{\fam=\itfam \setfontstyle{it}}
+\def\sl{\fam=\slfam \setfontstyle{sl}}
+\def\bf{\fam=\bffam \setfontstyle{bf}}\def\bfstylename{bf}
+\def\tt{\fam=\ttfam \setfontstyle{tt}}
+
+% Texinfo sort of supports the sans serif font style, which plain TeX does not.
+% So we set up a \sf.
+\newfam\sffam
+\def\sf{\fam=\sffam \setfontstyle{sf}}
+
+% We don't need math for this font style.
+\def\ttsl{\setfontstyle{ttsl}}
+
 
 % In order for the font changes to affect most math symbols and letters,
-% we have to define the \textfont of the standard families.  Since
-% texinfo doesn't allow for producing subscripts and superscripts except
-% in the main text, we don't bother to reset \scriptfont and
-% \scriptscriptfont (which would also require loading a lot more fonts).
+% we have to define the \textfont of the standard families.  We don't
+% bother to reset \scriptfont and \scriptscriptfont; awaiting user need.
 %
 \def\resetmathfonts{%
-  \textfont0=\tenrm \textfont1=\teni \textfont2=\tensy
-  \textfont\itfam=\tenit \textfont\slfam=\tensl \textfont\bffam=\tenbf
-  \textfont\ttfam=\tentt \textfont\sffam=\tensf
+  \textfont0=\rmfont \textfont1=\ifont \textfont2=\syfont
+  \textfont\itfam=\itfont \textfont\slfam=\slfont \textfont\bffam=\bffont
+  \textfont\ttfam=\ttfont \textfont\sffam=\sffont
 }
 
-% The font-changing commands redefine the meanings of \tenSTYLE, instead
-% of just \STYLE.  We do this because \STYLE needs to also set the
-% current \fam for math mode.  Our \STYLE (e.g., \rm) commands hardwire
-% \tenSTYLE to set the current font.
+%
+
+% The font-changing commands (all called \...fonts) redefine the meanings
+% of \STYLEfont, instead of just \STYLE.  We do this because \STYLE needs
+% to also set the current \fam for math mode.  Our \STYLE (e.g., \rm)
+% commands hardwire \STYLEfont to set the current font.
 %
 % Each font-changing command also sets the names \lsize (one size lower)
-% and \lllsize (three sizes lower).  These relative commands are used in
-% the LaTeX logo and acronyms.
+% and \lllsize (three sizes lower).  These relative commands are used
+% in, e.g., the LaTeX logo and acronyms.
 %
 % This all needs generalizing, badly.
 %
-\def\textfonts{%
-  \let\tenrm=\textrm \let\tenit=\textit \let\tensl=\textsl
-  \let\tenbf=\textbf \let\tentt=\texttt \let\smallcaps=\textsc
-  \let\tensf=\textsf \let\teni=\texti \let\tensy=\textsy
-  \let\tenttsl=\textttsl
-  \def\curfontsize{text}%
-  \def\lsize{reduced}\def\lllsize{smaller}%
-  \resetmathfonts \setleading{\textleading}}
-\def\titlefonts{%
-  \let\tenrm=\titlerm \let\tenit=\titleit \let\tensl=\titlesl
-  \let\tenbf=\titlebf \let\tentt=\titlett \let\smallcaps=\titlesc
-  \let\tensf=\titlesf \let\teni=\titlei \let\tensy=\titlesy
-  \let\tenttsl=\titlettsl
-  \def\curfontsize{title}%
-  \def\lsize{chap}\def\lllsize{subsec}%
-  \resetmathfonts \setleading{27pt}}
-\def\titlefont#1{{\titlefonts\rmisbold #1}}
-\def\chapfonts{%
-  \let\tenrm=\chaprm \let\tenit=\chapit \let\tensl=\chapsl
-  \let\tenbf=\chapbf \let\tentt=\chaptt \let\smallcaps=\chapsc
-  \let\tensf=\chapsf \let\teni=\chapi \let\tensy=\chapsy
-  \let\tenttsl=\chapttsl
-  \def\curfontsize{chap}%
-  \def\lsize{sec}\def\lllsize{text}%
-  \resetmathfonts \setleading{19pt}}
-\def\secfonts{%
-  \let\tenrm=\secrm \let\tenit=\secit \let\tensl=\secsl
-  \let\tenbf=\secbf \let\tentt=\sectt \let\smallcaps=\secsc
-  \let\tensf=\secsf \let\teni=\seci \let\tensy=\secsy
-  \let\tenttsl=\secttsl
-  \def\curfontsize{sec}%
-  \def\lsize{subsec}\def\lllsize{reduced}%
-  \resetmathfonts \setleading{16pt}}
-\def\subsecfonts{%
-  \let\tenrm=\ssecrm \let\tenit=\ssecit \let\tensl=\ssecsl
-  \let\tenbf=\ssecbf \let\tentt=\ssectt \let\smallcaps=\ssecsc
-  \let\tensf=\ssecsf \let\teni=\sseci \let\tensy=\ssecsy
-  \let\tenttsl=\ssecttsl
-  \def\curfontsize{ssec}%
-  \def\lsize{text}\def\lllsize{small}%
-  \resetmathfonts \setleading{15pt}}
-\let\subsubsecfonts = \subsecfonts
-\def\reducedfonts{%
-  \let\tenrm=\reducedrm \let\tenit=\reducedit \let\tensl=\reducedsl
-  \let\tenbf=\reducedbf \let\tentt=\reducedtt \let\reducedcaps=\reducedsc
-  \let\tensf=\reducedsf \let\teni=\reducedi \let\tensy=\reducedsy
-  \let\tenttsl=\reducedttsl
-  \def\curfontsize{reduced}%
-  \def\lsize{small}\def\lllsize{smaller}%
-  \resetmathfonts \setleading{10.5pt}}
-\def\smallfonts{%
-  \let\tenrm=\smallrm \let\tenit=\smallit \let\tensl=\smallsl
-  \let\tenbf=\smallbf \let\tentt=\smalltt \let\smallcaps=\smallsc
-  \let\tensf=\smallsf \let\teni=\smalli \let\tensy=\smallsy
-  \let\tenttsl=\smallttsl
-  \def\curfontsize{small}%
-  \def\lsize{smaller}\def\lllsize{smaller}%
-  \resetmathfonts \setleading{10.5pt}}
-\def\smallerfonts{%
-  \let\tenrm=\smallerrm \let\tenit=\smallerit \let\tensl=\smallersl
-  \let\tenbf=\smallerbf \let\tentt=\smallertt \let\smallcaps=\smallersc
-  \let\tensf=\smallersf \let\teni=\smalleri \let\tensy=\smallersy
-  \let\tenttsl=\smallerttsl
-  \def\curfontsize{smaller}%
-  \def\lsize{smaller}\def\lllsize{smaller}%
-  \resetmathfonts \setleading{9.5pt}}
 
-% Fonts for short table of contents.
-\setfont\shortcontrm\rmshape{12}{1000}{OT1}
-\setfont\shortcontbf\bfshape{10}{\magstep1}{OT1}  % no cmb12
-\setfont\shortcontsl\slshape{12}{1000}{OT1}
-\setfont\shortconttt\ttshape{12}{1000}{OT1TT}
+\def\assignfonts#1{%
+  \expandafter\let\expandafter\rmfont\csname #1rm\endcsname
+  \expandafter\let\expandafter\itfont\csname #1it\endcsname
+  \expandafter\let\expandafter\slfont\csname #1sl\endcsname
+  \expandafter\let\expandafter\bffont\csname #1bf\endcsname
+  \expandafter\let\expandafter\ttfont\csname #1tt\endcsname
+  \expandafter\let\expandafter\smallcaps\csname #1sc\endcsname
+  \expandafter\let\expandafter\sffont  \csname #1sf\endcsname
+  \expandafter\let\expandafter\ifont   \csname #1i\endcsname
+  \expandafter\let\expandafter\syfont  \csname #1sy\endcsname
+  \expandafter\let\expandafter\ttslfont\csname #1ttsl\endcsname
+}
+
+\newif\ifrmisbold
+
+% Select smaller font size with the current style.  Used to change font size
+% in, e.g., the LaTeX logo and acronyms.  If we are using bold fonts for
+% normal roman text, also use bold fonts for roman text in the smaller size.
+\def\switchtolllsize{%
+   \expandafter\assignfonts\expandafter{\lllsize}%
+   \ifrmisbold
+     \let\rmfont\bffont
+   \fi
+   \csname\curfontstyle\endcsname
+}%
+
+\def\switchtolsize{%
+   \expandafter\assignfonts\expandafter{\lsize}%
+   \ifrmisbold
+     \let\rmfont\bffont
+   \fi
+   \csname\curfontstyle\endcsname
+}%
+
+\def\definefontsetatsize#1#2#3#4#5{%
+\expandafter\def\csname #1fonts\endcsname{%
+  \def\curfontsize{#1}%
+  \def\lsize{#2}\def\lllsize{#3}%
+  \csname rmisbold#5\endcsname
+  \assignfonts{#1}%
+  \resetmathfonts
+  \setleading{#4}%
+}}
+
+\definefontsetatsize{text}   {reduced}{smaller}{\textleading}{false}
+\definefontsetatsize{title}  {chap}   {subsec} {27pt}  {true}
+\definefontsetatsize{chap}   {sec}    {text}   {19pt}  {true}
+\definefontsetatsize{sec}    {subsec} {reduced}{17pt}  {true}
+\definefontsetatsize{ssec}   {text}   {small}  {15pt}  {true}
+\definefontsetatsize{reduced}{small}  {smaller}{10.5pt}{false}
+\definefontsetatsize{small}  {smaller}{smaller}{10.5pt}{false}
+\definefontsetatsize{smaller}{smaller}{smaller}{9.5pt} {false}
+
+\def\titlefont#1{{\titlefonts\rm #1}}
+\let\subsecfonts = \ssecfonts
+\let\subsubsecfonts = \ssecfonts
 
 % Define these just so they can be easily changed for other fonts.
 \def\angleleft{$\langle$}
@@ -2270,8 +2673,6 @@ end
 
 \gdef\markupsetcodequoteleft{\let`\codequoteleft}
 \gdef\markupsetcodequoteright{\let'\codequoteright}
-
-\gdef\markupsetnoligaturesquoteleft{\let`\noligaturesquoteleft}
 }
 
 \let\markupsetuplqcode \markupsetcodequoteleft
@@ -2280,6 +2681,9 @@ end
 \let\markupsetuplqexample \markupsetcodequoteleft
 \let\markupsetuprqexample \markupsetcodequoteright
 %
+\let\markupsetuplqkbd     \markupsetcodequoteleft
+\let\markupsetuprqkbd     \markupsetcodequoteright
+%
 \let\markupsetuplqsamp \markupsetcodequoteleft
 \let\markupsetuprqsamp \markupsetcodequoteright
 %
@@ -2289,8 +2693,6 @@ end
 \let\markupsetuplqverbatim \markupsetcodequoteleft
 \let\markupsetuprqverbatim \markupsetcodequoteright
 
-\let\markupsetuplqkbd \markupsetnoligaturesquoteleft
-
 % Allow an option to not use regular directed right quote/apostrophe
 % (char 0x27), but instead the undirected quote from cmtt (char 0x0d).
 % The undirected quote is ugly, so don't make it the default, but it
@@ -2375,13 +2777,14 @@ end
   \ifx\next,%
   \else\ifx\next-%
   \else\ifx\next.%
+  \else\ifx\next\.%
+  \else\ifx\next\comma%
   \else\ptexslash
-  \fi\fi\fi
+  \fi\fi\fi\fi\fi
   \aftersmartic
 }
 
-% like \smartslanted except unconditionally uses \ttsl, and no ic.
-% @var is set to this for defun arguments.
+% Unconditional use \ttsl, and no ic.  @var is set to this for defuns.
 \def\ttslanted#1{{\ttsl #1}}
 
 % @cite is like \smartslanted except unconditionally use \sl.  We never want
@@ -2425,8 +2828,8 @@ end
 %
 \catcode`@=11
   \def\plainfrenchspacing{%
-    \sfcode\dotChar  =\@m \sfcode\questChar=\@m \sfcode\exclamChar=\@m
-    \sfcode\colonChar=\@m \sfcode\semiChar =\@m \sfcode\commaChar =\@m
+    \sfcode`\.=\@m \sfcode`\?=\@m \sfcode`\!=\@m
+    \sfcode`\:=\@m \sfcode`\;=\@m \sfcode`\,=\@m
     \def\endofsentencespacefactor{1000}% for @. and friends
   }
   \def\plainnonfrenchspacing{%
@@ -2446,34 +2849,12 @@ end
 % @samp.
 \def\samp#1{{\setupmarkupstyle{samp}\lq\tclose{#1}\rq\null}}
 
-% definition of @key that produces a lozenge.  Doesn't adjust to text size.
-%\setfont\keyrm\rmshape{8}{1000}{OT1}
-%\font\keysy=cmsy9
-%\def\key#1{{\keyrm\textfont2=\keysy \leavevmode\hbox{%
-%  \raise0.4pt\hbox{\angleleft}\kern-.08em\vtop{%
-%    \vbox{\hrule\kern-0.4pt
-%     \hbox{\raise0.4pt\hbox{\vphantom{\angleleft}}#1}}%
-%    \kern-0.4pt\hrule}%
-%  \kern-.06em\raise0.4pt\hbox{\angleright}}}}
-
-% definition of @key with no lozenge.  If the current font is already
-% monospace, don't change it; that way, we respect @kbdinputstyle.  But
-% if it isn't monospace, then use \tt.
-%
-\def\key#1{{\setupmarkupstyle{key}%
-  \nohyphenation
-  \ifmonospace\else\tt\fi
-  #1}\null}
-
-% ctrl is no longer a Texinfo command.
-\def\ctrl #1{{\tt \rawbackslash \hat}#1}
+% @indicateurl is \samp, that is, with quotes.
+\let\indicateurl=\samp
 
-% @file, @option are the same as @samp.
-\let\file=\samp
-\let\option=\samp
-
-% @code is a modification of @t,
-% which makes spaces the same size as normal in the surrounding text.
+% @code (and similar) prints in typewriter, but with spaces the same
+% size as normal in the surrounding text, without hyphenation, etc.
+% This is a subroutine for that.
 \def\tclose#1{%
   {%
     % Change normal interword space to be same as for the current font.
@@ -2496,14 +2877,14 @@ end
 }
 
 % We *must* turn on hyphenation at `-' and `_' in @code.
+% (But see \codedashfinish below.)
 % Otherwise, it is too hard to avoid overfull hboxes
 % in the Emacs manual, the Library manual, etc.
-
+%
 % Unfortunately, TeX uses one parameter (\hyphenchar) to control
 % both hyphenation at - and hyphenation within words.
 % We must therefore turn them both off (\tclose does that)
-% and arrange explicitly to hyphenate at a dash.
-%  -- rms.
+% and arrange explicitly to hyphenate at a dash. -- rms.
 {
   \catcode`\-=\active \catcode`\_=\active
   \catcode`\'=\active \catcode`\`=\active
@@ -2517,17 +2898,38 @@ end
      \let-\codedash
      \let_\codeunder
     \else
-     \let-\realdash
+     \let-\normaldash
      \let_\realunder
     \fi
+    % Given -foo (with a single dash), we do not want to allow a break
+    % after the hyphen.
+    \global\let\codedashprev=\codedash
+    %
     \codex
   }
+  %
+  \gdef\codedash{\futurelet\next\codedashfinish}
+  \gdef\codedashfinish{%
+    \normaldash % always output the dash character itself.
+    % 
+    % Now, output a discretionary to allow a line break, unless
+    % (a) the next character is a -, or
+    % (b) the preceding character is a -.
+    % E.g., given --posix, we do not want to allow a break after either -.
+    % Given --foo-bar, we do want to allow a break between the - and the b.
+    \ifx\next\codedash \else
+      \ifx\codedashprev\codedash 
+      \else \discretionary{}{}{}\fi
+    \fi
+    % we need the space after the = for the case when \next itself is a
+    % space token; it would get swallowed otherwise.  As in @code{- a}.
+    \global\let\codedashprev= \next
+  }
 }
-
+\def\normaldash{-}
+%
 \def\codex #1{\tclose{#1}\endgroup}
 
-\def\realdash{-}
-\def\codedash{-\discretionary{}{}{}}
 \def\codeunder{%
   % this is all so @math{@code{var_name}+1} can work.  In math mode, _
   % is "active" (mathcode"8000) and \normalunderscore (or \char95, etc.)
@@ -2541,9 +2943,9 @@ end
 }
 
 % An additional complication: the above will allow breaks after, e.g.,
-% each of the four underscores in __typeof__.  This is undesirable in
-% some manuals, especially if they don't have long identifiers in
-% general.  @allowcodebreaks provides a way to control this.
+% each of the four underscores in __typeof__.  This is bad.
+% @allowcodebreaks provides a document-level way to turn breaking at -
+% and _ on and off.
 %
 \newif\ifallowcodebreaks  \allowcodebreakstrue
 
@@ -2562,37 +2964,28 @@ end
   \fi\fi
 }
 
-% @uref (abbreviation for `urlref') takes an optional (comma-separated)
-% second argument specifying the text to display and an optional third
-% arg as text to display instead of (rather than in addition to) the url
-% itself.  First (mandatory) arg is the url.
-% (This \urefnobreak definition isn't used now, leaving it for a while
-% for comparison.)
-\def\urefnobreak#1{\dourefnobreak #1,,,\finish}
-\def\dourefnobreak#1,#2,#3,#4\finish{\begingroup
-  \unsepspaces
-  \pdfurl{#1}%
-  \setbox0 = \hbox{\ignorespaces #3}%
-  \ifdim\wd0 > 0pt
-    \unhbox0 % third arg given, show only that
-  \else
-    \setbox0 = \hbox{\ignorespaces #2}%
-    \ifdim\wd0 > 0pt
-      \ifpdf
-        \unhbox0             % PDF: 2nd arg given, show only it
-      \else
-        \unhbox0\ (\code{#1})% DVI: 2nd arg given, show both it and url
-      \fi
-    \else
-      \code{#1}% only url given, so show it
-    \fi
-  \fi
-  \endlink
-\endgroup}
+% For @command, @env, @file, @option quotes seem unnecessary,
+% so use \code rather than \samp.
+\let\command=\code
+\let\env=\code
+\let\file=\code
+\let\option=\code
+
+% @uref (abbreviation for `urlref') aka @url takes an optional
+% (comma-separated) second argument specifying the text to display and
+% an optional third arg as text to display instead of (rather than in
+% addition to) the url itself.  First (mandatory) arg is the url.
 
-% This \urefbreak definition is the active one.
+% TeX-only option to allow changing PDF output to show only the second
+% arg (if given), and not the url (which is then just the link target).
+\newif\ifurefurlonlylink
+
+% The main macro is \urefbreak, which allows breaking at expected
+% places within the url.  (There used to be another version, which
+% didn't support automatic breaking.)
 \def\urefbreak{\begingroup \urefcatcodes \dourefbreak}
 \let\uref=\urefbreak
+%
 \def\dourefbreak#1{\urefbreakfinish #1,,,\finish}
 \def\urefbreakfinish#1,#2,#3,#4\finish{% doesn't work in @example
   \unsepspaces
@@ -2601,12 +2994,32 @@ end
   \ifdim\wd0 > 0pt
     \unhbox0 % third arg given, show only that
   \else
-    \setbox0 = \hbox{\ignorespaces #2}%
+    \setbox0 = \hbox{\ignorespaces #2}% look for second arg
     \ifdim\wd0 > 0pt
       \ifpdf
-        \unhbox0             % PDF: 2nd arg given, show only it
+        % For pdfTeX and LuaTeX
+        \ifurefurlonlylink
+          % PDF plus option to not display url, show just arg
+          \unhbox0             
+        \else
+          % PDF, normally display both arg and url for consistency,
+          % visibility, if the pdf is eventually used to print, etc.
+          \unhbox0\ (\urefcode{#1})%
+        \fi
       \else
-        \unhbox0\ (\urefcode{#1})% DVI: 2nd arg given, show both it and url
+        \ifx\XeTeXrevision\thisisundefined
+          \unhbox0\ (\urefcode{#1})% DVI, always show arg and url
+        \else
+          % For XeTeX
+          \ifurefurlonlylink
+            % PDF plus option to not display url, show just arg
+            \unhbox0             
+          \else
+            % PDF, normally display both arg and url for consistency,
+            % visibility, if the pdf is eventually used to print, etc.
+            \unhbox0\ (\urefcode{#1})%
+          \fi
+        \fi
       \fi
     \else
       \urefcode{#1}% only url given, so show it
@@ -2617,9 +3030,9 @@ end
 
 % Allow line breaks around only a few characters (only).
 \def\urefcatcodes{%
-  \catcode\ampChar=\active   \catcode\dotChar=\active
-  \catcode\hashChar=\active  \catcode\questChar=\active
-  \catcode\slashChar=\active
+  \catcode`\&=\active \catcode`\.=\active
+  \catcode`\#=\active \catcode`\?=\active
+  \catcode`\/=\active
 }
 {
   \urefcatcodes
@@ -2646,8 +3059,10 @@ end
 % we put a little stretch before and after the breakable chars, to help
 % line breaking of long url's.  The unequal skips make look better in
 % cmtt at least, especially for dots.
-\def\urefprestretch{\urefprebreak \hskip0pt plus.13em }
-\def\urefpoststretch{\urefpostbreak \hskip0pt plus.1em }
+\def\urefprestretchamount{.13em}
+\def\urefpoststretchamount{.1em}
+\def\urefprestretch{\urefprebreak \hskip0pt plus\urefprestretchamount\relax}
+\def\urefpoststretch{\urefpostbreak \hskip0pt plus\urefprestretchamount\relax}
 %
 \def\urefcodeamp{\urefprestretch \&\urefpoststretch}
 \def\urefcodedot{\urefprestretch .\urefpoststretch}
@@ -2705,13 +3120,20 @@ end
     \endlink
   \endgroup}
 \else
-  \let\email=\uref
+  \ifx\XeTeXrevision\thisisundefined
+    \let\email=\uref
+  \else
+    \def\email#1{\doemail#1,,\finish}
+    \def\doemail#1,#2,#3\finish{\begingroup
+      \unsepspaces
+      \pdfurl{mailto:#1}%
+      \setbox0 = \hbox{\ignorespaces #2}%
+      \ifdim\wd0>0pt\unhbox0\else\code{#1}\fi
+      \endlink
+    \endgroup}
+  \fi
 \fi
 
-% @kbd is like @code, except that if the argument is just one @key command,
-% then @kbd has no effect.
-\def\kbd#1{{\setupmarkupstyle{kbd}\def\look{#1}\expandafter\kbdfoo\look??\par}}
-
 % @kbdinputstyle -- arg is `distinct' (@kbd uses slanted tty font always),
 %   `example' (@kbd uses ttsl only inside of @example and friends),
 %   or `code' (@kbd uses normal tty font always).
@@ -2735,16 +3157,36 @@ end
 % Default is `distinct'.
 \kbdinputstyle distinct
 
+% @kbd is like @code, except that if the argument is just one @key command,
+% then @kbd has no effect.
+\def\kbd#1{{\def\look{#1}\expandafter\kbdsub\look??\par}}
+
 \def\xkey{\key}
-\def\kbdfoo#1#2#3\par{\def\one{#1}\def\three{#3}\def\threex{??}%
-\ifx\one\xkey\ifx\threex\three \key{#2}%
-\else{\tclose{\kbdfont\setupmarkupstyle{kbd}\look}}\fi
-\else{\tclose{\kbdfont\setupmarkupstyle{kbd}\look}}\fi}
+\def\kbdsub#1#2#3\par{%
+  \def\one{#1}\def\three{#3}\def\threex{??}%
+  \ifx\one\xkey\ifx\threex\three \key{#2}%
+  \else{\tclose{\kbdfont\setupmarkupstyle{kbd}\look}}\fi
+  \else{\tclose{\kbdfont\setupmarkupstyle{kbd}\look}}\fi
+}
 
-% For @indicateurl, @env, @command quotes seem unnecessary, so use \code.
-\let\indicateurl=\code
-\let\env=\code
-\let\command=\code
+% definition of @key that produces a lozenge.  Doesn't adjust to text size.
+%\setfont\keyrm\rmshape{8}{1000}{OT1}
+%\font\keysy=cmsy9
+%\def\key#1{{\keyrm\textfont2=\keysy \leavevmode\hbox{%
+%  \raise0.4pt\hbox{\angleleft}\kern-.08em\vtop{%
+%    \vbox{\hrule\kern-0.4pt
+%     \hbox{\raise0.4pt\hbox{\vphantom{\angleleft}}#1}}%
+%    \kern-0.4pt\hrule}%
+%  \kern-.06em\raise0.4pt\hbox{\angleright}}}}
+
+% definition of @key with no lozenge.  If the current font is already
+% monospace, don't change it; that way, we respect @kbdinputstyle.  But
+% if it isn't monospace, then use \tt.
+%
+\def\key#1{{\setupmarkupstyle{key}%
+  \nohyphenation
+  \ifmonospace\else\tt\fi
+  #1}\null}
 
 % @clicksequence{File @click{} Open ...}
 \def\clicksequence#1{\begingroup #1\endgroup}
@@ -2758,18 +3200,13 @@ end
 %
 \def\dmn#1{\thinspace #1}
 
-% @l was never documented to mean ``switch to the Lisp font'',
-% and it is not used as such in any manual I can find.  We need it for
-% Polish suppressed-l.  --karl, 22sep96.
-%\def\l#1{{\li #1}\null}
-
 % @acronym for "FBI", "NATO", and the like.
 % We print this one point size smaller, since it's intended for
 % all-uppercase.
 %
 \def\acronym#1{\doacronym #1,,\finish}
 \def\doacronym#1,#2,#3\finish{%
-  {\selectfonts\lsize #1}%
+  {\switchtolsize #1}%
   \def\temp{#2}%
   \ifx\temp\empty \else
     \space ({\unsepspaces \ignorespaces \temp \unskip})%
@@ -2815,21 +3252,24 @@ end
 \def\mathbackslash{\ifnum\fam=\ttfam \mathchar"075C \else\backslash \fi}
 %
 \def\math{%
-  \tex
-  \mathunderscore
-  \let\\ = \mathbackslash
-  \mathactive
-  % make the texinfo accent commands work in math mode
-  \let\"=\ddot
-  \let\'=\acute
-  \let\==\bar
-  \let\^=\hat
-  \let\`=\grave
-  \let\u=\breve
-  \let\v=\check
-  \let\~=\tilde
-  \let\dotaccent=\dot
-  $\finishmath
+  \ifmmode\else % only go into math if not in math mode already
+    \tex
+    \mathunderscore
+    \let\\ = \mathbackslash
+    \mathactive
+    % make the texinfo accent commands work in math mode
+    \let\"=\ddot
+    \let\'=\acute
+    \let\==\bar
+    \let\^=\hat
+    \let\`=\grave
+    \let\u=\breve
+    \let\v=\check
+    \let\~=\tilde
+    \let\dotaccent=\dot
+    % have to provide another name for sup operator
+    \let\mathopsup=\sup
+  $\expandafter\finishmath\fi
 }
 \def\finishmath#1{#1$\endgroup}  % Close the group opened by \tex.
 
@@ -2852,6 +3292,18 @@ end
   }
 }
 
+% for @sub and @sup, if in math mode, just do a normal sub/superscript.
+% If in text, use math to place as sub/superscript, but switch
+% into text mode, with smaller fonts.  This is a different font than the
+% one used for real math sub/superscripts (8pt vs. 7pt), but let's not
+% fix it (significant additions to font machinery) until someone notices.
+%
+\def\sub{\ifmmode \expandafter\sb \else \expandafter\finishsub\fi}
+\def\finishsub#1{$\sb{\hbox{\switchtolllsize #1}}$}%
+%
+\def\sup{\ifmmode \expandafter\ptexsp \else \expandafter\finishsup\fi}
+\def\finishsup#1{$\ptexsp{\hbox{\switchtolllsize #1}}$}%
+
 % @inlinefmt{FMTNAME,PROCESSED-TEXT} and @inlineraw{FMTNAME,RAW-TEXT}.
 % Ignore unless FMTNAME == tex; then it is like @iftex and @tex,
 % except specified as a normal braced arg, so no newlines to worry about.
@@ -2863,6 +3315,15 @@ end
   \def\inlinefmtname{#1}%
   \ifx\inlinefmtname\outfmtnametex \ignorespaces #2\fi
 }
+% 
+% @inlinefmtifelse{FMTNAME,THEN-TEXT,ELSE-TEXT} expands THEN-TEXT if
+% FMTNAME is tex, else ELSE-TEXT.
+\long\def\inlinefmtifelse#1{\doinlinefmtifelse #1,,,\finish}
+\long\def\doinlinefmtifelse#1,#2,#3,#4,\finish{%
+  \def\inlinefmtname{#1}%
+  \ifx\inlinefmtname\outfmtnametex \ignorespaces #2\else \ignorespaces #3\fi
+}
+%
 % For raw, must switch into @tex before parsing the argument, to avoid
 % setting catcodes prematurely.  Doing it this way means that, for
 % example, @inlineraw{html, foo{bar} gets a parse error instead of being
@@ -2879,6 +3340,23 @@ end
   \endgroup % close group opened by \tex.
 }
 
+% @inlineifset{VAR, TEXT} expands TEXT if VAR is @set.
+%
+\long\def\inlineifset#1{\doinlineifset #1,\finish}
+\long\def\doinlineifset#1,#2,\finish{%
+  \def\inlinevarname{#1}%
+  \expandafter\ifx\csname SET\inlinevarname\endcsname\relax
+  \else\ignorespaces#2\fi
+}
+
+% @inlineifclear{VAR, TEXT} expands TEXT if VAR is not @set.
+%
+\long\def\inlineifclear#1{\doinlineifclear #1,\finish}
+\long\def\doinlineifclear#1,#2,\finish{%
+  \def\inlinevarname{#1}%
+  \expandafter\ifx\csname SET\inlinevarname\endcsname\relax \ignorespaces#2\fi
+}
+
 
 \message{glyphs,}
 % and logos.
@@ -2888,23 +3366,10 @@ end
 \let\atchar=\@
 
 % @{ @} @lbracechar{} @rbracechar{} all generate brace characters.
-% Unless we're in typewriter, use \ecfont because the CM text fonts do
-% not have braces, and we don't want to switch into math.
-\def\mylbrace{{\ifmonospace\else\ecfont\fi \char123}}
-\def\myrbrace{{\ifmonospace\else\ecfont\fi \char125}}
-\let\{=\mylbrace \let\lbracechar=\{
-\let\}=\myrbrace \let\rbracechar=\}
-\begingroup
-  % Definitions to produce \{ and \} commands for indices,
-  % and @{ and @} for the aux/toc files.
-  \catcode`\{ = \other \catcode`\} = \other
-  \catcode`\[ = 1 \catcode`\] = 2
-  \catcode`\! = 0 \catcode`\\ = \other
-  !gdef!lbracecmd[\{]%
-  !gdef!rbracecmd[\}]%
-  !gdef!lbraceatcmd[@{]%
-  !gdef!rbraceatcmd[@}]%
-!endgroup
+\def\lbracechar{{\ifmonospace\char123\else\ensuremath\lbrace\fi}}
+\def\rbracechar{{\ifmonospace\char125\else\ensuremath\rbrace\fi}}
+\let\{=\lbracechar
+\let\}=\rbracechar
 
 % @comma{} to avoid , parsing problems.
 \let\comma = ,
@@ -2922,8 +3387,8 @@ end
 % Plain TeX defines: @AA @AE @O @OE @L (plus lowercase versions) @ss.
 \def\questiondown{?`}
 \def\exclamdown{!`}
-\def\ordf{\leavevmode\raise1ex\hbox{\selectfonts\lllsize \underbar{a}}}
-\def\ordm{\leavevmode\raise1ex\hbox{\selectfonts\lllsize \underbar{o}}}
+\def\ordf{\leavevmode\raise1ex\hbox{\switchtolllsize \underbar{a}}}
+\def\ordm{\leavevmode\raise1ex\hbox{\switchtolllsize \underbar{o}}}
 
 % Dotless i and dotless j, used for accents.
 \def\imacro{i}
@@ -2952,12 +3417,12 @@ end
   {\setbox0=\hbox{T}%
    \vbox to \ht0{\hbox{%
      \ifx\textnominalsize\xwordpt
-       % for 10pt running text, \lllsize (8pt) is too small for the A in LaTeX.
+       % for 10pt running text, lllsize (8pt) is too small for the A in LaTeX.
        % Revert to plain's \scriptsize, which is 7pt.
        \count255=\the\fam $\fam\count255 \scriptstyle A$%
      \else
        % For 11pt, we can use our lllsize.
-       \selectfonts\lllsize A%
+       \switchtolllsize A%
      \fi
      }%
      \vss
@@ -2966,11 +3431,16 @@ end
   \TeX
 }
 
-% Some math mode symbols.
-\def\bullet{$\ptexbullet$}
-\def\geq{\ifmmode \ge\else $\ge$\fi}
-\def\leq{\ifmmode \le\else $\le$\fi}
-\def\minus{\ifmmode -\else $-$\fi}
+% Some math mode symbols.  Define \ensuremath to switch into math mode
+% unless we are already there.  Expansion tricks may not be needed here,
+% but safer, and can't hurt.
+\def\ensuremath{\ifmmode \expandafter\asis \else\expandafter\ensuredmath \fi}
+\def\ensuredmath#1{$\relax#1$}
+%
+\def\bullet{\ensuremath\ptexbullet}
+\def\geq{\ensuremath\ge}
+\def\leq{\ensuremath\le}
+\def\minus{\ensuremath-}
 
 % @dots{} outputs an ellipsis using the current font.
 % We do .5em per period so that it has the same spacing in the cm
@@ -3018,7 +3488,7 @@ end
 %
 \newbox\errorbox
 %
-{\tentt \global\dimen0 = 3em}% Width of the box.
+{\ttfont \global\dimen0 = 3em}% Width of the box.
 \dimen2 = .55pt % Thickness of rules
 % The text. (`r' is open on the right, `e' somewhat less so on the left.)
 \setbox0 = \hbox{\kern-.75pt \reducedsf \putworderror\kern-1.5pt}
@@ -3134,20 +3604,32 @@ end
 \def\Eogonek{{\ecfont \char"86}}\def\macrocharE{E}
 \def\eogonek{{\ecfont \char"A6}}\def\macrochare{e}
 %
-% Use the ec* fonts (cm-super in outline format) for non-CM glyphs.
-\def\ecfont{%
+% Use the European Computer Modern fonts (cm-super in outline format)
+% for non-CM glyphs.  That is ec* for regular text and tc* for the text
+% companion symbols (LaTeX TS1 encoding).  Both are part of the ec
+% package and follow the same conventions.
+% 
+\def\ecfont{\etcfont{e}}
+\def\tcfont{\etcfont{t}}
+%
+\def\etcfont#1{%
   % We can't distinguish serif/sans and italic/slanted, but this
   % is used for crude hacks anyway (like adding French and German
   % quotes to documents typeset with CM, where we lose kerning), so
   % hopefully nobody will notice/care.
   \edef\ecsize{\csname\curfontsize ecsize\endcsname}%
-  \edef\nominalsize{\csname\curfontsize nominalsize\endcsname}%
-  \ifx\curfontstyle\bfstylename
-    % bold:
-    \font\thisecfont = ecb\ifusingit{i}{x}\ecsize \space at \nominalsize
+  \edef\nominalsize{\csname\curfontsize nominalsize\endcsname}%
+  \ifmonospace
+    % typewriter:
+    \font\thisecfont = #1ctt\ecsize \space at \nominalsize
   \else
-    % regular:
-    \font\thisecfont = ec\ifusingit{ti}{rm}\ecsize \space at \nominalsize
+    \ifx\curfontstyle\bfstylename
+      % bold:
+      \font\thisecfont = #1cb\ifusingit{i}{x}\ecsize \space at \nominalsize
+    \else
+      % regular:
+      \font\thisecfont = #1c\ifusingit{ti}{rm}\ecsize \space at \nominalsize
+    \fi
   \fi
   \thisecfont
 }
@@ -3157,7 +3639,7 @@ end
 % Adapted from the plain.tex definition of \copyright.
 %
 \def\registeredsymbol{%
-  $^{{\ooalign{\hfil\raise.07ex\hbox{\selectfonts\lllsize R}%
+  $^{{\ooalign{\hfil\raise.07ex\hbox{\switchtolllsize R}%
                \hfil\crcr\Orb}}%
     }$%
 }
@@ -3190,13 +3672,16 @@ end
 \newif\ifseenauthor
 \newif\iffinishedtitlepage
 
-% Do an implicit @contents or @shortcontents after @end titlepage if the
-% user says @setcontentsaftertitlepage or @setshortcontentsaftertitlepage.
-%
-\newif\ifsetcontentsaftertitlepage
- \let\setcontentsaftertitlepage = \setcontentsaftertitlepagetrue
-\newif\ifsetshortcontentsaftertitlepage
- \let\setshortcontentsaftertitlepage = \setshortcontentsaftertitlepagetrue
+% @setcontentsaftertitlepage used to do an implicit @contents or
+% @shortcontents after @end titlepage, but it is now obsolete.
+\def\setcontentsaftertitlepage{%
+  \errmessage{@setcontentsaftertitlepage has been removed as a Texinfo
+              command; move your @contents command if you want the contents
+              after the title page.}}%
+\def\setshortcontentsaftertitlepage{%
+  \errmessage{@setshortcontentsaftertitlepage has been removed as a Texinfo
+              command; move your @shortcontents and @contents commands if you 
+              want the contents after the title page.}}%
 
 \parseargdef\shorttitlepage{%
   \begingroup \hbox{}\vskip 1.5in \chaprm \centerline{#1}%
@@ -3238,20 +3723,6 @@ end
   % Need this before the \...aftertitlepage checks so that if they are
   % in effect the toc pages will come out with page numbers.
   \HEADINGSon
-  %
-  % If they want short, they certainly want long too.
-  \ifsetshortcontentsaftertitlepage
-    \shortcontents
-    \contents
-    \global\let\shortcontents = \relax
-    \global\let\contents = \relax
-  \fi
-  %
-  \ifsetcontentsaftertitlepage
-    \contents
-    \global\let\contents = \relax
-    \global\let\shortcontents = \relax
-  \fi
 }
 
 \def\finishtitlepage{%
@@ -3260,14 +3731,27 @@ end
   \finishedtitlepagetrue
 }
 
+% Settings used for typesetting titles: no hyphenation, no indentation,
+% don't worry much about spacing, ragged right.  This should be used
+% inside a \vbox, and fonts need to be set appropriately first. \par should
+% be specified before the end of the \vbox, since a vbox is a group.
+% 
+\def\raggedtitlesettings{%
+  \rm
+  \hyphenpenalty=10000
+  \parindent=0pt
+  \tolerance=5000
+  \ptexraggedright
+}
+
 % Macros to be used within @titlepage:
 
-\let\subtitlerm=\tenrm
+\let\subtitlerm=\rmfont
 \def\subtitlefont{\subtitlerm \normalbaselineskip = 13pt \normalbaselines}
 
 \parseargdef\title{%
   \checkenv\titlepage
-  \leftline{\titlefonts\rmisbold #1}
+  \vbox{\titlefonts \raggedtitlesettings #1\par}%
   % print a rule at the page bottom also.
   \finishedtitlepagefalse
   \vskip4pt \hrule height 4pt width \hsize \vskip4pt
@@ -3288,7 +3772,7 @@ end
   \else
     \checkenv\titlepage
     \ifseenauthor\else \vskip 0pt plus 1filll \seenauthortrue \fi
-    {\secfonts\rmisbold \leftline{#1}}%
+    {\secfonts\rm \leftline{#1}}%
   \fi
 }
 
@@ -3302,7 +3786,7 @@ end
 \newtoks\evenfootline    % footline on even pages
 \newtoks\oddfootline     % footline on odd pages
 
-% Now make TeX use those variables
+% Now make \makeheadline and \makefootline in Plain TeX use those variables
 \headline={{\textfonts\rm \ifodd\pageno \the\oddheadline
                             \else \the\evenheadline \fi}}
 \footline={{\textfonts\rm \ifodd\pageno \the\oddfootline
@@ -3341,7 +3825,7 @@ end
   %
   % Leave some space for the footline.  Hopefully ok to assume
   % @evenfooting will not be used by itself.
-  \global\advance\pageheight by -12pt
+  \global\advance\txipageheight by -12pt
   \global\advance\vsize by -12pt
 }
 
@@ -3358,13 +3842,17 @@ end
 % @everyheadingmarks
 % @everyfootingmarks
 
+% These define \getoddheadingmarks, \getevenheadingmarks,
+% \getoddfootingmarks, and \getevenfootingmarks, each to one of
+% \gettopheadingmarks, \getbottomheadingmarks.
+%
 \def\evenheadingmarks{\headingmarks{even}{heading}}
 \def\oddheadingmarks{\headingmarks{odd}{heading}}
 \def\evenfootingmarks{\headingmarks{even}{footing}}
 \def\oddfootingmarks{\headingmarks{odd}{footing}}
-\def\everyheadingmarks#1 {\headingmarks{even}{heading}{#1}
+\parseargdef\everyheadingmarks{\headingmarks{even}{heading}{#1}
                           \headingmarks{odd}{heading}{#1} }
-\def\everyfootingmarks#1 {\headingmarks{even}{footing}{#1}
+\parseargdef\everyfootingmarks{\headingmarks{even}{footing}{#1}
                           \headingmarks{odd}{footing}{#1} }
 % #1 = even/odd, #2 = heading/footing, #3 = top/bottom.
 \def\headingmarks#1#2#3 {%
@@ -3385,7 +3873,7 @@ end
 % By default, they are off at the start of a document,
 % and turned `on' after @end titlepage.
 
-\def\headings #1 {\csname HEADINGS#1\endcsname}
+\parseargdef\headings{\csname HEADINGS#1\endcsname}
 
 \def\headingsoff{% non-global headings elimination
   \evenheadline={\hfil}\evenfootline={\hfil}%
@@ -3405,7 +3893,7 @@ end
 \global\evenfootline={\hfil}
 \global\oddfootline={\hfil}
 \global\evenheadline={\line{\folio\hfil\thistitle}}
-\global\oddheadline={\line{\thischapter\hfil\folio}}
+\global\oddheadline={\line{\thischapterheading\hfil\folio}}
 \global\let\contentsalignmacro = \chapoddpage
 }
 \let\contentsalignmacro = \chappager
@@ -3416,8 +3904,8 @@ end
 \global\pageno=1
 \global\evenfootline={\hfil}
 \global\oddfootline={\hfil}
-\global\evenheadline={\line{\thischapter\hfil\folio}}
-\global\oddheadline={\line{\thischapter\hfil\folio}}
+\global\evenheadline={\line{\thischapterheading\hfil\folio}}
+\global\oddheadline={\line{\thischapterheading\hfil\folio}}
 \global\let\contentsalignmacro = \chappager
 }
 \def\HEADINGSon{\HEADINGSdouble}
@@ -3428,7 +3916,7 @@ end
 \global\evenfootline={\hfil}
 \global\oddfootline={\hfil}
 \global\evenheadline={\line{\folio\hfil\thistitle}}
-\global\oddheadline={\line{\thischapter\hfil\folio}}
+\global\oddheadline={\line{\thischapterheading\hfil\folio}}
 \global\let\contentsalignmacro = \chapoddpage
 }
 
@@ -3436,8 +3924,8 @@ end
 \def\HEADINGSsinglex{%
 \global\evenfootline={\hfil}
 \global\oddfootline={\hfil}
-\global\evenheadline={\line{\thischapter\hfil\folio}}
-\global\oddheadline={\line{\thischapter\hfil\folio}}
+\global\evenheadline={\line{\thischapterheading\hfil\folio}}
+\global\oddheadline={\line{\thischapterheading\hfil\folio}}
 \global\let\contentsalignmacro = \chappager
 }
 
@@ -3615,7 +4103,7 @@ end
   \parskip=\smallskipamount
   \ifdim\parskip=0pt \parskip=2pt \fi
   %
-  % Try typesetting the item mark that if the document erroneously says
+  % Try typesetting the item mark so that if the document erroneously says
   % something like @itemize @samp (intending @table), there's an error
   % right away at the @itemize.  It's not the best error message in the
   % world, but it's better than leaving it to the @item.  This means if
@@ -3647,7 +4135,12 @@ end
    \noindent
    \hbox to 0pt{\hss \itemcontents \kern\itemmargin}%
    %
-   \vadjust{\penalty 1200}}% not good to break after first line of item.
+   \ifinner\else
+     \vadjust{\penalty 1200}% not good to break after first line of item.
+   \fi
+   % We can be in inner vertical mode in a footnote, although an
+   % @itemize looks awful there.
+  }%
   \flushcr
 }
 
@@ -3865,19 +4358,23 @@ end
 }
 
 % multitable-only commands.
-%
-% @headitem starts a heading row, which we typeset in bold.
-% Assignments have to be global since we are inside the implicit group
-% of an alignment entry.  \everycr resets \everytab so we don't have to
+% 
+% @headitem starts a heading row, which we typeset in bold.  Assignments
+% have to be global since we are inside the implicit group of an
+% alignment entry.  \everycr below resets \everytab so we don't have to
 % undo it ourselves.
 \def\headitemfont{\b}% for people to use in the template row; not changeable
 \def\headitem{%
   \checkenv\multitable
   \crcr
+  \gdef\headitemcrhook{\nobreak}% attempt to avoid page break after headings
   \global\everytab={\bf}% can't use \headitemfont since the parsing differs
   \the\everytab % for the first item
 }%
 %
+% default for tables with no headings.
+\let\headitemcrhook=\relax
+%
 % A \tab used to include \hskip1sp.  But then the space in a template
 % line is not enough.  That is bad.  So let's go back to just `&' until
 % we again encounter the problem the 1sp was intended to solve.
@@ -3908,15 +4405,15 @@ end
   %
   \everycr = {%
     \noalign{%
-      \global\everytab={}%
+      \global\everytab={}% Reset from possible headitem.
       \global\colcount=0 % Reset the column counter.
-      % Check for saved footnotes, etc.
+      %
+      % Check for saved footnotes, etc.:
       \checkinserts
-      % Keeps underfull box messages off when table breaks over pages.
-      %\filbreak
-       % Maybe so, but it also creates really weird page breaks when the
-       % table breaks over pages. Wouldn't \vfil be better?  Wait until the
-       % problem manifests itself, so it can be fixed for real --karl.
+      %
+      % Perhaps a \nobreak, then reset:
+      \headitemcrhook
+      \global\let\headitemcrhook=\relax
     }%
   }%
   %
@@ -4155,7 +4652,7 @@ end
 \def\value{\begingroup\makevalueexpandable\valuexxx}
 \def\valuexxx#1{\expandablevalue{#1}\endgroup}
 {
-  \catcode`\- = \active \catcode`\_ = \active
+  \catcode`\-=\active \catcode`\_=\active
   %
   \gdef\makevalueexpandable{%
     \let\value = \expandablevalue
@@ -4164,7 +4661,7 @@ end
     % ..., but we might end up with active ones in the argument if
     % we're called from @code, as @code{@value{foo-bar_}}, though.
     % So \let them to their normal equivalents.
-    \let-\realdash \let_\normalunderscore
+    \let-\normaldash \let_\normalunderscore
   }
 }
 
@@ -4175,7 +4672,12 @@ end
 % variable's value contains other Texinfo commands, it's almost certain
 % it will fail (although perhaps we could fix that with sufficient work
 % to do a one-level expansion on the result, instead of complete).
-%
+% 
+% Unfortunately, this has the consequence that when _ is in the *value*
+% of an @set, it does not print properly in the roman fonts (get the cmr
+% dot accent at position 126 instead).  No fix comes to mind, and it's
+% been this way since 2003 or earlier, so just ignore it.
+% 
 \def\expandablevalue#1{%
   \expandafter\ifx\csname SET#1\endcsname\relax
     {[No value for ``#1'']}%
@@ -4185,10 +4687,36 @@ end
   \fi
 }
 
+% Like \expandablevalue, but completely expandable (the \message in the
+% definition above operates at the execution level of TeX).  Used when
+% writing to auxiliary files, due to the expansion that \write does.
+% If flag is undefined, pass through an unexpanded @value command: maybe it 
+% will be set by the time it is read back in.
+%
+% NB flag names containing - or _ may not work here.
+\def\dummyvalue#1{%
+  \expandafter\ifx\csname SET#1\endcsname\relax
+    \noexpand\value{#1}%
+  \else
+    \csname SET#1\endcsname
+  \fi
+}
+
+% Used for @value's in index entries to form the sort key: expand the @value
+% if possible, otherwise sort late.
+\def\indexnofontsvalue#1{%
+  \expandafter\ifx\csname SET#1\endcsname\relax
+    ZZZZZZZ
+  \else
+    \csname SET#1\endcsname
+  \fi
+}
+
 % @ifset VAR ... @end ifset reads the `...' iff VAR has been defined
 % with @set.
-%
-% To get special treatment of `@end ifset,' call \makeond and the redefine.
+% 
+% To get the special treatment we need for `@end ifset,' we call
+% \makecond and then redefine.
 %
 \makecond{ifset}
 \def\ifset{\parsearg{\doifset{\let\next=\ifsetfail}}}
@@ -4204,7 +4732,7 @@ end
 }
 \def\ifsetfail{\doignore{ifset}}
 
-% @ifclear VAR ... @end ifclear reads the `...' iff VAR has never been
+% @ifclear VAR ... @end executes the `...' iff VAR has never been
 % defined with @set, or has been undefined with @clear.
 %
 % The `\else' inside the `\doifset' parameter is a trick to reuse the
@@ -4215,6 +4743,35 @@ end
 \def\ifclear{\parsearg{\doifset{\else \let\next=\ifclearfail}}}
 \def\ifclearfail{\doignore{ifclear}}
 
+% @ifcommandisdefined CMD ... @end executes the `...' if CMD (written
+% without the @) is in fact defined.  We can only feasibly check at the
+% TeX level, so something like `mathcode' is going to considered
+% defined even though it is not a Texinfo command.
+% 
+\makecond{ifcommanddefined}
+\def\ifcommanddefined{\parsearg{\doifcmddefined{\let\next=\ifcmddefinedfail}}}
+%
+\def\doifcmddefined#1#2{{%
+    \makevalueexpandable
+    \let\next=\empty
+    \expandafter\ifx\csname #2\endcsname\relax
+      #1% If not defined, \let\next as above.
+    \fi
+    \expandafter
+  }\next
+}
+\def\ifcmddefinedfail{\doignore{ifcommanddefined}}
+
+% @ifcommandnotdefined CMD ... handled similar to @ifclear above.
+\makecond{ifcommandnotdefined}
+\def\ifcommandnotdefined{%
+  \parsearg{\doifcmddefined{\else \let\next=\ifcmdnotdefinedfail}}}
+\def\ifcmdnotdefinedfail{\doignore{ifcommandnotdefined}}
+
+% Set the `txicommandconditionals' variable, so documents have a way to
+% test if the @ifcommand...defined conditionals are available.
+\set txicommandconditionals
+
 % @dircategory CATEGORY  -- specify a category of the dir file
 % which this file should belong to.  Ignore this in TeX.
 \let\dircategory=\comment
@@ -4230,19 +4787,16 @@ end
 % except not \outer, so it can be used within macros and \if's.
 \edef\newwrite{\makecsname{ptexnewwrite}}
 
-% \newindex {foo} defines an index named foo.
-% It automatically defines \fooindex such that
-% \fooindex ...rest of line... puts an entry in the index foo.
-% It also defines \fooindfile to be the number of the output channel for
-% the file that accumulates this index.  The file's extension is foo.
+% \newindex {foo} defines an index named IX.
+% It automatically defines \IXindex such that
+% \IXindex ...rest of line... puts an entry in the index IX.
+% It also defines \IXindfile to be the number of the output channel for
+% the file that accumulates this index.  The file's extension is IX.
 % The name of an index should be no more than 2 characters long
 % for the sake of vms.
 %
 \def\newindex#1{%
-  \iflinks
-    \expandafter\newwrite \csname#1indfile\endcsname
-    \openout \csname#1indfile\endcsname \jobname.#1 % Open the file
-  \fi
+  \expandafter\chardef\csname#1indfile\endcsname=0
   \expandafter\xdef\csname#1index\endcsname{%     % Define @#1index
     \noexpand\doindex{#1}}
 }
@@ -4256,14 +4810,19 @@ end
 \def\defcodeindex{\parsearg\newcodeindex}
 %
 \def\newcodeindex#1{%
-  \iflinks
-    \expandafter\newwrite \csname#1indfile\endcsname
-    \openout \csname#1indfile\endcsname \jobname.#1
-  \fi
+  \expandafter\chardef\csname#1indfile\endcsname=0
   \expandafter\xdef\csname#1index\endcsname{%
     \noexpand\docodeindex{#1}}%
 }
 
+% The default indices:
+\newindex{cp}%      concepts,
+\newcodeindex{fn}%  functions,
+\newcodeindex{vr}%  variables,
+\newcodeindex{tp}%  types,
+\newcodeindex{ky}%  keys
+\newcodeindex{pg}%  and programs.
+
 
 % @synindex foo bar    makes index foo feed into index bar.
 % Do this instead of @defindex foo if you don't want it as a separate index.
@@ -4277,14 +4836,7 @@ end
 % #1 is \doindex or \docodeindex, #2 the index getting redefined (foo),
 % #3 the target index (bar).
 \def\dosynindex#1#2#3{%
-  % Only do \closeout if we haven't already done it, else we'll end up
-  % closing the target index.
-  \expandafter \ifx\csname donesynindex#2\endcsname \relax
-    % The \closeout helps reduce unnecessary open files; the limit on the
-    % Acorn RISC OS is a mere 16 files.
-    \expandafter\closeout\csname#2indfile\endcsname
-    \expandafter\let\csname donesynindex#2\endcsname = 1
-  \fi
+  \requireopenindexfile{#3}%
   % redefine \fooindfile:
   \expandafter\let\expandafter\temp\expandafter=\csname#3indfile\endcsname
   \expandafter\let\csname#2indfile\endcsname=\temp
@@ -4292,108 +4844,72 @@ end
   \expandafter\xdef\csname#2index\endcsname{\noexpand#1{#3}}%
 }
 
-% Define \doindex, the driver for all \fooindex macros.
+% Define \doindex, the driver for all index macros.
 % Argument #1 is generated by the calling \fooindex macro,
-%  and it is "foo", the name of the index.
+% and it is the two-letter name of the index.
 
-% \doindex just uses \parsearg; it calls \doind for the actual work.
-% This is because \doind is more useful to call from other macros.
-
-% There is also \dosubind {index}{topic}{subtopic}
-% which makes an entry in a two-level index such as the operation index.
-
-\def\doindex#1{\edef\indexname{#1}\parsearg\singleindexer}
-\def\singleindexer #1{\doind{\indexname}{#1}}
+\def\doindex#1{\edef\indexname{#1}\parsearg\doindexxxx}
+\def\doindexxxx #1{\doind{\indexname}{#1}}
 
 % like the previous two, but they put @code around the argument.
-\def\docodeindex#1{\edef\indexname{#1}\parsearg\singlecodeindexer}
-\def\singlecodeindexer #1{\doind{\indexname}{\code{#1}}}
+\def\docodeindex#1{\edef\indexname{#1}\parsearg\docodeindexxxx}
+\def\docodeindexxxx #1{\doind{\indexname}{\code{#1}}}
 
-% Take care of Texinfo commands that can appear in an index entry.
-% Since there are some commands we want to expand, and others we don't,
-% we have to laboriously prevent expansion for those that we don't.
+\f
+% Used when writing an index entry out to an index file to prevent
+% expansion of Texinfo commands that can appear in an index entry.
 %
 \def\indexdummies{%
   \escapechar = `\\     % use backslash in output files.
-  \def\@{@}% change to @@ when we switch to @ as escape char in index files.
-  \def\ {\realbackslash\space }%
-  %
-  % Need these unexpandable (because we define \tt as a dummy)
-  % definitions when @{ or @} appear in index entry text.  Also, more
-  % complicated, when \tex is in effect and \{ is a \delimiter again.
-  % We can't use \lbracecmd and \rbracecmd because texindex assumes
-  % braces and backslashes are used only as delimiters.  Perhaps we
-  % should define @lbrace and @rbrace commands a la @comma.
-  \def\{{{\tt\char123}}%
-  \def\}{{\tt\char125}}%
-  %
-  % I don't entirely understand this, but when an index entry is
-  % generated from a macro call, the \endinput which \scanmacro inserts
-  % causes processing to be prematurely terminated.  This is,
-  % apparently, because \indexsorttmp is fully expanded, and \endinput
-  % is an expandable command.  The redefinition below makes \endinput
-  % disappear altogether for that purpose -- although logging shows that
-  % processing continues to some further point.  On the other hand, it
-  % seems \endinput does not hurt in the printed index arg, since that
-  % is still getting written without apparent harm.
-  %
-  % Sample source (mac-idx3.tex, reported by Graham Percival to
-  % help-texinfo, 22may06):
-  % @macro funindex {WORD}
-  % @findex xyz
-  % @end macro
-  % ...
-  % @funindex commtest
-  %
-  % The above is not enough to reproduce the bug, but it gives the flavor.
-  %
-  % Sample whatsit resulting:
-  % .@write3{\entry{xyz}{@folio }{@code {xyz@endinput }}}
-  %
-  % So:
-  \let\endinput = \empty
+  \definedummyletter\@%
+  \definedummyletter\ %
+  %
+  % For texindex which always views { and } as separators.
+  \def\{{\lbracechar{}}%
+  \def\}{\rbracechar{}}%
   %
   % Do the redefinitions.
-  \commondummies
+  \definedummies
 }
 
-% For the aux and toc files, @ is the escape character.  So we want to
-% redefine everything using @ as the escape character (instead of
-% \realbackslash, still used for index files).  When everything uses @,
-% this will be simpler.
+% Used for the aux and toc files, where @ is the escape character.
 %
 \def\atdummies{%
-  \def\@{@@}%
-  \def\ {@ }%
-  \let\{ = \lbraceatcmd
-  \let\} = \rbraceatcmd
+  \definedummyletter\@%
+  \definedummyletter\ %
+  \definedummyletter\{%
+  \definedummyletter\}%
   %
   % Do the redefinitions.
-  \commondummies
+  \definedummies
   \otherbackslash
 }
 
-% Called from \indexdummies and \atdummies.
+% \definedummyword defines \#1 as \string\#1\space, thus effectively
+% preventing its expansion.  This is used only for control words,
+% not control letters, because the \space would be incorrect for
+% control characters, but is needed to separate the control word
+% from whatever follows.
 %
-\def\commondummies{%
-  %
-  % \definedummyword defines \#1 as \string\#1\space, thus effectively
-  % preventing its expansion.  This is used only for control words,
-  % not control letters, because the \space would be incorrect for
-  % control characters, but is needed to separate the control word
-  % from whatever follows.
-  %
-  % For control letters, we have \definedummyletter, which omits the
-  % space.
-  %
-  % These can be used both for control words that take an argument and
-  % those that do not.  If it is followed by {arg} in the input, then
-  % that will dutifully get written to the index (or wherever).
-  %
-  \def\definedummyword  ##1{\def##1{\string##1\space}}%
-  \def\definedummyletter##1{\def##1{\string##1}}%
-  \let\definedummyaccent\definedummyletter
+% These can be used both for control words that take an argument and
+% those that do not.  If it is followed by {arg} in the input, then
+% that will dutifully get written to the index (or wherever).
+%
+% For control letters, we have \definedummyletter, which omits the
+% space.
+%
+\def\definedummyword  #1{\def#1{\string#1\space}}%
+\def\definedummyletter#1{\def#1{\string#1}}%
+\let\definedummyaccent\definedummyletter
+
+% Called from \indexdummies and \atdummies, to effectively prevent
+% the expansion of commands.
+%
+\def\definedummies{%
   %
+  \let\commondummyword\definedummyword
+  \let\commondummyletter\definedummyletter
+  \let\commondummyaccent\definedummyaccent
   \commondummiesnofonts
   %
   \definedummyletter\_%
@@ -4434,6 +4950,7 @@ end
   \definedummyword\TeX
   %
   % Assorted special characters.
+  \definedummyword\atchar
   \definedummyword\arrow
   \definedummyword\bullet
   \definedummyword\comma
@@ -4453,6 +4970,7 @@ end
   \definedummyword\guilsinglright
   \definedummyword\lbracechar
   \definedummyword\leq
+  \definedummyword\mathopsup
   \definedummyword\minus
   \definedummyword\ogonek
   \definedummyword\pounds
@@ -4466,88 +4984,136 @@ end
   \definedummyword\quotesinglbase
   \definedummyword\rbracechar
   \definedummyword\result
+  \definedummyword\sub
+  \definedummyword\sup
   \definedummyword\textdegree
   %
   % We want to disable all macros so that they are not expanded by \write.
   \macrolist
+  \let\value\dummyvalue
   %
   \normalturnoffactive
-  %
-  % Handle some cases of @value -- where it does not contain any
-  % (non-fully-expandable) commands.
-  \makevalueexpandable
 }
 
-% \commondummiesnofonts: common to \commondummies and \indexnofonts.
+% \commondummiesnofonts: common to \definedummies and \indexnofonts.
+% Define \commondummyletter, \commondummyaccent and \commondummyword before
+% using.  Used for accents, font commands, and various control letters.
 %
 \def\commondummiesnofonts{%
   % Control letters and accents.
-  \definedummyletter\!%
-  \definedummyaccent\"%
-  \definedummyaccent\'%
-  \definedummyletter\*%
-  \definedummyaccent\,%
-  \definedummyletter\.%
-  \definedummyletter\/%
-  \definedummyletter\:%
-  \definedummyaccent\=%
-  \definedummyletter\?%
-  \definedummyaccent\^%
-  \definedummyaccent\`%
-  \definedummyaccent\~%
-  \definedummyword\u
-  \definedummyword\v
-  \definedummyword\H
-  \definedummyword\dotaccent
-  \definedummyword\ogonek
-  \definedummyword\ringaccent
-  \definedummyword\tieaccent
-  \definedummyword\ubaraccent
-  \definedummyword\udotaccent
-  \definedummyword\dotless
+  \commondummyletter\!%
+  \commondummyaccent\"%
+  \commondummyaccent\'%
+  \commondummyletter\*%
+  \commondummyaccent\,%
+  \commondummyletter\.%
+  \commondummyletter\/%
+  \commondummyletter\:%
+  \commondummyaccent\=%
+  \commondummyletter\?%
+  \commondummyaccent\^%
+  \commondummyaccent\`%
+  \commondummyaccent\~%
+  \commondummyword\u
+  \commondummyword\v
+  \commondummyword\H
+  \commondummyword\dotaccent
+  \commondummyword\ogonek
+  \commondummyword\ringaccent
+  \commondummyword\tieaccent
+  \commondummyword\ubaraccent
+  \commondummyword\udotaccent
+  \commondummyword\dotless
   %
   % Texinfo font commands.
-  \definedummyword\b
-  \definedummyword\i
-  \definedummyword\r
-  \definedummyword\sansserif
-  \definedummyword\sc
-  \definedummyword\slanted
-  \definedummyword\t
+  \commondummyword\b
+  \commondummyword\i
+  \commondummyword\r
+  \commondummyword\sansserif
+  \commondummyword\sc
+  \commondummyword\slanted
+  \commondummyword\t
   %
   % Commands that take arguments.
-  \definedummyword\abbr
-  \definedummyword\acronym
-  \definedummyword\anchor
-  \definedummyword\cite
-  \definedummyword\code
-  \definedummyword\command
-  \definedummyword\dfn
-  \definedummyword\dmn
-  \definedummyword\email
-  \definedummyword\emph
-  \definedummyword\env
-  \definedummyword\file
-  \definedummyword\image
-  \definedummyword\indicateurl
-  \definedummyword\inforef
-  \definedummyword\kbd
-  \definedummyword\key
-  \definedummyword\math
-  \definedummyword\option
-  \definedummyword\pxref
-  \definedummyword\ref
-  \definedummyword\samp
-  \definedummyword\strong
-  \definedummyword\tie
-  \definedummyword\uref
-  \definedummyword\url
-  \definedummyword\var
-  \definedummyword\verb
-  \definedummyword\w
-  \definedummyword\xref
+  \commondummyword\abbr
+  \commondummyword\acronym
+  \commondummyword\anchor
+  \commondummyword\cite
+  \commondummyword\code
+  \commondummyword\command
+  \commondummyword\dfn
+  \commondummyword\dmn
+  \commondummyword\email
+  \commondummyword\emph
+  \commondummyword\env
+  \commondummyword\file
+  \commondummyword\image
+  \commondummyword\indicateurl
+  \commondummyword\inforef
+  \commondummyword\kbd
+  \commondummyword\key
+  \commondummyword\math
+  \commondummyword\option
+  \commondummyword\pxref
+  \commondummyword\ref
+  \commondummyword\samp
+  \commondummyword\strong
+  \commondummyword\tie
+  \commondummyword\U
+  \commondummyword\uref
+  \commondummyword\url
+  \commondummyword\var
+  \commondummyword\verb
+  \commondummyword\w
+  \commondummyword\xref
+}
+
+% For testing: output @{ and @} in index sort strings as \{ and \}.
+\newif\ifusebracesinindexes
+
+\let\indexlbrace\relax
+\let\indexrbrace\relax
+
+{\catcode`\@=0
+\catcode`\\=13
+  @gdef@backslashdisappear{@def\{}}
+}
+
+{
+\catcode`\<=13
+\catcode`\-=13
+\catcode`\`=13
+  \gdef\indexnonalnumdisappear{%
+    \expandafter\ifx\csname SETtxiindexlquoteignore\endcsname\relax\else
+      % @set txiindexlquoteignore makes us ignore left quotes in the sort term.
+      % (Introduced for FSFS 2nd ed.)
+      \let`=\empty
+    \fi
+    %
+    \expandafter\ifx\csname SETtxiindexbackslashignore\endcsname\relax\else
+      \backslashdisappear
+    \fi
+    %
+    \expandafter\ifx\csname SETtxiindexhyphenignore\endcsname\relax\else
+      \def-{}%
+    \fi
+    \expandafter\ifx\csname SETtxiindexlessthanignore\endcsname\relax\else
+      \def<{}%
+    \fi
+    \expandafter\ifx\csname SETtxiindexatsignignore\endcsname\relax\else
+      \def\@{}%
+    \fi
+  }
+
+  \gdef\indexnonalnumreappear{%
+    \useindexbackslash
+    \let-\normaldash
+    \let<\normalless
+    \def\@{@}%
+  }
 }
 
+
 % \indexnofonts is used when outputting the strings to sort the index
 % by, and when constructing control sequence names.  It eliminates all
 % control sequences and just writes whatever the best ASCII sort string
@@ -4555,12 +5121,11 @@ end
 %
 \def\indexnofonts{%
   % Accent commands should become @asis.
-  \def\definedummyaccent##1{\let##1\asis}%
+  \def\commondummyaccent##1{\let##1\asis}%
   % We can just ignore other control letters.
-  \def\definedummyletter##1{\let##1\empty}%
+  \def\commondummyletter##1{\let##1\empty}%
   % All control words become @asis by default; overrides below.
-  \let\definedummyword\definedummyaccent
-  %
+  \let\commondummyword\commondummyaccent
   \commondummiesnofonts
   %
   % Don't no-op \tt, since it isn't a user-level command
@@ -4573,14 +5138,10 @@ end
   \def\_{\normalunderscore}%
   \def\-{}% @- shouldn't affect sorting
   %
-  % Unfortunately, texindex is not prepared to handle braces in the
-  % content at all.  So for index sorting, we map @{ and @} to strings
-  % starting with |, since that ASCII character is between ASCII { and }.
-  \def\{{|a}%
-  \def\lbracechar{|a}%
-  %
-  \def\}{|b}%
-  \def\rbracechar{|b}%
+  \uccode`\1=`\{ \uppercase{\def\{{1}}%
+  \uccode`\1=`\} \uppercase{\def\}{1}}%
+  \let\lbracechar\{%
+  \let\rbracechar\}%
   %
   % Non-English letters.
   \def\AA{AA}%
@@ -4589,7 +5150,7 @@ end
   \def\L{L}%
   \def\OE{OE}%
   \def\O{O}%
-  \def\TH{ZZZ}%
+  \def\TH{TH}%
   \def\aa{aa}%
   \def\ae{ae}%
   \def\dh{dzz}%
@@ -4601,45 +5162,45 @@ end
   \def\o{o}%
   \def\questiondown{?}%
   \def\ss{ss}%
-  \def\th{zzz}%
+  \def\th{th}%
   %
   \def\LaTeX{LaTeX}%
   \def\TeX{TeX}%
   %
-  % Assorted special characters.
-  % (The following {} will end up in the sort string, but that's ok.)
-  \def\arrow{->}%
-  \def\bullet{bullet}%
-  \def\comma{,}%
-  \def\copyright{copyright}%
-  \def\dots{...}%
-  \def\enddots{...}%
-  \def\equiv{==}%
-  \def\error{error}%
-  \def\euro{euro}%
-  \def\expansion{==>}%
-  \def\geq{>=}%
-  \def\guillemetleft{<<}%
-  \def\guillemetright{>>}%
-  \def\guilsinglleft{<}%
-  \def\guilsinglright{>}%
-  \def\leq{<=}%
-  \def\minus{-}%
-  \def\point{.}%
-  \def\pounds{pounds}%
-  \def\print{-|}%
-  \def\quotedblbase{"}%
-  \def\quotedblleft{"}%
-  \def\quotedblright{"}%
-  \def\quoteleft{`}%
-  \def\quoteright{'}%
-  \def\quotesinglbase{,}%
-  \def\registeredsymbol{R}%
-  \def\result{=>}%
-  \def\textdegree{o}%
-  %
-  \expandafter\ifx\csname SETtxiindexlquoteignore\endcsname\relax
-  \else \indexlquoteignore \fi
+  % Assorted special characters.  \defglyph gives the control sequence a
+  % definition that removes the {} that follows its use.
+  \defglyph\atchar{@}%
+  \defglyph\arrow{->}%
+  \defglyph\bullet{bullet}%
+  \defglyph\comma{,}%
+  \defglyph\copyright{copyright}%
+  \defglyph\dots{...}%
+  \defglyph\enddots{...}%
+  \defglyph\equiv{==}%
+  \defglyph\error{error}%
+  \defglyph\euro{euro}%
+  \defglyph\expansion{==>}%
+  \defglyph\geq{>=}%
+  \defglyph\guillemetleft{<<}%
+  \defglyph\guillemetright{>>}%
+  \defglyph\guilsinglleft{<}%
+  \defglyph\guilsinglright{>}%
+  \defglyph\leq{<=}%
+  \defglyph\lbracechar{\{}%
+  \defglyph\minus{-}%
+  \defglyph\point{.}%
+  \defglyph\pounds{pounds}%
+  \defglyph\print{-|}%
+  \defglyph\quotedblbase{"}%
+  \defglyph\quotedblleft{"}%
+  \defglyph\quotedblright{"}%
+  \defglyph\quoteleft{`}%
+  \defglyph\quoteright{'}%
+  \defglyph\quotesinglbase{,}%
+  \defglyph\rbracechar{\}}%
+  \defglyph\registeredsymbol{R}%
+  \defglyph\result{=>}%
+  \defglyph\textdegree{o}%
   %
   % We need to get rid of all macros, leaving only the arguments (if present).
   % Of course this is not nearly correct, but it is the best we can do for now.
@@ -4652,21 +5213,24 @@ end
   % goes to end-of-line is not handled.
   %
   \macrolist
+  \let\value\indexnofontsvalue
 }
+\def\defglyph#1#2{\def#1##1{#2}} % see above
+
+\f
 
-% Undocumented (for FSFS 2nd ed.): @set txiindexlquoteignore makes us
-% ignore left quotes in the sort term.
-{\catcode`\`=\active
- \gdef\indexlquoteignore{\let`=\empty}}
 
-\let\indexbackslash=0  %overridden during \printindex.
 \let\SETmarginindex=\relax % put index entries in margin (undocumented)?
 
 % Most index entries go through here, but \dosubind is the general case.
 % #1 is the index name, #2 is the entry text.
 \def\doind#1#2{\dosubind{#1}{#2}{}}
 
-% Workhorse for all \fooindexes.
+% There is also \dosubind {index}{topic}{subtopic}
+% which makes an entry in a two-level index such as the operation index.
+% TODO: Two-level index?  Operation index?
+
+% Workhorse for all indexes.
 % #1 is name of index, #2 is stuff to put there, #3 is subentry --
 % empty if called from \doind, as we usually are (the main exception
 % is with most defuns, which call us directly).
@@ -4674,6 +5238,7 @@ end
 \def\dosubind#1#2#3{%
   \iflinks
   {%
+    \requireopenindexfile{#1}%
     % Store the main index entry text (including the third arg).
     \toks0 = {#2}%
     % If third arg is present, precede it with a space.
@@ -4689,7 +5254,50 @@ end
   \fi
 }
 
-% Write the entry in \toks0 to the index file:
+% Check if an index file has been opened, and if not, open it.
+\def\requireopenindexfile#1{%
+\ifnum\csname #1indfile\endcsname=0
+  \expandafter\newwrite \csname#1indfile\endcsname
+  \edef\suffix{#1}%
+  % A .fls suffix would conflict with the file extension for the output
+  % of -recorder, so use .f1s instead.
+  \ifx\suffix\indexisfl\def\suffix{f1}\fi
+  % Open the file
+  \immediate\openout\csname#1indfile\endcsname \jobname.\suffix
+  % Using \immediate above here prevents an object entering into the current 
+  % box, which could confound checks such as those in \safewhatsit for
+  % preceding skips.
+  \typeout{Writing index file \jobname.\suffix}%
+\fi}
+\def\indexisfl{fl}
+
+% Output \ as {\indexbackslash}, because \ is an escape character in
+% the index files.
+\let\indexbackslash=\relax
+{\catcode`\@=0 \catcode`\\=\active
+  @gdef@useindexbackslash{@def\{{@indexbackslash}}}
+}
+
+% Definition for writing index entry text.
+\def\sortas#1{\ignorespaces}%
+
+% Definition for writing index entry sort key.  Should occur at the at
+% the beginning of the index entry, like
+%     @cindex @sortas{september} \september
+% The \ignorespaces takes care of following space, but there's no way
+% to remove space before it.
+{
+\catcode`\-=13
+\gdef\indexwritesortas{%
+  \begingroup
+  \indexnonalnumreappear
+  \indexwritesortasxxx}
+\gdef\indexwritesortasxxx#1{%
+  \xdef\indexsortkey{#1}\endgroup}
+}
+
+
+% Write the entry in \toks0 to the index file.
 %
 \def\dosubindwrite{%
   % Put the index entry in the margin if desired.
@@ -4699,14 +5307,26 @@ end
   %
   % Remember, we are within a group.
   \indexdummies % Must do this here, since \bf, etc expand at this stage
-  \def\backslashcurfont{\indexbackslash}% \indexbackslash isn't defined now
-      % so it will be output as is; and it will print as backslash.
+  \useindexbackslash % \indexbackslash isn't defined now so it will be output 
+                     % as is; and it will print as backslash.
+  % The braces around \indexbrace are recognized by texindex.
   %
-  % Process the index entry with all font commands turned off, to
-  % get the string to sort by.
+  % Get the string to sort by, by processing the index entry with all
+  % font commands turned off.
   {\indexnofonts
-   \edef\temp{\the\toks0}% need full expansion
-   \xdef\indexsorttmp{\temp}%
+   \def\lbracechar{{\indexlbrace}}%
+   \def\rbracechar{{\indexrbrace}}%
+   \let\{=\lbracechar
+   \let\}=\rbracechar
+   \indexnonalnumdisappear
+   \xdef\indexsortkey{}%
+   \let\sortas=\indexwritesortas
+   \edef\temp{\the\toks0}%
+   \setbox\dummybox = \hbox{\temp}% Make sure to execute any \sortas
+   \ifx\indexsortkey\empty
+     \xdef\indexsortkey{\temp}%
+     \ifx\indexsortkey\empty\xdef\indexsortkey{ }\fi
+   \fi
   }%
   %
   % Set up the complete index entry, with both the sort key and
@@ -4716,10 +5336,11 @@ end
   % sorted result.
   \edef\temp{%
     \write\writeto{%
-      \string\entry{\indexsorttmp}{\noexpand\folio}{\the\toks0}}%
+      \string\entry{\indexsortkey}{\noexpand\folio}{\the\toks0}}%
   }%
   \temp
 }
+\newbox\dummybox % used above
 
 % Take care of unwanted page breaks/skips around a whatsit:
 %
@@ -4844,52 +5465,113 @@ end
   % \initial {@}
   % as its first line, TeX doesn't complain about mismatched braces
   % (because it thinks @} is a control sequence).
-  \catcode`\@ = 11
-  \openin 1 \jobname.#1s
+  \catcode`\@ = 12
+  % See comment in \requireopenindexfile.
+  \def\indexname{#1}\ifx\indexname\indexisfl\def\indexname{f1}\fi
+  \openin 1 \jobname.\indexname s
   \ifeof 1
     % \enddoublecolumns gets confused if there is no text in the index,
     % and it loses the chapter title and the aux file entries for the
     % index.  The easiest way to prevent this problem is to make sure
     % there is some text.
     \putwordIndexNonexistent
+    \typeout{No file \jobname.\indexname s.}%
   \else
+    \catcode`\\ = 0
     %
     % If the index file exists but is empty, then \openin leaves \ifeof
     % false.  We have to make TeX try to read something from the file, so
     % it can discover if there is anything in it.
-    \read 1 to \temp
+    \read 1 to \thisline
     \ifeof 1
       \putwordIndexIsEmpty
     \else
       % Index files are almost Texinfo source, but we use \ as the escape
       % character.  It would be better to use @, but that's too big a change
       % to make right now.
-      \def\indexbackslash{\backslashcurfont}%
-      \catcode`\\ = 0
-      \escapechar = `\\
+      \def\indexbackslash{\ttbackslash}%
+      \let\indexlbrace\{   % Likewise, set these sequences for braces
+      \let\indexrbrace\}   % used in the sort key.
       \begindoublecolumns
-      \input \jobname.#1s
+      \let\dotheinsertentrybox\dotheinsertentryboxwithpenalty
+      %
+      % Read input from the index file line by line.
+      \loopdo
+        \ifeof1 \else
+          \read 1 to \nextline
+        \fi
+        %
+        \indexinputprocessing
+        \thisline
+        %
+        \ifeof1\else
+        \let\thisline\nextline
+      \repeat
+      %%
       \enddoublecolumns
     \fi
   \fi
   \closein 1
 \endgroup}
+\def\loopdo#1\repeat{\def\body{#1}\loopdoxxx}
+\def\loopdoxxx{\let\next=\relax\body\let\next=\loopdoxxx\fi\next}
+
+\def\indexinputprocessing{%
+  \ifeof1
+    \let\firsttoken\relax
+  \else
+    \edef\act{\gdef\noexpand\firsttoken{\getfirsttoken\nextline}}%
+    \act
+  \fi
+}
+\def\getfirsttoken#1{\expandafter\getfirsttokenx#1\endfirsttoken}
+\long\def\getfirsttokenx#1#2\endfirsttoken{\noexpand#1}
+
 
 % These macros are used by the sorted index file itself.
 % Change them to control the appearance of the index.
 
-\def\initial#1{{%
-  % Some minor font changes for the special characters.
-  \let\tentt=\sectt \let\tt=\sectt \let\sf=\sectt
-  %
+{\catcode`\/=13 \catcode`\-=13 \catcode`\^=13 \catcode`\~=13 \catcode`\_=13
+\catcode`\|=13 \catcode`\<=13 \catcode`\>=13 \catcode`\+=13 \catcode`\"=13
+\catcode`\$=3
+\gdef\initialglyphs{%
+  % Some changes for non-alphabetic characters.  Using the glyphs from the
+  % math fonts looks more consistent than the typewriter font used elsewhere
+  % for these characters.
+  \def\indexbackslash{\math{\backslash}}%
+  \let\\=\indexbackslash
+  %
+  % Can't get bold backslash so don't use bold forward slash
+  \catcode`\/=13
+  \def/{{\secrmnotbold \normalslash}}%
+  \def-{{\normaldash\normaldash}}% en dash `--'
+  \def^{{\chapbf \normalcaret}}%
+  \def~{{\chapbf \normaltilde}}%
+  \def\_{%
+     \leavevmode \kern.07em \vbox{\hrule width.3em height.1ex}\kern .07em }%
+  \def|{$\vert$}%
+  \def<{$\less$}%
+  \def>{$\gtr$}%
+  \def+{$\normalplus$}%
+}}
+
+\def\initial{%
+  \bgroup
+  \initialglyphs
+  \initialx
+}
+
+\def\initialx#1{%
   % Remove any glue we may have, we'll be inserting our own.
   \removelastskip
   %
   % We like breaks before the index initials, so insert a bonus.
+  % The glue before the bonus allows a little bit of space at the
+  % bottom of a column to reduce an increase in inter-line spacing.
   \nobreak
-  \vskip 0pt plus 3\baselineskip
-  \penalty 0
-  \vskip 0pt plus -3\baselineskip
+  \vskip 0pt plus 5\baselineskip
+  \penalty -300 
+  \vskip 0pt plus -5\baselineskip
   %
   % Typeset the initial.  Making this add up to a whole number of
   % baselineskips increases the chance of the dots lining up from column
@@ -4897,63 +5579,45 @@ end
   % we need before each entry, but it's better.
   %
   % No shrink because it confuses \balancecolumns.
-  \vskip 1.67\baselineskip plus .5\baselineskip
-  \leftline{\secbf #1}%
+  \vskip 1.67\baselineskip plus 1\baselineskip
+  \leftline{\secfonts \kern-0.05em \secbf #1}%
+  % \secfonts is inside the argument of \leftline so that the change of
+  % \baselineskip will not affect any glue inserted before the vbox that
+  % \leftline creates.
   % Do our best not to break after the initial.
   \nobreak
   \vskip .33\baselineskip plus .1\baselineskip
-}}
+  \egroup % \initialglyphs
+}
+
+\newdimen\entryrightmargin
+\entryrightmargin=0pt
 
 % \entry typesets a paragraph consisting of the text (#1), dot leaders, and
 % then page number (#2) flushed to the right margin.  It is used for index
 % and table of contents entries.  The paragraph is indented by \leftskip.
 %
-% A straightforward implementation would start like this:
-%      \def\entry#1#2{...
-% But this freezes the catcodes in the argument, and can cause problems to
-% @code, which sets - active.  This problem was fixed by a kludge---
-% ``-'' was active throughout whole index, but this isn't really right.
-% The right solution is to prevent \entry from swallowing the whole text.
-%                                 --kasal, 21nov03
 \def\entry{%
   \begingroup
     %
+    % For pdfTeX and XeTeX.
+    % The redefinition of \domark stops marks being added in \pdflink to 
+    % preserve coloured links across page boundaries.  Otherwise the marks
+    % would get in the way of \lastbox in \insertentrybox.
+    \let\domark\relax
+    %
     % Start a new paragraph if necessary, so our assignments below can't
     % affect previous text.
     \par
     %
-    % Do not fill out the last line with white space.
-    \parfillskip = 0in
-    %
     % No extra space above this paragraph.
     \parskip = 0in
     %
-    % Do not prefer a separate line ending with a hyphen to fewer lines.
-    \finalhyphendemerits = 0
-    %
-    % \hangindent is only relevant when the entry text and page number
-    % don't both fit on one line.  In that case, bob suggests starting the
-    % dots pretty far over on the line.  Unfortunately, a large
-    % indentation looks wrong when the entry text itself is broken across
-    % lines.  So we use a small indentation and put up with long leaders.
-    %
-    % \hangafter is reset to 1 (which is the value we want) at the start
-    % of each paragraph, so we need not do anything with that.
-    \hangindent = 2em
-    %
-    % When the entry text needs to be broken, just fill out the first line
-    % with blank space.
-    \rightskip = 0pt plus1fil
-    %
-    % A bit of stretch before each entry for the benefit of balancing
-    % columns.
-    \vskip 0pt plus1pt
-    %
     % When reading the text of entry, convert explicit line breaks
     % from @* into spaces.  The user might give these in long section
     % titles, for instance.
     \def\*{\unskip\space\ignorespaces}%
-    \def\entrybreak{\hfil\break}%
+    \def\entrybreak{\hfil\break}% An undocumented command
     %
     % Swallow the left brace of the text (first parameter):
     \afterassignment\doentry
@@ -4961,45 +5625,164 @@ end
 }
 \def\entrybreak{\unskip\space\ignorespaces}%
 \def\doentry{%
+    % Save the text of the entry
+    \global\setbox\boxA=\hbox\bgroup
     \bgroup % Instead of the swallowed brace.
       \noindent
       \aftergroup\finishentry
       % And now comes the text of the entry.
+      % Not absorbing as a macro argument reduces the chance of problems
+      % with catcodes occurring.
 }
-\def\finishentry#1{%
+{\catcode`\@=11
+\gdef\finishentry#1{%
+    \egroup % end box A
+    \dimen@ = \wd\boxA % Length of text of entry
+    \global\setbox\boxA=\hbox\bgroup\unhbox\boxA
     % #1 is the page number.
     %
-    % The following is kludged to not output a line of dots in the index if
-    % there are no page numbers.  The next person who breaks this will be
-    % cursed by a Unix daemon.
-    \setbox\boxA = \hbox{#1}%
-    \ifdim\wd\boxA = 0pt
-      \ %
+    % Get the width of the page numbers, and only use
+    % leaders if they are present.
+    \global\setbox\boxB = \hbox{#1}%
+    \ifdim\wd\boxB = 0pt
+      \null\nobreak\hfill\ %
     \else
       %
-      % If we must, put the page number on a line of its own, and fill out
-      % this line with blank space.  (The \hfil is overwhelmed with the
-      % fill leaders glue in \indexdotfill if the page number does fit.)
-      \hfil\penalty50
       \null\nobreak\indexdotfill % Have leaders before the page number.
       %
-      % The `\ ' here is removed by the implicit \unskip that TeX does as
-      % part of (the primitive) \par.  Without it, a spurious underfull
-      % \hbox ensues.
       \ifpdf
-       \pdfgettoks#1.%
-       \ \the\toksA
+        \pdfgettoks#1.%
+        \hskip\skip\thinshrinkable\the\toksA
+      \else
+        \ifx\XeTeXrevision\thisisundefined
+          \hskip\skip\thinshrinkable #1%
+        \else
+          \pdfgettoks#1.%
+          \hskip\skip\thinshrinkable\the\toksA
+        \fi
+      \fi
+    \fi
+    \egroup % end \boxA
+    \ifdim\wd\boxB = 0pt
+      \global\setbox\entrybox=\vbox{\unhbox\boxA}%
+    \else
+    \global\setbox\entrybox=\vbox\bgroup
+      % We want the text of the entries to be aligned to the left, and the
+      % page numbers to be aligned to the right.
+      %
+      \parindent = 0pt
+      \advance\leftskip by 0pt plus 1fil
+      \advance\leftskip by 0pt plus -1fill
+      \rightskip = 0pt plus -1fil
+      \advance\rightskip by 0pt plus 1fill
+      % Cause last line, which could consist of page numbers on their own
+      % if the list of page numbers is long, to be aligned to the right.
+      \parfillskip=0pt plus -1fill
+      %
+      \advance\rightskip by \entryrightmargin
+      % Determine how far we can stretch into the margin.
+      % This allows, e.g., "Appendix H  GNU Free Documentation License" to
+      % fit on one line in @letterpaper format.
+      \ifdim\entryrightmargin>2.1em
+        \dimen@i=2.1em
       \else
-       \ #1%
+        \dimen@i=0em
       \fi
+      \advance \parfillskip by 0pt minus 1\dimen@i
+      %
+      \dimen@ii = \hsize
+      \advance\dimen@ii by -1\leftskip
+      \advance\dimen@ii by -1\entryrightmargin
+      \advance\dimen@ii by 1\dimen@i
+      \ifdim\wd\boxA > \dimen@ii % If the entry doesn't fit in one line
+      \ifdim\dimen@ > 0.8\dimen@ii   % due to long index text
+        \dimen@ = 0.7\dimen@ % Try to split the text roughly evenly
+        \dimen@ii = \hsize
+        \ifnum\dimen@>\dimen@ii
+          % If the entry is too long, use the whole line
+          \dimen@ = \dimen@ii
+        \fi
+        \advance\leftskip by 0pt plus 1fill % ragged right
+        \advance \dimen@ by 1\rightskip
+        \parshape = 2 0pt \dimen@ 0em \dimen@ii
+        % Ideally we'd add a finite glue at the end of the first line only,
+        % instead of using \parshape with explicit line lengths, but TeX
+        % doesn't seem to provide a way to do such a thing.
+        %
+        \leftskip = 1em
+        \parindent = -1em
+      \fi\fi
+      \indent % start paragraph
+      \unhbox\boxA
+      %
+      % Do not prefer a separate line ending with a hyphen to fewer lines.
+      \finalhyphendemerits = 0
+      %
+      % Word spacing - no stretch
+      \spaceskip=\fontdimen2\font minus \fontdimen4\font
+      %
+      \linepenalty=1000  % Discourage line breaks.
+      \hyphenpenalty=5000  % Discourage hyphenation.
+      %
+      \par % format the paragraph
+    \egroup % The \vbox
     \fi
-    \par
   \endgroup
+  \dotheinsertentrybox
+}}
+
+\newskip\thinshrinkable
+\skip\thinshrinkable=.15em minus .15em
+
+\newbox\entrybox
+\def\insertentrybox{%
+  \ourunvbox\entrybox
+}
+
+% default definition
+\let\dotheinsertentrybox\insertentrybox
+
+% Use \lastbox to take apart vbox box by box, and add each sub-box
+% to the current vertical list.
+\def\ourunvbox#1{%
+\bgroup % for local binding of \delayedbox
+  % Remove the last box from box #1
+  \global\setbox#1=\vbox{%
+    \unvbox#1%
+    \unskip % remove any glue
+    \unpenalty
+    \global\setbox\interbox=\lastbox
+  }%
+  \setbox\delayedbox=\box\interbox
+  \ifdim\ht#1=0pt\else
+    \ourunvbox#1 % Repeat on what's left of the box
+    \nobreak
+  \fi
+  \box\delayedbox
+\egroup
+}
+\newbox\delayedbox
+\newbox\interbox
+
+% Used from \printindex.  \firsttoken should be the first token
+% after the \entry.  If it's not another \entry, we are at the last
+% line of a group of index entries, so insert a penalty to discourage
+% widowed index entries.
+\def\dotheinsertentryboxwithpenalty{%
+  \ifx\firsttoken\isentry
+  \else
+    \penalty 9000
+  \fi
+  \insertentrybox
 }
+\def\isentry{\entry}%
 
 % Like plain.tex's \dotfill, except uses up at least 1 em.
+% The filll stretch here overpowers both the fil and fill stretch to push
+% the page number to the right.
 \def\indexdotfill{\cleaders
-  \hbox{$\mathsurround=0pt \mkern1.5mu.\mkern1.5mu$}\hskip 1em plus 1fill}
+  \hbox{$\mathsurround=0pt \mkern1.5mu.\mkern1.5mu$}\hskip 1em plus 1filll}
+
 
 \def\primary #1{\line{#1\hfil}}
 
@@ -5013,7 +5796,11 @@ end
   \ifpdf
     \pdfgettoks#2.\ \the\toksA % The page number ends the paragraph.
   \else
-    #2
+    \ifx\XeTeXrevision\thisisundefined
+      #2
+    \else
+      \pdfgettoks#2.\ \the\toksA % The page number ends the paragraph.
+    \fi
   \fi
   \par
 }}
@@ -5021,12 +5808,37 @@ end
 % Define two-column mode, which we use to typeset indexes.
 % Adapted from the TeXbook, page 416, which is to say,
 % the manmac.tex format used to print the TeXbook itself.
-\catcode`\@=11
+\catcode`\@=11  % private names
 
 \newbox\partialpage
 \newdimen\doublecolumnhsize
 
+% Use inside an output routine to save \topmark and \firstmark
+\def\savemarks{%
+  \global\savedtopmark=\expandafter{\topmark }%
+  \global\savedfirstmark=\expandafter{\firstmark }%
+}
+\newtoks\savedtopmark
+\newtoks\savedfirstmark
+
+% Set \topmark and \firstmark for next time \output runs.
+% Can't be run from withinside \output (because any material
+% added while an output routine is active, including 
+% penalties, is saved for after it finishes).  The page so far
+% should be empty, otherwise what's on it will be thrown away.
+\def\restoremarks{%
+  \mark{\the\savedtopmark}%
+  \bgroup\output = {%
+    \setbox\dummybox=\box\PAGE
+  }abc\eject\egroup
+  % "abc" because output routine doesn't fire for a completely empty page.
+  \mark{\the\savedfirstmark}%
+}
+
 \def\begindoublecolumns{\begingroup % ended by \enddoublecolumns
+  % If not much space left on page, start a new page.
+  \ifdim\pagetotal>0.8\vsize\vfill\eject\fi
+  %
   % Grab any single-column material above us.
   \output = {%
     %
@@ -5046,8 +5858,15 @@ end
       \unvbox\PAGE
       \kern-\topskip \kern\baselineskip
     }%
+    \savemarks
   }%
   \eject % run that output routine to set \partialpage
+  \restoremarks
+  %
+  % We recover the two marks that the last output routine saved in order
+  % to propagate the information in marks added around a chapter heading,
+  % which could be otherwise be lost by the time the final page is output.
+  %
   %
   % Use the double-column output routine for subsequent pages.
   \output = {\doublecolumnout}%
@@ -5073,27 +5892,31 @@ end
     \divide\doublecolumnhsize by 2
   \hsize = \doublecolumnhsize
   %
-  % Double the \vsize as well.  (We don't need a separate register here,
-  % since nobody clobbers \vsize.)
+  % Double the \vsize as well.
+  \advance\vsize by -\ht\partialpage
   \vsize = 2\vsize
+  %
+  % For the benefit of balancing columns
+  \advance\baselineskip by 0pt plus 0.5pt
 }
 
 % The double-column output routine for all double-column pages except
-% the last.
+% the last, which is done by \balancecolumns.
 %
 \def\doublecolumnout{%
+  %
   \splittopskip=\topskip \splitmaxdepth=\maxdepth
   % Get the available space for the double columns -- the normal
   % (undoubled) page height minus any material left over from the
   % previous page.
   \dimen@ = \vsize
   \divide\dimen@ by 2
-  \advance\dimen@ by -\ht\partialpage
   %
   % box0 will be the left-hand column, box2 the right.
-  \setbox0=\vsplit255 to\dimen@ \setbox2=\vsplit255 to\dimen@
+  \setbox0=\vsplit\PAGE to\dimen@ \setbox2=\vsplit\PAGE to\dimen@
+  \global\advance\vsize by 2\ht\partialpage
   \onepageout\pagesofar
-  \unvbox255
+  \unvbox\PAGE
   \penalty\outputpenalty
 }
 %
@@ -5104,10 +5927,11 @@ end
   %
   \hsize = \doublecolumnhsize
   \wd0=\hsize \wd2=\hsize
-  \hbox to\pagewidth{\box0\hfil\box2}%
+  \hbox to\txipagewidth{\box0\hfil\box2}%
 }
-%
-% All done with double columns.
+
+
+% Finished with with double columns.
 \def\enddoublecolumns{%
   % The following penalty ensures that the page builder is exercised
   % _before_ we change the output routine.  This is necessary in the
@@ -5130,7 +5954,7 @@ end
   % goal.  When TeX sees \eject from below which follows the final
   % section, it invokes the new output routine that we've set after
   % \balancecolumns below; \onepageout will try to fit the two columns
-  % and the final section into the vbox of \pageheight (see
+  % and the final section into the vbox of \txipageheight (see
   % \pagebody), causing an overfull box.
   %
   % Note that glue won't work here, because glue does not exercise the
@@ -5138,53 +5962,81 @@ end
   \penalty0
   %
   \output = {%
-    % Split the last of the double-column material.  Leave it on the
-    % current page, no automatic page break.
+    % Split the last of the double-column material.
+    \savemarks
     \balancecolumns
     %
-    % If we end up splitting too much material for the current page,
-    % though, there will be another page break right after this \output
-    % invocation ends.  Having called \balancecolumns once, we do not
+    % Having called \balancecolumns once, we do not
     % want to call it again.  Therefore, reset \output to its normal
-    % definition right away.  (We hope \balancecolumns will never be
-    % called on to balance too much material, but if it is, this makes
-    % the output somewhat more palatable.)
+    % definition right away.
     \global\output = {\onepageout{\pagecontents\PAGE}}%
   }%
   \eject
   \endgroup % started in \begindoublecolumns
+  \restoremarks
+  % Leave the double-column material on the current page, no automatic
+  % page break.
+  \box\balancedcolumns
   %
   % \pagegoal was set to the doubled \vsize above, since we restarted
   % the current page.  We're now back to normal single-column
-  % typesetting, so reset \pagegoal to the normal \vsize (after the
-  % \endgroup where \vsize got restored).
-  \pagegoal = \vsize
+  % typesetting, so reset \pagegoal to the normal \vsize.
+  \global\vsize = \txipageheight %
+  \pagegoal = \txipageheight %
 }
+\newbox\balancedcolumns
+\setbox\balancedcolumns=\vbox{shouldnt see this}%
 %
-% Called at the end of the double column material.
+% Only called for the last of the double column material.  \doublecolumnout 
+% does the others.
 \def\balancecolumns{%
-  \setbox0 = \vbox{\unvbox255}% like \box255 but more efficient, see p.120.
+  \setbox0 = \vbox{\unvbox\PAGE}% like \box255 but more efficient, see p.120.
   \dimen@ = \ht0
   \advance\dimen@ by \topskip
   \advance\dimen@ by-\baselineskip
-  \divide\dimen@ by 2 % target to split to
-  %debug\message{final 2-column material height=\the\ht0, target=\the\dimen@.}%
-  \splittopskip = \topskip
-  % Loop until we get a decent breakpoint.
-  {%
-    \vbadness = 10000
-    \loop
-      \global\setbox3 = \copy0
-      \global\setbox1 = \vsplit3 to \dimen@
-    \ifdim\ht3>\dimen@
-      \global\advance\dimen@ by 1pt
-    \repeat
-  }%
-  %debug\message{split to \the\dimen@, column heights: \the\ht1, \the\ht3.}%
-  \setbox0=\vbox to\dimen@{\unvbox1}%
-  \setbox2=\vbox to\dimen@{\unvbox3}%
+  \ifdim\dimen@<5\baselineskip
+    % Don't split a short final column in two.
+    \setbox2=\vbox{}%
+  \else
+    \divide\dimen@ by 2 % target to split to
+    \dimen@ii = \dimen@
+    \splittopskip = \topskip
+    % Loop until left column is at least as high as the right column.
+    {%
+      \vbadness = 10000
+      \loop
+        \global\setbox3 = \copy0
+        \global\setbox1 = \vsplit3 to \dimen@
+      \ifdim\ht1<\ht3
+        \global\advance\dimen@ by 1pt
+      \repeat
+    }%
+    % Now the left column is in box 1, and the right column in box 3.
+    % Check whether the left column has come out higher than the page itself.  
+    % (Note that we have doubled \vsize for the double columns, so
+    % the actual height of the page is 0.5\vsize).
+    \ifdim2\ht1>\vsize
+      % Just split the last of the double column material roughly in half.
+      \setbox2=\box0
+      \setbox0 = \vsplit2 to \dimen@ii
+      \setbox0=\vbox to \dimen@ii {\unvbox0\vfill}%
+      \setbox2=\vbox to \dimen@ii {\unvbox2\vfill}%
+    \else
+      % Compare the heights of the two columns.
+      \ifdim4\ht1>5\ht3
+        % Column heights are too different, so don't make their bottoms
+        % flush with each other.
+        \setbox2=\vbox to \ht1 {\unvbox3\vfill}%
+        \setbox0=\vbox to \ht1 {\unvbox1\vfill}%
+      \else
+        % Make column bottoms flush with each other.
+        \setbox2=\vbox to\ht1{\unvbox3\unskip}%
+        \setbox0=\vbox to\ht1{\unvbox1\unskip}%
+      \fi
+    \fi
+  \fi
   %
-  \pagesofar
+  \global\setbox\balancedcolumns=\vbox{\pagesofar}%
 }
 \catcode`\@ = \other
 
@@ -5199,10 +6051,14 @@ end
   \null
   \vskip.3\vsize  % move it down on the page a bit
   \begingroup
-    \noindent \titlefonts\rmisbold #1\par % the text
+    \noindent \titlefonts\rm #1\par % the text
     \let\lastnode=\empty      % no node to associate with
     \writetocentry{part}{#1}{}% but put it in the toc
     \headingsoff              % no headline or footline on the part page
+    % This outputs a mark at the end of the page that clears \thischapter
+    % and \thissection, as is done in \startcontents.
+    \let\pchapsepmacro\relax
+    \chapmacro{}{Yomitfromtoc}{}%
     \chapoddpage
   \endgroup
 }
@@ -5447,9 +6303,6 @@ end
 
 % @centerchap is like @unnumbered, but the heading is centered.
 \outer\parseargdef\centerchap{%
-  % Well, we could do the following in a group, but that would break
-  % an assumption that \chapmacro is called at the outermost level.
-  % Thus we are safer this way:                --kasal, 24feb04
   \let\centerparametersmaybe = \centerparameters
   \unnmhead0{#1}%
   \let\centerparametersmaybe = \relax
@@ -5541,14 +6394,6 @@ end
 
 % Define @majorheading, @heading and @subheading
 
-% NOTE on use of \vbox for chapter headings, section headings, and such:
-%       1) We use \vbox rather than the earlier \line to permit
-%          overlong headings to fold.
-%       2) \hyphenpenalty is set to 10000 because hyphenation in a
-%          heading is obnoxious; this forbids it.
-%       3) Likewise, headings look best if no \parindent is used, and
-%          if justification is not attempted.  Hence \raggedright.
-
 \def\majorheading{%
   {\advance\chapheadingskip by 10pt \chapbreak }%
   \parsearg\chapheadingzzz
@@ -5556,10 +6401,8 @@ end
 
 \def\chapheading{\chapbreak \parsearg\chapheadingzzz}
 \def\chapheadingzzz#1{%
-  {\chapfonts \vbox{\hyphenpenalty=10000\tolerance=5000
-                    \parindent=0pt\ptexraggedright
-                    \rmisbold #1\hfill}}%
-  \bigskip \par\penalty 200\relax
+  \vbox{\chapfonts \raggedtitlesettings #1\par}%
+  \nobreak\bigskip \nobreak
   \suppressfirstparagraphindent
 }
 
@@ -5583,7 +6426,11 @@ end
 
 % Define plain chapter starts, and page on/off switching for it.
 \def\chapbreak{\dobreak \chapheadingskip {-4000}}
+
+% Start a new page
 \def\chappager{\par\vfill\supereject}
+
+% \chapoddpage - start on an odd page for a new chapter
 % Because \domark is called before \chapoddpage, the filler page will
 % get the headings for the next chapter, which is wrong.  But we don't
 % care -- we just disable all headings on the filler page.
@@ -5598,7 +6445,7 @@ end
   \fi
 }
 
-\def\setchapternewpage #1 {\csname CHAPPAG#1\endcsname}
+\parseargdef\setchapternewpage{\csname CHAPPAG#1\endcsname}
 
 \def\CHAPPAGoff{%
 \global\let\contentsalignmacro = \chappager
@@ -5619,17 +6466,26 @@ end
 
 \CHAPPAGon
 
-% Chapter opening.
+% \chapmacro - Chapter opening.
 %
 % #1 is the text, #2 is the section type (Ynumbered, Ynothing,
 % Yappendix, Yomitfromtoc), #3 the chapter number.
+% Not used for @heading series.
 %
 % To test against our argument.
 \def\Ynothingkeyword{Ynothing}
-\def\Yomitfromtockeyword{Yomitfromtoc}
 \def\Yappendixkeyword{Yappendix}
+\def\Yomitfromtockeyword{Yomitfromtoc}
 %
 \def\chapmacro#1#2#3{%
+  \expandafter\ifx\thisenv\titlepage\else
+    \checkenv{}% chapters, etc., should not start inside an environment.
+  \fi
+  % FIXME: \chapmacro is currently called from inside \titlepage when
+  % \setcontentsaftertitlepage to print the "Table of Contents" heading, but
+  % this should probably be done by \sectionheading with an option to print
+  % in chapter size.
+  %
   % Insert the first mark before the heading break (see notes for \domark).
   \let\prevchapterdefs=\lastchapterdefs
   \let\prevsectiondefs=\lastsectiondefs
@@ -5681,7 +6537,8 @@ end
   \domark
   %
   {%
-    \chapfonts \rmisbold
+    \chapfonts \rm
+    \let\footnote=\errfootnoteheading % give better error message
     %
     % Have to define \lastsection before calling \donoderef, because the
     % xref code eventually uses it.  On the other hand, it has to be called
@@ -5718,8 +6575,7 @@ end
     %
     % Typeset the actual heading.
     \nobreak % Avoid page breaks at the interline glue.
-    \vbox{\hyphenpenalty=10000 \tolerance=5000 \parindent=0pt \ptexraggedright
-          \hangindent=\wd0 \centerparametersmaybe
+    \vbox{\raggedtitlesettings \hangindent=\wd0 \centerparametersmaybe
           \unhbox0 #1\par}%
   }%
   \nobreak\bigskip % no page break after a chapter title
@@ -5735,30 +6591,6 @@ end
 }
 
 
-% I don't think this chapter style is supported any more, so I'm not
-% updating it with the new noderef stuff.  We'll see.  --karl, 11aug03.
-%
-\def\setchapterstyle #1 {\csname CHAPF#1\endcsname}
-%
-\def\unnchfopen #1{%
-\chapoddpage {\chapfonts \vbox{\hyphenpenalty=10000\tolerance=5000
-                       \parindent=0pt\ptexraggedright
-                       \rmisbold #1\hfill}}\bigskip \par\nobreak
-}
-\def\chfopen #1#2{\chapoddpage {\chapfonts
-\vbox to 3in{\vfil \hbox to\hsize{\hfil #2} \hbox to\hsize{\hfil #1} \vfil}}%
-\par\penalty 5000 %
-}
-\def\centerchfopen #1{%
-\chapoddpage {\chapfonts \vbox{\hyphenpenalty=10000\tolerance=5000
-                       \parindent=0pt
-                       \hfill {\rmisbold #1}\hfill}}\bigskip \par\nobreak
-}
-\def\CHAPFopen{%
-  \global\let\chapmacro=\chfopen
-  \global\let\centerchapmacro=\centerchfopen}
-
-
 % Section titles.  These macros combine the section number parts and
 % call the generic \sectionheading to do the printing.
 %
@@ -5776,22 +6608,29 @@ end
 
 % Print any size, any type, section title.
 %
-% #1 is the text, #2 is the section level (sec/subsec/subsubsec), #3 is
-% the section type for xrefs (Ynumbered, Ynothing, Yappendix), #4 is the
-% section number.
+% #1 is the text of the title,
+% #2 is the section level (sec/subsec/subsubsec),
+% #3 is the section type (Ynumbered, Ynothing, Yappendix, Yomitfromtoc),
+% #4 is the section number.
 %
 \def\seckeyword{sec}
 %
 \def\sectionheading#1#2#3#4{%
   {%
-    \checkenv{}% should not be in an environment.
-    %
-    % Switch to the right set of fonts.
-    \csname #2fonts\endcsname \rmisbold
-    %
     \def\sectionlevel{#2}%
     \def\temptype{#3}%
     %
+    % It is ok for the @heading series commands to appear inside an
+    % environment (it's been historically allowed, though the logic is
+    % dubious), but not the others.
+    \ifx\temptype\Yomitfromtockeyword\else
+      \checkenv{}% non-@*heading should not be in an environment.
+    \fi
+    \let\footnote=\errfootnoteheading
+    %
+    % Switch to the right set of fonts.
+    \csname #2fonts\endcsname \rm
+    %
     % Insert first mark before the heading break (see notes for \domark).
     \let\prevsectiondefs=\lastsectiondefs
     \ifx\temptype\Ynothingkeyword
@@ -5843,7 +6682,7 @@ end
     %
     % Now the second mark, after the heading break.  No break points
     % between here and the heading.
-    \let\prevsectiondefs=\lastsectiondefs
+    \global\let\prevsectiondefs=\lastsectiondefs
     \domark
     %
     % Only insert the space after the number if we have a section number.
@@ -5954,7 +6793,14 @@ end
   % 1 and 2 (the page numbers aren't printed), and so are the first
   % two pages of the document.  Thus, we'd have two destinations named
   % `1', and two named `2'.
-  \ifpdf \global\pdfmakepagedesttrue \fi
+  \ifpdf
+    \global\pdfmakepagedesttrue
+  \else
+    \ifx\XeTeXrevision\thisisundefined
+    \else
+      \global\pdfmakepagedesttrue
+    \fi
+  \fi
 }
 
 
@@ -6003,7 +6849,7 @@ end
   \savepageno = \pageno
   \begingroup                  % Set up to handle contents files properly.
     \raggedbottom              % Worry more about breakpoints than the bottom.
-    \advance\hsize by -\contentsrightmargin % Don't use the full line length.
+    \entryrightmargin=\contentsrightmargin % Don't use the full line length.
     %
     % Roman numerals for page numbers.
     \ifnum \pageno>0 \global\pageno = \lastnegativepageno \fi
@@ -6108,7 +6954,7 @@ end
 
 % Chapters, in the main contents.
 \def\numchapentry#1#2#3#4{\dochapentry{#2\labelspace#1}{#4}}
-%
+
 % Chapters, in the short toc.
 % See comments in \dochapentry re vbox and related settings.
 \def\shortchapentry#1#2#3#4{%
@@ -6123,7 +6969,7 @@ end
   \setbox0 = \hbox{\putwordAppendix{} M}%
   \hbox to \wd0{\putwordAppendix{} #1\hss}}
 %
-\def\appentry#1#2#3#4{\dochapentry{\appendixbox{#2}\labelspace#1}{#4}}
+\def\appentry#1#2#3#4{\dochapentry{\appendixbox{#2}\hskip.7em#1}{#4}}
 
 % Unnumbered chapters.
 \def\unnchapentry#1#2#3#4{\dochapentry{#1}{#4}}
@@ -6156,6 +7002,8 @@ end
 \def\dochapentry#1#2{%
    \penalty-300 \vskip1\baselineskip plus.33\baselineskip minus.25\baselineskip
    \begingroup
+     % Move the page numbers slightly to the right
+     \advance\entryrightmargin by -0.05em
      \chapentryfonts
      \tocentry{#1}{\dopageno\bgroup#2\egroup}%
    \endgroup
@@ -6210,14 +7058,14 @@ end
   \catcode `\|=\other
   \catcode `\<=\other
   \catcode `\>=\other
-  \catcode`\`=\other
-  \catcode`\'=\other
-  \escapechar=`\\
+  \catcode `\`=\other
+  \catcode `\'=\other
   %
   % ' is active in math mode (mathcode"8000).  So reset it, and all our
   % other math active characters (just in case), to plain's definitions.
   \mathactive
   %
+  % Inverse of the list at the beginning of the file.
   \let\b=\ptexb
   \let\bullet=\ptexbullet
   \let\c=\ptexc
@@ -6233,9 +7081,11 @@ end
   \let\+=\tabalign
   \let\}=\ptexrbrace
   \let\/=\ptexslash
+  \let\sp=\ptexsp
   \let\*=\ptexstar
+  %\let\sup=\ptexsup % do not redefine, we want @sup to work in math mode
   \let\t=\ptext
-  \expandafter \let\csname top\endcsname=\ptextop  % outer
+  \expandafter \let\csname top\endcsname=\ptextop  % we've made it outer
   \let\frenchspacing=\plainfrenchspacing
   %
   \def\endldots{\mathinner{\ldots\ldots\ldots\ldots}}%
@@ -6272,6 +7122,24 @@ end
     \endgraf
     \ifdim\lastskip<\envskipamount
       \removelastskip
+      \ifnum\lastpenalty<10000
+        % Penalize breaking before the environment, because preceding text
+        % often leads into it.
+        \penalty100
+      \fi
+      \vskip\envskipamount
+    \fi
+  \fi
+}}
+
+\def\afterenvbreak{{%
+  % =10000 instead of <10000 because of a special case in \itemzzz and
+  % \sectionheading, q.v.
+  \ifnum \lastpenalty=10000 \else
+    \advance\envskipamount by \parskip
+    \endgraf
+    \ifdim\lastskip<\envskipamount
+      \removelastskip
       % it's not a good place to break if the last penalty was \nobreak
       % or better ...
       \ifnum\lastpenalty<10000 \penalty-50 \fi
@@ -6280,8 +7148,6 @@ end
   \fi
 }}
 
-\let\afterenvbreak = \aboveenvbreak
-
 % \nonarrowing is a flag.  If "set", @lisp etc don't narrow margins; it will
 % also clear it, so that its embedded environments do the narrowing again.
 \let\nonarrowing=\relax
@@ -6319,15 +7185,13 @@ end
                                % side, and for 6pt waste from
                                % each corner char, and rule thickness
   \normbskip=\baselineskip \normpskip=\parskip \normlskip=\lineskip
-  % Flag to tell @lisp, etc., not to narrow margin.
-  \let\nonarrowing = t%
   %
   % If this cartouche directly follows a sectioning command, we need the
   % \parskip glue (backspaced over by default) or the cartouche can
   % collide with the section heading.
   \ifnum\lastpenalty>10000 \vskip\parskip \penalty\lastpenalty \fi
   %
-  \vbox\bgroup
+  \setbox\groupbox=\vbox\bgroup
       \baselineskip=0pt\parskip=0pt\lineskip=0pt
       \carttop
       \hbox\bgroup
@@ -6351,6 +7215,7 @@ end
       \egroup
       \cartbot
   \egroup
+  \addgroupbox
   \checkinserts
 }
 
@@ -6360,7 +7225,7 @@ end
 \newdimen\nonfillparindent
 \def\nonfillstart{%
   \aboveenvbreak
-  \hfuzz = 12pt % Don't be fussy
+  \ifdim\hfuzz < 12pt \hfuzz = 12pt \fi % Don't be fussy
   \sepspaces % Make spaces be word-separators rather than space tokens.
   \let\par = \lisppar % don't ignore blank lines
   \obeylines % each line of input is a line of output
@@ -6487,9 +7352,13 @@ end
 
 
 % @raggedright does more-or-less normal line breaking but no right
-% justification.  From plain.tex.
+% justification.  From plain.tex.  Don't stretch around special
+% characters in urls in this environment, since the stretch at the right
+% should be enough.
 \envdef\raggedright{%
-  \rightskip0pt plus2em \spaceskip.3333em \xspaceskip.5em\relax
+  \rightskip0pt plus2.4em \spaceskip.3333em \xspaceskip.5em\relax
+  \def\urefprestretchamount{0pt}%
+  \def\urefpoststretchamount{0pt}%
 }
 \let\Eraggedright\par
 
@@ -6518,16 +7387,9 @@ end
 \makedispenvdef{quotation}{\quotationstart}
 %
 \def\quotationstart{%
-  {\parskip=0pt \aboveenvbreak}% because \aboveenvbreak inserts \parskip
-  \parindent=0pt
-  %
-  % @cartouche defines \nonarrowing to inhibit narrowing at next level down.
+  \indentedblockstart % same as \indentedblock, but increase right margin too.
   \ifx\nonarrowing\relax
-    \advance\leftskip by \lispnarrowing
     \advance\rightskip by \lispnarrowing
-    \exdentamount = \lispnarrowing
-  \else
-    \let\nonarrowing = \relax
   \fi
   \parsearg\quotationlabel
 }
@@ -6541,17 +7403,43 @@ end
     % indent a bit.
     \leftline{\kern 2\leftskip \sl ---\quotationauthor}%
   \fi
-  {\parskip=0pt \afterenvbreak}%
+  {\parskip=0pt \afterenvbreak}%
+}
+\def\Esmallquotation{\Equotation}
+
+% If we're given an argument, typeset it in bold with a colon after.
+\def\quotationlabel#1{%
+  \def\temp{#1}%
+  \ifx\temp\empty \else
+    {\bf #1: }%
+  \fi
+}
+
+% @indentedblock is like @quotation, but indents only on the left and
+% has no optional argument.
+% 
+\makedispenvdef{indentedblock}{\indentedblockstart}
+%
+\def\indentedblockstart{%
+  {\parskip=0pt \aboveenvbreak}% because \aboveenvbreak inserts \parskip
+  \parindent=0pt
+  %
+  % @cartouche defines \nonarrowing to inhibit narrowing at next level down.
+  \ifx\nonarrowing\relax
+    \advance\leftskip by \lispnarrowing
+    \exdentamount = \lispnarrowing
+  \else
+    \let\nonarrowing = \relax
+  \fi
 }
-\def\Esmallquotation{\Equotation}
 
-% If we're given an argument, typeset it in bold with a colon after.
-\def\quotationlabel#1{%
-  \def\temp{#1}%
-  \ifx\temp\empty \else
-    {\bf #1: }%
-  \fi
+% Keep a nonzero parskip for the environment, since we're doing normal filling.
+%
+\def\Eindentedblock{%
+  \par
+  {\parskip=0pt \afterenvbreak}%
 }
+\def\Esmallindentedblock{\Eindentedblock}
 
 
 % LaTeX-like @verbatim...@end verbatim and @verb{<char>...<char>}
@@ -6710,7 +7598,7 @@ end
 % typesetting commands (@smallbook, font changes, etc.) have to be done
 % beforehand -- and a) we want @copying to be done first in the source
 % file; b) letting users define the frontmatter in as flexible order as
-% possible is very desirable.
+% possible is desirable.
 %
 \def\copying{\checkenv{}\begingroup\scanargctxt\docopying}
 \def\docopying#1@end copying{\endgroup\def\copyingtext{#1}}
@@ -6805,7 +7693,7 @@ end
   \temp
 }
 
-% \domakedefun \deffn \deffnx \deffnheader
+% \domakedefun \deffn \deffnx \deffnheader { (defn. of \deffnheader) }
 %
 % Define \deffn and \deffnx, without parameters.
 % \deffnheader has to be defined explicitly.
@@ -7014,7 +7902,7 @@ end
     \fi           % no return type
     #3% output function name
   }%
-  {\rm\enskip}% hskip 0.5 em of \tenrm
+  {\rm\enskip}% hskip 0.5 em of \rmfont
   %
   \boldbrax
   % arguments will be output next, if any.
@@ -7031,7 +7919,10 @@ end
   \df \sl \hyphenchar\font=0
   %
   % On the other hand, if an argument has two dashes (for instance), we
-  % want a way to get ttsl.  Let's try @var for that.
+  % want a way to get ttsl.  We used to recommend @var for that, so
+  % leave the code in, but it's strange for @var to lead to typewriter.
+  % Nowadays we recommend @code, since the difference between a ttsl hyphen
+  % and a tt hyphen is pretty tiny.  @code also disables ?` !`.
   \def\var##1{{\setupmarkupstyle{var}\ttslanted{##1}}}%
   #1%
   \sl\hyphenchar\font=45
@@ -7140,34 +8031,41 @@ end
   }
 \fi
 
-\def\scanmacro#1{\begingroup
+% alias because \c means cedilla in @tex or @math
+\let\texinfoc=\c
+
+\newcount\savedcatcodeone
+\newcount\savedcatcodetwo
+
+% Used at the time of macro expansion.
+% Argument is macro body with arguments substituted
+\def\scanmacro#1{%
   \newlinechar`\^^M
-  \let\xeatspaces\eatspaces
+  \def\xeatspaces{\eatspaces}%
   %
-  % Undo catcode changes of \startcontents and \doprintindex
-  % When called from @insertcopying or (short)caption, we need active
-  % backslash to get it printed correctly.  Previously, we had
-  % \catcode`\\=\other instead.  We'll see whether a problem appears
-  % with macro expansion.                              --kasal, 19aug04
-  \catcode`\@=0 \catcode`\\=\active \escapechar=`\@
+  % Temporarily undo catcode changes of \printindex.  Set catcode of @ to
+  % 0 so that @-commands in macro expansions aren't printed literally when 
+  % formatting an index file, where \ is used as the escape character.
+  \savedcatcodeone=\catcode`\@
+  \savedcatcodetwo=\catcode`\\
+  \catcode`\@=0
+  \catcode`\\=\active
   %
-  % ... and for \example:
-  \spaceisspace
+  % Process the macro body under the current catcode regime.
+  \scantokens{#1@texinfoc}%
   %
-  % The \empty here causes a following catcode 5 newline to be eaten as
-  % part of reading whitespace after a control sequence.  It does not
-  % eat a catcode 13 newline.  There's no good way to handle the two
-  % cases (untried: maybe e-TeX's \everyeof could help, though plain TeX
-  % would then have different behavior).  See the Macro Details node in
-  % the manual for the workaround we recommend for macros and
-  % line-oriented commands.
-  % 
-  \scantokens{#1\empty}%
-\endgroup}
+  \catcode`\@=\savedcatcodeone
+  \catcode`\\=\savedcatcodetwo
+  %
+  % The \texinfoc is to remove the \newlinechar added by \scantokens, and
+  % can be noticed by \parsearg.
+  %   We avoid surrounding the call to \scantokens with \bgroup and \egroup
+  % to allow macros to open or close groups themselves.
+}
 
+% Used for copying and captions
 \def\scanexp#1{%
-  \edef\temp{\noexpand\scanmacro{#1}}%
-  \temp
+  \expandafter\scanmacro\expandafter{#1}%
 }
 
 \newcount\paramno   % Count of parameters
@@ -7175,7 +8073,7 @@ end
 \newif\ifrecursive  % Is it recursive?
 
 % List of all defined macros in the form
-%    \definedummyword\macro1\definedummyword\macro2...
+%    \commondummyword\macro1\commondummyword\macro2...
 % Currently is also contains all @aliases; the list can be split
 % if there is a need.
 \def\macrolist{}
@@ -7183,7 +8081,7 @@ end
 % Add the macro to \macrolist
 \def\addtomacrolist#1{\expandafter \addtomacrolistxxx \csname#1\endcsname}
 \def\addtomacrolistxxx#1{%
-     \toks0 = \expandafter{\macrolist\definedummyword#1}%
+     \toks0 = \expandafter{\macrolist\commondummyword#1}%
      \xdef\macrolist{\the\toks0}%
 }
 
@@ -7233,48 +8131,45 @@ end
   \catcode`\+=\other
   \catcode`\<=\other
   \catcode`\>=\other
-  \catcode`\@=\other
   \catcode`\^=\other
   \catcode`\_=\other
   \catcode`\|=\other
   \catcode`\~=\other
-  \ifx\declaredencoding\ascii \else \setnonasciicharscatcodenonglobal\other \fi
+  \passthroughcharstrue
 }
 
 \def\scanargctxt{% used for copying and captions, not macros.
   \scanctxt
+  \catcode`\@=\other
   \catcode`\\=\other
   \catcode`\^^M=\other
 }
 
 \def\macrobodyctxt{% used for @macro definitions
   \scanctxt
+  \catcode`\ =\other
+  \catcode`\@=\other
   \catcode`\{=\other
   \catcode`\}=\other
   \catcode`\^^M=\other
   \usembodybackslash
 }
 
-\def\macroargctxt{% used when scanning invocations
+% Used when scanning braced macro arguments.  Note, however, that catcode
+% changes here are ineffectual if the macro invocation was nested inside
+% an argument to another Texinfo command.
+\def\macroargctxt{%
   \scanctxt
-  \catcode`\\=0
+  \catcode`\ =\active
+  \catcode`\^^M=\other
+  \catcode`\\=\active
 }
-% why catcode 0 for \ in the above?  To recognize \\ \{ \} as "escapes"
-% for the single characters \ { }.  Thus, we end up with the "commands"
-% that would be written @\ @{ @} in a Texinfo document.
-% 
-% We already have @{ and @}.  For @\, we define it here, and only for
-% this purpose, to produce a typewriter backslash (so, the @\ that we
-% define for @math can't be used with @macro calls):
-%
-\def\\{\normalbackslash}%
-% 
-% We would like to do this for \, too, since that is what makeinfo does.
-% But it is not possible, because Texinfo already has a command @, for a
-% cedilla accent.  Documents must use @comma{} instead.
-%
-% \anythingelse will almost certainly be an error of some kind.
 
+\def\macrolineargctxt{% used for whole-line arguments without braces
+  \scanctxt
+  \catcode`\{=\other
+  \catcode`\}=\other
+}
 
 % \mbodybackslash is the definition of \ in @macro bodies.
 % It maps \foo\ => \csname macarg.foo\endcsname => #N
@@ -7327,7 +8222,7 @@ end
     % Remove the macro name from \macrolist:
     \begingroup
       \expandafter\let\csname#1\endcsname \relax
-      \let\definedummyword\unmacrodo
+      \let\commondummyword\unmacrodo
       \xdef\macrolist{\macrolist}%
     \endgroup
   \else
@@ -7342,61 +8237,40 @@ end
   \ifx #1\relax
     % remove this
   \else
-    \noexpand\definedummyword \noexpand#1%
+    \noexpand\commondummyword \noexpand#1%
   \fi
 }
 
-% This makes use of the obscure feature that if the last token of a
-% <parameter list> is #, then the preceding argument is delimited by
-% an opening brace, and that opening brace is not consumed.
+% \getargs -- Parse the arguments to a @macro line.  Set \macname to
+% the name of the macro, and \argl to the braced argument list.
 \def\getargs#1{\getargsxxx#1{}}
 \def\getargsxxx#1#{\getmacname #1 \relax\getmacargs}
 \def\getmacname#1 #2\relax{\macname={#1}}
 \def\getmacargs#1{\def\argl{#1}}
+% This made use of the feature that if the last token of a
+% <parameter list> is #, then the preceding argument is delimited by
+% an opening brace, and that opening brace is not consumed.
 
-% For macro processing make @ a letter so that we can make Texinfo private macro names.
-\edef\texiatcatcode{\the\catcode`\@}
-\catcode `@=11\relax
-
-% Parse the optional {params} list.  Set up \paramno and \paramlist
-% so \defmacro knows what to do.  Define \macarg.BLAH for each BLAH
-% in the params list to some hook where the argument si to be expanded.  If
-% there are less than 10 arguments that hook is to be replaced by ##N where N
+% Parse the optional {params} list to @macro or @rmacro.
+% Set \paramno to the number of arguments,
+% and \paramlist to a parameter text for the macro (e.g. #1,#2,#3 for a
+% three-param macro.)  Define \macarg.BLAH for each BLAH in the params
+% list to some hook where the argument is to be expanded.  If there are
+% less than 10 arguments that hook is to be replaced by ##N where N
 % is the position in that list, that is to say the macro arguments are to be
 % defined `a la TeX in the macro body.  
 %
 % That gets used by \mbodybackslash (above).
 %
-% We need to get `macro parameter char #' into several definitions.
-% The technique used is stolen from LaTeX: let \hash be something
-% unexpandable, insert that wherever you need a #, and then redefine
-% it to # just before using the token list produced.
-%
-% The same technique is used to protect \eatspaces till just before
-% the macro is used.
-%
-% If there are 10 or more arguments, a different technique is used, where the
-% hook remains in the body, and when macro is to be expanded the body is
-% processed again to replace the arguments.
-%
-% In that case, the hook is \the\toks N-1, and we simply set \toks N-1 to the
-% argument N value and then \edef  the body (nothing else will expand because of
-% the catcode regime underwhich the body was input).
+% If there are 10 or more arguments, a different technique is used: see
+% \parsemmanyargdef.
 %
-% If you compile with TeX (not eTeX), and you have macros with 10 or more
-% arguments, you need that no macro has more than 256 arguments, otherwise an
-% error is produced.
 \def\parsemargdef#1;{%
   \paramno=0\def\paramlist{}%
   \let\hash\relax
+  % \hash is redefined to `#' later to get it into definitions
   \let\xeatspaces\relax
   \parsemargdefxxx#1,;,%
-  % In case that there are 10 or more arguments we parse again the arguments
-  % list to set new definitions for the \macarg.BLAH macros corresponding to
-  % each BLAH argument. It was anyhow needed to parse already once this list
-  % in order to count the arguments, and as macros with at most 9 arguments
-  % are by far more frequent than macro with 10 or more arguments, defining
-  % twice the \macarg.BLAH macros does not cost too much processing power.
   \ifnum\paramno<10\relax\else
     \paramno0\relax
     \parsemmanyargdef@@#1,;,% 10 or more arguments
@@ -7411,6 +8285,43 @@ end
     \edef\paramlist{\paramlist\hash\the\paramno,}%
   \fi\next}
 
+% \parsemacbody, \parsermacbody
+%
+% Read recursive and nonrecursive macro bodies. (They're different since
+% rec and nonrec macros end differently.)
+% 
+% We are in \macrobodyctxt, and the \xdef causes backslashshes in the macro 
+% body to be transformed.
+% Set \macrobody to the body of the macro, and call \defmacro.
+%
+{\catcode`\ =\other\long\gdef\parsemacbody#1@end macro{%
+\xdef\macrobody{\eatcr{#1}}\endgroup\defmacro}}%
+{\catcode`\ =\other\long\gdef\parsermacbody#1@end rmacro{%
+\xdef\macrobody{\eatcr{#1}}\endgroup\defmacro}}%
+
+% Make @ a letter, so that we can make private-to-Texinfo macro names.
+\edef\texiatcatcode{\the\catcode`\@}
+\catcode `@=11\relax
+
+%%%%%%%%%%%%%% Code for > 10 arguments only   %%%%%%%%%%%%%%%%%%
+
+% If there are 10 or more arguments, a different technique is used, where the
+% hook remains in the body, and when macro is to be expanded the body is
+% processed again to replace the arguments.
+%
+% In that case, the hook is \the\toks N-1, and we simply set \toks N-1 to the
+% argument N value and then \edef the body (nothing else will expand because of
+% the catcode regime under which the body was input).
+%
+% If you compile with TeX (not eTeX), and you have macros with 10 or more
+% arguments, no macro can have more than 256 arguments (else error).
+%
+% In case that there are 10 or more arguments we parse again the arguments
+% list to set new definitions for the \macarg.BLAH macros corresponding to
+% each BLAH argument. It was anyhow needed to parse already once this list
+% in order to count the arguments, and as macros with at most 9 arguments
+% are by far more frequent than macro with 10 or more arguments, defining
+% twice the \macarg.BLAH macros does not cost too much processing power.
 \def\parsemmanyargdef@@#1,{%
   \if#1;\let\next=\relax
   \else 
@@ -7426,16 +8337,6 @@ end
     \advance\paramno by 1\relax
   \fi\next}
 
-% These two commands read recursive and nonrecursive macro bodies.
-% (They're different since rec and nonrec macros end differently.)
-%
-
-\catcode `\@\texiatcatcode
-\long\def\parsemacbody#1@end macro%
-{\xdef\temp{\eatcr{#1}}\endgroup\defmacro}%
-\long\def\parsermacbody#1@end rmacro%
-{\xdef\temp{\eatcr{#1}}\endgroup\defmacro}%
-\catcode `\@=11\relax
 
 \let\endargs@\relax
 \let\nil@\relax
@@ -7443,7 +8344,7 @@ end
 \long\def\nillm@{\nil@}%
 
 % This macro is expanded during the Texinfo macro expansion, not during its
-% definition.  It gets all the arguments values and assigns them to macros
+% definition.  It gets all the arguments' values and assigns them to macros
 % macarg.ARGNAME
 %
 % #1 is the macro name
@@ -7464,8 +8365,6 @@ end
     \getargvals@@
   \fi
 }
-
-% 
 \def\getargvals@@{%
   \ifx\paramlist\nilm@
       % Some sanity check needed here that \argvaluelist is also empty.
@@ -7509,7 +8408,8 @@ end
 }
 
 % Replace arguments by their values in the macro body, and place the result
-% in macro \@tempa
+% in macro \@tempa.
+% 
 \def\macvalstoargs@{%
   %  To do this we use the property that token registers that are \the'ed
   % within an \edef  expand only once. So we are going to place all argument
@@ -7533,8 +8433,9 @@ end
   \expandafter\def\expandafter\@tempa\expandafter{\@tempc}%
   }
 
+% Define the named-macro outside of this group and then close this group. 
+% 
 \def\macargexpandinbody@{% 
-  %% Define the named-macro outside of this group and then close this group. 
   \expandafter
   \endgroup
   \macargdeflist@
@@ -7571,14 +8472,8 @@ end
   \next
 }
 
-% Save the token stack pointer into macro #1
-\def\texisavetoksstackpoint#1{\edef#1{\the\@cclvi}}
-% Restore the token stack pointer from number in macro #1
-\def\texirestoretoksstackpoint#1{\expandafter\mathchardef\expandafter\@cclvi#1\relax}
-% newtoks that can be used non \outer .
-\def\texinonouternewtoks{\alloc@ 5\toks \toksdef \@cclvi}
-
-% Tailing missing arguments are set to empty
+% Trailing missing arguments are set to empty.
+% 
 \def\setemptyargvalues@{%
   \ifx\paramlist\nilm@
     \let\next\macargexpandinbody@
@@ -7608,99 +8503,191 @@ end
    \long\def#2{#4}%
 }
 
-% This defines a Texinfo @macro. There are eight cases: recursive and
-% nonrecursive macros of zero, one, up to nine, and many arguments.
-% Much magic with \expandafter here.
+
+%%%%%%%%%%%%%% End of code for > 10 arguments %%%%%%%%%%%%%%%%%%
+
+
+% This defines a Texinfo @macro or @rmacro, called by \parsemacbody.
+%    \macrobody has the body of the macro in it, with placeholders for
+% its parameters, looking like "\xeatspaces{\hash 1}".
+%    \paramno is the number of parameters
+%    \paramlist is a TeX parameter text, e.g. "#1,#2,#3,"
+% There are four cases: macros of zero, one, up to nine, and many arguments.
 % \xdef is used so that macro definitions will survive the file
-% they're defined in; @include reads the file inside a group.
+% they're defined in: @include reads the file inside a group.
 %
 \def\defmacro{%
   \let\hash=##% convert placeholders to macro parameter chars
-  \ifrecursive
-    \ifcase\paramno
-    % 0
-      \expandafter\xdef\csname\the\macname\endcsname{%
-        \noexpand\scanmacro{\temp}}%
-    \or % 1
-      \expandafter\xdef\csname\the\macname\endcsname{%
-         \bgroup\noexpand\macroargctxt
-         \noexpand\braceorline
-         \expandafter\noexpand\csname\the\macname xxx\endcsname}%
-      \expandafter\xdef\csname\the\macname xxx\endcsname##1{%
-         \egroup\noexpand\scanmacro{\temp}}%
-    \else
-      \ifnum\paramno<10\relax % at most 9
-        \expandafter\xdef\csname\the\macname\endcsname{%
-           \bgroup\noexpand\macroargctxt
-           \noexpand\csname\the\macname xx\endcsname}%
-        \expandafter\xdef\csname\the\macname xx\endcsname##1{%
-            \expandafter\noexpand\csname\the\macname xxx\endcsname ##1,}%
-        \expandafter\expandafter
-        \expandafter\xdef
-        \expandafter\expandafter
-          \csname\the\macname xxx\endcsname
-            \paramlist{\egroup\noexpand\scanmacro{\temp}}%
-      \else % 10 or more
-        \expandafter\xdef\csname\the\macname\endcsname{%
-          \noexpand\getargvals@{\the\macname}{\argl}%
-        }%    
-        \global\expandafter\let\csname mac.\the\macname .body\endcsname\temp
-        \global\expandafter\let\csname mac.\the\macname .recurse\endcsname\gobble
-      \fi
-    \fi
+  \ifnum\paramno=1
+    \def\xeatspaces##1{##1}%
+    % This removes the pair of braces around the argument.  We don't
+    % use \eatspaces, because this can cause ends of lines to be lost
+    % when the argument to \eatspaces is read, leading to line-based
+    % commands like "@itemize" not being read correctly.
   \else
-    \ifcase\paramno
-    % 0
+    \let\xeatspaces\relax % suppress expansion
+  \fi
+  \ifcase\paramno
+  % 0
+    \expandafter\xdef\csname\the\macname\endcsname{%
+      \bgroup
+        \noexpand\spaceisspace
+        \noexpand\endlineisspace
+        \noexpand\expandafter % skip any whitespace after the macro name.
+        \expandafter\noexpand\csname\the\macname @@@\endcsname}%
+    \expandafter\xdef\csname\the\macname @@@\endcsname{%
+      \egroup
+      \noexpand\scanmacro{\macrobody}}%
+  \or % 1
+    \expandafter\xdef\csname\the\macname\endcsname{%
+       \bgroup
+       \noexpand\braceorline
+       \expandafter\noexpand\csname\the\macname @@@\endcsname}%
+    \expandafter\xdef\csname\the\macname @@@\endcsname##1{%
+      \egroup
+      \noexpand\scanmacro{\macrobody}%
+      }%
+  \else % at most 9
+    \ifnum\paramno<10\relax
+      % @MACNAME sets the context for reading the macro argument
+      % @MACNAME@@ gets the argument, processes backslashes and appends a 
+      % comma.
+      % @MACNAME@@@ removes braces surrounding the argument list.
+      % @MACNAME@@@@ scans the macro body with arguments substituted.
       \expandafter\xdef\csname\the\macname\endcsname{%
-        \noexpand\norecurse{\the\macname}%
-        \noexpand\scanmacro{\temp}\egroup}%
-    \or % 1
+        \bgroup
+        \noexpand\expandafter  % This \expandafter skip any spaces after the
+        \noexpand\macroargctxt % macro before we change the catcode of space.
+        \noexpand\expandafter
+        \expandafter\noexpand\csname\the\macname @@\endcsname}%
+      \expandafter\xdef\csname\the\macname @@\endcsname##1{%
+          \noexpand\passargtomacro
+          \expandafter\noexpand\csname\the\macname @@@\endcsname{##1,}}%
+      \expandafter\xdef\csname\the\macname @@@\endcsname##1{%
+          \expandafter\noexpand\csname\the\macname @@@@\endcsname ##1}%
+      \expandafter\expandafter
+      \expandafter\xdef
+      \expandafter\expandafter
+        \csname\the\macname @@@@\endcsname\paramlist{%
+          \egroup\noexpand\scanmacro{\macrobody}}%
+    \else % 10 or more:
       \expandafter\xdef\csname\the\macname\endcsname{%
-         \bgroup\noexpand\macroargctxt
-         \noexpand\braceorline
-         \expandafter\noexpand\csname\the\macname xxx\endcsname}%
-      \expandafter\xdef\csname\the\macname xxx\endcsname##1{%
-        \egroup
-        \noexpand\norecurse{\the\macname}%
-        \noexpand\scanmacro{\temp}\egroup}%
-    \else % at most 9
-      \ifnum\paramno<10\relax
-        \expandafter\xdef\csname\the\macname\endcsname{%
-           \bgroup\noexpand\macroargctxt
-           \expandafter\noexpand\csname\the\macname xx\endcsname}%
-        \expandafter\xdef\csname\the\macname xx\endcsname##1{%
-            \expandafter\noexpand\csname\the\macname xxx\endcsname ##1,}%
-        \expandafter\expandafter
-        \expandafter\xdef
-        \expandafter\expandafter
-        \csname\the\macname xxx\endcsname
-        \paramlist{%
-            \egroup
-            \noexpand\norecurse{\the\macname}%
-            \noexpand\scanmacro{\temp}\egroup}%
-      \else % 10 or more:
-        \expandafter\xdef\csname\the\macname\endcsname{%
-          \noexpand\getargvals@{\the\macname}{\argl}%
-        }%
-        \global\expandafter\let\csname mac.\the\macname .body\endcsname\temp
-        \global\expandafter\let\csname mac.\the\macname .recurse\endcsname\norecurse
-      \fi
+        \noexpand\getargvals@{\the\macname}{\argl}%
+      }%
+      \global\expandafter\let\csname mac.\the\macname .body\endcsname\macrobody
+      \global\expandafter\let\csname mac.\the\macname .recurse\endcsname\gobble
     \fi
   \fi}
 
-\catcode `\@\texiatcatcode\relax
+\catcode `\@\texiatcatcode\relax % end private-to-Texinfo catcodes
 
 \def\norecurse#1{\bgroup\cslet{#1}{macsave.#1}}
 
-% \braceorline decides whether the next nonwhitespace character is a
-% {.  If so it reads up to the closing }, if not, it reads the whole
-% line.  Whatever was read is then fed to the next control sequence
-% as an argument (by \parsebrace or \parsearg).
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%
+{\catcode`\@=0 \catcode`\\=13  % We need to manipulate \ so use @ as escape
+@catcode`@_=11  % private names
+@catcode`@!=11  % used as argument separator
+
+% \passargtomacro#1#2 -
+% Call #1 with a list of tokens #2, with any doubled backslashes in #2
+% compressed to one.
+%
+% This implementation works by expansion, and not execution (so we cannot use 
+% \def or similar).  This reduces the risk of this failing in contexts where 
+% complete expansion is done with no execution (for example, in writing out to 
+% an auxiliary file for an index entry).
+% 
+% State is kept in the input stream: the argument passed to
+% @look_ahead, @gobble_and_check_finish and @add_segment is
+%
+% THE_MACRO ARG_RESULT ! {PENDING_BS} NEXT_TOKEN  (... rest of input)
+%
+% where:
+% THE_MACRO - name of the macro we want to call
+% ARG_RESULT - argument list we build to pass to that macro
+% PENDING_BS - either a backslash or nothing
+% NEXT_TOKEN - used to look ahead in the input stream to see what's coming next
+
+@gdef@passargtomacro#1#2{%
+  @add_segment #1!{}@relax#2\@_finish\%
+}
+@gdef@_finish{@_finishx} @global@let@_finishx@relax
+
+% #1 - THE_MACRO ARG_RESULT
+% #2 - PENDING_BS
+% #3 - NEXT_TOKEN
+% #4 used to look ahead
+%
+% If the next token is not a backslash, process the rest of the argument; 
+% otherwise, remove the next token.
+@gdef@look_ahead#1!#2#3#4{%
+  @ifx#4\%
+   @expandafter@gobble_and_check_finish 
+  @else
+   @expandafter@add_segment
+  @fi#1!{#2}#4#4%
+}
+
+% #1 - THE_MACRO ARG_RESULT
+% #2 - PENDING_BS
+% #3 - NEXT_TOKEN
+% #4 should be a backslash, which is gobbled.
+% #5 looks ahead
+%
+% Double backslash found.  Add a single backslash, and look ahead.
+@gdef@gobble_and_check_finish#1!#2#3#4#5{%
+  @add_segment#1\!{}#5#5%
+}
+
+@gdef@is_fi{@fi}
+
+% #1 - THE_MACRO ARG_RESULT
+% #2 - PENDING_BS
+% #3 - NEXT_TOKEN
+% #4 is input stream until next backslash
+%
+% Input stream is either at the start of the argument, or just after a 
+% backslash sequence, either a lone backslash, or a doubled backslash.  
+% NEXT_TOKEN contains the first token in the input stream: if it is \finish, 
+% finish; otherwise, append to ARG_RESULT the segment of the argument up until
+% the next backslash.  PENDING_BACKSLASH contains a backslash to represent
+% a backslash just before the start of the input stream that has not been
+% added to ARG_RESULT.
+@gdef@add_segment#1!#2#3#4\{%
+@ifx#3@_finish
+  @call_the_macro#1!%
+@else
+  % append the pending backslash to the result, followed by the next segment
+  @expandafter@is_fi@look_ahead#1#2#4!{\}@fi
+  % this @fi is discarded by @look_ahead.
+  % we can't get rid of it with \expandafter because we don't know how 
+  % long #4 is.
+}
+
+% #1 - THE_MACRO
+% #2 - ARG_RESULT
+% #3 discards the res of the conditional in @add_segment, and @is_fi ends the 
+% conditional.
+@gdef@call_the_macro#1#2!#3@fi{@is_fi #1{#2}}
+
+}
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+% \braceorline MAC is used for a one-argument macro MAC.  It checks
+% whether the next non-whitespace character is a {.  It sets the context
+% for reading the argument (slightly different in the two cases).  Then,
+% to read the argument, in the whole-line case, it then calls the regular
+% \parsearg MAC; in the lbrace case, it calls \passargtomacro MAC.
 % 
 \def\braceorline#1{\let\macnamexxx=#1\futurelet\nchar\braceorlinexxx}
 \def\braceorlinexxx{%
-  \ifx\nchar\bgroup\else
-    \expandafter\parsearg
+  \ifx\nchar\bgroup
+    \macroargctxt
+    \expandafter\passargtomacro
+  \else
+    \macrolineargctxt\expandafter\parsearg
   \fi \macnamexxx}
 
 
@@ -7782,7 +8769,10 @@ end
   \pdfmkdest{#1}%
   \iflinks
     {%
+      \requireauxfile
       \atdummies  % preserve commands, but don't expand them
+      % match definition in \xrdef, \refx, \xrefX.
+      \def\value##1{##1}%
       \edef\writexrdef##1##2{%
        \write\auxfile{@xrdef{#1-% #1 of \setref, expanded by the \edef
          ##1}{##2}}% these are parameters of \writexrdef
@@ -7821,9 +8811,12 @@ end
 % node name, #4 the name of the Info file, #5 the name of the printed
 % manual.  All but the node name can be omitted.
 %
-\def\pxref#1{\putwordsee{} \xrefX[#1,,,,,,,]}
-\def\xref#1{\putwordSee{} \xrefX[#1,,,,,,,]}
-\def\ref#1{\xrefX[#1,,,,,,,]}
+\def\pxref{\putwordsee{} \xrefXX}
+\def\xref{\putwordSee{} \xrefXX}
+\def\ref{\xrefXX}
+
+\def\xrefXX#1{\def\xrefXXarg{#1}\futurelet\tokenafterxref\xrefXXX}
+\def\xrefXXX{\expandafter\xrefX\expandafter[\xrefXXarg,,,,,,,]}
 %
 \newbox\toprefbox
 \newbox\printedrefnamebox
@@ -7870,9 +8863,10 @@ end
   %
   % Make link in pdf output.
   \ifpdf
+    % For pdfTeX and LuaTeX
     {\indexnofonts
-     \turnoffactive
      \makevalueexpandable
+     \turnoffactive
      % This expands tokens, so do it after making catcode changes, so _
      % etc. don't get their TeX definitions.  This ignores all spaces in
      % #4, including (wrongly) those in the middle of the filename.
@@ -7880,35 +8874,74 @@ end
      %
      % This (wrongly) does not take account of leading or trailing
      % spaces in #1, which should be ignored.
-     \edef\pdfxrefdest{#1}%
-     \ifx\pdfxrefdest\empty
-       \def\pdfxrefdest{Top}% no empty targets
-     \else
-       \txiescapepdf\pdfxrefdest  % escape PDF special chars
+     \setpdfdestname{#1}%
+     %
+     \ifx\pdfdestname\empty
+       \def\pdfdestname{Top}% no empty targets
      \fi
      %
      \leavevmode
      \startlink attr{/Border [0 0 0]}%
      \ifnum\filenamelength>0
-       goto file{\the\filename.pdf} name{\pdfxrefdest}%
+       goto file{\the\filename.pdf} name{\pdfdestname}%
      \else
-       goto name{\pdfmkpgn{\pdfxrefdest}}%
+       goto name{\pdfmkpgn{\pdfdestname}}%
      \fi
     }%
     \setcolor{\linkcolor}%
+  \else
+    \ifx\XeTeXrevision\thisisundefined
+    \else
+      % For XeTeX
+      {\indexnofonts
+       \makevalueexpandable
+       \turnoffactive
+       % This expands tokens, so do it after making catcode changes, so _
+       % etc. don't get their TeX definitions.  This ignores all spaces in
+       % #4, including (wrongly) those in the middle of the filename.
+       \getfilename{#4}%
+       %
+       % This (wrongly) does not take account of leading or trailing
+       % spaces in #1, which should be ignored.
+       \setpdfdestname{#1}%
+       %
+       \ifx\pdfdestname\empty
+         \def\pdfdestname{Top}% no empty targets
+       \fi
+       %
+       \leavevmode
+       \ifnum\filenamelength>0
+         % With default settings,
+         % XeTeX (xdvipdfmx) replaces link destination names with integers.
+         % In this case, the replaced destination names of
+         % remote PDFs are no longer known.  In order to avoid a replacement,
+         % you can use xdvipdfmx's command line option `-C 0x0010'.
+         % If you use XeTeX 0.99996+ (TeX Live 2016+),
+         % this command line option is no longer necessary
+         % because we can use the `dvipdfmx:config' special.
+         \special{pdf:bann << /Border [0 0 0] /Type /Annot /Subtype /Link /A
+           << /S /GoToR /F (\the\filename.pdf) /D (\pdfdestname) >> >>}%
+       \else
+         \special{pdf:bann << /Border [0 0 0] /Type /Annot /Subtype /Link /A
+           << /S /GoTo /D (\pdfdestname) >> >>}%
+       \fi
+      }%
+      \setcolor{\linkcolor}%
+    \fi
   \fi
-  %
-  % Float references are printed completely differently: "Figure 1.2"
-  % instead of "[somenode], p.3".  We distinguish them by the
-  % LABEL-title being set to a magic string.
   {%
     % Have to otherify everything special to allow the \csname to
     % include an _ in the xref name, etc.
     \indexnofonts
     \turnoffactive
+    \def\value##1{##1}%
     \expandafter\global\expandafter\let\expandafter\Xthisreftitle
       \csname XR#1-title\endcsname
   }%
+  %
+  % Float references are printed completely differently: "Figure 1.2"
+  % instead of "[somenode], p.3".  \iffloat distinguishes them by
+  % \Xthisreftitle being set to a magic string.
   \iffloat\Xthisreftitle
     % If the user specified the print name (third arg) to the ref,
     % print it instead of our usual "Figure 1.2".
@@ -7967,6 +9000,15 @@ end
       %
       % output the `page 3'.
       \turnoffactive \putwordpage\tie\refx{#1-pg}{}%
+      % Add a , if xref followed by a space
+      \if\space\noexpand\tokenafterxref ,%
+      \else\ifx\       \tokenafterxref ,% @TAB
+      \else\ifx\*\tokenafterxref ,%   @*
+      \else\ifx\ \tokenafterxref ,%   @SPACE
+      \else\ifx\
+                \tokenafterxref ,%    @NL
+      \else\ifx\tie\tokenafterxref ,% @tie
+      \fi\fi\fi\fi\fi\fi
     \fi\fi
   \fi
   \endlink
@@ -8033,13 +9075,14 @@ end
   \fi\fi\fi
 }
 
-% Define \refx{NAME}{SUFFIX} to reference a cross-reference string named NAME.
-% If its value is nonempty, SUFFIX is output afterward.
-%
+% \refx{NAME}{SUFFIX} - reference a cross-reference string named NAME.  SUFFIX 
+% is output afterwards if non-empty.
 \def\refx#1#2{%
+  \requireauxfile
   {%
     \indexnofonts
     \otherbackslash
+    \def\value##1{##1}%
     \expandafter\global\expandafter\let\expandafter\thisrefX
       \csname XR#1\endcsname
   }%
@@ -8064,20 +9107,28 @@ end
   #2% Output the suffix in any case.
 }
 
-% This is the macro invoked by entries in the aux file.  Usually it's
-% just a \def (we prepend XR to the control sequence name to avoid
-% collisions).  But if this is a float type, we have more work to do.
+% This is the macro invoked by entries in the aux file.  Define a control 
+% sequence for a cross-reference target (we prepend XR to the control sequence 
+% name to avoid collisions).  The value is the page number.  If this is a float 
+% type, we have more work to do.
 %
 \def\xrdef#1#2{%
-  {% The node name might contain 8-bit characters, which in our current
-   % implementation are changed to commands like @'e.  Don't let these
-   % mess up the control sequence name.
+  {% Expand the node or anchor name to remove control sequences.
+   % \turnoffactive stops 8-bit characters being changed to commands
+   % like @'e.  \refx does the same to retrieve the value in the definition.
     \indexnofonts
     \turnoffactive
+    \def\value##1{##1}%
     \xdef\safexrefname{#1}%
   }%
   %
-  \expandafter\gdef\csname XR\safexrefname\endcsname{#2}% remember this xref
+  \bgroup
+    \expandafter\gdef\csname XR\safexrefname\endcsname{#2}%
+  \egroup
+  % We put the \gdef inside a group to avoid the definitions building up on 
+  % TeX's save stack, which can cause it to run out of space for aux files with 
+  % thousands of lines.  \gdef doesn't use the save stack, but \csname does
+  % when it defines an unknown control sequence as \relax. 
   %
   % Was that xref control sequence that we just defined for a float?
   \expandafter\iffloat\csname XR\safexrefname\endcsname
@@ -8100,6 +9151,23 @@ end
   \fi
 }
 
+% If working on a large document in chapters, it is convenient to
+% be able to disable indexing, cross-referencing, and contents, for test runs.
+% This is done with @novalidate at the beginning of the file.
+%
+\newif\iflinks \linkstrue % by default we want the aux files.
+\let\novalidate = \linksfalse
+
+% Used when writing to the aux file, or when using data from it.
+\def\requireauxfile{%
+  \iflinks
+    \tryauxfile
+    % Open the new aux file.  TeX will close it automatically at exit.
+    \immediate\openout\auxfile=\jobname.aux
+  \fi
+  \global\let\requireauxfile=\relax   % Only do this once.
+}
+
 % Read the last existing aux file, if any.  No error if none exists.
 %
 \def\tryauxfile{%
@@ -8178,16 +9246,6 @@ end
   % now.  --karl, 15jan04.
   \catcode`\\=\other
   %
-  % Make the characters 128-255 be printing characters.
-  {%
-    \count1=128
-    \def\loop{%
-      \catcode\count1=\other
-      \advance\count1 by 1
-      \ifnum \count1<256 \loop \fi
-    }%
-  }%
-  %
   % @ is our escape character in .aux files, and we need braces.
   \catcode`\{=1
   \catcode`\}=2
@@ -8220,8 +9278,6 @@ end
 %
 % Auto-number footnotes.  Otherwise like plain.
 \gdef\footnote{%
-  \let\indent=\ptexindent
-  \let\noindent=\ptexnoindent
   \global\advance\footnoteno by \@ne
   \edef\thisfootno{$^{\the\footnoteno}$}%
   %
@@ -8245,10 +9301,15 @@ end
 %
 \gdef\dofootnote{%
   \insert\footins\bgroup
+  %
+  % Nested footnotes are not supported in TeX, that would take a lot
+  % more work.  (\startsavinginserts does not suffice.)
+  \let\footnote=\errfootnotenest
+  %
   % We want to typeset this text as a normal paragraph, even if the
   % footnote reference occurs in (for example) a display environment.
   % So reset some parameters.
-  \hsize=\pagewidth
+  \hsize=\txipagewidth
   \interlinepenalty\interfootnotelinepenalty
   \splittopskip\ht\strutbox % top baseline for broken footnotes
   \splitmaxdepth\dp\strutbox
@@ -8282,13 +9343,24 @@ end
 }
 }%end \catcode `\@=11
 
+\def\errfootnotenest{%
+  \errhelp=\EMsimple
+  \errmessage{Nested footnotes not supported in texinfo.tex,
+    even though they work in makeinfo; sorry}
+}
+
+\def\errfootnoteheading{%
+  \errhelp=\EMsimple
+  \errmessage{Footnotes in chapters, sections, etc., are not supported}
+}
+
 % In case a @footnote appears in a vbox, save the footnote text and create
 % the real \insert just after the vbox finished.  Otherwise, the insertion
 % would be lost.
 % Similarly, if a @footnote appears inside an alignment, save the footnote
 % text to a box and make the \insert when a row of the table is finished.
 % And the same can be done for other insert classes.  --kasal, 16nov03.
-
+%
 % Replace the \insert primitive by a cheating macro.
 % Deeper inside, just make sure that the saved insertions are not spilled
 % out prematurely.
@@ -8386,6 +9458,7 @@ end
 \def\imagexxx#1,#2,#3,#4,#5,#6\finish{\begingroup
   \catcode`\^^M = 5     % in case we're inside an example
   \normalturnoffactive  % allow _ et al. in names
+  \def\xprocessmacroarg{\eatspaces}% in case we are being used via a macro
   % If the image is by itself, center it.
   \ifvmode
     \imagevmodetrue
@@ -8415,12 +9488,21 @@ end
   %
   % Output the image.
   \ifpdf
+    % For pdfTeX and LuaTeX <= 0.80
     \dopdfimage{#1}{#2}{#3}%
   \else
-    % \epsfbox itself resets \epsf?size at each figure.
-    \setbox0 = \hbox{\ignorespaces #2}\ifdim\wd0 > 0pt \epsfxsize=#2\relax \fi
-    \setbox0 = \hbox{\ignorespaces #3}\ifdim\wd0 > 0pt \epsfysize=#3\relax \fi
-    \epsfbox{#1.eps}%
+    \ifx\XeTeXrevision\thisisundefined
+      % For epsf.tex
+      % \epsfbox itself resets \epsf?size at each figure.
+      \setbox0 = \hbox{\ignorespaces #2}%
+        \ifdim\wd0 > 0pt \epsfxsize=#2\relax \fi
+      \setbox0 = \hbox{\ignorespaces #3}%
+        \ifdim\wd0 > 0pt \epsfysize=#3\relax \fi
+      \epsfbox{#1.eps}%
+    \else
+      % For XeTeX
+      \doxeteximage{#1}{#2}{#3}%
+    \fi
   \fi
   %
   \ifimagevmode
@@ -8542,7 +9624,7 @@ end
     %
     \ifx\thiscaption\empty \else
       \ifx\floatident\empty \else
-       \appendtomacro\captionline{: }% had ident, so need a colon between
+        \appendtomacro\captionline{: }% had ident, so need a colon between
       \fi
       %
       % caption text.
@@ -8566,32 +9648,20 @@ end
       % \floatlabel-lof.  Besides \floatident, we include the short
       % caption if specified, else the full caption if specified, else nothing.
       {%
+        \requireauxfile
         \atdummies
         %
-        % since we read the caption text in the macro world, where ^^M
-        % is turned into a normal character, we have to scan it back, so
-        % we don't write the literal three characters "^^M" into the aux file.
-       \scanexp{%
-         \xdef\noexpand\gtemp{%
-           \ifx\thisshortcaption\empty
-             \thiscaption
-           \else
-             \thisshortcaption
-           \fi
-         }%
-       }%
+        \ifx\thisshortcaption\empty
+          \def\gtemp{\thiscaption}%
+        \else
+          \def\gtemp{\thisshortcaption}%
+        \fi
         \immediate\write\auxfile{@xrdef{\floatlabel-lof}{\floatident
-         \ifx\gtemp\empty \else : \gtemp \fi}}%
+          \ifx\gtemp\empty \else : \gtemp \fi}}%
       }%
     \fi
   \egroup  % end of \vtop
   %
-  % place the captured inserts
-  %
-  % BEWARE: when the floats start floating, we have to issue warning
-  % whenever an insert appears inside a float which could possibly
-  % float. --kasal, 26may04
-  %
   \checkinserts
 }
 
@@ -8705,20 +9775,20 @@ end
 {
   \catcode`\_ = \active
   \globaldefs=1
-\parseargdef\documentlanguage{\begingroup
-  \let_=\normalunderscore  % normal _ character for filenames
+\parseargdef\documentlanguage{%
   \tex % read txi-??.tex file in plain TeX.
     % Read the file by the name they passed if it exists.
+    \let_ = \normalunderscore  % normal _ character for filename test
     \openin 1 txi-#1.tex
     \ifeof 1
-      \documentlanguagetrywithoutunderscore{#1_\finish}%
+      \documentlanguagetrywithoutunderscore #1_\finish
     \else
       \globaldefs = 1  % everything in the txi-LL files needs to persist
       \input txi-#1.tex
     \fi
     \closein 1
   \endgroup % end raw TeX
-\endgroup}
+}
 %
 % If they passed de_DE, and txi-de_DE.tex doesn't exist,
 % try txi-de.tex.
@@ -8766,6 +9836,70 @@ directory should work if nowhere else does.}
   \global\righthyphenmin = #3\relax
 }
 
+% XeTeX and LuaTeX can handle Unicode natively.
+% Their default I/O uses UTF-8 sequences instead of a byte-wise operation.
+% Other TeX engines' I/O (pdfTeX, etc.) is byte-wise.
+%
+\newif\iftxinativeunicodecapable
+\newif\iftxiusebytewiseio
+
+\ifx\XeTeXrevision\thisisundefined
+  \ifx\luatexversion\thisisundefined
+    \txinativeunicodecapablefalse
+    \txiusebytewiseiotrue
+  \else
+    \txinativeunicodecapabletrue
+    \txiusebytewiseiofalse
+  \fi
+\else
+  \txinativeunicodecapabletrue
+  \txiusebytewiseiofalse
+\fi
+
+% Set I/O by bytes instead of UTF-8 sequence for XeTeX and LuaTex
+% for non-UTF-8 (byte-wise) encodings.
+%
+\def\setbytewiseio{%
+  \ifx\XeTeXrevision\thisisundefined
+  \else
+    \XeTeXdefaultencoding "bytes"  % For subsequent files to be read
+    \XeTeXinputencoding "bytes"  % For document root file
+    % Unfortunately, there seems to be no corresponding XeTeX command for
+    % output encoding.  This is a problem for auxiliary index and TOC files.
+    % The only solution would be perhaps to write out @U{...} sequences in
+    % place of non-ASCII characters.
+  \fi
+
+  \ifx\luatexversion\thisisundefined
+  \else
+    \directlua{
+    local utf8_char, byte, gsub = unicode.utf8.char, string.byte, string.gsub
+    local function convert_char (char)
+      return utf8_char(byte(char))
+    end
+
+    local function convert_line (line)
+      return gsub(line, ".", convert_char)
+    end
+
+    callback.register("process_input_buffer", convert_line)
+
+    local function convert_line_out (line)
+      local line_out = ""
+      for c in string.utfvalues(line) do
+         line_out = line_out .. string.char(c)
+      end
+      return line_out
+    end
+
+    callback.register("process_output_buffer", convert_line_out)
+    }
+  \fi
+
+  \txiusebytewiseiotrue
+}
+
+
 % Helpers for encodings.
 % Set the catcode of characters 128 through 255 to the specified number.
 %
@@ -8788,7 +9922,9 @@ directory should work if nowhere else does.}
 % @documentencoding sets the definition of non-ASCII characters
 % according to the specified encoding.
 %
-\parseargdef\documentencoding{%
+\def\documentencoding{\parseargusing\filenamecatcodes\documentencodingzzz}
+\def\documentencodingzzz#1{%
+  %
   % Encoding being declared for the document.
   \def\declaredencoding{\csname #1.enc\endcsname}%
   %
@@ -8804,35 +9940,66 @@ directory should work if nowhere else does.}
      \asciichardefs
   %
   \else \ifx \declaredencoding \lattwo
+     \iftxinativeunicodecapable
+       \setbytewiseio
+     \fi
      \setnonasciicharscatcode\active
      \lattwochardefs
   %
   \else \ifx \declaredencoding \latone
+     \iftxinativeunicodecapable
+       \setbytewiseio
+     \fi
      \setnonasciicharscatcode\active
      \latonechardefs
   %
   \else \ifx \declaredencoding \latnine
+     \iftxinativeunicodecapable
+       \setbytewiseio
+     \fi
      \setnonasciicharscatcode\active
      \latninechardefs
   %
   \else \ifx \declaredencoding \utfeight
-     \setnonasciicharscatcode\active
-     \utfeightchardefs
+     \iftxinativeunicodecapable
+       % For native Unicode handling (XeTeX and LuaTeX)
+       \nativeunicodechardefs
+     \else
+       % For treating UTF-8 as byte sequences (TeX, eTeX and pdfTeX)
+       \setnonasciicharscatcode\active
+       % since we already invoked \utfeightchardefs at the top level
+       % (below), do not re-invoke it, otherwise our check for duplicated
+       % definitions gets triggered.  Making non-ascii chars active is
+       % sufficient.
+     \fi
   %
   \else
-    \message{Unknown document encoding #1, ignoring.}%
+    \message{Ignoring unknown document encoding: #1.}%
   %
   \fi % utfeight
   \fi % latnine
   \fi % latone
   \fi % lattwo
   \fi % ascii
+  %
+  \ifx\XeTeXrevision\thisisundefined
+  \else
+    \ifx \declaredencoding \utfeight
+    \else
+      \ifx \declaredencoding \ascii
+      \else
+        \message{Warning: XeTeX with non-UTF-8 encodings cannot handle %
+        non-ASCII characters in auxiliary files.}%
+      \fi
+    \fi
+  \fi
 }
 
+% emacs-page
 % A message to be logged when using a character that isn't available
 % the default font encoding (OT1).
 %
-\def\missingcharmsg#1{\message{Character missing in OT1 encoding: #1.}}
+\def\missingcharmsg#1{\message{Character missing, sorry: #1.}}
 
 % Take account of \c (plain) vs. \, (Texinfo) difference.
 \def\cedilla#1{\ifx\c\ptexc\c{#1}\else\,{#1}\fi}
@@ -8842,111 +10009,119 @@ directory should work if nowhere else does.}
 % macros containing the character definitions.
 \setnonasciicharscatcode\active
 %
+
+\def\gdefchar#1#2{%
+\gdef#1{%
+   \ifpassthroughchars
+     \string#1%
+   \else
+     #2%
+   \fi
+}}
+
 % Latin1 (ISO-8859-1) character definitions.
 \def\latonechardefs{%
-  \gdef^^a0{\tie}
-  \gdef^^a1{\exclamdown}
-  \gdef^^a2{\missingcharmsg{CENT SIGN}}
-  \gdef^^a3{{\pounds}}
-  \gdef^^a4{\missingcharmsg{CURRENCY SIGN}}
-  \gdef^^a5{\missingcharmsg{YEN SIGN}}
-  \gdef^^a6{\missingcharmsg{BROKEN BAR}}
-  \gdef^^a7{\S}
-  \gdef^^a8{\"{}}
-  \gdef^^a9{\copyright}
-  \gdef^^aa{\ordf}
-  \gdef^^ab{\guillemetleft}
-  \gdef^^ac{$\lnot$}
-  \gdef^^ad{\-}
-  \gdef^^ae{\registeredsymbol}
-  \gdef^^af{\={}}
-  %
-  \gdef^^b0{\textdegree}
-  \gdef^^b1{$\pm$}
-  \gdef^^b2{$^2$}
-  \gdef^^b3{$^3$}
-  \gdef^^b4{\'{}}
-  \gdef^^b5{$\mu$}
-  \gdef^^b6{\P}
-  %
-  \gdef^^b7{$^.$}
-  \gdef^^b8{\cedilla\ }
-  \gdef^^b9{$^1$}
-  \gdef^^ba{\ordm}
-  %
-  \gdef^^bb{\guillemetright}
-  \gdef^^bc{$1\over4$}
-  \gdef^^bd{$1\over2$}
-  \gdef^^be{$3\over4$}
-  \gdef^^bf{\questiondown}
-  %
-  \gdef^^c0{\`A}
-  \gdef^^c1{\'A}
-  \gdef^^c2{\^A}
-  \gdef^^c3{\~A}
-  \gdef^^c4{\"A}
-  \gdef^^c5{\ringaccent A}
-  \gdef^^c6{\AE}
-  \gdef^^c7{\cedilla C}
-  \gdef^^c8{\`E}
-  \gdef^^c9{\'E}
-  \gdef^^ca{\^E}
-  \gdef^^cb{\"E}
-  \gdef^^cc{\`I}
-  \gdef^^cd{\'I}
-  \gdef^^ce{\^I}
-  \gdef^^cf{\"I}
-  %
-  \gdef^^d0{\DH}
-  \gdef^^d1{\~N}
-  \gdef^^d2{\`O}
-  \gdef^^d3{\'O}
-  \gdef^^d4{\^O}
-  \gdef^^d5{\~O}
-  \gdef^^d6{\"O}
-  \gdef^^d7{$\times$}
-  \gdef^^d8{\O}
-  \gdef^^d9{\`U}
-  \gdef^^da{\'U}
-  \gdef^^db{\^U}
-  \gdef^^dc{\"U}
-  \gdef^^dd{\'Y}
-  \gdef^^de{\TH}
-  \gdef^^df{\ss}
-  %
-  \gdef^^e0{\`a}
-  \gdef^^e1{\'a}
-  \gdef^^e2{\^a}
-  \gdef^^e3{\~a}
-  \gdef^^e4{\"a}
-  \gdef^^e5{\ringaccent a}
-  \gdef^^e6{\ae}
-  \gdef^^e7{\cedilla c}
-  \gdef^^e8{\`e}
-  \gdef^^e9{\'e}
-  \gdef^^ea{\^e}
-  \gdef^^eb{\"e}
-  \gdef^^ec{\`{\dotless i}}
-  \gdef^^ed{\'{\dotless i}}
-  \gdef^^ee{\^{\dotless i}}
-  \gdef^^ef{\"{\dotless i}}
-  %
-  \gdef^^f0{\dh}
-  \gdef^^f1{\~n}
-  \gdef^^f2{\`o}
-  \gdef^^f3{\'o}
-  \gdef^^f4{\^o}
-  \gdef^^f5{\~o}
-  \gdef^^f6{\"o}
-  \gdef^^f7{$\div$}
-  \gdef^^f8{\o}
-  \gdef^^f9{\`u}
-  \gdef^^fa{\'u}
-  \gdef^^fb{\^u}
-  \gdef^^fc{\"u}
-  \gdef^^fd{\'y}
-  \gdef^^fe{\th}
-  \gdef^^ff{\"y}
+  \gdefchar^^a0{\tie}
+  \gdefchar^^a1{\exclamdown}
+  \gdefchar^^a2{{\tcfont \char162}} % cent
+  \gdefchar^^a3{\pounds{}}
+  \gdefchar^^a4{{\tcfont \char164}} % currency
+  \gdefchar^^a5{{\tcfont \char165}} % yen
+  \gdefchar^^a6{{\tcfont \char166}} % broken bar
+  \gdefchar^^a7{\S}
+  \gdefchar^^a8{\"{}}
+  \gdefchar^^a9{\copyright{}}
+  \gdefchar^^aa{\ordf}
+  \gdefchar^^ab{\guillemetleft{}}
+  \gdefchar^^ac{\ensuremath\lnot}
+  \gdefchar^^ad{\-}
+  \gdefchar^^ae{\registeredsymbol{}}
+  \gdefchar^^af{\={}}
+  %
+  \gdefchar^^b0{\textdegree}
+  \gdefchar^^b1{$\pm$}
+  \gdefchar^^b2{$^2$}
+  \gdefchar^^b3{$^3$}
+  \gdefchar^^b4{\'{}}
+  \gdefchar^^b5{$\mu$}
+  \gdefchar^^b6{\P}
+  \gdefchar^^b7{\ensuremath\cdot}
+  \gdefchar^^b8{\cedilla\ }
+  \gdefchar^^b9{$^1$}
+  \gdefchar^^ba{\ordm}
+  \gdefchar^^bb{\guillemetright{}}
+  \gdefchar^^bc{$1\over4$}
+  \gdefchar^^bd{$1\over2$}
+  \gdefchar^^be{$3\over4$}
+  \gdefchar^^bf{\questiondown}
+  %
+  \gdefchar^^c0{\`A}
+  \gdefchar^^c1{\'A}
+  \gdefchar^^c2{\^A}
+  \gdefchar^^c3{\~A}
+  \gdefchar^^c4{\"A}
+  \gdefchar^^c5{\ringaccent A}
+  \gdefchar^^c6{\AE}
+  \gdefchar^^c7{\cedilla C}
+  \gdefchar^^c8{\`E}
+  \gdefchar^^c9{\'E}
+  \gdefchar^^ca{\^E}
+  \gdefchar^^cb{\"E}
+  \gdefchar^^cc{\`I}
+  \gdefchar^^cd{\'I}
+  \gdefchar^^ce{\^I}
+  \gdefchar^^cf{\"I}
+  %
+  \gdefchar^^d0{\DH}
+  \gdefchar^^d1{\~N}
+  \gdefchar^^d2{\`O}
+  \gdefchar^^d3{\'O}
+  \gdefchar^^d4{\^O}
+  \gdefchar^^d5{\~O}
+  \gdefchar^^d6{\"O}
+  \gdefchar^^d7{$\times$}
+  \gdefchar^^d8{\O}
+  \gdefchar^^d9{\`U}
+  \gdefchar^^da{\'U}
+  \gdefchar^^db{\^U}
+  \gdefchar^^dc{\"U}
+  \gdefchar^^dd{\'Y}
+  \gdefchar^^de{\TH}
+  \gdefchar^^df{\ss}
+  %
+  \gdefchar^^e0{\`a}
+  \gdefchar^^e1{\'a}
+  \gdefchar^^e2{\^a}
+  \gdefchar^^e3{\~a}
+  \gdefchar^^e4{\"a}
+  \gdefchar^^e5{\ringaccent a}
+  \gdefchar^^e6{\ae}
+  \gdefchar^^e7{\cedilla c}
+  \gdefchar^^e8{\`e}
+  \gdefchar^^e9{\'e}
+  \gdefchar^^ea{\^e}
+  \gdefchar^^eb{\"e}
+  \gdefchar^^ec{\`{\dotless i}}
+  \gdefchar^^ed{\'{\dotless i}}
+  \gdefchar^^ee{\^{\dotless i}}
+  \gdefchar^^ef{\"{\dotless i}}
+  %
+  \gdefchar^^f0{\dh}
+  \gdefchar^^f1{\~n}
+  \gdefchar^^f2{\`o}
+  \gdefchar^^f3{\'o}
+  \gdefchar^^f4{\^o}
+  \gdefchar^^f5{\~o}
+  \gdefchar^^f6{\"o}
+  \gdefchar^^f7{$\div$}
+  \gdefchar^^f8{\o}
+  \gdefchar^^f9{\`u}
+  \gdefchar^^fa{\'u}
+  \gdefchar^^fb{\^u}
+  \gdefchar^^fc{\"u}
+  \gdefchar^^fd{\'y}
+  \gdefchar^^fe{\th}
+  \gdefchar^^ff{\"y}
 }
 
 % Latin9 (ISO-8859-15) encoding character definitions.
@@ -8954,119 +10129,119 @@ directory should work if nowhere else does.}
   % Encoding is almost identical to Latin1.
   \latonechardefs
   %
-  \gdef^^a4{\euro}
-  \gdef^^a6{\v S}
-  \gdef^^a8{\v s}
-  \gdef^^b4{\v Z}
-  \gdef^^b8{\v z}
-  \gdef^^bc{\OE}
-  \gdef^^bd{\oe}
-  \gdef^^be{\"Y}
+  \gdefchar^^a4{\euro{}}
+  \gdefchar^^a6{\v S}
+  \gdefchar^^a8{\v s}
+  \gdefchar^^b4{\v Z}
+  \gdefchar^^b8{\v z}
+  \gdefchar^^bc{\OE}
+  \gdefchar^^bd{\oe}
+  \gdefchar^^be{\"Y}
 }
 
 % Latin2 (ISO-8859-2) character definitions.
 \def\lattwochardefs{%
-  \gdef^^a0{\tie}
-  \gdef^^a1{\ogonek{A}}
-  \gdef^^a2{\u{}}
-  \gdef^^a3{\L}
-  \gdef^^a4{\missingcharmsg{CURRENCY SIGN}}
-  \gdef^^a5{\v L}
-  \gdef^^a6{\'S}
-  \gdef^^a7{\S}
-  \gdef^^a8{\"{}}
-  \gdef^^a9{\v S}
-  \gdef^^aa{\cedilla S}
-  \gdef^^ab{\v T}
-  \gdef^^ac{\'Z}
-  \gdef^^ad{\-}
-  \gdef^^ae{\v Z}
-  \gdef^^af{\dotaccent Z}
-  %
-  \gdef^^b0{\textdegree}
-  \gdef^^b1{\ogonek{a}}
-  \gdef^^b2{\ogonek{ }}
-  \gdef^^b3{\l}
-  \gdef^^b4{\'{}}
-  \gdef^^b5{\v l}
-  \gdef^^b6{\'s}
-  \gdef^^b7{\v{}}
-  \gdef^^b8{\cedilla\ }
-  \gdef^^b9{\v s}
-  \gdef^^ba{\cedilla s}
-  \gdef^^bb{\v t}
-  \gdef^^bc{\'z}
-  \gdef^^bd{\H{}}
-  \gdef^^be{\v z}
-  \gdef^^bf{\dotaccent z}
-  %
-  \gdef^^c0{\'R}
-  \gdef^^c1{\'A}
-  \gdef^^c2{\^A}
-  \gdef^^c3{\u A}
-  \gdef^^c4{\"A}
-  \gdef^^c5{\'L}
-  \gdef^^c6{\'C}
-  \gdef^^c7{\cedilla C}
-  \gdef^^c8{\v C}
-  \gdef^^c9{\'E}
-  \gdef^^ca{\ogonek{E}}
-  \gdef^^cb{\"E}
-  \gdef^^cc{\v E}
-  \gdef^^cd{\'I}
-  \gdef^^ce{\^I}
-  \gdef^^cf{\v D}
-  %
-  \gdef^^d0{\DH}
-  \gdef^^d1{\'N}
-  \gdef^^d2{\v N}
-  \gdef^^d3{\'O}
-  \gdef^^d4{\^O}
-  \gdef^^d5{\H O}
-  \gdef^^d6{\"O}
-  \gdef^^d7{$\times$}
-  \gdef^^d8{\v R}
-  \gdef^^d9{\ringaccent U}
-  \gdef^^da{\'U}
-  \gdef^^db{\H U}
-  \gdef^^dc{\"U}
-  \gdef^^dd{\'Y}
-  \gdef^^de{\cedilla T}
-  \gdef^^df{\ss}
-  %
-  \gdef^^e0{\'r}
-  \gdef^^e1{\'a}
-  \gdef^^e2{\^a}
-  \gdef^^e3{\u a}
-  \gdef^^e4{\"a}
-  \gdef^^e5{\'l}
-  \gdef^^e6{\'c}
-  \gdef^^e7{\cedilla c}
-  \gdef^^e8{\v c}
-  \gdef^^e9{\'e}
-  \gdef^^ea{\ogonek{e}}
-  \gdef^^eb{\"e}
-  \gdef^^ec{\v e}
-  \gdef^^ed{\'{\dotless{i}}}
-  \gdef^^ee{\^{\dotless{i}}}
-  \gdef^^ef{\v d}
-  %
-  \gdef^^f0{\dh}
-  \gdef^^f1{\'n}
-  \gdef^^f2{\v n}
-  \gdef^^f3{\'o}
-  \gdef^^f4{\^o}
-  \gdef^^f5{\H o}
-  \gdef^^f6{\"o}
-  \gdef^^f7{$\div$}
-  \gdef^^f8{\v r}
-  \gdef^^f9{\ringaccent u}
-  \gdef^^fa{\'u}
-  \gdef^^fb{\H u}
-  \gdef^^fc{\"u}
-  \gdef^^fd{\'y}
-  \gdef^^fe{\cedilla t}
-  \gdef^^ff{\dotaccent{}}
+  \gdefchar^^a0{\tie}
+  \gdefchar^^a1{\ogonek{A}}
+  \gdefchar^^a2{\u{}}
+  \gdefchar^^a3{\L}
+  \gdefchar^^a4{\missingcharmsg{CURRENCY SIGN}}
+  \gdefchar^^a5{\v L}
+  \gdefchar^^a6{\'S}
+  \gdefchar^^a7{\S}
+  \gdefchar^^a8{\"{}}
+  \gdefchar^^a9{\v S}
+  \gdefchar^^aa{\cedilla S}
+  \gdefchar^^ab{\v T}
+  \gdefchar^^ac{\'Z}
+  \gdefchar^^ad{\-}
+  \gdefchar^^ae{\v Z}
+  \gdefchar^^af{\dotaccent Z}
+  %
+  \gdefchar^^b0{\textdegree{}}
+  \gdefchar^^b1{\ogonek{a}}
+  \gdefchar^^b2{\ogonek{ }}
+  \gdefchar^^b3{\l}
+  \gdefchar^^b4{\'{}}
+  \gdefchar^^b5{\v l}
+  \gdefchar^^b6{\'s}
+  \gdefchar^^b7{\v{}}
+  \gdefchar^^b8{\cedilla\ }
+  \gdefchar^^b9{\v s}
+  \gdefchar^^ba{\cedilla s}
+  \gdefchar^^bb{\v t}
+  \gdefchar^^bc{\'z}
+  \gdefchar^^bd{\H{}}
+  \gdefchar^^be{\v z}
+  \gdefchar^^bf{\dotaccent z}
+  %
+  \gdefchar^^c0{\'R}
+  \gdefchar^^c1{\'A}
+  \gdefchar^^c2{\^A}
+  \gdefchar^^c3{\u A}
+  \gdefchar^^c4{\"A}
+  \gdefchar^^c5{\'L}
+  \gdefchar^^c6{\'C}
+  \gdefchar^^c7{\cedilla C}
+  \gdefchar^^c8{\v C}
+  \gdefchar^^c9{\'E}
+  \gdefchar^^ca{\ogonek{E}}
+  \gdefchar^^cb{\"E}
+  \gdefchar^^cc{\v E}
+  \gdefchar^^cd{\'I}
+  \gdefchar^^ce{\^I}
+  \gdefchar^^cf{\v D}
+  %
+  \gdefchar^^d0{\DH}
+  \gdefchar^^d1{\'N}
+  \gdefchar^^d2{\v N}
+  \gdefchar^^d3{\'O}
+  \gdefchar^^d4{\^O}
+  \gdefchar^^d5{\H O}
+  \gdefchar^^d6{\"O}
+  \gdefchar^^d7{$\times$}
+  \gdefchar^^d8{\v R}
+  \gdefchar^^d9{\ringaccent U}
+  \gdefchar^^da{\'U}
+  \gdefchar^^db{\H U}
+  \gdefchar^^dc{\"U}
+  \gdefchar^^dd{\'Y}
+  \gdefchar^^de{\cedilla T}
+  \gdefchar^^df{\ss}
+  %
+  \gdefchar^^e0{\'r}
+  \gdefchar^^e1{\'a}
+  \gdefchar^^e2{\^a}
+  \gdefchar^^e3{\u a}
+  \gdefchar^^e4{\"a}
+  \gdefchar^^e5{\'l}
+  \gdefchar^^e6{\'c}
+  \gdefchar^^e7{\cedilla c}
+  \gdefchar^^e8{\v c}
+  \gdefchar^^e9{\'e}
+  \gdefchar^^ea{\ogonek{e}}
+  \gdefchar^^eb{\"e}
+  \gdefchar^^ec{\v e}
+  \gdefchar^^ed{\'{\dotless{i}}}
+  \gdefchar^^ee{\^{\dotless{i}}}
+  \gdefchar^^ef{\v d}
+  %
+  \gdefchar^^f0{\dh}
+  \gdefchar^^f1{\'n}
+  \gdefchar^^f2{\v n}
+  \gdefchar^^f3{\'o}
+  \gdefchar^^f4{\^o}
+  \gdefchar^^f5{\H o}
+  \gdefchar^^f6{\"o}
+  \gdefchar^^f7{$\div$}
+  \gdefchar^^f8{\v r}
+  \gdefchar^^f9{\ringaccent u}
+  \gdefchar^^fa{\'u}
+  \gdefchar^^fb{\H u}
+  \gdefchar^^fc{\"u}
+  \gdefchar^^fd{\'y}
+  \gdefchar^^fe{\cedilla t}
+  \gdefchar^^ff{\dotaccent{}}
 }
 
 % UTF-8 character definitions.
@@ -9096,38 +10271,94 @@ directory should work if nowhere else does.}
   \fi
 }
 
+% Give non-ASCII bytes the active definitions for processing UTF-8 sequences
 \begingroup
   \catcode`\~13
+  \catcode`\$12
   \catcode`\"12
 
+  % Loop from \countUTFx to \countUTFy, performing \UTFviiiTmp
+  % substituting ~ and $ with a character token of that value.
   \def\UTFviiiLoop{%
     \global\catcode\countUTFx\active
     \uccode`\~\countUTFx
+    \uccode`\$\countUTFx
     \uppercase\expandafter{\UTFviiiTmp}%
     \advance\countUTFx by 1
     \ifnum\countUTFx < \countUTFy
       \expandafter\UTFviiiLoop
     \fi}
 
+  % For bytes other than the first in a UTF-8 sequence.  Not expected to
+  % be expanded except when writing to auxiliary files.
+  \countUTFx = "80
+  \countUTFy = "C2
+  \def\UTFviiiTmp{%
+    \gdef~{%
+        \ifpassthroughchars $\fi}}%
+  \UTFviiiLoop
+
   \countUTFx = "C2
   \countUTFy = "E0
   \def\UTFviiiTmp{%
-    \xdef~{\noexpand\UTFviiiTwoOctets\string~}}
+    \gdef~{%
+        \ifpassthroughchars $%
+        \else\expandafter\UTFviiiTwoOctets\expandafter$\fi}}%
   \UTFviiiLoop
 
   \countUTFx = "E0
   \countUTFy = "F0
   \def\UTFviiiTmp{%
-    \xdef~{\noexpand\UTFviiiThreeOctets\string~}}
+    \gdef~{%
+        \ifpassthroughchars $%
+        \else\expandafter\UTFviiiThreeOctets\expandafter$\fi}}%
   \UTFviiiLoop
 
   \countUTFx = "F0
   \countUTFy = "F4
   \def\UTFviiiTmp{%
-    \xdef~{\noexpand\UTFviiiFourOctets\string~}}
+    \gdef~{%
+        \ifpassthroughchars $%
+        \else\expandafter\UTFviiiFourOctets\expandafter$\fi
+        }}%
   \UTFviiiLoop
 \endgroup
 
+\def\globallet{\global\let} % save some \expandafter's below
+
+% @U{xxxx} to produce U+xxxx, if we support it.
+\def\U#1{%
+  \expandafter\ifx\csname uni:#1\endcsname \relax
+    \iftxinativeunicodecapable
+      % All Unicode characters can be used if native Unicode handling is
+      % active.  However, if the font does not have the glyph,
+      % letters are missing.
+      \begingroup
+        \uccode`\.="#1\relax
+        \uppercase{.}
+      \endgroup
+    \else
+      \errhelp = \EMsimple     
+      \errmessage{Unicode character U+#1 not supported, sorry}%
+    \fi
+  \else
+    \csname uni:#1\endcsname
+  \fi
+}
+
+% These macros are used here to construct the name of a control
+% sequence to be defined.
+\def\UTFviiiTwoOctetsName#1#2{%
+  \csname u8:#1\string #2\endcsname}%
+\def\UTFviiiThreeOctetsName#1#2#3{%
+  \csname u8:#1\string #2\string #3\endcsname}%
+\def\UTFviiiFourOctetsName#1#2#3#4{%
+  \csname u8:#1\string #2\string #3\string #4\endcsname}%
+
+% For UTF-8 byte sequences (TeX, e-TeX and pdfTeX),
+% provide a definition macro to replace a Unicode character;
+% this gets used by the @U command
+%
 \begingroup
   \catcode`\"=12
   \catcode`\<=12
@@ -9136,459 +10367,849 @@ directory should work if nowhere else does.}
   \catcode`\;=12
   \catcode`\!=12
   \catcode`\~=13
-
-  \gdef\DeclareUnicodeCharacter#1#2{%
+  \gdef\DeclareUnicodeCharacterUTFviii#1#2{%
     \countUTFz = "#1\relax
-    %\wlog{\space\space defining Unicode char U+#1 (decimal \the\countUTFz)}%
     \begingroup
       \parseXMLCharref
-      \def\UTFviiiTwoOctets##1##2{%
-        \csname u8:##1\string ##2\endcsname}%
-      \def\UTFviiiThreeOctets##1##2##3{%
-        \csname u8:##1\string ##2\string ##3\endcsname}%
-      \def\UTFviiiFourOctets##1##2##3##4{%
-        \csname u8:##1\string ##2\string ##3\string ##4\endcsname}%
-      \expandafter\expandafter\expandafter\expandafter
-       \expandafter\expandafter\expandafter
-       \gdef\UTFviiiTmp{#2}%
+    
+      % Give \u8:... its definition.  The sequence of seven \expandafter's
+      % expands after the \gdef three times, e.g.
+      %
+      % 1.  \UTFviiTwoOctetsName B1 B2
+      % 2.  \csname u8:B1 \string B2 \endcsname
+      % 3.  \u8: B1 B2  (a single control sequence token)
+      %
+      \expandafter\expandafter
+      \expandafter\expandafter
+      \expandafter\expandafter
+      \expandafter\gdef       \UTFviiiTmp{#2}%
+      % 
+      \expandafter\ifx\csname uni:#1\endcsname \relax \else
+       \message{Internal error, already defined: #1}%
+      \fi
+      %
+      % define an additional control sequence for this code point.
+      \expandafter\globallet\csname uni:#1\endcsname \UTFviiiTmp
     \endgroup}
-
+  %
+  % Given the value in \countUTFz as a Unicode code point, set \UTFviiiTmp
+  % to the corresponding UTF-8 sequence.
   \gdef\parseXMLCharref{%
     \ifnum\countUTFz < "A0\relax
       \errhelp = \EMsimple
       \errmessage{Cannot define Unicode char value < 00A0}%
     \else\ifnum\countUTFz < "800\relax
       \parseUTFviiiA,%
-      \parseUTFviiiB C\UTFviiiTwoOctets.,%
+      \parseUTFviiiB C\UTFviiiTwoOctetsName.,%
     \else\ifnum\countUTFz < "10000\relax
       \parseUTFviiiA;%
       \parseUTFviiiA,%
-      \parseUTFviiiB E\UTFviiiThreeOctets.{,;}%
+      \parseUTFviiiB E\UTFviiiThreeOctetsName.{,;}%
     \else
       \parseUTFviiiA;%
       \parseUTFviiiA,%
       \parseUTFviiiA!%
-      \parseUTFviiiB F\UTFviiiFourOctets.{!,;}%
+      \parseUTFviiiB F\UTFviiiFourOctetsName.{!,;}%
     \fi\fi\fi
   }
 
+  % Extract a byte from the end of the UTF-8 representation of \countUTFx.
+  % It must be a non-initial byte in the sequence.
+  % Change \uccode of #1 for it to be used in \parseUTFviiiB as one
+  % of the bytes.
   \gdef\parseUTFviiiA#1{%
     \countUTFx = \countUTFz
     \divide\countUTFz by 64
-    \countUTFy = \countUTFz
+    \countUTFy = \countUTFz  % Save to be the future value of \countUTFz.
     \multiply\countUTFz by 64
+    
+    % \countUTFz is now \countUTFx with the last 5 bits cleared.  Subtract
+    % in order to get the last five bits.
     \advance\countUTFx by -\countUTFz
+
+    % Convert this to the byte in the UTF-8 sequence.
     \advance\countUTFx by 128
     \uccode `#1\countUTFx
     \countUTFz = \countUTFy}
 
+  % Used to put a UTF-8 byte sequence into \UTFviiiTmp
+  % #1 is the increment for \countUTFz to yield a the first byte of the UTF-8
+  %    sequence.
+  % #2 is one of the \UTFviii*OctetsName macros.
+  % #3 is always a full stop (.)
+  % #4 is a template for the other bytes in the sequence.  The values for these
+  %    bytes is substituted in here with \uppercase using the \uccode's.
   \gdef\parseUTFviiiB#1#2#3#4{%
     \advance\countUTFz by "#10\relax
     \uccode `#3\countUTFz
     \uppercase{\gdef\UTFviiiTmp{#2#3#4}}}
 \endgroup
 
+% For native Unicode handling (XeTeX and LuaTeX),
+% provide a definition macro that sets a catcode to `other' non-globally
+%
+\def\DeclareUnicodeCharacterNativeOther#1#2{%
+  \catcode"#1=\other
+}
+
+% https://en.wikipedia.org/wiki/Plane_(Unicode)#Basic_M
+% U+0000..U+007F = https://en.wikipedia.org/wiki/Basic_Latin_(Unicode_block)
+% U+0080..U+00FF = https://en.wikipedia.org/wiki/Latin-1_Supplement_(Unicode_block)
+% U+0100..U+017F = https://en.wikipedia.org/wiki/Latin_Extended-A
+% U+0180..U+024F = https://en.wikipedia.org/wiki/Latin_Extended-B
+% 
+% Many of our renditions are less than wonderful, and all the missing
+% characters are available somewhere.  Loading the necessary fonts
+% awaits user request.  We can't truly support Unicode without
+% reimplementing everything that's been done in LaTeX for many years,
+% plus probably using luatex or xetex, and who knows what else.
+% We won't be doing that here in this simple file.  But we can try to at
+% least make most of the characters not bomb out.
+%
+\def\unicodechardefs{%
+  \DeclareUnicodeCharacter{00A0}{\tie}%
+  \DeclareUnicodeCharacter{00A1}{\exclamdown}%
+  \DeclareUnicodeCharacter{00A2}{{\tcfont \char162}}% 0242=cent
+  \DeclareUnicodeCharacter{00A3}{\pounds{}}%
+  \DeclareUnicodeCharacter{00A4}{{\tcfont \char164}}% 0244=currency
+  \DeclareUnicodeCharacter{00A5}{{\tcfont \char165}}% 0245=yen
+  \DeclareUnicodeCharacter{00A6}{{\tcfont \char166}}% 0246=brokenbar
+  \DeclareUnicodeCharacter{00A7}{\S}%
+  \DeclareUnicodeCharacter{00A8}{\"{ }}%
+  \DeclareUnicodeCharacter{00A9}{\copyright{}}%
+  \DeclareUnicodeCharacter{00AA}{\ordf}%
+  \DeclareUnicodeCharacter{00AB}{\guillemetleft{}}%
+  \DeclareUnicodeCharacter{00AC}{\ensuremath\lnot}%
+  \DeclareUnicodeCharacter{00AD}{\-}%
+  \DeclareUnicodeCharacter{00AE}{\registeredsymbol{}}%
+  \DeclareUnicodeCharacter{00AF}{\={ }}%
+  %
+  \DeclareUnicodeCharacter{00B0}{\ringaccent{ }}%
+  \DeclareUnicodeCharacter{00B1}{\ensuremath\pm}%
+  \DeclareUnicodeCharacter{00B2}{$^2$}%
+  \DeclareUnicodeCharacter{00B3}{$^3$}%
+  \DeclareUnicodeCharacter{00B4}{\'{ }}%
+  \DeclareUnicodeCharacter{00B5}{$\mu$}%
+  \DeclareUnicodeCharacter{00B6}{\P}%
+  \DeclareUnicodeCharacter{00B7}{\ensuremath\cdot}%
+  \DeclareUnicodeCharacter{00B8}{\cedilla{ }}%
+  \DeclareUnicodeCharacter{00B9}{$^1$}%
+  \DeclareUnicodeCharacter{00BA}{\ordm}%
+  \DeclareUnicodeCharacter{00BB}{\guillemetright{}}%
+  \DeclareUnicodeCharacter{00BC}{$1\over4$}%
+  \DeclareUnicodeCharacter{00BD}{$1\over2$}%
+  \DeclareUnicodeCharacter{00BE}{$3\over4$}%
+  \DeclareUnicodeCharacter{00BF}{\questiondown}%
+  %
+  \DeclareUnicodeCharacter{00C0}{\`A}%
+  \DeclareUnicodeCharacter{00C1}{\'A}%
+  \DeclareUnicodeCharacter{00C2}{\^A}%
+  \DeclareUnicodeCharacter{00C3}{\~A}%
+  \DeclareUnicodeCharacter{00C4}{\"A}%
+  \DeclareUnicodeCharacter{00C5}{\AA}%
+  \DeclareUnicodeCharacter{00C6}{\AE}%
+  \DeclareUnicodeCharacter{00C7}{\cedilla{C}}%
+  \DeclareUnicodeCharacter{00C8}{\`E}%
+  \DeclareUnicodeCharacter{00C9}{\'E}%
+  \DeclareUnicodeCharacter{00CA}{\^E}%
+  \DeclareUnicodeCharacter{00CB}{\"E}%
+  \DeclareUnicodeCharacter{00CC}{\`I}%
+  \DeclareUnicodeCharacter{00CD}{\'I}%
+  \DeclareUnicodeCharacter{00CE}{\^I}%
+  \DeclareUnicodeCharacter{00CF}{\"I}%
+  %
+  \DeclareUnicodeCharacter{00D0}{\DH}%
+  \DeclareUnicodeCharacter{00D1}{\~N}%
+  \DeclareUnicodeCharacter{00D2}{\`O}%
+  \DeclareUnicodeCharacter{00D3}{\'O}%
+  \DeclareUnicodeCharacter{00D4}{\^O}%
+  \DeclareUnicodeCharacter{00D5}{\~O}%
+  \DeclareUnicodeCharacter{00D6}{\"O}%
+  \DeclareUnicodeCharacter{00D7}{\ensuremath\times}%
+  \DeclareUnicodeCharacter{00D8}{\O}%
+  \DeclareUnicodeCharacter{00D9}{\`U}%
+  \DeclareUnicodeCharacter{00DA}{\'U}%
+  \DeclareUnicodeCharacter{00DB}{\^U}%
+  \DeclareUnicodeCharacter{00DC}{\"U}%
+  \DeclareUnicodeCharacter{00DD}{\'Y}%
+  \DeclareUnicodeCharacter{00DE}{\TH}%
+  \DeclareUnicodeCharacter{00DF}{\ss}%
+  %
+  \DeclareUnicodeCharacter{00E0}{\`a}%
+  \DeclareUnicodeCharacter{00E1}{\'a}%
+  \DeclareUnicodeCharacter{00E2}{\^a}%
+  \DeclareUnicodeCharacter{00E3}{\~a}%
+  \DeclareUnicodeCharacter{00E4}{\"a}%
+  \DeclareUnicodeCharacter{00E5}{\aa}%
+  \DeclareUnicodeCharacter{00E6}{\ae}%
+  \DeclareUnicodeCharacter{00E7}{\cedilla{c}}%
+  \DeclareUnicodeCharacter{00E8}{\`e}%
+  \DeclareUnicodeCharacter{00E9}{\'e}%
+  \DeclareUnicodeCharacter{00EA}{\^e}%
+  \DeclareUnicodeCharacter{00EB}{\"e}%
+  \DeclareUnicodeCharacter{00EC}{\`{\dotless{i}}}%
+  \DeclareUnicodeCharacter{00ED}{\'{\dotless{i}}}%
+  \DeclareUnicodeCharacter{00EE}{\^{\dotless{i}}}%
+  \DeclareUnicodeCharacter{00EF}{\"{\dotless{i}}}%
+  %
+  \DeclareUnicodeCharacter{00F0}{\dh}%
+  \DeclareUnicodeCharacter{00F1}{\~n}%
+  \DeclareUnicodeCharacter{00F2}{\`o}%
+  \DeclareUnicodeCharacter{00F3}{\'o}%
+  \DeclareUnicodeCharacter{00F4}{\^o}%
+  \DeclareUnicodeCharacter{00F5}{\~o}%
+  \DeclareUnicodeCharacter{00F6}{\"o}%
+  \DeclareUnicodeCharacter{00F7}{\ensuremath\div}%
+  \DeclareUnicodeCharacter{00F8}{\o}%
+  \DeclareUnicodeCharacter{00F9}{\`u}%
+  \DeclareUnicodeCharacter{00FA}{\'u}%
+  \DeclareUnicodeCharacter{00FB}{\^u}%
+  \DeclareUnicodeCharacter{00FC}{\"u}%
+  \DeclareUnicodeCharacter{00FD}{\'y}%
+  \DeclareUnicodeCharacter{00FE}{\th}%
+  \DeclareUnicodeCharacter{00FF}{\"y}%
+  %
+  \DeclareUnicodeCharacter{0100}{\=A}%
+  \DeclareUnicodeCharacter{0101}{\=a}%
+  \DeclareUnicodeCharacter{0102}{\u{A}}%
+  \DeclareUnicodeCharacter{0103}{\u{a}}%
+  \DeclareUnicodeCharacter{0104}{\ogonek{A}}%
+  \DeclareUnicodeCharacter{0105}{\ogonek{a}}%
+  \DeclareUnicodeCharacter{0106}{\'C}%
+  \DeclareUnicodeCharacter{0107}{\'c}%
+  \DeclareUnicodeCharacter{0108}{\^C}%
+  \DeclareUnicodeCharacter{0109}{\^c}%
+  \DeclareUnicodeCharacter{010A}{\dotaccent{C}}%
+  \DeclareUnicodeCharacter{010B}{\dotaccent{c}}%
+  \DeclareUnicodeCharacter{010C}{\v{C}}%
+  \DeclareUnicodeCharacter{010D}{\v{c}}%
+  \DeclareUnicodeCharacter{010E}{\v{D}}%
+  \DeclareUnicodeCharacter{010F}{d'}%
+  %
+  \DeclareUnicodeCharacter{0110}{\DH}%
+  \DeclareUnicodeCharacter{0111}{\dh}%
+  \DeclareUnicodeCharacter{0112}{\=E}%
+  \DeclareUnicodeCharacter{0113}{\=e}%
+  \DeclareUnicodeCharacter{0114}{\u{E}}%
+  \DeclareUnicodeCharacter{0115}{\u{e}}%
+  \DeclareUnicodeCharacter{0116}{\dotaccent{E}}%
+  \DeclareUnicodeCharacter{0117}{\dotaccent{e}}%
+  \DeclareUnicodeCharacter{0118}{\ogonek{E}}%
+  \DeclareUnicodeCharacter{0119}{\ogonek{e}}%
+  \DeclareUnicodeCharacter{011A}{\v{E}}%
+  \DeclareUnicodeCharacter{011B}{\v{e}}%
+  \DeclareUnicodeCharacter{011C}{\^G}%
+  \DeclareUnicodeCharacter{011D}{\^g}%
+  \DeclareUnicodeCharacter{011E}{\u{G}}%
+  \DeclareUnicodeCharacter{011F}{\u{g}}%
+  %
+  \DeclareUnicodeCharacter{0120}{\dotaccent{G}}%
+  \DeclareUnicodeCharacter{0121}{\dotaccent{g}}%
+  \DeclareUnicodeCharacter{0122}{\cedilla{G}}%
+  \DeclareUnicodeCharacter{0123}{\cedilla{g}}%
+  \DeclareUnicodeCharacter{0124}{\^H}%
+  \DeclareUnicodeCharacter{0125}{\^h}%
+  \DeclareUnicodeCharacter{0126}{\missingcharmsg{H WITH STROKE}}%
+  \DeclareUnicodeCharacter{0127}{\missingcharmsg{h WITH STROKE}}%
+  \DeclareUnicodeCharacter{0128}{\~I}%
+  \DeclareUnicodeCharacter{0129}{\~{\dotless{i}}}%
+  \DeclareUnicodeCharacter{012A}{\=I}%
+  \DeclareUnicodeCharacter{012B}{\={\dotless{i}}}%
+  \DeclareUnicodeCharacter{012C}{\u{I}}%
+  \DeclareUnicodeCharacter{012D}{\u{\dotless{i}}}%
+  \DeclareUnicodeCharacter{012E}{\ogonek{I}}%
+  \DeclareUnicodeCharacter{012F}{\ogonek{i}}%
+  %
+  \DeclareUnicodeCharacter{0130}{\dotaccent{I}}%
+  \DeclareUnicodeCharacter{0131}{\dotless{i}}%
+  \DeclareUnicodeCharacter{0132}{IJ}%
+  \DeclareUnicodeCharacter{0133}{ij}%
+  \DeclareUnicodeCharacter{0134}{\^J}%
+  \DeclareUnicodeCharacter{0135}{\^{\dotless{j}}}%
+  \DeclareUnicodeCharacter{0136}{\cedilla{K}}%
+  \DeclareUnicodeCharacter{0137}{\cedilla{k}}%
+  \DeclareUnicodeCharacter{0138}{\ensuremath\kappa}%
+  \DeclareUnicodeCharacter{0139}{\'L}%
+  \DeclareUnicodeCharacter{013A}{\'l}%
+  \DeclareUnicodeCharacter{013B}{\cedilla{L}}%
+  \DeclareUnicodeCharacter{013C}{\cedilla{l}}%
+  \DeclareUnicodeCharacter{013D}{L'}% should kern
+  \DeclareUnicodeCharacter{013E}{l'}% should kern
+  \DeclareUnicodeCharacter{013F}{L\U{00B7}}%
+  %
+  \DeclareUnicodeCharacter{0140}{l\U{00B7}}%
+  \DeclareUnicodeCharacter{0141}{\L}%
+  \DeclareUnicodeCharacter{0142}{\l}%
+  \DeclareUnicodeCharacter{0143}{\'N}%
+  \DeclareUnicodeCharacter{0144}{\'n}%
+  \DeclareUnicodeCharacter{0145}{\cedilla{N}}%
+  \DeclareUnicodeCharacter{0146}{\cedilla{n}}%
+  \DeclareUnicodeCharacter{0147}{\v{N}}%
+  \DeclareUnicodeCharacter{0148}{\v{n}}%
+  \DeclareUnicodeCharacter{0149}{'n}%
+  \DeclareUnicodeCharacter{014A}{\missingcharmsg{ENG}}%
+  \DeclareUnicodeCharacter{014B}{\missingcharmsg{eng}}%
+  \DeclareUnicodeCharacter{014C}{\=O}%
+  \DeclareUnicodeCharacter{014D}{\=o}%
+  \DeclareUnicodeCharacter{014E}{\u{O}}%
+  \DeclareUnicodeCharacter{014F}{\u{o}}%
+  %
+  \DeclareUnicodeCharacter{0150}{\H{O}}%
+  \DeclareUnicodeCharacter{0151}{\H{o}}%
+  \DeclareUnicodeCharacter{0152}{\OE}%
+  \DeclareUnicodeCharacter{0153}{\oe}%
+  \DeclareUnicodeCharacter{0154}{\'R}%
+  \DeclareUnicodeCharacter{0155}{\'r}%
+  \DeclareUnicodeCharacter{0156}{\cedilla{R}}%
+  \DeclareUnicodeCharacter{0157}{\cedilla{r}}%
+  \DeclareUnicodeCharacter{0158}{\v{R}}%
+  \DeclareUnicodeCharacter{0159}{\v{r}}%
+  \DeclareUnicodeCharacter{015A}{\'S}%
+  \DeclareUnicodeCharacter{015B}{\'s}%
+  \DeclareUnicodeCharacter{015C}{\^S}%
+  \DeclareUnicodeCharacter{015D}{\^s}%
+  \DeclareUnicodeCharacter{015E}{\cedilla{S}}%
+  \DeclareUnicodeCharacter{015F}{\cedilla{s}}%
+  %
+  \DeclareUnicodeCharacter{0160}{\v{S}}%
+  \DeclareUnicodeCharacter{0161}{\v{s}}%
+  \DeclareUnicodeCharacter{0162}{\cedilla{T}}%
+  \DeclareUnicodeCharacter{0163}{\cedilla{t}}%
+  \DeclareUnicodeCharacter{0164}{\v{T}}%
+  \DeclareUnicodeCharacter{0165}{\v{t}}%
+  \DeclareUnicodeCharacter{0166}{\missingcharmsg{H WITH STROKE}}%
+  \DeclareUnicodeCharacter{0167}{\missingcharmsg{h WITH STROKE}}%
+  \DeclareUnicodeCharacter{0168}{\~U}%
+  \DeclareUnicodeCharacter{0169}{\~u}%
+  \DeclareUnicodeCharacter{016A}{\=U}%
+  \DeclareUnicodeCharacter{016B}{\=u}%
+  \DeclareUnicodeCharacter{016C}{\u{U}}%
+  \DeclareUnicodeCharacter{016D}{\u{u}}%
+  \DeclareUnicodeCharacter{016E}{\ringaccent{U}}%
+  \DeclareUnicodeCharacter{016F}{\ringaccent{u}}%
+  %
+  \DeclareUnicodeCharacter{0170}{\H{U}}%
+  \DeclareUnicodeCharacter{0171}{\H{u}}%
+  \DeclareUnicodeCharacter{0172}{\ogonek{U}}%
+  \DeclareUnicodeCharacter{0173}{\ogonek{u}}%
+  \DeclareUnicodeCharacter{0174}{\^W}%
+  \DeclareUnicodeCharacter{0175}{\^w}%
+  \DeclareUnicodeCharacter{0176}{\^Y}%
+  \DeclareUnicodeCharacter{0177}{\^y}%
+  \DeclareUnicodeCharacter{0178}{\"Y}%
+  \DeclareUnicodeCharacter{0179}{\'Z}%
+  \DeclareUnicodeCharacter{017A}{\'z}%
+  \DeclareUnicodeCharacter{017B}{\dotaccent{Z}}%
+  \DeclareUnicodeCharacter{017C}{\dotaccent{z}}%
+  \DeclareUnicodeCharacter{017D}{\v{Z}}%
+  \DeclareUnicodeCharacter{017E}{\v{z}}%
+  \DeclareUnicodeCharacter{017F}{\missingcharmsg{LONG S}}%
+  %
+  \DeclareUnicodeCharacter{01C4}{D\v{Z}}%
+  \DeclareUnicodeCharacter{01C5}{D\v{z}}%
+  \DeclareUnicodeCharacter{01C6}{d\v{z}}%
+  \DeclareUnicodeCharacter{01C7}{LJ}%
+  \DeclareUnicodeCharacter{01C8}{Lj}%
+  \DeclareUnicodeCharacter{01C9}{lj}%
+  \DeclareUnicodeCharacter{01CA}{NJ}%
+  \DeclareUnicodeCharacter{01CB}{Nj}%
+  \DeclareUnicodeCharacter{01CC}{nj}%
+  \DeclareUnicodeCharacter{01CD}{\v{A}}%
+  \DeclareUnicodeCharacter{01CE}{\v{a}}%
+  \DeclareUnicodeCharacter{01CF}{\v{I}}%
+  %
+  \DeclareUnicodeCharacter{01D0}{\v{\dotless{i}}}%
+  \DeclareUnicodeCharacter{01D1}{\v{O}}%
+  \DeclareUnicodeCharacter{01D2}{\v{o}}%
+  \DeclareUnicodeCharacter{01D3}{\v{U}}%
+  \DeclareUnicodeCharacter{01D4}{\v{u}}%
+  %
+  \DeclareUnicodeCharacter{01E2}{\={\AE}}%
+  \DeclareUnicodeCharacter{01E3}{\={\ae}}%
+  \DeclareUnicodeCharacter{01E6}{\v{G}}%
+  \DeclareUnicodeCharacter{01E7}{\v{g}}%
+  \DeclareUnicodeCharacter{01E8}{\v{K}}%
+  \DeclareUnicodeCharacter{01E9}{\v{k}}%
+  %
+  \DeclareUnicodeCharacter{01F0}{\v{\dotless{j}}}%
+  \DeclareUnicodeCharacter{01F1}{DZ}%
+  \DeclareUnicodeCharacter{01F2}{Dz}%
+  \DeclareUnicodeCharacter{01F3}{dz}%
+  \DeclareUnicodeCharacter{01F4}{\'G}%
+  \DeclareUnicodeCharacter{01F5}{\'g}%
+  \DeclareUnicodeCharacter{01F8}{\`N}%
+  \DeclareUnicodeCharacter{01F9}{\`n}%
+  \DeclareUnicodeCharacter{01FC}{\'{\AE}}%
+  \DeclareUnicodeCharacter{01FD}{\'{\ae}}%
+  \DeclareUnicodeCharacter{01FE}{\'{\O}}%
+  \DeclareUnicodeCharacter{01FF}{\'{\o}}%
+  %
+  \DeclareUnicodeCharacter{021E}{\v{H}}%
+  \DeclareUnicodeCharacter{021F}{\v{h}}%
+  %
+  \DeclareUnicodeCharacter{0226}{\dotaccent{A}}%
+  \DeclareUnicodeCharacter{0227}{\dotaccent{a}}%
+  \DeclareUnicodeCharacter{0228}{\cedilla{E}}%
+  \DeclareUnicodeCharacter{0229}{\cedilla{e}}%
+  \DeclareUnicodeCharacter{022E}{\dotaccent{O}}%
+  \DeclareUnicodeCharacter{022F}{\dotaccent{o}}%
+  %
+  \DeclareUnicodeCharacter{0232}{\=Y}%
+  \DeclareUnicodeCharacter{0233}{\=y}%
+  \DeclareUnicodeCharacter{0237}{\dotless{j}}%
+  %
+  \DeclareUnicodeCharacter{02DB}{\ogonek{ }}%
+  %
+  % Greek letters upper case
+  \DeclareUnicodeCharacter{0391}{{\it A}}%
+  \DeclareUnicodeCharacter{0392}{{\it B}}%
+  \DeclareUnicodeCharacter{0393}{\ensuremath{\mit\Gamma}}%
+  \DeclareUnicodeCharacter{0394}{\ensuremath{\mit\Delta}}%
+  \DeclareUnicodeCharacter{0395}{{\it E}}%
+  \DeclareUnicodeCharacter{0396}{{\it Z}}%
+  \DeclareUnicodeCharacter{0397}{{\it H}}%
+  \DeclareUnicodeCharacter{0398}{\ensuremath{\mit\Theta}}%
+  \DeclareUnicodeCharacter{0399}{{\it I}}%
+  \DeclareUnicodeCharacter{039A}{{\it K}}%
+  \DeclareUnicodeCharacter{039B}{\ensuremath{\mit\Lambda}}%
+  \DeclareUnicodeCharacter{039C}{{\it M}}%
+  \DeclareUnicodeCharacter{039D}{{\it N}}%
+  \DeclareUnicodeCharacter{039E}{\ensuremath{\mit\Xi}}%
+  \DeclareUnicodeCharacter{039F}{{\it O}}%
+  \DeclareUnicodeCharacter{03A0}{\ensuremath{\mit\Pi}}%
+  \DeclareUnicodeCharacter{03A1}{{\it P}}%
+  %\DeclareUnicodeCharacter{03A2}{} % none - corresponds to final sigma
+  \DeclareUnicodeCharacter{03A3}{\ensuremath{\mit\Sigma}}%
+  \DeclareUnicodeCharacter{03A4}{{\it T}}%
+  \DeclareUnicodeCharacter{03A5}{\ensuremath{\mit\Upsilon}}%
+  \DeclareUnicodeCharacter{03A6}{\ensuremath{\mit\Phi}}%
+  \DeclareUnicodeCharacter{03A7}{{\it X}}%
+  \DeclareUnicodeCharacter{03A8}{\ensuremath{\mit\Psi}}%
+  \DeclareUnicodeCharacter{03A9}{\ensuremath{\mit\Omega}}%
+  %
+  % Vowels with accents
+  \DeclareUnicodeCharacter{0390}{\ensuremath{\ddot{\acute\iota}}}%
+  \DeclareUnicodeCharacter{03AC}{\ensuremath{\acute\alpha}}%
+  \DeclareUnicodeCharacter{03AD}{\ensuremath{\acute\epsilon}}%
+  \DeclareUnicodeCharacter{03AE}{\ensuremath{\acute\eta}}%
+  \DeclareUnicodeCharacter{03AF}{\ensuremath{\acute\iota}}%
+  \DeclareUnicodeCharacter{03B0}{\ensuremath{\acute{\ddot\upsilon}}}%
+  %
+  % Standalone accent
+  \DeclareUnicodeCharacter{0384}{\ensuremath{\acute{\ }}}%
+  %
+  % Greek letters lower case
+  \DeclareUnicodeCharacter{03B1}{\ensuremath\alpha}%
+  \DeclareUnicodeCharacter{03B2}{\ensuremath\beta}%
+  \DeclareUnicodeCharacter{03B3}{\ensuremath\gamma}%
+  \DeclareUnicodeCharacter{03B4}{\ensuremath\delta}%
+  \DeclareUnicodeCharacter{03B5}{\ensuremath\epsilon}%
+  \DeclareUnicodeCharacter{03B6}{\ensuremath\zeta}%
+  \DeclareUnicodeCharacter{03B7}{\ensuremath\eta}%
+  \DeclareUnicodeCharacter{03B8}{\ensuremath\theta}%
+  \DeclareUnicodeCharacter{03B9}{\ensuremath\iota}%
+  \DeclareUnicodeCharacter{03BA}{\ensuremath\kappa}%
+  \DeclareUnicodeCharacter{03BB}{\ensuremath\lambda}%
+  \DeclareUnicodeCharacter{03BC}{\ensuremath\mu}%
+  \DeclareUnicodeCharacter{03BD}{\ensuremath\nu}%
+  \DeclareUnicodeCharacter{03BE}{\ensuremath\xi}%
+  \DeclareUnicodeCharacter{03BF}{{\it o}}% omicron
+  \DeclareUnicodeCharacter{03C0}{\ensuremath\pi}%
+  \DeclareUnicodeCharacter{03C1}{\ensuremath\rho}%
+  \DeclareUnicodeCharacter{03C2}{\ensuremath\varsigma}%
+  \DeclareUnicodeCharacter{03C3}{\ensuremath\sigma}%
+  \DeclareUnicodeCharacter{03C4}{\ensuremath\tau}%
+  \DeclareUnicodeCharacter{03C5}{\ensuremath\upsilon}%
+  \DeclareUnicodeCharacter{03C6}{\ensuremath\phi}%
+  \DeclareUnicodeCharacter{03C7}{\ensuremath\chi}%
+  \DeclareUnicodeCharacter{03C8}{\ensuremath\psi}%
+  \DeclareUnicodeCharacter{03C9}{\ensuremath\omega}%
+  %
+  % More Greek vowels with accents
+  \DeclareUnicodeCharacter{03CA}{\ensuremath{\ddot\iota}}%
+  \DeclareUnicodeCharacter{03CB}{\ensuremath{\ddot\upsilon}}%
+  \DeclareUnicodeCharacter{03CC}{\ensuremath{\acute o}}%
+  \DeclareUnicodeCharacter{03CD}{\ensuremath{\acute\upsilon}}%
+  \DeclareUnicodeCharacter{03CE}{\ensuremath{\acute\omega}}%
+  %
+  % Variant Greek letters
+  \DeclareUnicodeCharacter{03D1}{\ensuremath\vartheta}%
+  \DeclareUnicodeCharacter{03D6}{\ensuremath\varpi}%
+  \DeclareUnicodeCharacter{03F1}{\ensuremath\varrho}%
+  %
+  \DeclareUnicodeCharacter{1E02}{\dotaccent{B}}%
+  \DeclareUnicodeCharacter{1E03}{\dotaccent{b}}%
+  \DeclareUnicodeCharacter{1E04}{\udotaccent{B}}%
+  \DeclareUnicodeCharacter{1E05}{\udotaccent{b}}%
+  \DeclareUnicodeCharacter{1E06}{\ubaraccent{B}}%
+  \DeclareUnicodeCharacter{1E07}{\ubaraccent{b}}%
+  \DeclareUnicodeCharacter{1E0A}{\dotaccent{D}}%
+  \DeclareUnicodeCharacter{1E0B}{\dotaccent{d}}%
+  \DeclareUnicodeCharacter{1E0C}{\udotaccent{D}}%
+  \DeclareUnicodeCharacter{1E0D}{\udotaccent{d}}%
+  \DeclareUnicodeCharacter{1E0E}{\ubaraccent{D}}%
+  \DeclareUnicodeCharacter{1E0F}{\ubaraccent{d}}%
+  %
+  \DeclareUnicodeCharacter{1E1E}{\dotaccent{F}}%
+  \DeclareUnicodeCharacter{1E1F}{\dotaccent{f}}%
+  %
+  \DeclareUnicodeCharacter{1E20}{\=G}%
+  \DeclareUnicodeCharacter{1E21}{\=g}%
+  \DeclareUnicodeCharacter{1E22}{\dotaccent{H}}%
+  \DeclareUnicodeCharacter{1E23}{\dotaccent{h}}%
+  \DeclareUnicodeCharacter{1E24}{\udotaccent{H}}%
+  \DeclareUnicodeCharacter{1E25}{\udotaccent{h}}%
+  \DeclareUnicodeCharacter{1E26}{\"H}%
+  \DeclareUnicodeCharacter{1E27}{\"h}%
+  %
+  \DeclareUnicodeCharacter{1E30}{\'K}%
+  \DeclareUnicodeCharacter{1E31}{\'k}%
+  \DeclareUnicodeCharacter{1E32}{\udotaccent{K}}%
+  \DeclareUnicodeCharacter{1E33}{\udotaccent{k}}%
+  \DeclareUnicodeCharacter{1E34}{\ubaraccent{K}}%
+  \DeclareUnicodeCharacter{1E35}{\ubaraccent{k}}%
+  \DeclareUnicodeCharacter{1E36}{\udotaccent{L}}%
+  \DeclareUnicodeCharacter{1E37}{\udotaccent{l}}%
+  \DeclareUnicodeCharacter{1E3A}{\ubaraccent{L}}%
+  \DeclareUnicodeCharacter{1E3B}{\ubaraccent{l}}%
+  \DeclareUnicodeCharacter{1E3E}{\'M}%
+  \DeclareUnicodeCharacter{1E3F}{\'m}%
+  %
+  \DeclareUnicodeCharacter{1E40}{\dotaccent{M}}%
+  \DeclareUnicodeCharacter{1E41}{\dotaccent{m}}%
+  \DeclareUnicodeCharacter{1E42}{\udotaccent{M}}%
+  \DeclareUnicodeCharacter{1E43}{\udotaccent{m}}%
+  \DeclareUnicodeCharacter{1E44}{\dotaccent{N}}%
+  \DeclareUnicodeCharacter{1E45}{\dotaccent{n}}%
+  \DeclareUnicodeCharacter{1E46}{\udotaccent{N}}%
+  \DeclareUnicodeCharacter{1E47}{\udotaccent{n}}%
+  \DeclareUnicodeCharacter{1E48}{\ubaraccent{N}}%
+  \DeclareUnicodeCharacter{1E49}{\ubaraccent{n}}%
+  %
+  \DeclareUnicodeCharacter{1E54}{\'P}%
+  \DeclareUnicodeCharacter{1E55}{\'p}%
+  \DeclareUnicodeCharacter{1E56}{\dotaccent{P}}%
+  \DeclareUnicodeCharacter{1E57}{\dotaccent{p}}%
+  \DeclareUnicodeCharacter{1E58}{\dotaccent{R}}%
+  \DeclareUnicodeCharacter{1E59}{\dotaccent{r}}%
+  \DeclareUnicodeCharacter{1E5A}{\udotaccent{R}}%
+  \DeclareUnicodeCharacter{1E5B}{\udotaccent{r}}%
+  \DeclareUnicodeCharacter{1E5E}{\ubaraccent{R}}%
+  \DeclareUnicodeCharacter{1E5F}{\ubaraccent{r}}%
+  %
+  \DeclareUnicodeCharacter{1E60}{\dotaccent{S}}%
+  \DeclareUnicodeCharacter{1E61}{\dotaccent{s}}%
+  \DeclareUnicodeCharacter{1E62}{\udotaccent{S}}%
+  \DeclareUnicodeCharacter{1E63}{\udotaccent{s}}%
+  \DeclareUnicodeCharacter{1E6A}{\dotaccent{T}}%
+  \DeclareUnicodeCharacter{1E6B}{\dotaccent{t}}%
+  \DeclareUnicodeCharacter{1E6C}{\udotaccent{T}}%
+  \DeclareUnicodeCharacter{1E6D}{\udotaccent{t}}%
+  \DeclareUnicodeCharacter{1E6E}{\ubaraccent{T}}%
+  \DeclareUnicodeCharacter{1E6F}{\ubaraccent{t}}%
+  %
+  \DeclareUnicodeCharacter{1E7C}{\~V}%
+  \DeclareUnicodeCharacter{1E7D}{\~v}%
+  \DeclareUnicodeCharacter{1E7E}{\udotaccent{V}}%
+  \DeclareUnicodeCharacter{1E7F}{\udotaccent{v}}%
+  %
+  \DeclareUnicodeCharacter{1E80}{\`W}%
+  \DeclareUnicodeCharacter{1E81}{\`w}%
+  \DeclareUnicodeCharacter{1E82}{\'W}%
+  \DeclareUnicodeCharacter{1E83}{\'w}%
+  \DeclareUnicodeCharacter{1E84}{\"W}%
+  \DeclareUnicodeCharacter{1E85}{\"w}%
+  \DeclareUnicodeCharacter{1E86}{\dotaccent{W}}%
+  \DeclareUnicodeCharacter{1E87}{\dotaccent{w}}%
+  \DeclareUnicodeCharacter{1E88}{\udotaccent{W}}%
+  \DeclareUnicodeCharacter{1E89}{\udotaccent{w}}%
+  \DeclareUnicodeCharacter{1E8A}{\dotaccent{X}}%
+  \DeclareUnicodeCharacter{1E8B}{\dotaccent{x}}%
+  \DeclareUnicodeCharacter{1E8C}{\"X}%
+  \DeclareUnicodeCharacter{1E8D}{\"x}%
+  \DeclareUnicodeCharacter{1E8E}{\dotaccent{Y}}%
+  \DeclareUnicodeCharacter{1E8F}{\dotaccent{y}}%
+  %
+  \DeclareUnicodeCharacter{1E90}{\^Z}%
+  \DeclareUnicodeCharacter{1E91}{\^z}%
+  \DeclareUnicodeCharacter{1E92}{\udotaccent{Z}}%
+  \DeclareUnicodeCharacter{1E93}{\udotaccent{z}}%
+  \DeclareUnicodeCharacter{1E94}{\ubaraccent{Z}}%
+  \DeclareUnicodeCharacter{1E95}{\ubaraccent{z}}%
+  \DeclareUnicodeCharacter{1E96}{\ubaraccent{h}}%
+  \DeclareUnicodeCharacter{1E97}{\"t}%
+  \DeclareUnicodeCharacter{1E98}{\ringaccent{w}}%
+  \DeclareUnicodeCharacter{1E99}{\ringaccent{y}}%
+  %
+  \DeclareUnicodeCharacter{1EA0}{\udotaccent{A}}%
+  \DeclareUnicodeCharacter{1EA1}{\udotaccent{a}}%
+  %
+  \DeclareUnicodeCharacter{1EB8}{\udotaccent{E}}%
+  \DeclareUnicodeCharacter{1EB9}{\udotaccent{e}}%
+  \DeclareUnicodeCharacter{1EBC}{\~E}%
+  \DeclareUnicodeCharacter{1EBD}{\~e}%
+  %
+  \DeclareUnicodeCharacter{1ECA}{\udotaccent{I}}%
+  \DeclareUnicodeCharacter{1ECB}{\udotaccent{i}}%
+  \DeclareUnicodeCharacter{1ECC}{\udotaccent{O}}%
+  \DeclareUnicodeCharacter{1ECD}{\udotaccent{o}}%
+  %
+  \DeclareUnicodeCharacter{1EE4}{\udotaccent{U}}%
+  \DeclareUnicodeCharacter{1EE5}{\udotaccent{u}}%
+  %
+  \DeclareUnicodeCharacter{1EF2}{\`Y}%
+  \DeclareUnicodeCharacter{1EF3}{\`y}%
+  \DeclareUnicodeCharacter{1EF4}{\udotaccent{Y}}%
+  %
+  \DeclareUnicodeCharacter{1EF8}{\~Y}%
+  \DeclareUnicodeCharacter{1EF9}{\~y}%
+  %
+  % Punctuation
+  \DeclareUnicodeCharacter{2013}{--}%
+  \DeclareUnicodeCharacter{2014}{---}%
+  \DeclareUnicodeCharacter{2018}{\quoteleft{}}%
+  \DeclareUnicodeCharacter{2019}{\quoteright{}}%
+  \DeclareUnicodeCharacter{201A}{\quotesinglbase{}}%
+  \DeclareUnicodeCharacter{201C}{\quotedblleft{}}%
+  \DeclareUnicodeCharacter{201D}{\quotedblright{}}%
+  \DeclareUnicodeCharacter{201E}{\quotedblbase{}}%
+  \DeclareUnicodeCharacter{2020}{\ensuremath\dagger}%
+  \DeclareUnicodeCharacter{2021}{\ensuremath\ddagger}%
+  \DeclareUnicodeCharacter{2022}{\bullet{}}%
+  \DeclareUnicodeCharacter{202F}{\thinspace}%
+  \DeclareUnicodeCharacter{2026}{\dots{}}%
+  \DeclareUnicodeCharacter{2039}{\guilsinglleft{}}%
+  \DeclareUnicodeCharacter{203A}{\guilsinglright{}}%
+  %
+  \DeclareUnicodeCharacter{20AC}{\euro{}}%
+  %
+  \DeclareUnicodeCharacter{2192}{\expansion{}}%
+  \DeclareUnicodeCharacter{21D2}{\result{}}%
+  %
+  % Mathematical symbols
+  \DeclareUnicodeCharacter{2200}{\ensuremath\forall}%
+  \DeclareUnicodeCharacter{2203}{\ensuremath\exists}%
+  \DeclareUnicodeCharacter{2208}{\ensuremath\in}%
+  \DeclareUnicodeCharacter{2212}{\minus{}}%
+  \DeclareUnicodeCharacter{2217}{\ast}%
+  \DeclareUnicodeCharacter{221E}{\ensuremath\infty}%
+  \DeclareUnicodeCharacter{2225}{\ensuremath\parallel}%
+  \DeclareUnicodeCharacter{2227}{\ensuremath\wedge}%
+  \DeclareUnicodeCharacter{2229}{\ensuremath\cap}%
+  \DeclareUnicodeCharacter{2261}{\equiv{}}%
+  \DeclareUnicodeCharacter{2264}{\ensuremath\leq}%
+  \DeclareUnicodeCharacter{2265}{\ensuremath\geq}%
+  \DeclareUnicodeCharacter{2282}{\ensuremath\subset}%
+  \DeclareUnicodeCharacter{2287}{\ensuremath\supseteq}%
+  %
+  \DeclareUnicodeCharacter{2016}{\ensuremath\Vert}%
+  \DeclareUnicodeCharacter{2032}{\ensuremath\prime}%
+  \DeclareUnicodeCharacter{210F}{\ensuremath\hbar}%
+  \DeclareUnicodeCharacter{2111}{\ensuremath\Im}%
+  \DeclareUnicodeCharacter{2113}{\ensuremath\ell}%
+  \DeclareUnicodeCharacter{2118}{\ensuremath\wp}%
+  \DeclareUnicodeCharacter{211C}{\ensuremath\Re}%
+  \DeclareUnicodeCharacter{2127}{\ensuremath\mho}%
+  \DeclareUnicodeCharacter{2135}{\ensuremath\aleph}%
+  \DeclareUnicodeCharacter{2190}{\ensuremath\leftarrow}%
+  \DeclareUnicodeCharacter{2191}{\ensuremath\uparrow}%
+  \DeclareUnicodeCharacter{2193}{\ensuremath\downarrow}%
+  \DeclareUnicodeCharacter{2194}{\ensuremath\leftrightarrow}%
+  \DeclareUnicodeCharacter{2195}{\ensuremath\updownarrow}%
+  \DeclareUnicodeCharacter{2196}{\ensuremath\nwarrow}%
+  \DeclareUnicodeCharacter{2197}{\ensuremath\nearrow}%
+  \DeclareUnicodeCharacter{2198}{\ensuremath\searrow}%
+  \DeclareUnicodeCharacter{2199}{\ensuremath\swarrow}%
+  \DeclareUnicodeCharacter{21A6}{\ensuremath\mapsto}%
+  \DeclareUnicodeCharacter{21A9}{\ensuremath\hookleftarrow}%
+  \DeclareUnicodeCharacter{21AA}{\ensuremath\hookrightarrow}%
+  \DeclareUnicodeCharacter{21BC}{\ensuremath\leftharpoonup}%
+  \DeclareUnicodeCharacter{21BD}{\ensuremath\leftharpoondown}%
+  \DeclareUnicodeCharacter{21BE}{\ensuremath\upharpoonright}%
+  \DeclareUnicodeCharacter{21C0}{\ensuremath\rightharpoonup}%
+  \DeclareUnicodeCharacter{21C1}{\ensuremath\rightharpoondown}%
+  \DeclareUnicodeCharacter{21CC}{\ensuremath\rightleftharpoons}%
+  \DeclareUnicodeCharacter{21D0}{\ensuremath\Leftarrow}%
+  \DeclareUnicodeCharacter{21D1}{\ensuremath\Uparrow}%
+  \DeclareUnicodeCharacter{21D3}{\ensuremath\Downarrow}%
+  \DeclareUnicodeCharacter{21D4}{\ensuremath\Leftrightarrow}%
+  \DeclareUnicodeCharacter{21D5}{\ensuremath\Updownarrow}%
+  \DeclareUnicodeCharacter{21DD}{\ensuremath\leadsto}%
+  \DeclareUnicodeCharacter{2201}{\ensuremath\complement}%
+  \DeclareUnicodeCharacter{2202}{\ensuremath\partial}%
+  \DeclareUnicodeCharacter{2205}{\ensuremath\emptyset}%
+  \DeclareUnicodeCharacter{2207}{\ensuremath\nabla}%
+  \DeclareUnicodeCharacter{2209}{\ensuremath\notin}%
+  \DeclareUnicodeCharacter{220B}{\ensuremath\owns}%
+  \DeclareUnicodeCharacter{220F}{\ensuremath\prod}%
+  \DeclareUnicodeCharacter{2210}{\ensuremath\coprod}%
+  \DeclareUnicodeCharacter{2211}{\ensuremath\sum}%
+  \DeclareUnicodeCharacter{2213}{\ensuremath\mp}%
+  \DeclareUnicodeCharacter{2218}{\ensuremath\circ}%
+  \DeclareUnicodeCharacter{221A}{\ensuremath\surd}%
+  \DeclareUnicodeCharacter{221D}{\ensuremath\propto}%
+  \DeclareUnicodeCharacter{2220}{\ensuremath\angle}%
+  \DeclareUnicodeCharacter{2223}{\ensuremath\mid}%
+  \DeclareUnicodeCharacter{2228}{\ensuremath\vee}%
+  \DeclareUnicodeCharacter{222A}{\ensuremath\cup}%
+  \DeclareUnicodeCharacter{222B}{\ensuremath\smallint}%
+  \DeclareUnicodeCharacter{222E}{\ensuremath\oint}%
+  \DeclareUnicodeCharacter{223C}{\ensuremath\sim}%
+  \DeclareUnicodeCharacter{2240}{\ensuremath\wr}%
+  \DeclareUnicodeCharacter{2243}{\ensuremath\simeq}%
+  \DeclareUnicodeCharacter{2245}{\ensuremath\cong}%
+  \DeclareUnicodeCharacter{2248}{\ensuremath\approx}%
+  \DeclareUnicodeCharacter{224D}{\ensuremath\asymp}%
+  \DeclareUnicodeCharacter{2250}{\ensuremath\doteq}%
+  \DeclareUnicodeCharacter{2260}{\ensuremath\neq}%
+  \DeclareUnicodeCharacter{226A}{\ensuremath\ll}%
+  \DeclareUnicodeCharacter{226B}{\ensuremath\gg}%
+  \DeclareUnicodeCharacter{227A}{\ensuremath\prec}%
+  \DeclareUnicodeCharacter{227B}{\ensuremath\succ}%
+  \DeclareUnicodeCharacter{2283}{\ensuremath\supset}%
+  \DeclareUnicodeCharacter{2286}{\ensuremath\subseteq}%
+  \DeclareUnicodeCharacter{228E}{\ensuremath\uplus}%
+  \DeclareUnicodeCharacter{228F}{\ensuremath\sqsubset}%
+  \DeclareUnicodeCharacter{2290}{\ensuremath\sqsupset}%
+  \DeclareUnicodeCharacter{2291}{\ensuremath\sqsubseteq}%
+  \DeclareUnicodeCharacter{2292}{\ensuremath\sqsupseteq}%
+  \DeclareUnicodeCharacter{2293}{\ensuremath\sqcap}%
+  \DeclareUnicodeCharacter{2294}{\ensuremath\sqcup}%
+  \DeclareUnicodeCharacter{2295}{\ensuremath\oplus}%
+  \DeclareUnicodeCharacter{2296}{\ensuremath\ominus}%
+  \DeclareUnicodeCharacter{2297}{\ensuremath\otimes}%
+  \DeclareUnicodeCharacter{2298}{\ensuremath\oslash}%
+  \DeclareUnicodeCharacter{2299}{\ensuremath\odot}%
+  \DeclareUnicodeCharacter{22A2}{\ensuremath\vdash}%
+  \DeclareUnicodeCharacter{22A3}{\ensuremath\dashv}%
+  \DeclareUnicodeCharacter{22A4}{\ensuremath\ptextop}%
+  \DeclareUnicodeCharacter{22A5}{\ensuremath\bot}%
+  \DeclareUnicodeCharacter{22A8}{\ensuremath\models}%
+  \DeclareUnicodeCharacter{22B4}{\ensuremath\unlhd}%
+  \DeclareUnicodeCharacter{22B5}{\ensuremath\unrhd}%
+  \DeclareUnicodeCharacter{22C0}{\ensuremath\bigwedge}%
+  \DeclareUnicodeCharacter{22C1}{\ensuremath\bigvee}%
+  \DeclareUnicodeCharacter{22C2}{\ensuremath\bigcap}%
+  \DeclareUnicodeCharacter{22C3}{\ensuremath\bigcup}%
+  \DeclareUnicodeCharacter{22C4}{\ensuremath\diamond}%
+  \DeclareUnicodeCharacter{22C5}{\ensuremath\cdot}%
+  \DeclareUnicodeCharacter{22C6}{\ensuremath\star}%
+  \DeclareUnicodeCharacter{22C8}{\ensuremath\bowtie}%
+  \DeclareUnicodeCharacter{2308}{\ensuremath\lceil}%
+  \DeclareUnicodeCharacter{2309}{\ensuremath\rceil}%
+  \DeclareUnicodeCharacter{230A}{\ensuremath\lfloor}%
+  \DeclareUnicodeCharacter{230B}{\ensuremath\rfloor}%
+  \DeclareUnicodeCharacter{2322}{\ensuremath\frown}%
+  \DeclareUnicodeCharacter{2323}{\ensuremath\smile}%
+  %
+  \DeclareUnicodeCharacter{25A1}{\ensuremath\Box}%
+  \DeclareUnicodeCharacter{25B3}{\ensuremath\triangle}%
+  \DeclareUnicodeCharacter{25B7}{\ensuremath\triangleright}%
+  \DeclareUnicodeCharacter{25BD}{\ensuremath\bigtriangledown}%
+  \DeclareUnicodeCharacter{25C1}{\ensuremath\triangleleft}%
+  \DeclareUnicodeCharacter{25C7}{\ensuremath\Diamond}%
+  \DeclareUnicodeCharacter{2660}{\ensuremath\spadesuit}%
+  \DeclareUnicodeCharacter{2661}{\ensuremath\heartsuit}%
+  \DeclareUnicodeCharacter{2662}{\ensuremath\diamondsuit}%
+  \DeclareUnicodeCharacter{2663}{\ensuremath\clubsuit}%
+  \DeclareUnicodeCharacter{266D}{\ensuremath\flat}%
+  \DeclareUnicodeCharacter{266E}{\ensuremath\natural}%
+  \DeclareUnicodeCharacter{266F}{\ensuremath\sharp}%
+  \DeclareUnicodeCharacter{26AA}{\ensuremath\bigcirc}%
+  \DeclareUnicodeCharacter{27B9}{\ensuremath\rangle}%
+  \DeclareUnicodeCharacter{27C2}{\ensuremath\perp}%
+  \DeclareUnicodeCharacter{27E8}{\ensuremath\langle}%
+  \DeclareUnicodeCharacter{27F5}{\ensuremath\longleftarrow}%
+  \DeclareUnicodeCharacter{27F6}{\ensuremath\longrightarrow}%
+  \DeclareUnicodeCharacter{27F7}{\ensuremath\longleftrightarrow}%
+  \DeclareUnicodeCharacter{27FC}{\ensuremath\longmapsto}%
+  \DeclareUnicodeCharacter{29F5}{\ensuremath\setminus}%
+  \DeclareUnicodeCharacter{2A00}{\ensuremath\bigodot}%
+  \DeclareUnicodeCharacter{2A01}{\ensuremath\bigoplus}%
+  \DeclareUnicodeCharacter{2A02}{\ensuremath\bigotimes}%
+  \DeclareUnicodeCharacter{2A04}{\ensuremath\biguplus}%
+  \DeclareUnicodeCharacter{2A06}{\ensuremath\bigsqcup}%
+  \DeclareUnicodeCharacter{2A1D}{\ensuremath\Join}%
+  \DeclareUnicodeCharacter{2A3F}{\ensuremath\amalg}%
+  \DeclareUnicodeCharacter{2AAF}{\ensuremath\preceq}%
+  \DeclareUnicodeCharacter{2AB0}{\ensuremath\succeq}%
+  %
+  \global\mathchardef\checkmark="1370% actually the square root sign
+  \DeclareUnicodeCharacter{2713}{\ensuremath\checkmark}%
+}% end of \unicodechardefs
+
+% UTF-8 byte sequence (pdfTeX) definitions (replacing and @U command)
+% It makes the setting that replace UTF-8 byte sequence.
 \def\utfeightchardefs{%
-  \DeclareUnicodeCharacter{00A0}{\tie}
-  \DeclareUnicodeCharacter{00A1}{\exclamdown}
-  \DeclareUnicodeCharacter{00A3}{\pounds}
-  \DeclareUnicodeCharacter{00A8}{\"{ }}
-  \DeclareUnicodeCharacter{00A9}{\copyright}
-  \DeclareUnicodeCharacter{00AA}{\ordf}
-  \DeclareUnicodeCharacter{00AB}{\guillemetleft}
-  \DeclareUnicodeCharacter{00AD}{\-}
-  \DeclareUnicodeCharacter{00AE}{\registeredsymbol}
-  \DeclareUnicodeCharacter{00AF}{\={ }}
-
-  \DeclareUnicodeCharacter{00B0}{\ringaccent{ }}
-  \DeclareUnicodeCharacter{00B4}{\'{ }}
-  \DeclareUnicodeCharacter{00B8}{\cedilla{ }}
-  \DeclareUnicodeCharacter{00BA}{\ordm}
-  \DeclareUnicodeCharacter{00BB}{\guillemetright}
-  \DeclareUnicodeCharacter{00BF}{\questiondown}
-
-  \DeclareUnicodeCharacter{00C0}{\`A}
-  \DeclareUnicodeCharacter{00C1}{\'A}
-  \DeclareUnicodeCharacter{00C2}{\^A}
-  \DeclareUnicodeCharacter{00C3}{\~A}
-  \DeclareUnicodeCharacter{00C4}{\"A}
-  \DeclareUnicodeCharacter{00C5}{\AA}
-  \DeclareUnicodeCharacter{00C6}{\AE}
-  \DeclareUnicodeCharacter{00C7}{\cedilla{C}}
-  \DeclareUnicodeCharacter{00C8}{\`E}
-  \DeclareUnicodeCharacter{00C9}{\'E}
-  \DeclareUnicodeCharacter{00CA}{\^E}
-  \DeclareUnicodeCharacter{00CB}{\"E}
-  \DeclareUnicodeCharacter{00CC}{\`I}
-  \DeclareUnicodeCharacter{00CD}{\'I}
-  \DeclareUnicodeCharacter{00CE}{\^I}
-  \DeclareUnicodeCharacter{00CF}{\"I}
-
-  \DeclareUnicodeCharacter{00D0}{\DH}
-  \DeclareUnicodeCharacter{00D1}{\~N}
-  \DeclareUnicodeCharacter{00D2}{\`O}
-  \DeclareUnicodeCharacter{00D3}{\'O}
-  \DeclareUnicodeCharacter{00D4}{\^O}
-  \DeclareUnicodeCharacter{00D5}{\~O}
-  \DeclareUnicodeCharacter{00D6}{\"O}
-  \DeclareUnicodeCharacter{00D8}{\O}
-  \DeclareUnicodeCharacter{00D9}{\`U}
-  \DeclareUnicodeCharacter{00DA}{\'U}
-  \DeclareUnicodeCharacter{00DB}{\^U}
-  \DeclareUnicodeCharacter{00DC}{\"U}
-  \DeclareUnicodeCharacter{00DD}{\'Y}
-  \DeclareUnicodeCharacter{00DE}{\TH}
-  \DeclareUnicodeCharacter{00DF}{\ss}
-
-  \DeclareUnicodeCharacter{00E0}{\`a}
-  \DeclareUnicodeCharacter{00E1}{\'a}
-  \DeclareUnicodeCharacter{00E2}{\^a}
-  \DeclareUnicodeCharacter{00E3}{\~a}
-  \DeclareUnicodeCharacter{00E4}{\"a}
-  \DeclareUnicodeCharacter{00E5}{\aa}
-  \DeclareUnicodeCharacter{00E6}{\ae}
-  \DeclareUnicodeCharacter{00E7}{\cedilla{c}}
-  \DeclareUnicodeCharacter{00E8}{\`e}
-  \DeclareUnicodeCharacter{00E9}{\'e}
-  \DeclareUnicodeCharacter{00EA}{\^e}
-  \DeclareUnicodeCharacter{00EB}{\"e}
-  \DeclareUnicodeCharacter{00EC}{\`{\dotless{i}}}
-  \DeclareUnicodeCharacter{00ED}{\'{\dotless{i}}}
-  \DeclareUnicodeCharacter{00EE}{\^{\dotless{i}}}
-  \DeclareUnicodeCharacter{00EF}{\"{\dotless{i}}}
-
-  \DeclareUnicodeCharacter{00F0}{\dh}
-  \DeclareUnicodeCharacter{00F1}{\~n}
-  \DeclareUnicodeCharacter{00F2}{\`o}
-  \DeclareUnicodeCharacter{00F3}{\'o}
-  \DeclareUnicodeCharacter{00F4}{\^o}
-  \DeclareUnicodeCharacter{00F5}{\~o}
-  \DeclareUnicodeCharacter{00F6}{\"o}
-  \DeclareUnicodeCharacter{00F8}{\o}
-  \DeclareUnicodeCharacter{00F9}{\`u}
-  \DeclareUnicodeCharacter{00FA}{\'u}
-  \DeclareUnicodeCharacter{00FB}{\^u}
-  \DeclareUnicodeCharacter{00FC}{\"u}
-  \DeclareUnicodeCharacter{00FD}{\'y}
-  \DeclareUnicodeCharacter{00FE}{\th}
-  \DeclareUnicodeCharacter{00FF}{\"y}
-
-  \DeclareUnicodeCharacter{0100}{\=A}
-  \DeclareUnicodeCharacter{0101}{\=a}
-  \DeclareUnicodeCharacter{0102}{\u{A}}
-  \DeclareUnicodeCharacter{0103}{\u{a}}
-  \DeclareUnicodeCharacter{0104}{\ogonek{A}}
-  \DeclareUnicodeCharacter{0105}{\ogonek{a}}
-  \DeclareUnicodeCharacter{0106}{\'C}
-  \DeclareUnicodeCharacter{0107}{\'c}
-  \DeclareUnicodeCharacter{0108}{\^C}
-  \DeclareUnicodeCharacter{0109}{\^c}
-  \DeclareUnicodeCharacter{0118}{\ogonek{E}}
-  \DeclareUnicodeCharacter{0119}{\ogonek{e}}
-  \DeclareUnicodeCharacter{010A}{\dotaccent{C}}
-  \DeclareUnicodeCharacter{010B}{\dotaccent{c}}
-  \DeclareUnicodeCharacter{010C}{\v{C}}
-  \DeclareUnicodeCharacter{010D}{\v{c}}
-  \DeclareUnicodeCharacter{010E}{\v{D}}
-
-  \DeclareUnicodeCharacter{0112}{\=E}
-  \DeclareUnicodeCharacter{0113}{\=e}
-  \DeclareUnicodeCharacter{0114}{\u{E}}
-  \DeclareUnicodeCharacter{0115}{\u{e}}
-  \DeclareUnicodeCharacter{0116}{\dotaccent{E}}
-  \DeclareUnicodeCharacter{0117}{\dotaccent{e}}
-  \DeclareUnicodeCharacter{011A}{\v{E}}
-  \DeclareUnicodeCharacter{011B}{\v{e}}
-  \DeclareUnicodeCharacter{011C}{\^G}
-  \DeclareUnicodeCharacter{011D}{\^g}
-  \DeclareUnicodeCharacter{011E}{\u{G}}
-  \DeclareUnicodeCharacter{011F}{\u{g}}
-
-  \DeclareUnicodeCharacter{0120}{\dotaccent{G}}
-  \DeclareUnicodeCharacter{0121}{\dotaccent{g}}
-  \DeclareUnicodeCharacter{0124}{\^H}
-  \DeclareUnicodeCharacter{0125}{\^h}
-  \DeclareUnicodeCharacter{0128}{\~I}
-  \DeclareUnicodeCharacter{0129}{\~{\dotless{i}}}
-  \DeclareUnicodeCharacter{012A}{\=I}
-  \DeclareUnicodeCharacter{012B}{\={\dotless{i}}}
-  \DeclareUnicodeCharacter{012C}{\u{I}}
-  \DeclareUnicodeCharacter{012D}{\u{\dotless{i}}}
-
-  \DeclareUnicodeCharacter{0130}{\dotaccent{I}}
-  \DeclareUnicodeCharacter{0131}{\dotless{i}}
-  \DeclareUnicodeCharacter{0132}{IJ}
-  \DeclareUnicodeCharacter{0133}{ij}
-  \DeclareUnicodeCharacter{0134}{\^J}
-  \DeclareUnicodeCharacter{0135}{\^{\dotless{j}}}
-  \DeclareUnicodeCharacter{0139}{\'L}
-  \DeclareUnicodeCharacter{013A}{\'l}
-
-  \DeclareUnicodeCharacter{0141}{\L}
-  \DeclareUnicodeCharacter{0142}{\l}
-  \DeclareUnicodeCharacter{0143}{\'N}
-  \DeclareUnicodeCharacter{0144}{\'n}
-  \DeclareUnicodeCharacter{0147}{\v{N}}
-  \DeclareUnicodeCharacter{0148}{\v{n}}
-  \DeclareUnicodeCharacter{014C}{\=O}
-  \DeclareUnicodeCharacter{014D}{\=o}
-  \DeclareUnicodeCharacter{014E}{\u{O}}
-  \DeclareUnicodeCharacter{014F}{\u{o}}
-
-  \DeclareUnicodeCharacter{0150}{\H{O}}
-  \DeclareUnicodeCharacter{0151}{\H{o}}
-  \DeclareUnicodeCharacter{0152}{\OE}
-  \DeclareUnicodeCharacter{0153}{\oe}
-  \DeclareUnicodeCharacter{0154}{\'R}
-  \DeclareUnicodeCharacter{0155}{\'r}
-  \DeclareUnicodeCharacter{0158}{\v{R}}
-  \DeclareUnicodeCharacter{0159}{\v{r}}
-  \DeclareUnicodeCharacter{015A}{\'S}
-  \DeclareUnicodeCharacter{015B}{\'s}
-  \DeclareUnicodeCharacter{015C}{\^S}
-  \DeclareUnicodeCharacter{015D}{\^s}
-  \DeclareUnicodeCharacter{015E}{\cedilla{S}}
-  \DeclareUnicodeCharacter{015F}{\cedilla{s}}
-
-  \DeclareUnicodeCharacter{0160}{\v{S}}
-  \DeclareUnicodeCharacter{0161}{\v{s}}
-  \DeclareUnicodeCharacter{0162}{\cedilla{t}}
-  \DeclareUnicodeCharacter{0163}{\cedilla{T}}
-  \DeclareUnicodeCharacter{0164}{\v{T}}
-
-  \DeclareUnicodeCharacter{0168}{\~U}
-  \DeclareUnicodeCharacter{0169}{\~u}
-  \DeclareUnicodeCharacter{016A}{\=U}
-  \DeclareUnicodeCharacter{016B}{\=u}
-  \DeclareUnicodeCharacter{016C}{\u{U}}
-  \DeclareUnicodeCharacter{016D}{\u{u}}
-  \DeclareUnicodeCharacter{016E}{\ringaccent{U}}
-  \DeclareUnicodeCharacter{016F}{\ringaccent{u}}
-
-  \DeclareUnicodeCharacter{0170}{\H{U}}
-  \DeclareUnicodeCharacter{0171}{\H{u}}
-  \DeclareUnicodeCharacter{0174}{\^W}
-  \DeclareUnicodeCharacter{0175}{\^w}
-  \DeclareUnicodeCharacter{0176}{\^Y}
-  \DeclareUnicodeCharacter{0177}{\^y}
-  \DeclareUnicodeCharacter{0178}{\"Y}
-  \DeclareUnicodeCharacter{0179}{\'Z}
-  \DeclareUnicodeCharacter{017A}{\'z}
-  \DeclareUnicodeCharacter{017B}{\dotaccent{Z}}
-  \DeclareUnicodeCharacter{017C}{\dotaccent{z}}
-  \DeclareUnicodeCharacter{017D}{\v{Z}}
-  \DeclareUnicodeCharacter{017E}{\v{z}}
-
-  \DeclareUnicodeCharacter{01C4}{D\v{Z}}
-  \DeclareUnicodeCharacter{01C5}{D\v{z}}
-  \DeclareUnicodeCharacter{01C6}{d\v{z}}
-  \DeclareUnicodeCharacter{01C7}{LJ}
-  \DeclareUnicodeCharacter{01C8}{Lj}
-  \DeclareUnicodeCharacter{01C9}{lj}
-  \DeclareUnicodeCharacter{01CA}{NJ}
-  \DeclareUnicodeCharacter{01CB}{Nj}
-  \DeclareUnicodeCharacter{01CC}{nj}
-  \DeclareUnicodeCharacter{01CD}{\v{A}}
-  \DeclareUnicodeCharacter{01CE}{\v{a}}
-  \DeclareUnicodeCharacter{01CF}{\v{I}}
-
-  \DeclareUnicodeCharacter{01D0}{\v{\dotless{i}}}
-  \DeclareUnicodeCharacter{01D1}{\v{O}}
-  \DeclareUnicodeCharacter{01D2}{\v{o}}
-  \DeclareUnicodeCharacter{01D3}{\v{U}}
-  \DeclareUnicodeCharacter{01D4}{\v{u}}
-
-  \DeclareUnicodeCharacter{01E2}{\={\AE}}
-  \DeclareUnicodeCharacter{01E3}{\={\ae}}
-  \DeclareUnicodeCharacter{01E6}{\v{G}}
-  \DeclareUnicodeCharacter{01E7}{\v{g}}
-  \DeclareUnicodeCharacter{01E8}{\v{K}}
-  \DeclareUnicodeCharacter{01E9}{\v{k}}
-
-  \DeclareUnicodeCharacter{01F0}{\v{\dotless{j}}}
-  \DeclareUnicodeCharacter{01F1}{DZ}
-  \DeclareUnicodeCharacter{01F2}{Dz}
-  \DeclareUnicodeCharacter{01F3}{dz}
-  \DeclareUnicodeCharacter{01F4}{\'G}
-  \DeclareUnicodeCharacter{01F5}{\'g}
-  \DeclareUnicodeCharacter{01F8}{\`N}
-  \DeclareUnicodeCharacter{01F9}{\`n}
-  \DeclareUnicodeCharacter{01FC}{\'{\AE}}
-  \DeclareUnicodeCharacter{01FD}{\'{\ae}}
-  \DeclareUnicodeCharacter{01FE}{\'{\O}}
-  \DeclareUnicodeCharacter{01FF}{\'{\o}}
-
-  \DeclareUnicodeCharacter{021E}{\v{H}}
-  \DeclareUnicodeCharacter{021F}{\v{h}}
-
-  \DeclareUnicodeCharacter{0226}{\dotaccent{A}}
-  \DeclareUnicodeCharacter{0227}{\dotaccent{a}}
-  \DeclareUnicodeCharacter{0228}{\cedilla{E}}
-  \DeclareUnicodeCharacter{0229}{\cedilla{e}}
-  \DeclareUnicodeCharacter{022E}{\dotaccent{O}}
-  \DeclareUnicodeCharacter{022F}{\dotaccent{o}}
-
-  \DeclareUnicodeCharacter{0232}{\=Y}
-  \DeclareUnicodeCharacter{0233}{\=y}
-  \DeclareUnicodeCharacter{0237}{\dotless{j}}
-
-  \DeclareUnicodeCharacter{02DB}{\ogonek{ }}
-
-  \DeclareUnicodeCharacter{1E02}{\dotaccent{B}}
-  \DeclareUnicodeCharacter{1E03}{\dotaccent{b}}
-  \DeclareUnicodeCharacter{1E04}{\udotaccent{B}}
-  \DeclareUnicodeCharacter{1E05}{\udotaccent{b}}
-  \DeclareUnicodeCharacter{1E06}{\ubaraccent{B}}
-  \DeclareUnicodeCharacter{1E07}{\ubaraccent{b}}
-  \DeclareUnicodeCharacter{1E0A}{\dotaccent{D}}
-  \DeclareUnicodeCharacter{1E0B}{\dotaccent{d}}
-  \DeclareUnicodeCharacter{1E0C}{\udotaccent{D}}
-  \DeclareUnicodeCharacter{1E0D}{\udotaccent{d}}
-  \DeclareUnicodeCharacter{1E0E}{\ubaraccent{D}}
-  \DeclareUnicodeCharacter{1E0F}{\ubaraccent{d}}
-
-  \DeclareUnicodeCharacter{1E1E}{\dotaccent{F}}
-  \DeclareUnicodeCharacter{1E1F}{\dotaccent{f}}
-
-  \DeclareUnicodeCharacter{1E20}{\=G}
-  \DeclareUnicodeCharacter{1E21}{\=g}
-  \DeclareUnicodeCharacter{1E22}{\dotaccent{H}}
-  \DeclareUnicodeCharacter{1E23}{\dotaccent{h}}
-  \DeclareUnicodeCharacter{1E24}{\udotaccent{H}}
-  \DeclareUnicodeCharacter{1E25}{\udotaccent{h}}
-  \DeclareUnicodeCharacter{1E26}{\"H}
-  \DeclareUnicodeCharacter{1E27}{\"h}
-
-  \DeclareUnicodeCharacter{1E30}{\'K}
-  \DeclareUnicodeCharacter{1E31}{\'k}
-  \DeclareUnicodeCharacter{1E32}{\udotaccent{K}}
-  \DeclareUnicodeCharacter{1E33}{\udotaccent{k}}
-  \DeclareUnicodeCharacter{1E34}{\ubaraccent{K}}
-  \DeclareUnicodeCharacter{1E35}{\ubaraccent{k}}
-  \DeclareUnicodeCharacter{1E36}{\udotaccent{L}}
-  \DeclareUnicodeCharacter{1E37}{\udotaccent{l}}
-  \DeclareUnicodeCharacter{1E3A}{\ubaraccent{L}}
-  \DeclareUnicodeCharacter{1E3B}{\ubaraccent{l}}
-  \DeclareUnicodeCharacter{1E3E}{\'M}
-  \DeclareUnicodeCharacter{1E3F}{\'m}
-
-  \DeclareUnicodeCharacter{1E40}{\dotaccent{M}}
-  \DeclareUnicodeCharacter{1E41}{\dotaccent{m}}
-  \DeclareUnicodeCharacter{1E42}{\udotaccent{M}}
-  \DeclareUnicodeCharacter{1E43}{\udotaccent{m}}
-  \DeclareUnicodeCharacter{1E44}{\dotaccent{N}}
-  \DeclareUnicodeCharacter{1E45}{\dotaccent{n}}
-  \DeclareUnicodeCharacter{1E46}{\udotaccent{N}}
-  \DeclareUnicodeCharacter{1E47}{\udotaccent{n}}
-  \DeclareUnicodeCharacter{1E48}{\ubaraccent{N}}
-  \DeclareUnicodeCharacter{1E49}{\ubaraccent{n}}
-
-  \DeclareUnicodeCharacter{1E54}{\'P}
-  \DeclareUnicodeCharacter{1E55}{\'p}
-  \DeclareUnicodeCharacter{1E56}{\dotaccent{P}}
-  \DeclareUnicodeCharacter{1E57}{\dotaccent{p}}
-  \DeclareUnicodeCharacter{1E58}{\dotaccent{R}}
-  \DeclareUnicodeCharacter{1E59}{\dotaccent{r}}
-  \DeclareUnicodeCharacter{1E5A}{\udotaccent{R}}
-  \DeclareUnicodeCharacter{1E5B}{\udotaccent{r}}
-  \DeclareUnicodeCharacter{1E5E}{\ubaraccent{R}}
-  \DeclareUnicodeCharacter{1E5F}{\ubaraccent{r}}
-
-  \DeclareUnicodeCharacter{1E60}{\dotaccent{S}}
-  \DeclareUnicodeCharacter{1E61}{\dotaccent{s}}
-  \DeclareUnicodeCharacter{1E62}{\udotaccent{S}}
-  \DeclareUnicodeCharacter{1E63}{\udotaccent{s}}
-  \DeclareUnicodeCharacter{1E6A}{\dotaccent{T}}
-  \DeclareUnicodeCharacter{1E6B}{\dotaccent{t}}
-  \DeclareUnicodeCharacter{1E6C}{\udotaccent{T}}
-  \DeclareUnicodeCharacter{1E6D}{\udotaccent{t}}
-  \DeclareUnicodeCharacter{1E6E}{\ubaraccent{T}}
-  \DeclareUnicodeCharacter{1E6F}{\ubaraccent{t}}
-
-  \DeclareUnicodeCharacter{1E7C}{\~V}
-  \DeclareUnicodeCharacter{1E7D}{\~v}
-  \DeclareUnicodeCharacter{1E7E}{\udotaccent{V}}
-  \DeclareUnicodeCharacter{1E7F}{\udotaccent{v}}
-
-  \DeclareUnicodeCharacter{1E80}{\`W}
-  \DeclareUnicodeCharacter{1E81}{\`w}
-  \DeclareUnicodeCharacter{1E82}{\'W}
-  \DeclareUnicodeCharacter{1E83}{\'w}
-  \DeclareUnicodeCharacter{1E84}{\"W}
-  \DeclareUnicodeCharacter{1E85}{\"w}
-  \DeclareUnicodeCharacter{1E86}{\dotaccent{W}}
-  \DeclareUnicodeCharacter{1E87}{\dotaccent{w}}
-  \DeclareUnicodeCharacter{1E88}{\udotaccent{W}}
-  \DeclareUnicodeCharacter{1E89}{\udotaccent{w}}
-  \DeclareUnicodeCharacter{1E8A}{\dotaccent{X}}
-  \DeclareUnicodeCharacter{1E8B}{\dotaccent{x}}
-  \DeclareUnicodeCharacter{1E8C}{\"X}
-  \DeclareUnicodeCharacter{1E8D}{\"x}
-  \DeclareUnicodeCharacter{1E8E}{\dotaccent{Y}}
-  \DeclareUnicodeCharacter{1E8F}{\dotaccent{y}}
-
-  \DeclareUnicodeCharacter{1E90}{\^Z}
-  \DeclareUnicodeCharacter{1E91}{\^z}
-  \DeclareUnicodeCharacter{1E92}{\udotaccent{Z}}
-  \DeclareUnicodeCharacter{1E93}{\udotaccent{z}}
-  \DeclareUnicodeCharacter{1E94}{\ubaraccent{Z}}
-  \DeclareUnicodeCharacter{1E95}{\ubaraccent{z}}
-  \DeclareUnicodeCharacter{1E96}{\ubaraccent{h}}
-  \DeclareUnicodeCharacter{1E97}{\"t}
-  \DeclareUnicodeCharacter{1E98}{\ringaccent{w}}
-  \DeclareUnicodeCharacter{1E99}{\ringaccent{y}}
-
-  \DeclareUnicodeCharacter{1EA0}{\udotaccent{A}}
-  \DeclareUnicodeCharacter{1EA1}{\udotaccent{a}}
-
-  \DeclareUnicodeCharacter{1EB8}{\udotaccent{E}}
-  \DeclareUnicodeCharacter{1EB9}{\udotaccent{e}}
-  \DeclareUnicodeCharacter{1EBC}{\~E}
-  \DeclareUnicodeCharacter{1EBD}{\~e}
-
-  \DeclareUnicodeCharacter{1ECA}{\udotaccent{I}}
-  \DeclareUnicodeCharacter{1ECB}{\udotaccent{i}}
-  \DeclareUnicodeCharacter{1ECC}{\udotaccent{O}}
-  \DeclareUnicodeCharacter{1ECD}{\udotaccent{o}}
-
-  \DeclareUnicodeCharacter{1EE4}{\udotaccent{U}}
-  \DeclareUnicodeCharacter{1EE5}{\udotaccent{u}}
-
-  \DeclareUnicodeCharacter{1EF2}{\`Y}
-  \DeclareUnicodeCharacter{1EF3}{\`y}
-  \DeclareUnicodeCharacter{1EF4}{\udotaccent{Y}}
-
-  \DeclareUnicodeCharacter{1EF8}{\~Y}
-  \DeclareUnicodeCharacter{1EF9}{\~y}
-
-  \DeclareUnicodeCharacter{2013}{--}
-  \DeclareUnicodeCharacter{2014}{---}
-  \DeclareUnicodeCharacter{2018}{\quoteleft}
-  \DeclareUnicodeCharacter{2019}{\quoteright}
-  \DeclareUnicodeCharacter{201A}{\quotesinglbase}
-  \DeclareUnicodeCharacter{201C}{\quotedblleft}
-  \DeclareUnicodeCharacter{201D}{\quotedblright}
-  \DeclareUnicodeCharacter{201E}{\quotedblbase}
-  \DeclareUnicodeCharacter{2022}{\bullet}
-  \DeclareUnicodeCharacter{2026}{\dots}
-  \DeclareUnicodeCharacter{2039}{\guilsinglleft}
-  \DeclareUnicodeCharacter{203A}{\guilsinglright}
-  \DeclareUnicodeCharacter{20AC}{\euro}
-
-  \DeclareUnicodeCharacter{2192}{\expansion}
-  \DeclareUnicodeCharacter{21D2}{\result}
-
-  \DeclareUnicodeCharacter{2212}{\minus}
-  \DeclareUnicodeCharacter{2217}{\point}
-  \DeclareUnicodeCharacter{2261}{\equiv}
-}% end of \utfeightchardefs
+  \let\DeclareUnicodeCharacter\DeclareUnicodeCharacterUTFviii
+  \unicodechardefs
+}
+
+% Whether the active definitions of non-ASCII characters expand to
+% non-active tokens with the same character code.  This is used to
+% write characters literally, instead of using active definitions for
+% printing the correct glyphs.
+\newif\ifpassthroughchars
+\passthroughcharsfalse
+
+% For native Unicode handling (XeTeX and LuaTeX),
+% provide a definition macro to replace/pass-through a Unicode character
+%
+\def\DeclareUnicodeCharacterNative#1#2{%
+  \catcode"#1=\active
+  \def\dodeclareunicodecharacternative##1##2##3{%
+    \begingroup
+      \uccode`\~="##2\relax
+      \uppercase{\gdef~}{%
+        \ifpassthroughchars
+          ##1%
+        \else
+          ##3%
+        \fi
+      }
+    \endgroup
+  }
+  \begingroup
+    \uccode`\.="#1\relax
+    \uppercase{\def\UTFNativeTmp{.}}%
+    \expandafter\dodeclareunicodecharacternative\UTFNativeTmp{#1}{#2}%
+  \endgroup
+}
+
+% Native Unicode handling (XeTeX and LuaTeX) character replacing definition.
+% It activates the setting that replaces Unicode characters.
+\def\nativeunicodechardefs{%
+  \let\DeclareUnicodeCharacter\DeclareUnicodeCharacterNative
+  \unicodechardefs
+}
+
+% For native Unicode handling (XeTeX and LuaTeX),
+% make the character token expand
+% to the sequences given in \unicodechardefs for printing.
+\def\DeclareUnicodeCharacterNativeAtU#1#2{%
+  \def\UTFAtUTmp{#2}
+  \expandafter\globallet\csname uni:#1\endcsname \UTFAtUTmp
+}
 
+% @U command definitions for native Unicode handling (XeTeX and LuaTeX).
+\def\nativeunicodechardefsatu{%
+  \let\DeclareUnicodeCharacter\DeclareUnicodeCharacterNativeAtU
+  \unicodechardefs
+}
 
 % US-ASCII character definitions.
 \def\asciichardefs{% nothing need be done
    \relax
 }
 
+% define all Unicode characters we know about, for the sake of @U.
+\iftxinativeunicodecapable
+  \nativeunicodechardefsatu
+\else
+  \utfeightchardefs
+\fi
+
+
 % Make non-ASCII characters printable again for compatibility with
 % existing Texinfo documents that may use them, even without declaring a
 % document encoding.
@@ -9644,12 +11265,12 @@ directory should work if nowhere else does.}
   \advance\vsize by \topskip
   \outervsize = \vsize
   \advance\outervsize by 2\topandbottommargin
-  \pageheight = \vsize
+  \txipageheight = \vsize
   %
   \hsize = #2\relax
   \outerhsize = \hsize
   \advance\outerhsize by 0.5in
-  \pagewidth = \hsize
+  \txipagewidth = \hsize
   %
   \normaloffset = #4\relax
   \bindingoffset = #5\relax
@@ -9661,6 +11282,14 @@ directory should work if nowhere else does.}
     % whatever layout pdftex was dumped with.
     \pdfhorigin = 1 true in
     \pdfvorigin = 1 true in
+  \else
+    \ifx\XeTeXrevision\thisisundefined
+      \special{papersize=#8,#7}%
+    \else
+      \pdfpageheight #7\relax
+      \pdfpagewidth #8\relax
+      % XeTeX does not have \pdfhorigin and \pdfvorigin.
+    \fi
   \fi
   %
   \setleading{\textleading}
@@ -9693,7 +11322,6 @@ directory should work if nowhere else does.}
   %
   \lispnarrowing = 0.3in
   \tolerance = 700
-  \hfuzz = 1pt
   \contentsrightmargin = 0pt
   \defbodyindent = .5cm
 }}
@@ -9711,7 +11339,6 @@ directory should work if nowhere else does.}
   %
   \lispnarrowing = 0.25in
   \tolerance = 700
-  \hfuzz = 1pt
   \contentsrightmargin = 0pt
   \defbodyindent = .4cm
 }}
@@ -9737,7 +11364,6 @@ directory should work if nowhere else does.}
                     {297mm}{210mm}%
   %
   \tolerance = 700
-  \hfuzz = 1pt
   \contentsrightmargin = 0pt
   \defbodyindent = 5mm
 }}
@@ -9756,7 +11382,6 @@ directory should work if nowhere else does.}
   %
   \lispnarrowing = 0.2in
   \tolerance = 800
-  \hfuzz = 1.2pt
   \contentsrightmargin = 0pt
   \defbodyindent = 2mm
   \tableindent = 12mm
@@ -9812,6 +11437,9 @@ directory should work if nowhere else does.}
 %
 \letterpaper
 
+% Default value of \hfuzz, for suppressing warnings about overfull hboxes.
+\hfuzz = 1pt
+
 
 \message{and turning on texinfo input format.}
 
@@ -9848,44 +11476,47 @@ directory should work if nowhere else does.}
 % this is not a problem.
 \def\ifusingit#1#2{\ifdim \fontdimen1\font>0pt #1\else #2\fi}
 
-% Turn off all special characters except @
-% (and those which the user can use as if they were ordinary).
+% Set catcodes for Texinfo file
+
+% Active characters for printing the wanted glyph.
 % Most of these we simply print from the \tt font, but for some, we can
 % use math or other variants that look better in normal text.
-
+%
 \catcode`\"=\active
 \def\activedoublequote{{\tt\char34}}
 \let"=\activedoublequote
-\catcode`\~=\active
-\def~{{\tt\char126}}
-\chardef\hat=`\^
-\catcode`\^=\active
-\def^{{\tt \hat}}
+\catcode`\~=\active \def\activetilde{{\tt\char126}} \let~ = \activetilde
+\chardef\hatchar=`\^
+\catcode`\^=\active \def\activehat{{\tt \hatchar}} \let^ = \activehat
 
 \catcode`\_=\active
 \def_{\ifusingtt\normalunderscore\_}
-\let\realunder=_
-% Subroutine for the previous macro.
 \def\_{\leavevmode \kern.07em \vbox{\hrule width.3em height.1ex}\kern .07em }
+\let\realunder=_
+
+\catcode`\|=\active \def|{{\tt\char124}}
 
-\catcode`\|=\active
-\def|{{\tt\char124}}
 \chardef \less=`\<
-\catcode`\<=\active
-\def<{{\tt \less}}
+\catcode`\<=\active \def\activeless{{\tt \less}}\let< = \activeless
 \chardef \gtr=`\>
-\catcode`\>=\active
-\def>{{\tt \gtr}}
-\catcode`\+=\active
-\def+{{\tt \char 43}}
-\catcode`\$=\active
-\def${\ifusingit{{\sl\$}}\normaldollar}%$ font-lock fix
+\catcode`\>=\active \def\activegtr{{\tt \gtr}}\let> = \activegtr
+\catcode`\+=\active \def+{{\tt \char 43}}
+\catcode`\$=\active \def${\ifusingit{{\sl\$}}\normaldollar}%$ font-lock fix
+\catcode`\-=\active \let-=\normaldash
 
-% If a .fmt file is being used, characters that might appear in a file
-% name cannot be active until we have parsed the command line.
-% So turn them off again, and have \everyjob (or @setfilename) turn them on.
-% \otherifyactive is called near the end of this file.
-\def\otherifyactive{\catcode`+=\other \catcode`\_=\other}
+
+% used for headline/footline in the output routine, in case the page
+% breaks in the middle of an @tex block.
+\def\texinfochars{%
+  \let< = \activeless
+  \let> = \activegtr
+  \let~ = \activetilde 
+  \let^ = \activehat
+  \markupsetuplqdefault \markupsetuprqdefault 
+  \let\b = \strong
+  \let\i = \smartitalic
+  % in principle, all other definitions in \tex have to be undone too.
+}
 
 % Used sometimes to turn off (effectively) the active characters even after
 % parsing them.
@@ -9905,23 +11536,22 @@ directory should work if nowhere else does.}
 % \doublebackslash is two of them (for the pdf outlines).
 {\catcode`\\=\other @gdef@realbackslash{\} @gdef@doublebackslash{\\}}
 
-% In texinfo, backslash is an active character; it prints the backslash
+% In Texinfo, backslash is an active character; it prints the backslash
 % in fixed width font.
 \catcode`\\=\active  % @ for escape char from now on.
 
-% The story here is that in math mode, the \char of \backslashcurfont
-% ends up printing the roman \ from the math symbol font (because \char
-% in math mode uses the \mathcode, and plain.tex sets
-% \mathcode`\\="026E).  It seems better for @backslashchar{} to always
-% print a typewriter backslash, hence we use an explicit \mathchar,
+% Print a typewriter backslash.  For math mode, we can't simply use
+% \backslashcurfont: the story here is that in math mode, the \char
+% of \backslashcurfont ends up printing the roman \ from the math symbol
+% font (because \char in math mode uses the \mathcode, and plain.tex
+% sets \mathcode`\\="026E).  Hence we use an explicit \mathchar,
 % which is the decimal equivalent of "715c (class 7, e.g., use \fam;
 % ignored family value; char position "5C).  We can't use " for the
 % usual hex value because it has already been made active.
-@def@normalbackslash{{@tt @ifmmode @mathchar29020 @else @backslashcurfont @fi}}
-@let@backslashchar = @normalbackslash % @backslashchar{} is for user documents.
 
-% On startup, @fixbackslash assigns:
-%  @let \ = @normalbackslash
+@def@ttbackslash{{@tt @ifmmode @mathchar29020 @else @backslashcurfont @fi}}
+@let@backslashchar = @ttbackslash % @backslashchar{} is for user documents.
+
 % \rawbackslash defines an active \ to do \backslashcurfont.
 % \otherbackslash defines an active \ to be a literal `\' character with
 % catcode other.  We switch back and forth between these.
@@ -9931,45 +11561,91 @@ directory should work if nowhere else does.}
 % Same as @turnoffactive except outputs \ as {\tt\char`\\} instead of
 % the literal character `\'.
 %
-@def@normalturnoffactive{%
-  @let"=@normaldoublequote
-  @let$=@normaldollar %$ font-lock fix
-  @let+=@normalplus
-  @let<=@normalless
-  @let>=@normalgreater
-  @let\=@normalbackslash
-  @let^=@normalcaret
-  @let_=@normalunderscore
-  @let|=@normalverticalbar
-  @let~=@normaltilde
-  @markupsetuplqdefault
-  @markupsetuprqdefault
-  @unsepspaces
-}
-
-% Make _ and + \other characters, temporarily.
-% This is canceled by @fixbackslash.
-@otherifyactive
+{@catcode`- = @active
+ @gdef@normalturnoffactive{%
+   @passthroughcharstrue
+   @let-=@normaldash
+   @let"=@normaldoublequote
+   @let$=@normaldollar %$ font-lock fix
+   @let+=@normalplus
+   @let<=@normalless
+   @let>=@normalgreater
+   @let^=@normalcaret
+   @let_=@normalunderscore
+   @let|=@normalverticalbar
+   @let~=@normaltilde
+   @let\=@ttbackslash
+   @markupsetuplqdefault
+   @markupsetuprqdefault
+   @unsepspaces
+ }
+}
+
+% If a .fmt file is being used, characters that might appear in a file
+% name cannot be active until we have parsed the command line.
+% So turn them off again, and have @fixbackslash turn them back on.
+@catcode`+=@other @catcode`@_=@other
 
+% \enablebackslashhack - allow file to begin `\input texinfo'
+%
 % If a .fmt file is being used, we don't want the `\input texinfo' to show up.
 % That is what \eatinput is for; after that, the `\' should revert to printing
 % a backslash.
-%
-@gdef@eatinput input texinfo{@fixbackslash}
-@global@let\ = @eatinput
+% If the file did not have a `\input texinfo', then it is turned off after
+% the first line; otherwise the first `\' in the file would cause an error.
+% This is used on the very last line of this file, texinfo.tex.
+% We also use @c to call @fixbackslash, in case ends of lines are hidden.
+{
+@catcode`@^=7
+@catcode`@^^M=13@gdef@enablebackslashhack{%
+  @global@let\ = @eatinput%
+  @catcode`@^^M=13%
+  @def@c{@fixbackslash@c}%
+  % Definition for the newline at the end of this file.
+  @def ^^M{@let^^M@secondlinenl}%
+  % Definition for a newline in the main Texinfo file.
+  @gdef @secondlinenl{@fixbackslash}%
+  % In case the first line has a whole-line command on it
+  @let@originalparsearg@parsearg
+  @def@parsearg{@fixbackslash@originalparsearg}
+}}
+
+{@catcode`@^=7 @catcode`@^^M=13%
+@gdef@eatinput input texinfo#1^^M{@fixbackslash}}
+
+% Emergency active definition of newline, in case an active newline token
+% appears by mistake.
+{@catcode`@^=7 @catcode13=13%
+@gdef@enableemergencynewline{%
+  @gdef^^M{%
+    @par%
+    %<warning: active newline>@par%
+}}}
+
 
-% On the other hand, perhaps the file did not have a `\input texinfo'. Then
-% the first `\' in the file would cause an error. This macro tries to fix
-% that, assuming it is called before the first `\' could plausibly occur.
-% Also turn back on active characters that might appear in the input
-% file name, in case not using a pre-dumped format.
-%
 @gdef@fixbackslash{%
-  @ifx\@eatinput @let\ = @normalbackslash @fi
+  @ifx\@eatinput @let\ = @ttbackslash @fi
+  @catcode13=5 % regular end of line
+  @enableemergencynewline
+  @let@c=@texinfoc
+  @let@parsearg@originalparsearg
+  % Also turn back on active characters that might appear in the input
+  % file name, in case not using a pre-dumped format.
   @catcode`+=@active
   @catcode`@_=@active
+  %
+  % If texinfo.cnf is present on the system, read it.
+  % Useful for site-wide @afourpaper, etc.  This macro, @fixbackslash, gets
+  % called at the beginning of every Texinfo file.  Not opening texinfo.cnf
+  % directly in this file, texinfo.tex, makes it possible to make a format
+  % file for Texinfo.
+  %
+  @openin 1 texinfo.cnf
+  @ifeof 1 @else @input texinfo.cnf @fi
+  @closein 1
 }
 
+
 % Say @foo, not \foo, in error messages.
 @escapechar = `@@
 
@@ -9998,7 +11674,7 @@ directory should work if nowhere else does.}
 
 @c Local variables:
 @c eval: (add-hook 'write-file-hooks 'time-stamp)
-@c page-delimiter: "^\\\\message"
+@c page-delimiter: "^\\\\message\\|emacs-page"
 @c time-stamp-start: "def\\\\texinfoversion{"
 @c time-stamp-format: "%:y-%02m-%02d.%02H"
 @c time-stamp-end: "}"
@@ -10006,6 +11682,4 @@ directory should work if nowhere else does.}
 
 @c vim:sw=2:
 
-@ignore
-   arch-tag: e1b36e32-c96e-4135-a41a-0b2efa2ea115
-@end ignore
+@enablebackslashhack
index 082b749..2d20d21 100755 (executable)
@@ -1,11 +1,11 @@
-eval '(exit $?0)' && eval 'exec perl -wS -0777 -pi "$0" ${1+"$@"}'
+eval '(exit $?0)' && eval 'exec perl -wS -0777 -pi "$0" "$@"'
   & eval 'exec perl -wS -0777 -pi "$0" $argv:q'
     if 0;
 # Update an FSF copyright year list to include the current year.
 
-my $VERSION = '2012-02-05.21:39'; # UTC
+my $VERSION = '2016-01-12.23:13'; # UTC
 
-# Copyright (C) 2009-2012 Free Software Foundation, Inc.
+# Copyright (C) 2009-2017 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
@@ -124,7 +124,7 @@ use strict;
 use warnings;
 
 my $copyright_re = 'Copyright';
-my $circle_c_re = '(?:\([cC]\)|@copyright{}|&copy;)';
+my $circle_c_re = '(?:\([cC]\)|@copyright\{}|\\\\\(co|&copy;)';
 my $holder = $ENV{UPDATE_COPYRIGHT_HOLDER};
 $holder ||= 'Free Software Foundation, Inc.';
 my $prefix_max = 5;
@@ -192,7 +192,7 @@ if (defined $stmt_re)
     if ($final_year != $this_year)
       {
         # Update the year.
-        $stmt =~ s/$final_year_orig/$final_year, $this_year/;
+        $stmt =~ s/\b$final_year_orig\b/$final_year, $this_year/;
       }
     if ($final_year != $this_year || $ENV{'UPDATE_COPYRIGHT_FORCE'})
       {
@@ -269,6 +269,6 @@ else
 # eval: (add-hook 'write-file-hooks 'time-stamp)
 # time-stamp-start: "my $VERSION = '"
 # time-stamp-format: "%:y-%02m-%02d.%02H:%02M"
-# time-stamp-time-zone: "UTC"
+# time-stamp-time-zone: "UTC0"
 # time-stamp-end: "'; # UTC"
 # End:
index 6879d8d..d788f2d 100755 (executable)
@@ -1,9 +1,9 @@
 #! /bin/sh
 # ylwrap - wrapper for lex/yacc invocations.
 
-scriptversion=2011-08-25.18; # UTC
+scriptversion=2016-01-11.22; # UTC
 
-# Copyright (C) 1996-2012 Free Software Foundation, Inc.
+# Copyright (C) 1996-2017 Free Software Foundation, Inc.
 #
 # Written by Tom Tromey <tromey@cygnus.com>.
 #
@@ -29,6 +29,38 @@ scriptversion=2011-08-25.18; # UTC
 # bugs to <bug-automake@gnu.org> or send patches to
 # <automake-patches@gnu.org>.
 
+get_dirname ()
+{
+  case $1 in
+    */*|*\\*) printf '%s\n' "$1" | sed -e 's|\([\\/]\)[^\\/]*$|\1|';;
+    # Otherwise,  we want the empty string (not ".").
+  esac
+}
+
+# guard FILE
+# ----------
+# The CPP macro used to guard inclusion of FILE.
+guard ()
+{
+  printf '%s\n' "$1"                                                    \
+    | sed                                                               \
+        -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'   \
+        -e 's/[^ABCDEFGHIJKLMNOPQRSTUVWXYZ]/_/g'                        \
+        -e 's/__*/_/g'
+}
+
+# quote_for_sed [STRING]
+# ----------------------
+# Return STRING (or stdin) quoted to be used as a sed pattern.
+quote_for_sed ()
+{
+  case $# in
+    0) cat;;
+    1) printf '%s\n' "$1";;
+  esac \
+    | sed -e 's|[][\\.*]|\\&|g'
+}
+
 case "$1" in
   '')
     echo "$0: No files given.  Try '$0 --help' for more information." 1>&2
@@ -62,56 +94,73 @@ EOF
     ;;
 esac
 
-get_dirname ()
-{
-  case $1 in
-    */*|*\\*) printf '%s\n' "$1" | sed -e 's,\([\\/]\)[^\\/]*$,\1,';;
-    # Otherwise,  we want the empty string (not ".").
-  esac
-}
-
-quote_for_sed ()
-{
-  # FIXME: really we should care about more than '.' and '\'.
-  sed -e 's,[\\.],\\&,g'
-}
 
 # The input.
-input="$1"
+input=$1
 shift
 # We'll later need for a correct munging of "#line" directives.
 input_sub_rx=`get_dirname "$input" | quote_for_sed`
-case "$input" in
+case $input in
   [\\/]* | ?:[\\/]*)
     # Absolute path; do nothing.
     ;;
   *)
     # Relative path.  Make it absolute.
-    input="`pwd`/$input"
+    input=`pwd`/$input
     ;;
 esac
+input_rx=`get_dirname "$input" | quote_for_sed`
+
+# Since DOS filename conventions don't allow two dots,
+# the DOS version of Bison writes out y_tab.c instead of y.tab.c
+# and y_tab.h instead of y.tab.h. Test to see if this is the case.
+y_tab_nodot=false
+if test -f y_tab.c || test -f y_tab.h; then
+  y_tab_nodot=true
+fi
 
-pairlist=
-while test "$#" -ne 0; do
-  if test "$1" = "--"; then
+# The parser itself, the first file, is the destination of the .y.c
+# rule in the Makefile.
+parser=$1
+
+# A sed program to s/FROM/TO/g for all the FROM/TO so that, for
+# instance, we rename #include "y.tab.h" into #include "parse.h"
+# during the conversion from y.tab.c to parse.c.
+sed_fix_filenames=
+
+# Also rename header guards, as Bison 2.7 for instance uses its header
+# guard in its implementation file.
+sed_fix_header_guards=
+
+while test $# -ne 0; do
+  if test x"$1" = x"--"; then
     shift
     break
   fi
-  pairlist="$pairlist $1"
+  from=$1
+  # Handle y_tab.c and y_tab.h output by DOS
+  if $y_tab_nodot; then
+    case $from in
+      "y.tab.c") from=y_tab.c;;
+      "y.tab.h") from=y_tab.h;;
+    esac
+  fi
+  shift
+  to=$1
   shift
+  sed_fix_filenames="${sed_fix_filenames}s|"`quote_for_sed "$from"`"|$to|g;"
+  sed_fix_header_guards="${sed_fix_header_guards}s|"`guard "$from"`"|"`guard "$to"`"|g;"
 done
 
 # The program to run.
-prog="$1"
+prog=$1
 shift
 # Make any relative path in $prog absolute.
-case "$prog" in
+case $prog in
   [\\/]* | ?:[\\/]*) ;;
-  *[\\/]*) prog="`pwd`/$prog" ;;
+  *[\\/]*) prog=`pwd`/$prog ;;
 esac
 
-# FIXME: add hostname here for parallel makes that run commands on
-# other machines.  But that might take us over the 14-char limit.
 dirname=ylwrap$$
 do_exit="cd '`pwd`' && rm -rf $dirname > /dev/null 2>&1;"' (exit $ret); exit $ret'
 trap "ret=129; $do_exit" 1
@@ -129,90 +178,56 @@ esac
 ret=$?
 
 if test $ret -eq 0; then
-  set X $pairlist
-  shift
-  first=yes
-  # Since DOS filename conventions don't allow two dots,
-  # the DOS version of Bison writes out y_tab.c instead of y.tab.c
-  # and y_tab.h instead of y.tab.h. Test to see if this is the case.
-  y_tab_nodot="no"
-  if test -f y_tab.c || test -f y_tab.h; then
-    y_tab_nodot="yes"
-  fi
-
-  input_rx=`get_dirname "$input" | quote_for_sed`
-
-  while test "$#" -ne 0; do
-    from="$1"
-    # Handle y_tab.c and y_tab.h output by DOS
-    if test $y_tab_nodot = "yes"; then
-      if test $from = "y.tab.c"; then
-        from="y_tab.c"
-      else
-        if test $from = "y.tab.h"; then
-          from="y_tab.h"
-        fi
-      fi
-    fi
+  for from in *
+  do
+    to=`printf '%s\n' "$from" | sed "$sed_fix_filenames"`
     if test -f "$from"; then
       # If $2 is an absolute path name, then just use that,
       # otherwise prepend '../'.
-      case "$2" in
-        [\\/]* | ?:[\\/]*) target="$2";;
-        *) target="../$2";;
+      case $to in
+        [\\/]* | ?:[\\/]*) target=$to;;
+        *) target=../$to;;
       esac
 
-      # We do not want to overwrite a header file if it hasn't
-      # changed.  This avoid useless recompilations.  However the
-      # parser itself (the first file) should always be updated,
-      # because it is the destination of the .y.c rule in the
-      # Makefile.  Divert the output of all other files to a temporary
-      # file so we can compare them to existing versions.
-      if test $first = no; then
-        realtarget="$target"
-        target="tmp-`echo $target | sed s/.*[\\/]//g`"
+      # Do not overwrite unchanged header files to avoid useless
+      # recompilations.  Always update the parser itself: it is the
+      # destination of the .y.c rule in the Makefile.  Divert the
+      # output of all other files to a temporary file so we can
+      # compare them to existing versions.
+      if test $from != $parser; then
+        realtarget=$target
+        target=tmp-`printf '%s\n' "$target" | sed 's|.*[\\/]||g'`
       fi
-      # Munge "#line" or "#" directives.
-      # We don't want the resulting debug information to point at
-      # an absolute srcdir.
-      # We want to use the real output file name, not yy.lex.c for
-      # instance.
-      # We want the include guards to be adjusted too.
-      FROM=`echo "$from" | sed \
-            -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'\
-            -e 's/[^ABCDEFGHIJKLMNOPQRSTUVWXYZ]/_/g'`
-      TARGET=`echo "$2" | sed \
-            -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'\
-            -e 's/[^ABCDEFGHIJKLMNOPQRSTUVWXYZ]/_/g'`
-
-      sed -e "/^#/!b" -e "s,$input_rx,$input_sub_rx," -e "s,$from,$2," \
-          -e "s,$FROM,$TARGET," "$from" >"$target" || ret=$?
-
-      # Check whether header files must be updated.
-      if test $first = no; then
+
+      # Munge "#line" or "#" directives.  Don't let the resulting
+      # debug information point at an absolute srcdir.  Use the real
+      # output file name, not yy.lex.c for instance.  Adjust the
+      # include guards too.
+      sed -e "/^#/!b"                           \
+          -e "s|$input_rx|$input_sub_rx|"       \
+          -e "$sed_fix_filenames"               \
+          -e "$sed_fix_header_guards"           \
+        "$from" >"$target" || ret=$?
+
+      # Check whether files must be updated.
+      if test "$from" != "$parser"; then
         if test -f "$realtarget" && cmp -s "$realtarget" "$target"; then
-          echo "$2" is unchanged
+          echo "$to is unchanged"
           rm -f "$target"
         else
-          echo updating "$2"
+          echo "updating $to"
           mv -f "$target" "$realtarget"
         fi
       fi
     else
-      # A missing file is only an error for the first file.  This
-      # is a blatant hack to let us support using "yacc -d".  If -d
-      # is not specified, we don't want an error when the header
-      # file is "missing".
-      if test $first = yes; then
+      # A missing file is only an error for the parser.  This is a
+      # blatant hack to let us support using "yacc -d".  If -d is not
+      # specified, don't fail when the header file is "missing".
+      if test "$from" = "$parser"; then
         ret=1
       fi
     fi
-    shift
-    shift
-    first=no
   done
-else
-  ret=$?
 fi
 
 # Remove the directory.
@@ -227,6 +242,6 @@ exit $ret
 # eval: (add-hook 'write-file-hooks 'time-stamp)
 # time-stamp-start: "scriptversion="
 # time-stamp-format: "%:y-%02m-%02d.%02H"
-# time-stamp-time-zone: "UTC"
+# time-stamp-time-zone: "UTC0"
 # time-stamp-end: "; # UTC"
 # End:
diff --git a/m4/Makefile.inc b/m4/Makefile.inc
new file mode 100644 (file)
index 0000000..eb57027
--- /dev/null
@@ -0,0 +1,79 @@
+## Included by top-level Makefile for Automake.
+
+## Copyright (C) 1995-2017 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-provided m4 macros.  ##
+## ------------------------------ ##
+
+system_acdir = @system_acdir@
+automake_acdir = @automake_acdir@
+
+dist_automake_ac_DATA = \
+  %D%/amversion.m4 \
+  %D%/ar-lib.m4 \
+  %D%/as.m4 \
+  %D%/auxdir.m4 \
+  %D%/cond.m4 \
+  %D%/cond-if.m4 \
+  %D%/depend.m4 \
+  %D%/depout.m4 \
+  %D%/dmalloc.m4 \
+  %D%/extra-recurs.m4 \
+  %D%/gcj.m4 \
+  %D%/init.m4 \
+  %D%/install-sh.m4 \
+  %D%/lead-dot.m4 \
+  %D%/lex.m4 \
+  %D%/lispdir.m4 \
+  %D%/maintainer.m4 \
+  %D%/make.m4 \
+  %D%/missing.m4 \
+  %D%/mkdirp.m4 \
+  %D%/obsolete.m4 \
+  %D%/options.m4 \
+  %D%/python.m4 \
+  %D%/prog-cc-c-o.m4 \
+  %D%/runlog.m4 \
+  %D%/sanity.m4 \
+  %D%/silent.m4 \
+  %D%/strip.m4 \
+  %D%/substnot.m4 \
+  %D%/tar.m4 \
+  %D%/upc.m4 \
+  %D%/vala.m4
+
+dist_system_ac_DATA = %D%/acdir/README
+
+automake_internal_acdir = $(automake_acdir)/internal
+dist_automake_internal_ac_DATA = %D%/internal/ac-config-macro-dirs.m4
+
+# We build amversion.m4 here, instead of from config.status,
+# because config.status is rerun each time one of configure's
+# dependencies change and amversion.m4 happens to be a configure
+# dependency.  configure and amversion.m4 would be rebuilt in
+# loop otherwise.
+# Use '$(top_srcdir)' for the benefit of non-GNU makes: this is
+# how amversion.m4 appears in our dependencies.
+$(top_srcdir)/%D%/amversion.m4: $(srcdir)/configure.ac \
+                                $(srcdir)/%D%/amversion.in
+       $(AM_V_at)rm -f $@-t $@
+       $(AM_V_GEN)in=amversion.in \
+         && $(do_subst) <$(srcdir)/%D%/amversion.in >$@-t
+       $(generated_file_finalize)
+EXTRA_DIST += %D%/amversion.in
+
+# vim: ft=automake noet
index e44ace1..4b845d8 100644 (file)
@@ -1,13 +1,11 @@
 ##                                                          -*- Autoconf -*-
 ## @configure_input@
-# Copyright (C) 2002-2012 Free Software Foundation, Inc.
+# Copyright (C) 2002-2017 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 
-# serial 8
-
 # AM_AUTOMAKE_VERSION(VERSION)
 # ----------------------------
 # Automake X.Y traces this macro to ensure aclocal.m4 has been
index 660ea89..a848b0e 100644 (file)
@@ -1,23 +1,21 @@
 ##                                                          -*- Autoconf -*-
 ## Generated from amversion.in; do not edit by hand.
-# Copyright (C) 2002-2012 Free Software Foundation, Inc.
+# Copyright (C) 2002-2017 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 
-# serial 8
-
 # AM_AUTOMAKE_VERSION(VERSION)
 # ----------------------------
 # Automake X.Y traces this macro to ensure aclocal.m4 has been
 # generated from the m4 files accompanying Automake X.Y.
 # (This private macro should not be called outside this file.)
 AC_DEFUN([AM_AUTOMAKE_VERSION],
-[am__api_version='1.12'
+[am__api_version='1.15'
 dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
 dnl require some minimum version.  Point them to the right macro.
-m4_if([$1], [1.12.1], [],
+m4_if([$1], [1.15.1], [],
       [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
 ])
 
@@ -33,7 +31,7 @@ m4_define([_AM_AUTOCONF_VERSION], [])
 # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
 # This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
 AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
-[AM_AUTOMAKE_VERSION([1.12.1])dnl
+[AM_AUTOMAKE_VERSION([1.15.1])dnl
 m4_ifndef([AC_AUTOCONF_VERSION],
   [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
 _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
index 470def4..4fe6fb3 100644 (file)
@@ -1,12 +1,10 @@
 ##                                                          -*- Autoconf -*-
-# Copyright (C) 2011-2012 Free Software Foundation, Inc.
+# Copyright (C) 2011-2017 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 
-# serial 1
-
 # AM_PROG_AR([ACT-IF-FAIL])
 # -------------------------
 # Try to determine the archiver interface, and trigger the ar-lib wrapper
@@ -21,7 +19,8 @@ AC_CHECK_TOOLS([AR], [ar lib "link -lib"], [false])
 : ${AR=ar}
 
 AC_CACHE_CHECK([the archiver ($AR) interface], [am_cv_ar_interface],
-  [am_cv_ar_interface=ar
+  [AC_LANG_PUSH([C])
+   am_cv_ar_interface=ar
    AC_COMPILE_IFELSE([AC_LANG_SOURCE([[int some_variable = 0;]])],
      [am_ar_try='$AR cru libconftest.a conftest.$ac_objext >&AS_MESSAGE_LOG_FD'
       AC_TRY_EVAL([am_ar_try])
@@ -38,7 +37,7 @@ AC_CACHE_CHECK([the archiver ($AR) interface], [am_cv_ar_interface],
       fi
       rm -f conftest.lib libconftest.a
      ])
-   ])
+   AC_LANG_POP([C])])
 
 case $am_cv_ar_interface in
 ar)
index fa6d3c8..70ffc2e 100644 (file)
--- a/m4/as.m4
+++ b/m4/as.m4
@@ -1,13 +1,11 @@
 # Figure out how to run the assembler.                      -*- Autoconf -*-
 
-# Copyright (C) 2001-2012 Free Software Foundation, Inc.
+# Copyright (C) 2001-2017 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 
-# serial 5
-
 # AM_PROG_AS
 # ----------
 AC_DEFUN([AM_PROG_AS],
index 3dda02b..ae4327d 100644 (file)
@@ -1,13 +1,11 @@
 # AM_AUX_DIR_EXPAND                                         -*- Autoconf -*-
 
-# Copyright (C) 2001-2012 Free Software Foundation, Inc.
+# Copyright (C) 2001-2017 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 
-# serial 2
-
 # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
 # $ac_aux_dir to '$srcdir/foo'.  In other projects, it is set to
 # '$srcdir', '$srcdir/..', or '$srcdir/../..'.
@@ -47,8 +45,7 @@
 # configured tree to be moved without reconfiguration.
 
 AC_DEFUN([AM_AUX_DIR_EXPAND],
-[dnl Rely on autoconf to set up CDPATH properly.
-AC_PREREQ([2.50])dnl
-# expand $ac_aux_dir to an absolute path
-am_aux_dir=`cd $ac_aux_dir && pwd`
+[AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
+# Expand $ac_aux_dir to an absolute path.
+am_aux_dir=`cd "$ac_aux_dir" && pwd`
 ])
diff --git a/m4/ccstdc.m4 b/m4/ccstdc.m4
deleted file mode 100644 (file)
index d57f055..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
-## ----------------------------------------- ##             -*- Autoconf -*-
-## ANSIfy the C compiler whenever possible.  ##
-## From Franc,ois Pinard                     ##
-## ----------------------------------------- ##
-
-# Copyright (C) 1996-2012 Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# serial 5
-
-# This was merged into AC_PROG_CC in Autoconf.
-
-AU_DEFUN([AM_PROG_CC_STDC],
-[AC_PROG_CC
-AC_DIAGNOSE([obsolete], [$0:
-       your code should no longer depend upon 'am_cv_prog_cc_stdc', but upon
-       'ac_cv_prog_cc_stdc'.  Remove this warning and the assignment when
-       you adjust the code.  You can also remove the above call to
-       AC_PROG_CC if you already called it elsewhere.])
-am_cv_prog_cc_stdc=$ac_cv_prog_cc_stdc
-])
-AU_DEFUN([fp_PROG_CC_STDC])
index 80e687b..2c62bd3 100644 (file)
@@ -1,13 +1,11 @@
 # AM_COND_IF                                            -*- Autoconf -*-
 
-# Copyright (C) 2008-2012 Free Software Foundation, Inc.
+# Copyright (C) 2008-2017 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 
-# serial 3
-
 # _AM_COND_IF
 # _AM_COND_ELSE
 # _AM_COND_ENDIF
@@ -17,7 +15,6 @@ m4_define([_AM_COND_IF])
 m4_define([_AM_COND_ELSE])
 m4_define([_AM_COND_ENDIF])
 
-
 # AM_COND_IF(COND, [IF-TRUE], [IF-FALSE])
 # ---------------------------------------
 # If the shell condition COND is true, execute IF-TRUE, otherwise execute
index 03644ab..2a889d4 100644 (file)
@@ -1,13 +1,11 @@
 # AM_CONDITIONAL                                            -*- Autoconf -*-
 
-# Copyright (C) 1997-2012 Free Software Foundation, Inc.
+# Copyright (C) 1997-2017 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 
-# serial 10
-
 # AM_CONDITIONAL(NAME, SHELL-CONDITION)
 # -------------------------------------
 # Define a conditional.
index cee3199..3b1d4b8 100644 (file)
@@ -1,11 +1,10 @@
 ##                                                          -*- Autoconf -*-
-# Copyright (C) 1999-2012 Free Software Foundation, Inc.
+# Copyright (C) 1999-2017 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 
-# serial 17
 
 # There are a few dirty hacks below to avoid letting 'AC_PROG_CC' be
 # written in clear, in which case automake, when reading aclocal.m4,
index 749e592..5e3f5f7 100644 (file)
@@ -1,18 +1,17 @@
 # Generate code to set up dependency tracking.              -*- Autoconf -*-
 
-# Copyright (C) 1999-2012 Free Software Foundation, Inc.
+# Copyright (C) 1999-2017 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 
-# serial 6
 
 # _AM_OUTPUT_DEPENDENCY_COMMANDS
 # ------------------------------
 AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
 [{
-  # Autoconf 2.62 quotes --file arguments for eval, but not when files
+  # Older Autoconf quotes --file arguments for eval, but not when files
   # are listed without --file.  Let's play safe and only enable the eval
   # if we detect the quoting.
   case $CONFIG_FILES in
@@ -41,7 +40,7 @@ AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
     DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
     test -z "$DEPDIR" && continue
     am__include=`sed -n 's/^am__include = //p' < "$mf"`
-    test -z "am__include" && continue
+    test -z "$am__include" && continue
     am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
     # Find all dependency output files, they are included files with
     # $(DEPDIR) in their names.  We invoke sed twice because it is the
index be1a5b3..0b9f8d4 100644 (file)
@@ -3,14 +3,12 @@
 ## From Franc,ois Pinard               ##
 ## ----------------------------------- ##
 
-# Copyright (C) 1996-2012 Free Software Foundation, Inc.
+# Copyright (C) 1996-2017 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 
-# serial 6
-
 AC_DEFUN([AM_WITH_DMALLOC],
 [AC_MSG_CHECKING([if malloc debugging is wanted])
 AC_ARG_WITH([dmalloc],
@@ -26,5 +24,3 @@ else
   AC_MSG_RESULT([no])
 fi], [AC_MSG_RESULT([no])])
 ])
-
-AU_DEFUN([fp_WITH_DMALLOC], [AM_WITH_DMALLOC])
diff --git a/m4/extra-recurs.m4 b/m4/extra-recurs.m4
new file mode 100644 (file)
index 0000000..ac7df8e
--- /dev/null
@@ -0,0 +1,16 @@
+# AM_EXTRA_RECURSIVE_TARGETS                                -*- Autoconf -*-
+
+# Copyright (C) 2012-2017 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# AM_EXTRA_RECURSIVE_TARGETS
+# --------------------------
+# Define the list of user recursive targets.  This macro exists only to
+# be traced by Automake, which will ensure that a proper definition of
+# user-defined recursive targets (and associated rules) is propagated
+# into all the generated Makefiles.
+# TODO: We should really reject non-literal arguments here...
+AC_DEFUN([AM_EXTRA_RECURSIVE_TARGETS], [])
index e7cdd69..4139711 100644 (file)
--- a/m4/gcj.m4
+++ b/m4/gcj.m4
@@ -1,14 +1,12 @@
 # Check for Java compiler.                                  -*- Autoconf -*-
 # For now we only handle the GNU compiler.
 
-# Copyright (C) 1999-2012 Free Software Foundation, Inc.
+# Copyright (C) 1999-2017 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 
-# serial 8
-
 AC_DEFUN([AM_PROG_GCJ],
 [AC_CHECK_TOOLS([GCJ], [gcj], [gcj])
 test -z "$GCJ" && AC_MSG_ERROR([no acceptable gcj found in \$PATH])
diff --git a/m4/header.m4 b/m4/header.m4
deleted file mode 100644 (file)
index 2555b96..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-##                                                          -*- Autoconf -*-
-# Copyright (C) 1996-2012 Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# serial 8
-
-# AM_CONFIG_HEADER is obsolete.  It has been replaced by AC_CONFIG_HEADERS.
-AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)])
index 85228ba..c848927 100644 (file)
@@ -1,16 +1,20 @@
 # Do all the work for Automake.                             -*- Autoconf -*-
 
-# Copyright (C) 1996-2012 Free Software Foundation, Inc.
+# Copyright (C) 1996-2017 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 
-# serial 19
-
 # This macro actually does too much.  Some checks are only needed if
 # your package does certain things.  But this isn't really a big deal.
 
+dnl Redefine AC_PROG_CC to automatically invoke _AM_PROG_CC_C_O.
+m4_define([AC_PROG_CC],
+m4_defn([AC_PROG_CC])
+[_AM_PROG_CC_C_O
+])
+
 # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
 # AM_INIT_AUTOMAKE([OPTIONS])
 # -----------------------------------------------
@@ -23,7 +27,7 @@
 # arguments mandatory, and then we can depend on a new Autoconf
 # release and drop the old call support.
 AC_DEFUN([AM_INIT_AUTOMAKE],
-[AC_PREREQ([2.62])dnl
+[AC_PREREQ([2.65])dnl
 dnl Autoconf wants to disallow AM_ names.  We explicitly allow
 dnl the ones we care about.
 m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
@@ -53,8 +57,7 @@ AC_SUBST([CYGPATH_W])
 dnl Distinguish between old-style and new-style calls.
 m4_ifval([$2],
 [AC_DIAGNOSE([obsolete],
-[$0: two- and three-arguments forms are deprecated.  For more info, see:
-http://www.gnu.org/software/automake/manual/automake.html#Modernize-AM_INIT_AUTOMAKE-invocation])
+             [$0: two- and three-arguments forms are deprecated.])
 m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
  AC_SUBST([PACKAGE], [$1])dnl
  AC_SUBST([VERSION], [$2])],
@@ -82,8 +85,13 @@ AM_MISSING_PROG([MAKEINFO], [makeinfo])
 AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
 AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl
 AC_REQUIRE([AC_PROG_MKDIR_P])dnl
-# We need awk for the "check" target.  The system "awk" is bad on
-# some platforms.
+# For better backward compatibility.  To be removed once Automake 1.9.x
+# dies out for good.  For more background, see:
+# <http://lists.gnu.org/archive/html/automake/2012-07/msg00001.html>
+# <http://lists.gnu.org/archive/html/automake/2012-07/msg00014.html>
+AC_SUBST([mkdir_p], ['$(MKDIR_P)'])
+# We need awk for the "check" target (and possibly the TAP driver).  The
+# system "awk" is bad on some platforms.
 AC_REQUIRE([AC_PROG_AWK])dnl
 AC_REQUIRE([AC_PROG_MAKE_SET])dnl
 AC_REQUIRE([AM_SET_LEADING_DOT])dnl
@@ -103,21 +111,63 @@ AC_PROVIDE_IFELSE([AC_PROG_OBJC],
                  [_AM_DEPENDENCIES([OBJC])],
                  [m4_define([AC_PROG_OBJC],
                             m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl
-dnl Support for Objective C++ was only introduced in Autoconf 2.65,
-dnl but we still cater to Autoconf 2.62.
-m4_ifdef([AC_PROG_OBJCXX],
-[AC_PROVIDE_IFELSE([AC_PROG_OBJCXX],
+AC_PROVIDE_IFELSE([AC_PROG_OBJCXX],
                  [_AM_DEPENDENCIES([OBJCXX])],
                  [m4_define([AC_PROG_OBJCXX],
-                            m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])])dnl
+                            m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl
 ])
-_AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl
-dnl The 'parallel-tests' driver may need to know about EXEEXT, so add the
-dnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen.  This macro
-dnl is hooked onto _AC_COMPILER_EXEEXT early, see below.
+AC_REQUIRE([AM_SILENT_RULES])dnl
+dnl The testsuite driver may need to know about EXEEXT, so add the
+dnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen.  This
+dnl macro is hooked onto _AC_COMPILER_EXEEXT early, see below.
 AC_CONFIG_COMMANDS_PRE(dnl
 [m4_provide_if([_AM_COMPILER_EXEEXT],
   [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl
+
+# POSIX will say in a future version that running "rm -f" with no argument
+# is OK; and we want to be able to make that assumption in our Makefile
+# recipes.  So use an aggressive probe to check that the usage we want is
+# actually supported "in the wild" to an acceptable degree.
+# See automake bug#10828.
+# To make any issue more visible, cause the running configure to be aborted
+# by default if the 'rm' program in use doesn't match our expectations; the
+# user can still override this though.
+if rm -f && rm -fr && rm -rf; then : OK; else
+  cat >&2 <<'END'
+Oops!
+
+Your 'rm' program seems unable to run without file operands specified
+on the command line, even when the '-f' option is present.  This is contrary
+to the behaviour of most rm programs out there, and not conforming with
+the upcoming POSIX standard: <http://austingroupbugs.net/view.php?id=542>
+
+Please tell bug-automake@gnu.org about your system, including the value
+of your $PATH and any error possibly output before this message.  This
+can help us improve future automake versions.
+
+END
+  if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then
+    echo 'Configuration will proceed anyway, since you have set the' >&2
+    echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2
+    echo >&2
+  else
+    cat >&2 <<'END'
+Aborting the configuration process, to ensure you take notice of the issue.
+
+You can download and install GNU coreutils to get an 'rm' implementation
+that behaves properly: <http://www.gnu.org/software/coreutils/>.
+
+If you want to complete the configuration process using your problematic
+'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM
+to "yes", and re-run configure.
+
+END
+    AC_MSG_ERROR([Your 'rm' program is bad, sorry.])
+  fi
+fi
+dnl The trailing newline in this macro's definition is deliberate, for
+dnl backward compatibility and to allow trailing 'dnl'-style comments
+dnl after the AM_INIT_AUTOMAKE invocation. See automake bug#16841.
 ])
 
 dnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion.  Do not
@@ -126,7 +176,6 @@ dnl mangled by Autoconf and run in a shell conditional statement.
 m4_define([_AC_COMPILER_EXEEXT],
 m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])])
 
-
 # When config.status generates a header, we must update the stamp-h file.
 # This file resides in the same directory as the config header
 # that is generated.  The stamp files are numbered to have different names.
index 8061e7e..94b886a 100644 (file)
@@ -1,18 +1,16 @@
 ##                                                          -*- Autoconf -*-
-# Copyright (C) 2001-2012 Free Software Foundation, Inc.
+# Copyright (C) 2001-2017 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 
-# serial 8
-
 # AM_PROG_INSTALL_SH
 # ------------------
 # Define $install_sh.
 AC_DEFUN([AM_PROG_INSTALL_SH],
 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
-if test x"${install_sh}" != xset; then
+if test x"${install_sh+set}" != xset; then
   case $am_aux_dir in
   *\ * | *\    *)
     install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
diff --git a/m4/internal/ac-config-macro-dirs.m4 b/m4/internal/ac-config-macro-dirs.m4
new file mode 100644 (file)
index 0000000..cc05bbe
--- /dev/null
@@ -0,0 +1,15 @@
+# Support AC_CONFIG_MACRO_DIRS with older autoconf.     -*- Autoconf -*-
+# FIXME: To be removed in Automake 2.0, once we can assume autoconf
+#        2.70 or later.
+# FIXME: keep in sync with the contents of the variable
+#        '$ac_config_macro_dirs_fallback' in aclocal.in.
+
+# Copyright (C) 2012-2017 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+m4_ifndef([AC_CONFIG_MACRO_DIRS],
+[m4_defun([_AM_CONFIG_MACRO_DIRS],[])]dnl
+[m4_defun([AC_CONFIG_MACRO_DIRS],[_AM_CONFIG_MACRO_DIRS($@)])])
index 8a86805..a829321 100644 (file)
@@ -1,12 +1,10 @@
 ##                                                          -*- Autoconf -*-
-# Copyright (C) 2003-2012 Free Software Foundation, Inc.
+# Copyright (C) 2003-2017 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 
-# serial 2
-
 # Check whether the underlying file-system supports filenames
 # with a leading dot.  For instance MS-DOS doesn't.
 AC_DEFUN([AM_SET_LEADING_DOT],
index 4cda8a9..d729c31 100644 (file)
--- a/m4/lex.m4
+++ b/m4/lex.m4
@@ -1,13 +1,11 @@
 ## Replacement for AC_PROG_LEX.                            -*-  Autoconf -*-
 ## by Alexandre Oliva <oliva@dcc.unicamp.br>
-# Copyright (C) 1998-2012 Free Software Foundation, Inc.
+# Copyright (C) 1998-2017 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 
-# serial 6
-
 # AM_PROG_LEX
 # -----------
 # Autoconf leaves LEX=: if lex or flex can't be found.  Change that to a
index 2dd6a0f..846ef3f 100644 (file)
@@ -3,14 +3,12 @@
 ## From Ulrich Drepper
 ## Almost entirely rewritten by Alexandre Oliva
 ## ------------------------
-# Copyright (C) 1996-2012 Free Software Foundation, Inc.
+# Copyright (C) 1996-2017 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 
-# serial 11
-
 # AM_PATH_LISPDIR
 # ---------------
 AC_DEFUN([AM_PATH_LISPDIR],
@@ -36,7 +34,7 @@ AC_DEFUN([AM_PATH_LISPDIR],
   #  which is non-obvious for non-emacs users.
   # Redirecting /dev/null should help a bit; pity we can't detect "broken"
   #  emacsen earlier and avoid running this altogether.
-  AC_RUN_LOG([$EMACS -batch -q -eval '(while load-path (princ (concat (car load-path) "\n")) (setq load-path (cdr load-path)))' </dev/null >conftest.out])
+  AC_RUN_LOG([$EMACS -batch -Q -eval '(while load-path (princ (concat (car load-path) "\n")) (setq load-path (cdr load-path)))' </dev/null >conftest.out])
        am_cv_lispdir=`sed -n \
        -e 's,/$,,' \
        -e '/.*\/lib\/x*emacs\/site-lisp$/{s,.*/lib/\(x*emacs/site-lisp\)$,${libdir}/\1,;p;q;}' \
@@ -51,5 +49,3 @@ AC_DEFUN([AM_PATH_LISPDIR],
 ])
 AC_SUBST([lispdir])
 ])# AM_PATH_LISPDIR
-
-AU_DEFUN([ud_PATH_LISPDIR], [AM_PATH_LISPDIR])
index a8f39a3..33cb24e 100644 (file)
@@ -1,14 +1,12 @@
 # Add --enable-maintainer-mode option to configure.         -*- Autoconf -*-
 # From Jim Meyering
 
-# Copyright (C) 1996-2012 Free Software Foundation, Inc.
+# Copyright (C) 1996-2017 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 
-# serial 7
-
 # AM_MAINTAINER_MODE([DEFAULT-MODE])
 # ----------------------------------
 # Control maintainer-specific portions of Makefiles.
@@ -35,5 +33,3 @@ AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
   AC_SUBST([MAINT])dnl
 ]
 )
-
-AU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE])
index c4ba1a6..b3ddca9 100644 (file)
@@ -1,13 +1,11 @@
 # Check to see how 'make' treats includes.                 -*- Autoconf -*-
 
-# Copyright (C) 2001-2012 Free Software Foundation, Inc.
+# Copyright (C) 2001-2017 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 
-# serial 5
-
 # AM_MAKE_INCLUDE()
 # -----------------
 # Check to see how make treats includes.
diff --git a/m4/minuso.m4 b/m4/minuso.m4
deleted file mode 100644 (file)
index 7787ddf..0000000
+++ /dev/null
@@ -1,34 +0,0 @@
-##                                                          -*- Autoconf -*-
-# Copyright (C) 1999-2012 Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# serial 6
-
-# AM_PROG_CC_C_O
-# --------------
-# Like AC_PROG_CC_C_O, but changed for automake.
-AC_DEFUN([AM_PROG_CC_C_O],
-[AC_REQUIRE([AC_PROG_CC_C_O])dnl
-AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
-AC_REQUIRE_AUX_FILE([compile])dnl
-# FIXME: we rely on the cache variable name because
-# there is no other way.
-set dummy $CC
-am_cc=`echo $[2] | sed ['s/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/']`
-eval am_t=\$ac_cv_prog_cc_${am_cc}_c_o
-if test "$am_t" != yes; then
-   # Losing compiler, so override with the script.
-   # FIXME: It is wrong to rewrite CC.
-   # But if we don't then we get into trouble of one sort or another.
-   # A longer-term fix would be to have automake use am__CC in this case,
-   # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
-   CC="$am_aux_dir/compile $CC"
-fi
-dnl Make sure AC_PROG_CC is never called again, or it will override our
-dnl setting of CC.
-m4_define([AC_PROG_CC],
-          [m4_fatal([AC_PROG_CC cannot be called after AM_PROG_CC_C_O])])
-])
index e124803..20be2a5 100644 (file)
@@ -1,13 +1,11 @@
 # Fake the existence of programs that GNU maintainers use.  -*- Autoconf -*-
 
-# Copyright (C) 1997-2012 Free Software Foundation, Inc.
+# Copyright (C) 1997-2017 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 
-# serial 7
-
 # AM_MISSING_PROG(NAME, PROGRAM)
 # ------------------------------
 AC_DEFUN([AM_MISSING_PROG],
@@ -15,11 +13,10 @@ AC_DEFUN([AM_MISSING_PROG],
 $1=${$1-"${am_missing_run}$2"}
 AC_SUBST($1)])
 
-
 # AM_MISSING_HAS_RUN
 # ------------------
-# Define MISSING if not defined so far and test if it supports --run.
-# If it does, set am_missing_run to use it, otherwise, to nothing.
+# Define MISSING if not defined so far and test if it is modern enough.
+# If it is, set am_missing_run to use it, otherwise, to nothing.
 AC_DEFUN([AM_MISSING_HAS_RUN],
 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
 AC_REQUIRE_AUX_FILE([missing])dnl
@@ -32,8 +29,8 @@ if test x"${MISSING+set}" != xset; then
   esac
 fi
 # Use eval to expand $SHELL
-if eval "$MISSING --run true"; then
-  am_missing_run="$MISSING --run "
+if eval "$MISSING --is-lightweight"; then
+  am_missing_run="$MISSING "
 else
   am_missing_run=
   AC_MSG_WARN(['missing' script is too old or missing])
index d362b0b..511f526 100644 (file)
@@ -1,19 +1,18 @@
 ##                                                          -*- Autoconf -*-
-# Copyright (C) 2003-2012 Free Software Foundation, Inc.
+# Copyright (C) 2003-2017 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 
-# serial 3
-
 # AM_PROG_MKDIR_P
 # ---------------
 # Check for 'mkdir -p'.
 AC_DEFUN([AM_PROG_MKDIR_P],
 [AC_PREREQ([2.60])dnl
 AC_REQUIRE([AC_PROG_MKDIR_P])dnl
-dnl FIXME to be removed in Automake 1.13.
+dnl FIXME we are no longer going to remove this! adjust warning
+dnl FIXME message accordingly.
 AC_DIAGNOSE([obsolete],
 [$0: this macro is deprecated, and will soon be removed.
 You should use the Autoconf-provided 'AC][_PROG_MKDIR_P' macro instead,
diff --git a/m4/obsol-gt.m4 b/m4/obsol-gt.m4
deleted file mode 100644 (file)
index bd2400d..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-# Support for obsolete Gettext macro.                       -*- Autoconf -*-
-
-# Copyright (C) 2002-2012 Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# serial 2
-
-# See comment in obsolete.m4.
-AU_DEFUN([ud_GNU_GETTEXT], [AM_GNU_GETTEXT])
diff --git a/m4/obsol-lt.m4 b/m4/obsol-lt.m4
deleted file mode 100644 (file)
index af8fb1b..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-# Support for obsolete Libtool macro.                       -*- Autoconf -*-
-
-# Copyright (C) 2002-2012 Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# serial 2
-
-# See comment in obsolete.m4.
-AU_DEFUN([gm_PROG_LIBTOOL], [AM_PROG_LIBTOOL])
index 9a26cac..46e067d 100644 (file)
@@ -1,37 +1,28 @@
-##                                                          -*- Autoconf -*-
-# Copyright (C) 2002-2012 Free Software Foundation, Inc.
+#  -*- Autoconf -*-
+# Obsolete and "removed" macros, that must however still report explicit
+# error messages when used, to smooth transition.
+#
+# Copyright (C) 1996-2017 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 
-# serial 2
-
-# Obsolete Automake macros.
-
-# We put here only the macros whose substitution is not an Automake
-# macro; otherwise including this file would trigger dependencies for
-# all the substitutions.  Generally, obsolete Automake macros are
-# better AU_DEFUNed in the same file as their replacement, or alone in
-# a separate file (see obsol-gt.m4 or obsol-lt.m4 for instance).
+AC_DEFUN([AM_CONFIG_HEADER],
+[AC_DIAGNOSE([obsolete],
+['$0': this macro is obsolete.
+You should use the 'AC][_CONFIG_HEADERS' macro instead.])dnl
+AC_CONFIG_HEADERS($@)])
 
-AU_DEFUN([AC_FEATURE_CTYPE],     [AC_HEADER_STDC])
-AU_DEFUN([AC_FEATURE_ERRNO],     [AC_REPLACE_FUNCS([strerror])])
-AU_DEFUN([AM_CYGWIN32],                 [AC_CYGWIN])
-AU_DEFUN([AM_EXEEXT],            [AC_EXEEXT])
-AU_DEFUN([AM_FUNC_MKTIME],       [AC_FUNC_MKTIME])
-AU_DEFUN([AM_HEADER_TIOCGWINSZ_NEEDS_SYS_IOCTL],
-                                [AC_HEADER_TIOCGWINSZ])
-AU_DEFUN([AM_MINGW32],           [AC_MINGW32])
-AU_DEFUN([AM_PROG_INSTALL],      [AC_PROG_INSTALL])
-AU_DEFUN([AM_SANITY_CHECK_CC],   [AC_PROG_CC])
-AU_DEFUN([AM_SYS_POSIX_TERMIOS], [AC_SYS_POSIX_TERMIOS])
-AU_DEFUN([fp_FUNC_FNMATCH],      [AC_FUNC_FNMATCH])
-AU_DEFUN([fp_PROG_INSTALL],      [AC_PROG_INSTALL])
-AU_DEFUN([md_TYPE_PTRDIFF_T],    [AC_CHECK_TYPES([ptrdiff_t])])
+AC_DEFUN([AM_PROG_CC_STDC],
+[AC_PROG_CC
+am_cv_prog_cc_stdc=$ac_cv_prog_cc_stdc
+AC_DIAGNOSE([obsolete],
+['$0': this macro is obsolete.
+You should simply use the 'AC][_PROG_CC' macro instead.
+Also, your code should no longer depend upon 'am_cv_prog_cc_stdc',
+but upon 'ac_cv_prog_cc_stdc'.])])
 
-# Don't know how to translate these.
-# If used, Autoconf will complain that they are possibly unexpended;
-# this seems a good enough error message.
-# AC_FEATURE_EXIT
-# AC_SYSTEM_HEADER
+AC_DEFUN([AM_C_PROTOTYPES],
+         [AC_FATAL([automatic de-ANSI-fication support has been removed])])
+AU_DEFUN([fp_C_PROTOTYPES], [AM_C_PROTOTYPES])
index 76ad642..45cfa54 100644 (file)
@@ -1,13 +1,11 @@
 # Helper functions for option handling.                     -*- Autoconf -*-
 
-# Copyright (C) 2001-2012 Free Software Foundation, Inc.
+# Copyright (C) 2001-2017 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 
-# serial 6
-
 # _AM_MANGLE_OPTION(NAME)
 # -----------------------
 AC_DEFUN([_AM_MANGLE_OPTION],
diff --git a/m4/prog-cc-c-o.m4 b/m4/prog-cc-c-o.m4
new file mode 100644 (file)
index 0000000..c366078
--- /dev/null
@@ -0,0 +1,47 @@
+##                                                          -*- Autoconf -*-
+# Copyright (C) 1999-2017 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# _AM_PROG_CC_C_O
+# ---------------
+# Like AC_PROG_CC_C_O, but changed for automake.  We rewrite AC_PROG_CC
+# to automatically call this.
+AC_DEFUN([_AM_PROG_CC_C_O],
+[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
+AC_REQUIRE_AUX_FILE([compile])dnl
+AC_LANG_PUSH([C])dnl
+AC_CACHE_CHECK(
+  [whether $CC understands -c and -o together],
+  [am_cv_prog_cc_c_o],
+  [AC_LANG_CONFTEST([AC_LANG_PROGRAM([])])
+  # Make sure it works both with $CC and with simple cc.
+  # Following AC_PROG_CC_C_O, we do the test twice because some
+  # compilers refuse to overwrite an existing .o file with -o,
+  # though they will create one.
+  am_cv_prog_cc_c_o=yes
+  for am_i in 1 2; do
+    if AM_RUN_LOG([$CC -c conftest.$ac_ext -o conftest2.$ac_objext]) \
+         && test -f conftest2.$ac_objext; then
+      : OK
+    else
+      am_cv_prog_cc_c_o=no
+      break
+    fi
+  done
+  rm -f core conftest*
+  unset am_i])
+if test "$am_cv_prog_cc_c_o" != yes; then
+   # Losing compiler, so override with the script.
+   # FIXME: It is wrong to rewrite CC.
+   # But if we don't then we get into trouble of one sort or another.
+   # A longer-term fix would be to have automake use am__CC in this case,
+   # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
+   CC="$am_aux_dir/compile $CC"
+fi
+AC_LANG_POP([C])])
+
+# For backward compatibility.
+AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])])
diff --git a/m4/protos.m4 b/m4/protos.m4
deleted file mode 100644 (file)
index 942154b..0000000
+++ /dev/null
@@ -1,15 +0,0 @@
-#  -*- Autoconf -*-
-# Obsolete (and now removed) automatic de-ANSI-fiction support.
-#
-# Copyright (C) 1996-2012 Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# serial 6
-
-AC_DEFUN([AM_C_PROTOTYPES],
-         [AC_FATAL([automatic de-ANSI-fication support has been removed])])
-
-AU_DEFUN([fp_C_PROTOTYPES], [AM_C_PROTOTYPES])
index 3548886..6d9e934 100644 (file)
@@ -3,13 +3,12 @@
 ## From Andrew Dalke
 ## Updated by James Henstridge
 ## ------------------------
-# Copyright (C) 1999-2012 Free Software Foundation, Inc.
+# Copyright (C) 1999-2017 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 
-# serial 9
 
 # AM_PATH_PYTHON([MINIMUM-VERSION], [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
 # ---------------------------------------------------------------------------
@@ -37,8 +36,9 @@ AC_DEFUN([AM_PATH_PYTHON],
  [
   dnl Find a Python interpreter.  Python versions prior to 2.0 are not
   dnl supported. (2.0 was released on October 16, 2000).
+  dnl FIXME: Remove the need to hard-code Python versions here.
   m4_define_default([_AM_PYTHON_INTERPRETER_LIST],
-[python python2 python3 python3.2 python3.1 python3.0 python2.7 dnl
+[python python2 python3 python3.5 python3.4 python3.3 python3.2 python3.1 python3.0 python2.7 dnl
  python2.6 python2.5 python2.4 python2.3 python2.2 python2.1 python2.0])
 
   AC_ARG_VAR([PYTHON], [the Python interpreter])
@@ -107,6 +107,25 @@ AC_DEFUN([AM_PATH_PYTHON],
     [am_cv_python_platform=`$PYTHON -c "import sys; sys.stdout.write(sys.platform)"`])
   AC_SUBST([PYTHON_PLATFORM], [$am_cv_python_platform])
 
+  # Just factor out some code duplication.
+  am_python_setup_sysconfig="\
+import sys
+# Prefer sysconfig over distutils.sysconfig, for better compatibility
+# with python 3.x.  See automake bug#10227.
+try:
+    import sysconfig
+except ImportError:
+    can_use_sysconfig = 0
+else:
+    can_use_sysconfig = 1
+# Can't use sysconfig in CPython 2.7, since it's broken in virtualenvs:
+# <https://github.com/pypa/virtualenv/issues/118>
+try:
+    from platform import python_implementation
+    if python_implementation() == 'CPython' and sys.version[[:3]] == '2.7':
+        can_use_sysconfig = 0
+except ImportError:
+    pass"
 
   dnl Set up 4 directories:
 
@@ -123,7 +142,14 @@ AC_DEFUN([AM_PATH_PYTHON],
      else
        am_py_prefix=$prefix
      fi
-     am_cv_python_pythondir=`$PYTHON -c "import sys; from distutils import sysconfig; sys.stdout.write(sysconfig.get_python_lib(0,0,prefix='$am_py_prefix'))" 2>/dev/null`
+     am_cv_python_pythondir=`$PYTHON -c "
+$am_python_setup_sysconfig
+if can_use_sysconfig:
+    sitedir = sysconfig.get_path('purelib', vars={'base':'$am_py_prefix'})
+else:
+    from distutils import sysconfig
+    sitedir = sysconfig.get_python_lib(0, 0, prefix='$am_py_prefix')
+sys.stdout.write(sitedir)"`
      case $am_cv_python_pythondir in
      $am_py_prefix*)
        am__strip_prefix=`echo "$am_py_prefix" | sed 's|.|.|g'`
@@ -158,7 +184,14 @@ AC_DEFUN([AM_PATH_PYTHON],
      else
        am_py_exec_prefix=$exec_prefix
      fi
-     am_cv_python_pyexecdir=`$PYTHON -c "import sys; from distutils import sysconfig; sys.stdout.write(sysconfig.get_python_lib(1,0,prefix='$am_py_exec_prefix'))" 2>/dev/null`
+     am_cv_python_pyexecdir=`$PYTHON -c "
+$am_python_setup_sysconfig
+if can_use_sysconfig:
+    sitedir = sysconfig.get_path('platlib', vars={'platbase':'$am_py_prefix'})
+else:
+    from distutils import sysconfig
+    sitedir = sysconfig.get_python_lib(1, 0, prefix='$am_py_prefix')
+sys.stdout.write(sitedir)"`
      case $am_cv_python_pyexecdir in
      $am_py_exec_prefix*)
        am__strip_prefix=`echo "$am_py_exec_prefix" | sed 's|.|.|g'`
index 6d127a8..a56b027 100644 (file)
@@ -1,12 +1,10 @@
 ##                                                          -*- Autoconf -*-
-# Copyright (C) 2001-2012 Free Software Foundation, Inc.
+# Copyright (C) 2001-2017 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 
-# serial 1
-
 # AM_RUN_LOG(COMMAND)
 # -------------------
 # Run COMMAND, save the exit status in ac_status, and log it.
index c90bc98..2dbdd21 100644 (file)
@@ -1,13 +1,11 @@
 # Check to make sure that the build environment is sane.    -*- Autoconf -*-
 
-# Copyright (C) 1996-2012 Free Software Foundation, Inc.
+# Copyright (C) 1996-2017 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 
-# serial 9
-
 # AM_SANITY_CHECK
 # ---------------
 AC_DEFUN([AM_SANITY_CHECK],
index d499ecb..6549ae3 100644 (file)
@@ -1,12 +1,10 @@
 ##                                                          -*- Autoconf -*-
-# Copyright (C) 2009-2012 Free Software Foundation, Inc.
+# Copyright (C) 2009-2017 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 
-# serial 3
-
 # AM_SILENT_RULES([DEFAULT])
 # --------------------------
 # Enable less verbose build rules; with the default set to DEFAULT
index 42833ca..23b8220 100644 (file)
@@ -1,12 +1,10 @@
 ##                                                          -*- Autoconf -*-
-# Copyright (C) 2001-2012 Free Software Foundation, Inc.
+# Copyright (C) 2001-2017 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 
-# serial 2
-
 # AM_PROG_INSTALL_STRIP
 # ---------------------
 # One issue with vendor 'install' (even GNU) is that you can't
index 64d91ff..f781aa0 100644 (file)
@@ -1,12 +1,10 @@
 ##                                                          -*- Autoconf -*-
-# Copyright (C) 2006-2012 Free Software Foundation, Inc.
+# Copyright (C) 2006-2017 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 
-# serial 3
-
 # _AM_SUBST_NOTMAKE(VARIABLE)
 # ---------------------------
 # Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
index 244c729..ba4704f 100644 (file)
--- a/m4/tar.m4
+++ b/m4/tar.m4
@@ -1,13 +1,11 @@
 # Check how to create a tarball.                            -*- Autoconf -*-
 
-# Copyright (C) 2004-2012 Free Software Foundation, Inc.
+# Copyright (C) 2004-2017 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 
-# serial 3
-
 # _AM_PROG_TAR(FORMAT)
 # --------------------
 # Check how to create a tarball in format FORMAT.
 # Substitute a variable $(am__untar) that extract such
 # a tarball read from stdin.
 #     $(am__untar) < result.tar
+#
 AC_DEFUN([_AM_PROG_TAR],
 [# Always define AMTAR for backward compatibility.  Yes, it's still used
 # in the wild :-(  We should find a proper way to deprecate it ...
 AC_SUBST([AMTAR], ['$${TAR-tar}'])
-m4_if([$1], [v7],
-     [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'],
-     [m4_case([$1], [ustar],, [pax],,
-              [m4_fatal([Unknown tar format])])
-AC_MSG_CHECKING([how to create a $1 tar archive])
-# Loop over all known methods to create a tar archive until one works.
+
+# We'll loop over all known methods to create a tar archive until one works.
 _am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
-_am_tools=${am_cv_prog_tar_$1-$_am_tools}
-# Do not fold the above two line into one, because Tru64 sh and
-# Solaris sh will not grok spaces in the rhs of '-'.
-for _am_tool in $_am_tools
-do
-  case $_am_tool in
-  gnutar)
-    for _am_tar in tar gnutar gtar;
-    do
-      AM_RUN_LOG([$_am_tar --version]) && break
-    done
-    am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
-    am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
-    am__untar="$_am_tar -xf -"
-    ;;
-  plaintar)
-    # Must skip GNU tar: if it does not support --format= it doesn't create
-    # ustar tarball either.
-    (tar --version) >/dev/null 2>&1 && continue
-    am__tar='tar chf - "$$tardir"'
-    am__tar_='tar chf - "$tardir"'
-    am__untar='tar xf -'
-    ;;
-  pax)
-    am__tar='pax -L -x $1 -w "$$tardir"'
-    am__tar_='pax -L -x $1 -w "$tardir"'
-    am__untar='pax -r'
-    ;;
-  cpio)
-    am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
-    am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
-    am__untar='cpio -i -H $1 -d'
-    ;;
-  none)
-    am__tar=false
-    am__tar_=false
-    am__untar=false
-    ;;
-  esac
 
-  # If the value was cached, stop now.  We just wanted to have am__tar
-  # and am__untar set.
-  test -n "${am_cv_prog_tar_$1}" && break
+m4_if([$1], [v7],
+  [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'],
 
-  # tar/untar a dummy directory, and stop if the command works
-  rm -rf conftest.dir
-  mkdir conftest.dir
-  echo GrepMe > conftest.dir/file
-  AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
+  [m4_case([$1],
+    [ustar],
+     [# The POSIX 1988 'ustar' format is defined with fixed-size fields.
+      # There is notably a 21 bits limit for the UID and the GID.  In fact,
+      # the 'pax' utility can hang on bigger UID/GID (see automake bug#8343
+      # and bug#13588).
+      am_max_uid=2097151 # 2^21 - 1
+      am_max_gid=$am_max_uid
+      # The $UID and $GID variables are not portable, so we need to resort
+      # to the POSIX-mandated id(1) utility.  Errors in the 'id' calls
+      # below are definitely unexpected, so allow the users to see them
+      # (that is, avoid stderr redirection).
+      am_uid=`id -u || echo unknown`
+      am_gid=`id -g || echo unknown`
+      AC_MSG_CHECKING([whether UID '$am_uid' is supported by ustar format])
+      if test $am_uid -le $am_max_uid; then
+         AC_MSG_RESULT([yes])
+      else
+         AC_MSG_RESULT([no])
+         _am_tools=none
+      fi
+      AC_MSG_CHECKING([whether GID '$am_gid' is supported by ustar format])
+      if test $am_gid -le $am_max_gid; then
+         AC_MSG_RESULT([yes])
+      else
+        AC_MSG_RESULT([no])
+        _am_tools=none
+      fi],
+
+  [pax],
+    [],
+
+  [m4_fatal([Unknown tar format])])
+
+  AC_MSG_CHECKING([how to create a $1 tar archive])
+
+  # Go ahead even if we have the value already cached.  We do so because we
+  # need to set the values for the 'am__tar' and 'am__untar' variables.
+  _am_tools=${am_cv_prog_tar_$1-$_am_tools}
+
+  for _am_tool in $_am_tools; do
+    case $_am_tool in
+    gnutar)
+      for _am_tar in tar gnutar gtar; do
+        AM_RUN_LOG([$_am_tar --version]) && break
+      done
+      am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
+      am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
+      am__untar="$_am_tar -xf -"
+      ;;
+    plaintar)
+      # Must skip GNU tar: if it does not support --format= it doesn't create
+      # ustar tarball either.
+      (tar --version) >/dev/null 2>&1 && continue
+      am__tar='tar chf - "$$tardir"'
+      am__tar_='tar chf - "$tardir"'
+      am__untar='tar xf -'
+      ;;
+    pax)
+      am__tar='pax -L -x $1 -w "$$tardir"'
+      am__tar_='pax -L -x $1 -w "$tardir"'
+      am__untar='pax -r'
+      ;;
+    cpio)
+      am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
+      am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
+      am__untar='cpio -i -H $1 -d'
+      ;;
+    none)
+      am__tar=false
+      am__tar_=false
+      am__untar=false
+      ;;
+    esac
+
+    # If the value was cached, stop now.  We just wanted to have am__tar
+    # and am__untar set.
+    test -n "${am_cv_prog_tar_$1}" && break
+
+    # tar/untar a dummy directory, and stop if the command works.
+    rm -rf conftest.dir
+    mkdir conftest.dir
+    echo GrepMe > conftest.dir/file
+    AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
+    rm -rf conftest.dir
+    if test -s conftest.tar; then
+      AM_RUN_LOG([$am__untar <conftest.tar])
+      AM_RUN_LOG([cat conftest.dir/file])
+      grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
+    fi
+  done
   rm -rf conftest.dir
-  if test -s conftest.tar; then
-    AM_RUN_LOG([$am__untar <conftest.tar])
-    grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
-  fi
-done
-rm -rf conftest.dir
 
-AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
-AC_MSG_RESULT([$am_cv_prog_tar_$1])])
+  AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
+  AC_MSG_RESULT([$am_cv_prog_tar_$1])])
+
 AC_SUBST([am__tar])
 AC_SUBST([am__untar])
 ]) # _AM_PROG_TAR
index 9ba1025..60e05ff 100644 (file)
--- a/m4/upc.m4
+++ b/m4/upc.m4
@@ -1,13 +1,11 @@
 # Find a compiler for Unified Parallel C.                  -*- Autoconf -*-
 
-# Copyright (C) 2006-2012 Free Software Foundation, Inc.
+# Copyright (C) 2006-2017 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 
-# serial 1
-
 AC_DEFUN([AM_PROG_UPC],
 [dnl We need OBJEXT and EXEEXT, but Autoconf doesn't offer any public
 dnl macro to compute them.  Use AC_PROG_CC instead.
index cc6ba53..8b742d1 100644 (file)
@@ -1,29 +1,37 @@
 # Autoconf support for the Vala compiler
 
-# Copyright (C) 2008-2012 Free Software Foundation, Inc.
+# Copyright (C) 2008-2017 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 
-# serial 6
-
-# Check whether the Vala compiler exists in $PATH. If it is found, the
-# variable VALAC is set. Optionally a minimum release number of the
-# compiler can be requested.
+# Check whether the Vala compiler exists in $PATH.  If it is found, the
+# variable VALAC is set pointing to its absolute path.  Otherwise, it is
+# simply set to 'valac'.
+# Optionally a minimum release number of the compiler can be requested.
+# If the ACTION-IF-FOUND parameter is given, it will be run if a proper
+# Vala compiler is found.
+# Similarly, if the ACTION-IF-FOUND is given, it will be run if no proper
+# Vala compiler is found.  It defaults to simply print a warning about the
+# situation, but otherwise proceeding with the configuration.
 #
-# AM_PROG_VALAC([MINIMUM-VERSION])
-# --------------------------------
+# AM_PROG_VALAC([MINIMUM-VERSION], [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
+# --------------------------------------------------------------------------
 AC_DEFUN([AM_PROG_VALAC],
-[AC_PATH_PROG([VALAC], [valac], [])
- AS_IF([test -z "$VALAC"],
-   [AC_MSG_WARN([No Vala compiler found.  You will not be able to compile .vala source files.])],
-   [AS_IF([test -n "$1"],
-      [AC_MSG_CHECKING([$VALAC is at least version $1])
+  [AC_PATH_PROG([VALAC], [valac], [valac])
+   AS_IF([test "$VALAC" != valac && test -n "$1"],
+      [AC_MSG_CHECKING([whether $VALAC is at least version $1])
        am__vala_version=`$VALAC --version | sed 's/Vala  *//'`
        AS_VERSION_COMPARE([$1], ["$am__vala_version"],
          [AC_MSG_RESULT([yes])],
          [AC_MSG_RESULT([yes])],
          [AC_MSG_RESULT([no])
-          AC_MSG_ERROR([Vala $1 not found.], [77])])])])
-])
+          VALAC=valac])])
+    if test "$VALAC" = valac; then
+      m4_default([$3],
+        [AC_MSG_WARN([no proper vala compiler found])
+         AC_MSG_WARN([you will not be able to compile vala source files])])
+    else
+      m4_default([$2], [:])
+    fi])
diff --git a/maintainer/am-ft b/maintainer/am-ft
new file mode 100755 (executable)
index 0000000..6bb7d97
--- /dev/null
@@ -0,0 +1,131 @@
+#!/usr/bin/env bash
+# Remote testing of Automake tarballs made easy.
+# This script requires Bash 4.x or later.
+
+# Copyright (C) 2013-2017 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/>.
+
+# TODO: some documentation would be nice ...
+
+set -u
+me=${0##*/}
+
+fatal () { echo "$me: $*" >&2; exit 1; }
+
+cmd='
+  test_script=$HOME/.am-test/run
+  if test -f "$test_script" && test -x "$test_script"; then
+    "$test_script" "$@"
+  else
+    nice -n19 ./configure && nice -n19 make -j10 check
+  fi
+'
+
+remote=
+interactive=1
+maybe_sleep=:
+while test $# -gt 0; do
+  case $1 in
+   -b|--batch) interactive=0;;
+   -c|--command) cmd=${2-}; shift;;
+    # Useful to avoid spurious errors due to skewed clocks between
+    # the system where the tarball is built and the target system.
+   -S|--sleep) maybe_sleep="sleep ${2-}"; shift;;
+   -*) fatal "'$1': invalid option";;
+    *) remote=$1; shift; break;;
+  esac
+  shift
+done
+[[ -n $remote ]] || fatal "no remote given"
+
+if ((interactive)); then
+  do_on_error='{
+    AM_TESTSUITE_FAILED=yes
+    export AM_TESTSUITE_FAILED
+    # We should not modify the environment with which the failed
+    # tests have run, hence do not read ".profile", ".bashrc", and
+    # company.
+    exec bash --noprofile --norc -i
+  }'
+else
+  do_on_error='exit $?'
+fi
+
+tarball=$(echo automake*.tar.xz)
+
+case $tarball in
+  *' '*) fatal "too many automake tarballs: $tarball";;
+esac
+
+test -f $tarball || fatal "no automake tarball found"
+
+distdir=${tarball%%.tar.xz}
+
+env='PATH=$HOME/bin:$PATH'
+if test -t 1; then
+  env+=" TERM='$TERM' AM_COLOR_TESTS=always"
+fi
+
+# This is tempting:
+#   $ ssh "command" arg-1 ... arg-2
+# but doesn't work as expected.  So we need the following hack
+# to propagate the command line arguments to the remote shell.
+quoted_args=--
+while (($# > 0)); do
+  case $1 in
+    *\'*) quoted_args+=" "$(printf '%s\n' "$1" | sed "s/'/'\\''/g");;
+       *) quoted_args+=" '$1'";;
+  esac
+  shift
+done
+
+set -e
+set -x
+
+scp $tarball $remote:tmp/
+
+$maybe_sleep
+
+# Multiple '-t' to force tty allocation.
+ssh -t -t $remote "
+  set -x; set -e; set -u;
+  set $quoted_args
+  cd tmp
+  if test -e $distdir; then
+    # Use 'perl', not only 'rm -rf', to correctly handle read-only
+    # files or directory.  Fall back to 'rm' if something goes awry.
+    perl -e 'use File::Path qw/rmtree/; rmtree(\"$distdir\")' \
+      || rm -rf $distdir || exit 1
+    test ! -e $distdir
+  fi
+  export $env
+  "'
+  am_extra_acdir=$HOME/.am-test/extra-aclocal
+  am_extra_bindir=$HOME/.am-test/extra-bin
+  am_extra_setup=$HOME/.am-test/extra-setup.sh
+  if test -d "$am_extra_acdir"; then
+    export ACLOCAL_PATH=$am_extra_acdir${ACLOCAL_PATH+":$ACLOCAL_PATH"}
+  fi
+  if test -d "$am_extra_bindir"; then
+    export PATH=$am_extra_bindir:$PATH
+  fi
+  '"
+  xz -dc $tarball | tar xf -
+  cd $distdir
+  if test -f \"\$am_extra_setup\"; then
+    . \"\$am_extra_setup\"
+  fi
+  ($cmd) || $do_on_error
+"
similarity index 70%
rename from t/extra3.sh
rename to maintainer/am-xft
index 4065801..98263ba 100755 (executable)
@@ -1,28 +1,18 @@
-#! /bin/sh
-# Copyright (C) 1998-2012 Free Software Foundation, Inc.
-#
+#!/bin/sh
+# Copyright (C) 2013-2017 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 to make sure EXTRA_DATA not required.
-
-. ./defs || Exit 1
-
-echo 'AC_SUBST(CODICIL)' >> configure.ac
-
-cat > Makefile.am << 'END'
-sysconf_DATA = @CODICIL@
-END
-
-$ACLOCAL
-$AUTOMAKE
+MAKE=${MAKE-make} GIT=${GIT-git}
+$GIT clean -fdx && $MAKE bootstrap && $MAKE dist && exec am-ft "$@"
diff --git a/maintainer/maint.mk b/maintainer/maint.mk
new file mode 100644 (file)
index 0000000..1cfd2e8
--- /dev/null
@@ -0,0 +1,658 @@
+# Maintainer makefile rules for Automake.
+#
+# Copyright (C) 1995-2017 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/>.
+
+# Avoid CDPATH issues.
+unexport CDPATH
+
+# Program to use to fetch files from the Net.
+WGET = wget
+
+# --------------------------------------------------------- #
+#  Automatic generation of the ChangeLog from git history.  #
+# --------------------------------------------------------- #
+
+gitlog_to_changelog_command = $(PERL) $(srcdir)/lib/gitlog-to-changelog
+gitlog_to_changelog_fixes = $(srcdir)/.git-log-fix
+gitlog_to_changelog_options = --amend=$(gitlog_to_changelog_fixes) \
+                              --since='2011-12-28 00:00:00' \
+                              --no-cluster --format '%s%n%n%b'
+
+EXTRA_DIST += lib/gitlog-to-changelog
+EXTRA_DIST += $(gitlog_to_changelog_fixes)
+
+# When executed from a git checkout, generate the ChangeLog from the git
+# history.  When executed from an extracted distribution tarball, just
+# copy the distributed ChangeLog in the build directory (and if this
+# fails, or if no distributed ChangeLog file is present, complain and
+# give an error).
+#
+# The ChangeLog should be regenerated unconditionally when working from
+# checked-out sources; otherwise, if we're working from a distribution
+# tarball, we expect the ChangeLog to be distributed, so check that it
+# is indeed present in the source directory.
+ChangeLog:
+       $(AM_V_GEN)set -e; set -u; \
+       if test -d $(srcdir)/.git; then \
+         rm -f $@-t \
+           && $(gitlog_to_changelog_command) \
+              $(gitlog_to_changelog_options) >$@-t \
+           && chmod a-w $@-t \
+           && mv -f $@-t $@ \
+           || exit 1; \
+       elif test ! -f $(srcdir)/$@; then \
+         echo "Source tree is not a git checkout, and no pre-existent" \
+              "$@ file has been found there" >&2; \
+         exit 1; \
+       fi
+.PHONY: ChangeLog
+
+
+# --------------------------- #
+#  Perl coverage statistics.  #
+# --------------------------- #
+
+PERL_COVERAGE_DB = $(abs_top_builddir)/cover_db
+PERL_COVERAGE_FLAGS = -MDevel::Cover=-db,$(PERL_COVERAGE_DB),-silent,on,-summary,off
+PERL_COVER = cover
+
+check-coverage-run recheck-coverage-run: %-coverage-run: all
+       $(MKDIR_P) $(PERL_COVERAGE_DB)
+       PERL5OPT="$$PERL5OPT $(PERL_COVERAGE_FLAGS)"; export PERL5OPT; \
+       WANT_NO_THREADS=yes; export WANT_NO_THREADS; unset AUTOMAKE_JOBS; \
+       $(MAKE) $*
+
+check-coverage-report:
+       @if test ! -d "$(PERL_COVERAGE_DB)"; then \
+         echo "No coverage database found in '$(PERL_COVERAGE_DB)'." >&2; \
+         echo "Please run \"make check-coverage\" first" >&2; \
+         exit 1; \
+       fi
+       $(PERL_COVER) $(PERL_COVER_FLAGS) "$(PERL_COVERAGE_DB)"
+
+# We don't use direct dependencies here because we'd like to be able
+# to invoke the report even after interrupted check-coverage.
+check-coverage: check-coverage-run
+       $(MAKE) check-coverage-report
+
+recheck-coverage: recheck-coverage-run
+       $(MAKE) check-coverage-report
+
+clean-coverage:
+       rm -rf "$(PERL_COVERAGE_DB)"
+clean-local: clean-coverage
+
+.PHONY: check-coverage recheck-coverage check-coverage-run \
+       recheck-coverage-run check-coverage-report clean-coverage
+
+
+# ---------------------------------------------------- #
+#  Tagging and/or uploading stable and beta releases.  #
+# ---------------------------------------------------- #
+
+GIT = git
+
+EXTRA_DIST += lib/gnupload
+
+# First component of a version number (mandatory).
+rx-0 = ^[1-9][0-9]*
+# Later components of a version number (optional).
+rx-1 = \.[0-9][0-9]*
+# Used in recipes to decide which kind of release we are.
+stable_major_version_rx = $(rx-0)\.0$$
+stable_minor_version_rx = $(rx-0)$(rx-1)$$
+stable_micro_version_rx = $(rx-0)$(rx-1)$(rx-1)$$
+beta_version_rx = $(rx-0)($(rx-1)){1,2}[bdfhjlnprtvxz]$$
+alpha_version_rx  = $(rx-0)($(rx-1)){1,2}[acegikmoqsuwy]$$
+match_version = echo "$(VERSION)" | $(EGREP) >/dev/null
+
+# Check that we don't have uncommitted or unstaged changes.
+# TODO: Maybe the git suite already offers a shortcut to verify if the
+# TODO: working directory is "clean" or not?  If yes, use that instead
+# TODO: of duplicating the logic here.
+git_must_have_clean_workdir = \
+  $(GIT) rev-parse --verify HEAD >/dev/null \
+    && $(GIT) update-index -q --refresh \
+    && $(GIT) diff-files --quiet \
+    && $(GIT) diff-index --quiet --cached HEAD \
+    || { echo "$@: you have uncommitted or unstaged changes" >&2; exit 1; }
+
+determine_release_type = \
+  if $(match_version) '$(stable_major_version_rx)'; then \
+    release_type='Major release'; \
+    announcement_type='major release'; \
+    dest=ftp; \
+  elif $(match_version) '$(stable_minor_version_rx)'; then \
+    release_type='Minor release'; \
+    announcement_type='minor release'; \
+    dest=ftp; \
+  elif $(match_version) '$(stable_micro_version_rx)'; then \
+    release_type='Micro release'; \
+    announcement_type='maintenance release'; \
+    dest=ftp; \
+  elif $(match_version) '$(beta_version_rx)'; then \
+    release_type='Beta release'; \
+    announcement_type='test release'; \
+    dest=alpha; \
+  elif $(match_version) '$(alpha_version_rx)'; then \
+    echo "$@: improper version '$(VERSION)' for a release" >&2; \
+    if test -n '$(strip $(DEVEL_SNAPSHOT))'; then \
+      echo "$@: continuing anyway since DEVEL_SNAPSHOT is set" >&2; \
+      release_type='Development snapshot'; \
+      announcement_type='development snapshot'; \
+      dest=alpha; \
+    else \
+      exit 1; \
+    fi; \
+  else \
+    echo "$@: invalid version number '$(VERSION)'" >&2; \
+    exit 1; \
+  fi
+
+# Help the debugging of $(determine_release_type) and related code.
+print-release-type:
+       @$(determine_release_type); \
+        echo "$$release_type $(VERSION);" \
+             "it will be announced as a \"$$announcement_type\""
+
+git-tag-release: maintainer-check
+       @set -e -u; \
+       case '$(AM_TAG_DRYRUN)' in \
+         ""|[nN]|[nN]o|NO) run="";; \
+         *) run="echo Running:";; \
+       esac; \
+       $(git_must_have_clean_workdir); \
+       $$run $(GIT) tag -s "v$(VERSION)" -m "$(PACKAGE) $(VERSION)"
+
+git-upload-release:
+       @# Check this is a version we can cut a release (either test
+       @# or stable) from.
+       @$(determine_release_type)
+       @# The repository must be clean.
+       @$(git_must_have_clean_workdir)
+       @# Check that we are releasing from a valid tag.
+       @tag=`$(GIT) describe` \
+         && case $$tag in "v$(VERSION)") true;; *) false;; esac \
+         || { echo "$@: you can only create a release from a tagged" \
+                   "version" >&2; \
+              exit 1; }
+       @# Build the distribution tarball(s).
+       $(MAKE) dist
+       @# Upload it to the correct FTP repository.
+       @$(determine_release_type) \
+         && dest=$$dest.gnu.org:automake \
+         && echo "Will upload to $$dest: $(DIST_ARCHIVES)" \
+         && $(srcdir)/lib/gnupload $(GNUPLOADFLAGS) --to $$dest \
+                                   $(DIST_ARCHIVES)
+
+.PHONY: print-release-type git-upload-release git-tag-release
+
+
+# ------------------------------------------------------------------ #
+#  Explore differences of autogenerated files in different commits.  #
+# ------------------------------------------------------------------ #
+
+# Visually comparing differences between the Makefile.in files in
+# automake's own build system as generated in two different branches
+# might help to catch bugs and blunders.  This has already happened a
+# few times in the past, when we used to version-control Makefile.in.
+autodiffs:
+       @set -u; \
+        NEW_COMMIT=$${NEW_COMMIT-"HEAD"}; \
+        OLD_COMMIT=$${OLD_COMMIT-"HEAD~1"}; \
+        am_gitdir='$(abs_top_srcdir)/.git'; \
+        get_autofiles_from_rev () \
+        { \
+            rev=$$1 dir=$$2 \
+              && echo "$@: will get files from revision $$rev" \
+              && $(GIT) clone -q --depth 1 "$$am_gitdir" tmp \
+              && cd tmp \
+              && $(GIT) checkout -q "$$rev" \
+              && echo "$@: bootstrapping $$rev" \
+              && $(SHELL) ./bootstrap \
+              && echo "$@: copying files from $$rev" \
+              && makefile_ins=`find . -name Makefile.in` \
+              && (tar cf - configure aclocal.m4 $$makefile_ins) | \
+                 (cd .. && cd "$$dir" && tar xf -) \
+              && cd .. \
+              && rm -rf tmp; \
+        }; \
+        outdir=$@.dir \
+          && : Before proceeding, ensure the specified revisions truly exist. \
+          && $(GIT) --git-dir="$$am_gitdir" describe $$OLD_COMMIT >/dev/null \
+          && $(GIT) --git-dir="$$am_gitdir" describe $$NEW_COMMIT >/dev/null \
+          && rm -rf $$outdir \
+          && mkdir $$outdir \
+          && cd $$outdir \
+          && mkdir new old \
+          && get_autofiles_from_rev $$OLD_COMMIT old \
+          && get_autofiles_from_rev $$NEW_COMMIT new \
+          && exit 0
+
+# With lots of eye candy; we like our developers pampered and spoiled :-)
+compare-autodiffs: autodiffs
+       @set -u; \
+       : $${COLORDIFF=colordiff} $${DIFF=diff}; \
+       dir=autodiffs.dir; \
+       if test ! -d "$$dir"; then \
+         echo "$@: $$dir: Not a directory" >&2; \
+         exit 1; \
+       fi; \
+       mydiff=false mypager=false; \
+       if test -t 1; then \
+         if ($$COLORDIFF -r . .) </dev/null >/dev/null 2>&1; then \
+           mydiff=$$COLORDIFF; \
+           mypager="less -R"; \
+         else \
+           mypager=less; \
+         fi; \
+       else \
+         mypager=cat; \
+       fi; \
+       if test "$$mydiff" = false; then \
+         if ($$DIFF -r -u . .); then \
+           mydiff=$$DIFF; \
+         else \
+           echo "$@: no good-enough diff program specified" >&2; \
+           exit 1; \
+         fi; \
+       fi; \
+       st=0; $$mydiff -r -u $$dir/old $$dir/new | $$mypager || st=$$?; \
+       rm -rf $$dir; \
+       exit $$st
+.PHONY: autodiffs compare-autodiffs
+
+# ---------------------------------------------- #
+#  Help writing the announcement for a release.  #
+# ---------------------------------------------- #
+
+PACKAGE_MAILINGLIST = automake@gnu.org
+
+announcement: DEVEL_SNAPSHOT = yes
+announcement: NEWS
+       $(AM_V_GEN): \
+         && rm -f $@ $@-t \
+         && $(determine_release_type) \
+         && ftp_base="ftp://$$dest.gnu.org/gnu/$(PACKAGE)" \
+         && X () { printf '%s\n' "$$*" >> $@-t; } \
+         && X "We are pleased to announce the $(PACKAGE_NAME) $(VERSION)" \
+              "$$announcement_type." \
+         && X \
+         && X "**TODO** Brief description of the release here." \
+         && X \
+         && X "**TODO** This description can span multiple paragraphs." \
+         && X \
+         && X "See below for the detailed list of changes since the" \
+         && X "previous version, as summarized by the NEWS file." \
+         && X \
+         && X "Download here:" \
+         && X \
+         && X "  $$ftp_base/$(PACKAGE)-$(VERSION).tar.gz" \
+         && X "  $$ftp_base/$(PACKAGE)-$(VERSION).tar.xz" \
+         && X \
+         && X "Please report bugs and problems to" \
+              "<$(PACKAGE_BUGREPORT)>," \
+         && X "and send general comments and feedback to" \
+              "<$(PACKAGE_MAILINGLIST)>." \
+         && X \
+         && X "Thanks to everyone who has reported problems, contributed" \
+         && X "patches, and helped testing Automake!" \
+         && X \
+         && X "-*-*-*-" \
+         && X \
+         && $(AWK) '\
+               ($$0 ~ /^New in .*:/) { wait_for_end=1; } \
+               (/^~~~/ && wait_for_end) { print; exit(0) } \
+               { print } \
+            ' <$(srcdir)/NEWS >> $@-t \
+         && mv -f $@-t $@
+.PHONY: announcement
+CLEANFILES += announcement
+
+# --------------------------------------------------------------------- #
+#  Synchronize third-party files that are committed in our repository.  #
+# --------------------------------------------------------------------- #
+
+# Git repositories on Savannah.
+git-sv-host = git.savannah.gnu.org
+
+# Some repositories we sync files from.
+SV_GIT_CF = 'https://$(git-sv-host)/gitweb/?p=config.git;a=blob_plain;hb=HEAD;f='
+SV_GIT_GL = 'https://$(git-sv-host)/gitweb/?p=gnulib.git;a=blob_plain;hb=HEAD;f='
+
+# Files that we fetch and which we compare against.
+# Note that the 'lib/COPYING' file must still be synced by hand.
+FETCHFILES = \
+  $(SV_GIT_CF)config.guess \
+  $(SV_GIT_CF)config.sub \
+  $(SV_GIT_GL)build-aux/texinfo.tex \
+  $(SV_GIT_GL)build-aux/gendocs.sh \
+  $(SV_GIT_GL)build-aux/gitlog-to-changelog \
+  $(SV_GIT_GL)build-aux/gnupload \
+  $(SV_GIT_GL)build-aux/update-copyright \
+  $(SV_GIT_GL)doc/gendocs_template \
+  $(SV_GIT_GL)doc/INSTALL
+
+# Fetch the latest versions of few scripts and files we care about.
+# A retrieval failure or a copying failure usually mean serious problems,
+# so we'll just bail out if 'wget' or 'cp' fail.
+fetch:
+       $(AM_V_at)rm -rf Fetchdir
+       $(AM_V_at)mkdir Fetchdir
+       $(AM_V_GEN)set -e; \
+       if $(AM_V_P); then wget_opts=; else wget_opts=-nv; fi; \
+       for url in $(FETCHFILES); do \
+          file=`printf '%s\n' "$$url" | sed 's|^.*/||; s|^.*=||'`; \
+          $(WGET) $$wget_opts "$$url" -O Fetchdir/$$file || exit 1; \
+          if cmp Fetchdir/$$file $(srcdir)/lib/$$file >/dev/null; then \
+            : Nothing to do; \
+          else \
+            echo "$@: updating file $$file"; \
+            cp Fetchdir/$$file $(srcdir)/lib/$$file || exit 1; \
+          fi; \
+       done
+       $(AM_V_at)rm -rf Fetchdir
+.PHONY: fetch
+
+# ---------------------------------------------------------------------- #
+#  Generate and upload manuals in several formats, for the GNU website.  #
+# ---------------------------------------------------------------------- #
+
+web_manual_dir = doc/web-manual
+
+RSYNC = rsync
+CVS = cvs
+CVSU = cvsu
+CVS_USER = $${USER}
+WEBCVS_ROOT = cvs.savannah.gnu.org:/web
+CVS_RSH = ssh
+export CVS_RSH
+
+.PHONY: web-manual web-manual-update
+web-manual web-manual-update: t = $@.dir
+
+# Build manual in several formats.  Note to the recipe:
+# 1. The symlinking of automake.texi into the temporary directory is
+#    required to pacify extra checks from gendocs.sh.
+# 2. The redirection to /dev/null before the invocation of gendocs.sh
+#    is done to better respect silent rules.
+web-manual:
+       $(AM_V_at)rm -rf $(web_manual_dir) $t
+       $(AM_V_at)mkdir $t
+       $(AM_V_at)$(LN_S) '$(abs_srcdir)/doc/$(PACKAGE).texi' '$t/'
+       $(AM_V_GEN)cd $t \
+         && GENDOCS_TEMPLATE_DIR='$(abs_srcdir)/lib' \
+         && export GENDOCS_TEMPLATE_DIR \
+         && if $(AM_V_P); then :; else exec >/dev/null 2>&1; fi \
+         && $(SHELL) '$(abs_srcdir)/lib/gendocs.sh' \
+            -I '$(abs_srcdir)/doc' --email $(PACKAGE_BUGREPORT) \
+            $(PACKAGE) '$(PACKAGE_NAME)'
+       $(AM_V_at)mkdir $(web_manual_dir)
+       $(AM_V_at)mv -f $t/manual/* $(web_manual_dir)
+       $(AM_V_at)rm -rf $t
+       @! $(AM_V_P) || ls -l $(web_manual_dir)
+
+# Upload manual to www.gnu.org, using CVS (sigh!)
+web-manual-update:
+       $(AM_V_at)$(determine_release_type); \
+       case $$release_type in \
+         [Mm]ajor\ release|[Mm]inor\ release|[Mm]icro\ release);; \
+         *) echo "Cannot upload manuals from a \"$$release_type\"" >&2; \
+            exit 1;; \
+       esac
+       $(AM_V_at)test -f $(web_manual_dir)/$(PACKAGE).html || { \
+         echo 'You have to run "$(MAKE) web-manual" before' \
+              'invoking "$(MAKE) $@"' >&2; \
+         exit 1; \
+       }
+       $(AM_V_at)rm -rf $t
+       $(AM_V_at)mkdir $t
+       $(AM_V_at)cd $t \
+         && $(CVS) -z3 -d :ext:$(CVS_USER)@$(WEBCVS_ROOT)/$(PACKAGE) \
+                   co $(PACKAGE)
+       @# According to the rsync manpage, "a trailing slash on the
+       @# source [...] avoids creating an additional directory
+       @# level at the destination".  So the trailing '/' after
+       @# '$(web_manual_dir)' below is intended.
+       $(AM_V_at)$(RSYNC) -avP $(web_manual_dir)/ $t/$(PACKAGE)/manual
+       $(AM_V_GEN): \
+         && cd $t/$(PACKAGE)/manual \
+         && new_files=`$(CVSU) --types='?'` \
+         && new_files=`echo "$$new_files" | sed s/^..//` \
+         && { test -z "$$new_files" || $(CVS) add -ko $$new_files; } \
+         && $(CVS) ci -m $(VERSION)
+       $(AM_V_at)rm -rf $t
+.PHONY: web-manual-update
+
+clean-web-manual:
+       $(AM_V_at)rm -rf $(web_manual_dir)
+.PHONY: clean-web-manual
+clean-local: clean-web-manual
+
+EXTRA_DIST += lib/gendocs.sh lib/gendocs_template
+
+# ------------------------------------------------ #
+#  Update copyright years of all committed files.  #
+# ------------------------------------------------ #
+
+EXTRA_DIST += lib/update-copyright
+
+update_copyright_env = \
+  UPDATE_COPYRIGHT_FORCE=1 \
+  UPDATE_COPYRIGHT_USE_INTERVALS=2
+
+# In addition to the several README files, these as well are
+# not expected to have a copyright notice.
+files_without_copyright = \
+  .autom4te.cfg \
+  .git-log-fix \
+  .gitattributes \
+  .gitignore \
+  INSTALL \
+  COPYING \
+  AUTHORS \
+  THANKS \
+  lib/INSTALL \
+  lib/COPYING
+
+# This script is in the public domain.
+files_without_copyright += lib/mkinstalldirs
+
+# This script has an MIT-style license
+files_without_copyright += lib/install-sh
+
+# The UPDATE_COPYRIGHT_YEAR environment variable is honoured by the
+# 'lib/update-copyright' script.
+.PHONY: update-copyright
+update-copyright:
+       $(AM_V_GEN)set -e; \
+       if test -n "$$UPDATE_COPYRIGHT_YEAR"; then \
+          current_year=$$UPDATE_COPYRIGHT_YEAR; \
+       else \
+         current_year=`date +%Y` && test -n "$$current_year" \
+           || { echo "$@: cannot get current year" >&2; exit 1; }; \
+       fi; \
+       sed -i "/^RELEASE_YEAR=/s/=.*$$/=$$current_year/" \
+         bootstrap configure.ac; \
+       excluded_re=`( \
+         for url in $(FETCHFILES); do echo "$$url"; done \
+           | sed -e 's!^.*/!!' -e 's!^.*=!!' -e 's!^!lib/!' \
+         && for f in $(files_without_copyright); do echo $$f; done \
+       ) | sed -e '$$!s,$$,|,' | tr -d '\012\015'`; \
+       $(GIT) ls-files \
+         | grep -Ev '(^|/)README$$' \
+         | grep -Ev '^PLANS(/|$$)' \
+         | grep -Ev "^($$excluded_re)$$" \
+         | $(update_copyright_env) xargs $(srcdir)/lib/$@
+
+# -------------------------------------------------------------- #
+#  Run the testsuite with the least supported autoconf version.  #
+# -------------------------------------------------------------- #
+
+gnu-ftp = http://ftp.gnu.org/gnu
+
+# Various shorthands: version, name, package name, tarball name,
+# tarball location, installation directory.
+ac-v = $(required_autoconf_version)
+ac-n = autoconf
+ac-p = $(ac-n)-$(ac-v)
+ac-t = $(ac-p).tar.gz
+ac-l = maintainer/$(ac-t)
+ac-d = maintainer/$(ac-p)
+
+fetch-minimal-autoconf: o = $(ac-l)
+fetch-minimal-autoconf:
+       $(AM_V_at)$(MKDIR_P) $(dir $o)
+       $(AM_V_at)rm -f $o $o-t
+       $(AM_V_GEN)$(WGET) -O $o-t $(gnu-ftp)/$(ac-n)/$(ac-t)
+       $(AM_V_at)chmod a-w $o-t && mv -f $o-t $o && ls -l $o
+.PHONY: fetch-minimal-autoconf
+
+build-minimal-autoconf:
+       $(AM_V_GEN):; \
+       test -f $(ac-l) || { \
+         echo "$@: tarball $(ac-l) seems missing." >&2; \
+         echo "$@: have you run '$(MAKE) fetch-minimal-autoconf'?" >&2; \
+         exit 1; \
+       }; \
+         set -x \
+         && $(PERL) $(srcdir)/t/ax/deltree.pl $(ac-d) \
+         && $(MKDIR_P) $(ac-d) \
+         && cd $(ac-d) \
+         && tar xzf '$(CURDIR)/$(ac-l)' \
+         && mv $(ac-p) src \
+         && mkdir build \
+         && cd build \
+         && env CONFIG_SHELL='$(SHELL)' $(SHELL) ../src/configure \
+              --prefix='$(CURDIR)/$(ac-d)' CONFIG_SHELL='$(SHELL)' \
+         && $(MAKE) install
+       $(AM_V_at)echo ' ======' && $(ac-d)/bin/autoconf --version
+.PHONY: build-minimal-autoconf
+
+check-minimal-autoconf:
+       $(AM_V_at)p='$(ac-d)/bin/autoconf'; \
+         if test ! -f "$$p" || test ! -x "$$p"; then \
+           echo "$@: program '$$p' seems missing." >&2; \
+           echo "$@: have you run '$(MAKE) build-minimal-autoconf'?" >&2; \
+           exit 1; \
+         fi
+       $(AM_V_GEN): \
+         && PATH='$(CURDIR)/$(ac-d)/bin$(PATH_SEPARATOR)'$$PATH \
+         && export PATH \
+         && AUTOCONF=autoconf \
+         && AUTOHEADER=autoheader \
+         && AUTORECONF=autoreconf \
+         && AUTOM4TE=autom4te \
+         && AUTOUPDATE=autoupdate \
+         && export AUTOCONF AUTOHEADER AUTORECONF AUTOM4TE AUTOUPDATE \
+         && echo === check autoconf version '(must be = $(ac-v))' \
+         && autoconf --version \
+         && autoconf --version | sed -e 's/^/ /; s/$$/ /' -e 1q \
+              | $(FGREP) '$(ac-v)' >/dev/null \
+         && echo === configure \
+         && $(srcdir)/configure $(shell ./config.status --config) \
+         && echo === build and test \
+         && $(MAKE) check
+.PHONY: check-minimal-autoconf
+
+
+# --------------------------------------------------------------- #
+#  Testing on real-world packages can help us avoid regressions.  #
+# --------------------------------------------------------------- #
+
+#
+# NOTE (from Stefano Lattarini):
+#
+# This section is mostly hacky and ad-hoc, but works for me and
+# on my system.  And while far from clean, it should help catching
+# real regressions on real world packages, which is important.
+# Ideas about how to improve this and make it more generic, portable,
+# clean, etc., are welcome.
+#
+
+# Tiny sample package.
+FEW_PACKAGES += hello
+# Smallish package using recursive make setup.
+FEW_PACKAGES += make
+# Medium-size package using non-recursive make setup.
+FEW_PACKAGES += coreutils
+
+ALL_PACKAGES = \
+  $(FEW_PACKAGES) \
+  autoconf \
+  bison \
+  grep \
+  tar \
+  diffutils \
+  smalltalk
+
+pkg-targets = check dist
+
+# Note: "ttp" stays for "Third Party Package".
+
+ttp-check ttp-check-all: do-clone = $(GIT) clone --verbose
+ttp-check: ttp-packages = $(FEW_PACKAGES)
+ttp-check-all: ttp-packages = $(ALL_PACKAGES)
+
+# Note: some packages depend on pkg-config, and its provided macros.
+ttp-check ttp-check-all: t/pkg-config-macros.log
+       @set -e; \
+       $(setup_autotools_paths); \
+       skip_all_ () \
+       { \
+         echo "***" >&2; \
+         echo "*** $@: WARNING: $$@" >&2; \
+         echo "*** $@: WARNING: some packages might fail to bootstrap" >&2; \
+         echo "***" >&2;  \
+       }; \
+       . t/pkg-config-macros.dir/get.sh || exit 1; \
+       mkdir $@.d && cd $@.d || exit 1; \
+       for p in $(ttp-packages); do \
+           echo; \
+           echo ========  BEGIN TTP $$p  =========; \
+           echo; \
+           set -x; \
+           $(do-clone) git://$(git-sv-host)/$$p.git || exit 1; \
+           ( \
+             cd $$p \
+               && ls -l \
+               && if test -f bootstrap; then \
+                    ./bootstrap --no-git; \
+                  else \
+                    $$AUTORECONF -fvi; \
+                  fi \
+               && ./configure \
+               && if test $$p = make; then \
+                    $(MAKE) update; \
+                  else :; fi \
+               && for t in $(pkg-targets); do \
+                    $(MAKE) $$t WERROR_CFLAGS= || exit 1; \
+                  done \
+           ) || exit 1; \
+           set +x; \
+           echo; \
+           echo ========  END TTP $$p  =========; \
+           echo; \
+        done
+ifndef keep-ttp-dir
+       rm -rf $@.d
+endif
+
+# Alias for lazy typists.
+ttp: ttp-check
+ttp-all: ttp-check-all
+
+.PHONY: ttp ttp-check ttp-all ttp-check-all
diff --git a/maintainer/rename-tests b/maintainer/rename-tests
new file mode 100755 (executable)
index 0000000..8c64387
--- /dev/null
@@ -0,0 +1,75 @@
+#!/usr/bin/env bash
+# Convenience script to rename test cases in Automake.
+
+# Copyright (C) 2013-2017 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/>.
+
+set -e -u
+
+me=${0##*/}
+msg_file=$me.git-msg
+
+fatal () { echo "$me: $*" >&2; exit 1; }
+
+case $# in
+  0) input=$(cat);;
+  1) input=$(cat -- "$1");;
+  *) fatal "too many arguments";;
+esac
+
+AWK=${AWK-awk}
+SED=${SED-sed}
+
+[[ -f bin/automake.in && -d lib/Automake ]] \
+  || fatal "can only be run from the top-level of the Automake source tree"
+
+$SED --version 2>&1 | grep GNU >/dev/null 2>&1 \
+  || fatal "GNU sed is required by this script"
+
+# Input validation and cleanup.
+input=$(
+  $AWK -v me="$me" '
+    /^#/ { next; }
+    (NF == 0) { next; }
+    (NF != 2) { print me ": wrong number of fields at line " NR;
+                exit(1); }
+    { printf ("t/%s t/%s\n", $1, $2); }
+  ' <<<"$input"
+) || exit $?
+
+# Prepare git commit message.
+exec 5>"$msg_file"
+echo "tests: more significant names for some tests" >&5
+echo >&5
+$AWK >&5 <<<"$input" \
+  '{ printf ("* %s: Rename...\n* %s: ... like this.\n", $1, $2) }'
+exec 5>&-
+
+# Rename tests.
+eval "$($AWK '{ printf ("git mv %s %s\n", $1, $2) }' <<<"$input")"
+
+# Adjust the list of tests (do this conditionally, since such a
+# list is not required nor used in Automake-NG).
+if test -f t/list-of-tests.mk; then
+  $SED -e "$($AWK '{ printf ("s|^%s |%s |\n", $1, $2) }' <<<"$input")" \
+       -i t/list-of-tests.mk
+  git add t/list-of-tests.mk
+fi
+
+git status
+echo
+echo "NOTICE: pre-filled commit message is in file '$msg_file'"
+
+exit 0
similarity index 51%
rename from syntax-checks.mk
rename to maintainer/syntax-checks.mk
index 4b226a0..c8b0740 100644 (file)
@@ -1,6 +1,6 @@
 # Maintainer checks for Automake.  Requires GNU make.
 
-# Copyright (C) 2012 Free Software Foundation, Inc.
+# Copyright (C) 2012-2017 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
@@ -27,11 +27,14 @@ xtests := $(shell \
    fi; \
    for d in $$dirs; do \
      for s in tap sh; do \
-       ls $$d/t/*.$$s $$d/t/ax/*.$$s 2>/dev/null; \
+       ls $$d/t/ax/*.$$s $$d/t/*.$$s $$d/contrib/t/*.$$s 2>/dev/null; \
      done; \
    done | sort)
 
-xdefs = $(srcdir)/defs $(srcdir)/defs-static.in
+xdefs = \
+  $(srcdir)/t/ax/am-test-lib.sh \
+  $(srcdir)/t/ax/test-lib.sh \
+  $(srcdir)/t/ax/test-defs.in
 
 ams := $(shell find $(srcdir) -name '*.dir' -prune -o -name '*.am' -print)
 
@@ -39,10 +42,8 @@ ams := $(shell find $(srcdir) -name '*.dir' -prune -o -name '*.am' -print)
 # guaranteed to work on my machine.
 syntax_check_rules = \
 $(sc_tests_plain_check_rules) \
-sc_test_names \
-sc_diff_automake_in_automake \
-sc_diff_aclocal_in_automake \
-sc_perl_syntax \
+sc_diff_automake \
+sc_diff_aclocal \
 sc_no_brace_variable_expansions \
 sc_rm_minus_f \
 sc_no_for_variable_in_macro \
@@ -55,14 +56,18 @@ sc_cd_relative_dir \
 sc_perl_at_uscore_in_scalar_context \
 sc_perl_local \
 sc_AMDEP_TRUE_in_automake_in \
-sc_tests_make_without_am_makeflags \
+sc_make_without_am_makeflags \
+sc_tests_no_source_defs \
 sc_tests_obsolete_variables \
 sc_tests_here_document_format \
-sc_tests_Exit_not_exit \
+sc_tests_command_subst \
+sc_tests_no_run_make_redirect \
+sc_tests_exit_not_Exit \
 sc_tests_automake_fails \
-sc_tests_required_after_defs \
 sc_tests_overriding_macros_on_cmdline \
+sc_tests_no_make_e \
 sc_tests_plain_sleep \
+sc_tests_ls_t \
 sc_m4_am_plain_egrep_fgrep \
 sc_tests_no_configure_in \
 sc_tests_PATH_SEPARATOR \
@@ -73,119 +78,84 @@ sc_unquoted_DESTDIR \
 sc_tabs_in_texi \
 sc_at_in_texi
 
-## Look for test whose names can cause spurious failures when used as
-## first argument to AC_INIT (chiefly because they might contain an
-## m4/m4sugar builtin or macro name).
-m4_builtins = \
-  __gnu__ \
-  __unix__ \
-  bpatsubst \
-  bregexp \
-  builtin \
-  changecom \
-  changequote \
-  changeword \
-  debugfile \
-  debugmode \
-  decr \
-  define \
-  defn \
-  divert \
-  divnum \
-  dnl \
-  dumpdef \
-  errprint \
-  esyscmd \
-  eval \
-  format \
-  ifdef \
-  ifelse \
-  include \
-  incr \
-  index \
-  indir \
-  len \
-  m4exit \
-  m4wrap \
-  maketemp \
-  mkstemp \
-  patsubst \
-  popdef \
-  pushdef \
-  regexp \
-  shift \
-  sinclude \
-  substr \
-  symbols \
-  syscmd \
-  sysval \
-  traceoff \
-  traceon \
-  translit \
-  undefine \
-  undivert
-sc_test_names:
-       @m4_builtin_rx=`echo $(m4_builtins) | sed 's/ /|/g'`; \
-        m4_macro_rx="\\<($$m4_builtin_rx)\\>|\\<_?(A[CUMHS]|m4)_"; \
-        if { \
-          for t in $(xtests); do echo $$t; done \
-            | LC_ALL=C grep -E "$$m4_macro_rx"; \
-        }; then \
-          echo "the names of the tests above can be problematic" 1>&2; \
-          echo "Avoid test names that contain names of m4 macros" 1>&2; \
-          exit 1; \
-        fi
+$(syntax_check_rules): bin/automake bin/aclocal
+maintainer-check: $(syntax_check_rules)
+.PHONY: maintainer-check $(syntax_check_rules)
 
-## These check avoids accidental configure substitutions in the source.
-## There are exactly 9 lines that should be modified from automake.in to
-## automake, and 10 lines that should be modified from aclocal.in to
-## aclocal; these wors out to 32 and 34 lines of diffs, respectively.
-sc_diff_automake_in_automake:
-       @if test `diff $(srcdir)/automake.in automake | wc -l` -ne 32; then \
-         echo "found too many diffs between automake.in and automake" 1>&2; \
-         diff -c $(srcdir)/automake.in automake; \
-         exit 1; \
-       fi
-sc_diff_aclocal_in_aclocal:
-       @if test `diff $(srcdir)/aclocal.in aclocal | wc -l` -ne 34; then \
-         echo "found too many diffs between aclocal.in and aclocal" 1>&2; \
-         diff -c $(srcdir)/aclocal.in aclocal; \
-         exit 1; \
-       fi
+# Check that the list of tests given in the Makefile is equal to the
+# list of all test scripts in the Automake testsuite.
+maintainer-check: maintainer-check-list-of-tests
 
-## Syntax check with default Perl (on my machine, Perl 5).
-sc_perl_syntax:
-       @perllibdir="./lib$(PATH_SEPARATOR)$(srcdir)/lib" $(PERL) -c -w automake
-       @perllibdir="./lib$(PATH_SEPARATOR)$(srcdir)/lib" $(PERL) -c -w aclocal
+# I'm a lazy typist.
+lint: maintainer-check
+.PHONY: lint
+
+# The recipes of syntax checks require a modern GNU grep.
+sc_sanity_gnu_grep:
+       $(AM_V_GEN)grep --version | grep 'GNU grep' >/dev/null 2>&1 \
+         && ab=$$(printf 'a\nb') \
+         && test "$$(printf 'xa\nb\nc' | grep -Pzo 'a\nb')" = "$$ab" \
+         || { \
+           echo "Syntax checks recipes require a modern GNU grep" >&2; \
+           exit 1; \
+         }
+.PHONY: sc_sanity_gnu_grep
+$(syntax_check_rules): sc_sanity_gnu_grep
+
+# These check avoids accidental configure substitutions in the source.
+# There are exactly 8 lines that should be modified from automake.in to
+# automake, and 9 lines that should be modified from aclocal.in to
+# aclocal.
+automake_diff_no = 8
+aclocal_diff_no = 9
+sc_diff_automake sc_diff_aclocal: in=$($*_in)
+sc_diff_automake sc_diff_aclocal: out=$($*_script)
+sc_diff_automake sc_diff_aclocal: sc_diff_% :
+       @set +e; \
+       in=$*-in.tmp out=$*-out.tmp diffs=$*-diffs.tmp \
+         && sed '/^#!.*[pP]rototypes/d' $(in) > $$in \
+         && sed '/^# BEGIN.* PROTO/,/^# END.* PROTO/d' $(out) > $$out \
+         && { diff -u $$in $$out > $$diffs; test $$? -eq 1; } \
+         && added=`grep -v '^+++ ' $$diffs | grep -c '^+'` \
+         && removed=`grep -v '^--- ' $$diffs | grep -c '^-'` \
+         && test $$added,$$removed = $($*_diff_no),$($*_diff_no) \
+         || { \
+           echo "Found unexpected diffs between $(in) and $(out)"; \
+           echo "Lines added:   $$added"  ; \
+           echo "Lines removed: $$removed"; \
+           cat $$diffs; \
+           exit 1; \
+         } >&2; \
+       rm -f $$in $$out $$diffs
 
-## Expect no instances of '${...}'.  However, $${...} is ok, since that
-## is a shell construct, not a Makefile construct.
+# Expect no instances of '${...}'.  However, $${...} is ok, since that
+# is a shell construct, not a Makefile construct.
 sc_no_brace_variable_expansions:
        @if grep -v '^ *#' $(ams) | grep -F '$${' | grep -F -v '$$$$'; then \
          echo "Found too many uses of '\$${' in the lines above." 1>&2; \
-         exit 1;                               \
+         exit 1; \
        else :; fi
 
-## Make sure 'rm' is called with '-f'.
+# Make sure 'rm' is called with '-f'.
 sc_rm_minus_f:
        @if grep -v '^#' $(ams) $(xtests) \
-          | grep -v '/spy-rm\.tap:' \
+          | grep -vE '/(rm-f-probe\.sh|spy-rm\.tap|subobj-clean.*-pr10697\.sh):' \
           | grep -E '\<rm ([^-]|\-[^f ]*\>)'; \
        then \
          echo "Suspicious 'rm' invocation." 1>&2; \
-         exit 1;                               \
+         exit 1; \
        else :; fi
 
-## Never use something like "for file in $(FILES)", this doesn't work
-## if FILES is empty or if it contains shell meta characters (e.g. $ is
-## commonly used in Java filenames).
+# Never use something like "for file in $(FILES)", this doesn't work
+# if FILES is empty or if it contains shell meta characters (e.g. $ is
+# commonly used in Java filenames).
 sc_no_for_variable_in_macro:
        @if grep 'for .* in \$$(' $(ams) | grep -v '/Makefile\.am:'; then \
          echo 'Use "list=$$(mumble); for var in $$$$list".' 1>&2 ; \
          exit 1; \
        else :; fi
 
-## Make sure all invocations of mkinstalldirs are correct.
+# Make sure all invocations of mkinstalldirs are correct.
 sc_mkinstalldirs:
        @if grep -n 'mkinstalldirs' $(ams) \
              | grep -F -v '$$(mkinstalldirs)' \
@@ -195,7 +165,7 @@ sc_mkinstalldirs:
          exit 1; \
        else :; fi
 
-## Make sure all calls to PRE/NORMAL/POST_INSTALL/UNINSTALL
+# Make sure all calls to PRE/NORMAL/POST_INSTALL/UNINSTALL
 sc_pre_normal_post_install_uninstall:
        @if grep -E -n '\((PRE|NORMAL|POST)_(|UN)INSTALL\)' $(ams) | \
              grep -v ':##' | grep -v ':        @\$$('; then \
@@ -203,32 +173,32 @@ sc_pre_normal_post_install_uninstall:
          exit 1; \
        else :; fi
 
-## We never want to use "undef", only "delete", but for $/.
+# We never want to use "undef", only "delete", but for $/.
 sc_perl_no_undef:
-       @if grep -n -w 'undef ' $(srcdir)/automake.in | \
+       @if grep -n -w 'undef ' $(automake_in) | \
              grep -F -v 'undef $$/'; then \
-         echo "Found undef in automake.in; use delete instead" 1>&2; \
+         echo "Found 'undef' in the lines above; use 'delete' instead" 1>&2; \
          exit 1; \
        fi
 
-## We never want split (/ /,...), only split (' ', ...).
+# We never want split (/ /,...), only split (' ', ...).
 sc_perl_no_split_regex_space:
-       @if grep -n 'split (/ /' $(srcdir)/automake.in; then \
+       @if grep -n 'split (/ /' $(automake_in) $(acloca_in); then \
          echo "Found bad split in the lines above." 1>&2; \
          exit 1; \
        fi
 
-## Look for cd within backquotes
+# Look for cd within backquotes
 sc_cd_in_backquotes:
-       @if grep -n '^[^#]*` *cd ' $(srcdir)/automake.in $(ams); then \
+       @if grep -n '^[^#]*` *cd ' $(automake_in) $(ams); then \
          echo "Consider using \$$(am__cd) in the lines above." 1>&2; \
          exit 1; \
        fi
 
-## Look for cd to a relative directory (may be influenced by CDPATH).
-## Skip some known directories that are OK.
+# Look for cd to a relative directory (may be influenced by CDPATH).
+# Skip some known directories that are OK.
 sc_cd_relative_dir:
-       @if grep -n '^[^#]*cd ' $(srcdir)/automake.in $(ams) | \
+       @if grep -n '^[^#]*cd ' $(automake_in) $(ams) | \
              grep -v 'echo.*cd ' | \
              grep -v 'am__cd =' | \
              grep -v '^[^#]*cd [./]' | \
@@ -240,43 +210,45 @@ sc_cd_relative_dir:
          exit 1; \
        fi
 
-## Using @_ in a scalar context is most probably a programming error.
+# Using @_ in a scalar context is most probably a programming error.
 sc_perl_at_uscore_in_scalar_context:
-       @if grep -Hn '[^@_A-Za-z0-9][_A-Za-z0-9]*[^) ] *= *@_' $(srcdir)/automake.in; then \
+       @if grep -Hn '[^%@_A-Za-z0-9][_A-Za-z0-9]*[^) ] *= *@_' \
+           $(automake_in) $(aclocal_in); then \
          echo "Using @_ in a scalar context in the lines above." 1>&2; \
          exit 1; \
        fi
 
-## Allow only few variables to be localized in Automake.
+## Allow only few variables to be localized in automake and aclocal.
 sc_perl_local:
-       @if egrep -v '^[ \t]*local \$$[_~]( *=|;)' $(srcdir)/automake.in | \
-               grep '^[ \t]*local [^*]'; then \
+       @if egrep -v '^[ \t]*local \$$[_~]( *=|;)' \
+             $(automake_in) $(aclocal_in) | \
+           grep '^[ \t]*local [^*]'; then \
          echo "Please avoid 'local'." 1>&2; \
          exit 1; \
        fi
 
-## Don't let AMDEP_TRUE substitution appear in automake.in.
+# Don't let AMDEP_TRUE substitution appear in automake.in.
 sc_AMDEP_TRUE_in_automake_in:
-       @if grep '@AMDEP''_TRUE@' $(srcdir)/automake.in; then \
+       @if grep '@AMDEP''_TRUE@' $(automake_in); then \
          echo "Don't put AMDEP_TRUE substitution in automake.in" 1>&2; \
          exit 1; \
        fi
 
-## Recursive make invocations should always pass $(AM_MAKEFLAGS)
-## to $(MAKE), for portability to non-GNU make.
+# Recursive make invocations should always pass $(AM_MAKEFLAGS)
+# to $(MAKE), for portability to non-GNU make.
 sc_tests_make_without_am_makeflags:
-       @if grep '^[^#].*(MAKE) ' $(ams) $(srcdir)/automake.in \
-           | grep -v 'AM_MAKEFLAGS' \
-           | grep -v '/am/header-vars\.am:.*am--echo.*| $$(MAKE) -f *-'; \
+       @if grep '^[^#].*(MAKE) ' $(ams) $(automake_in) \
+           | grep -Fv '$$(AM_MAKEFLAGS)'; \
        then \
          echo 'Use $$(MAKE) $$(AM_MAKEFLAGS).' 1>&2; \
          exit 1; \
        fi
 
-## Look out for some obsolete variables.
+# Look out for some obsolete variables.
 sc_tests_obsolete_variables:
        @vars=" \
          using_tap \
+         am_using_tap \
          test_prefer_config_shell \
          original_AUTOMAKE \
          original_ACLOCAL \
@@ -300,10 +272,10 @@ sc_tests_obsolete_variables:
          exit 1; \
        else :; fi
 
-## Tests should never call some programs directly, but only through the
-## corresponding variable (e.g., '$MAKE', not 'make').  This will allow
-## the programs to be overridden at configure time (for less brittleness)
-## or by the user at make time (to allow better testsuite coverage).
+# Tests should never call some programs directly, but only through the
+# corresponding variable (e.g., '$MAKE', not 'make').  This will allow
+# the programs to be overridden at configure time (for less brittleness)
+# or by the user at make time (to allow better testsuite coverage).
 sc_tests_plain_check_rules = \
   sc_tests_plain_egrep \
   sc_tests_plain_fgrep \
@@ -332,100 +304,138 @@ $(sc_tests_plain_check_rules): sc_tests_plain_% :
           exit 1; \
        fi
 
-## Tests should only use END and EOF for here documents
-## (so that the next test is effective).
+# Tests should only use END and EOF for here documents
+# (so that the next test is effective).
 sc_tests_here_document_format:
        @if grep '<<' $(xtests) | grep -Ev '\b(END|EOF)\b|\bcout <<'; then \
          echo 'Use here documents with "END" and "EOF" only, for greppability.' 1>&2; \
          exit 1; \
        fi
 
-## Tests should never call exit directly, but use Exit.
-## This is so that the exit status is transported correctly across the 0 trap.
-## Ignore comments and our testsuite's own self tests.
-sc_tests_Exit_not_exit:
-       @found=false; for file in $(xtests); do \
-         case $$file in */self-check-*) continue;; esac; \
-         res=`sed -n -e '/^#/d' -e '/<<.*END/,/^END/b' -e '/<<.*EOF/,/^EOF/b' \
-                     -e '/exit [$$0-9]/p' $$file`; \
+# Our test case should use the $(...) POSIX form for command substitution,
+# rather than the older `...` form.
+# The point of ignoring text on here-documents is that we want to exempt
+# Makefile.am rules, configure.ac code and helper shell script created and
+# used by out shell scripts, because Autoconf (as of version 2.69) does not
+# yet ensure that $CONFIG_SHELL will be set to a proper POSIX shell.
+sc_tests_command_subst:
+       @found=false; \
+       scan () { \
+         sed -n -e '/^#/d' \
+                -e '/<<.*END/,/^END/b' -e '/<<.*EOF/,/^EOF/b' \
+                -e 's/\\`/\\{backtick}/' \
+                -e "s/[^\\]'\([^']*\`[^']*\)*'/'{quoted-text}'/g" \
+                -e '/`/p' $$*; \
+       }; \
+       for file in $(xtests); do \
+         res=`scan $$file`; \
          if test -n "$$res"; then \
            echo "$$file:$$res"; \
            found=true; \
          fi; \
        done; \
        if $$found; then \
-         echo 'Do not call plain "exit", use "Exit" instead, in above tests.' 1>&2; \
+         echo 'Use $$(...), not `...`, for command substitutions.' >&2; \
+         exit 1; \
+       fi
+
+# Tests should no longer call 'Exit', just 'exit'.  That's because we
+# now have in place a better workaround to ensure the exit status is
+# transported correctly across the exit trap.
+sc_tests_exit_not_Exit:
+       @if grep 'Exit' $(xtests) $(xdefs) | grep -Ev '^[^:]+: *#' | grep .; then \
+         echo "Use 'exit', not 'Exit'; it's obsolete now." 1>&2; \
+         exit 1; \
+       fi
+
+# Guard against obsolescent uses of ./defs in tests.  Now,
+# 'test-init.sh' should be used instead.
+sc_tests_no_source_defs:
+       @if grep -E '\. .*defs($$| )' $(xtests); then \
+         echo "Source 'test-init.sh', not './defs'." 1>&2; \
          exit 1; \
        fi
 
-## Use AUTOMAKE_fails when appropriate
+# Invocation of 'run_make' should not have output redirections.
+sc_tests_no_run_make_redirect:
+       @if grep -Pzo '.*(\$$MAKE|\brun_make)\b(.*(\\\n))*.*>.*' $(xtests); \
+       then \
+         echo 'Do not redirect stdout/stderr in "run_make" or "$$MAKE"' \
+              'invocations,' >&2; \
+         echo 'use "run_make {-E|-O|-M}" instead.' >&2; \
+         exit 1; \
+       fi
+
+# Use AUTOMAKE_fails when appropriate
 sc_tests_automake_fails:
-       @if grep -v '^#' $(xtests) | grep '\$$AUTOMAKE.*&&.*[eE]xit'; then \
+       @if grep -v '^#' $(xtests) | grep '\$$AUTOMAKE.*&&.*exit'; then \
          echo 'Use AUTOMAKE_fails + grep to catch automake failures in the above tests.' 1>&2;  \
          exit 1; \
        fi
 
-## Setting 'required' after sourcing './defs' is a bug.
-sc_tests_required_after_defs:
-       @for file in $(xtests); do \
-         if out=`sed -n '/defs/,$${/required=/p;}' $$file`; test -n "$$out"; then \
-           echo 'Do not set "required" after sourcing "defs" in '"$$file: $$out" 1>&2; \
-           exit 1; \
-         fi; \
-       done
-
-## Overriding a Makefile macro on the command line is not portable when
-## recursive targets are used.  Better use an envvar.  SHELL is an
-## exception, POSIX says it can't come from the environment.  V, DESTDIR,
-## DISTCHECK_CONFIGURE_FLAGS and DISABLE_HARD_ERRORS are exceptions, too,
-## as package authors are urged not to initialize them anywhere.
-## Finally, 'exp' is used by some ad-hoc checks, where we ensure it's
-## ok to override it from the command line.
-sc_tests_overriding_macros_on_cmdline:
-       @if grep -E '\$$MAKE .*(SHELL=.*=|=.*SHELL=)' $(xtests); then \
-         echo 'Rewrite "$$MAKE foo=bar SHELL=$$SHELL" as "foo=bar $$MAKE -e SHELL=$$SHELL"' 1>&2; \
-         echo ' in the above lines, it is more portable.' 1>&2; \
+# "make -e" is brittle and unsafe, since it let *all* the environment
+# win over the macro definitions in the Makefiles.  Since we offer
+# AM_MAKEFLAGS to allow the user to portably override macro definitions
+# from the command line in a safe way, we should encourage users to use
+# it.
+sc_tests_no_make_e:
+       @if grep -E '\$$MAKE\b.* -[a-zA-Z0-9]*e' $(xtests); then \
+         echo '"make -e" is brittle, use "run_make" instead.' 1>&2; \
          exit 1; \
        fi
+
+# Overriding a Makefile macro on the command line is not portable when
+# recursive targets are used.  Better use an envvar.  SHELL is an
+# exception, POSIX says it can't come from the environment.  V, DESTDIR,
+# DISTCHECK_CONFIGURE_FLAGS and DISABLE_HARD_ERRORS are exceptions, too,
+# as package authors are urged not to initialize them anywhere.
+# Finally, 'exp' is used by some ad-hoc checks, where we ensure it's
+# ok to override it from the command line.
+sc_tests_overriding_macros_on_cmdline:
 # The first s/// tries to account for usages like "$MAKE || st=$?".
 # 'DISTCHECK_CONFIGURE_FLAGS' and 'exp' are allowed to contain whitespace in
 # their definitions, hence the more complex last three substitutions below.
-# Also, the 'make-dryrun.sh' is whitelisted, since there we need to
-# override variables from the command line in order to cover the expected
-# code paths.
-       @tests=`for t in $(xtests); do \
-                 case $$t in */make-dryrun.sh);; *) echo $$t;; esac; \
-               done`; \
-       if sed -e 's/ || .*//' -e 's/ && .*//' \
+       @if sed -e 's/ || .*//' -e 's/ && .*//' \
                -e 's/ DESTDIR=[^ ]*/ /' -e 's/ SHELL=[^ ]*/ /' \
                -e 's/ V=[^ ]*/ /' -e 's/ DISABLE_HARD_ERRORS=[^ ]*/ /' \
                -e "s/ DISTCHECK_CONFIGURE_FLAGS='[^']*'/ /" \
-               -e 's/ DISTCHECK_CONFIGURE_FLAGS="[^"]*"/ /' \
-               -e 's/ DISTCHECK_CONFIGURE_FLAGS=[^ ]/ /' \
+               -e 's/ DISTCHECK_CONFIGURE_FLAGS="[^"]*"/ /' \
+               -e 's/ DISTCHECK_CONFIGURE_FLAGS=[^ ]/ /' \
                -e "s/ exp='[^']*'/ /" \
-               -e 's/ exp="[^"]*"/ /' \
-               -e 's/ exp=[^ ]/ /' \
-             $$tests | grep '\$$MAKE .*='; then \
-         echo 'Rewrite "$$MAKE foo=bar" as "foo=bar $$MAKE -e" in the above lines,' 1>&2; \
-         echo 'it is more portable.' 1>&2; \
-         exit 1; \
-       fi
+               -e 's/ exp="[^"]*"/ /' \
+               -e 's/ exp=[^ ]/ /' \
+             $(filter-out %/am-test-lib.sh,$(xtests)) \
+               | grep '\$$MAKE .*='; then \
+         echo 'Rewrite "$$MAKE foo=bar" as "run_make foo=bar" in the lines above,'; \
+         echo 'it is more portable.'; \
+         exit 1; \
+       fi >&2
        @if grep 'SHELL=.*\$$MAKE' $(xtests); then \
-         echo '$$MAKE ignores the SHELL envvar, use "$$MAKE SHELL=$$SHELL" in' 1>&2; \
-         echo 'the above lines.' 1>&2; \
+         echo '$$MAKE ignores the SHELL envvar, use "run_make SHELL=$$SHELL"'; \
+         echo 'in the above lines.'; \
+         exit 1; \
+       fi >&2
+
+# Prefer use of our 'is_newest' auxiliary script over the more hacky
+# idiom "test $(ls -1t new old | sed 1q) = new", which is both more
+# cumbersome and more fragile.
+sc_tests_ls_t:
+       @if LC_ALL=C grep -E '\bls(\s+-[a-zA-Z0-9]+)*\s+-[a-zA-Z0-9]*t' \
+           $(xtests); then \
+         echo "Use 'is_newest' rather than hacks based on 'ls -t'" 1>&2; \
          exit 1; \
        fi
 
-## Never use 'sleep 1' to create files with different timestamps.
-## Use '$sleep' instead.  Some filesystems (e.g., Windows) have only
-## a 2sec resolution.
+# Never use 'sleep 1' to create files with different timestamps.
+# Use '$sleep' instead.  Some file systems (e.g., Windows) have only
+# a 2sec resolution.
 sc_tests_plain_sleep:
        @if grep -E '\bsleep +[12345]\b' $(xtests); then \
          echo 'Do not use "sleep x" in the above tests.  Use "$$sleep" instead.' 1>&2; \
          exit 1; \
        fi
 
-## fgrep and egrep are not required by POSIX.
+# fgrep and egrep are not required by POSIX.
 sc_m4_am_plain_egrep_fgrep:
        @if grep -E '\b[ef]grep\b' $(ams) $(srcdir)/m4/*.m4; then \
          echo 'Do not use egrep or fgrep in the above files,' \
@@ -433,9 +443,9 @@ sc_m4_am_plain_egrep_fgrep:
          exit 1; \
        fi
 
-## Prefer 'configure.ac' over the obsolescent 'configure.in' as the name
-## for configure input files in our testsuite.  The latter  has been
-## deprecated for several years (at least since autoconf 2.50).
+# Prefer 'configure.ac' over the obsolescent 'configure.in' as the name
+# for configure input files in our testsuite.  The latter  has been
+# deprecated for several years (at least since autoconf 2.50).
 sc_tests_no_configure_in:
        @if grep -E '\bconfigure\\*\.in\b' $(xtests) $(xdefs) \
              | grep -Ev '/backcompat.*\.(sh|tap):' \
@@ -448,11 +458,11 @@ sc_tests_no_configure_in:
          exit 1; \
        fi
 
-## Rule to ensure that the testsuite has been run before.  We don't depend
-## on 'check' here, because that would be very wasteful in the common case.
-## We could run "make check RECHECK_LOGS=" and avoid toplevel races with
-## AM_RECURSIVE_TARGETS.  Suggest keeping test directories around for
-## greppability of the Makefile.in files.
+# Rule to ensure that the testsuite has been run before.  We don't depend
+# on 'check' here, because that would be very wasteful in the common case.
+# We could run "make check RECHECK_LOGS=" and avoid toplevel races with
+# AM_RECURSIVE_TARGETS.  Suggest keeping test directories around for
+# greppability of the Makefile.in files.
 sc_ensure_testsuite_has_run:
        @if test ! -f '$(TEST_SUITE_LOG)'; then \
          echo 'Run "env keep_testdirs=yes make check" before' \
@@ -461,15 +471,15 @@ sc_ensure_testsuite_has_run:
        fi
 .PHONY: sc_ensure_testsuite_has_run
 
-## Ensure our warning and error messages do not contain duplicate 'warning:' prefixes.
-## This test actually depends on the testsuite having been run before.
+# Ensure our warning and error messages do not contain duplicate 'warning:' prefixes.
+# This test actually depends on the testsuite having been run before.
 sc_tests_logs_duplicate_prefixes: sc_ensure_testsuite_has_run
        @if grep -E '(warning|error):.*(warning|error):' t/*.log; then \
          echo 'Duplicate warning/error message prefixes seen in above tests.' >&2; \
          exit 1; \
        fi
 
-## Ensure variables are listed before rules in Makefile.in files we generate.
+# Ensure variables are listed before rules in Makefile.in files we generate.
 sc_tests_makefile_variable_order: sc_ensure_testsuite_has_run
        @st=0; \
        for file in `find t -name Makefile.in -print`; do \
@@ -491,7 +501,7 @@ sc_tests_makefile_variable_order: sc_ensure_testsuite_has_run
          exit 1; \
        }
 
-## Using ':' as a PATH separator is not portable.
+# Using ':' as a PATH separator is not portable.
 sc_tests_PATH_SEPARATOR:
        @if grep -E '\bPATH=.*:.*' $(xtests) ; then \
          echo "Use '\$$PATH_SEPARATOR', not ':', in PATH definitions" \
@@ -499,14 +509,14 @@ sc_tests_PATH_SEPARATOR:
          exit 1; \
        fi
 
-## Try to make sure all @...@ substitutions are covered by our
-## substitution rule.
+# Try to make sure all @...@ substitutions are covered by our
+# substitution rule.
 sc_perl_at_substs:
-       @if test `grep -E '^[^#]*@[A-Za-z_0-9]+@' aclocal | wc -l` -ne 0; then \
+       @if test `grep -E '^[^#]*@[A-Za-z_0-9]+@' bin/aclocal | wc -l` -ne 0; then \
          echo "Unresolved @...@ substitution in aclocal" 1>&2; \
          exit 1; \
        fi
-       @if test `grep -E '^[^#]*@[A-Za-z_0-9]+@' automake | wc -l` -ne 0; then \
+       @if test `grep -E '^[^#]*@[A-Za-z_0-9]+@' bin/automake | wc -l` -ne 0; then \
          echo "Unresolved @...@ substitution in automake" 1>&2; \
          exit 1; \
        fi
@@ -529,11 +539,3 @@ sc_at_in_texi:
          echo 'Unescaped @.' 1>&2; \
          exit 1; \
        fi
-
-$(syntax_check_rules): automake aclocal
-maintainer-check: $(syntax_check_rules)
-.PHONY: maintainer-check $(syntax_check_rules)
-
-## Check that the list of tests given in the Makefile is equal to the
-## list of all test scripts in the Automake testsuite.
-maintainer-check: maintainer-check-list-of-tests
index 8464944..24f76e0 100644 (file)
@@ -1442,7 +1442,7 @@ Sat Feb 10 17:08:39 1996  Tom Tromey  <tromey@creche.cygnus.com>
 
 -----
 
-Copyright 2012 Free Software Foundation, Inc.
+Copyright 2012-2017 Free Software Foundation, Inc.
 
 Copying and distribution of this file, with or without modification, are
 permitted provided the copyright notice and this notice are preserved.
index c50c4eb..a15902f 100644 (file)
 
 -----
 
-Copyright 1999-2012 Free Software Foundation, Inc.
+Copyright 1999-2017 Free Software Foundation, Inc.
 
 Copying and distribution of this file, with or without modification, are
 permitted provided the copyright notice and this notice are preserved.
index cb7b37a..a522ea7 100644 (file)
        contents.
        (dist-all, dist-bzip2, dist-zip, dist-tarZ): New conditional
        targets.
-       And BTW, all these guys are phony.
+       And BTW, all of these guys are phony.
        * automake.in (&handle_dist_worker): As its name doesn't indicate,
        output distributions.
        (&handle_dist): As its name doesn't indicate, don't.
        * automake.in (handle_clean): Bind `-local' targets to `-am'
        targets, not top targets.
        Don't declare -recursive dependencies of the clean targets:
-       `subdirs.am' did it.  Less hard coded knowledge, transfered
+       `subdirs.am' did it.  Less hard coded knowledge, transferred
        into...
        * clean.am: here.
 
 
 -----
 
-Copyright (C) 2001-2012 Free Software Foundation, Inc.
+Copyright (C) 2001-2017 Free Software Foundation, Inc.
 
 Copying and distribution of this file, with or without modification, are
 permitted provided the copyright notice and this notice are preserved.
index b99f757..bb3e974 100644 (file)
 2002-09-30  Alexandre Duret-Lutz  <duret_g@epita.fr>
 
        * automake.in (require_variables): The fix introduced in 2002-09-19
-       is imcomplete.  Rewrite the conditional variable definition check
+       is incomplete.  Rewrite the conditional variable definition check
        using &variable_not_always_defined_in_cond.
        * tests/cond26.test, tests/cond27.test, tests/cond28.test: New file.
        * tests/Makefile.am (TESTS): Add cond26.test, cond27.test, and
        so_location files in current directory.
 
        Fix for PR automake/346:
-       * automake.texi (Optional): Supress the documentation for
+       * automake.texi (Optional): Suppress the documentation for
        AC_PATH_XTRA, AC_FUNC_ALLOCA, AC_FUNC_ERROR_AT_LINE, AC_FUNC_FNMATCH,
        AC_FUNC_GETLOADAVG, AC_FUNC_MEMCMP, AC_FUNC_MKTIME, AC_FUNC_OBSTACK,
        AC_FUNC_STRTOD, AC_REPLACE_FUNCS, AC_REPLACE_GNU_GETOPT,
        * tests/defs (configure.in): Don't double-quote $me.
        * tests/sinclude.test: Overwrite configure.in and use
        `am__sinclude' instead of `sinclude' as package name.
-       Excercise `m4_sinclude' instead of `sinclude'.
+       Exercise `m4_sinclude' instead of `sinclude'.
 
 2002-05-20  Alexandre Duret-Lutz  <duret_g@epita.fr>
 
        derived from maude_LIBADD.
        (Program variables): Define AM_LDFLAGS.
        (Dependencies): Passing the no-dependencies option to
-       AM_INIT_AUTOMAKE is prefered.
+       AM_INIT_AUTOMAKE is preferred.
        (Scripts): Explain why automake is magically cleaned.
        Mention noinst_SCRIPTS and check_SCRIPTS.
        (Data): Use dist_ in Automake's example.
 
 -----
 
-Copyright (C) 2002-2012 Free Software Foundation, Inc.
+Copyright (C) 2002-2017 Free Software Foundation, Inc.
 
 Copying and distribution of this file, with or without modification, are
 permitted provided the copyright notice and this notice are preserved.
index b7e8c6a..77c4ecb 100644 (file)
 2003-03-19  Alexandre Duret-Lutz  <adl@gnu.org>
 
        * Makefile.am (maintainer-check): Allow `automake:' tokens,
-       occuring in location.test.  Automake now has 5 legitimate
+       occurring in location.test.  Automake now has 5 legitimate
        unsubstituted @strings@.
 
        * tests/aclocal4.test: Require GNU make.
 
 2003-01-19  Alexandre Duret-Lutz  <adl@gnu.org>
 
-       Rename more files to accomodate 8+3 file systems, and adjust the
+       Rename more files to accommodate 8+3 file systems, and adjust the
        vocabulary at the same time: AM_CONDITIONAL defines "conditionals",
        and we call "condition" a conjunction of "conditionals".
        * lib/am/Conditional.pm: Rename to lib/am/Condition.pm.
 
 -----
 
-Copyright (C) 2003-2012 Free Software Foundation, Inc.
+Copyright (C) 2003-2017 Free Software Foundation, Inc.
 
 Copying and distribution of this file, with or without modification, are
 permitted provided the copyright notice and this notice are preserved.
index 111f87b..0bbd2b0 100644 (file)
 
 -----
 
-Copyright (C) 2004-2012 Free Software Foundation, Inc.
+Copyright (C) 2004-2017 Free Software Foundation, Inc.
 
 Copying and distribution of this file, with or without modification, are
 permitted provided the copyright notice and this notice are preserved.
index 02a1e33..748bfcb 100644 (file)
 
 -----
 
-Copyright (C) 2005-2012 Free Software Foundation, Inc.
+Copyright (C) 2005-2017 Free Software Foundation, Inc.
 
 Copying and distribution of this file, with or without modification, are
 permitted provided the copyright notice and this notice are preserved.
index ce9d2b8..f7ec2c5 100644 (file)
        tests: optimize `instspc-*.test' for speed
        After the split of `instspc.test' into various generated tests,
        the running time of the testsuite has noticeably increased, since
-       all these new generated tests must run aclocal, autoconf and
+       all of these new generated tests must run aclocal, autoconf and
        automake, whereas previously they were run only once (at the
        beginning of `instspc.test').  But luckily, since the new tests
        share the same input files for the autotools, this situation can
 
 -----
 
-Copyright (C) 2010-2012 Free Software Foundation, Inc.
+Copyright (C) 2010-2017 Free Software Foundation, Inc.
 
 Copying and distribution of this file, with or without modification, are
 permitted provided the copyright notice and this notice are preserved.
index d89c2e3..eaf1a9c 100644 (file)
@@ -3679,7 +3679,7 @@ Mon Sep 19 23:39:21 1994  djm  <djm@cambric>
 
 -----
 
-Copyright 1994-2012 Free Software Foundation, Inc.
+Copyright 1994-2017 Free Software Foundation, Inc.
 
 Copying and distribution of this file, with or without modification, are
 permitted provided the copyright notice and this notice are preserved.
index 3eeb353..0dad2bd 100644 (file)
@@ -2185,7 +2185,7 @@ Thu Jan  2 14:16:17 1997  Tom Tromey  <tromey@cygnus.com>
 
 -----
 
-Copyright 1997-2012 Free Software Foundation, Inc.
+Copyright 1997-2017 Free Software Foundation, Inc.
 
 Copying and distribution of this file, with or without modification, are
 permitted provided the copyright notice and this notice are preserved.
index f8e4754..1276a88 100644 (file)
--- a/old/TODO
+++ b/old/TODO
@@ -483,7 +483,7 @@ that aren't mentioned?
 
 * copyright notice
 
-Copyright 1994-2012 Free Software Foundation, Inc.
+Copyright 1994-2017 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 a3913f2..ca29b47 100644 (file)
@@ -1,6 +1,6 @@
 ## -*- Automake -*-
 ##
-## Copyright (C) 2011-2012 Free Software Foundation, Inc.
+## Copyright (C) 2011-2017 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
diff --git a/t/Makefile.inc b/t/Makefile.inc
new file mode 100644 (file)
index 0000000..708e933
--- /dev/null
@@ -0,0 +1,272 @@
+## Included by top-level Makefile for Automake.
+
+## Copyright (C) 1995-2017 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/>.
+
+## ------------ ##
+##  Testsuite.  ##
+## ------------ ##
+
+# Run the tests with a proper shell detected at configure time.
+LOG_COMPILER = $(AM_TEST_RUNNER_SHELL)
+
+TEST_EXTENSIONS = .pl .sh .tap
+SH_LOG_COMPILER = $(LOG_COMPILER)
+TAP_LOG_COMPILER = $(LOG_COMPILER)
+PL_LOG_COMPILER = $(PERL)
+AM_PL_LOG_FLAGS = -Mstrict -I $(builddir)/lib -I $(srcdir)/lib -w
+
+TAP_LOG_DRIVER = AM_TAP_AWK='$(AWK)' $(SHELL) $(srcdir)/lib/tap-driver.sh
+
+AM_TAP_LOG_DRIVER_FLAGS = --merge
+
+EXTRA_DIST += %D%/README %D%/ax/is %D%/ax/is_newest %D%/ax/deltree.pl
+
+
+## Will be updated later.
+TESTS =
+
+# Some testsuite-influential variables should be overridable from the
+# test scripts, but not from the environment.
+# Keep this in sync with the similar list in ax/runtest.in.
+AM_TESTS_ENVIRONMENT = \
+  for v in \
+    required \
+    am_test_protocol \
+    am_serial_tests \
+    am_test_prefer_config_shell \
+    am_original_AUTOMAKE \
+    am_original_ACLOCAL \
+    am_test_lib_sourced \
+    test_lib_sourced \
+  ; do \
+    eval test x"\$${$$v}" = x || unset $$v; \
+  done;
+# We want warning messages and explanations for skipped tests to go to
+# the console if possible, so set up 'stderr_fileno_' properly.
+AM_TESTS_FD_REDIRECT = 9>&2
+AM_TESTS_ENVIRONMENT += stderr_fileno_=9; export stderr_fileno_;
+
+# For sourcing of extra "shell libraries" by our test scripts.  As per
+# POSIX, sourcing a file with '.' will cause it to be looked up in $PATH
+# in case it is given with a relative name containing no slashes.
+AM_TESTS_ENVIRONMENT += \
+  if test $(srcdir) != .; then \
+    PATH='$(abs_srcdir)/%D%/ax$(PATH_SEPARATOR)'$$PATH; \
+  fi; \
+  PATH='$(abs_builddir)/%D%/ax$(PATH_SEPARATOR)'$$PATH; \
+  export PATH;
+
+# Hand-written tests.
+
+include $(srcdir)/%D%/list-of-tests.mk
+
+TESTS += $(handwritten_TESTS)
+EXTRA_DIST += $(handwritten_TESTS)
+
+# Automatically-generated tests wrapping hand-written ones.
+# Also, automatically-computed dependencies for tests.
+
+include $(srcdir)/%D%/testsuite-part.am
+
+TESTS += $(generated_TESTS)
+EXTRA_DIST += $(generated_TESTS)
+
+$(srcdir)/%D%/testsuite-part.am:
+       $(AM_V_at)rm -f %D%/testsuite-part.tmp $@
+       $(AM_V_GEN)$(PERL) $(srcdir)/gen-testsuite-part \
+         --srcdir $(srcdir) > %D%/testsuite-part.tmp
+       $(AM_V_at)chmod a-w %D%/testsuite-part.tmp
+       $(AM_V_at)mv -f %D%/testsuite-part.tmp $@
+EXTRA_DIST += gen-testsuite-part
+
+# The dependecies declared here are not truly complete, but such
+# completeness would cause more issues than it would solve.  See
+# automake bug#11347.
+$(generated_TESTS): $(srcdir)/gen-testsuite-part
+$(srcdir)/%D%/testsuite-part.am: $(srcdir)/gen-testsuite-part
+$(srcdir)/%D%/testsuite-part.am: Makefile.am
+
+# Hand-written tests for stuff in 'contrib/'.
+include $(srcdir)/contrib/%D%/Makefile.inc
+TESTS += $(contrib_TESTS)
+EXTRA_DIST += $(contrib_TESTS)
+
+# Static dependencies valid for each test case (also further
+# extended later).  Note that use 'noinst_' rather than 'check_'
+# as the prefix, because we really want them to be built by
+# "make all".  This makes it easier to run the test cases by
+# hand after having simply configured and built the package.
+
+nodist_noinst_SCRIPTS += \
+  %D%/wrap/aclocal-$(APIVERSION) \
+  %D%/wrap/automake-$(APIVERSION)
+
+dist_noinst_DATA += \
+  %D%/ax/test-init.sh \
+  %D%/ax/test-lib.sh \
+  %D%/ax/am-test-lib.sh \
+  %D%/ax/tap-functions.sh
+
+# Few more static dependencies.
+%D%/distcheck-missing-m4.log: %D%/ax/distcheck-hook-m4.am
+%D%/distcheck-outdated-m4.log: %D%/ax/distcheck-hook-m4.am
+EXTRA_DIST += %D%/ax/distcheck-hook-m4.am
+
+%D%/ax/test-defs.sh: %D%/ax/test-defs.in Makefile
+       $(AM_V_at)rm -f $@ $@-t
+       $(AM_V_at)$(MKDIR_P) %D%/ax
+       $(AM_V_GEN)in=%D%/ax/test-defs.in \
+         && $(do_subst) <$(srcdir)/$$in >$@-t
+       $(generated_file_finalize)
+EXTRA_DIST += %D%/ax/test-defs.in
+CLEANFILES += %D%/ax/test-defs.sh
+nodist_noinst_DATA += %D%/ax/test-defs.sh
+
+%D%/ax/shell-no-trail-bslash: %D%/ax/shell-no-trail-bslash.in Makefile
+       $(AM_V_at)rm -f $@ $@-t
+       $(AM_V_GEN)in=%D%/ax/shell-no-trail-bslash.in \
+         && $(MKDIR_P) %D%/ax \
+         && $(do_subst) <$(srcdir)/$$in >$@-t \
+         && chmod a+x $@-t
+       $(generated_file_finalize)
+EXTRA_DIST += %D%/ax/shell-no-trail-bslash.in
+CLEANFILES += %D%/ax/shell-no-trail-bslash
+nodist_noinst_SCRIPTS += %D%/ax/shell-no-trail-bslash
+
+%D%/ax/cc-no-c-o: %D%/ax/cc-no-c-o.in Makefile
+       $(AM_V_at)rm -f $@ $@-t
+       $(AM_V_GEN)in=%D%/ax/cc-no-c-o.in \
+         && $(MKDIR_P) %D%/ax \
+         && $(do_subst) <$(srcdir)/$$in >$@-t \
+         && chmod a+x $@-t
+       $(generated_file_finalize)
+EXTRA_DIST += %D%/ax/cc-no-c-o.in
+CLEANFILES += %D%/ax/cc-no-c-o
+nodist_noinst_SCRIPTS += %D%/ax/cc-no-c-o
+
+runtest: %D%/ax/runtest.in Makefile
+       $(AM_V_at)rm -f $@ $@-t
+       $(AM_V_GEN)in=%D%/ax/runtest.in \
+         && $(MKDIR_P) %D%/ax \
+         && $(do_subst) <$(srcdir)/$$in >$@-t \
+         && chmod a+x $@-t
+       $(generated_file_finalize)
+EXTRA_DIST += %D%/ax/runtest.in
+CLEANFILES += runtest
+nodist_noinst_SCRIPTS += runtest
+
+# If two test scripts have the same basename, they will end up sharing
+# the same log file, leading to all sort of undefined and undesired
+# behaviours.
+check-no-repeated-test-name:
+       @LC_ALL=C; export LC_ALL; \
+        lst='$(TEST_LOGS)'; for log in $$lst; do echo $$log; done \
+          | sort | uniq -c | awk '($$1 > 1) { print }' \
+          | sed 's/\.log$$//' | grep . >&2 \
+          && { \
+            echo $@: test names listed above are duplicated >&2; \
+            exit 1; \
+          }; :
+check-local: check-no-repeated-test-name
+.PHONY: check-no-repeated-test-name
+
+# Check that our test cases are syntactically correct.
+# See automake bug#11898.
+check-tests-syntax:
+       @st=0; \
+       err () { echo "$@: $$*" >&2; st=1; }; \
+## The user might do something like "make check TESTS=t/foo" or
+## "make check TESTS_LOGS=t/foo.log" and expect (say) the test
+## 't/foo.sh' to be run; this has worked well until today, and
+## we want to continue supporting this use case.
+       bases=`for log in : $(TEST_LOGS); do echo $$log; done \
+         | sed -e '/^:$$/d' -e 's/\.log$$//'`; \
+       for bas in $$bases; do \
+         for suf in sh tap pl; do \
+           tst=$$bas.$$suf; \
+## Emulate VPATH search.
+           if test -f $$tst; then \
+             break; \
+           elif test -f $(srcdir)/$$tst; then \
+             tst=$(srcdir)/$$tst; \
+             break; \
+           else \
+             tst=''; \
+           fi; \
+         done; \
+         test -n "$$tst" || err "couldn't find test '$$bas'"; \
+## Don't check that perl tests are valid shell scripts!
+         test $$suf = pl && continue; \
+         $(AM_V_P) && echo " $(AM_TEST_RUNNER_SHELL) -n $$tst"; \
+         $(AM_TEST_RUNNER_SHELL) -n "$$tst" \
+           || err "test '$$tst' syntactically invalid"; \
+       done; \
+       exit $$st
+check-local: check-tests-syntax
+.PHONY: check-tests-syntax
+
+# Recipes with a trailing backslash character (possibly followed by
+# blank characters only) can cause spurious syntax errors with at
+# least older bash versions (e.g., bash 2.05b), and can be potentially
+# be unportable to other weaker shells.  Run the testsuite in a way
+# that helps catching such problems in Automake-generated recipes.
+# See automake bug#10436.
+check-no-trailing-backslash-in-recipes:
+       $(AM_V_GEN)$(MAKE) $(AM_MAKEFLAGS) check \
+         CONFIG_SHELL='$(abs_top_builddir)/%D%/ax/shell-no-trail-bslash'
+.PHONY: check-no-trailing-backslash-in-recipes
+
+# Some compilers out there (hello, MSVC) still choke on "-c -o" being
+# passed together on the command line.  Run the whole testsuite faking
+# the presence of such a compiler, to help catch regressions that would
+# otherwise only present themselves later "in the wild".  See also the
+# long discussion about automake bug#13378.
+check-cc-no-c-o:
+       $(AM_V_GEN)$(MAKE) $(AM_MAKEFLAGS) check \
+         AM_TESTSUITE_SIMULATING_NO_CC_C_O=yes
+.PHONY: check-cc-no-c-o
+
+# Automake-generated Makefiles should work when run with parallel make.
+check-parallel:
+       $(AM_V_GEN)$(MAKE) $(AM_MAKEFLAGS) check \
+         AM_TESTSUITE_MAKE="$${AM_TESTSUITE_MAKE-$${MAKE-make}} -j4"
+.PHONY: check-parallel
+
+## Checking the list of tests.
+test_subdirs = %D% %D%/pm contrib/%D%
+include %D%/CheckListOfTests.am
+
+# Run the testsuite with the installed aclocal and automake.
+installcheck-local: installcheck-testsuite
+installcheck-testsuite:
+       $(AM_V_GEN)$(MAKE) $(AM_MAKEFLAGS) check \
+         am_running_installcheck=yes
+
+# Performance tests.
+.PHONY: perf
+perf: all
+       $(AM_V_GEN)$(MAKE) $(AM_MAKEFLAGS) check \
+         TEST_SUITE_LOG='$(PERF_TEST_SUITE_LOG)' TESTS='$(perf_TESTS)'
+PERF_TEST_SUITE_LOG = %D%/perf/test-suite.log
+CLEANFILES += $(PERF_TEST_SUITE_LOG)
+EXTRA_DIST += $(perf_TESTS)
+
+clean-local: clean-local-check
+.PHONY: clean-local-check
+clean-local-check:
+       $(AM_V_GEN)$(PERL) $(srcdir)/t/ax/deltree.pl t/*.dir t/*/*.dir */t/*.dir
+
+# vim: ft=automake noet
index 5f967d2..23dd943 100644 (file)
--- a/t/README
+++ b/t/README
@@ -70,58 +70,38 @@ About the tests
   There are two kinds of tests in the Automake testsuite (both implemented
   as shell scripts).  The scripts with the '.sh' suffix are "simple"
   tests, their outcome completely determined by their exit status.  Those
-  with the '.tap' suffix use the TAP protocol.  If you want to run a test
-  by hand, you can do so directly if it is a simple test:
+  with the '.tap' suffix use the TAP protocol.
 
-    ./t/nogzip.sh
+  If you want to run a test by hand, you should be able to do so using the
+  'runtest' script provided in the Automake distribution:
 
-  (it will be verbose by default), while if it is a TAP test you can pass
-  it to your preferred TAP runner, as in e.g.:
+      ./runtest t/nogzip.sh
+      ./runtest t/add-missing.tap
 
-    prove --verbose --merge ./t/add-missing.tap
-
-  The tests can also be run directly in a VPATH build, as with:
-
-    /path/to/srcdir/t/nogzip.sh
-    prove --verbose --merge /path/to/srcdir/t/add-missing.tap
+  This will run the test using the correct shell, and should also work in
+  VPATH builds.  Note that, to run the TAP tests this way, you'll need to
+  have the prove(1) utility available in $PATH.
 
 
 Supported shells
 ----------------
 
-  By default, the tests are run by the $SHELL detected at configure
-  time.  They also take care to re-execute themselves with that shell,
-  unless told not to.  So, to run the tests with a different shell, say
-  '/path/to/another/sh', the user must use:
-
-    AM_TESTS_REEXEC=no /path/to/another/sh ./t/foo.sh
-    AM_TESTS_REEXEC=no prove -v -e /path/to/another/sh ./t/bar.tap
-
-  to run a test directly, and:
-
-    make check LOG_COMPILER=/path/to/sh         (GNU make)
-    LOG_COMPILER=/path/to/sh make -e check      (non-GNU make)
-
-  to run the test(s) through the makefile test driver.
-
-  The test scripts are written with portability in mind, so that they
-  should run with any decent Bourne-compatible shell.
+  By default, the tests are run by a proper shell detected at configure
+  time.  Here is how you can run the tests with a different shell, say
+  '/bin/my-sh':
 
-  However, some care must be used with Zsh, since, when not directly
-  started in Bourne-compatibility mode, it has some incompatibilities
-  in the handling of $0 which conflict with our usage.  Our testsuite
-  can automatically work around these incompatibilities when a version
-  4.3 or later of Zsh is used, but unfortunately not when an older
-  version of Zsh is used.  Thus, if you want to run a test script, say
-  'foo.sh', with Zsh 4.2, you *can't* simply do "zsh foo.sh", but
-  you *must* resort to:
+    # Running through the makefile test driver.
+    make check AM_TEST_RUNNER_SHELL=/bin/my-sh         (GNU make)
+    AM_TEST_RUNNER_SHELL=/bin/my-sh make -e check      (non-GNU make)
 
-    AM_TESTS_REEXEC=no zsh -o no_function_argzero foo.sh
+    # Run a test directly from the command line.
+    AM_TEST_RUNNER_SHELL=/bin/my-sh ./runtest t/foo.sh
 
-  Note that this problem does not occur if Zsh is executed through
-  a symlink with a basename of 'sh', since in that case Zsh starts
-  in Bourne compatibility mode.  So you should be perfectly safe
-  when /bin/sh is Zsh, even a it's version < 4.3.
+  The test scripts are written with portability in mind, and should run
+  with any decent POSIX shell.  However, it is worth nothing that older
+  versions of Zsh (pre-4.3) exhibited several bugs and incompatibilities
+  with our uses, and are thus not supported for running Automake's test
+  scripts.
 
 
 Reporting failures
@@ -137,54 +117,54 @@ Reporting failures
 Writing test cases
 ==================
 
-
-Do
---
-
-  If you plan to fix a bug, write the test case first.  This way you'll
+* If you plan to fix a bug, write the test case first.  This way you'll
   make sure the test catches the bug, and that it succeeds once you have
   fixed the bug.
 
-  Add a copyright/license paragraph.
+* Add a copyright/license paragraph.
 
-  Explain what the test does.
+* Explain what the test does, i.e., which features it checks, which
+  invariants it verifies, or what bugs/issues it guard against.
 
-  Cite the PR number (if any), and the original reporter (if any), so
+* Cite the PR number (if any), and the original reporter (if any), so
   we can find or ask for information if needed.
 
-  If a test checks examples or idioms given in the documentation, make
-  sure the documentation reference them appropriately in comments, as in:
+* If a test checks examples or idioms given in the documentation, make
+  sure the documentation reference them appropriately in comments, as
+  with:
+
     @c Keep in sync with autodist-config-headers.sh
     @example
     ...
     @end example
 
-  Use "required=..." for required tools.  Do not explicitly require
+* Use "required=..." for required tools.  Do not explicitly require
   tools which can be taken for granted because they're listed in the
   GNU Coding Standards (for example, 'gzip').
 
-  Include ./defs in every test script (see existing tests for examples
-  of how to do this).
+* Include 'test-init.sh' in every test script (see existing tests for
+  examples of how to do this).
 
-  Use the 'skip_' function to skip tests, with a meaningful message if
+* Use the 'skip_' function to skip tests, with a meaningful message if
   possible.  Where convenient, use the 'warn_' function to print generic
   warnings, the 'fail_' function for test failures, and the 'fatal_'
   function for hard errors.  In case a hard error is due to a failed
   set-up of a test scenario, you can use the 'framework_fail_' function
   instead.
 
-  For those tests checking the Automake-provided test harnesses that are
-  expected to work also when the 'serial-tests' Automake option is used
-  (thus causing the serial testsuite harness to be used in the generated
-  Makefile), place a line containing "try-with-serial-tests" somewhere
-  in the file.  That will ensure that the 'gen-testsuite-part' script
-  generates a sibling of that test which uses the serial harness instead
-  of the parallel one.  For those tests that are *not* meant to work with
-  the parallel testsuite harness at all (these should be very very few),
+* For those tests checking the Automake-provided test harnesses that
+  are expected to work also when the 'serial-tests' Automake option
+  is used (thus causing the serial testsuite harness to be used in the
+  generated Makefile), place a line containing "try-with-serial-tests"
+  somewhere in the file (usually in a comment).
+  That will ensure that the 'gen-testsuite-part' script generates a
+  sibling of that test which uses the serial harness instead of the
+  parallel one.  For those tests that are *not* meant to work with the
+  parallel testsuite harness at all (these should be very very few),
   set the shell variable 'am_serial_tests' to "yes" before including
-  ./defs.
+  test-init.sh.
 
-  Some tests in the Automake testsuite are auto-generated; those tests
+* Some tests in the Automake testsuite are auto-generated; those tests
   might have custom extensions, but their basename (that is, with such
   extension stripped) is expected to end with "-w" string, optionally
   followed by decimal digits.  For example, the name of a valid
@@ -193,102 +173,131 @@ Do
   to be confused with auto-generated tests; for example, 'u-v-w.sh'
   or 'option-w0.tap' are *not* valid name for hand-written tests.
 
-  ./defs brings in some commonly required files, and sets a skeleton
-  configure.ac.  If possible, append to this file.  In some cases
-  you'll have to overwrite it, but this should be the exception.  Note
-  that configure.ac registers Makefile.in but do not output anything by
+* test-init.sh brings in some commonly required files, and sets a skeleton
+  configure.ac.  If possible, append to this file.  In some cases you'll
+  have to overwrite it, but this should be the exception.  Note that
+  configure.ac registers Makefile.in but do not output anything by
   default.  If you need ./configure to create Makefile, append AC_OUTPUT
-  to configure.ac.  In case you don't want ./defs to pre-populate your
-  test directory (which is a rare occurrence), set the 'am_create_testdir'
-  shell variable to "empty" before sourcing ./defs.
+  to configure.ac.  In case you don't want your test directory to be
+  pre-populate by test-init.sh (this should be a rare occurrence), set
+  the 'am_create_testdir' shell variable to "empty" before sourcing
+  test-init.sh.
 
-  By default, the testcases are run with the errexit shell flag on,
+* By default, the testcases are run with the errexit shell flag on,
   to make it easier to catch failures you might not have thought of.
   If  this is undesirable in some testcase, you can use "set +e" to
   disable the errexit flag (but please do so only if you have a very
   good reason).
 
-  End the test script with a ":" or "Exit 0".  Otherwise, when somebody
+* End the test script with a ':' command.  Otherwise, when somebody
   changes the test by adding a failing command after the last command,
-  the test will spuriously fail because $? is nonzero at the end.  Note
-  that this is relevant even if the errexit shell flag is on, in case
-  the test contains commands like "grep ... Makefile.in && Exit 1" (and
-  there are indeed a lot of such tests).
+  the test will spuriously fail because '$?' is nonzero at the end.
+  Note that this is relevant even if the errexit shell flag is on, in
+  case the test contains commands like "grep ... Makefile.in && exit 1"
+  (and there are indeed a lot of such tests).
 
-  Use $ACLOCAL, $AUTOMAKE, $AUTOCONF, $AUTOUPDATE, $AUTOHEADER,
+* Use $ACLOCAL, $AUTOMAKE, $AUTOCONF, $AUTOUPDATE, $AUTOHEADER,
   $PERL, $MAKE, $EGREP, and $FGREP, instead of the corresponding
   commands.
 
-  Use $sleep when you have to make sure that some file is newer
+* When you want to redirect the output from a make invocation, use the
+  'run_make' function rather than calling $MAKE directly.  Not only is
+  this more idiomatic, but it also avoid possible spurious racy failures
+  when the make invocations in the testsuite are run in parallel mode
+  (as with "make check AM_TESTSUITE_MAKE='make -j4"').
+
+* Do not override Makefile variables using make arguments, as in e.g.:
+
+    $MAKE prefix=/opt install           # BAD
+
+  This is not portable for recursive targets (with non-GNU make,
+  targets that call a sub-make may not pass "prefix=/opt" along).
+  Instead, use the 'run_make' function, which automatically uses
+  the AM_MAKEFLAGS to propagate the variable definitions along to
+  sub-make:
+
+    run_make prefix=/opt install        # GOOD
+
+* Use '$sleep' when you have to make sure that some file is newer
   than another.
 
-  Use cat or grep or similar commands to display (part of) files that
+* Use cat or grep or similar commands to display (part of) files that
   may be interesting for debugging, so that when a user send a verbose
   output we don't have to ask him for more details.  Display stderr
   output on the stderr file descriptor.  If some redirected command is
   likely to fail, display its output even in the failure case, before
   exiting.
 
-  Use 'Exit' rather than 'exit' to abort for leave early from a test
-  case.
-
-  Use '$PATH_SEPARATOR', not hard-coded ':', as the separator of
+* Use '$PATH_SEPARATOR', not hard-coded ':', as the separator of
   PATH's entries.
 
-  It's more important to make sure that a feature works, than make
+* It's more important to make sure that a feature works, than make
   sure that Automake's output looks correct.  It might look correct
   and still fail to work.  In other words, prefer running 'make' over
   grepping Makefile.in (or do both).
 
-  If you run $ACLOCAL, $AUTOMAKE or $AUTOCONF several times in the
+* If you run $ACLOCAL, $AUTOMAKE or $AUTOCONF several times in the
   same test and change configure.ac by the meantime, do
+
     rm -rf autom4te*.cache
+
   before the following runs.  On fast machines the new configure.ac
   could otherwise have the same timestamp as the old autom4te.cache.
 
-  Use filenames with two consecutive spaces when testing that some
+* Use filenames with two consecutive spaces when testing that some
   code preserves filenames with spaces.  This will catch errors like
   `echo $filename | ...`.
 
-  Make sure your test script can be used to faithfully check an
+* Make sure your test script can be used to faithfully check an
   installed version of automake (as with "make installcheck").  For
   example, if you need to copy or grep an automake-provided script,
   do not assume that they can be found in the '$top_srcdir/lib'
   directory, but use '$am_scriptdir' instead.  The complete list of
-  such "$am_...dir" variables can be found in the 'defs-static.in'
+  such "$am_...dir" variables can be found in the 't/ax/test-defs.in'
   file.
 
-  When writing input for lex, include the following in the definitions
+* When writing input for lex, include the following in the definitions
   section:
+
     %{
     #define YY_NO_UNISTD_H 1
     %}
+
   to accommodate non-ANSI systems, since GNU flex generates code that
   includes unistd.h otherwise.  Also add:
+
     int isatty (int fd) { return 0; }
+
   to the definitions section if the generated code is to be compiled
   by a C++ compiler, for similar reasons (i.e., the isatty(3) function
   from that same unistd.h header would be required otherwise).
 
-  Before commit: make sure the test is executable, add the tests to
-  TESTS in Makefile.am, add it to XFAIL_TESTS in addition if needed,
-  write a ChangeLog entry, send the diff to <automake-patches@gnu.org>.
+* Add any new test to handwritten_TESTS in 't/list-of-tests.mk', and
+  to XFAIL_TESTS in addition if needed (that is, if the test is expected
+  to fail).
 
+* In test scripts, prefer using POSIX constructs over their old
+  Bourne-only equivalents:
 
-Do not
-------
+    - use $(...), not `...`, for command substitution;
+    - use $((...)), not `expr ...`, for arithmetic processing;
+    - liberally use '!' to invert the exit status of a command, e.g.,
+      in idioms like "if ! CMD; then ...", instead of relying on clumsy
+      paraphrases like "if CMD; then :; else ...".
+    - prefer use of ${param%pattern} and ${param#pattern} parameter
+      expansions over processing by 'sed' or 'expr'.
 
-  Do not test an Automake error with "$AUTOMAKE && Exit 1", or in three
+* Note however that, when writing Makefile recipes or shell code in a
+  configure.ac, you should still use `...` instead, because the Autoconf
+  generated configure scripts do not ensure they will find a truly POSIX
+  shell (even though they will prefer and use it *if* it's found).
+
+* Do not test an Automake error with "$AUTOMAKE && exit 1", or in three
   years we'll discover that this test failed for some other bogus reason.
   This happened many times.  Better use something like
+
      AUTOMAKE_fails
      grep 'expected diagnostic' stderr
-  (Note this doesn't prevent the test from failing for another reason,
-  but at least it makes sure the original error is still here).
-
-  Do not override Makefile variables using make arguments, as in e.g.:
-    $MAKE prefix=/opt install
-  This is not portable for recursive targets (targets that call a
-  sub-make may not pass "prefix=/opt" along).  Use the following
-  instead:
-    prefix=/opt $MAKE -e install
+
+  Note this doesn't prevent the test from failing for another reason,
+  but at least it makes sure the original error is still here.
old mode 100755 (executable)
new mode 100644 (file)
index 5ba3d3e..d5e17ab
@@ -1,5 +1,5 @@
 #!/bin/sh
-# Copyright (C) 1996-2012 Free Software Foundation, Inc.
+# Copyright (C) 1996-2017 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
 # line breaking in the use of AC_OUTPUT.  Synthesised by a bunch
 # of older tests (referenced below).
 
-. ./defs || Exit 1
+. test-init.sh
 
 plan_ 22
 
 rm -f configure.ac depcomp # Not required.
 
-AUTOMAKE="$AUTOMAKE -Wno-obsolete"
-
 # -----------------------------------------------------------------------
 
 # Test for bug reported by François Pinard.
@@ -54,18 +52,15 @@ acoutbs_check ()
 }
 
 acoutbs_check 1 << 'END'
-AC_INIT
-AM_INIT_AUTOMAKE(nonesuch, nonesuch)
+AC_INIT([acoutbs1], [1.0])
+AM_INIT_AUTOMAKE
 AC_OUTPUT(Makefile \
 zot)
 END
 
 acoutbs_check 2 << 'END'
-AC_INIT
-AM_INIT_AUTOMAKE(nonesuch, nonesuch)
-AC_ARG_PROGRAM
-AC_PROG_INSTALL
-AC_PROG_MAKE_SET
+AC_INIT([acoutbs2], [1.0])
+AM_INIT_AUTOMAKE
 AC_OUTPUT(\
    Makefile \
    zot
@@ -85,8 +80,8 @@ mkdir acoutnoq
 cd acoutnoq
 
 cat > configure.ac << 'END'
-AC_INIT
-AM_INIT_AUTOMAKE(nonesuch, nonesuch)
+AC_INIT([acoutnoq], [1.0])
+AM_INIT_AUTOMAKE
 AC_OUTPUT(Makefile, [true])
 END
 
@@ -107,8 +102,8 @@ mkdir acoutpt
 cd acoutpt
 
 cat > configure.ac << 'END'
-AC_INIT
-AM_INIT_AUTOMAKE(nonesuch, nonesuch)
+AC_INIT([acoutpt], [1.0])
+AM_INIT_AUTOMAKE
 AC_OUTPUT([Makefile], [true])
 END
 
@@ -146,7 +141,7 @@ mkdir subdir
 command_ok_ "aclocal and AC_OUTPUT ($cur)" $ACLOCAL
 command_ok_ "automake and AC_OUTPUT ($cur)" $AUTOMAKE
 command_ok_ "foo.in mentioned two times in Makefile.in ($cur)" \
-             test `$FGREP foo.in Makefile.in | wc -l` -eq 2
+             test $($FGREP -c 'foo.in' Makefile.in) -eq 2
 
 # This ought to work as well.
 command_ok_ "'automake -a -f' and AC_OUTPUT ($cur)" \
@@ -163,8 +158,8 @@ mkdir acoutqnl
 cd acoutqnl
 
 cat > configure.ac << 'END'
-AC_INIT
-AM_INIT_AUTOMAKE(nonesuch, nonesuch)
+AC_INIT([acoutqnl], [1.0])
+AM_INIT_AUTOMAKE
 AC_OUTPUT([Makefile],
 [echo zardoz has spoken])
 END
@@ -179,4 +174,4 @@ cd ..
 # -----------------------------------------------------------------------
 
 # And we're done.
-Exit 0
+exit 0
old mode 100755 (executable)
new mode 100644 (file)
similarity index 82%
rename from t/acloca10.sh
rename to t/aclocal-I-and-install.sh
index 05db9b9..d906de7
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2003-2012 Free Software Foundation, Inc.
+# Copyright (C) 2003-2017 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
@@ -15,8 +15,8 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 # Make sure aclocal define macros in the same order as -I's.
-# This is the same as aclocal9.test, with the macro calls reversed.
-# (It did make a difference.)
+# This is the similar to aclocal-I-order-1.sh, with the macro calls
+# reversed (it did make a difference).
 #
 # Also check for --install.
 
 # TODO: puts third-party macros directly into 'acdir'.
 
 am_create_testdir=empty
-. ./defs || Exit 1
+. test-init.sh
 
 cat > configure.ac << 'END'
 AC_INIT
-MACRO1
 MACRO2
+MACRO1
 MACRO3
 END
 
@@ -57,8 +57,8 @@ $FGREP ':macro11:' configure
 $FGREP ':macro21:' configure
 $FGREP ':macro33:' configure
 grep MACRO3 aclocal.m4
-test ! -f m4_1/macro.m4
-test ! -f m4_2/macro.m4
+test ! -e m4_1/macro.m4
+test ! -e m4_2/macro.m4
 
 $sleep
 
@@ -68,8 +68,8 @@ $FGREP ':macro12:' configure
 $FGREP ':macro21:' configure
 $FGREP ':macro33:' configure
 grep MACRO3 aclocal.m4
-test ! -f m4_1/macro.m4
-test ! -f m4_2/macro.m4
+test ! -e m4_1/macro.m4
+test ! -e m4_2/macro.m4
 
 $sleep
 
@@ -78,9 +78,9 @@ $AUTOCONF
 $FGREP ':macro11:' configure
 $FGREP ':macro21:' configure
 $FGREP ':macro33:' configure
-grep MACRO3 aclocal.m4 && Exit 1
+grep MACRO3 aclocal.m4 && exit 1
 test -f m4_1/macro.m4
-test ! -f m4_2/macro.m4
+test ! -e m4_2/macro.m4
 cp aclocal.m4 copy.m4
 
 $sleep
@@ -91,10 +91,10 @@ $AUTOCONF
 $FGREP ':macro11:' configure
 $FGREP ':macro21:' configure
 $FGREP ':macro33:' configure
-grep MACRO3 aclocal.m4 && Exit 1
-grep GREPME m4_1/macro.m4 && Exit 1
+grep MACRO3 aclocal.m4 && exit 1
+grep GREPME m4_1/macro.m4 && exit 1
 test -f m4_1/macro.m4
-test ! -f m4_2/macro.m4
+test ! -e m4_2/macro.m4
 diff aclocal.m4 copy.m4
 
 :
old mode 100755 (executable)
new mode 100644 (file)
similarity index 93%
rename from t/aclocal9.sh
rename to t/aclocal-I-order-1.sh
index c7ce751..46263cc
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2003-2012 Free Software Foundation, Inc.
+# Copyright (C) 2003-2017 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
@@ -17,7 +17,7 @@
 # Make sure aclocal define macros in the same order as -I's.
 
 am_create_testdir=empty
-. ./defs || Exit 1
+. test-init.sh
 
 cat > configure.ac << 'END'
 AC_INIT
old mode 100755 (executable)
new mode 100644 (file)
similarity index 90%
rename from t/acloca11.sh
rename to t/aclocal-I-order-2.sh
index 7a1cff6..b6790e4
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2003-2012 Free Software Foundation, Inc.
+# Copyright (C) 2003-2017 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
 
 # Make sure that when two files define the same macro in the same
 # directory, the macro from the lexically greatest file is used.
+# See also sister test 'aclocal-I-order-3.sh'.
 
 am_create_testdir=empty
-. ./defs || Exit 1
+. test-init.sh
 
 cat > configure.ac << 'END'
 AC_INIT
old mode 100755 (executable)
new mode 100644 (file)
similarity index 83%
rename from t/acloca12.sh
rename to t/aclocal-I-order-3.sh
index 958238e..a5d0d8f
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2003-2012 Free Software Foundation, Inc.
+# Copyright (C) 2003-2017 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
 
 # Make sure that when two files define the same macro in the same
 # directory, the macro from the lexically greatest file is used.
-# Same as acloca11.test, but without calling MACRO2.
+# Same as aclocal-I-order-2.sh, but without calling MACRO2.
 
 am_create_testdir=empty
-. ./defs || Exit 1
+. test-init.sh
 
 cat > configure.ac <<END
 AC_INIT([$me], [1.0])
@@ -39,8 +39,8 @@ EOF
 
 $ACLOCAL --verbose -I m4
 $AUTOCONF
-$FGREP ':macro11:' configure && Exit 1
-$FGREP ':macro21:' configure && Exit 1
+$FGREP ':macro11:' configure && exit 1
+$FGREP ':macro21:' configure && exit 1
 $FGREP ':macro12:' configure
 
 :
old mode 100755 (executable)
new mode 100644 (file)
index 88caef6..6e0251c
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2011-2012 Free Software Foundation, Inc.
+# Copyright (C) 2011-2017 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 aclocal's '--acdir', '--automake-acdir' and '--system-acdir'
-# options.  Also check that stuff in the automake acdir takes precedence
-# over stuff in the system acdir.
+# Test aclocal's '--automake-acdir' and '--system-acdir' options.  Also
+# check that stuff in the automake acdir takes precedence over stuff in
+# the system acdir.
 
-. ./defs || Exit 1
+. test-init.sh
 
 mkdir am sys
+# FIXME: remove in Automake 2.0
+mkdir am/internal
+: > am/internal/ac-config-macro-dirs.m4
 
 cat >> configure.ac <<'END'
 MY_MACRO
@@ -70,26 +73,6 @@ $ACLOCAL --automake-acdir am --system-acdir sys
 $AUTOCONF --force
 $FGREP 'fake--init--automake' configure
 $FGREP 'am--macro' configure
-$FGREP 'my--macro' configure && Exit 1 # Just to be sure.
-
-rm -rf autom4te*.cache
-
-# Obsolescent '--acdir' option.
-$ACLOCAL -Wobsolete --acdir am 2>stderr && { cat stderr >&2; Exit 1; }
-cat stderr >&2
-grep '.*--acdir.*deprecated' stderr
-
-rm -rf autom4te*.cache
-
-$ACLOCAL -Wno-obsolete --acdir am
-$AUTOCONF --force
-$FGREP 'fake--init--automake' configure
-$FGREP 'am--macro' configure
-
-rm -rf autom4te*.cache
-
-$ACLOCAL -Wno-obsolete --acdir sys 2>stderr && { cat stderr >&2; Exit 1; }
-cat stderr >&2
-grep 'macro .*AM_INIT_AUTOMAKE.* not found' stderr
+$FGREP 'my--macro' configure && exit 1 # Just to be sure.
 
 :
diff --git a/t/aclocal-amflags.sh b/t/aclocal-amflags.sh
new file mode 100644 (file)
index 0000000..09e3458
--- /dev/null
@@ -0,0 +1,68 @@
+#! /bin/sh
+# Copyright (C) 2012-2017 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 obsolescent idiom of setting $(ACLOCAL_AMFLAGS) in
+# Makefile.am still works.  Remove this test once support for this
+# obsolescent idiom is removed.
+
+. test-init.sh
+
+cat >> configure.ac <<'END'
+MACRO_FOO || AS_EXIT([1])
+AC_OUTPUT
+END
+
+mkdir m4_1 m4_2
+cat > m4_1/foo.m4 <<'END'
+AC_DEFUN([MACRO_FOO], [: > foo])
+END
+cat > m4_2/bar.m4 <<'END'
+AC_DEFUN([MACRO_BAR], [: > bar])
+END
+
+cat > Makefile.am <<'END'
+ACLOCAL_AMFLAGS = -I m4_2 --verbose
+check-local:
+       test ! -r foo
+       test -f bar
+DISTCLEANFILES = bar
+END
+
+$ACLOCAL -I m4_1 >output 2>&1 || { cat output; exit 1; }
+cat output
+grep 'found macro' output && exit 1 # Sanity check.
+$AUTOCONF
+$AUTOMAKE
+
+./configure
+test -f foo
+rm -f foo
+
+# ACLOCAL_AMFLAGS is used in rebuild rules, so trigger them.
+$sleep
+
+sed 's/MACRO_FOO/MACRO_BAR/' configure.ac > t
+mv -f t configure.ac
+
+run_make -M Makefile
+grep "^aclocal.*:.*found macro.*MACRO_BAR.*m4_2/bar\.m4" output
+grep "macro.*MACRO_FOO" output && exit 1
+test ! -r foo
+test -f bar
+
+$MAKE distcheck
+
+:
old mode 100755 (executable)
new mode 100644 (file)
similarity index 87%
rename from t/missing6.sh
rename to t/aclocal-autoconf-version-check.sh
index 8173f81..0709de0
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2008-2012 Free Software Foundation, Inc.
+# Copyright (C) 2008-2017 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
@@ -17,7 +17,7 @@
 # Make sure autoconf version checks in aclocal.m4 are robust.
 
 am_create_testdirs=empty
-. ./defs || Exit 1
+. test-init.sh
 
 cat > configure.ac <<END
 m4_define([AC_AUTOCONF_VERSION], [9999a])
@@ -31,7 +31,7 @@ END
 : > Makefile.am
 
 $ACLOCAL
-$AUTOCONF 2>stderr || { cat stderr >&2; Exit 1; }
+$AUTOCONF 2>stderr || { cat stderr >&2; exit 1; }
 cat stderr >&2
 grep 'You have another version of autoconf' stderr
 grep 'aclocal.m4:.*this file was generated for' stderr
@@ -43,8 +43,7 @@ sed 's/^dnl!! //' < configure.ac > configure.tmp
 cmp configure.ac configure.tmp && fatal_ 'failed to edit configure.ac'
 mv -f configure.tmp configure.ac
 
-$MAKE 2>stderr || { cat stderr >&2; Exit 1; }
-cat stderr >&2
+run_make -E
 grep 'You have another version of autoconf' stderr
 grep 'aclocal.m4:.*this file was generated for autoconf 9999a' stderr
 
old mode 100755 (executable)
new mode 100644 (file)
similarity index 93%
rename from t/acloca21.sh
rename to t/aclocal-comments-respected.sh
index d9b47af..41c12a9
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2006-2012 Free Software Foundation, Inc.
+# Copyright (C) 2006-2017 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
@@ -20,7 +20,7 @@
 # an Autoconf macro.
 
 am_create_testdir=empty
-. ./defs || Exit 1
+. test-init.sh
 
 cat >>configure.ac <<EOF
 dnl m4_include(__some_really_bogus_nonexistent_file__.m4)
old mode 100755 (executable)
new mode 100644 (file)
similarity index 51%
rename from t/ccnoco2.sh
rename to t/aclocal-deleted-header-aclocal-amflags.sh
index e6c9c64..5bdfbcf
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2006-2012 Free Software Foundation, Inc.
+# Copyright (C) 2007-2017 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 Automake requires AM_PROG_CC_C_O when either per-targets
-# flags or subdir-objects are used.
+# Make sure the "deleted header file" issue is fixed wrt. aclocal.m4
+# dependencies.
+# NOTE: this test works by using the obsolete 'ACLOCAL_AMFLAGS' make
+# variable; see sister test 'aclocal-deleted-header.sh' for a modern
+# equivalent.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat >>configure.ac <<EOF
-AC_PROG_CC
+FOO
 AC_OUTPUT
 EOF
 
-cat >Makefile.am <<EOF
-bin_PROGRAMS = wish
-wish_SOURCES = a.c
-wish_CPPFLAGS = -DWHATEVER
+cat >foo.m4 <<EOF
+AC_DEFUN([FOO], [AC_SUBST([GREPFOO])])
 EOF
 
-touch a.c
-
-$ACLOCAL
-$AUTOCONF
-AUTOMAKE_fails --copy --add-missing
-grep '^Makefile\.am:2:.*per-target.*AM_PROG_CC_C_O' stderr
-
+cat >bar.m4 <<EOF
+AC_DEFUN([BAR], [AC_SUBST([GREPBAR])])
+EOF
 
 cat >Makefile.am <<EOF
-bin_PROGRAMS = wish
-wish_SOURCES = sub/a.c
+ACLOCAL_AMFLAGS = -I .
 EOF
 
-mkdir sub
-mv a.c sub
+$ACLOCAL -I .
+$AUTOMAKE
+$AUTOCONF
+
+./configure
+
+$MAKE
+grep GREPFOO Makefile
+grep GREPBAR Makefile && exit 1
 
-$AUTOMAKE --copy --add-missing
+sed 's/FOO/BAR/' < configure.ac > t
+mv -f t configure.ac
+rm -f foo.m4
 
-echo 'AUTOMAKE_OPTIONS = subdir-objects' >> Makefile.am
-AUTOMAKE_fails --copy --add-missing
-grep '^Makefile\.am:2:.*subdir.*AM_PROG_CC_C_O' stderr
+$MAKE
+grep GREPFOO Makefile && exit 1
+grep GREPBAR Makefile
 
 :
old mode 100755 (executable)
new mode 100644 (file)
similarity index 80%
rename from t/acloca22.sh
rename to t/aclocal-deleted-header.sh
index 85ef29b..918f929
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2007-2012 Free Software Foundation, Inc.
+# Copyright (C) 2007-2017 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 # Make sure the "deleted header file" issue is fixed w.r.t. aclocal.m4
-# dependencies.  See also related the tests 'remake-deleted-m4-file.test'
-# and 'remake-renamed-m4-macro-and-file.test'.
+# dependencies.  See also related the tests 'remake-deleted-m4-file.sh'
+# and 'remake-renamed-m4-macro-and-file.sh'.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat >>configure.ac <<EOF
+AC_CONFIG_MACRO_DIR([.])
 FOO
 AC_OUTPUT
 EOF
+
 cat >foo.m4 <<EOF
 AC_DEFUN([FOO], [AC_SUBST([GREPFOO])])
 EOF
+
 cat >bar.m4 <<EOF
 AC_DEFUN([BAR], [AC_SUBST([GREPBAR])])
 EOF
-cat >Makefile.am <<EOF
-ACLOCAL_AMFLAGS = -I .
-EOF
 
-$ACLOCAL -I .
+: >Makefile.am
+
+$ACLOCAL
 $AUTOMAKE
 $AUTOCONF
 
 ./configure
+
 $MAKE
 grep GREPFOO Makefile
-grep GREPBAR Makefile && Exit 1
+grep GREPBAR Makefile && exit 1
 
 sed 's/FOO/BAR/' < configure.ac > t
 mv -f t configure.ac
 rm -f foo.m4
+
 $MAKE
-grep GREPFOO Makefile && Exit 1
+grep GREPFOO Makefile && exit 1
 grep GREPBAR Makefile
 
 :
old mode 100755 (executable)
new mode 100644 (file)
similarity index 74%
rename from t/aclocal5.sh
rename to t/aclocal-deps-subdir.sh
index 23a7e5e..ec53bf9
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2003-2012 Free Software Foundation, Inc.
+# Copyright (C) 2003-2017 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 # Test to make sure that aclocal.m4's dependencies are honored in
-# sub-directories.  See also related tests 'remake-subdir*.test'.
+# sub-directories.  See also related tests 'remake-subdir*.sh'.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
-AM_TEST([GREPME])
+AC_CONFIG_MACRO_DIR([m4])
+FOO_TEST([GREPME])
 AC_CONFIG_FILES([sub/Makefile])
 AC_OUTPUT
 END
 
 cat > Makefile.am << 'END'
 SUBDIRS = sub
-ACLOCAL_AMFLAGS = -I m4
 END
 
 mkdir sub
 : > sub/Makefile.am
 
 mkdir m4
-echo 'AC_DEFUN([AM_TEST], [echo $@])' > m4/moredefs.m4
+echo 'AC_DEFUN([FOO_TEST], [echo $@])' > m4/moredefs.m4
 
-$ACLOCAL -I m4
+$ACLOCAL
 $AUTOCONF
 $AUTOMAKE --copy --add-missing
 ./configure
@@ -44,10 +44,10 @@ $MAKE
 
 # Update an aclocal.m4 dependency, then make sure all Makefiles are
 # updated, even from a sub-directory.  Check that AU_ALIAS is
-# recognized. Change the definition of AM_TEST to check that its new
+# recognized. Change the definition of FOO_TEST to check that its new
 # definition is used.
 $sleep # Modified configure dependencies must be newer than config.status.
-echo 'AU_ALIAS([AM_TEST], [AC_SUBST])' > m4/moredefs.m4
+echo 'AU_ALIAS([FOO_TEST], [AC_SUBST])' > m4/moredefs.m4
 cd sub
 $MAKE
 cd ..
@@ -58,10 +58,10 @@ grep GREPME sub/Makefile
 $MAKE distdir
 test -f $me-1.0/m4/moredefs.m4
 
-# Change the definition of AM_TEST to check that its new definition is
+# Change the definition of FOO_TEST to check that its new definition is
 # used.  Check that AC_DEFUN_ONCE is caught.
 $sleep # Modified configure dependencies must be newer than config.status.
-echo 'AC_DEFUN_ONCE([AM_TEST], [AC_SUBST(__$1__)])' > m4/moredefs.m4
+echo 'AC_DEFUN_ONCE([FOO_TEST], [AC_SUBST(__$1__)])' > m4/moredefs.m4
 $MAKE
 grep 'm4/moredefs\.m4' aclocal.m4
 grep '__GREPME__' configure
old mode 100755 (executable)
new mode 100644 (file)
similarity index 93%
rename from t/aclocal4.sh
rename to t/aclocal-deps.sh
index bc80f64..edb5bee
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2003-2012 Free Software Foundation, Inc.
+# Copyright (C) 2003-2017 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
 # Report from Jim Meyering.
 
 required=cc
-. ./defs || Exit 1
+. test-init.sh
 
 cat >>configure.ac <<EOF
+AC_CONFIG_MACRO_DIR([m4])
 AC_PROG_RANLIB
 AM_PROG_AR
 AC_PROG_CC
@@ -46,7 +47,6 @@ EOF
 cat >Makefile.am <<'EOF'
 SUBDIRS = lib
 EXTRA_DIST = m4/mymacro.m4
-ACLOCAL_AMFLAGS = -I m4
 check-foo: distdir
        test -f $(distdir)/lib/foo.c
        test -f $(distdir)/lib/bar.c
@@ -56,7 +56,7 @@ check-not-foo: distdir
        test -f $(distdir)/lib/bar.c
 EOF
 
-$ACLOCAL -I m4
+$ACLOCAL
 $AUTOCONF
 $AUTOMAKE --add-missing
 ./configure
old mode 100755 (executable)
new mode 100644 (file)
similarity index 86%
rename from t/dirlist-abspath.sh
rename to t/aclocal-dirlist-abspath.sh
index 78af8b1..9e1f041
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2002-2012 Free Software Foundation, Inc.
+# Copyright (C) 2002-2017 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
 # Check use of absolute paths in dirlist.
 
 am_create_testdir=empty
-. ./defs || Exit 1
+. test-init.sh
 
 mkdir acdir-more sub sub/acdir
-echo "`pwd`/acdir-more" > sub/acdir/dirlist
+echo "$(pwd)/acdir-more" > sub/acdir/dirlist
 
 echo 'AC_DEFUN([AM_FOO], [foo-foo--foo])' > acdir-more/foo.m4
 
@@ -35,7 +35,7 @@ $ACLOCAL --system-acdir acdir
 $AUTOCONF
 
 # Only -I directories are subject to file inclusion.
-grep m4_include aclocal.m4 && Exit 1
+grep m4_include aclocal.m4 && exit 1
 
 grep 'foo-foo--foo' configure
 
old mode 100755 (executable)
new mode 100644 (file)
similarity index 82%
rename from t/dirlist2.sh
rename to t/aclocal-dirlist-globbing.sh
index f3b9c4d..0451efc
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2002-2012 Free Software Foundation, Inc.
+# Copyright (C) 2002-2017 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
 
 # Check dirlist globbing support.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat > configure.ac <<EOF
-AC_INIT
+AC_INIT([$me], [1.0])
 AM_INIT_GUILE_MODULE
 AM_FOO_BAR
 EOF
@@ -27,12 +27,7 @@ EOF
 mkdir dirlist21-test dirlist22-test
 
 cat >dirlist21-test/dirlist21-check.m4 <<'END'
-AC_DEFUN([AM_INIT_GUILE_MODULE],[
-. $srcdir/../GUILE-VERSION
-AM_INIT_AUTOMAKE($PACKAGE, $VERSION)
-AC_CONFIG_AUX_DIR(..)
-module=[$1]
-AC_SUBST(module)])
+AC_DEFUN([AM_INIT_GUILE_MODULE],[. $srcdir/../GUILE-VERSION])
 END
 
 cat >dirlist22-test/dirlist22-check.m4 <<'END'
@@ -52,7 +47,7 @@ $AUTOCONF
 # There should be no m4_include in aclocal.m4, even though m4/dirlist
 # contains './dirlist-test' as a relative directory.  Only -I directories
 # are subject to file inclusion.
-grep m4_include aclocal.m4 && Exit 1
+grep m4_include aclocal.m4 && exit 1
 
 grep 'GUILE-VERSION' configure
 grep 'foo bar baz' configure
old mode 100755 (executable)
new mode 100644 (file)
similarity index 79%
rename from t/dirlist.sh
rename to t/aclocal-dirlist.sh
index 76daa35..79563e8
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2002-2012 Free Software Foundation, Inc.
+# Copyright (C) 2002-2017 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
 
 # Check dirlist support.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat > configure.ac <<EOF
-AC_INIT
+AC_INIT([$me], [1.0])
 AM_INIT_GUILE_MODULE
 EOF
 
@@ -29,7 +29,7 @@ echo ./dirlist-test > acdir/dirlist
 cat >dirlist-test/dirlist-check.m4 <<'END'
 AC_DEFUN([AM_INIT_GUILE_MODULE],[
 . $srcdir/../GUILE-VERSION
-AM_INIT_AUTOMAKE($PACKAGE, $VERSION)
+AM_INIT_AUTOMAKE(foreign)
 AC_CONFIG_AUX_DIR(..)
 module=[$1]
 AC_SUBST(module)])
@@ -45,13 +45,12 @@ $AUTOCONF
 # There should be no m4_include in aclocal.m4, even though m4/dirlist
 # contains './dirlist-test' as a relative directory.  Only -I directories
 # are subject to file inclusion.
-grep m4_include aclocal.m4 && Exit 1
+grep m4_include aclocal.m4 && exit 1
 
 grep 'GUILE-VERSION' configure
 
 # This bug can occur only when we do a VPATH build of Automake
-# (because of the '-I' passed to aclocal in tests/defs/aclocal.in) but
-# it's OK because VPATH builds are done by 'make distcheck'.
-grep 'I should not be included' configure && Exit 1
+# but it's OK because VPATH builds are done by 'make distcheck'.
+grep 'I should not be included' configure && exit 1
 
 :
old mode 100755 (executable)
new mode 100644 (file)
index b07f7fa..973d742
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2011-2012 Free Software Foundation, Inc.
+# Copyright (C) 2011-2017 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
 # ACLOCAL_PATH variable, it is clear that this is the right thing
 # to do.  See also automake bug#8407.
 
-. ./defs || Exit 1
+. test-init.sh
 
 mkdir loc sys
 
 echo 'AM_DUMMY_MACRO' >> configure.ac
 echo 'AC_DEFUN([AM_DUMMY_MACRO], [:])' >> sys/foo.m4
 
-cwd=`pwd` || fatal_ "cannot get current working directory"
+cwd=$(pwd) || fatal_ "cannot get current working directory"
 env ACLOCAL_PATH="$cwd/sys" $ACLOCAL --verbose --install -I "$cwd/loc"
 diff sys/foo.m4 loc/foo.m4
 
old mode 100755 (executable)
new mode 100644 (file)
index fae2997..d9651ca
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2012 Free Software Foundation, Inc.
+# Copyright (C) 2012-2017 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
@@ -19,7 +19,7 @@
 
 am_create_testdir=empty
 required=ro-dir
-. ./defs || Exit 1
+. test-init.sh
 
 cat > configure.ac <<END
 AC_INIT([$me], [1.0])
@@ -38,22 +38,22 @@ mkdir unwritable-dir
 chmod a-w unwritable-dir
 
 $ACLOCAL -I a-regular-file --install 2>stderr \
-  && { cat stderr >&2; Exit 1; }
+  && { cat stderr >&2; exit 1; }
 cat stderr >&2
 $EGREP '(mkdir:|directory ).*a-regular-file' stderr
-test ! -f aclocal.m4
+test ! -e aclocal.m4
 
 $ACLOCAL --install -I unwritable-dir/sub 2>stderr \
-  && { cat stderr >&2; Exit 1; }
+  && { cat stderr >&2; exit 1; }
 cat stderr >&2
 $EGREP '(mkdir:|directory ).*unwritable-dir/sub' stderr
-test ! -f aclocal.m4
+test ! -e aclocal.m4
 
 $ACLOCAL -I unwritable-dir --install 2>stderr \
-  && { cat stderr >&2; Exit 1; }
+  && { cat stderr >&2; exit 1; }
 cat stderr >&2
 $EGREP '(cp:|copy ).*unwritable-dir' stderr
-test ! -f aclocal.m4
+test ! -e aclocal.m4
 
 # Sanity check.
 mkdir m4
old mode 100755 (executable)
new mode 100644 (file)
index ba4be2a..556cff6
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2012 Free Software Foundation, Inc.
+# Copyright (C) 2012-2017 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
@@ -19,7 +19,7 @@
 # FIXME: this is a good candidate for a conversion to TAP.
 
 am_create_testdir=empty
-. ./defs || Exit 1
+. test-init.sh
 
 cat > configure.ac <<END
 AC_INIT([$me], [1.0])
@@ -36,7 +36,7 @@ ACLOCAL="$ACLOCAL --system-acdir=sys-acdir"
 $ACLOCAL -I foo --install
 test -f foo/my-defs.m4
 
-$ACLOCAL --install -I "`pwd`/bar"
+$ACLOCAL --install -I "$(pwd)/bar"
 test -f bar/my-defs.m4
 
 $ACLOCAL --install -I baz/sub/sub2
@@ -50,21 +50,21 @@ mkdir zardoz2
 $ACLOCAL --install -I zardoz1 -I zardoz2
 test -d zardoz1
 grep MY_MACRO zardoz1/my-defs.m4
-ls zardoz2 | grep . && Exit 1
+ls zardoz2 | grep . && exit 1
 
 # Directories in ACLOCAL_PATH should never be created if they don't
 # exist.
-ACLOCAL_PATH="`pwd`/none:`pwd`/none2" $ACLOCAL --install && Exit 1
-test ! -d none
-test ! -d none2
-ACLOCAL_PATH="`pwd`/none:`pwd`/none2" $ACLOCAL --install -I x
+ACLOCAL_PATH="$(pwd)/none:$(pwd)/none2" $ACLOCAL --install && exit 1
+test ! -e none
+test ! -e none2
+ACLOCAL_PATH="$(pwd)/none:$(pwd)/none2" $ACLOCAL --install -I x
 test -f x/my-defs.m4
-test ! -d none
-test ! -d none2
+test ! -e none
+test ! -e none2
 
 # It's better if aclocal doesn't create the first include dir on failure.
-$ACLOCAL --install -I none -I none2 && Exit 1
-test ! -d none
-test ! -d none2
+$ACLOCAL --install -I none -I none2 && exit 1
+test ! -e none
+test ! -e none2
 
 :
old mode 100755 (executable)
new mode 100644 (file)
similarity index 85%
rename from t/acloca14.sh
rename to t/aclocal-m4-include-are-scanned-aclocal-amflags.sh
index ba1f072..2fe9cc8
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2004-2012 Free Software Foundation, Inc.
+# Copyright (C) 2004-2017 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
@@ -17,7 +17,7 @@
 # Make sure m4_included files are also scanned for definitions.
 # Report from Phil Edwards.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AM_PROG_LIBTOOL
@@ -68,12 +68,12 @@ $ACLOCAL -I defs
 $FGREP acinclude.m4 aclocal.m4
 # None of the following macro should be included.  acinclude.m4
 # includes the first four, and the last two are not needed at all.
-$FGREP a.m4 aclocal.m4 && Exit 1
-$FGREP b.m4 aclocal.m4 && Exit 1
-$FGREP c.m4 aclocal.m4 && Exit 1
-$FGREP d.m4 aclocal.m4 && Exit 1
-$FGREP defs/e.m4 aclocal.m4 && Exit 1
-$FGREP defs/f.m4 aclocal.m4 && Exit 1
+$FGREP a.m4 aclocal.m4 && exit 1
+$FGREP b.m4 aclocal.m4 && exit 1
+$FGREP c.m4 aclocal.m4 && exit 1
+$FGREP d.m4 aclocal.m4 && exit 1
+$FGREP defs/e.m4 aclocal.m4 && exit 1
+$FGREP defs/f.m4 aclocal.m4 && exit 1
 
 $AUTOCONF
 $AUTOMAKE
@@ -81,37 +81,27 @@ $AUTOMAKE
 ./configure
 $MAKE testdist1
 
-cp aclocal.m4 stamp
+cp aclocal.m4 aclocal.old
 $sleep
-
-cat >>c.m4 <<\EOF
-AC_DEFUN([FOO], [ANOTHER_MACRO])
-EOF
-
+echo 'AC_DEFUN([FOO], [ANOTHER_MACRO])' >> c.m4
 $MAKE
-
 # Because c.m4 has changed, aclocal.m4 must have been rebuilt.
-test `ls -1t aclocal.m4 stamp | sed 1q` = aclocal.m4
+is_newest aclocal.m4 aclocal.old
 # However, since FOO is not used, f.m4 should not be included
 # and the contents of aclocal.m4 should remain the same
-diff aclocal.m4 stamp
+diff aclocal.m4 aclocal.old
 
-# If FOO where to be used, that would be another story, of course.
-cat >>configure.ac <<EOF
-FOO
-EOF
-
-cp aclocal.m4 stamp
+# If FOO where to be used, that would be another story, of course:
+# f.m4 should be included
 $sleep
-
+echo FOO >> configure.ac
 $MAKE
-
 $FGREP defs/f.m4 aclocal.m4
 $MAKE testdist2
 
 # Make sure aclocal diagnose missing included files with correct 'file:line:'.
 rm -f b.m4
-$ACLOCAL 2>stderr && { cat stderr >&2; Exit 1; }
+$ACLOCAL 2>stderr && { cat stderr >&2; exit 1; }
 cat stderr >&2
 grep 'a\.m4:1: .*b\.m4.*does not exist' stderr
 
diff --git a/t/aclocal-m4-include-are-scanned.sh b/t/aclocal-m4-include-are-scanned.sh
new file mode 100644 (file)
index 0000000..96e70b9
--- /dev/null
@@ -0,0 +1,108 @@
+#! /bin/sh
+# Copyright (C) 2004-2017 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 m4_included files are also scanned for definitions.
+# Report from Phil Edwards.
+
+. test-init.sh
+
+cat >> configure.ac << 'END'
+AC_CONFIG_MACRO_DIR([defs])
+AM_PROG_LIBTOOL
+AC_OUTPUT
+END
+
+echo 'm4_include([a.m4])' > acinclude.m4
+echo 'm4_include([b.m4])' > a.m4
+
+cat >b.m4 <<EOF
+m4_include([c.m4])
+AC_DEFUN([AM_PROG_LIBTOOL],
+[AC_REQUIRE([SOMETHING])dnl
+AC_REQUIRE([SOMETHING_ELSE])dnl
+])
+
+AC_DEFUN([SOMETHING])
+EOF
+
+echo 'm4_include([d.m4])' > c.m4
+echo 'AC_DEFUN([SOMETHING_ELSE])' >d.m4
+
+mkdir defs
+echo 'AC_DEFUN([SOMETHING_ELSE])' >defs/e.m4
+echo 'AC_DEFUN([ANOTHER_MACRO])' >defs/f.m4
+
+cat >>Makefile.am<<\EOF
+testdist1: distdir
+       test -f $(distdir)/acinclude.m4
+       test -f $(distdir)/a.m4
+       test -f $(distdir)/b.m4
+       test -f $(distdir)/c.m4
+       test -f $(distdir)/d.m4
+       test ! -d $(distdir)/defs
+testdist2: distdir
+       test -f $(distdir)/acinclude.m4
+       test -f $(distdir)/a.m4
+       test -f $(distdir)/b.m4
+       test -f $(distdir)/c.m4
+       test -f $(distdir)/d.m4
+       test ! -f $(distdir)/defs/e.m4
+       test -f $(distdir)/defs/f.m4
+EOF
+
+$ACLOCAL -I defs
+
+$FGREP acinclude.m4 aclocal.m4
+# None of the following macro should be included.  acinclude.m4
+# includes the first four, and the last two are not needed at all.
+$FGREP a.m4 aclocal.m4 && exit 1
+$FGREP b.m4 aclocal.m4 && exit 1
+$FGREP c.m4 aclocal.m4 && exit 1
+$FGREP d.m4 aclocal.m4 && exit 1
+$FGREP defs/e.m4 aclocal.m4 && exit 1
+$FGREP defs/f.m4 aclocal.m4 && exit 1
+
+$AUTOCONF
+$AUTOMAKE
+
+./configure
+$MAKE testdist1
+
+cp aclocal.m4 aclocal.old
+$sleep
+echo 'AC_DEFUN([FOO], [ANOTHER_MACRO])' >> c.m4
+$MAKE
+# Because c.m4 has changed, aclocal.m4 must have been rebuilt.
+is_newest aclocal.m4 aclocal.old
+# However, since FOO is not used, f.m4 should not be included
+# and the contents of aclocal.m4 should remain the same
+diff aclocal.m4 aclocal.old
+
+# If FOO where to be used, that would be another story, of course:
+# f.m4 should be included
+$sleep
+echo FOO >> configure.ac
+$MAKE
+$FGREP defs/f.m4 aclocal.m4
+$MAKE testdist2
+
+# Make sure aclocal diagnose missing included files with correct 'file:line:'.
+rm -f b.m4
+$ACLOCAL 2>stderr && { cat stderr >&2; exit 1; }
+cat stderr >&2
+grep 'a\.m4:1: .*b\.m4.*does not exist' stderr
+
+:
old mode 100755 (executable)
new mode 100644 (file)
similarity index 82%
rename from t/acloca13.sh
rename to t/aclocal-m4-sinclude.sh
index e91a534..507230f
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2003-2012 Free Software Foundation, Inc.
+# Copyright (C) 2003-2017 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
 
 # Make sure changes to m4_included files also cause aclocal.m4 to change.
 
-. ./defs || Exit 1
+. test-init.sh
 
-cat >> configure.ac << 'END'
+cat > configure.ac << 'END'
+AC_INIT([m4sinclude], [1.0])
+AM_INIT_AUTOMAKE
 m4_include([somefile.m4])
+AC_CONFIG_FILES([Makefile])
 AC_OUTPUT
 END
 
@@ -47,23 +50,24 @@ EOF
 
 $ACLOCAL -I m4
 grep version2 aclocal.m4
-grep version1 aclocal.m4 && Exit 1
+grep version1 aclocal.m4 && exit 1
 
 $sleep
 echo MACRO2 >somefile.m4
 
 $ACLOCAL -I m4
-grep version2 aclocal.m4 && Exit 1
+grep version2 aclocal.m4 && exit 1
 grep version1 aclocal.m4
 
 $sleep
 # aclocal.m4 should change if we touch otherfile.m4
 touch m4/otherfile.m4
-$sleep
 $ACLOCAL -I m4
-test `ls -1t aclocal.m4 m4/otherfile.m4 | sed 1q` = aclocal.m4
+is_newest aclocal.m4 m4/otherfile.m4
 
 $AUTOCONF
 $AUTOMAKE
 ./configure
 $MAKE distcheck
+
+:
diff --git a/t/aclocal-macrodir.tap b/t/aclocal-macrodir.tap
new file mode 100644 (file)
index 0000000..877dccd
--- /dev/null
@@ -0,0 +1,239 @@
+#! /bin/sh
+# Copyright (C) 2012-2017 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/>.
+
+# Several tests on the use of the m4 macro AC_CONFIG_MACRO_DIR with
+# aclocal.  See also related test 'aclocal-macrodir.tap'.
+
+am_create_testdir=empty
+. test-init.sh
+
+plan_ 7
+
+ocwd=$(pwd) || fatal_ "getting current working directory"
+unset ACLOCAL_PATH
+
+#
+# General utility functions and variables.
+#
+# TODO: These should maybe be refactored, generalized and
+#       moved into 't/ax/tap-functions.sh' ...
+#
+
+tcount=0
+r=invalid
+description=''
+directive=''
+
+test_begin ()
+{
+  if test -n "$description"; then
+    fatal_ "'test_begin' called, but another test seems active already"
+  else
+    r=ok
+    description=$1
+    directive=${2-}
+    echo "$description" > README.txt
+    shift
+  fi
+  tcount=$(($tcount + 1)) && test $tcount -gt 0 \
+    || fatal_ "failed to bump the test count"
+  mkdir $tcount.d
+  cd $tcount.d
+}
+
+test_end ()
+{
+  if test -z "$description"; then
+    fatal_ "'test_end' called, but no test seems active"
+  else
+    cd "$ocwd" || fatal_ "cannot chdir back to top-level directory"
+    result_ "$r" -D "$directive" -- "$description"
+    # Don't leave directories for successful subtests hanging around.
+    if test -z "$directive" && test "$r" = ok; then
+      rm -rf "$tcount.d" || fatal_ "removing subdir $tcount.d"
+    fi
+    r=invalid directive= description=
+  fi
+}
+
+#---------------------------------------------------------------------------
+
+test_begin "AC_CONFIG_MACRO_DIR is honored"
+
+cat > configure.ac <<'END'
+AC_INIT([md], [10.0])
+AC_CONFIG_MACRO_DIR([macro-dir])
+MY_FOO
+END
+
+mkdir macro-dir
+echo 'AC_DEFUN([MY_FOO], [::my::foo::])' > macro-dir/foo.m4
+
+$ACLOCAL \
+  && $FGREP 'm4_include([macro-dir/foo.m4])' aclocal.m4 \
+  && $AUTOCONF \
+  && not $FGREP 'MY_FOO' configure \
+  && $FGREP '::my::foo::' configure \
+  || r='not ok'
+
+test_end
+
+#---------------------------------------------------------------------------
+
+test_begin "AC_CONFIG_MACRO_DIR([foo]) interaction with --install"
+
+cat > configure.ac << 'END'
+AC_INIT([inst], [1.0])
+AC_CONFIG_MACRO_DIR([the-dir])
+THE_MACRO
+END
+
+mkdir sys-dir the-dir
+echo 'AC_DEFUN([THE_MACRO], [:])' > sys-dir/my.m4
+
+test ! -r the-dir/my.m4 \
+  && $ACLOCAL --install --system-acdir ./sys-dir \
+  && diff sys-dir/my.m4 the-dir/my.m4 \
+  || r='not ok'
+
+test_end
+
+#---------------------------------------------------------------------------
+
+test_begin "'-I' option wins over AC_CONFIG_MACRO_DIR"
+
+cat > configure.ac <<'END'
+AC_INIT([md], [4.6])
+AC_CONFIG_MACRO_DIR([dir1])
+MY_FOO
+END
+
+mkdir dir1 dir2
+echo 'AC_DEFUN([MY_FOO], [::ko::ko::])' > dir1/1.m4
+echo 'AC_DEFUN([MY_FOO], [::ok::ok::])' > dir2/2.m4
+
+$ACLOCAL -I dir2 \
+  && $FGREP 'm4_include([dir2/2.m4])' aclocal.m4 \
+  && not $FGREP 'm4_include([dir1/1.m4])' aclocal.m4 \
+  && $AUTOCONF \
+  && not $FGREP '::ko::ko::' configure \
+  && $FGREP '::ok::ok::' configure \
+  || r='not ok'
+
+test_end
+
+#---------------------------------------------------------------------------
+
+test_begin "AC_CONFIG_MACRO_DIR([foo]) can create directory 'foo'"
+
+cat > configure.ac << 'END'
+AC_INIT([x], [1.0])
+AC_CONFIG_MACRO_DIR([foo])
+MY_MACRO
+END
+
+mkdir acdir
+echo 'AC_DEFUN([MY_MACRO], [:])' > acdir/bar.m4
+
+test ! -d foo \
+  && $ACLOCAL --install --system-acdir ./acdir \
+  && diff acdir/bar.m4 foo/bar.m4 \
+  || r='not ok'
+
+test_end
+
+#---------------------------------------------------------------------------
+
+test_begin "AC_CONFIG_MACRO_DIR([non-existent]) warns with -Wunsupported"
+
+cat > configure.ac << 'END'
+AC_INIT([oops], [1.0])
+AC_CONFIG_MACRO_DIR([non-existent])
+AM_INIT_AUTOMAKE
+END
+
+$ACLOCAL -Wno-error 2>stderr \
+  && cat stderr >&2 \
+  && grep "couldn't open directory 'non-existent'" stderr \
+  && test -f aclocal.m4 \
+  || r='not ok'
+
+rm -rf aclocal.m4 autom4te*.cache
+
+$ACLOCAL -Werror -Wno-unsupported \
+  && test -f aclocal.m4 \
+  || r='not ok'
+
+test_end
+
+#---------------------------------------------------------------------------
+
+test_begin "AC_CONFIG_MACRO_DIR([not-exist]) and ACLOCAL_AMFLAGS = -I not-exist"
+
+cat > configure.ac << 'END'
+AC_INIT([oops], [1.0])
+AC_CONFIG_MACRO_DIR([not-exist])
+END
+
+cat > Makefile.am << 'END'
+ACLOCAL_AMFLAGS = -I not-exist
+END
+
+$ACLOCAL -Wno-error 2>stderr \
+  && cat stderr >&2 \
+  && test $(grep -c "couldn't open directory 'not-exist'" stderr) -eq 1 \
+  || r='not ok'
+
+test_end
+
+#---------------------------------------------------------------------------
+
+# Avoid spurious failures with pre-2.70 autoconf.
+# FIXME: remove this in automake 2.0, once we require Autoconf 2.70.
+if echo 'AC_INIT AC_CONFIG_MACRO_DIRS' | $AUTOCONF -o/dev/null -; then
+
+  test_begin "AC_CONFIG_MACRO_DIR interaction with AC_REQUIRE"
+
+  unindent > configure.ac <<'END'
+  AC_INIT([req], [1.0])
+  AC_CONFIG_MACRO_DIR([macro-dir])
+  AC_DEFUN([MY_FOO], [AC_REQUIRE([MY_BAR])])
+  MY_FOO
+END
+
+  mkdir macro-dir
+  echo 'AC_DEFUN([MY_BAR], [//my//bar//])' > macro-dir/x.m4
+
+  st=0; $ACLOCAL 2>stderr || st=$?
+  cat stderr >&2
+
+  test $st -eq 0 \
+    && test ! -s stderr \
+    && $FGREP 'm4_include([macro-dir/x.m4])' aclocal.m4 \
+    && $AUTOCONF \
+    && not $EGREP 'MY_(FOO|BAR)' configure \
+    && $FGREP '//my//bar//' configure \
+    || r='not ok'
+
+  test_end
+
+else
+
+  skip_ -r "autoconf is too old (AC_CONFIG_MACRO_DIRS not defined)"
+
+fi
+
+:
diff --git a/t/aclocal-macrodirs.tap b/t/aclocal-macrodirs.tap
new file mode 100644 (file)
index 0000000..b43410a
--- /dev/null
@@ -0,0 +1,445 @@
+#! /bin/sh
+# Copyright (C) 2012-2017 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/>.
+
+# Several tests on the use of the m4 macro AC_CONFIG_MACRO_DIRS with
+# aclocal.  See also related test 'aclocal-macrodir.tap'.
+
+am_create_testdir=empty
+. test-init.sh
+
+plan_ 15
+
+ocwd=$(pwd) || fatal_ "getting current working directory"
+unset ACLOCAL_PATH
+
+#
+# General utility functions and variables.
+#
+# TODO: These should maybe be refactored, generalized and
+#       moved into 't/ax/tap-functions.sh' ...
+#
+
+tcount=0
+r=invalid
+description=''
+directive=''
+
+test_begin ()
+{
+  if test -n "$description"; then
+    fatal_ "'test_begin' called, but another test seems active already"
+  else
+    r=ok
+    description=$1
+    directive=${2-}
+    echo "$description" > README.txt
+    shift
+  fi
+  tcount=$(($tcount + 1)) && test $tcount -gt 0 \
+    || fatal_ "failed to bump the test count"
+  mkdir $tcount.d
+  cd $tcount.d
+}
+
+test_end ()
+{
+  if test -z "$description"; then
+    fatal_ "'test_end' called, but no test seems active"
+  else
+    cd "$ocwd" || fatal_ "cannot chdir back to top-level directory"
+    result_ "$r" -D "$directive" -- "$description"
+    # Don't leave directories for successful subtests hanging around.
+    if test -z "$directive" && test "$r" = ok; then
+      rm -rf "$tcount.d" || fatal_ "removing subdir $tcount.d"
+    fi
+    r=invalid directive= description=
+  fi
+}
+
+#---------------------------------------------------------------------------
+
+test_begin "AC_CONFIG_MACRO_DIRS is honored"
+
+cat > configure.ac <<'END'
+AC_INIT([md], [10.0])
+AC_CONFIG_MACRO_DIRS([macro-dir])
+MY_FOO
+END
+
+mkdir macro-dir
+echo 'AC_DEFUN([MY_FOO], [::my::foo::])' > macro-dir/foo.m4
+
+$ACLOCAL \
+  && $FGREP 'm4_include([macro-dir/foo.m4])' aclocal.m4 \
+  && $AUTOCONF \
+  && not $FGREP 'MY_FOO' configure \
+  && $FGREP '::my::foo::' configure \
+  || r='not ok'
+
+test_end
+
+#---------------------------------------------------------------------------
+
+three_dirs_check ()
+{
+  mkdir dir1 dir2 dir3
+  echo 'AC_DEFUN([MY_FOO], [::my::foo::])' > dir1/foo.m4
+  echo 'AC_DEFUN([MY_BAR], [!!my!!bar!!])' > dir2/zap.m4
+  echo 'AC_DEFUN([MY_BAZ], [==my==baz==])' > dir3/0.m4
+  $ACLOCAL \
+    && $FGREP 'm4_include([dir1/foo.m4])' aclocal.m4 \
+    && $FGREP 'm4_include([dir2/zap.m4])' aclocal.m4 \
+    && $FGREP 'm4_include([dir3/0.m4])'   aclocal.m4 \
+    && $AUTOCONF \
+    && not $EGREP 'MY_(FOO|BAR|BAZ)' configure \
+    && $FGREP '::my::foo::' configure \
+    && $FGREP '!!my!!bar!!' configure \
+    && $FGREP '==my==baz==' configure \
+    || r='not ok'
+}
+
+#---------------------------------------------------------------------------
+
+test_begin "AC_CONFIG_MACRO_DIRS several arguments"
+
+cat > configure.ac <<'END'
+AC_INIT([more-args], [0.2])
+AC_CONFIG_MACRO_DIRS([dir1 dir2 dir3])
+MY_FOO
+MY_BAR
+MY_BAZ
+END
+
+three_dirs_check
+
+test_end
+
+#---------------------------------------------------------------------------
+
+test_begin "AC_CONFIG_MACRO_DIRS several calls"
+
+cat > configure.ac <<'END'
+AC_INIT([more-calls], [2.0])
+AC_CONFIG_MACRO_DIRS([dir1])
+AC_CONFIG_MACRO_DIRS([dir2 dir3])
+MY_FOO
+MY_BAR
+MY_BAZ
+END
+
+three_dirs_check
+
+test_end
+
+#---------------------------------------------------------------------------
+
+test_begin "AC_CONFIG_MACRO_DIRS extra whitespace"
+
+bslash=\\
+
+cat > configure.ac <<END
+AC_INIT([more-args], [0.2])
+AC_CONFIG_MACRO_DIRS([   dir1${bslash}
+${tab} dir2   ${tab}${tab}dir3
+${bslash}
+
+])
+MY_FOO
+MY_BAR
+MY_BAZ
+END
+
+three_dirs_check
+
+test_end
+
+#---------------------------------------------------------------------------
+
+test_begin "AC_CONFIG_MACRO_DIRS precedence"
+
+cat > configure.ac <<'END'
+AC_INIT([more-calls], [2.0])
+AC_CONFIG_MACRO_DIRS([dir1])
+AC_CONFIG_MACRO_DIRS([dir2 dir3])
+MY_FOO
+MY_BAR
+MY_BAZ
+END
+
+mkdir dir1 dir2 dir3
+echo 'AC_DEFUN([MY_FOO], [OK-Foo])' > dir1/b.m4
+echo 'AC_DEFUN([MY_FOO], [KO-Foo])' > dir2/a.m4
+echo 'AC_DEFUN([MY_BAR], [OK-Bar])' > dir2/1.m4
+echo 'AC_DEFUN([MY_BAR], [KO-Bar])' > dir3/0.m4
+echo 'AC_DEFUN([MY_BAZ], [OK-Baz])' > dir3/x.m4
+
+$ACLOCAL \
+  && $FGREP 'm4_include([dir1/b.m4])' aclocal.m4 \
+  && $FGREP 'm4_include([dir2/1.m4])' aclocal.m4 \
+  && $FGREP 'm4_include([dir3/x.m4])' aclocal.m4 \
+  && test $($FGREP -c 'm4_include([dir1' aclocal.m4) -eq 1 \
+  && test $($FGREP -c 'm4_include([dir2' aclocal.m4) -eq 1 \
+  && test $($FGREP -c 'm4_include([dir3' aclocal.m4) -eq 1 \
+  && $AUTOCONF \
+  && not $EGREP 'MY_(FOO|BAR|BAZ)' configure \
+  && $FGREP 'OK-Foo' configure \
+  && $FGREP 'OK-Bar' configure \
+  && $FGREP 'OK-Baz' configure \
+  && not $FGREP 'KO-' configure \
+  || r='not ok'
+
+test_end
+
+#---------------------------------------------------------------------------
+
+test_begin "AC_CONFIG_MACRO_DIRS interaction with --install"
+
+cat > configure.ac << 'END'
+AC_INIT([inst], [1.0])
+AC_CONFIG_MACRO_DIRS([the-dir])
+THE_MACRO
+END
+
+mkdir sys-dir the-dir
+echo 'AC_DEFUN([THE_MACRO], [:])' > sys-dir/my.m4
+
+test ! -r the-dir/my.m4 \
+  && $ACLOCAL --install --system-acdir ./sys-dir \
+  && diff sys-dir/my.m4 the-dir/my.m4 \
+  || r='not ok'
+
+test_end
+
+#---------------------------------------------------------------------------
+
+two_dirs_install_check ()
+{
+  mkdir sys-dir dir1 dir2
+  echo 'AC_DEFUN([THE_MACRO], [:])' > sys-dir/my.m4
+  echo 'AC_DEFUN([AX_FOO], [:])' > dir2/zap.m4
+  test ! -r dir1/my.m4 \
+    && $ACLOCAL --install --system-acdir ./sys-dir \
+    && diff sys-dir/my.m4 dir1/my.m4 \
+    && test ! -e dir2/my.m4 \
+    && $FGREP 'm4_include([dir1/my.m4])' aclocal.m4 \
+    && $FGREP 'm4_include([dir2/zap.m4])' aclocal.m4 \
+    || r='not ok'
+}
+
+#---------------------------------------------------------------------------
+
+test_begin "several AC_CONFIG_MACRO_DIRS arguments and --install"
+
+cat > configure.ac << 'END'
+AC_INIT([inst2a], [1.0])
+AC_CONFIG_MACRO_DIRS([dir1 dir2])
+THE_MACRO
+AX_FOO
+END
+
+two_dirs_install_check
+
+test_end
+
+#---------------------------------------------------------------------------
+
+
+test_begin "several AC_CONFIG_MACRO_DIRS calls and --install"
+
+cat > configure.ac << 'END'
+AC_INIT([inst2b], [1.0])
+AC_CONFIG_MACRO_DIRS([dir1])
+AC_CONFIG_MACRO_DIRS([dir2])
+THE_MACRO
+AX_FOO
+END
+
+two_dirs_install_check
+
+test_end
+
+#---------------------------------------------------------------------------
+
+test_begin "'-I' option wins over AC_CONFIG_MACRO_DIRS"
+
+cat > configure.ac <<'END'
+AC_INIT([md], [4.6])
+AC_CONFIG_MACRO_DIRS([dir1])
+MY_FOO
+END
+
+mkdir dir1 dir2
+echo 'AC_DEFUN([MY_FOO], [::ko::ko::])' > dir1/1.m4
+echo 'AC_DEFUN([MY_FOO], [::ok::ok::])' > dir2/2.m4
+
+$ACLOCAL -I dir2 \
+  && $FGREP 'm4_include([dir2/2.m4])' aclocal.m4 \
+  && not $FGREP 'm4_include([dir1/1.m4])' aclocal.m4 \
+  && $AUTOCONF \
+  && not $FGREP '::ko::ko::' configure \
+  && $FGREP '::ok::ok::' configure \
+  || r='not ok'
+
+test_end
+
+#---------------------------------------------------------------------------
+
+test_begin "AC_CONFIG_MACRO_DIRS([foo]) can create directory 'foo'"
+
+cat > configure.ac << 'END'
+AC_INIT([x], [1.0])
+AC_CONFIG_MACRO_DIRS([foo])
+MY_MACRO
+END
+
+mkdir acdir
+echo 'AC_DEFUN([MY_MACRO], [:])' > acdir/bar.m4
+
+test ! -d foo \
+  && $ACLOCAL --install --system-acdir ./acdir \
+  && diff acdir/bar.m4 foo/bar.m4 \
+  || r='not ok'
+
+test_end
+
+#---------------------------------------------------------------------------
+
+test_begin "AC_CONFIG_MACRO_DIRS([non-existent]) warns (1)"
+
+cat > configure.ac << 'END'
+AC_INIT([oops], [1.0])
+AC_CONFIG_MACRO_DIRS([non-existent])
+AM_INIT_AUTOMAKE
+END
+
+$ACLOCAL -Wno-error 2>stderr \
+  && cat stderr >&2 \
+  && grep "couldn't open directory 'non-existent'" stderr \
+  && test -f aclocal.m4 \
+  || r='not ok'
+
+rm -rf aclocal.m4 autom4te*.cache
+
+$ACLOCAL -Werror -Wno-unsupported \
+  && test -f aclocal.m4 \
+  || r='not ok'
+
+test_end
+
+#---------------------------------------------------------------------------
+
+test_begin "AC_CONFIG_MACRO_DIRS([non-existent]) warns (2)"
+
+cat > configure.ac << 'END'
+AC_INIT([oops], [1.0])
+AC_CONFIG_MACRO_DIRS([dir-ok])
+AC_CONFIG_MACRO_DIRS([dir-ko])
+END
+
+mkdir dir-ok
+not $ACLOCAL 2>stderr \
+  && cat stderr >&2 \
+  && grep "couldn't open directory 'dir-ko'" stderr \
+  && not grep "dir-ok" stderr \
+  && test ! -e aclocal.m4 \
+  || r='not ok'
+
+test_end
+
+#---------------------------------------------------------------------------
+
+test_begin "AC_CONFIG_MACRO_DIRS([existent non-existent]) errors out"
+
+cat > configure.ac << 'END'
+AC_INIT([oops], [1.0])
+AC_CONFIG_MACRO_DIRS([dir-ok])
+AC_CONFIG_MACRO_DIRS([dir-ko])
+END
+
+mkdir dir-ok
+
+not $ACLOCAL -Wnone --install 2>stderr \
+  && cat stderr >&2 \
+  && grep "couldn't open directory 'dir-ko'" stderr \
+  && test ! -e dir-ko \
+  || r='not ok'
+
+test_end
+
+#---------------------------------------------------------------------------
+
+test_begin "AC_CONFIG_MACRO_DIRS([not-exist]) and ACLOCAL_AMFLAGS = -I not-exist"
+
+cat > configure.ac << 'END'
+AC_INIT([oops], [1.0])
+AC_CONFIG_MACRO_DIRS([not-exist])
+END
+
+cat > Makefile.am << 'END'
+ACLOCAL_AMFLAGS = -I not-exist
+END
+
+$ACLOCAL -Wno-error 2>stderr \
+  && cat stderr >&2 \
+  && test $(grep -c "couldn't open directory 'not-exist'" stderr) -eq 1 \
+  || r='not ok'
+
+test_end
+
+#---------------------------------------------------------------------------
+
+# Avoid spurious failures with pre-2.70 autoconf.
+# FIXME: remove this in automake 2.0, once we require Autoconf 2.70.
+if echo 'AC_INIT AC_CONFIG_MACRO_DIRS' | $AUTOCONF -o/dev/null -; then
+
+  test_begin "AC_CONFIG_MACRO_DIRS interaction with AC_REQUIRE"
+
+  unindent > configure.ac <<'END'
+  AC_INIT([req], [1.0])
+  AC_CONFIG_MACRO_DIRS([m1 m2])
+  AC_DEFUN([MY_FOO], [
+    AC_REQUIRE([MY_BAR])
+    AC_REQUIRE([MY_BAZ])
+  ])
+  MY_FOO
+END
+
+  mkdir m1 m2
+  echo 'AC_DEFUN([MY_BAR], [^^my^^bar^^])' > m1/x.m4
+  echo 'AC_DEFUN([MY_BAZ], [~~my~~baz~~])' > m2/x.m4
+
+  st=0; $ACLOCAL 2>stderr || st=$?
+  cat stderr >&2
+
+  test $st -eq 0 \
+    && test ! -s stderr \
+    && $FGREP 'm4_include([m1/x.m4])' aclocal.m4 \
+    && $FGREP 'm4_include([m2/x.m4])' aclocal.m4 \
+    && $AUTOCONF \
+    && not $EGREP 'MY_(FOO|BAR|BAZ)' configure \
+    && $FGREP '^^my^^bar^^' configure \
+    && $FGREP '~~my~~baz~~' configure \
+    || r='not ok'
+
+  test_end
+
+else
+
+  skip_ -r "autoconf is too old (AC_CONFIG_MACRO_DIRS not defined)"
+
+fi
+
+:
old mode 100755 (executable)
new mode 100644 (file)
similarity index 89%
rename from t/aclocal3.sh
rename to t/aclocal-missing-macros.sh
index b2d2ab9..92fde75
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 1998-2012 Free Software Foundation, Inc.
+# Copyright (C) 1998-2017 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
@@ -17,7 +17,7 @@
 # Test to make sure include of include detects missing macros
 
 am_create_testdir=empty
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac <<END
 AC_INIT([$me], [1.0])
@@ -34,7 +34,7 @@ AC_DEFUN([GNOME_X_CHECKS], [
 ])
 END
 
-$ACLOCAL -I macros 2>stderr && { cat stderr >&2; Exit 1; }
+$ACLOCAL -I macros 2>stderr && { cat stderr >&2; exit 1; }
 cat stderr
 grep '^macros/gnome\.m4:4:.*AM__PATH__GTK.*not found' stderr
 
old mode 100755 (executable)
new mode 100644 (file)
similarity index 87%
rename from t/acloca16.sh
rename to t/aclocal-no-extra-scan.sh
index ab894c7..eb629f0
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2004-2012 Free Software Foundation, Inc.
+# Copyright (C) 2004-2017 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
 # evaluated.
 
 am_create_testdir=empty
-. ./defs || Exit 1
+. test-init.sh
 
 cat > configure.ac << 'END'
+AC_INIT([x], [0])
 AC_SUBST([POM])
 END
 
@@ -31,6 +32,6 @@ AC_DEFUN([AM_SOME_MACRO],
 EOF
 
 $ACLOCAL -I m4
-grep m4/some.m4 aclocal.m4 && Exit 1
+$EGREP 'some.m4|GREPME' aclocal.m4 && exit 1
 
 :
old mode 100755 (executable)
new mode 100644 (file)
similarity index 63%
rename from t/aclocal7.sh
rename to t/aclocal-no-force.sh
index 548d890..4c15d01
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2003-2012 Free Software Foundation, Inc.
+# Copyright (C) 2003-2017 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
@@ -17,7 +17,7 @@
 # Make sure aclocal does not overwrite aclocal.m4 needlessly.
 # Also make sure automake --no-force does not overwrite Makefile.in needlessly.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 SOME_DEFS
@@ -37,70 +37,69 @@ END
 mkdir m4
 echo 'AC_DEFUN([SOME_DEFS], [])' > m4/somedefs.m4
 
-$sleep
-
-$ACLOCAL -I m4
-
 # Automake will take aclocal.m4 to be newer if it has the same timestamp
 # as Makefile.in.  Avoid the confusing by sleeping.
+AUTOMAKE_after_aclocal ()
+{
+  $sleep
+  $AUTOMAKE --no-force
+}
+
+# aclocal will rewrite aclocal.m4 unless the input files are all older than the
+# existing aclocal.m4 -- sleep to ensure somedefs.m4 has an older timestamp
+# than the aclocal.m4 that the next aclocal call will generate.
 $sleep
 
-$AUTOMAKE --no-force
-
-$sleep
+$ACLOCAL -I m4
+AUTOMAKE_after_aclocal
 
 touch foo
+$sleep
 $ACLOCAL -I m4
-$AUTOMAKE --no-force
-
+AUTOMAKE_after_aclocal
 # aclocal.m4 and Makefile.in should not have been updated, so 'foo'
 # should be younger
-test `ls -1t aclocal.m4 Makefile.in sub/Makefile.in foo | sed 1q` = foo
+is_newest foo aclocal.m4 Makefile.in sub/Makefile.in
 
 $sleep
 $ACLOCAL -I m4 --force
-test `ls -1t aclocal.m4 foo | sed 1q` = aclocal.m4
+is_newest aclocal.m4 foo
 # We still use --no-force for automake, but since aclocal.m4 has
 # changed all Makefile.ins should be updated.
-$sleep
-$AUTOMAKE --no-force
-test `ls -1t Makefile.in foo | sed 1q` = Makefile.in
-test `ls -1t sub/Makefile.in foo | sed 1q` = sub/Makefile.in
+AUTOMAKE_after_aclocal
+is_newest Makefile.in aclocal.m4 foo
+is_newest sub/Makefile.in aclocal.m4 foo
 
-touch m4/somedefs.m4
 $sleep
-touch foo
+touch m4/somedefs.m4
 $sleep
 $ACLOCAL -I m4
-$sleep
-$AUTOMAKE --no-force
+AUTOMAKE_after_aclocal
+# aclocal.m4 should have been updated, although its contents haven't
+# changed.
+is_newest aclocal.m4 m4/somedefs.m4
+is_newest Makefile.in m4/somedefs.m4
+is_newest sub/Makefile.in m4/somedefs.m4
 
-# aclocal.m4 should have been updated, although its contents haven't changed.
-test `ls -1t aclocal.m4 foo | sed 1q` = aclocal.m4
-test `ls -1t Makefile.in foo | sed 1q` = Makefile.in
-test `ls -1t sub/Makefile.in foo | sed 1q` = sub/Makefile.in
-
-touch fragment.inc
 $sleep
-touch foo
+touch fragment.inc
 $sleep
 $ACLOCAL -I m4
-$AUTOMAKE --no-force
+AUTOMAKE_after_aclocal
 # Only ./Makefile.in should change.
-test `ls -1t aclocal.m4 foo | sed 1q` = foo
-test `ls -1t Makefile.in foo | sed 1q` = Makefile.in
-test `ls -1t sub/Makefile.in foo | sed 1q` = foo
+is_newest Makefile.in fragment.inc
+is_newest fragment.inc aclocal.m4
+is_newest fragment.inc sub/Makefile.in
 
-grep README Makefile.in && Exit 1
+grep README Makefile.in && exit 1
 
-: > README
 $sleep
-touch foo
+: > README
 $sleep
 $AUTOMAKE --no-force
 # Even if no dependency change, the content changed.
-test `ls -1t Makefile.in foo | sed 1q` = Makefile.in
-test `ls -1t sub/Makefile.in foo | sed 1q` = foo
+is_newest Makefile.in README
+is_newest README sub/Makefile.in
 
 grep README Makefile.in
 
@@ -111,6 +110,8 @@ $sleep
 $ACLOCAL -I m4
 $AUTOMAKE --no-force
 # Only sub/Makefile.in should change.
-test `ls -1t aclocal.m4 foo | sed 1q` = foo
-test `ls -1t Makefile.in foo | sed 1q` = foo
-test `ls -1t sub/Makefile.in foo | sed 1q` = sub/Makefile.in
+is_newest foo aclocal.m4
+is_newest foo Makefile.in
+is_newest sub/Makefile.in foo
+
+:
old mode 100755 (executable)
new mode 100644 (file)
index 3e685f0..bbcf624
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2012 Free Software Foundation, Inc.
+# Copyright (C) 2012-2017 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
@@ -18,7 +18,7 @@
 # if the '--install' option is not given.
 
 am_create_testdir=empty
-. ./defs || Exit 1
+. test-init.sh
 
 cat > configure.ac <<END
 AC_INIT([$me], [1.0])
@@ -30,8 +30,7 @@ cat > sys-acdir/my-defs.m4 <<END
 AC_DEFUN([MY_MACRO], [:])
 END
 
-$ACLOCAL -I foo --system-acdir=sys-acdir && Exit 1
-test ! -d foo
-test ! -r foo
+$ACLOCAL -I foo --system-acdir=sys-acdir && exit 1
+test ! -e foo
 
 :
old mode 100755 (executable)
new mode 100644 (file)
similarity index 93%
rename from t/acloca20.sh
rename to t/aclocal-no-symlinked-overwrite.sh
index 0305066..c0f0140
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2006-2012 Free Software Foundation, Inc.
+# Copyright (C) 2006-2017 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
@@ -17,7 +17,7 @@
 # Make sure aclocal does not write into symlinked aclocal.m4.
 
 am_create_testdir=empty
-. ./defs || Exit 1
+. test-init.sh
 
 echo 'm4_define([FOO], [wrong foo])' > foo.m4
 echo 'm4_define([FOO], [right foo])' > acinclude.m4
old mode 100755 (executable)
new mode 100644 (file)
similarity index 84%
rename from t/aclocal8.sh
rename to t/aclocal-no-unused-required.sh
index 8df0835..eb8ae39
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2003-2012 Free Software Foundation, Inc.
+# Copyright (C) 2003-2017 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
@@ -17,7 +17,7 @@
 # Make sure aclocal does not require unused macros.
 
 am_create_testdir=empty
-. ./defs || Exit 1
+. test-init.sh
 
 cat > configure.ac << 'END'
 AC_INIT
@@ -34,9 +34,9 @@ EOF
 echo 'AC_DEFUN([MACRO1],)' >m4/macro1.m4
 echo 'AC_DEFUN([MACRO2], [AC_REQUIRE([AM_UNUSED_MACRO])])' >m4/macro2.m4
 
-$ACLOCAL -I m4 >output 2>&1 || { cat output; Exit 1; }
-test 0 = `wc -l <output`
+$ACLOCAL -I m4 >output 2>&1 || { cat output; exit 1; }
+test 0 -eq $(wc -l <output)
 grep macro1.m4 aclocal.m4
-grep macro2.m4 aclocal.m4 && Exit 1
+grep macro2.m4 aclocal.m4 && exit 1
 
 :
old mode 100755 (executable)
new mode 100644 (file)
index 8a2b22c..ccbdb16
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2011-2012 Free Software Foundation, Inc.
+# Copyright (C) 2011-2017 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
@@ -18,7 +18,7 @@
 # are involved.
 
 am_create_testdir=empty
-. ./defs || Exit 1
+. test-init.sh
 
 cat > configure.ac << 'END'
 AC_INIT
@@ -51,13 +51,13 @@ win ()
   $AUTOCONF
   $FGREP "::$ok:"  m4/foo.m4
   $FGREP "::$ok::" configure
-  $FGREP "::$ko::" m4/foo.m4 configure && Exit 1
+  $FGREP "::$ko::" m4/foo.m4 configure && exit 1
   :
 }
 
 mkdir sdir pdir m4
 
-ACLOCAL="$ACLOCAL --system-acdir=`pwd`/sdir"
+ACLOCAL="$ACLOCAL --system-acdir=$(pwd)/sdir"
 ACLOCAL_PATH=./pdir; export ACLOCAL_PATH
 
 cat > sdir/foo.m4 << 'END'
old mode 100755 (executable)
new mode 100644 (file)
index a9a8b97..6b58150
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2011-2012 Free Software Foundation, Inc.
+# Copyright (C) 2011-2017 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
@@ -17,7 +17,7 @@
 # ACLOCAL_PATH and '--install' interactions.
 
 am_create_testdir=empty
-. ./defs || Exit 1
+. test-init.sh
 
 cat > configure.ac << 'END'
 AC_INIT
@@ -26,7 +26,7 @@ END
 
 mkdir acdir pdir ldir
 
-ACLOCAL="$ACLOCAL --system-acdir=`pwd`/acdir"
+ACLOCAL="$ACLOCAL --system-acdir=$(pwd)/acdir"
 ACLOCAL_PATH=./pdir; export ACLOCAL_PATH
 
 cat > acdir/foo.m4 << 'END'
@@ -39,10 +39,10 @@ END
 
 # The '--install' option should never cause anything to be installed
 # in a directory specified in ACLOCAL_PATH.
-$ACLOCAL --install 2>stderr && { cat stderr >&2; Exit 1; }
+$ACLOCAL --install 2>stderr && { cat stderr >&2; exit 1; }
 cat stderr >&2
-grep ' no -I was supplied' stderr
-test ! -f pdir/foo.m4
+grep 'impossible without -I .* nor AC_CONFIG_MACRO_DIR' stderr
+test ! -e pdir/foo.m4
 
 # The '--install' option should cause a required macro found in a
 # directory specified in ACLOCAL_PATH to be installed locally.
old mode 100755 (executable)
new mode 100644 (file)
index 8c42ddc..88451b2
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2011-2012 Free Software Foundation, Inc.
+# Copyright (C) 2011-2017 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
@@ -17,7 +17,7 @@
 # Non-existent directories in ACLOCAL_PATH are ok.
 
 am_create_testdir=empty
-. ./defs || Exit 1
+. test-init.sh
 
 cat > configure.ac << 'END'
 AC_INIT
@@ -27,7 +27,7 @@ END
 mkdir mdir
 echo 'AC_DEFUN([AM_FOO], [am--foo])' > mdir/foo.m4
 
-ACLOCAL_PATH=./nonesuch:./mdir:`pwd`/nonesuch2:nonesuch3 $ACLOCAL
+ACLOCAL_PATH=./nonesuch:./mdir:$(pwd)/nonesuch2:nonesuch3 $ACLOCAL
 $AUTOCONF
 $FGREP 'am--foo' configure
 
old mode 100755 (executable)
new mode 100644 (file)
index 91d9a42..36cfe4f
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2011-2012 Free Software Foundation, Inc.
+# Copyright (C) 2011-2017 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
 # Check precedence rules for ACLOCAL_PATH.
 
 am_create_testdir=empty
-. ./defs || Exit 1
+. test-init.sh
 
 cat > configure.ac << 'END'
 AC_INIT([foo], [1.0])
-AM_INIT_AUTOMAKE([parallel-tests])
+AM_INIT_AUTOMAKE
 FOO_MACRO
 BAR_MACRO
 AC_PROG_LIBTOOL
@@ -86,6 +86,6 @@ $FGREP '::pass-libtool::' configure
 $FGREP 'am__api_version' configure
 
 # A final sanity check.
-$FGREP '::fail' configure && Exit 1
+$FGREP '::fail' configure && exit 1
 
 :
old mode 100755 (executable)
new mode 100644 (file)
index d1279f0..d10b30a
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2011-2012 Free Software Foundation, Inc.
+# Copyright (C) 2011-2017 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
@@ -17,7 +17,7 @@
 # Check basic ACLOCAL_PATH support.
 
 am_create_testdir=empty
-. ./defs || Exit 1
+. test-init.sh
 
 cat > configure.ac << 'END'
 AC_INIT
@@ -40,15 +40,15 @@ cat > mdir3/baz.m4 << 'END'
 AC_DEFUN([AM_BAZ_MACRO], [am--baz])
 END
 
-ACLOCAL_PATH=mdir1:./mdir2:`pwd`/mdir3 $ACLOCAL
+ACLOCAL_PATH=mdir1:./mdir2:$(pwd)/mdir3 $ACLOCAL
 $AUTOCONF
 
 # there should be no m4_include in aclocal.m4, even though ACLOCAL_PATH
 # contains 'mdir1' and './mdir2' as relative directories.  Only -I
 # directories should be subject to file inclusion.
-$FGREP m4_include aclocal.m4 && Exit 1
+$FGREP m4_include aclocal.m4 && exit 1
 
-$EGREP 'AM_(FOO|BAR|BAZ)_MACRO' configure && Exit 1
+$EGREP 'AM_(FOO|BAR|BAZ)_MACRO' configure && exit 1
 $FGREP 'am--foo' configure
 $FGREP 'am--bar' configure
 $FGREP 'am--baz' configure
old mode 100755 (executable)
new mode 100644 (file)
similarity index 80%
rename from t/acloca19.sh
rename to t/aclocal-pr450.sh
index 60e8afe..7c52de5
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2005-2012 Free Software Foundation, Inc.
+# Copyright (C) 2005-2017 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
 # more than just variable definitions.
 # Report from Peter Breitenlohner (PR/450).
 
-. ./defs || Exit 1
+. test-init.sh
 
-cat >configure.ac <<'END'
-AC_INIT([acloca19], [1.0])
+cat >configure.ac <<END
+AC_INIT([$me], [1.0])
 m4_include([aconfig.ac])
 FOO
 AC_OUTPUT
@@ -39,11 +39,11 @@ END
 
 $ACLOCAL
 $AUTOCONF
-./configure >stdout || { cat stdout; Exit 1; }
+./configure >stdout || { cat stdout; exit 1; }
 cat stdout
 grep GREPME stdout
-grep 'aconfig\.ac' aclocal.m4 && Exit 1
-grep 'bconfig\.ac' aclocal.m4 && Exit 1
+grep 'aconfig\.ac' aclocal.m4 && exit 1
+grep 'bconfig\.ac' aclocal.m4 && exit 1
 grep with-grepme configure
 
 :
old mode 100755 (executable)
new mode 100644 (file)
index 3d8bf4e..c6fa414
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2011-2012 Free Software Foundation, Inc.
+# Copyright (C) 2011-2017 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
 # Test on aclocal's '--print-ac-dir' option.
 
 am_create_testdir=empty
-. ./defs || Exit 1
+. test-init.sh
 
 $ACLOCAL --print-ac-dir
-test "`$ACLOCAL --print-ac-dir`" = "$am_system_acdir"
-
-$ACLOCAL -Wno-obsolete --acdir foo --print-ac-dir
-test "`$ACLOCAL -Wno-obsolete --acdir foo --print-ac-dir`" = foo
+test "$($ACLOCAL --print-ac-dir)" = "$am_system_acdir"
 
 $ACLOCAL --system-acdir /bar --print-ac-dir
-test "`$ACLOCAL --system-acdir /bar --print-ac-dir`" = /bar
+test "$($ACLOCAL --system-acdir /bar --print-ac-dir)" = /bar
 
 $ACLOCAL --automake-acdir /bar --print-ac-dir
-test "`$ACLOCAL --automake-acdir /bar --print-ac-dir`" = "$am_system_acdir"
+test "$($ACLOCAL --automake-acdir /bar --print-ac-dir)" = "$am_system_acdir"
 
 :
old mode 100755 (executable)
new mode 100644 (file)
similarity index 94%
rename from t/aclocal6.sh
rename to t/aclocal-remake-misc.sh
index 8923851..c1f01dd
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2003-2012 Free Software Foundation, Inc.
+# Copyright (C) 2003-2017 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
 # Make sure aclocal.m4 is rebuilt whenever a configure
 # dependency changes.  Test for acinclude.m4 and VPATH too.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 SOME_DEFS
 AC_CONFIG_FILES([sub/Makefile])
+AC_CONFIG_MACRO_DIR([m4])
 AC_OUTPUT
 END
 
 cat > Makefile.am << 'END'
 SUBDIRS = sub
-ACLOCAL_AMFLAGS = -I m4
 END
 
 mkdir sub
@@ -37,7 +37,7 @@ mkdir m4
 echo 'AC_DEFUN([SOME_DEFS], [])' > m4/somedefs.m4
 echo 'AC_DEFUN([MORE_DEFS], [AC_SUBST([GREPME])])' > m4/moredefs.m4
 
-$ACLOCAL -I m4
+$ACLOCAL
 $AUTOCONF
 $AUTOMAKE --copy --add-missing
 
old mode 100755 (executable)
new mode 100644 (file)
similarity index 77%
rename from t/req.sh
rename to t/aclocal-req.sh
index cfc3b43..92cf333
--- a/t/req.sh
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 1996-2012 Free Software Foundation, Inc.
+# Copyright (C) 1996-2017 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
 
 # Test to make sure macro used in m4 file is included.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat > configure.ac <<EOF
-AC_INIT
+AC_INIT([$me], [1.0])
 AM_INIT_GUILE_MODULE
 EOF
 
 cat > acinclude.m4 << 'END'
-AC_DEFUN([AM_INIT_GUILE_MODULE],[
-. $srcdir/../GUILE-VERSION
-AM_INIT_AUTOMAKE($PACKAGE, $VERSION)
-AC_CONFIG_AUX_DIR(..)
-module=[$1]
-AC_SUBST(module)])
+AC_DEFUN([AM_INIT_GUILE_MODULE], [AM_INIT_AUTOMAKE([whocares])])
 END
 
 $ACLOCAL
old mode 100755 (executable)
new mode 100644 (file)
similarity index 85%
rename from t/acloca15.sh
rename to t/aclocal-scan-configure-ac-pr319.sh
index 690c06c..8de0897
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2004-2012 Free Software Foundation, Inc.
+# Copyright (C) 2004-2017 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
@@ -18,7 +18,7 @@
 # PR/319.
 
 am_create_testdir=empty
-. ./defs || Exit 1
+. test-init.sh
 
 # Start macros with AM_ because that causes aclocal to complain if it
 # cannot find them.
@@ -39,9 +39,9 @@ echo 'AC_DEFUN([AM_SOME_DEF])' > somedef.m4
 echo 'AC_DEFUN([AM_MORE_MACRO], [AC_REQUIRE([AM_SOME_DEF])])' > m4/more.m4
 
 $ACLOCAL -I m4
-$FGREP AM_SOME_MACRO aclocal.m4 && Exit 1
-$FGREP AM_MORE_MACRO aclocal.m4 && Exit 1
+$FGREP AM_SOME_MACRO aclocal.m4 && exit 1
+$FGREP AM_MORE_MACRO aclocal.m4 && exit 1
 $FGREP 'm4_include([m4/more.m4])' aclocal.m4
-test 1 = `grep m4_include aclocal.m4 | wc -l`
+test 1 = $(grep m4_include aclocal.m4 | wc -l)
 
 :
old mode 100755 (executable)
new mode 100644 (file)
similarity index 90%
rename from t/acloca18.sh
rename to t/aclocal-serial.sh
index c0510e1..e256cd0
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2005-2012 Free Software Foundation, Inc.
+# Copyright (C) 2005-2017 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
@@ -17,7 +17,7 @@
 # Test for --install with #serial numbers.
 
 am_create_testdir=empty
-. ./defs || Exit 1
+. test-init.sh
 
 cat > configure.ac << 'END'
 AC_INIT
@@ -96,7 +96,7 @@ $FGREP ':macro14:' configure
 $FGREP ':macro23:' configure
 
 clean_stale
-$ACLOCAL -I 4 -I 1 -I 2 --install 2>stderr && { cat stderr >&2; Exit 1; }
+$ACLOCAL -I 4 -I 1 -I 2 --install 2>stderr && { cat stderr >&2; exit 1; }
 cat stderr >&2
 grep 'macro.*AM_MACRO2.*not found' stderr
 
@@ -118,19 +118,19 @@ clean_stale
 $ACLOCAL -I 4 -I 1 --diff=diff >stdout 2>stderr || {
   cat stderr >&2
   cat stdout
-  Exit 1
+  exit 1
 }
 cat stderr >&2
 cat stdout
 grep '#serial 456' stdout
-test ! -f 4/m1.m4
+test ! -e 4/m1.m4
 grep 'installing.*4/m1\.m4' stderr
 
-$ACLOCAL -I 5 2>stderr && { cat stderr >&2; Exit 1; }
+$ACLOCAL -I 5 2>stderr && { cat stderr >&2; exit 1; }
 cat stderr >&2
-test `grep -c 'ill-formed serial' stderr` -eq 3
+test $(grep -c 'ill-formed serial' stderr) -eq 3
 
-$ACLOCAL -I 6 2>stderr && { cat stderr >&2; Exit 1; }
+$ACLOCAL -I 6 2>stderr && { cat stderr >&2; exit 1; }
 cat stderr >&2
 grep 'serial.*before any macro definition' stderr
 
old mode 100755 (executable)
new mode 100644 (file)
similarity index 83%
rename from t/acloca23.sh
rename to t/aclocal-underquoted-defun.sh
index b5f66e4..2f07c03
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2010-2012 Free Software Foundation, Inc.
+# Copyright (C) 2010-2017 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
@@ -17,7 +17,7 @@
 # Ensure we diagnose underquoted AC_DEFUN's.
 
 am_create_testdir=empty
-. ./defs || Exit 1
+. test-init.sh
 
 cat > configure.ac << 'END'
 AC_INIT
@@ -29,9 +29,9 @@ cat >m4/foo.m4 <<EOF
 AC_DEFUN(FOO, [echo foo])
 EOF
 
-$ACLOCAL -I m4 2>stderr && { cat stderr >&2; Exit 1; }
+$ACLOCAL -I m4 2>stderr && { cat stderr >&2; exit 1; }
 cat stderr >&2
 grep 'underquoted definition.*FOO' stderr
-grep 'warning.*warning' stderr && Exit 1
+grep 'warning.*warning' stderr && exit 1
 
 :
old mode 100755 (executable)
new mode 100644 (file)
index 594c607..de6ea91
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2011-2012 Free Software Foundation, Inc.
+# Copyright (C) 2011-2017 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/>.
 
-# Check verbose messages by `aclocal --install'.
+# Check verbose messages by 'aclocal --install'.
 
 am_create_testdir=empty
-. ./defs || Exit 1
+. test-init.sh
 
 cat > configure.ac <<END
 AC_INIT([$me], [1.0])
@@ -37,7 +37,7 @@ mkdir foodir
 : > foodir/bar.m4
 
 $ACLOCAL --system-acdir=sys-acdir --install --verbose -I foodir 2>stderr \
- || { cat stderr >&2; Exit 1; }
+ || { cat stderr >&2; exit 1; }
 cat stderr >&2
 grep ' installing .*sys-acdir/bar\.m4.* to .*foodir/bar\.m4' stderr
 grep ' installing .*sys-acdir/quux\.m4.* to .*foodir/quux\.m4' stderr
old mode 100755 (executable)
new mode 100644 (file)
index 3e0cac6..64e1aa8
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 1998-2012 Free Software Foundation, Inc.
+# Copyright (C) 1998-2017 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
 # Test on some aclocal options.  Report from Alexandre Oliva.
 
 am_create_testdir=empty
-. ./defs || Exit 1
+. test-init.sh
 
 echo "AC_INIT([$me], [0]) AM_INIT_AUTOMAKE" > configure.ac
 
 $ACLOCAL --output=fred
 test -f fred
 
-$ACLOCAL --output 2>stderr && { cat stderr >&2; Exit 1; }
+$ACLOCAL --output 2>stderr && { cat stderr >&2; exit 1; }
 cat stderr >&2
 grep 'option.*--output.*requires an argument' stderr
 grep '[Tt]ry.*--help.*for more information' stderr
 
-$ACLOCAL --unknown-option 2>stderr && { cat stderr >&2; Exit 1; }
+$ACLOCAL --unknown-option 2>stderr && { cat stderr >&2; exit 1; }
 cat stderr >&2
 grep 'unrecognized option.*--unknown-option' stderr
 grep '[Tt]ry.*--help.*for more information' stderr
 
-$ACLOCAL foobar 2>stderr && { cat stderr >&2; Exit 1; }
+$ACLOCAL foobar 2>stderr && { cat stderr >&2; exit 1; }
 cat stderr >&2
 grep 'non-option argument.*foobar' stderr
 grep '[Tt]ry.*--help.*for more information' stderr
 
-$ACLOCAL --ver 2>stderr && { cat stderr >&2; Exit 1; }
+$ACLOCAL --ver 2>stderr && { cat stderr >&2; exit 1; }
 cat stderr >&2
 grep 'unrecognized option.*--ver' stderr
 grep '[Tt]ry.*--help.*for more information' stderr
old mode 100755 (executable)
new mode 100644 (file)
index 0f9c1cb..2157630
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 1996-2012 Free Software Foundation, Inc.
+# Copyright (C) 1996-2017 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
 
 # Test to make sure there are no spurious acinclude warnings.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat >configure.ac <<EOF
-AC_INIT
+AC_INIT([$me], [1.0])
 AM_INIT_GUILE_MODULE
 EOF
 
 cat > acinclude.m4 << 'END'
-AC_DEFUN([AM_INIT_GUILE_MODULE],[
-. $srcdir/../GUILE-VERSION
-AM_INIT_AUTOMAKE($PACKAGE, $VERSION)
+AC_DEFUN([AM_INIT_GUILE_MODULE], [
+AM_INIT_AUTOMAKE([dist-xz])
 AC_CONFIG_AUX_DIR(..)
 module=[$1]
 AC_SUBST(module)])
 END
 
-$ACLOCAL >output 2>&1 || { cat output; Exit 1; }
+$ACLOCAL >output 2>&1 || { cat output; exit 1; }
 cat output
 test ! -s output
old mode 100755 (executable)
new mode 100644 (file)
index 9390944..c05e890
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2002-2012 Free Software Foundation, Inc.
+# Copyright (C) 2002-2017 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
@@ -14,7 +14,7 @@
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_CC
old mode 100755 (executable)
new mode 100644 (file)
index e8c8663..60ccf29
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2002-2012 Free Software Foundation, Inc.
+# Copyright (C) 2002-2017 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/>.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_CC
-AM_PROG_CC_C_O
 AC_SUBST([FOOBAR_CFLAGS],[blablabla])
 END
 
old mode 100755 (executable)
new mode 100644 (file)
similarity index 86%
rename from t/instsh.sh
rename to t/add-missing-install-sh.sh
index 1fd1b3b..ba21c87
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 1996-2012 Free Software Foundation, Inc.
+# Copyright (C) 1996-2017 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
@@ -18,7 +18,7 @@
 # automake: Makefile.am: required file "../../install-sh" not found; installing
 # This also makes sure that install-sh is created in the correct directory.
 
-. ./defs || Exit 1
+. test-init.sh
 
 : > Makefile.am
 rm -f install-sh
@@ -30,10 +30,12 @@ mv Makefile.am configure.ac frob/
 cd frob
 
 $ACLOCAL
-$AUTOMAKE --add-missing > output 2>&1
+$AUTOMAKE --add-missing >output 2>&1 || { cat output; exit 1; }
+cat output
 
 # Only one '/' should appear in the output.
-cat output
-grep '/.*/' output && Exit 1
+grep '/.*/' output && exit 1
 
 test -f install-sh
+
+:
old mode 100755 (executable)
new mode 100644 (file)
similarity index 94%
rename from t/reqd.sh
rename to t/add-missing-multiple.sh
index 9e0bcc1..5f0772b
--- a/t/reqd.sh
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2002-2012 Free Software Foundation, Inc.
+# Copyright (C) 2002-2017 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
@@ -17,7 +17,7 @@
 # Make sure Automake will install several copies of required files if needed.
 # Reported by Marius Vollmer.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac <<EOF
 AC_CONFIG_FILES([one/Makefile two/Makefile])
@@ -43,3 +43,5 @@ test -f one/mdate-sh
 test -f one/texinfo.tex
 test -f two/mdate-sh
 test -f two/texinfo.tex
+
+:
old mode 100755 (executable)
new mode 100644 (file)
index 39b7ae7..512602c
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2011-2012 Free Software Foundation, Inc.
+# Copyright (C) 2011-2017 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
 # default, but copied if the '--copy' option is used.
 
 am_create_testdir=empty
-. ./defs || Exit 1
+. test-init.sh
 
 plan_ "later"
 
 build_aux=build-aux
-ocwd=`pwd` || fatal_ "cannot get current working directory"
+ocwd=$(pwd) || fatal_ "cannot get current working directory"
 
 # Try to improve readability of displayed diffs.
 if diff -u /dev/null /dev/null; then
@@ -62,6 +62,7 @@ AC_CANONICAL_TARGET
 AC_CANONICAL_SYSTEM
 AM_PATH_LISPDIR
 AM_PATH_PYTHON
+AC_OUTPUT
 END
 $ACLOCAL || framework_failure_ "cannot pre-compute aclocal.m4"
 
@@ -79,7 +80,7 @@ check_count=0
 check_ ()
 {
   set +x # Temporary disable shell traces to remove noise from log files.
-  incr_ check_count
+  check_count=$(($check_count + 1))
   echo check count: $check_count
   override=no
   run_aclocal=no
@@ -99,11 +100,9 @@ check_ ()
   # shared by its "subtests").
   mkdir generic
   cd generic
-  # Use 'echo > ...', not ': > ...', here and below, as Solaris 10 /bin/sh
-  # might not execute the latter (the Autoconf manual gives more details).
-  echo > Makefile.am
+  : > Makefile.am
   if test $override = yes; then
-    echo > configure.ac
+    : > configure.ac
   else
     cp "$ocwd"/configure.stub configure.ac
   fi
@@ -169,11 +168,11 @@ check_ ()
     for f in $files; do
       command_ok_ \
         "$pfx warn about missing file $f" \
-        grep "required file ['\`]$build_aux/$f' not found" stderr
+        $FGREP "required file '$build_aux/$f' not found" stderr
       # Suggest the user to use '--add-missing'.
       command_ok_ \
         "$pfx suggest --add-missing for $f" \
-        grep ".*--add-missing.* install .*$f" stderr
+        grep ".*--add-missing.* install .*'$f'" stderr
     done
     # No files should be automatically installed by automake if it
     # is not told to.
@@ -192,7 +191,7 @@ check_ ()
     for f in $files; do
       command_ok_ \
         "$pfx report installation of $f" \
-        grep ": installing ['\`]$build_aux/$f'$" stderr
+        $FGREP ": installing '$build_aux/$f'" stderr
     done
     # Only the expected files should be installed.  But automake always
     # require 'missing' and 'install-sh', so account for them.
@@ -249,6 +248,7 @@ check_ <<'END'
 depcomp/C
 == Files ==
 depcomp
+compile
 == configure.ac ==
 AC_PROG_CC
 == Makefile.am ==
@@ -273,14 +273,14 @@ compile
 == Files ==
 compile
 == configure.ac ==
-# Using AM_PROG_CC_C_O in configure.ac should be enough.  No need to
-# use AC_PROG_CC too, nor to define xxx_PROGRAMS in Makefile.am.
-AM_PROG_CC_C_O
+# Using AC_PROG_CC in configure.ac should be enough.
+# No need to also define, say, xxx_PROGRAMS in Makefile.am.
+AC_PROG_CC
 END
 
 # For config.guess and config.sub.
 for mach in build host target system; do
-  MACH=`echo "$mach" | LC_ALL=C tr '[a-z]' '[A-Z]'`
+  MACH=$(echo "$mach" | LC_ALL=C tr '[a-z]' '[A-Z]')
   check_ <<END
 == Name ==
 cfg-$mach
@@ -297,6 +297,7 @@ check_ <<'END'
 ylwrap/Lex
 == Files ==
 ylwrap
+compile
 == configure.ac ==
 AC_PROG_CC
 AC_PROG_LEX
@@ -311,6 +312,7 @@ check_ <<'END'
 ylwrap/Yacc
 == Files ==
 ylwrap
+compile
 == configure.ac ==
 AC_PROG_CC
 AC_PROG_YACC
@@ -345,17 +347,6 @@ rm -f foo.texi
 
 check_ <<'END'
 == Name ==
-elisp-comp
-== Files ==
-elisp-comp
-== configure.ac ==
-AM_PATH_LISPDIR
-== Makefile.am ==
-lisp_LISP = foo.el
-END
-
-check_ <<'END'
-== Name ==
 py-compile
 == Files ==
 py-compile
old mode 100755 (executable)
new mode 100644 (file)
index 0baf9da..70b1abf
--- a/t/all.sh
+++ b/t/all.sh
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 1999-2012 Free Software Foundation, Inc.
+# Copyright (C) 1999-2017 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
@@ -16,7 +16,7 @@
 
 # Test to make sure several *-local's in a single rule work.
 
-. ./defs || Exit 1
+. test-init.sh
 
 targets='all install-exec install-data uninstall'
 echo "$targets:" | sed -e 's/[ :]/-local&/g' > Makefile.am
old mode 100755 (executable)
new mode 100644 (file)
index da22e68..d80b62b
--- a/t/all2.sh
+++ b/t/all2.sh
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2010-2012 Free Software Foundation, Inc.
+# Copyright (C) 2010-2017 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
@@ -16,7 +16,7 @@
 
 # Test to make sure all-local and other -local targets work correctly.
 
-. ./defs || Exit 1
+. test-init.sh
 
 $ACLOCAL
 
@@ -25,7 +25,7 @@ for target in $targets; do
   : Doing $target
   echo "${target}-local:" > Makefile.am
   $AUTOMAKE
-  grep "${target}-local ${target}-local" Makefile.in && Exit 1
+  grep "${target}-local ${target}-local" Makefile.in && exit 1
   grep "${target}-am:.*${target}-local" Makefile.in
 done
 
old mode 100755 (executable)
new mode 100644 (file)
index c87904b..b56ce89
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2003-2012 Free Software Foundation, Inc.
+# Copyright (C) 2003-2017 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
@@ -16,7 +16,7 @@
 
 # Make sure we complain if @ALLOCA@ is used without being set in configure.ac
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac <<'END'
 AM_PROG_AR
old mode 100755 (executable)
new mode 100644 (file)
index 08fad97..8be2c56
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2003-2012 Free Software Foundation, Inc.
+# Copyright (C) 2003-2017 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
@@ -16,7 +16,7 @@
 
 # Make sure we complain if @LTALLOCA@ is used without being set in configure.ac
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac <<'END'
 AC_PROG_CC
old mode 100755 (executable)
new mode 100644 (file)
index 90f2cc2..35df26e
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 1998-2012 Free Software Foundation, Inc.
+# Copyright (C) 1998-2017 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
@@ -16,7 +16,7 @@
 
 # Make sure README-alpha is distributed when appropriate.  Report from
 # Jim Meyering.
-. ./defs || Exit 1
+. test-init.sh
 
 cat > configure.ac << 'END'
 AC_INIT([alpha], [1.0a])
@@ -60,11 +60,12 @@ $AUTOMAKE
 ./configure
 
 # "make distdir" should fail because NEWS does not mention 1.0a
-$MAKE check 2>stderr && { cat stderr >&2; Exit 1; }
-cat stderr >&2
+run_make -E -e FAIL check
 grep 'NEWS not updated' stderr
-test ! -f works
+test ! -e works
 
 echo 'alpha 1.0a released' > NEWS
 $MAKE check
 test -f works
+
+:
old mode 100755 (executable)
new mode 100644 (file)
index 6d5207f..0f3fb17
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2003-2012 Free Software Foundation, Inc.
+# Copyright (C) 2003-2017 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
@@ -17,7 +17,7 @@
 # Another check for README-alpha support.  This time it is requested
 # from configure.ac.  Report from Akim Demaille.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat > configure.ac << 'END'
 AC_INIT([alpha], [1.0b])
diff --git a/t/am-config-header.sh b/t/am-config-header.sh
new file mode 100644 (file)
index 0000000..945cf23
--- /dev/null
@@ -0,0 +1,50 @@
+#! /bin/sh
+# Copyright (C) 2012-2017 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 obsolete macro AM_CONFIG_HEADER still works.
+
+. test-init.sh
+
+cat > Makefile.am <<'END'
+check-local:
+       test -f oldconf.h
+       test -f $(srcdir)/oldconf.in
+END
+
+cat >> configure.ac <<'END'
+AM_CONFIG_HEADER([oldconf.h:oldconf.in])
+AC_OUTPUT
+END
+
+$ACLOCAL -Wno-obsolete
+
+$AUTOCONF -Werror -Wall 2>stderr && { cat stderr >&2; exit 1; }
+cat stderr >&2
+grep "^configure\.ac:4:.*'AM_CONFIG_HEADER'.*obsolete" stderr
+grep "'AC_CONFIG_HEADERS'.* instead" stderr
+
+$AUTOCONF -Werror -Wall -Wno-obsolete
+
+$AUTOHEADER
+test -f oldconf.in
+
+$AUTOMAKE
+
+./configure
+$MAKE check-local
+$MAKE distcheck
+
+:
old mode 100755 (executable)
new mode 100644 (file)
similarity index 96%
rename from t/specflg10.sh
rename to t/am-default-source-ext.sh
index 3b8fc5b..d42193d
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2008-2012 Free Software Foundation, Inc.
+# Copyright (C) 2008-2017 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
@@ -17,7 +17,7 @@
 # AM_DEFAULT_SOURCE_EXT
 
 required='cc c++'
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_CC
old mode 100755 (executable)
new mode 100644 (file)
similarity index 59%
rename from t/cygnus-requires-maintainer-mode.sh
rename to t/am-include-only-one-generated-fragment.sh
index 546e898..f0c6834
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2010-2012 Free Software Foundation, Inc.
+# Copyright (C) 2014-2017 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/>.
 
-# Check that, in cygnus mode, maintainer mode is required.
+# Check that inclusion of only one '.am' that can be regenerated via
+# a user-defined Makefile rule does not incur in spurious automake
+# warnings about "target redefinition".
 
-. ./defs || Exit 1
-
-: > Makefile.am
-
-$ACLOCAL
-AUTOMAKE_fails -Wno-obsolete --cygnus
-grep '^configure\.ac:.*AM_MAINTAINER_MODE.*required.*cygnus' stderr
+. test-init.sh
 
 cat >> configure.ac <<'END'
 AC_CONFIG_FILES([sub/Makefile])
+AC_OUTPUT
 END
 
 cat > Makefile.am <<'END'
-SUBDIRS = sub
+include foobar.am
+$(srcdir)/foobar.am: $(srcdir)/touch.sh
+       $(SHELL) $(srcdir)/touch.sh $(srcdir)/foobar.am
+EXTRA_DIST = touch.sh
 END
 
 mkdir sub
 cat > sub/Makefile.am <<'END'
-AUTOMAKE_OPTIONS = -Wno-obsolete cygnus
+include $(top_srcdir)/quux.am
+$(top_srcdir)/quux.am: $(top_srcdir)/touch.sh
+       $(SHELL) $(top_srcdir)/touch.sh $@
 END
 
-rm -rf autom4te.cache
-$ACLOCAL
-AUTOMAKE_fails
-grep '^configure\.ac:.*AM_MAINTAINER_MODE.*required.*cygnus' stderr
-
-cat >> configure.ac <<'END'
-AM_MAINTAINER_MODE
-END
+: > foobar.am
+: > quux.am
 
-rm -rf autom4te.cache
 $ACLOCAL
-$AUTOMAKE --cygnus -Wno-obsolete
+$AUTOMAKE
 
 :
old mode 100755 (executable)
new mode 100644 (file)
similarity index 86%
rename from t/ammissing.sh
rename to t/am-macro-not-found.sh
index aa28126..aed6535
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 1997-2012 Free Software Foundation, Inc.
+# Copyright (C) 1997-2017 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
 
 # Test to see if aclocal correctly reports missing AM_ macro.
 
-. ./defs || Exit 1
+. test-init.sh
 
 echo AM_ZARDOZ >> configure.ac
 
-$ACLOCAL 2>stderr && { cat stderr >&2; Exit 1; }
+$ACLOCAL 2>stderr && { cat stderr >&2; exit 1; }
 cat stderr
 grep 'configure.ac:.*AM_ZARDOZ.*not found' stderr
diff --git a/t/am-missing-prog.sh b/t/am-missing-prog.sh
new file mode 100644 (file)
index 0000000..b76b8f3
--- /dev/null
@@ -0,0 +1,97 @@
+#! /bin/sh
+# Copyright (C) 2003-2017 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 AM_MISSING_PROG.
+
+. test-init.sh
+
+cat >> configure.ac <<'END'
+AM_MISSING_PROG([NO_SUCH_COMMAND],    [am-none-none])
+AM_MISSING_PROG([MISMATCHED_COMMAND], [am-exit-63])
+AM_MISSING_PROG([OVERRIDDEN_COMMAND], [am-none-none])
+AM_MISSING_PROG([COMMAND_FOUND],      [my-command])
+AC_OUTPUT
+END
+
+mkdir bin
+cat > bin/am-exit-63 <<'END'
+#!/bin/sh
+echo "Oops, I'm too old"
+exit 63
+END
+cat > bin/am-overridden <<'END'
+#!/bin/sh
+echo "Hey, I'm OK!"
+exit 0
+END
+cat > bin/my-command <<'END'
+#!/bin/sh
+echo SNAFU
+exit 0
+END
+chmod a+x bin/*
+PATH=$(pwd)/bin$PATH_SEPARATOR$PATH; export PATH
+
+cat > Makefile.am <<'END'
+# Different for different targets, for the sake of parallel make.
+o = $@-stdout
+e = $@-stderr
+
+debug_info = grep . $@-stdout $@-stderr
+status_is = $(debug_info); echo $@: st=$$st; test $$st -eq
+
+w_mis = 'am-none-none' is needed, and is missing on your system
+w_old = 'am-exit-63' is needed, and is probably too old
+
+test1:
+       st=0; $(NO_SUCH_COMMAND) >$o 2>$e || st=$$?; $(status_is) 127
+        grep "^WARNING: $(w_mis)" $e
+       test ! -s $o
+test2:
+       st=0; $(MISMATCHED_COMMAND) >$o 2>$e || st=$$?; $(status_is) 63
+        grep "^WARNING: $(w_old)" $e
+       test "`cat $o`" = "Oops, I'm too old"
+test3:
+       st=0; $(OVERRIDDEN_COMMAND) >$o 2>$e || st=$$?; $(status_is) 0
+       st=0; $(OVERRIDDEN_COMMAND) >$o 2>$e || st=$$?; \
+       test ! -s $e
+       test "`cat $o`" = "Hey, I'm OK!"
+test4:
+       st=0; $(COMMAND_FOUND) >$o 2>$e || st=$$?; $(status_is) 0
+       test ! -s $e
+       test "`cat $o`" = SNAFU
+check-local: test1 test2 test2 test4
+.PHONY: test1 test2 test2 test4
+CLEANFILES = test[1234]-stdout test[1234]-stderr
+END
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE
+
+./configure OVERRIDDEN_COMMAND=am-overridden
+
+$FGREP COMMAND Makefile.in Makefile # For debugging.
+
+grep "^NO_SUCH_COMMAND = \${SHELL} .*/missing .*am-none-none" Makefile
+grep "^MISMATCHED_COMMAND = \${SHELL} .*/missing .*am-exit-63" Makefile
+grep "^COMMAND_FOUND = \${SHELL} .*/missing .*my-command" Makefile
+grep '^OVERRIDDEN_COMMAND = am-overridden *$' Makefile
+
+$MAKE test1 test2 test3 test4
+$MAKE distcheck DISTCHECK_CONFIGURE_FLAGS='OVERRIDDEN_COMMAND=am-overridden'
+
+:
diff --git a/t/am-prog-cc-c-o.sh b/t/am-prog-cc-c-o.sh
new file mode 100644 (file)
index 0000000..b5439c8
--- /dev/null
@@ -0,0 +1,126 @@
+#! /bin/sh
+# Copyright (C) 2013-2017 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 uses of the obsolescent AM_PROG_CC_C_O macro doesn't
+# cause spurious warnings or errors.  Suggested by Eric Blake.
+
+# We need gcc for for two reasons:
+#  1. to ensure our C compiler grasps "-c -o" together.
+#  2. to be able to later fake a dumb compiler not grasping that
+#     (done with 'cc-no-c-o' script below, which required gcc).
+required=gcc
+. test-init.sh
+
+echo bin_PROGRAMS = foo > Makefile.am
+echo 'int main (void) { return 0; }' > foo.c
+
+cp configure.ac configure.bak
+
+cat > acinclude.m4 <<'END'
+AC_DEFUN([AM_TWEAKED_OUTPUT], [
+# For debugging.
+printf "CC = '%s'\\n" "$CC"
+# Make sure that $CC can be used after AM_PROG_CC_C_O.
+$CC --version || exit 1
+$CC -v || exit 1
+# $CC rewrite should only take place on time.
+case " $CC " in
+  *" compile"*" compile"*) AC_MSG_ERROR([CC rewritten twice]);;
+esac
+AC_OUTPUT
+])
+END
+
+# ---
+
+cat configure.bak - > configure.ac << 'END'
+dnl It's OK to call AM_PROG_CC_C_O after AC_PROG_CC.
+AC_PROG_CC
+AM_PROG_CC_C_O
+AM_TWEAKED_OUTPUT
+END
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE --add-missing
+
+./configure >stdout || { cat stdout; exit 1; }
+cat stdout
+if test "$AM_TESTSUITE_SIMULATING_NO_CC_C_O" != no; then
+  $EGREP 'understands? -c and -o together.* no$' stdout
+else
+  $EGREP 'understands? -c and -o together.* yes$' stdout
+fi
+
+# No repeated checks please.
+test $(grep -c ".*-c['\" ].*-o['\" ]" stdout) -eq 1
+
+$MAKE
+$MAKE maintainer-clean
+rm -rf autom4te*.cache
+
+# ---
+
+cat configure.bak - > configure.ac << 'END'
+dnl It's also OK to call AM_PROG_CC_C_O *before* AC_PROG_CC.
+AM_PROG_CC_C_O
+AC_PROG_CC
+AM_TWEAKED_OUTPUT
+END
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE --add-missing
+
+./configure >stdout || { cat stdout; exit 1; }
+cat stdout
+if test "$AM_TESTSUITE_SIMULATING_NO_CC_C_O" != no; then
+  $EGREP 'understands? -c and -o together.* no$' stdout
+else
+  $EGREP 'understands? -c and -o together.* yes$' stdout
+fi
+
+# Repeated checks are OK in this case, but should be cached.
+test $(grep ".*-c['\" ].*-o['\" ]" stdout \
+        | $FGREP -v ' (cached) ' | wc -l) -eq 1
+
+$MAKE
+$MAKE maintainer-clean
+rm -rf autom4te*.cache
+
+# ---
+
+cat configure.bak - > configure.ac << 'END'
+dnl It's also OK to call AM_PROG_CC_C_O *without* AC_PROG_CC.
+AM_PROG_CC_C_O
+AM_TWEAKED_OUTPUT
+END
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE --add-missing
+
+# Make sure the compiler doesn't understand '-c -o'
+CC=$am_testaux_builddir/cc-no-c-o; export CC
+
+./configure >stdout || { cat stdout; exit 1; }
+cat stdout
+$EGREP 'understands? -c and -o together.* no$' stdout
+# No repeated checks please.
+test $(grep -c ".*-c['\" ].*-o['\" ]" stdout) -eq 1
+$MAKE
+
+:
diff --git a/t/am-prog-cc-stdc.sh b/t/am-prog-cc-stdc.sh
new file mode 100644 (file)
index 0000000..6f9903f
--- /dev/null
@@ -0,0 +1,44 @@
+#! /bin/sh
+# Copyright (C) 2012-2017 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 obsolete macro the obsolete macro AM_PROG_CC_STDC
+# still works.
+
+required=gcc
+. test-init.sh
+
+cat >> configure.ac <<'END'
+AM_PROG_CC_STDC
+AC_OUTPUT
+END
+
+echo bin_PROGRAMS = foo > Makefile.am
+
+$ACLOCAL
+$AUTOMAKE
+
+$AUTOCONF -Wnone -Wobsolete -Werror 2>stderr && { cat stderr >&2; exit 1; }
+cat stderr >&2
+grep "^configure\.ac:4:.*'AM_PROG_CC_STDC'.*obsolete" stderr
+grep "'AC_PROG_CC'.* instead" stderr
+
+echo 'int main (void) { return 0; }' > foo.c
+
+./configure
+$MAKE
+$MAKE distcheck
+
+:
old mode 100755 (executable)
new mode 100644 (file)
index f2931e6..d29c995
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2011-2012 Free Software Foundation, Inc.
+# Copyright (C) 2011-2017 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
@@ -17,7 +17,7 @@
 # parallel-tests: check AM_TESTS_ENVIRONMENT support, and its
 # interactions with TESTS_ENVIRONMENT.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_MKDIR_P
@@ -74,16 +74,16 @@ $AUTOMAKE -a
 
 ./configure
 
-TESTS_ENVIRONMENT='BAR=1' $MAKE check || { debug_info; Exit 1; }
+TESTS_ENVIRONMENT='BAR=1' $MAKE check || { debug_info; exit 1; }
 minicheck
 miniclean
 
-TESTS_ENVIRONMENT='BAR=2' $MAKE check && { debug_info; Exit 1; }
+TESTS_ENVIRONMENT='BAR=2' $MAKE check && { debug_info; exit 1; }
 minicheck
 miniclean
 
 echo 'BAR=1 && export BAR' > test-env.sh
-$MAKE check || { debug_info; Exit 1; }
+$MAKE check || { debug_info; exit 1; }
 minicheck
 $MAKE distcheck
 
old mode 100755 (executable)
new mode 100644 (file)
index 1649dd0..9d89101
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2001-2012 Free Software Foundation, Inc.
+# Copyright (C) 2001-2017 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
@@ -17,7 +17,7 @@
 # Test to see if AM_ name can be assigned to in configure.ac.
 # Report from Steve Robbins.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AM_CFLAGS=foo
old mode 100755 (executable)
new mode 100644 (file)
index 4b3e0e2..5f2501c
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2011-2012 Free Software Foundation, Inc.
+# Copyright (C) 2011-2017 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
@@ -18,7 +18,7 @@
 # using DESTDIR to build simple, no-frills binary packages.
 
 am_create_testdir=empty
-. ./defs || Exit 1
+. test-init.sh
 
 cp "$am_docdir"/amhello-1.0.tar.gz . \
   || fatal_ "cannot get amhello tarball"
@@ -28,12 +28,12 @@ cd amhello-1.0
 
 ./configure --prefix /usr
 $MAKE
-$MAKE DESTDIR="`pwd`/inst" install
+$MAKE DESTDIR="$(pwd)/inst" install
 cd inst
 find . -type f -print > ../files.lst
-tar cvf amhello-1.0-i686.tar.gz `cat ../files.lst` > tar.got 2>&1
+tar cvf amhello-1.0-i686.tar.gz $(cat ../files.lst) > tar.got 2>&1
 
-EXEEXT=`sed -n -e 's/^EXEEXT *= *//p' < ../Makefile`
+EXEEXT=$(sed -n -e 's/^EXEEXT *= *//p' < ../Makefile)
 
 if tar --version </dev/null | grep GNU; then
   LC_ALL=C sort tar.got > t
@@ -44,8 +44,8 @@ if tar --version </dev/null | grep GNU; then
 END
 else
   : Be laxer with other tar implementations, to avoid spurious failures.
-  $EGREP '(^| )\./usr/bin/hello'$EXEEXT'( |$)' tar.got
-  $EGREP '(^| )\./usr/share/doc/amhello/README( |$)' tar.got
+  $EGREP '(^| )(\./)?usr/bin/hello'$EXEEXT'( |$)' tar.got
+  $EGREP '(^| )(\./)?usr/share/doc/amhello/README( |$)' tar.got
 fi
 
 :
old mode 100755 (executable)
new mode 100644 (file)
index 4132bc1..9d1cfc7
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2011-2012 Free Software Foundation, Inc.
+# Copyright (C) 2011-2017 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
@@ -20,7 +20,7 @@
 
 am_create_testdir=empty
 required=gcc
-. ./defs || Exit 1
+. test-init.sh
 
 cp "$am_docdir"/amhello-1.0.tar.gz . \
   || fatal_ "cannot get amhello tarball"
@@ -45,6 +45,6 @@ for exeext in '' .exe :; do
   test -f optim/src/hello$exeext && break
   test "$exeext" = : && fatal_ "cannot determine extension of executables"
 done
-cmp optim/src/hello$exeext debug/src/hello$exeext && Exit 1
+cmp optim/src/hello$exeext debug/src/hello$exeext && exit 1
 
 :
old mode 100755 (executable)
new mode 100644 (file)
index b138d87..556fd46
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2011-2012 Free Software Foundation, Inc.
+# Copyright (C) 2011-2017 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
 
 am_create_testdir=empty
 required=i586-mingw32msvc-gcc
-. ./defs || Exit 1
+. test-init.sh
 
 cp "$am_docdir"/amhello-1.0.tar.gz . \
   || fatal_ "cannot get amhello tarball"
 
 host=i586-mingw32msvc
-build=`"$am_scriptdir"/config.guess` && test -n "$build" \
+build=$("$am_scriptdir"/config.guess) && test -n "$build" \
   || fatal_ "cannot guess build platform"
 case $build in *mingw*) skip_ "build system is MinGW too";; esac
 
@@ -33,7 +33,7 @@ gzip -dc amhello-1.0.tar.gz | tar xf -
 cd amhello-1.0
 
 ./configure --build "$build" --host "$host" > stdout \
-  || { cat stdout ; Exit 1; }
+  || { cat stdout ; exit 1; }
 cat stdout
 grep '^checking for i586-mingw32msvc-strip\.\.\.' stdout
 grep '^checking for i586-mingw32msvc-gcc\.\.\.' stdout
@@ -48,6 +48,6 @@ file hello.exe > whatis
 cat whatis
 $EGREP 'DOS|Win' whatis
 grep 'executable' whatis
-grep 'ELF' whatis && Exit 1
+grep 'ELF' whatis && exit 1
 
 :
old mode 100755 (executable)
new mode 100644 (file)
index ac91d1d..045d9f3
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2012 Free Software Foundation, Inc.
+# Copyright (C) 2012-2017 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
@@ -17,7 +17,7 @@
 # Check that automake warns against old-style usages of AM_INIT_AUTOMAKE
 # (i.e., calls with two or three arguments).
 
-. ./defs || Exit 1
+. test-init.sh
 
 warn_rx='AM_INIT_AUTOMAKE.* two-.* three-arguments form.*deprecated'
 
@@ -33,10 +33,10 @@ do_check()
 {
   rm -rf autom4te*.cache
   for cmd in "$AUTOCONF" "$AUTOMAKE"; do
-    $cmd -Werror -Wnone -Wobsolete 2>stderr && { cat stderr; Exit 1; }
+    $cmd -Werror -Wnone -Wobsolete 2>stderr && { cat stderr; exit 1; }
     cat stderr >&2
     grep "^configure\.ac:2:.*$warn_rx" stderr
-    $cmd -Werror -Wall -Wno-obsolete || Exit 1
+    $cmd -Werror -Wall -Wno-obsolete || exit 1
   done
 }
 
diff --git a/t/aminit-trailing-dnl-comment-pr16841.sh b/t/aminit-trailing-dnl-comment-pr16841.sh
new file mode 100644 (file)
index 0000000..a238eee
--- /dev/null
@@ -0,0 +1,44 @@
+#! /bin/sh
+# Copyright (C) 2014-2017 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 a trailing 'dnl' m4 comment automake after the
+# AM_INIT_AUTOMAKE invocation doesn't produce a syntactically
+# invalid configure script.  This used to be the case until
+# automake 1.13, but we broke that in automake 1.14. See
+# automake bug#16841.
+
+am_create_testdir=empty
+. test-init.sh
+
+cat > configure.ac <<END
+AC_INIT([test-pr16841], [1.0])
+AM_INIT_AUTOMAKE([1.14 -Werror]) dnl Some comment
+echo "OK OK OK"
+AC_CONFIG_FILES([Makefile])
+AC_OUTPUT
+END
+
+: > Makefile.am
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE -a
+
+./configure >stdout || { cat stdout; exit 1; }
+cat stdout
+grep '^OK OK OK$' stdout
+
+:
old mode 100755 (executable)
new mode 100644 (file)
index 7861184..d70cdea
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2006-2012 Free Software Foundation, Inc.
+# Copyright (C) 2006-2017 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
@@ -17,7 +17,7 @@
 # Make Automake diagnose a conditional AUTOMAKE_OPTIONS.
 # Report from Bas Wijnen.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat >>configure.ac <<END
 AM_CONDITIONAL([COND], [true])
old mode 100755 (executable)
new mode 100644 (file)
index 0219f18..9c1ad36
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2011-2012 Free Software Foundation, Inc.
+# Copyright (C) 2011-2017 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
@@ -17,7 +17,7 @@
 # Check that errors about AUTOMAKE_OPTIONS refers to correct
 # locations.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat > Makefile.am <<'END'
 # comment \
@@ -78,6 +78,6 @@ cat stderr \
   | grep -v '^Makefile1\.am:1:' \
   | grep -v '^Makefile2\.am:6:' \
   | grep -v '^Makefile3\.am:2:' \
-  | grep . && Exit 1
+  | grep . && exit 1
 
 :
old mode 100755 (executable)
new mode 100644 (file)
index 8a035d1..bae72d6
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2011-2012 Free Software Foundation, Inc.
+# Copyright (C) 2011-2017 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
@@ -16,7 +16,7 @@
 
 # Check that AUTOMAKE_OPTIONS support variable expansion.
 
-. ./defs || Exit 1
+. test-init.sh
 
 # We want complete control over automake options.
 AUTOMAKE=$am_original_AUTOMAKE
@@ -46,7 +46,7 @@ END
 $ACLOCAL
 AUTOMAKE_run
 grep '^Makefile\.am:.*:=.*not portable' stderr
-grep README stderr && Exit 1
-$EGREP '(install|override)' stderr && Exit 1
+grep README stderr && exit 1
+$EGREP '(install|override)' stderr && exit 1
 
 :
old mode 100755 (executable)
new mode 100644 (file)
index b655ce4..d8fda78
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2006-2012 Free Software Foundation, Inc.
+# Copyright (C) 2006-2017 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
@@ -16,7 +16,7 @@
 
 # Check for _AM_SUBST_NOTMAKE.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_SUBST([backslash], "\\")
old mode 100755 (executable)
new mode 100644 (file)
index fb2e2a5..f912802
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2011-2012 Free Software Foundation, Inc.
+# Copyright (C) 2011-2017 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
@@ -17,7 +17,7 @@
 # Check that any attempt to use the obsolete de-ANSI-fication support
 # is diagnosed.
 
-. ./defs || Exit 1
+. test-init.sh
 
 warn_rx='automatic de-ANSI-fication.*removed'
 
@@ -28,12 +28,12 @@ cp configure.ac configure.sav
 
 echo AM_C_PROTOTYPES >> configure.ac
 
-$ACLOCAL -Wnone 2>stderr && { cat stderr >&2; Exit 1; }
+$ACLOCAL -Wnone 2>stderr && { cat stderr >&2; exit 1; }
 cat stderr >&2
 grep "^configure\\.ac:5:.*$warn_rx" stderr
 
-cat aclocal.sav "$am_automake_acdir"/protos.m4 > aclocal.m4
-$AUTOCONF -Wnone 2>stderr && { cat stderr >&2; Exit 1; }
+cat aclocal.sav "$am_automake_acdir"/obsolete.m4 > aclocal.m4
+$AUTOCONF -Wnone 2>stderr && { cat stderr >&2; exit 1; }
 cat stderr >&2
 grep "^configure\\.ac:5:.*$warn_rx" stderr
 
@@ -45,7 +45,7 @@ for opt in ansi2knr lib/ansi2knr; do
   AUTOMAKE_fails -Wnone
   grep "^Makefile\.am:1:.*$warn_rx" stderr
   # ansi2knr option in configure.ac
-  echo > Makefile.am # `echo', not `:', for Solaris /bin/sh.
+  : > Makefile.am
   sed "s|^\\(AM_INIT_AUTOMAKE\\).*|\1([$opt])|" configure.sav >configure.ac
   cat configure.ac # For debugging.
   rm -rf autom4te*.cache
old mode 100755 (executable)
new mode 100644 (file)
index 3fcf779..f8a1cfd
@@ -1,14 +1,15 @@
 #! /bin/sh
 # This file has been automatically generated.  DO NOT EDIT BY HAND!
-. ./defs-static || exit '99';
+. test-lib.sh
+
 am_test_prefer_config_shell=yes
 # 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/t/ar-lib.sh"; then
     echo "$0: will source $dir/t/ar-lib.sh"
-    . "$dir/t/ar-lib.sh"; exit "$?"
+    . "$dir/t/ar-lib.sh"; exit $?
   fi
 done
 echo "$0: cannot find wrapped test 't/ar-lib.sh'" >&2
-exit '99'
+exit 99
old mode 100755 (executable)
new mode 100644 (file)
index 1ddec64..b59470b
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2010-2012 Free Software Foundation, Inc.
+# Copyright (C) 2010-2017 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
@@ -18,7 +18,7 @@
 
 am_create_testdir=empty
 required=xsi-lib-shell
-. ./defs || Exit 1
+. test-init.sh
 
 get_shell_script ar-lib
 
@@ -37,77 +37,77 @@ END
 chmod +x ./lib
 
 # Check if ar-lib can create an archive with "cr".
-opts=`./ar-lib ./lib cr foo.lib foo.obj`
+opts=$(./ar-lib ./lib cr foo.lib foo.obj)
 test x"$opts" = x"lib -NOLOGO -OUT:foo.lib foo.obj"
 
 # Check if ar-lib can update an existing archive with "r".
 touch foo.lib
-opts=`./ar-lib ./lib r foo.lib foo.obj`
+opts=$(./ar-lib ./lib r foo.lib foo.obj)
 test x"$opts" = x"lib -NOLOGO -OUT:foo.lib foo.lib foo.obj"
 
 # Check if ar-lib can update an existing archive with "q".
-opts=`./ar-lib ./lib q foo.lib foo.obj`
+opts=$(./ar-lib ./lib q foo.lib foo.obj)
 test x"$opts" = x"lib -NOLOGO -OUT:foo.lib foo.lib foo.obj"
 
 # Check if ar-lib accepts "u" as a modifier.
 # NOTE: "u" should have an effect, but currently doesn't.
-opts=`./ar-lib ./lib ru foo.lib foo.obj`
+opts=$(./ar-lib ./lib ru foo.lib foo.obj)
 test x"$opts" = x"lib -NOLOGO -OUT:foo.lib foo.lib foo.obj"
 
 # Check if ar-lib accepts "s" as a modifier.
-opts=`./ar-lib ./lib rs foo.lib foo.obj`
+opts=$(./ar-lib ./lib rs foo.lib foo.obj)
 test x"$opts" = x"lib -NOLOGO -OUT:foo.lib foo.lib foo.obj"
 
 # Check if ar-lib accepts "S" as a modifier.
-opts=`./ar-lib ./lib rS foo.lib foo.obj`
+opts=$(./ar-lib ./lib rS foo.lib foo.obj)
 test x"$opts" = x"lib -NOLOGO -OUT:foo.lib foo.lib foo.obj"
 
 # Check if ar-lib passes on @FILE with "r"
-opts=`./ar-lib ./lib r foo.lib @list`
+opts=$(./ar-lib ./lib r foo.lib @list)
 test x"$opts" = x"lib -NOLOGO -OUT:foo.lib foo.lib @list"
 
 # Check if ar-lib can delete a member from an archive with "d".
-opts=`./ar-lib ./lib d foo.lib foo.obj`
+opts=$(./ar-lib ./lib d foo.lib foo.obj)
 test x"$opts" = x"lib -NOLOGO -REMOVE:foo.obj foo.lib"
 
 # Check if ar-lib can delete members in an @FILE.
 echo foo.obj > foolist
-opts=`./ar-lib ./lib d foo.lib @foolist`
+opts=$(./ar-lib ./lib d foo.lib @foolist)
 test x"$opts" = x"lib -NOLOGO -REMOVE:foo.obj foo.lib"
 
 # Check if ar-lib can list archive members with "t".
-opts=`./ar-lib ./lib t foo.lib`
+opts=$(./ar-lib ./lib t foo.lib)
 test x"$opts" = x"lib -NOLOGO -LIST foo.lib"
 
 # Check if ar-lib accepts "v" as a modifier.
 # NOTE: "v" should have an effect, but currently doesn't.
-opts=`./ar-lib ./lib tv foo.lib`
+opts=$(./ar-lib ./lib tv foo.lib)
 test x"$opts" = x"lib -NOLOGO -LIST foo.lib"
 
 # Check if ar-lib can extract archive members with "x".
 touch fake.lib
-opts=`./ar-lib ./lib x fake.lib`
+opts=$(./ar-lib ./lib x fake.lib)
 test x"$opts" = x"lib -NOLOGO -EXTRACT:fake.obj fake.lib"
 
 # Check if ar-lib can extract specified archive members with "x".
-opts=`./ar-lib ./lib x foo.lib foo.obj`
+opts=$(./ar-lib ./lib x foo.lib foo.obj)
 test x"$opts" = x"lib -NOLOGO -EXTRACT:foo.obj foo.lib"
 
 # Check if ar-lib can extract members in an @FILE.
-opts=`./ar-lib ./lib x foo.lib @foolist`
+opts=$(./ar-lib ./lib x foo.lib @foolist)
 test x"$opts" = x"lib -NOLOGO -EXTRACT:foo.obj foo.lib"
 
 # Check if ar-lib passes -lib and -LTCG through to the wrappee.
-opts=`./ar-lib ./lib -lib -LTCG x foo.lib foo.obj`
+opts=$(./ar-lib ./lib -lib -LTCG x foo.lib foo.obj)
 test x"$opts" = x"lib -lib -LTCG -NOLOGO -EXTRACT:foo.obj foo.lib"
 
 # Check if ar-lib can extract backslashed members.
 touch fake2.lib
-opts=`./ar-lib ./lib x fake2.lib`
+opts=$(./ar-lib ./lib x fake2.lib)
 test x"$opts" = x"lib -NOLOGO -EXTRACT:dir\\fake2.obj fake2.lib"
 
 # Check if ar-lib accepts "s" as an action.
-opts=`./ar-lib ./lib s foo.lib`
+opts=$(./ar-lib ./lib s foo.lib)
 test x"$opts" = x
 
 :
old mode 100755 (executable)
new mode 100644 (file)
index 7d7e9b5..e144a3a
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2011-2012 Free Software Foundation, Inc.
+# Copyright (C) 2011-2017 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
@@ -16,7 +16,7 @@
 
 # Test if AM_PROG_AR installs ar-lib.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_CC
@@ -29,7 +29,7 @@ wish_SOURCES = a.c
 END
 
 $ACLOCAL
-$AUTOMAKE --add-missing 2>stderr || { cat stderr >&2; Exit 1; }
+$AUTOMAKE --add-missing 2>stderr || { cat stderr >&2; exit 1; }
 cat stderr >&2
 # Make sure ar-lib is installed, and that Automake says so.
 grep '^configure\.ac:.*install.*ar-lib' stderr
old mode 100755 (executable)
new mode 100644 (file)
index 02696f6..836da72
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2011-2012 Free Software Foundation, Inc.
+# Copyright (C) 2011-2017 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
@@ -16,7 +16,7 @@
 
 # Test if lib_LIBRARIES requests AM_PROG_AR.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_CC
old mode 100755 (executable)
new mode 100644 (file)
index d1be2eb..867571b
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2011-2012 Free Software Foundation, Inc.
+# Copyright (C) 2011-2017 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
@@ -17,7 +17,7 @@
 # Test if lib_LTLIBRARIES requests AM_PROG_AR.
 
 required=libtoolize
-. ./defs || Exit 1
+. test-init.sh
 
 cp configure.ac X
 
@@ -39,6 +39,8 @@ AUTOMAKE_fails
 
 grep 'requires.*AM_PROG_AR' stderr
 
+rm -rf autom4te*.cache
+
 cp X configure.ac
 
 cat >> configure.ac << 'END'
old mode 100755 (executable)
new mode 100644 (file)
index 1987936..1b19d14
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2011-2012 Free Software Foundation, Inc.
+# Copyright (C) 2011-2017 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
 
 # Test if AM_PROG_AR triggers the use of the ar-lib script.
 # This test requires Microsoft lib.
-# Keep this test in sync with sister test 'ar-lib5b.test'.
+# Keep this test in sync with sister test 'ar-lib5b.sh'.
 
 required=lib
-. ./defs || Exit 1
+. test-init.sh
 
 cat > configure.ac << END
 AC_INIT([$me], [1.0])
old mode 100755 (executable)
new mode 100644 (file)
index 2fb0cf4..675745a
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2011-2012 Free Software Foundation, Inc.
+# Copyright (C) 2011-2017 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
@@ -16,9 +16,9 @@
 
 # Test if AM_PROG_AR triggers the use of the ar-lib script.
 # This test does not require Microsoft lib.
-# Keep this test in sync with sister test 'ar-lib5a.test'.
+# Keep this test in sync with sister test 'ar-lib5a.sh'.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat > configure.ac << END
 AC_INIT([$me], [1.0])
@@ -80,7 +80,7 @@ case " $* " in
 esac
 END
 chmod +x bin/lib
-PATH=`pwd`/bin$PATH_SEPARATOR$PATH; export PATH
+PATH=$(pwd)/bin$PATH_SEPARATOR$PATH; export PATH
 
 $ACLOCAL
 $AUTOCONF
old mode 100755 (executable)
new mode 100644 (file)
index be6afcd..6fd1e40
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2011-2012 Free Software Foundation, Inc.
+# Copyright (C) 2011-2017 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 # Test AM_PROG_AR ordering requirements
-# Keep this test in sync with sister test 'ar-lib6b.test'.
+# Keep this test in sync with sister test 'ar-lib6b.sh'.
 
 required=libtoolize
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_CC
@@ -29,7 +29,7 @@ END
 
 libtoolize
 $ACLOCAL
-$AUTOCONF 2>stderr || { cat stderr >&2; Exit 1; }
+$AUTOCONF 2>stderr || { cat stderr >&2; exit 1; }
 cat stderr >&2
 
 $EGREP '(AC_PROG_LIBTOOL|LT_INIT).*before.*AM_PROG_AR' stderr
old mode 100755 (executable)
new mode 100644 (file)
index 54c0222..53fb1cf
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2011-2012 Free Software Foundation, Inc.
+# Copyright (C) 2011-2017 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 # Test AM_PROG_AR ordering requirements for older Libtools
-# Keep this test in sync with sister test 'ar-lib6a.test'.
+# Keep this test in sync with sister test 'ar-lib6a.sh'.
 
 required=libtoolize
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_CC
@@ -29,7 +29,7 @@ END
 
 libtoolize
 $ACLOCAL
-$AUTOCONF 2>stderr || { cat stderr >&2; Exit 1; }
+$AUTOCONF 2>stderr || { cat stderr >&2; exit 1; }
 cat stderr >&2
 
 $EGREP 'AC_PROG_LIBTOOL.*before.*AM_PROG_AR' stderr
old mode 100755 (executable)
new mode 100644 (file)
index 34e6c6e..fdea9d8
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2011-2012 Free Software Foundation, Inc.
+# Copyright (C) 2011-2017 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
@@ -16,7 +16,7 @@
 
 # Test if automake warns if ar-lib is missing when AM_PROG_AR is used.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AM_PROG_AR
diff --git a/t/ar.sh b/t/ar.sh
old mode 100755 (executable)
new mode 100644 (file)
index b8d9901..b2eba8e
--- a/t/ar.sh
+++ b/t/ar.sh
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2001-2012 Free Software Foundation, Inc.
+# Copyright (C) 2001-2017 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
@@ -16,7 +16,7 @@
 
 # Make sure that AR, ARFLAGS, and RANLIB can be substituted from configure.ac.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AM_PROG_AR
old mode 100755 (executable)
new mode 100644 (file)
index c71afea..b6a9889
--- a/t/ar2.sh
+++ b/t/ar2.sh
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2004-2012 Free Software Foundation, Inc.
+# Copyright (C) 2004-2017 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
@@ -17,7 +17,7 @@
 # Make sure AR and ARFLAGS are defined for EXTRA_LIBRARIES.
 # Report from Kevin Ryde.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_CC
old mode 100755 (executable)
new mode 100644 (file)
index ba0b4b7..2fd66ab
--- a/t/ar3.sh
+++ b/t/ar3.sh
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2011-2012 Free Software Foundation, Inc.
+# Copyright (C) 2011-2017 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
@@ -17,7 +17,7 @@
 # Make sure that AR, ARFLAGS, etc. works also when the macro AM_PROG_AR
 # is used.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_CC
old mode 100755 (executable)
new mode 100644 (file)
index 424a776..34e6fd8
--- a/t/ar4.sh
+++ b/t/ar4.sh
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2011-2012 Free Software Foundation, Inc.
+# Copyright (C) 2011-2017 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
@@ -16,7 +16,7 @@
 
 # Test if configure bails out if $AR does not work and AM_PROG_AR is used.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AM_PROG_AR
@@ -32,6 +32,6 @@ test $st -eq 1
 
 grep '^checking.* archiver .*interface.*\.\.\. unknown' stdout
 grep '^configure: error: could not determine /bin/false interface' stderr
-ls *conftest* && Exit 1
+ls *conftest* && exit 1
 
 :
old mode 100755 (executable)
new mode 100644 (file)
index 711fad6..2c1660b
--- a/t/ar5.sh
+++ b/t/ar5.sh
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2011-2012 Free Software Foundation, Inc.
+# Copyright (C) 2011-2017 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
@@ -16,7 +16,7 @@
 
 # Test the optional argument of AM_PROG_AR.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AM_PROG_AR([
@@ -30,7 +30,7 @@ END
 $ACLOCAL
 $AUTOCONF
 
-./configure AR=/bin/false >stdout || { cat stdout; Exit 1; }
+./configure AR=/bin/false >stdout || { cat stdout; exit 1; }
 cat stdout
 grep '^checking.* archiver .*interface.*\.\.\. unknown$' stdout
 grep '^checking for something else\.\.\. found it$' stdout
old mode 100755 (executable)
new mode 100644 (file)
index b9a958d..bc0121f
--- a/t/asm.sh
+++ b/t/asm.sh
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2001-2012 Free Software Foundation, Inc.
+# Copyright (C) 2001-2017 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
@@ -15,9 +15,9 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 # Test of basic assembly functionality.
-# Keep this in sync with sister tests asm2.test and asm3.test.
+# Keep this in sync with sister tests 'asm2.sh' and 'asm3.sh'.
 
-. ./defs || Exit 1
+. test-init.sh
 
 mv configure.ac configure.stub
 
old mode 100755 (executable)
new mode 100644 (file)
index 737d46d..02e2a3c
--- a/t/asm2.sh
+++ b/t/asm2.sh
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2001-2012 Free Software Foundation, Inc.
+# Copyright (C) 2001-2017 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
@@ -15,9 +15,9 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 # Test of basic preprocessed assembly functionality.
-# Keep this in sync with sister tests asm.test and asm3.test.
+# Keep this in sync with sister tests 'asm.sh' and 'asm3.sh'.
 
-. ./defs || Exit 1
+. test-init.sh
 
 mv configure.ac configure.stub
 
old mode 100755 (executable)
new mode 100644 (file)
index f7f835a..97d12e1
--- a/t/asm3.sh
+++ b/t/asm3.sh
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2001-2012 Free Software Foundation, Inc.
+# Copyright (C) 2001-2017 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 of basic preprocessed assembly functionality with extension .sx.
-# Keep this in sync with sister tests asm.test and asm2.test.
+# Test of basic preprocessed assembly functionality with extension '.sx'.
+# Keep this in sync with sister tests 'asm.sh' and 'asm2.sh'.
 
-. ./defs || Exit 1
+. test-init.sh
 
 mv configure.ac configure.stub
 
old mode 100755 (executable)
new mode 100644 (file)
index d4ad1d9..1a193ae
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2011-2012 Free Software Foundation, Inc.
+# Copyright (C) 2011-2017 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
@@ -18,7 +18,7 @@
 # placed in a subdirectory.
 # Related to automake bug#7819.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac <<END
 AC_CONFIG_FILES([sub/Makefile])
old mode 100755 (executable)
new mode 100644 (file)
index 18b280c..12f2c45
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2011-2012 Free Software Foundation, Inc.
+# Copyright (C) 2011-2017 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
@@ -18,7 +18,7 @@
 # (at automake runtime).
 # Related to automake bug#7819.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac <<END
 AC_OUTPUT
old mode 100755 (executable)
new mode 100644 (file)
index 6108f57..1a5c705
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2011-2012 Free Software Foundation, Inc.
+# Copyright (C) 2011-2017 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
@@ -21,7 +21,7 @@
 # remove this test.
 # Related to automake bug#7819.
 
-. ./defs || Exit 1
+. test-init.sh
 
 { echo 'm4_include([defs.m4])'
   cat configure.ac
old mode 100755 (executable)
new mode 100644 (file)
index 65888f8..69ba829
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2011-2012 Free Software Foundation, Inc.
+# Copyright (C) 2011-2017 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
@@ -19,7 +19,7 @@
 # exist at automake runtime.
 # Related to automake bug#7819.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac <<END
 AC_CONFIG_HEADERS([config.h sub/config.h cfg2.h:conf2.hin])
old mode 100755 (executable)
new mode 100644 (file)
index cc53caf..7b52faa
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2011-2012 Free Software Foundation, Inc.
+# Copyright (C) 2011-2017 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
@@ -18,7 +18,7 @@
 # automatically distributed when placed in a subdirectory.
 # Related to automake bug#7819.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac <<END
 AC_CONFIG_FILES([sub/Makefile])
old mode 100755 (executable)
new mode 100644 (file)
index 90a2c7d..03456b0
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2011-2012 Free Software Foundation, Inc.
+# Copyright (C) 2011-2017 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
 # Check that there are no duplicates in the list of files automatically
 # distributed by automake.
 
-. ./defs || Exit 1
+. test-init.sh
 
 re='Files .*automatically distributed.*if found'
 
 # The automake manual states that the list of automatically-distributed
 # files should be given by 'automake --help'.
 
-list1=`$AUTOMAKE --help \
-        | sed -n "/^$re.*always/,/^ *$/p" \
-        | sed 1d`
-list1=`echo $list1`
+list1=$($AUTOMAKE --help \
+         | sed -n "/^$re.*always/,/^ *$/p" \
+         | sed 1d)
+list1=$(echo $list1)
 
-list2=`$AUTOMAKE --help \
-        | sed -n "/^$re.*under certain conditions/,/^ *$/p" \
-        | sed 1d`
-list2=`echo $list2`
+list2=$($AUTOMAKE --help \
+         | sed -n "/^$re.*under certain conditions/,/^ *$/p" \
+         | sed 1d)
+list2=$(echo $list2)
 
 test -n "$list1"
 test -n "$list2"
@@ -47,4 +47,4 @@ for i in 1 2; do
   diff files$i.lst files$i.uniq || st=1
 done
 
-Exit $st
+exit $st
old mode 100755 (executable)
new mode 100644 (file)
index 4db1f14..4710c3b
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2011-2012 Free Software Foundation, Inc.
+# Copyright (C) 2011-2017 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
@@ -19,7 +19,7 @@
 # Related to automake bug#7819.
 
 required=makeinfo
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << END
 AC_OUTPUT
old mode 100755 (executable)
new mode 100644 (file)
index 5e1f044..cb44258
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2011-2012 Free Software Foundation, Inc.
+# Copyright (C) 2011-2017 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
@@ -22,9 +22,9 @@
 # discussion of automake bug#7819:
 #  <http://debbugs.gnu.org/cgi/bugreport.cgi?bug=7819>
 #
-# Keep this test in sync with sister test 'autodist.test'.
+# Keep this test in sync with sister test 'autodist.sh'.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac <<'END'
 AC_CONFIG_FILES([sub/Makefile])
@@ -36,11 +36,11 @@ $AUTOCONF
 
 # The automake manual states that the list of automatically-distributed
 # files should be given by 'automake --help'.
-list=`$AUTOMAKE --help \
-        | sed -n '/^Files.*automatically distributed.*if found.*always/,/^ *$/p' \
-        | sed 1d`
+list=$($AUTOMAKE --help \
+         | sed -n '/^Files.*automatically distributed.*if found.*always/,/^ *$/p' \
+         | sed 1d)
 # Normalize whitespace, just in case.
-list=`echo $list`
+list=$(echo $list)
 
 test -n "$list"
 
@@ -97,7 +97,7 @@ $MAKE distdir
 autodist_list="$list" $MAKE check
 
 $MAKE maintainer-clean
-test ! -f sub/README    # Sanity check.
+test ! -e sub/README    # Sanity check.
 rm -rf $me-1.0          # Remove $(distdir).
 
 : Now try creating the automatically-distributed files before
old mode 100755 (executable)
new mode 100644 (file)
index e6435c5..417363b
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2011-2012 Free Software Foundation, Inc.
+# Copyright (C) 2011-2017 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
 # Check that automake really automatically distributes all the files
 # it advertises to do.
 # Related to automake bug#7819.
-# Keep this test in sync with sister test 'autodist-subdir.test'.
+# Keep this test in sync with sister test 'autodist-subdir.sh'.
 
 am_create_testdir=empty
-. ./defs || Exit 1
+. test-init.sh
 
 cat > configure.ac <<END
 AC_INIT([$me], [1.0])
@@ -35,11 +35,11 @@ $AUTOCONF
 
 # The automake manual states that the list of automatically-distributed
 # files should be given by 'automake --help'.
-list=`$AUTOMAKE --help \
-        | sed -n '/^Files.*automatically distributed.*if found.*always/,/^ *$/p' \
-        | sed 1d`
+list=$($AUTOMAKE --help \
+         | sed -n '/^Files.*automatically distributed.*if found.*always/,/^ *$/p' \
+         | sed 1d)
 # Normalize whitespace, just in case.
-list=`echo $list`
+list=$(echo $list)
 
 test -n "$list"
 
@@ -80,7 +80,7 @@ $MAKE distdir
 autodist_list="$list" $MAKE check
 
 $MAKE maintainer-clean
-test ! -f README        # Sanity check.
+test ! -e README        # Sanity check.
 rm -rf $me-1.0          # Remove $(distdir).
 
 : Now try creating the automatically-distributed files before
diff --git a/t/autohdr-subdir-pr12495.sh b/t/autohdr-subdir-pr12495.sh
new file mode 100644 (file)
index 0000000..c98d44f
--- /dev/null
@@ -0,0 +1,83 @@
+#! /bin/sh
+# Copyright (C) 2012-2017 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/>.
+
+# Related to automake bug#12495: Automake shouldn't generate useless
+# remake rules for AC_CONFIG_HEADERS arguments after the first one,
+# not even when subdirs are involved.
+
+. test-init.sh
+
+cat >> configure.ac << 'END'
+AC_CONFIG_HEADERS([a.h b.h sub/c.h])
+AC_CONFIG_FILES([sub/Makefile])
+AC_OUTPUT
+END
+
+mkdir sub
+echo SUBDIRS = sub > Makefile.am
+: > sub/Makefile.am
+
+$ACLOCAL
+$AUTOCONF
+$AUTOHEADER
+# Even if an AC_CONFIG_HEADERS invocation is passed several files in
+# the first argument, only the first one is considered by autoheader
+# for automatic generation.  Otherwise, the present test case would
+test -f a.h.in && test ! -f c.h.in && test ! -f sub/c.h.in \
+  || fatal_ "unexpected autoheader behavior with multiple" \
+            "AC_CONFIG_HEADERS arguments"
+# Automake should require the missing headers though.
+AUTOMAKE_fails -Wno-error -Wnone
+grep "^configure\.ac:4:.* required file 'b.h.in' not found" stderr
+grep "^configure\.ac:4:.* required file 'sub/c.h.in' not found" stderr
+: > b.h.in
+: > sub/c.h.in
+$AUTOMAKE
+
+./configure
+
+# Automake should regenerate this.
+grep '^$(srcdir)/a\.h\.in:' Makefile.in
+# But not these.
+grep '[bc]\.h\.in.*:' Makefile.in sub/Makefile.in && exit 1
+
+test -f a.h && test -f b.h && test -f sub/c.h \
+  || fatal_ "unexpected ./configure behavior with multiple" \
+            "AC_CONFIG_HEADERS arguments"
+
+rm -f a.h.in a.h
+$MAKE
+test -f a.h.in
+test -f a.h
+
+# We might need to grep the output of GNU make for error messages.
+LANG=C LANGUAGE=C LC_ALL=C
+export LANG LANGUAGE LC_ALL
+
+ocwd=$(pwd)
+for x in b c; do
+  test $x = b || cd sub
+  rm -f $x.h.in
+  run_make -E -e FAIL $x.h.in
+  test ! -f $x.h.in
+  if using_gmake; then
+    grep "No rule to make target [\`\"']$x\.h\.in[\`\"']" stderr
+  fi
+  : > $x.h.in
+  cd "$ocwd" || fatal_ "cannot chdir back"
+done
+
+:
old mode 100755 (executable)
new mode 100644 (file)
index bef7027..7cdd96c
@@ -1,5 +1,5 @@
 #!/bin/sh
-# Copyright (C) 2002-2012 Free Software Foundation, Inc.
+# Copyright (C) 2002-2017 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
@@ -16,7 +16,7 @@
 
 # Check that autoheaders works, despite our AC_CONFIG_HEADERS hack.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat >>configure.ac <<EOF
 AC_CONFIG_HEADERS([thisfile.h])
old mode 100755 (executable)
new mode 100644 (file)
index ad55130..08f6ee7
@@ -1,5 +1,5 @@
 #!/bin/sh
-# Copyright (C) 2003-2012 Free Software Foundation, Inc.
+# Copyright (C) 2003-2017 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
@@ -16,7 +16,7 @@
 
 # Check rebuild rules for autoheader.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat >>configure.ac <<EOF
 m4_include([foo.m4])
old mode 100755 (executable)
new mode 100644 (file)
index 9acbab1..2dba7df
@@ -1,5 +1,5 @@
 #!/bin/sh
-# Copyright (C) 2003-2012 Free Software Foundation, Inc.
+# Copyright (C) 2003-2017 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
@@ -18,7 +18,7 @@
 # (This should also work without GNU Make.)
 
 required=cc
-. ./defs || Exit 1
+. test-init.sh
 
 cat >>configure.ac <<'EOF'
 AC_PROG_CC
@@ -38,8 +38,7 @@ cat > Makefile.am <<'END'
 SUBDIRS = sub3
 .PHONY: test-prog-updated
 test-prog-updated:
-       stat older sub3/run$(EXEEXT) || : For debugging.
-       test `ls -t older sub3/run$(EXEEXT) | sed 1q` = sub3/run$(EXEEXT)
+       is_newest sub3/run$(EXEEXT) sub2/config.bot
 END
 
 cat > sub3/Makefile.am <<'END'
@@ -68,13 +67,12 @@ $AUTOMAKE
 ./configure --enable-dependency-tracking
 $MAKE
 # Sanity check.
-cross_compiling || { sub3/run | grep grepme1; }
+cross_compiling || sub3/run | grep grepme1 || exit 1
 
-: > older
 $sleep
 echo '#define NAME "grepme2"' > sub2/config.bot
 $MAKE
-cross_compiling || { sub3/run | grep grepme2; }
+cross_compiling || sub3/run | grep grepme2 || exit 1
 $MAKE test-prog-updated
 
 $MAKE distcheck
old mode 100755 (executable)
new mode 100644 (file)
index 9df36f1..4c5d2e5
@@ -1,5 +1,5 @@
 #!/bin/sh
-# Copyright (C) 2010-2012 Free Software Foundation, Inc.
+# Copyright (C) 2010-2017 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
@@ -17,7 +17,7 @@
 # Removal recovery rules for AC_CONFIG_HEADERS should not remove files
 # with 'make -n'.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat >>configure.ac <<'EOF'
 AC_CONFIG_HEADERS([config.h])
@@ -37,6 +37,6 @@ $MAKE
 rm -f config.h
 $MAKE -n
 test -f stamp-h1
-test ! -f config.h
+test ! -e config.h
 
 :
old mode 100755 (executable)
new mode 100644 (file)
index 72c559a..b94fbeb
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2004-2012 Free Software Foundation, Inc.
+# Copyright (C) 2004-2017 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
@@ -16,7 +16,7 @@
 
 # Test Automake's command-line options.
 
-. ./defs || Exit 1
+. test-init.sh
 
 plan_ 17
 
old mode 100755 (executable)
new mode 100644 (file)
index 41a73d5..535efce
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2010-2012 Free Software Foundation, Inc.
+# Copyright (C) 2010-2017 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
 # Make sure that, if AC_CONFIG_AUX_DIR is not specified, Automake tries
 # to use '.', '..' and '../..', in precisely that order.
 
-. ./defs || Exit 1
+. test-init.sh
 
 nil=__no_such_program
 
-unset NONESUCH || :
+unset NONESUCH
 
 cat >>configure.ac << END
 AM_MISSING_PROG([NONESUCH],[$nil])
@@ -65,7 +65,7 @@ $AUTOMAKE
 out=out0 $MAKE test
 cat out0
 grep "%%d0%%.*$nil" out0
-grep '%%d[123]' out0 && Exit 1
+grep '%%d[123]' out0 && exit 1
 
 rm -f missing install-sh
 
@@ -87,7 +87,7 @@ $AUTOMAKE
 out=out1 $MAKE test
 cat out1
 grep "%%d1%%.*$nil" out1
-grep '%%d[023]' out1 && Exit 1
+grep '%%d[023]' out1 && exit 1
 
 rm -f ../missing ../install-sh
 
@@ -116,7 +116,7 @@ $AUTOMAKE
 out=out2 $MAKE test
 cat out2
 grep "%%d2%%.*$nil" out2
-grep '%%d[013]' out2 && Exit 1
+grep '%%d[013]' out2 && exit 1
 
 rm -f ../../missing ../../install-sh
 
diff --git a/t/auxdir-cc-pr15981.sh b/t/auxdir-cc-pr15981.sh
new file mode 100644 (file)
index 0000000..0780ae6
--- /dev/null
@@ -0,0 +1,57 @@
+#! /bin/sh
+# Copyright (C) 2014-2017 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 bug#15981: automake 1.14 may use $ac_aux_dir
+# before it is defined, leading to error messages such as:
+# "/bin/sh: /home/david/missing: No such file or directory"
+
+required=cc
+. test-init.sh
+
+cat > configure.ac <<END
+AC_INIT([$me], [0.0])
+AC_USE_SYSTEM_EXTENSIONS
+AM_INIT_AUTOMAKE([1.11 foreign])
+AC_CONFIG_FILES([Makefile])
+AC_SUBST([MISSING])
+AC_OUTPUT
+test -n "\${MISSING}"
+END
+
+echo 'int main (void) { return 0; }' > foo.c
+
+cat > Makefile.am <<'END'
+bin_PROGRAMS = foo
+
+# Without quotes around '--help' and with an empty $(MISSING), make might
+# strip the trailing '--', call Bash's 'help' builtin, and have this test
+# succeed spuriously.  Yes, that has happened in practice :-(
+test:
+       $(MISSING) '--help'
+END
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE
+
+./configure 2>stderr || { cat stderr >&2; exit 1; }
+cat stderr >&2
+$FGREP "missing" stderr && exit 1
+
+$MAKE all
+$MAKE test
+
+:
old mode 100755 (executable)
new mode 100644 (file)
index 487958d..6201fdb
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2001-2012 Free Software Foundation, Inc.
+# Copyright (C) 2001-2017 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
@@ -17,7 +17,7 @@
 # It should be possible to use a computed auxdir.  This might seem
 # bizarre, but it is actually used in multilib builds.
 
-. ./defs || Exit 1
+. test-init.sh
 
 plan_ 3
 
old mode 100755 (executable)
new mode 100644 (file)
index 33f5db0..a82c9af
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2004-2012 Free Software Foundation, Inc.
+# Copyright (C) 2004-2017 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
@@ -16,7 +16,7 @@
 
 # Test to make sure we diagnose misplaced AC_CONFIG_AUX_DIR.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_CONFIG_AUX_DIR([.]) dnl this will appear after AM_INIT_AUTOMAKE
old mode 100755 (executable)
new mode 100644 (file)
index 5575b28..f4da1f6
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2010-2012 Free Software Foundation, Inc.
+# Copyright (C) 2010-2017 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
@@ -16,7 +16,7 @@
 
 # Make sure we diagnose non-existent AC_CONFIG_AUX_DIR names.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat > configure.ac <<END
 AC_INIT([$me], [1.0])
diff --git a/t/auxdir-pr15981.sh b/t/auxdir-pr15981.sh
new file mode 100644 (file)
index 0000000..c881f8e
--- /dev/null
@@ -0,0 +1,39 @@
+#! /bin/sh
+# Copyright (C) 2014-2017 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/>.
+
+# AM_AUX_DIR_EXPAND should ensure $ac_aux_dir is properly initialized.
+# Issue revealed by related automake bug#15981.
+
+. test-init.sh
+
+cat > configure.ac <<'END'
+AC_INIT([test], [0.0])
+AM_AUX_DIR_EXPAND
+printf '%s\n' "ac_aux_dir: '$ac_aux_dir'"
+printf '%s\n' "am_aux_dir: '$am_aux_dir'"
+test "$ac_aux_dir" = . || AS_EXIT([1])
+test "$am_aux_dir" = "`pwd`" || AS_EXIT([1])
+AS_EXIT([0])
+END
+
+$ACLOCAL
+$AUTOCONF
+
+test -f install-sh  # sanity check
+
+./configure
+
+:
old mode 100755 (executable)
new mode 100644 (file)
similarity index 63%
rename from t/remake2.sh
rename to t/auxdir-pr19311.sh
index 228b14f..0fcf5e6
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 1996-2012 Free Software Foundation, Inc.
+# Copyright (C) 2014-2017 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/>.
 
-# Weak "grepping" test trying to ensure that remaking rules in subdir
-# are correct even when there is no upper-level Makefile.
-# TODO: we should really add also functional tests for this!
+# Automake bug#19311: AC_PROG_CC called before AC_CONFIG_AUX_DIR can
+# silently force wrong $ac_aux_dir definition.
 
-. ./defs || Exit 1
+am_create_testdir=empty
+required=cc
+. test-init.sh
 
 cat > configure.ac <<END
 AC_INIT([$me], [1.0])
+AC_PROG_CC
+AC_CONFIG_AUX_DIR([build-aux])
 AM_INIT_AUTOMAKE
-AC_CONFIG_FILES([sub/Makefile])
-AC_OUTPUT
+AC_OUTPUT([Makefile])
 END
 
-mkdir sub
-: > sub/Makefile.am
+: > Makefile.am
+
+mkdir build-aux
 
 $ACLOCAL
-$AUTOMAKE
+$AUTOMAKE -a
+$AUTOCONF
+
+test -f build-aux/compile
+test -f build-aux/install-sh
 
-grep '\$(AUTOMAKE).*sub/Makefile' sub/Makefile.in
+./configure
 
 :
old mode 100755 (executable)
new mode 100644 (file)
index d04b38c..4c465b5
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2004-2012 Free Software Foundation, Inc.
+# Copyright (C) 2004-2017 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
@@ -16,7 +16,7 @@
 
 # Make sure we diagnose unportable AC_CONFIG_AUX_DIR names.
 
-. ./defs || Exit 1
+. test-init.sh
 
 plan_ 4
 
old mode 100755 (executable)
new mode 100644 (file)
index c4860f4..c280a73
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 1996-2012 Free Software Foundation, Inc.
+# Copyright (C) 1996-2017 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
@@ -16,7 +16,7 @@
 
 # Test to make sure AC_CONFIG_AUX_DIR works correctly.
 
-. ./defs || Exit 1
+. test-init.sh
 
 # The "./." is here so we don't have to mess with subdirs.
 cat > configure.ac <<END
old mode 100755 (executable)
new mode 100644 (file)
index 08de241..a9cba8f
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2010-2012 Free Software Foundation, Inc.
+# Copyright (C) 2010-2017 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
@@ -18,9 +18,9 @@
 # This test calls AC_CONFIG_AUX_DIR with an explicit literal argument,
 # thus explicitly making the directory named by that argument the
 # config auxdir.
-# Keep this in sync with sister tests auxdir7.test and auxdir8.test.
+# Keep this in sync with sister tests 'auxdir7.sh' and 'auxdir8.sh'.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat > configure.ac <<END
 AC_INIT([$me], [1.0])
old mode 100755 (executable)
new mode 100644 (file)
index 9a32bcb..20c496d
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2010-2012 Free Software Foundation, Inc.
+# Copyright (C) 2010-2017 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
@@ -17,9 +17,9 @@
 # Test to make sure AC_CONFIG_AUX_DIR works correctly.
 # This test calls AC_CONFIG_AUX_DIR with a '.' argument, thus explicitly
 # making the top-level directory the config auxdir.
-# Keep this in sync with sister tests auxdir6.test and auxdir8.test.
+# Keep this in sync with sister tests 'auxdir6.sh' and 'auxdir8.sh'.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat > configure.ac <<END
 AC_INIT([$me], [1.0])
old mode 100755 (executable)
new mode 100644 (file)
index 4dd0835..de9c651
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 1996-2012 Free Software Foundation, Inc.
+# Copyright (C) 1996-2017 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
@@ -19,9 +19,9 @@
 # the config auxdir should be implicitly defined to '.' since
 # the install-sh, mkinstalldirs, etc., scripts are in the top-level
 # directory.
-# Keep this in sync with sister tests auxdir6.test and auxdir7.test.
+# Keep this in sync with sister tests 'auxdir6.sh' and 'auxdir7.sh'.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_CONFIG_FILES([subdir/Makefile])
similarity index 57%
rename from defs
rename to t/ax/am-test-lib.sh
index 612855e..f85c1b5 100644 (file)
--- a/defs
@@ -1,6 +1,6 @@
 # -*- shell-script -*-
 #
-# Copyright (C) 1996-2012 Free Software Foundation, Inc.
+# Copyright (C) 1996-2017 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
 ###  IMPORTANT NOTE: keep this file 'set -e' clean.  ###
 ########################################################
 
-# NOTE: This file should execute correctly with any system's /bin/sh
-# shell, and not only with configure-time detected $AM_TEST_RUNNER_SHELL,
-# *until differently and explicitly specified*.
+# Do not source several times.
+test ${am_test_lib_sourced-no} = yes && return 0
+am_test_lib_sourced=yes
 
-## -------------------------------------------------------- ##
-##  Source static setup and definitions for the testsuite.  ##
-## -------------------------------------------------------- ##
-
-# Ensure we are running from the right directory.
-test -f ./defs-static || {
-   echo "$0: ./defs-static: not found in current directory" >&2
-   exit 99
-}
-
-# Source the shell sanitization and variables' definitions.
-. ./defs-static || exit 99
-
-# Enable the errexit shell flag early.
-set -e
-
-# The name of the current test (without the '.sh' or '.tap' suffix).
-# Test scripts can override it if they need to (but this should
-# be done carefully, and *before* including ./defs).
-if test -z "$me"; then
-  # Guard against failure to spawn sed (seen on MSYS), or empty $argv0.
-  me=`echo "$argv0" | sed -e 's,.*[\\/],,;s/\.sh$//;s/\.tap$//'` \
-    && test -n "$me" \
-    || { echo "$argv0: failed to define \$me" >&2; exit 99; }
-fi
-
-## ---------------------- ##
-##  Early sanity checks.  ##
-## ---------------------- ##
-
-# A single whitespace character.
-sp=' '
-# A tabulation character.
-tab='  '
-# A newline character.
-nl='
-'
-
-# As autoconf-generated configure scripts do, ensure that IFS
-# is defined initially, so that saving and restoring $IFS works.
-IFS=$sp$tab$nl
-
-# Ensure $am_top_srcdir is set correctly.
-test -f "$am_top_srcdir/defs-static.in" || {
-   echo "$me: $am_top_srcdir/defs-static.in not found," \
-        "check \$am_top_srcdir" >&2
-   exit 99
-}
-
-# Ensure $am_top_builddir is set correctly.
-test -f "$am_top_builddir/defs-static" || {
-   echo "$me: $am_top_builddir/defs-static not found," \
-        "check \$am_top_builddir" >&2
-   exit 99
-}
-
-
-## ------------------------------------ ##
-##  Ensure we run with a proper shell.  ##
-## ------------------------------------ ##
-
-# Make sure we run with the shell detected at configure time (unless
-# the user forbids it).
-case ${AM_TESTS_REEXEC-yes} in
-  n|no|false|0)
-    ;;
-  *)
-    # Ensure we can find ourselves.
-    if test ! -f "$0"; then
-      echo "$me: unable to find myself: $0" >&2
-      exit 99
-    fi
-    AM_TESTS_REEXEC=no; export AM_TESTS_REEXEC
-    # Cannot simply do "opts=$-", since the content of $- is not
-    # portable among different shells.  So try to propagate only
-    # the portable and interesting options.
-    case $- in
-      *x*v*|*v*x) opts=-vx;;
-      *v*) opts=-v;;
-      *x*) opts=-x;;
-      *) opts=;;
-    esac
-    echo $me: exec $AM_TEST_RUNNER_SHELL $opts "$0" "$*"
-    exec $AM_TEST_RUNNER_SHELL $opts "$0" ${1+"$@"} || {
-      echo "$me: failed to re-execute with $AM_TEST_RUNNER_SHELL" >&2
-      exit 99
-    }
-    ;;
-esac
-
-# NOTE: From this point on, we can assume this file is being executed
-# by the configure-time detected $AM_TEST_RUNNER_SHELL.
-
-
-## ----------------------- ##
-##  Early debugging info.  ##
-## ----------------------- ##
-
-echo "Running from installcheck: $am_running_installcheck"
-echo "Using TAP: $am_using_tap"
-echo "PATH = $PATH"
+# A literal escape character.  Used by test checking colored output.
+esc='\e'
 
+# This might be used in testcases checking distribution-related features.
+# Test scripts are free to override this if they need to.
+distdir=$me-1.0
 
 ## ---------------------- ##
 ##  Environment cleanup.  ##
 ## ---------------------- ##
 
-# Temporarily disable this, since some shells (e.g., older version
-# of Bash) can return a non-zero exit status upon the when a non-set
-# variable is unset.
-set +e
-
 # Unset some make-related variables that may cause $MAKE to act like
 # a recursively invoked sub-make.  Any $MAKE invocation in a test is
 # conceptually an independent invocation, not part of the main
@@ -144,18 +43,16 @@ unset __MKLVL__ MAKE_JOBS_FIFO                     # For BSD make.
 unset DMAKE_CHILD DMAKE_DEF_PRINTED DMAKE_MAX_JOBS # For Solaris dmake.
 # Unset verbosity flag.
 unset V
-# Also unset variables that will let "make -e install" divert
-# files into unwanted directories.
+# Also unset variables that might influence "make install".
 unset DESTDIR
 unset prefix exec_prefix bindir datarootdir datadir docdir dvidir
 unset htmldir includedir infodir libdir libexecdir localedir mandir
 unset oldincludedir pdfdir psdir sbindir sharedstatedir sysconfdir
-# Unset variables that might change the "make distcheck" behaviour.
+# Unset variables that might influence "make distcheck".
 unset DISTCHECK_CONFIGURE_FLAGS AM_DISTCHECK_CONFIGURE_FLAGS
 # Used by install rules for info files.
 unset AM_UPDATE_INFO_DIR
-# The tests call "make -e" but we do not want $srcdir from the environment
-# to override the definition from the Makefile.
+# We don't want to use the $srcdir value exported by the test driver.
 unset srcdir
 # Also unset variables that control our test driver.  While not
 # conceptually independent, they cause some changed semantics we
@@ -181,57 +78,6 @@ for pfx in TEST_ SH_ TAP_ ''; do
 done
 unset pfx
 
-# Re-enable, it had been temporarily disabled above.
-set -e
-
-## ---------------------------- ##
-##  Auxiliary shell functions.  ##
-## ---------------------------- ##
-
-# Tell whether we should keep the test directories around, even in
-# case of success.  By default, we don't.
-am_keeping_testdirs ()
-{
-  case $keep_testdirs in
-     ""|n|no|NO) return 1;;
-              *) return 0;;
-  esac
-}
-
-# This is used in 'Exit' and in the exit trap.  See comments in the latter
-# for more information,
-am__test_skipped=no
-
-# We use a trap below for cleanup.  This requires us to go through
-# hoops to get the right exit status transported through the signal.
-# So use "Exit STATUS" instead of "exit STATUS" inside of the tests.
-# Turn off errexit here so that we don't trip the bug with OSF1/Tru64
-# sh inside this function.
-Exit ()
-{
-  set +e
-  # See comments in the exit trap for the reason we do this.
-  test 77 = $1 && am__test_skipped=yes
-  (exit $1); exit $1
-}
-
-if test $am_using_tap = yes; then
-  am_funcs_file=tap-functions.sh
-else
-  am_funcs_file=plain-functions.sh
-fi
-
-if test -f "$am_testauxdir/$am_funcs_file"; then
-  . "$am_testauxdir/$am_funcs_file" || {
-    echo "$me: error sourcing $am_testauxdir/$am_funcs_file" >&2
-    Exit 99
-  }
-else
-  echo "$me: $am_testauxdir/$am_funcs_file not found" >&2
-  Exit 99
-fi
-unset am_funcs_file
-
 # cross_compiling
 # ---------------
 # Tell whether we are cross-compiling.  This is especially useful to skip
@@ -248,16 +94,6 @@ cross_compiling ()
   test x"$host_alias" != x && test x"$build_alias" != x"$host_alias"
 }
 
-# is_newest FILE FILES
-# --------------------
-# Return false if any file in FILES is newer than FILE.
-# Resolve ties in favor of FILE.
-is_newest ()
-{
-  is_newest_files=`find "$@" -prune -newer "$1"`
-  test -z "$is_newest_files"
-}
-
 # is_blocked_signal SIGNAL-NUMBER
 # --------------------------------
 # Return success if the given signal number is blocked in the shell,
@@ -283,6 +119,186 @@ is_blocked_signal ()
   fi
 }
 
+# single_quote STRING
+# -------------------
+# Single-quote STRING for the shell, also dealing with embedded single
+# quotes. Place the result in the '$am_result', that is thus to be
+# considered public.
+single_quote ()
+{
+  am_result=$1
+  case $am_result in
+    *\'*) am_result=$(printf '%s\n' "$*" | sed -e "s/'/'\\\\''/g");;
+  esac
+  am_result="'$am_result'"
+}
+
+# append_single_quoted VARIABLE STRING
+# ------------------------------------
+append_single_quoted ()
+{
+  am__var=$1; shift
+  single_quote "$1" # Sets 'am_result'.
+  eval "${am__var}=\${$am__var:+\"\${$am__var} \"}\$am_result"
+  unset am__var am_result
+}
+
+# is_valid_varname STRING
+# -----------------------
+# Tell whether STRING is a valid name for a shell variable.  Return 0
+# if yes, return 1 if not.
+is_valid_varname ()
+{
+  # FIXME: is the below truly portable even for LC_COLLATE != "C" ?
+  case $1 in
+    [0-9]*) return 1;;
+    *[!a-zA-Z0-9_]*) return 1;;
+  esac
+  return 0
+}
+
+# run_make [-e STATUS] [-O] [-E] [-M] [--] [VAR=VAL ...] [MAKE-ARGS...]
+# ---------------------------------------------------------------------
+#
+# Run $MAKE with the given command-line, and fail if it doesn't exit with
+# STATUS (default: 0).  If STATUS is "FAIL", then any exit status > 0 is
+# acceptable.  If STATUS is "IGNORE", any exit value is acceptable.
+#
+# Other options:
+#
+#  -O   save the standard output from make on disk, in a regular file
+#       named 'stdout'.
+#
+#  -E   save the standard error from make on disk, in a regular file
+#       named 'stderr'.
+#
+#  -M   save both the standard output and standard error from make on
+#       disk, in a regular file named 'output'. This option supersedes
+#       both the '-O' and '-E' options.
+#
+# This function also handle command-line override of variable definition
+# in a smart way, using AM_MAKEFLAGS if a non-GNU make implementation
+# is in use.
+#
+run_make ()
+{
+  am__make_redirect_stdout=no
+  am__make_redirect_stderr=no
+  am__make_redirect_stdall=no
+  am__make_flags=
+  am__make_rc_exp=0
+  # Follow-up code might want to analyse this, so mark is as
+  # publicly accessible (no double undesrscore).
+  am_make_rc=0
+  # Parse options for this function.
+  while test $# -gt 0; do
+    case $1 in
+      -e) am__make_rc_exp=$2; shift;;
+      -O) am__make_redirect_stdout=yes;;
+      -E) am__make_redirect_stderr=yes;;
+      -M) am__make_redirect_stdall=yes;;
+      --) shift; break;;
+       *) break;;
+    esac
+    shift
+  done
+
+  # Use append mode here to avoid dropping output.  See automake bug#11413
+  if using_gmake; then
+    # We can trust GNU make to correctly pass macro definitions given
+    # on the command line down to sub-make invocations, and this allow
+    # us to have a vary simple implementation: delegate all the work
+    # to GNU make.
+    :
+  else
+    # We have to explicitly parse arguments passed to make.  Not 100%
+    # safe w.r.t. options like '-I' that can have an argument, but
+    # should be good enough for our usages so far.
+    for am__x
+    do
+      case $am__x in
+        *=*)
+        am__maybe_var=${am__x%%=*}
+        am__maybe_val=${am__x#*=}
+        am__maybe_def="${am__maybe_var}=${am__maybe_val}"
+        # Some variables should be portably overridable from the command
+        # line, even when using non-GNU make.
+        case $am__maybe_var in
+          V|\
+          DESTDIR|\
+          SHELL|\
+          VERBOSE|\
+          DISABLE_HARD_ERRORS|\
+          DISTCHECK_CONFIGURE_FLAGS)
+            ;;
+          *)
+            if is_valid_varname "$am__maybe_var"; then
+              append_single_quoted am__make_flags "$am__maybe_def"
+            fi
+        esac
+        unset am__maybe_var am__maybe_val am__maybe_def
+        ;;
+      esac
+    done
+    unset am__x
+  fi
+
+  if test x"$am__make_flags" != x; then
+     set AM_MAKEFLAGS="$am__make_flags" ${1+"$@"}
+     unset am__make_flags
+  fi
+
+  # In redirecting make output below, use append mode, to avoid
+  # dropping output.  See automake bug#11413 for details.
+  # The exit status of 253 is a more-or-less random choice, to
+  # help us catch possible errors in redirections and error out
+  # accordingly.
+  (
+    : exec $MAKE ${1+"$@"} # Display traces for future command.
+    set +x # We need to remove them now, not to pollute redirected stderr.
+    if test $am__make_redirect_stdall = yes; then
+      : > output && exec 1>>output 2>&1 || exit 253
+    else
+      if test $am__make_redirect_stdout = yes; then
+        : > stdout && exec 1>>stdout || exit 253
+      fi
+      if test $am__make_redirect_stderr = yes; then
+        : > stderr && exec 2>>stderr || exit 253
+      fi
+    fi
+    exec $MAKE ${1+"$@"}
+  ) || am_make_rc=$?
+
+  if test $am_make_rc -eq 253; then
+    fatal_ "run_make: problems in redirecting make output"
+  fi
+
+  if test $am__make_redirect_stdall = yes; then
+    cat output || fatal_ "displaying make output"
+  else
+    if test $am__make_redirect_stdout = yes; then
+      cat stdout || fatal_ "displaying make output"
+    fi
+    if test $am__make_redirect_stderr = yes; then
+      cat stderr >&2 || fatal_ "displaying make output"
+    fi
+  fi
+
+  case $am__make_rc_exp in
+    IGNORE)
+      : Ignore exit status
+      ;;
+    FAIL)
+      test $am_make_rc -gt 0 || return 1
+      ;;
+    *)
+     test $am__make_rc_exp -ge 0 && test $am__make_rc_exp -le 255 \
+       || fatal_ "invalid expected exit status: '$am__make_rc_exp'"
+     test $am_make_rc -eq $am__make_rc_exp || return 1
+     ;;
+  esac
+}
+
 # AUTOMAKE_run [-e STATUS] [-d DESCRIPTION] [--] [AUTOMAKE-ARGS...]
 # -----------------------------------------------------------------
 # Run automake with AUTOMAKE-ARGS, and fail if it doesn't exit with
@@ -309,8 +325,8 @@ AUTOMAKE_run ()
   $AUTOMAKE ${1+"$@"} >stdout 2>stderr || am__got_rc=$?
   cat stderr >&2
   cat stdout
-  if test $am_using_tap != yes; then
-    test $am__got_rc -eq $am__exp_rc || Exit 1
+  if test $am_test_protocol = none; then
+    test $am__got_rc -eq $am__exp_rc || exit 1
     return
   fi
   if test -z "$am__desc"; then
@@ -344,7 +360,7 @@ extract_configure_help ()
   am__opt_re='' am__var_re=''
   case $1 in
     --*'=')   am__opt_re="^  $1";;
-    --*'[=]') am__opt_re='^  '`printf '%s\n' "$1" | sed 's/...$//'`'\[=';;
+    --*'[=]') am__opt_re='^  '$(printf '%s\n' "$1" | sed 's/...$//')'\[=';;
     --*)      am__opt_re="^  $1( .*|$)";;
       *)      am__var_re="^  $1( .*|$)";;
   esac
@@ -374,12 +390,12 @@ 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
@@ -473,7 +489,7 @@ useless_vpath_rebuild ()
         .a.b: ; cp $< $@
         baz: bar ; cp ../baz bar
 END
-    if $MAKE all && test ! -f foo.b && test ! -f bar; then
+    if run_make all && test ! -e foo.b && test ! -e bar; then
       am__useless_vpath_rebuild=no
     else
       am__useless_vpath_rebuild=yes
@@ -485,60 +501,41 @@ END
     yes) return 0;;
      no) return 1;;
      "") ;;
-      *) fatal_ "no_useless_builddir_remake: internal error";;
+      *) fatal_ "useless_vpath_rebuild: internal error";;
   esac
 }
 am__useless_vpath_rebuild=""
 
-yl_distcheck () { useless_vpath_rebuild || $MAKE distcheck ${1+"$@"}; }
+yl_distcheck () { useless_vpath_rebuild || run_make distcheck ${1+"$@"}; }
 
-# seq_ - print a sequence of numbers
-# ----------------------------------
-# This function simulates GNU seq(1) portably.  Valid usages:
-#  - seq LAST
-#  - seq FIRST LAST
-#  - seq FIRST INCREMENT LAST
-seq_ ()
+null_install ()
 {
-  case $# in
-    0) fatal_ "seq_: missing argument";;
-    1) seq_first=1  seq_incr=1  seq_last=$1;;
-    2) seq_first=$1 seq_incr=1  seq_last=$2;;
-    3) seq_first=$1 seq_incr=$2 seq_last=$3;;
-    *) fatal_ "seq_: too many arguments";;
-  esac
-  # Try to avoid forks if possible.
-  case "$BASH_VERSION" in
-    ""|[12].*)
-      : Not bash, or a too old bash version. ;;
+  for am__v in nulldirs destdir instdir; do
+    if ! eval 'test -n "$'$am__v'"'; then
+      fatal_ "null_install() invoked with \$$am__v unset"
+    fi
+  done
+  unset am__v
+  case $#,$1 in
+    0,)
+      am__inst='install';;
+    1,-t|1,--texi)
+      am__inst='install install-html install-dvi install-ps install-pdf';;
     *)
-      # Use eval to protect dumber shells from parsing errors.
-      eval 'for ((i = seq_first; i <= seq_last; i += seq_incr)); do
-              echo $i
-            done'
-      return 0;;
+      fatal_ "null_install(): invalid usage";;
   esac
-  # Else, use GNU seq if available.
-  seq "$@" && return 0
-  # Otherwise revert to a slower loop using expr(1).
-  i=$seq_first
-  while test $i -le $seq_last; do
-    echo $i
-    i=`expr $i + $seq_incr`
-  done
-}
-
-# rm_rf_ [FILES OR DIRECTORIES ...]
-# ---------------------------------
-# Recursively remove the given files or directory, also handling the case
-# of non-writable subdirectories.
-rm_rf_ ()
-{
-  test $# -gt 0 || return 0
-  # Ignore failures in find, we are only interested in failures of the
-  # final rm.
-  find "$@" -type d ! -perm -700 -exec chmod u+rwx {} \; || :
-  rm -rf "$@"
+  run_make $nulldirs $am__inst
+  test ! -e "$instdir"
+  run_make $nulldirs $am__inst DESTDIR="$destdir"
+  test ! -e "$instdir"
+  test ! -e "$destdir"
+  run_make -M $nulldirs uninstall
+  # Creative quoting below to please maintainer-check.
+  grep 'rm'' ' output && exit 1
+  run_make -M $nulldirs uninstall DESTDIR="$destdir"
+  # Creative quoting below to please maintainer-check.
+  grep 'rm'' ' output && exit 1
+  : # For 'set -e'.
 }
 
 # count_test_results total=N pass=N fail=N xpass=N xfail=N skip=N error=N
@@ -561,12 +558,12 @@ count_test_results ()
     # Avoid spurious failures with shells with "overly sensible"
     # errexit shell flag, such as e.g., Solaris /bin/sh.
     set +e
-    test `grep -c '^PASS:'  stdout` -eq $pass  || rc=1
-    test `grep -c '^XFAIL:' stdout` -eq $xfail || rc=1
-    test `grep -c '^SKIP:'  stdout` -eq $skip  || rc=1
-    test `grep -c '^FAIL:'  stdout` -eq $fail  || rc=1
-    test `grep -c '^XPASS:' stdout` -eq $xpass || rc=1
-    test `grep -c '^ERROR:' stdout` -eq $error || rc=1
+    test $(grep -c '^PASS:'  stdout) -eq $pass  || rc=1
+    test $(grep -c '^XFAIL:' stdout) -eq $xfail || rc=1
+    test $(grep -c '^SKIP:'  stdout) -eq $skip  || rc=1
+    test $(grep -c '^FAIL:'  stdout) -eq $fail  || rc=1
+    test $(grep -c '^XPASS:' stdout) -eq $xpass || rc=1
+    test $(grep -c '^ERROR:' stdout) -eq $error || rc=1
     grep "^# TOTAL:  *$total$" stdout || rc=1
     grep "^# PASS:  *$pass$"   stdout || rc=1
     grep "^# XFAIL:  *$xfail$" stdout || rc=1
@@ -578,36 +575,6 @@ count_test_results ()
   )
 }
 
-commented_sed_unindent_prog='
-  /^$/b                    # Nothing to do for empty lines.
-  x                        # Get x<indent> into pattern space.
-  /^$/{                    # No prior x<indent>, go prepare it.
-    g                      # Copy this 1st non-blank line into pattern space.
-    s/^\(['"$tab"' ]*\).*/x\1/   # Prepare x<indent> in pattern space.
-  }                        # Now: x<indent> in pattern and <line> in hold.
-  G                        # Build x<indent>\n<line> in pattern space, and
-  h                        # duplicate it into hold space.
-  s/\n.*$//                # Restore x<indent> in pattern space, and
-  x                        # exchange with the above duplicate in hold space.
-  s/^x\(.*\)\n\1//         # Remove leading <indent> from <line>.
-  s/^x.*\n//               # Restore <line> when there is no leading <indent>.
-'
-
-# unindent [input files...]
-# -------------------------
-# Remove the "proper" amount of leading whitespace from the given files,
-# and output the result on stdout.  That amount is determined by looking
-# at the leading whitespace of the first non-blank line in the input
-# files.  If no input file is specified, standard input is implied.
-unindent ()
-{
-  if test x"$sed_unindent_prog" = x; then
-    sed_unindent_prog=`printf '%s\n' "$commented_sed_unindent_prog" | sed -e "s/  *# .*//"`
-  fi
-  sed "$sed_unindent_prog" ${1+"$@"}
-}
-sed_unindent_prog="" # Avoid interferences from the environment.
-
 # get_shell_script SCRIPT-NAME
 # -----------------------------
 # Fetch an Automake-provided shell script from the 'lib/' directory into
@@ -616,17 +583,31 @@ sed_unindent_prog="" # Avoid interferences from the environment.
 # of /bin/sh.
 get_shell_script ()
 {
-  test ! -f "$1" || rm -f "$1" || return 99
+  am_source=$1 am_target=${2-$1}
+  test ! -f "$am_target" || rm -f "$am_target" || return 99
   if test x"$am_test_prefer_config_shell" = x"yes"; then
-    sed "1s|#!.*|#! $SHELL|" "$am_scriptdir/$1" > "$1" \
-     && chmod a+x "$1" \
+    sed "1s|#!.*|#! $SHELL|" "$am_scriptdir/$am_source" > "$am_target" \
+     && chmod a+x "$am_target" \
      || return 99
   else
-    cp -f "$am_scriptdir/$1" . || return 99
+    cp -f "$am_scriptdir/$am_source" "$am_target" || return 99
   fi
-  sed 10q "$1" # For debugging.
+  sed 10q "$am_target" # For debugging.
+  unset am_target am_source
+}
+
+# fetch_tap_driver
+# ----------------
+# Fetch the Automake-provided TAP driver from the 'lib/' directory into
+# the current directory, and edit its shebang line so that it will be
+# run with the proper shell.
+fetch_tap_driver ()
+{
+  AM_TAP_AWK=$AWK; export AM_TAP_AWK
+  get_shell_script tap-driver.sh tap-driver
 }
 
+
 # require_xsi SHELL
 # -----------------
 # Skip the test if the given shell fails to support common XSI constructs.
@@ -645,35 +626,64 @@ xsi_shell_code='
     && eval '\''test $(( 1 + 1 )) -eq 2 \
     && test "${#_lt_dummy}" -eq 5'\'
 
-# fetch_tap_driver
-# ----------------
-# Fetch the Automake-provided TAP driver from the 'lib/' directory into
-# the current directory, and edit its shebang line so that it will be
-# run with the perl interpreter determined at configure time.
-fetch_tap_driver ()
+# $PYTHON and support for PEP-3147.  Needed to check our python-related
+# install rules.
+python_has_pep3147 ()
 {
-  # TODO: we should devise a way to make the shell TAP driver tested also
-  # TODO: with /bin/sh, for better coverage.
-  case $am_tap_implementation in
-    perl)
-      $PERL -MTAP::Parser -e 1 \
-        || skip_all_ "cannot import TAP::Parser perl module"
-      sed "1s|#!.*|#! $PERL -w|" "$am_scriptdir"/tap-driver.pl >tap-driver
-      ;;
-    shell)
-      AM_TAP_AWK=$AWK; export AM_TAP_AWK
-      sed "1s|#!.*|#! $SHELL|" "$am_scriptdir"/tap-driver.sh >tap-driver
-      ;;
-    *)
-      fatal_ "invalid \$am_tap_implementation '$am_tap_implementation'" ;;
-  esac \
-    && chmod a+x tap-driver \
-    || framework_failure_ "couldn't fetch $am_tap_implementation TAP driver"
-  sed 10q tap-driver # For debugging.
+  if test -z "$am_pep3147_tag"; then
+    am_pep3147_tag=$($PYTHON -c 'import imp; print(imp.get_tag())') \
+      || am_pep3147_tag=none
+  fi
+  test $am_pep3147_tag != none
+}
+am_pep3147_tag=
+
+# pyc_location [-p] [FILE]
+# ------------------------
+# Determine what the actual location of the given '.pyc' or '.pyo'
+# byte-compiled file should be, taking into account PEP-3147.  Save
+# the location in the '$am_pyc_file' variable.  If the '-p' option
+# is given, print the location on the standard output as well.
+pyc_location ()
+{
+  case $#,$1 in
+    2,-p) am_pyc_print=yes; shift;;
+     1,*) am_pyc_print=no;;
+       *) fatal_ "pyc_location: invalid usage";;
+  esac
+  if python_has_pep3147; then
+    case $1 in
+      */*) am_pyc_dir=${1%/*} am_pyc_base=${1##*/};;
+        *) am_pyc_dir=. am_pyc_base=$1;;
+    esac
+    am_pyc_ext=${am_pyc_base##*.}
+    am_pyc_base=${am_pyc_base%.py?}
+    am_pyc_file=$am_pyc_dir/__pycache__/$am_pyc_base.$am_pep3147_tag.$am_pyc_ext
+  else
+    am_pyc_file=$1
+  fi
+  test $am_pyc_print = no || printf '%s\n' "$am_pyc_file"
+}
+
+# py_installed [--not] FILE
+# --------------------------
+# Check that the given python FILE has been installed (resp. *not*
+# installed, if the '--not' option is specified).  If FILE is a
+# byte-compiled '.pyc' file, the new installation layout specified
+# by PEP-3147 will be taken into account.
+py_installed ()
+{
+  case $#,$1 in
+        1,*) am_test_py_file='test -f';;
+    2,--not) am_test_py_file='test ! -e'; shift;;
+          *) fatal_ "pyc_installed: invalid usage";;
+  esac
+  case $1 in
+    *.py[co]) pyc_location "$1"; am_target_py_file=$am_pyc_file;;
+           *) am_target_py_file=$1;;
+  esac
+  $am_test_py_file "$am_target_py_file"
 }
-# The shell/awk implementation of the TAP driver is still mostly dummy, so
-# use the perl implementation by default for the moment.
-am_tap_implementation=${am_tap_implementation-shell}
 
 # Usage: require_compiler_ {cc|c++|fortran|fortran77}
 require_compiler_ ()
@@ -730,25 +740,17 @@ require_compiler_ ()
 ##  required by them.                                          ##
 ## ----------------------------------------------------------- ##
 
-# Performance tests must be enabled explicitly.
-case $argv0 in
-  */perf/*)
-    case $AM_TESTSUITE_PERF in
-      [yY]|[yY]es|1) ;;
-      *) skip_ "performance tests not explicitly enabled" ;;
-    esac
-    ;;
-esac
-
-# Look for (and maybe set up) required tools and/or system features; skip
-# the current test if they are not found.
-for tool in : $required
-do
-  # Check that each required tool is present.
-  case $tool in
-    :) ;;
+require_tool ()
+{
+  am_tool=$1
+  case $1 in
     cc|c++|fortran|fortran77)
-      require_compiler_ $tool;;
+      require_compiler_ $1;;
+    -c-o)
+      if test x"$AM_TESTSUITE_SIMULATING_NO_CC_C_O" = x"yes"; then
+        skip_all_ "need a C compiler that grasps -c and -o together"
+      fi
+      ;;
     xsi-lib-shell)
       if test x"$am_test_prefer_config_shell" = x"yes"; then
         require_xsi "$SHELL"
@@ -771,7 +773,22 @@ do
       # in the environment "by hand" before calling the testsuite.
       export CC CPPFLAGS
       echo "$me: running $CC -?"
-      $CC -? || skip_all_ "Microsoft C compiler '$CC' not available"
+      # The IRAF package (http://iraf.noao.edu/) contains a 'cl' program
+      # which is interactive, and which could cause the testsuite to hang
+      # if its standard input is not redirected.  See automake bug#14707.
+      $CC -? </dev/null \
+        || skip_all_ "Microsoft C compiler '$CC' not available"
+      ;;
+    icl)
+      CC=icl
+      # Don't export CFLAGS, as that could have been initialized to only
+      # work with the C compiler detected at configure time.  If the user
+      # wants CFLAGS to also influence 'icl', he can still export CFLAGS
+      # in the environment "by hand" before calling the testsuite.
+      export CC CPPFLAGS
+      echo "$me: running $CC -?"
+      $CC -? >/dev/null \
+        || skip_all_ "Intel C compiler '$CC' not available"
       ;;
     etags)
       # Exuberant Ctags will create a TAGS file even
@@ -783,18 +800,17 @@ do
         || skip_all_ "required program 'etags' not available"
       ;;
     GNUmake)
-      for make_ in "$MAKE" gmake gnumake :; do
-        MAKE=$make_ am__using_gmake=''
-        test "$MAKE" =  : && break
+      for am_make in "$MAKE" gmake gnumake :; do
+        MAKE=$am_make
+        am__using_gmake= # Invalidate cache used by 'using_gmake()'.
+        test "$MAKE" = : && break
         echo "$me: determine whether $MAKE is GNU make"
-        # Don't use "&&" here, or a bug of 'set -e' present in some
-        # versions of the BSD shell will be triggered.  We add the
-        # dummy "else" branch for extra safety.
-        if using_gmake; then break; else :; fi
+        using_gmake && break
+        : For shells with busted 'set -e'.
       done
       test "$MAKE" = : && skip_all_ "this test requires GNU make"
       export MAKE
-      unset make_
+      unset am_make
       ;;
     gcj)
       GCJ=$GNU_GCJ GCJFLAGS=$GNU_GCJFLAGS; export GCJ GCJFLAGS
@@ -827,6 +843,15 @@ do
         *) FC=$F77 FCFLAGS=$FFLAGS; export FC FCFLAGS;;
       esac
       ;;
+    grep-nonprint)
+      # Check that grep can parse nonprinting characters correctly.
+      # BSD 'grep' works from a pipe, but not a seekable file.
+      # GNU or BSD 'grep -a' works on files, but is not portable.
+      case $(echo "$esc" | grep .)$(echo "$esc" | grep "$esc") in
+        "$esc$esc") ;;
+        *) skip_ "grep can't handle nonprinting characters correctly";;
+      esac
+      ;;
     javac)
       # The Java compiler from JDK 1.5 (and presumably earlier versions)
       # cannot handle the '-version' option by itself: it bails out
@@ -841,8 +866,7 @@ do
       java -version -help || skip_all_ "Sun Java interpreter not found"
       ;;
     lib)
-      AR=lib
-      export AR
+      AR=lib; export AR
       # Attempting to create an empty archive will actually not
       # create the archive, but lib will output its version.
       echo "$me: running $AR -out:defstest.lib"
@@ -854,29 +878,23 @@ do
       makedepend -f- \
         || skip_all_ "required program 'makedepend' not available"
       ;;
-    makeinfo-html)
-      # Make sure we have makeinfo, and it understands '--html'.
-      echo "$me: running makeinfo --html --version"
-      makeinfo --html --version \
-        || skip_all_ "cannot find a makeinfo program that groks" \
-                     "the '--html' option"
-      ;;
     mingw)
-      uname_s=`uname -s || echo UNKNOWN`
+      uname_s=$(uname -s || echo UNKNOWN)
       echo "$me: system name: $uname_s"
       case $uname_s in
         MINGW*) ;;
         *) skip_all_ "this test requires MSYS in MinGW mode" ;;
       esac
+      unset uname_s
       ;;
     non-root)
       # Skip this test case if the user is root.
       # We try to append to a read-only file to detect this.
-      priv_check_temp=priv-check.$$
+      priv_check_temp=am--priv-check.$$
       touch $priv_check_temp && chmod a-w $priv_check_temp \
         || framework_failure_ "creating unwritable file $priv_check_temp"
-      # Not a useless use of subshell: lesser shells like Solaris /bin/sh
-      # can exit if a builtin fails.
+      # Not a useless use of subshell: lesser shells might bail
+      # out if a builtin fails.
       overwrite_status=0
       (echo foo >> $priv_check_temp) || overwrite_status=$?
       rm -f $priv_check_temp
@@ -885,7 +903,8 @@ do
       fi
       unset priv_check_temp overwrite_status
       ;;
-    perl-threads)
+    # Extra quoting required to avoid maintainer-check spurious failures.
+    'perl-threads')
       if test "$WANT_NO_THREADS" = "yes"; then
         skip_all_ "Devel::Cover cannot cope with threads"
       fi
@@ -894,14 +913,13 @@ do
       # Don't use "&&" here, to avoid a bug of 'set -e' present in
       # some (even relatively recent) versions of the BSD shell.
       # We add the dummy "else" branch for extra safety.
-      if cross_compiling; then
-        skip_all_ "doesn't work in cross-compile mode"
-      else :; fi
+      ! cross_compiling || skip_all_ "doesn't work in cross-compile mode"
       ;;
     python)
-      # Python doesn't support --version, it has -V
-      echo "$me: running python -V"
-      python -V || skip_all_ "python interpreter not available"
+      PYTHON=${PYTHON-python}
+      # Older python versions don't support --version, they have -V.
+      echo "$me: running $PYTHON -V"
+      $PYTHON -V || skip_all_ "python interpreter not available"
       ;;
     ro-dir)
       # Skip this test case if read-only directories aren't supported
@@ -909,8 +927,8 @@ do
       ro_dir_temp=ro_dir.$$
       mkdir $ro_dir_temp && chmod a-w $ro_dir_temp \
         || framework_failure_ "creating unwritable directory $ro_dir_temp"
-      # Not a useless use of subshell: lesser shells like Solaris /bin/sh
-      # can exit if a builtin fails.
+      # Not a useless use of subshell: lesser shells might bail
+      # out if a builtin fails.
       create_status=0
       (: > $ro_dir_temp/probe) || create_status=$?
       rm -rf $ro_dir_temp
@@ -934,12 +952,6 @@ do
         skip_all_ "TeX is required, but it wasn't found by configure"
       fi
       ;;
-    texi2dvi-o)
-      # Texi2dvi supports '-o' since Texinfo 4.1.
-      echo "$me: running texi2dvi -o /dev/null --version"
-      texi2dvi -o /dev/null --version \
-        || skip_all_ "required program 'texi2dvi' not available"
-      ;;
     lex)
       test x"$LEX" = x"false" && skip_all_ "lex not found or disabled"
       export LEX
@@ -958,137 +970,73 @@ do
       echo "$me: running bison --version"
       bison --version || skip_all_ "required program 'bison' not available"
       ;;
+    valac)
+      echo "$me: running valac --version"
+      if ! valac --version; then
+        skip_all_ "required program 'valac' not available"
+      elif cross_compiling; then
+        skip_all_ "cross-compiling valac-generated C files is brittle"
+      fi
+      # TODO: We also know we need GNU make, the C compiler, and pkg-config
+      # here, but there is no easy way to express this with the current
+      # code organization.  We should improve the situation, sooner or
+      # later.  At which point the tests requiring 'valac' can drop the
+      # explicit requirements for those tools.
+      ;;
     *)
       # Generic case: the tool must support --version.
-      echo "$me: running $tool --version"
-      # It is not likely but possible that $tool is a special builtin,
-      # in which case the shell is allowed to exit after an error.  So
-      # we need the subshell here.  Also, some tools, like Sun cscope,
+      echo "$me: running $1 --version"
+      # It is not likely but possible that the required tool is a special
+      # builtin, in which case the shell is allowed to exit after an error.
+      # So we need the subshell here.  Also, some tools, like Sun cscope,
       # can be interactive without redirection.
-      ($tool --version) </dev/null \
-        || skip_all_ "required program '$tool' not available"
+      ($1 --version) </dev/null \
+        || skip_all_ "required program '$1' not available"
       ;;
   esac
-done
+}
 
-# Using just $am_top_builddir for the check here is ok, since the
-# further temporary subdirectory where the test will be run is
-# ensured not to contain any whitespace character.
-case $am_top_builddir in
-  *\ *|*\      *)
+process_requirements ()
+{
+  # Look for (and maybe set up) required tools and/or system features;
+  # skip the current test if they are not found.
+  for am_tool in $*; do
+    require_tool $am_tool
+  done
+  # We might need extra m4 macros, e.g., for Libtool or Gettext.
+  for am_tool in gettext libtool pkg-config; do
     case " $required " in
-      *' libtool '* | *' libtoolize '* )
-        skip_all_ "libtool has problems with spaces in builddir name";;
+      # The lack of whitespace after $am_tool is intended.
+      *" $am_tool"*) . ./t/$am_tool-macros.dir/get.sh;;
     esac
-    ;;
-esac
-
-# This test is necessary, although Automake's configure script bails out
-# when $srcdir contains spaces.  This is because $am_top_srcdir is in not
-# configure-time $srcdir, but is instead configure-time $abs_srcdir, and
-# that is allowed to contain spaces.
-case $am_top_srcdir in
-  *\ * |*\     *)
-    case " $required " in
-      *' libtool '* | *' libtoolize '* | *' gettext '* )
-        skip_all_ "spaces in srcdir name: libtool/gettext tests won't work";;
-   esac
-   ;;
-esac
-
-# We might need extra macros, e.g., from Libtool or Gettext.
-case " $required " in *\ libtool*) . ./t/libtool-macros.dir/get.sh;; esac
-case " $required " in *\ gettext*) . ./t/gettext-macros.dir/get.sh;; esac
-
+  done
+  unset am_tool
+}
 
 ## ---------------------------------------------------------------- ##
 ##  Create and set up of the temporary directory used by the test.  ##
-##  Set up of the exit trap for cleanup of said directory.          ##
 ## ---------------------------------------------------------------- ##
 
-# This might be used in testcases checking distribution-related features.
-# Test scripts are free to override this if they need to.
-distdir=$me-1.0
-
-# Set up the exit trap.
-trap 'exit_status=$?
-  set +e
-  cd "$am_top_builddir"
-  if test $am_using_tap = yes; then
-    if test "$planned_" = later && test $exit_status -eq 0; then
-      plan_ "now"
-    fi
-    test $exit_status -eq 0 && test $tap_pass_count_ -eq $tap_count_ \
-      || keep_testdirs=yes
-  else
-    # This is to ensure that a test script does give a SKIP outcome just
-    # because a command in it happens to exit with status 77.  This
-    # behaviour, while from time to time useful to developers, is not
-    # meant to be enabled by default, as it could cause spurious failures
-    # in the wild.  Thus it will be enabled only when the variable
-    # "am_explicit_skips" is set to a "true" value.
-    case $am_explicit_skips in
-      [yY]|[yY]es|1)
-        if test $exit_status -eq 77 && test $am__test_skipped != yes; then
-          echo "$me: implicit skip turned into failure"
-          exit_status=78
-        fi;;
-    esac
-    test $exit_status -eq 0 || keep_testdirs=yes
-  fi
-  am_keeping_testdirs || rm_rf_ $testSubDir
-  set +x
-  echo "$me: exit $exit_status"
-  exit $exit_status
-' 0
-trap "fatal_ 'caught signal SIGHUP'" 1
-trap "fatal_ 'caught signal SIGINT'" 2
-trap "fatal_ 'caught signal SIGTERM'" 15
-# Various shells seems to just ignore SIGQUIT under some circumstances,
-# even if the signal is not blocked; however, if the signal it trapped,
-# the trap gets correctly executed.  So we also trap SIGQUIT.
-# Here is a list of some shells that have been verified to exhibit the
-# problematic behavior with SIGQUIT:
-#  - zsh 4.3.12 on Debian GNU/Linux
-#  - /bin/ksh and /usr/xpg4/bin/sh on Solaris 10
-#  - Bash 3.2.51 on Solaris 10 and bash 4.1.5 on Debian GNU/Linux
-#  - AT&T ksh on Debian Gnu/Linux (deb package ksh, version 93u-1)
-# OTOH, at least these shells that do *not* exhibit that behaviour:
-#  - modern version of the Almquist Shell (at least 0.5.5.1), on
-#    both Solaris and GNU/Linux
-#  - Solaris 10 /bin/sh
-#  - public domain Korn Shell, version 5.2.14, on Debian GNU/Linux
-trap "fatal_ 'caught signal SIGQUIT'" 3
-# Ignore further SIGPIPE in the trap code.  This is required to avoid
-# a very weird issue with some shells, at least when the execution of
-# the automake testsuite is driven by the 'prove' utility: if prove
-# (or the make process that has spawned it) gets interrupted with
-# Ctrl-C, the shell might go in a loop, continually getting a SIGPIPE,
-# sometimes finally dumping core, other times hanging indefinitely.
-# See also Test::Harness bug [rt.cpan.org #70855], archived at
-# <https://rt.cpan.org/Ticket/Display.html?id=70855>
-trap "trap '' 13; fatal_ 'caught signal SIGPIPE'" 13
-
-# Create and populate the temporary directory, if and as required.
-if test x"$am_create_testdir" = x"no"; then
-  testSubDir=
-else
+am_setup_testdir ()
+{
   # The subdirectory where the current test script will run and write its
   # temporary/data files.  This will be created shortly, and will be removed
   # by the cleanup trap below if the test passes.  If the test doesn't pass,
   # this directory will be kept, to facilitate debugging.
-  testSubDir=t/$me.dir
-  test ! -d $testSubDir || rm_rf_ $testSubDir \
+  am_test_subdir=${argv0#$am_rel_srcdir/}
+  case $am_test_subdir in
+    */*) am_test_subdir=${am_test_subdir%/*}/$me.dir;;
+      *) am_test_subdir=$me.dir;;
+  esac
+  test ! -e $am_test_subdir || rm_rf_ $am_test_subdir \
     || framework_failure_ "removing old test subdirectory"
-  test -d t || mkdir t
-  mkdir $testSubDir \
+  $MKDIR_P $am_test_subdir \
     || framework_failure_ "creating test subdirectory"
-  # The trailing './'ris to avoid CDPATH issues.
-  cd ./$testSubDir \
+  cd $am_test_subdir \
     || framework_failure_ "cannot chdir into test subdirectory"
   if test x"$am_create_testdir" != x"empty"; then
     cp "$am_scriptdir"/install-sh "$am_scriptdir"/missing \
-       "$am_scriptdir"/depcomp . \
+       "$am_scriptdir"/compile "$am_scriptdir"/depcomp . \
       || framework_failure_ "fetching common files from $am_scriptdir"
     # Build appropriate environment in test directory.  E.g., create
     # configure.ac, touch all necessary files, etc.  Don't use AC_OUTPUT,
@@ -1098,19 +1046,18 @@ else
     {
       echo "AC_INIT([$me], [1.0])"
       if test x"$am_serial_tests" = x"yes"; then
-        echo "AM_INIT_AUTOMAKE"
+        echo "AM_INIT_AUTOMAKE([serial-tests])"
       else
-        echo "AM_INIT_AUTOMAKE([parallel-tests])"
+        echo "AM_INIT_AUTOMAKE"
       fi
       echo "AC_CONFIG_FILES([Makefile])"
     } >configure.ac || framework_failure_ "creating configure.ac skeleton"
   fi
-fi
-
-
-## ---------------- ##
-##  Ready to go...  ##
-## ---------------- ##
+}
 
-set -x
-pwd
+am_extra_info ()
+{
+  echo "Running from installcheck: $am_running_installcheck"
+  echo "Test Protocol: $am_test_protocol"
+  echo "PATH = $PATH"
+}
old mode 100755 (executable)
new mode 100644 (file)
similarity index 50%
rename from t/info.sh
rename to t/ax/cc-no-c-o.in
index 738ddfd..9bc802a
--- a/t/info.sh
@@ -1,5 +1,5 @@
-#! /bin/sh
-# Copyright (C) 1996-2012 Free Software Foundation, Inc.
+#! @AM_TEST_RUNNER_SHELL@
+# Copyright (C) 2012-2017 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 to make sure info files are distributed correctly.
-# FIXME: This test is probably obsoleted, or wrong.  The generated
-#        Makefile.in seems not to define any 'INFOS' variable!
+# A "C compiler" that chokes when the '-c' and '-o' options are passed
+# together to it on the command line.  See also automake bug#13378.
 
-. ./defs || Exit 1
+am_CC=${AM_TESTSUITE_GNU_CC-'@GNU_CC@'}
 
-cat > Makefile.am << 'END'
-info_TEXINFOS = foo.texi
-END
+seen_c=false
+seen_o=false
 
-echo '@setfilename foo.info' > foo.texi
-: > texinfo.tex
-
-$ACLOCAL
-$AUTOMAKE
-
-for i in `grep '^INFOS =' Makefile.in | sed -e 's/^INFOS = //'`; do
-   echo $i
-   case "$i" in
-    foo*)
-       ;;
-    *)
-       Exit 1
-       ;;
-   esac
+for arg
+do
+  case $arg in
+    -c)
+      seen_c=true;;
+    # It is acceptable not to leave a space between the '-o' option
+    # and its argument, so we have to cater for that.
+    -o|-o*)
+      seen_o=true;;
+  esac
+  if $seen_c && $seen_o; then
+    echo "$0: both '-o' and '-c' seen on the command line" >&2
+    exit 2
+  fi
 done
 
-:
+exec $am_CC "$@"
old mode 100755 (executable)
new mode 100644 (file)
similarity index 58%
rename from t/fo.sh
rename to t/ax/deltree.pl
index 50b4f4a..5148dc2
--- a/t/fo.sh
@@ -1,36 +1,34 @@
-#! /bin/sh
-# Copyright (C) 1998-2012 Free Software Foundation, Inc.
-#
+#!/usr/bin/env perl
+# deltree: recursively removes file and directory,
+# trying to handle permissions and other complications.
+
+# Copyright (C) 2013-2017 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 Fortran 77 files are rewritten to ".o" and not just "o".
-# Matthew D. Langston <langston@SLAC.Stanford.EDU>
-
-. ./defs || Exit 1
-
-cat >> configure.ac << 'END'
-AC_PROG_F77
-END
+use strict;
+use warnings FATAL => 'all';
+use File::Path qw/rmtree/;
 
-cat > Makefile.am << 'END'
-sbin_PROGRAMS = anonymous
-anonymous_SOURCES = doe.f
-END
+my $exit_status = 0;
+local $SIG{__WARN__} = sub { warn "@_"; $exit_status = 1; };
 
-: > doe.f
+foreach my $path (@ARGV) {
+  local $@ = undef;
+  rmtree ($path);
+}
 
-$ACLOCAL
-$AUTOMAKE
+exit $exit_status;
 
-$FGREP 'doe.$(OBJEXT)' Makefile.in
+# vim: ft=perl ts=4 sw=4 et
index a9180e9..9d0036c 100644 (file)
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2012 Free Software Foundation, Inc.
+# Copyright (C) 2012-2017 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
@@ -67,9 +67,9 @@
 
 # -------------------------------------------------------------------------
 
-# This expects ./defs has already been included has already been included..
+# This code expects test-init.sh has already been included in advance.
 
-ocwd=`pwd` || fatal_ "cannot get current working directory"
+ocwd=$(pwd) || fatal_ "getting current working directory"
 longpath=this-is/a-path/which-has/quite-a/definitely/truly/long_long_name
 cachevar=am_cv_CC_dependencies_compiler_type
 
@@ -130,15 +130,14 @@ check_distclean ()
 cat > configure.ac <<END
 AC_INIT([$me], [1.0])
 AC_CONFIG_AUX_DIR([build-aux])
-AM_INIT_AUTOMAKE
+AM_INIT_AUTOMAKE([subdir-objects])
 AC_PROG_CC
-AM_PROG_CC_C_O
 AM_PROG_AR
-`if test $depcomp_with_libtool = yes; then
-  echo AC_PROG_LIBTOOL
-else
-  echo AC_PROG_RANLIB
-fi`
+$(if test $depcomp_with_libtool = yes; then
+    echo AC_PROG_LIBTOOL
+  else
+    echo AC_PROG_RANLIB
+  fi)
 AC_CONFIG_FILES([Makefile src/Makefile])
 AC_OUTPUT
 END
@@ -161,8 +160,7 @@ case $depcomp_with_libtool in
     echo lib_LTLIBRARIES = libfoo.la >> Makefile.am
     make_ok ()
     {
-      $MAKE ${1+"$@"} >output 2>&1 || { cat output; return 1; }
-      cat output
+      run_make -M -- ${1+"$@"}
       $FGREP 'unknown directive' output && return 1
       rm -f output
       # Checks for stray files possibly left around by less common
@@ -200,18 +198,17 @@ ${normalized_target}_${LINKADD} = src/libbaz.$a
 grep-test:
 ## For debugging.
        cat \$(DEPDIR)/foo.$po || :
-       cat \$(DEPDIR)/subfoo.$po || :
+       cat sub/\$(DEPDIR)/subfoo.$po || :
        cat src/\$(DEPDIR)/baz.$po || :
        cat src/sub2/\$(DEPDIR)/sub2foo.$po || :
-## Checks done here.
+## Checks are done here.
        grep '^foo.$objext.*:' \$(DEPDIR)/foo.$po
-       grep '^subfoo\.$objext.*:' \$(DEPDIR)/subfoo.$po
+       grep '^sub/subfoo\.$objext.*:' sub/\$(DEPDIR)/subfoo.$po
        grep '^baz\.$objext.*:' src/\$(DEPDIR)/baz.$po
        grep '^sub2/sub2foo\.$objext.*:' src/sub2/\$(DEPDIR)/sub2foo.$po
 END
 
 cat > src/Makefile.am <<END
-AUTOMAKE_OPTIONS = subdir-objects
 noinst_${LIBPRIMARY} = libbaz.$a
 # We include sub2foo only to be sure that the munging in depcomp
 # doesn't remove too much from the object file name.
@@ -343,7 +340,7 @@ do_test ()
     absolute)
       mkdir -p vpath-abs/build
       cd vpath-abs/build
-      absdir="`(cd .. && pwd)`" || fatal_ "getting absolute directory"
+      absdir=$(cd .. && pwd) || fatal_ "getting absolute directory"
       setup_srcdir "$absdir/vpath-abs"
       unset absdir
       ;;
index 5d36102..68c34a0 100644 (file)
@@ -1,6 +1,6 @@
 ## Data files for some tests.  Not used in the automake build system.
 ##
-## Copyright (C) 2011-2012 Free Software Foundation, Inc.
+## Copyright (C) 2011-2017 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 28a9c35..180f539 100644 (file)
@@ -1,8 +1,8 @@
 #! /usr/bin/env perl
-# Extract the testsuite summary generated by the parallel-tests harness
-# from the output of "make check".
+# Extract the testsuite summary generated by the parallel testsuite
+# harness from the output of "make check".
 
-# Copyright (C) 2012 Free Software Foundation, Inc.
+# Copyright (C) 2012-2017 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
diff --git a/t/ax/is b/t/ax/is
index 1e1c0ce..c085793 100755 (executable)
--- a/t/ax/is
+++ b/t/ax/is
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2012 Free Software Foundation, Inc.
+# Copyright (C) 2012-2017 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
@@ -21,6 +21,9 @@
 # in the face of variables defined through line-continuations,
 # automake rewrites and expansions of empty variables.
 
+# NOTE: keep this file Bourne-compatible, for the sake of systems with
+#       non-POSIX /bin/sh (like Solaris).
+
 set -e
 set -u
 
diff --git a/t/ax/is_newest b/t/ax/is_newest
new file mode 100755 (executable)
index 0000000..1cf0da1
--- /dev/null
@@ -0,0 +1,42 @@
+#! /bin/sh
+# Copyright (C) 2012-2017 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/>.
+
+# Usage: is_newest FILE FILES
+# Fail if any file in FILES is newer than FILE, and print the list of
+# such files on the standard error.  Resolve ties in favor of FILE.
+
+# NOTE: keep this file Bourne-compatible, for the sake of systems with
+#       non-POSIX /bin/sh (like Solaris).
+
+set -u
+
+me=is_newest
+
+if test $# -lt 2; then
+  echo "$me: too few arguments" >&2
+  exit 2
+fi
+
+file=$1; shift
+newer_files=`find "$@" -prune -newer "$file"` || exit $?
+
+if test -n "$newer_files"; then
+  echo "$me: these files are newer than '$file':" >&2
+  for f in $newer_files; do echo "* $f" >&2; done
+  exit 1
+fi
+
+exit 0
diff --git a/t/ax/plain-functions.sh b/t/ax/plain-functions.sh
deleted file mode 100644 (file)
index e6483dc..0000000
+++ /dev/null
@@ -1,40 +0,0 @@
-# -*- shell-script -*-
-#
-# 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/>.
-
-# Helper functions used by "plain" tests of the Automake testsuite
-# (i.e., tests that don't use any test protocol).
-
-# Print warnings (e.g., about skipped and failed tests) to this file
-# number.  Override by putting, say:
-#   AM_TESTS_ENVIRONMENT = stderr_fileno_=9; export stderr_fileno_;
-#   AM_TESTS_FD_REDIRECT = 9>&2
-# in your Makefile.am.
-# This is useful when using automake's parallel tests mode, to print the
-# reason for skip/failure to console, rather than to the *.log files.
-: ${stderr_fileno_=2}
-
-# Copied from Gnulib's 'tests/init.sh'.
-warn_ () { echo "$@" 1>&$stderr_fileno_; }
-fail_ () { warn_ "$me: failed test: $@"; Exit 1; }
-skip_ () { warn_ "$me: skipped test: $@"; Exit 77; }
-fatal_ () { warn_ "$me: hard error: $@"; Exit 99; }
-framework_failure_ () { warn_ "$me: set-up failure: $@"; Exit 99; }
-
-# For compatibility with TAP functions.
-skip_all_ () { skip_ "$@"; }
-
-:
diff --git a/t/ax/runtest.in b/t/ax/runtest.in
new file mode 100644 (file)
index 0000000..7caceb2
--- /dev/null
@@ -0,0 +1,130 @@
+#!@AM_TEST_RUNNER_SHELL@
+# @configure_input@
+#
+# Copyright (C) 2012-2017 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/>.
+
+# Run an Automake test from the command line.
+
+set -e; set -u
+
+: ${AM_TEST_RUNNER_SHELL='@AM_TEST_RUNNER_SHELL@'}
+: ${AM_PROVE_CMD='prove'}
+: ${AM_PROVEFLAGS='--merge --verbose'}
+: ${srcdir='@srcdir@'}
+: ${abs_srcdir='@abs_srcdir@'}
+: ${abs_builddir='@abs_builddir@'}
+: ${PATH_SEPARATOR='@PATH_SEPARATOR@'}
+
+# For sourcing of extra "shell libraries" by our test scripts.  As per
+# POSIX, sourcing a file with '.' will cause it to be looked up in $PATH
+# in case it is given with a relative name containing no slashes.
+if test "$srcdir" != .; then
+  PATH=$abs_srcdir/t/ax$PATH_SEPARATOR$PATH
+fi
+PATH=$abs_builddir/t/ax$PATH_SEPARATOR$PATH
+export PATH
+
+# For use by the testsuite framework.  The Automake test harness
+# define this, so we better do the same.
+export srcdir
+
+# Some testsuite-influential variables should be overridable from the
+# test scripts, but not from the environment.
+# Keep this in sync with the 'Makefile.am:AM_TESTS_ENVIRONMENT'.
+for v in \
+  required \
+  am_test_protocol \
+  am_serial_tests \
+  am_test_prefer_config_shell \
+  am_original_AUTOMAKE \
+  am_original_ACLOCAL \
+  am_test_lib_sourced \
+  test_lib_sourced \
+; do
+  eval "$v= && unset $v" || exit 1
+done
+unset v
+
+xecho () { printf '%s\n' "$*"; }
+error () { echo "$0: $*" >&2; exit 255; }
+
+# Some shell flags should be passed over to the test scripts.
+shell_opts=
+while test $# -gt 0; do
+  case $1 in
+    --help)
+       xecho "Usage: $0 [--shell=PATH] [-k] [SHELL-OPTIONS]" \
+             "[VAR=VALUE ...] TEST [TEST-OPTIONS]"
+       exit $?
+       ;;
+    --shell)
+       test $# -gt 1 || error "missing argument for option '$1'"
+       AM_TEST_RUNNER_SHELL=$2
+       shift
+       ;;
+    --shell=*)
+       AM_TEST_RUNNER_SHELL=${1#--shell=}
+       ;;
+    -o)
+       test $# -gt 1 || error "missing argument for option '$1'"
+       shell_opts="$shell_opts -o $2"
+       shift
+       ;;
+    -k|--keep-testdir|--keep-testdirs)
+       keep_testdirs=yes; export keep_testdirs;;
+    -*)
+       # Assume it is an option to pass through to the shell.
+       shell_opts="$shell_opts $1";;
+    *=*)
+       var=${1%%=*} val=${1#*=}
+       xecho "$var" | LC_ALL=C grep '^[a-zA-Z_][a-zA-Z0-9_]*$' >/dev/null \
+         || error "'$var': invalid variable name"
+       eval "$var=\$val && export $var" || exit 1
+       ;;
+     *)
+       break;;
+  esac
+  shift
+done
+
+test $# -gt 0 || error "missing argument"
+
+tst=$1; shift
+
+case $tst in
+  /*) ;;
+   *) if test -f ./$tst; then
+        tst=./$tst
+      # Support for VPATH build.
+      elif test -f $srcdir/$tst; then
+        tst=$srcdir/$tst
+      else
+        error "could not find test '$tst'"
+      fi
+      ;;
+esac
+
+case $tst in
+  *.sh)
+    exec $AM_TEST_RUNNER_SHELL $shell_opts "$tst" ${1+"$@"} ;;
+  *.tap)
+    exec "$AM_PROVE_CMD" $AM_PROVEFLAGS -e \
+         "$AM_TEST_RUNNER_SHELL $shell_opts" "$tst" ${1+"$@"} ;;
+  *)
+    error "test '$tst' has an unrecognized extension" ;;
+esac
+
+error "dead code reached"
diff --git a/t/ax/shell-no-trail-bslash.in b/t/ax/shell-no-trail-bslash.in
new file mode 100644 (file)
index 0000000..eefd90e
--- /dev/null
@@ -0,0 +1,85 @@
+#! @AM_TEST_RUNNER_SHELL@
+# Copyright (C) 2012-2017 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 "shell" that chokes on '-c' commands and/or shell scripts having
+# a trailing '\' character (possibly followed by whitespace only).
+# This is to emulate problems seen in older bash versions (e.g., bash
+# 2.05b). See also automake bug#10436.
+
+set -u
+
+am_SHELL=${AM_TESTSUITE_SHELL-'@SHELL@'}
+
+(
+  set -e
+  shell_command=; unset shell_command
+  shell_script=; unset shell_script
+  while test $# -gt 0; do
+    case $1 in
+      # The shell might be invoked by make e.g. as "sh -ec" or "sh -ce".
+      # Be liberal (in the spirit of defensive programming) and accept
+      # both forms.
+      -*c*) shell_command=$2; shift;;
+       -?*) ;;
+         *) break;;
+    esac
+    shift
+  done
+
+  if test x${shell_command+"set"} != x"set"; then
+    if test $# -gt 0; then
+      shell_script=$1
+      shell_command=$(cat <"$shell_script")
+    else
+      # Some make implementations, like *BSD's, pass the recipes to the
+      # shell through its standard input.  Trying to run our extra checks
+      # in this case would be too tricky, so we just skip them.
+      exit 0
+    fi
+  fi
+  original_shell_command=$shell_command
+
+  tab='        '
+  nl='
+'
+  case "$shell_command" in
+    *" "|*"$tab"|*"$nl")
+      shell_command=$(printf '%s\n' "$shell_command" | tr -d " $tab$nl");;
+  esac
+
+  case "$shell_command" in
+    *\\)
+      {
+        printf '%s\n' "$0: recipe/script ends with backslash character"
+        printf '%s\n' "=== BEGIN recipe/script"
+        if test x${shell_script+"set"} = x"set"; then
+          cat <"$shell_script"
+        else
+          printf '%s\n' "$original_shell_command"
+        fi
+        printf '%s\n' "=== END recipe/script"
+      } >&2
+      exit 1
+      ;;
+  esac
+)
+
+if test $? -gt 0; then
+  # Some of our scripts or makefile recipes had invalid contents.
+  exit 3
+fi
+
+exec ${AM_TESTSUITE_SHELL-'@SHELL@'} ${1+"$@"}
index 3a5db03..17a6c11 100644 (file)
@@ -1,6 +1,6 @@
 # -*- shell-script -*-
 #
-# Copyright (C) 2011-2012 Free Software Foundation, Inc.
+# Copyright (C) 2011-2017 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
@@ -31,24 +31,10 @@ tap_fail_count_=0
 tap_xfail_count_=0
 tap_xpass_count_=0
 
-# The first "test -n" tries to avoid extra forks when possible.
-if test -n "${ZSH_VERSION}${BASH_VERSION}" \
-     || (eval 'test $((1 + 1)) = 2') >/dev/null 2>&1
-then
-  # Outer use of 'eval' needed to protect dumber shells from parsing
-  # errors.
-  eval 'incr_ () { eval "$1=\$((\${$1} + 1))"; }'
-else
-  incr_ () { eval "$1=\`expr \${$1} + 1\`"; }
-fi
-
 # not COMMAND [ARGS...]
 # ---------------------
 # Run the given command and invert its exit status.
-not ()
-{
-  if "$@"; then return 1; else return 0; fi
-}
+not () { ! "$@"; }
 
 # plan_ [unknown|later|lazy|now|NUMBER-OF-PLANNED-TESTS]
 # ------------------------------------------------------
@@ -136,14 +122,20 @@ result_ ()
     ""|TODO|SKIP) ;;
     *) bailout_ "result_: invalid directive '$directive_'" ;;
   esac
-  incr_ tap_count_
+  tap_count_=$(($tap_count_ + 1))
   case $tap_result_,$tap_directive_ in
-    ok,) incr_ tap_pass_count_;;                # Passed.
-    not\ ok,TODO) incr_ tap_xfail_count_;;      # Expected failure.
-    not\ ok,*) incr_ tap_fail_count_ ;;         # Failed.
-    ok,TODO) incr_ tap_xpass_count_ ;;          # Unexpected pass.
-    ok,SKIP) incr_ tap_skip_count_ ;;           # Skipped.
-    *) bailout_ "internal error in 'result_'";; # Can't happen.
+    ok,)                                                # Passed.
+      tap_pass_count_=$(($tap_pass_count_ + 1))         ;;
+    not\ ok,TODO)                                       # Expected failure.
+      tap_xfail_count_=$(($tap_xfail_count_ + 1))       ;;
+    not\ ok,*)                                          # Failed.
+      tap_fail_count_=$(($tap_fail_count_ + 1))         ;;
+    ok,TODO)                                            # Unexpected pass.
+      tap_xpass_count_=$(($tap_xpass_count_ + 1))       ;;
+    ok,SKIP)                                            # Skipped.
+      tap_skip_count_=$(($tap_skip_count_ + 1))         ;;
+    *)                                                  # Can't happen.
+      bailout_ "internal error in 'result_'"            ;;
   esac
   tap_text_="$tap_result_ $tap_count_"
   if test x"$*" != x; then
@@ -169,7 +161,7 @@ skip_ () { result_ 'ok' -D SKIP ${1+"$@"}; }
 skip_row_ ()
 {
   skip_count_=$1; shift
-  for i_ in `seq_ $skip_count_`; do skip_ ${1+"$@"}; done
+  for i_ in $(seq_ $skip_count_); do skip_ ${1+"$@"}; done
 }
 
 # skip_all_ [REASON ...]
@@ -180,7 +172,7 @@ skip_all_ ()
 {
   echo "1..0 # SKIP" ${1+"$@"}
   planned_=0
-  Exit 0
+  exit 0
 }
 
 # bailout_ [REASON ...]
@@ -191,7 +183,7 @@ skip_all_ ()
 bailout_ ()
 {
   echo 'Bail out!' ${1+"$@"}
-  Exit 99
+  exit 99
 }
 
 # fatal_ [REASON ...]
index 70487c3..0eae2a3 100644 (file)
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2011-2012 Free Software Foundation, Inc.
+# Copyright (C) 2011-2017 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
@@ -22,7 +22,7 @@
 
 # Check that we are running from a proper directory: last thing we want
 # is to overwrite some random user files.
-test -f ../../defs-static && test -f ../../defs && test -d ../../t \
+test -f ../../bin/automake && test -f ../../runtest && test -d ../../t \
   || fatal_ "running from a wrong directory"
 
 test ! -f Makefile.am || mv Makefile.am Makefile.am~ \
@@ -36,7 +36,7 @@ fetch_tap_driver
 if test -f Makefile.am~; then
   mv -f Makefile.am~ Makefile.am \
     || fatal_ "failed to restore Makefile.am"
-  echo 'TEST_LOG_DRIVER = $(PERL) $(srcdir)/tap-driver' >> Makefile.am \
+  echo 'TEST_LOG_DRIVER = $(srcdir)/tap-driver' >> Makefile.am \
     || fatal_ "failed to update Makefile.am"
   $AUTOMAKE Makefile \
     || fatal_ "failed to remake Makefile.in"
index f5d1fbd..1f22f3f 100644 (file)
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2011-2012 Free Software Foundation, Inc.
+# Copyright (C) 2011-2017 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
@@ -16,7 +16,7 @@
 
 # Auxiliary script for tests on TAP support: checking testsuite summary.
 
-. ./defs || Exit 1
+. test-init.sh
 
 br='============================================================================'
 
@@ -29,7 +29,7 @@ fetch_tap_driver
 
 cat > configure.ac <<END
 AC_INIT([GNU AutoTAP], [5.12], [bug-automake@gnu.org])
-AM_INIT_AUTOMAKE([parallel-tests])
+AM_INIT_AUTOMAKE
 AC_CONFIG_FILES([Makefile])
 AC_OUTPUT
 END
@@ -53,22 +53,20 @@ do_check ()
   shift
   cat > summary.exp
   cat all.test
-  st=0
   if test $use_colors = yes; then
     # Forced colorization should take place also with non-ANSI terminals;
     # hence the "TERM=dumb" definition.
-    make_cmd="env TERM=dumb AM_COLOR_TESTS=always $MAKE -e"
+    make_args='TERM=dumb AM_COLOR_TESTS=always'
   else
-    make_cmd=$MAKE
+    make_args=
   fi
-  $make_cmd check > stdout || st=$?
-  cat stdout
+  run_make -O -e IGNORE $make_args check
   if test $expect_failure = yes; then
-    test $st -gt 0 || Exit 1
+    test $am_make_rc -gt 0 || exit 1
   else
-    test $st -eq 0 || Exit 1
+    test $am_make_rc -eq 0 || exit 1
   fi
-  $PERL "$am_testauxdir"/extract-testsuite-summary.pl stdout >summary.got \
+  $PERL "$am_testaux_srcdir"/extract-testsuite-summary.pl stdout >summary.got \
     || fatal_ "cannot extract testsuite summary"
   cat summary.exp
   cat summary.got
@@ -78,18 +76,17 @@ do_check ()
   else
     compare=diff
   fi
-  $compare summary.exp summary.got || Exit 1
+  $compare summary.exp summary.got || exit 1
 }
 
 if test $use_colors = yes; then
-  red='\e[0;31m'
-  grn='\e[0;32m'
-  lgn='\e[1;32m'
-  blu='\e[1;34m'
-  mgn='\e[0;35m'
-  brg='\e[1m'
-  std='\e[m'
-  echo AUTOMAKE_OPTIONS = color-tests >> Makefile.am
+  red="$esc[0;31m"
+  grn="$esc[0;32m"
+  lgn="$esc[1;32m"
+  blu="$esc[1;34m"
+  mgn="$esc[0;35m"
+  brg="$esc[1m"
+  std="$esc[m"
 else
   red= grn= lgn= blu= mgn= brg= std=
 fi
@@ -311,7 +308,7 @@ done > tap
 
 # Lots of non-failures (300 per kind).
 (cat tap && cat tap && cat tap) > all.test
-test `wc -l <all.test` -eq 900 || Exit 99 # Sanity check.
+test $(wc -l <all.test) -eq 900 || exit 99 # Sanity check.
 echo 1..900 >> all.test # Test plan.
 do_check --pass <<END
 $success_header
@@ -327,7 +324,7 @@ END
 
 # 1 failure and lots of non-failures means failure.
 (cat tap && echo "not ok" && cat tap) > all.test
-test `wc -l <all.test` -eq 601 || Exit 99 # Sanity check.
+test $(wc -l <all.test) -eq 601 || exit 99 # Sanity check.
 echo 1..601 >> all.test # Test plan.
 do_check --fail <<END
 $failure_header
@@ -343,7 +340,7 @@ END
 
 # 1 error and lots of non-failures means failure.
 (cat tap && sed 30q tap && echo 'Bail out!') > all.test
-test `wc -l <all.test` -eq 331 || Exit 99 # Sanity check.
+test $(wc -l <all.test) -eq 331 || exit 99 # Sanity check.
 echo 1..331 >> all.test # Test plan.
 do_check --fail <<END
 $failure_header
similarity index 64%
rename from defs-static.in
rename to t/ax/test-defs.in
index 1dfd8d3..2465c61 100644 (file)
@@ -1,7 +1,7 @@
 # -*- shell-script -*-
 # @configure_input@
 #
-# Copyright (C) 1996-2012 Free Software Foundation, Inc.
+# Copyright (C) 1996-2017 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
 # IMPORTANT NOTES AND REQUIREMENTS
 #   - Multiple inclusions of this file should be idempotent.
 #   - This code has to be 'set -e' clean.
-#   - This file should execute correctly with any system's /bin/sh
-#     shell, not only with configure-time detected $SHELL and/or
-#     $AM_TEST_RUNNER_SHELL.
-
-# Be more Bourne compatible.
-# (Snippet inspired to configure's initialization in Autoconf 2.64)
-DUALCASE=1; export DUALCASE # for MKS sh
-if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
-  emulate sh
-  NULLCMD=:
-  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
-  # is contrary to our usage.  Disable this feature.
-  alias -g '${1+"$@"}'='"$@"'
-  setopt NO_GLOB_SUBST
-  # If Zsh is not started directly in Bourne-compatibility mode, it has
-  # some incompatibilities in the handling of $0 that conflict with
-  # our usage: i.e., $0 inside a file sourced with the '.' builtin is
-  # temporarily set to the name of the sourced file.
-  # Work around this when possible, otherwise abort the script.
-  # Note that a bug in some versions of Zsh prevents us from resetting $0
-  # in a sourced script, so the use of $argv0.  For more info see:
-  #  <http://www.zsh.org/mla/workers/2009/msg01140.html>
-  # Note: the apparently useless 'eval' below are needed by at least
-  # dash 0.5.2, to prevent it from bailing out with an error like
-  # "Syntax error: Bad substitution"
-  if eval '[[ "$0" = *."test" ]]'; then
-    # Good, FUNCTION_ARGZERO option was already off when this file was
-    # sourced.  Thus we've nothing to do.
-    argv0=$0
-  elif eval 'test -n "${functrace[-1]}"'; then
-    # FUNCTION_ARGZERO option was on, but we have a easy workaround.
-    eval 'argv0=${functrace[-1]%:*}'
-  else
-    # Give up.
-    echo "$0: cannot determine the path of running test script" >&2
-    echo "$0: test was running with Zsh version $ZSH_VERSION" >&2
-    echo "$0: did you enable the NO_FUNCTION_ARGZERO option?" >&2
-    exit 99
-  fi
-else
-  argv0=$0
-  # Avoid command substitution failure, for Tru64 sh -e and instspc*.test.
-  case `(set -o) 2>/dev/null || :` in *posix*) set -o posix;; esac
-fi
-
-# Check that the environment is properly sanitized.
-# Having variables exported to the empty string is OK, since our code
-# treats such variables as if they were unset.
-for var in \
-  me \
-  required \
-  am_using_tap \
-  am_serial_tests \
-  am_create_testdir \
-  am_tap_implementation \
-  am_test_prefer_config_shell \
-  am_original_AUTOMAKE \
-  am_original_ACLOCAL \
-; do
-  if eval "test x\"\$$var\" != x" && env | grep "^$var=" >/dev/null; then
-    echo "$argv0: variable '$var' is set in the environment:" \
-         "this is unsafe" >&2
-    exit 99
-  fi
-done
-unset var
 
 # See whether the current test script is expected to use TAP or not.
 # Use a sensible default, while allowing the scripts to override this
 # check.
-if test -z "$am_using_tap"; then
-  case $argv0 in *.tap) am_using_tap=yes;; *) am_using_tap=no;; esac
+if test -z "$am_test_protocol"; then
+  case $argv0 in
+    *.tap) am_test_protocol=tap;;
+        *) am_test_protocol=none;;
+  esac
 fi
 
+am_rel_srcdir='@srcdir@'
 am_top_srcdir='@abs_srcdir@'
 am_top_builddir='@abs_builddir@'
-testprefix='@prefix@'
 
 # Where testsuite-related helper scripts, data files and shell libraries
 # are placed.
-am_testauxdir=$am_top_srcdir/t/ax
+am_testaux_srcdir=$am_top_srcdir/t/ax
+am_testaux_builddir=$am_top_builddir/t/ax
 
 # Support for the "installcheck" target.
 case ${am_running_installcheck:=no} in
@@ -126,7 +64,7 @@ case ${am_running_installcheck:=no} in
     am_system_acdir=$am_top_srcdir/m4/acdir
     ;;
   *)
-    echo "$argv0: variable 'am_running_installcheck' has invalid"
+    echo "$me: variable 'am_running_installcheck' has invalid"
          "value '$am_running_installcheck'" >&2
     exit 99
     ;;
@@ -138,10 +76,18 @@ PATH_SEPARATOR='@PATH_SEPARATOR@'
 host_alias=${host_alias-'@host_alias@'}; export host_alias
 build_alias=${build_alias-'@build_alias@'}; export build_alias
 
+# Whether the testsuite is being run by faking the presence of a C
+# compiler that doesn't grasp the '-c' and '-o' flags together.  By
+# default, of course, it isn't.
+: "${AM_TESTSUITE_SIMULATING_NO_CC_C_O:=no}"
+
+# A concurrency-safe "mkdir -p" implementation.
+MKDIR_P=${AM_TESTSUITE_MKDIR_P-'@MKDIR_P@'}
+
 # The shell we use to run our own test scripts, determined at configure
 # time.  It is required in the self tests, and most importantly for the
-# the automatic re-execution of test scripts.
-AM_TEST_RUNNER_SHELL='@AM_TEST_RUNNER_SHELL@'
+# automatic re-execution of test scripts.
+AM_TEST_RUNNER_SHELL=${AM_TEST_RUNNER_SHELL-'@AM_TEST_RUNNER_SHELL@'}
 
 # Make sure we override the user shell.  And do not read the value of
 # $SHELL from the environment (think to the non-uncommon situation where
@@ -161,10 +107,10 @@ AUTORECONF=${AM_TESTSUITE_AUTORECONF-${AUTORECONF-'@am_AUTORECONF@'}}
 AUTOHEADER=${AM_TESTSUITE_AUTOHEADER-${AUTOHEADER-'@am_AUTOHEADER@'}}
 AUTOUPDATE=${AM_TESTSUITE_AUTOUPDATE-${AUTOUPDATE-'@am_AUTOUPDATE@'}}
 
-# Tests who want complete control over aclocal or automake command-line
+# Tests which want complete control over aclocal or automake command-line
 # options should use $am_original_ACLOCAL or $am_original_AUTOMAKE.  The
-# "test -z" tests take care not to re-initialize them if defs-static
-# is re-sourced, as we want defs-static to remain really idempotent.
+# "test -z" tests take care not to re-initialize them if 'test-defs.sh'
+# is re-sourced, as we want that file to remain really idempotent.
 if test -z "$am_original_AUTOMAKE"; then
   am_original_AUTOMAKE=${AM_TESTSUITE_AUTOMAKE-${AUTOMAKE-"automake-$APIVERSION"}}
 fi
@@ -172,9 +118,9 @@ if test -z "$am_original_ACLOCAL"; then
   am_original_ACLOCAL=${AM_TESTSUITE_ACLOCAL-${ACLOCAL-"aclocal-$APIVERSION"}}
 fi
 
-# Use -Werror because this also turns some Perl warnings into error.
-# Tests for which this is inappropriate should use -Wno-error.
-# Tests who want complete control over aclocal command-line options
+# Use -Werror by default.  Tests for which this is inappropriate should
+# use -Wno-error.
+# Tests which want complete control over aclocal command-line options
 # should use $am_original_ACLOCAL instead.
 ACLOCAL="$am_original_ACLOCAL -Werror"
 
@@ -195,7 +141,11 @@ FGREP=${AM_TESTSUITE_FGREP-'@FGREP@'}
 
 # Compilers and their flags.  These can point to non-GNU compilers (and
 # on non-Linux and non-BSD systems, they probably will).
-CC=${AM_TESTSUITE_CC-${CC-'@CC@'}}
+if test $AM_TESTSUITE_SIMULATING_NO_CC_C_O = no; then
+  CC=${AM_TESTSUITE_CC-${CC-'@CC@'}}
+else
+  CC=$am_testaux_builddir/cc-no-c-o
+fi
 CXX=${AM_TESTSUITE_CXX-${CXX-'@CXX@'}}
 F77=${AM_TESTSUITE_F77-${F77-'@F77@'}}
 FC=${AM_TESTSUITE_FC-${FC-'@FC@'}}
@@ -206,6 +156,11 @@ FFLAGS=${AM_TESTSUITE_FFLAGS-${FFLAGS-'@FFLAGS@'}}
 CPPFLAGS=${AM_TESTSUITE_CPPFLAGS-${CPPFLAGS-'@CPPFLAGS@'}}
 
 # GNU compilers and their flags.
+if test $AM_TESTSUITE_SIMULATING_NO_CC_C_O = no; then
+  GNU_CC=${AM_TESTSUITE_GNU_CC-${GNU_CC-'@GNU_CC@'}}
+else
+  GNU_CC=$am_testaux_builddir/cc-no-c-o
+fi
 GNU_CC=${AM_TESTSUITE_GNU_CC-${GNU_CC-'@GNU_CC@'}}
 GNU_CXX=${AM_TESTSUITE_GNU_CXX-${GNU_CXX-'@GNU_CXX@'}}
 GNU_F77=${AM_TESTSUITE_GNU_F77-${GNU_F77-'@GNU_F77@'}}
@@ -225,7 +180,9 @@ TEX=${AM_TESTSUITE_TEX-'@TEX@'}
 # The amount we should wait after modifying files depends on the platform.
 # For instance, Windows '95, '98 and ME have 2-second granularity
 # and can be up to 3 seconds in the future w.r.t. the system clock.
-sleep='sleep @MODIFICATION_DELAY@'
+# The creative quoting is to avoid spuriously triggering a failure in
+# the maintainer checks,
+sleep='sleep ''@MODIFICATION_DELAY@'
 
 # An old timestamp that can be given to a file, in "touch -t" format.
 # The time stamp should be portable to all file systems of interest.
@@ -241,7 +198,4 @@ case $PATH in
   *) PATH=$am_bindir$PATH_SEPARATOR$PATH;;
 esac
 
-# Make our helper script accessible by default.
-PATH=$am_testauxdir$PATH_SEPARATOR$PATH
-
 export PATH
old mode 100755 (executable)
new mode 100644 (file)
similarity index 61%
rename from t/backsl.sh
rename to t/ax/test-init.sh
index 48d70c7..bf9017f
@@ -1,5 +1,6 @@
-#! /bin/sh
-# Copyright (C) 1996-2012 Free Software Foundation, Inc.
+# -*- shell-script -*-
+#
+# Copyright (C) 1996-2017 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 "\" problems.  Bug report from Joerg-Martin Schwarz.
-
-. ./defs || Exit 1
-
-cat >> configure.ac << 'END'
-AC_PROG_CC
-END
+set -e
 
-cat > Makefile.am << 'END'
-bin_PROGRAMS = \
-   frob
-END
+# The variable '$required' should no longer be modified after this
+# file gets sources.
+required=${required-}; readonly required
 
-$ACLOCAL
-$AUTOMAKE
+# Source the actual code for test initialization and setup.
+. test-lib.sh
+. am-test-lib.sh
 
-grep '^_SOURCE' Makefile.in && Exit 1
-Exit 0
+# Run that setup, and return control to the test script sourcing us.
+am_test_setup
diff --git a/t/ax/test-lib.sh b/t/ax/test-lib.sh
new file mode 100644 (file)
index 0000000..2ed15dc
--- /dev/null
@@ -0,0 +1,317 @@
+# -*- shell-script -*-
+#
+# Copyright (C) 1996-2017 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/>.
+
+########################################################
+###  IMPORTANT NOTE: keep this file 'set -e' clean.  ###
+########################################################
+
+# Do not source several times.
+test ${test_lib_sourced-no} = yes && return 0
+test_lib_sourced=yes
+
+# CDPATH is evil if used in non-interactive scripts (and even more
+# evil if exported in the environment).
+CDPATH=; unset CDPATH
+
+# Be more Bourne compatible.
+# (Snippet inspired to configure's initialization in Autoconf 2.64)
+DUALCASE=1; export DUALCASE # for MKS sh
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
+  emulate sh
+  NULLCMD=:
+  setopt NO_GLOB_SUBST
+  # If Zsh is not started directly in POSIX-compatibility mode, it has some
+  # incompatibilities in the handling of $0 that conflict with our usage;
+  # i.e., $0 inside a file sourced with the '.' builtin is temporarily set
+  # to the name of the sourced file.  Work around that.
+  # Note that a bug in some versions of Zsh prevents us from resetting $0
+  # in a sourced script, so the use of $argv0.  For more info see:
+  #   <http://www.zsh.org/mla/workers/2009/msg01140.html>
+  # The apparently useless 'eval' here is needed by at least dash 0.5.2,
+  # to prevent it from bailing out with an error like:
+  #   "Syntax error: Bad substitution".
+  eval 'argv0=${functrace[-1]%:*}' && test -f "$argv0" || {
+    echo "Cannot determine the path of running test script." >&2
+    echo "Your Zsh (version $ZSH_VERSION) is probably too old." >&2
+    exit 99
+  }
+else
+  argv0=$0
+  # Ignore command substitution failure, for it might cause problems
+  # with "set -e" on some shells.
+  am_shell_opts=$(set -o) || :
+  case $am_shell_opts in *posix*) set -o posix;; esac
+  unset am_shell_opts
+fi
+
+# A single whitespace character.
+sp=' '
+# A tabulation character.
+tab='  '
+# A newline character.
+nl='
+'
+
+# As autoconf-generated configure scripts do, ensure that IFS
+# is defined initially, so that saving and restoring $IFS works.
+IFS=$sp$tab$nl
+
+# The name of the current test (without the '.sh' or '.tap' suffix).
+me=${argv0##*/} # Strip all directory components.
+case $me in     # Strip test suffix.
+   *.tap) me=${me%.tap};;
+    *.sh) me=${me%.sh} ;;
+ esac
+
+# Source extra package-specific configuration.
+. test-defs.sh
+# And fail hard if something went wrong.
+test $? -eq 0 || exit 99
+
+# We use a trap below for cleanup.  This requires us to go through
+# hoops to get the right exit status transported through the signal.
+# Turn off errexit here so that we don't trip the bug with OSF1/Tru64
+# sh inside this function (FIXME: is this still relevant now that we
+# require a POSIX shell?).
+_am_exit ()
+{
+  set +e
+  # See comments in the exit trap for the reason we do this.
+  test 77 = $1 && am__test_skipped=yes
+  # Extra escaping to ensure we do not call our 'exit' alias.
+  (\exit $1); \exit $1
+}
+# Avoid interferences from the environment
+am__test_skipped=no
+# This alias must actually be placed before any use if 'exit' -- even
+# just inside a function definition.  Weird, but real.
+alias exit=_am_exit
+
+# In some shells (e.g., Solaris 10 /bin/ksh, or NetBSD 5.1 /bin/sh),
+# "unset VAR" returns a non-zero exit status in case the VAR variable
+# is already unset.  This doesn't interact well with our usage of
+# "set -e" in the testsuite.  This function and the alias below help
+# to work around the issue.  But be sure to use them only if actually
+# needed.  The repeated unset in the check below cater to the very
+# unlikely case where the '_am_v' variable is set in the environment.
+if unset _am_v && unset _am_v; then
+  : Nothing needs to be done.
+else
+  _am_unset ()
+  {
+    for _am_v
+    do
+      # Extra escaping (here and below) to ensure we do not call our
+      # 'unset' alias.
+      eval ${_am_v}=dummy && \unset ${_am_v} || return 1
+    done
+    \unset _am_v
+  }
+  alias unset=_am_unset
+fi
+
+## ------------------------------------ ##
+##  General testsuite shell functions.  ##
+## ------------------------------------ ##
+
+# Print warnings (e.g., about skipped and failed tests) to this file
+# number.  Override by putting, say:
+#   AM_TESTS_ENVIRONMENT = stderr_fileno_=9; export stderr_fileno_;
+#   AM_TESTS_FD_REDIRECT = 9>&2
+# in your Makefile.am.
+# This is useful when using automake's parallel tests mode, to print the
+# reason for skip/failure to console, rather than to the *.log files.
+: ${stderr_fileno_=2}
+
+# Helper functions used by "plain" tests of the Automake testsuite
+# (i.e., tests that don't use any test protocol).
+# TAP tests will override these functions with their TAP-enhanced
+# equivalents later  (see sourcing of 'tap-functions.sh' below).
+# These are copied from Gnulib's 'tests/init.sh'.
+warn_ () { echo "$@" 1>&$stderr_fileno_; }
+fail_ () { warn_ "$me: failed test: $@"; exit 1; }
+skip_ () { warn_ "$me: skipped test: $@"; exit 77; }
+fatal_ () { warn_ "$me: hard error: $@"; exit 99; }
+framework_failure_ () { warn_ "$me: set-up failure: $@"; exit 99; }
+# For compatibility with TAP functions.
+skip_all_ () { skip_ "$@"; }
+
+if test $am_test_protocol = tap; then
+  . tap-functions.sh
+fi
+
+## ---------------------------- ##
+##  Auxiliary shell functions.  ##
+## ---------------------------- ##
+
+# Tell whether we should keep the test directories around, even in
+# case of success.  By default, we don't.
+am_keeping_testdirs ()
+{
+  case $keep_testdirs in
+     ""|n|no|NO) return 1;;
+              *) return 0;;
+  esac
+}
+
+# seq_ - print a sequence of numbers
+# ----------------------------------
+# This function simulates GNU seq(1) portably.  Valid usages:
+#  - seq LAST
+#  - seq FIRST LAST
+#  - seq FIRST INCREMENT LAST
+seq_ ()
+{
+  case $# in
+    0) fatal_ "seq_: missing argument";;
+    1) seq_first=1  seq_incr=1  seq_last=$1;;
+    2) seq_first=$1 seq_incr=1  seq_last=$2;;
+    3) seq_first=$1 seq_incr=$2 seq_last=$3;;
+    *) fatal_ "seq_: too many arguments";;
+  esac
+  i=$seq_first
+  while test $i -le $seq_last; do
+    echo $i
+    i=$(($i + $seq_incr))
+  done
+}
+
+# rm_rf_ [FILES OR DIRECTORIES ...]
+# ---------------------------------
+# Recursively remove the given files or directory, also handling the case
+# of non-writable subdirectories.
+rm_rf_ ()
+{
+  test $# -gt 0 || return 0
+  $PERL "$am_testaux_srcdir"/deltree.pl "$@"
+}
+
+commented_sed_unindent_prog='
+  /^$/b                    # Nothing to do for empty lines.
+  x                        # Get x<indent> into pattern space.
+  /^$/{                    # No prior x<indent>, go prepare it.
+    g                      # Copy this 1st non-blank line into pattern space.
+    s/^\(['"$tab"' ]*\).*/x\1/   # Prepare x<indent> in pattern space.
+  }                        # Now: x<indent> in pattern and <line> in hold.
+  G                        # Build x<indent>\n<line> in pattern space, and
+  h                        # duplicate it into hold space.
+  s/\n.*$//                # Restore x<indent> in pattern space, and
+  x                        # exchange with the above duplicate in hold space.
+  s/^x\(.*\)\n\1//         # Remove leading <indent> from <line>.
+  s/^x.*\n//               # Restore <line> when there is no leading <indent>.
+'
+
+# unindent [input files...]
+# -------------------------
+# Remove the "proper" amount of leading whitespace from the given files,
+# and output the result on stdout.  That amount is determined by looking
+# at the leading whitespace of the first non-blank line in the input
+# files.  If no input file is specified, standard input is implied.
+unindent ()
+{
+  if test x"$sed_unindent_prog" = x; then
+    sed_unindent_prog=$(printf '%s\n' "$commented_sed_unindent_prog" \
+                          | sed -e "s/  *# .*//")
+  fi
+  sed "$sed_unindent_prog" ${1+"$@"}
+}
+sed_unindent_prog="" # Avoid interferences from the environment.
+
+## ---------------------------------------------------------------- ##
+##  Create and set up of the temporary directory used by the test.  ##
+##  Set up of the exit trap for cleanup of said directory.          ##
+## ---------------------------------------------------------------- ##
+
+# Set up the exit trap.
+am_exit_trap ()
+{
+  exit_status=$1
+  set +e
+  cd "$am_top_builddir"
+  if test $am_test_protocol = tap; then
+    if test "$planned_" = later && test $exit_status -eq 0; then
+      plan_ "now"
+    fi
+    test $exit_status -eq 0 && test $tap_pass_count_ -eq $tap_count_ \
+      || keep_testdirs=yes
+  else
+    # This is to ensure that a test script does give a SKIP outcome just
+    # because a command in it happens to exit with status 77.  This
+    # behaviour, while from time to time useful to developers, is not
+    # meant to be enabled by default, as it could cause spurious failures
+    # in the wild.  Thus it will be enabled only when the variable
+    # 'am_explicit_skips' is set to a "true" value.
+    case $am_explicit_skips in
+      [yY]|[yY]es|1)
+        if test $exit_status -eq 77 && test $am__test_skipped != yes; then
+          echo "$me: implicit skip turned into failure"
+          exit_status=78
+        fi;;
+    esac
+    test $exit_status -eq 0 || keep_testdirs=yes
+  fi
+  am_keeping_testdirs || rm_rf_ $am_test_subdir
+  set +x
+  # Spurious escaping to ensure we do not call our "exit" alias.
+  \exit $exit_status
+}
+
+am_set_exit_traps ()
+{
+  trap 'am_exit_trap $?' 0
+  trap "fatal_ 'caught signal SIGHUP'" 1
+  trap "fatal_ 'caught signal SIGINT'" 2
+  trap "fatal_ 'caught signal SIGTERM'" 15
+  # Various shells seems to just ignore SIGQUIT under some circumstances,
+  # even if the signal is not blocked; however, if the signal is trapped,
+  # the trap gets correctly executed.  So we also trap SIGQUIT.
+  # Here is a list of some shells that have been verified to exhibit the
+  # problematic behavior with SIGQUIT:
+  #  - zsh 4.3.12 on Debian GNU/Linux
+  #  - /bin/ksh and /usr/xpg4/bin/sh on Solaris 10
+  #  - Bash 3.2.51 on Solaris 10 and bash 4.1.5 on Debian GNU/Linux
+  #  - AT&T ksh on Debian Gnu/Linux (deb package ksh, version 93u-1)
+  # OTOH, at least these shells that do *not* exhibit that behaviour:
+  #  - modern version of the Almquist Shell (at least 0.5.5.1), on
+  #    both Solaris and GNU/Linux
+  #  - public domain Korn Shell, version 5.2.14, on Debian GNU/Linux
+  trap "fatal_ 'caught signal SIGQUIT'" 3
+  # Ignore further SIGPIPE in the trap code.  This is required to avoid
+  # a very weird issue with some shells, at least when the execution of
+  # the automake testsuite is driven by the 'prove' utility: if prove
+  # (or the make process that has spawned it) gets interrupted with
+  # Ctrl-C, the shell might go in a loop, continually getting a SIGPIPE,
+  # sometimes finally dumping core, other times hanging indefinitely.
+  # See also Test::Harness bug [rt.cpan.org #70855], archived at
+  # <https://rt.cpan.org/Ticket/Display.html?id=70855>
+  trap "trap '' 13; fatal_ 'caught signal SIGPIPE'" 13
+}
+
+am_test_setup ()
+{
+  process_requirements $required
+  am_set_exit_traps
+  # Create and populate the temporary directory, if required.
+  if test x"$am_create_testdir" = x"no"; then
+    am_test_subdir=
+  else
+    am_setup_testdir
+  fi
+  am_extra_info
+  set -x
+  pwd
+}
index 0c8e98c..1d4b9f5 100644 (file)
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2011-2012 Free Software Foundation, Inc.
+# Copyright (C) 2011-2017 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/>.
 
-# Check the testsuite summary with the parallel-tests harness.  This
+# Check the testsuite summary with the parallel test harness.  This
 # script is meant to be sourced by other test script, so that it can
 # be used to check different scenarios (colorized and non-colorized
 # testsuite output, packages with and without bug-report addresses,
 # testsuites in subdirectories, ...)
 
-. ./defs || Exit 1
+. test-init.sh
 
 case $use_colors in
   yes)
@@ -28,10 +28,8 @@ case $use_colors in
     # Forced colorization should take place also with non-ANSI
     # terminals; hence this setting.
     TERM=dumb; export TERM
-    am_opts='parallel-tests color-tests'
     ;;
   no)
-    am_opts='parallel-tests'
     ;;
   *)
     fatal_ "invalid use_colors='$use_colors'";;
@@ -39,7 +37,7 @@ esac
 
 cat > configure.ac <<END
 AC_INIT([GNU AutoFoo], [7.1], [bug-automake@gnu.org])
-AM_INIT_AUTOMAKE([$am_opts])
+AM_INIT_AUTOMAKE
 AC_CONFIG_FILES([Makefile])
 AC_OUTPUT
 END
@@ -71,21 +69,18 @@ do_check ()
   cat > summary.exp
   expect_failure=false
   xfail_tests=''
-  tests="TESTS='$*'"
+  tests="$*"
   for t in $*; do
     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=\$?"
-  cat stdout
+  run_make -O -e IGNORE check TESTS="$tests" XFAIL_TESTS="$xfail_tests"
   if $expect_failure; then
-    test $st -gt 0 || Exit 1
+    test $am_make_rc -gt 0 || exit 1
   else
-    test $st -eq 0 || Exit 1
+    test $am_make_rc -eq 0 || exit 1
   fi
-  $PERL "$am_testauxdir"/extract-testsuite-summary.pl stdout >summary.got \
+  $PERL "$am_testaux_srcdir"/extract-testsuite-summary.pl stdout >summary.got \
    || fatal_ "cannot extract testsuite summary"
   cat summary.exp
   cat summary.got
@@ -95,7 +90,7 @@ do_check ()
   else
     compare=diff
   fi
-  $compare summary.exp summary.got || Exit 1
+  $compare summary.exp summary.got || exit 1
 }
 
 br='============================================================================'
index 3968acb..8885fb3 100644 (file)
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2011-2012 Free Software Foundation, Inc.
+# Copyright (C) 2011-2017 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
old mode 100755 (executable)
new mode 100644 (file)
similarity index 95%
rename from t/backcompat4.sh
rename to t/backcompat-acout.sh
index 9088aae..bfe0a28
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2010-2012 Free Software Foundation, Inc.
+# Copyright (C) 2010-2017 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
@@ -16,7 +16,7 @@
 
 # Backward-compatibility: AC_OUTPUT with arguments.
 
-. ./defs || Exit 1
+. test-init.sh
 
 mkdir sub
 : > Makefile.am
old mode 100755 (executable)
new mode 100644 (file)
index 8a93141..a61400c
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2010-2012 Free Software Foundation, Inc.
+# Copyright (C) 2010-2017 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
@@ -17,7 +17,7 @@
 # Test usage of AM_INIT_AUTOMAKE with two or three arguments, for
 # backward-compatibility.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat > Makefile.am <<'END'
 .PHONY: test display
@@ -46,13 +46,13 @@ END
 for ac_init in 'AC_INIT' 'AC_INIT([Makefile.am])'; do
   for am_extra_args in '' ', []' ', [:]' ', [false]'; do
     rm -rf autom4te*.cache config* Makefile.in Makefile
-    unindent > configure.in <<END
+    unindent > configure.ac <<END
       $ac_init
       AM_INIT_AUTOMAKE([FooBar], [0.7.1]$am_extra_args)
       AC_CONFIG_FILES([Makefile])
       AC_OUTPUT
 END
-    cat configure.in # For debugging.
+    cat configure.ac # For debugging.
     $ACLOCAL
     $AUTOCONF
     $AUTOMAKE -Wno-obsolete
old mode 100755 (executable)
new mode 100644 (file)
index ba9ec3b..7f2e9e2
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2010-2012 Free Software Foundation, Inc.
+# Copyright (C) 2010-2017 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
 # third argument is empty or non-existent.
 
 am_create_testdir=empty
-. ./defs || Exit 1
+. test-init.sh
 
 # A trick to make the test run muuuch faster, by avoiding repeated
 # runs of aclocal (one order of magnitude improvement in speed!).
-echo 'AC_INIT(x,0) AM_INIT_AUTOMAKE' > configure.in
+echo 'AC_INIT(x,0) AM_INIT_AUTOMAKE' > configure.ac
 $ACLOCAL
-rm -rf configure.in autom4te.*
+rm -rf configure.ac autom4te.*
 
 touch install-sh missing
 
@@ -35,19 +35,19 @@ cat > config.h.in <<'END'
 END
 
 for am_arg3 in ':' 'false' '#' ' '; do
-  unindent > configure.in <<END
+  unindent > configure.ac <<END
     AC_INIT
     AC_CONFIG_HEADERS([config.h])
     AM_INIT_AUTOMAKE([pkgname], [pkgversion], [$am_arg3])
     AC_OUTPUT
 END
-  cat configure.in # For debugging.
+  cat configure.ac # For debugging.
   $AUTOCONF
   ./configure
   cat config.h # For debugging.
   # The non-empty third argument should prevent PACKAGE and VERSION
   # from being AC_DEFINE'd.
-  $EGREP 'pkg(name|version)' config.h && Exit 1
+  $EGREP 'pkg(name|version)' config.h && exit 1
   # This is required because even relatively-recent versions of the
   # BSD shell wrongly exit when the 'errexit' shell flag is active if
   # the last command of a compound statement fails, even if it should
@@ -56,13 +56,13 @@ END
 done
 
 for am_extra_args in '' ',' ', []'; do
-  unindent > configure.in <<END
+  unindent > configure.ac <<END
     AC_INIT
     AC_CONFIG_HEADERS([config.h])
     AM_INIT_AUTOMAKE([pkgname], [pkgversion]$am_extra_args)
     AC_OUTPUT
 END
-  cat configure.in # For debugging.
+  cat configure.ac # For debugging.
   $AUTOCONF
   ./configure
   cat config.h # For debugging.
old mode 100755 (executable)
new mode 100644 (file)
index 5dc78f6..718d0ad
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2010-2012 Free Software Foundation, Inc.
+# Copyright (C) 2010-2017 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
@@ -18,7 +18,7 @@
 # AM_INIT_AUTOMAKE are both given two or more arguments.
 
 am_create_testdir=empty
-. ./defs || Exit 1
+. test-init.sh
 
 empty=''
 
@@ -42,14 +42,14 @@ END
 
 ### Run 1 ###
 
-cat > configure.in <<END
+cat > configure.ac <<END
 AC_INIT([ac_name], [ac_version])
 AM_INIT_AUTOMAKE([am_name], [am_version])
 AC_CONFIG_FILES([Makefile])
 AC_OUTPUT
 END
 
-cat configure.in
+cat configure.ac
 
 $ACLOCAL
 $AUTOCONF
@@ -75,22 +75,15 @@ diff exp got
 
 ### Run 2 ###
 
-cat > configure.in <<'END'
-dnl: 'AC_INIT' in Autoconf <= 2.63 doesn't have an URL argument.
-dnl: Luckily, 'AC_AUTOCONF_VERSION' and 'm4_version_prereq' are
-dnl: both present in autoconf 2.62, which we require; so that we
-dnl: can at least use the following workaround.
-m4_version_prereq([2.64],
-    [AC_INIT([ac_name], [ac_version], [ac_bugreport], [ac_tarname],
-             [ac_url])],
-    [AC_INIT([ac_name], [ac_version], [ac_bugreport], [ac_tarname])
-     AC_SUBST([PACKAGE_URL], [ac_url])])
+cat > configure.ac <<'END'
+AC_INIT([ac_name], [ac_version], [ac_bugreport], [ac_tarname],
+        [ac_url])],
 AM_INIT_AUTOMAKE([am_name], [am_version])
 AC_CONFIG_FILES([Makefile])
 AC_OUTPUT
 END
 
-cat configure.in
+cat configure.ac
 
 $ACLOCAL
 $AUTOCONF
@@ -116,14 +109,14 @@ diff exp got
 
 ### Run 3 ###
 
-cat > configure.in <<END
+cat > configure.ac <<END
 AC_INIT([ac_name], [ac_version])
 AM_INIT_AUTOMAKE([am_name], [am_version], [am_foo_quux])
 AC_CONFIG_FILES([Makefile])
 AC_OUTPUT
 END
 
-cat configure.in
+cat configure.ac
 
 $ACLOCAL
 $AUTOCONF
@@ -146,7 +139,7 @@ $MAKE got
 
 diff exp got
 
-$FGREP am_foo_quux Makefile.in Makefile configure config.status && Exit 1
+$FGREP am_foo_quux Makefile.in Makefile configure config.status && exit 1
 
 
 ### Done ###
diff --git a/t/backcompat5.sh b/t/backcompat5.sh
deleted file mode 100755 (executable)
index fda98f4..0000000
+++ /dev/null
@@ -1,125 +0,0 @@
-#! /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/>.
-
-# Backward-compatibility test: try to build and distribute a package
-# using obsoleted forms of AC_INIT, AM_INIT_AUTOMAKE and AC_OUTPUT.
-# This script can also serve as mild stress-testing for Automake.
-# See also the similar test 'backcompat6.test'.
-
-am_serial_tests=yes
-am_create_testdir=empty
-. ./defs || Exit 1
-
-makefiles='hacky/Makefile src/Makefile data/Makefile tests/Makefile'
-
-# Yuck!
-cat > configure.in <<END
-dnl: Everything here is *deliberately* underquoted!
-AC_INIT(src/foo.input)
-AM_INIT_AUTOMAKE(foo, 1.0)
-AC_CONFIG_FILES(Makefile:mkfile.in)
-AC_OUTPUT($makefiles)
-END
-
-distdir=foo-1.0
-
-cat > mkfile.am <<'END'
-SUBDIRS = src data tests hacky
-installcheck-local:
-       grep DataDataData $(DESTDIR)$(prefix)/data/$(PACKAGE)-$(VERSION)/bar
-END
-
-mkdir hacky src tests data
-
-echo 'This is a dummy package' > README
-
-cat > src/foo.input <<'END'
-#!sh
-echo Zardoz
-END
-
-cat > tests/a.test <<'END'
-#!/bin/sh
-"$srcdir/../src/foo" | grep Zardoz
-END
-chmod a+x tests/a.test
-
-cat > data/bar <<'END'
-line1
-line2
-line3
-END
-
-cat >hacky/Makefile.am <<'END'
-dist-hook:
-       find $(top_distdir) -print
-       chmod a+rx $(top_distdir)/tests/*.test
-END
-
-cat > src/Makefile.am <<'END'
-dist_bin_SCRIPTS = foo
-foo: foo.input
-       sed '1s,^#!.*$$,#!/bin/sh,' $(srcdir)/foo.input >$@
-       chmod a+x $@
-EXTRA_DIST = foo.input
-DISTCLEANFILES = foo
-END
-
-cat > data/Makefile.am <<'END'
-nodist_data_DATA = bar
-datadir = $(prefix)/data/$(PACKAGE)-$(VERSION)
-bar:
-       echo DataDataData >$@
-distclean-local:
-       rm -f bar
-END
-
-cat > tests/Makefile.am <<'END'
-TESTS = a.test
-EXTRA_DIST = $(TESTS)
-END
-
-$ACLOCAL
-$AUTOCONF
-$AUTOMAKE -a -Wno-obsolete
-test -f install-sh
-for f in $makefiles; do mv -f $f.in $f.sav; done
-$AUTOMAKE -Wno-obsolete
-for f in $makefiles; do diff $f.sav $f.in; done
-
-./configure
-ls -l . hacky src data tests # For debugging.
-test ! -f mkfile
-$MAKE
-$MAKE distdir
-test ! -f $distdir/Makefile.in
-test ! -f $distdir/data/bar
-test -f $distdir/src/foo
-diff README $distdir/README
-diff mkfile.in $distdir/mkfile.in
-diff tests/a.test $distdir/tests/a.test
-diff src/foo.input $distdir/src/foo.input
-
-$MAKE check
-$MAKE distcheck
-
-test -f $distdir.tar.gz
-
-chmod a-x tests/a.test
-# dist-hook should take care of making test files executables.
-$MAKE distcheck
-
-:
old mode 100755 (executable)
new mode 100644 (file)
index 4523a65..e871f5d
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2010-2012 Free Software Foundation, Inc.
+# Copyright (C) 2010-2017 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 # Backward-compatibility test: try to build and distribute a package
-# using obsoleted forms of AC_INIT, AM_INIT_AUTOMAKE and AC_OUTPUT.
+# using obsoleted forms of AC_INIT, AM_INIT_AUTOMAKE and AC_OUTPUT,
+# and 'configure.in' as autconf input file.
 # This script can also serve as mild stress-testing for Automake.
 # See also the similar test 'backcompat5.test'.
 
 required=cc
 am_create_testdir=empty
-. ./defs || Exit 1
+. test-init.sh
 
 # Anyone doing something like this in a real-life package probably
 # deserves to be killed.
-cat > configure.in <<'END'
+cat > configure.ac <<'END'
 dnl: Everything here is *deliberately* underquoted!
 AC_INIT(quux.c)
 PACKAGE=nonesuch-zardoz
@@ -37,7 +38,7 @@ AC_SUBST(two, $two)
 three=3
 AC_SUBST(three)
 AC_PROG_CC
-AC_CONFIG_HEADERS(config.h:config.hin)
+AM_CONFIG_HEADER(config.h:config.hin)
 AM_CONDITIONAL(CROSS_COMPILING, test "$cross_compiling" = yes)
 AC_OUTPUT(Makefile foo.got:foo1.in:foo2.in:foo3.in)
 END
@@ -77,7 +78,7 @@ int main (void)
 }
 END
 
-$ACLOCAL
+$ACLOCAL -Wno-obsolete
 $AUTOMAKE -Wno-obsolete --add-missing
 $AUTOCONF
 
diff --git a/t/backsl2.sh b/t/backsl2.sh
deleted file mode 100755 (executable)
index 82e2f08..0000000
+++ /dev/null
@@ -1,30 +0,0 @@
-#! /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/>.
-
-# We must skip the backslash, not complain about './\' not existing.
-# Reported by Rick Scott <rwscott@omnisig.com>
-
-. ./defs || Exit 1
-
-cat > Makefile.am << 'END'
-SUBDIRS = \
-   .
-END
-
-$ACLOCAL
-$AUTOMAKE
-
-:
old mode 100755 (executable)
new mode 100644 (file)
similarity index 94%
rename from t/backsl4.sh
rename to t/backslash-before-trailing-whitespace.sh
index c11d20d..f024404
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2003-2012 Free Software Foundation, Inc.
+# Copyright (C) 2003-2017 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
@@ -17,7 +17,7 @@
 # Make sure we diagnose and fix white spaces following backslash.
 # Report from Peter Muir.
 
-. ./defs || Exit 1
+. test-init.sh
 
 echo AC_OUTPUT >>configure.ac
 
old mode 100755 (executable)
new mode 100644 (file)
similarity index 62%
rename from t/backsl3.sh
rename to t/backslash-issues.sh
index 36fab7f..c0c3262
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2003-2012 Free Software Foundation, Inc.
+# Copyright (C) 1996-2017 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 we diagnose trailing backslash at the end of a file.
-# Report from Akim Demaile <akim@epita.fr>.
+# Test for "\" problems.
+# TODO: might be nice to convert this to TAP...
+
+. test-init.sh
 
-. ./defs || Exit 1
+echo AC_PROG_CC >> configure.ac
+$ACLOCAL
 
+# Bug report from Joerg-Martin Schwarz.
 cat > Makefile.am << 'END'
-foo = \
+bin_PROGRAMS = \
+   frob
 END
+$AUTOMAKE
+grep '^_SOURCE' Makefile.in && exit 1
 
-$ACLOCAL
+# We must skip the backslash, not complain about './\' not existing.
+# Reported by Rick Scott <rwscott@omnisig.com>
+cat > Makefile.am << 'END'
+SUBDIRS = \
+   .
+END
+$AUTOMAKE
+
+# Make sure we diagnose trailing backslash at the end of a file.
+# Report from Akim Demaile <akim@epita.fr>.
+echo 'foo = \' > Makefile.am
 AUTOMAKE_fails
-cat stderr
 grep 'trailing backslash' stderr
+
+:
old mode 100755 (executable)
new mode 100644 (file)
index 3f548f7..5dd23ec
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 1998-2012 Free Software Foundation, Inc.
+# Copyright (C) 1998-2017 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
@@ -17,7 +17,7 @@
 # Test to make sure that line number and file name in error message
 # referring to variable is always correct.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat > configure.ac << END
 AC_INIT([$me], [1.0])
@@ -28,6 +28,6 @@ END
 
 : > Makefile.am
 
-$ACLOCAL || Exit 1
+$ACLOCAL || exit 1
 AUTOMAKE_fails
 grep 'configure.ac:3:.*info_TEXINFOS' stderr
old mode 100755 (executable)
new mode 100644 (file)
index b06657f..1b2d099
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 1998-2012 Free Software Foundation, Inc.
+# Copyright (C) 1998-2017 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
@@ -16,7 +16,7 @@
 
 # Test to make sure bad options cause error.
 
-. ./defs || Exit 1
+. test-init.sh
 
 echo 'AUTOMAKE_OPTIONS = zardoz' > Makefile.am
 
old mode 100755 (executable)
new mode 100644 (file)
index 81ff5b7..8b2dbbd
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 1996-2012 Free Software Foundation, Inc.
+# Copyright (C) 1996-2017 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
@@ -17,7 +17,7 @@
 # Test to make sure that programs with bad names are properly
 # transformed.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_CC
diff --git a/t/built-sources-check-w.sh b/t/built-sources-check-w.sh
new file mode 100644 (file)
index 0000000..1fad163
--- /dev/null
@@ -0,0 +1,15 @@
+#! /bin/sh
+# This file has been automatically generated.  DO NOT EDIT BY HAND!
+. test-lib.sh
+
+am_serial_tests=yes
+# 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/t/built-sources-check.sh"; then
+    echo "$0: will source $dir/t/built-sources-check.sh"
+    . "$dir/t/built-sources-check.sh"; exit $?
+  fi
+done
+echo "$0: cannot find wrapped test 't/built-sources-check.sh'" >&2
+exit 99
old mode 100755 (executable)
new mode 100644 (file)
similarity index 67%
rename from t/check3.sh
rename to t/built-sources-check.sh
index 69b6a67..170dafb
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2002-2012 Free Software Foundation, Inc.
+# Copyright (C) 2002-2017 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 'check:' and 'install:' honor $(BUILT_SOURCES).
+# Make sure 'check:' honors $(BUILT_SOURCES).
 # PR/359.
 
 # For gen-testsuite-part: ==> try-with-serial-tests <==
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_CONFIG_FILES([dir/Makefile])
@@ -56,25 +56,12 @@ END
 $ACLOCAL
 $AUTOCONF
 $AUTOMAKE -a
-./configure --prefix "`pwd`/inst"
+./configure --prefix "$(pwd)/inst"
 
-$MAKE check >stdout || { cat stdout; Exit 1; }
-cat stdout
+run_make -O check
 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
 
 :
diff --git a/t/built-sources-cond.sh b/t/built-sources-cond.sh
new file mode 100644 (file)
index 0000000..5ec58fd
--- /dev/null
@@ -0,0 +1,91 @@
+#! /bin/sh
+# Copyright (C) 2003-2017 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.
+
+. test-init.sh
+
+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
+
+:
diff --git a/t/built-sources-fork-bomb.sh b/t/built-sources-fork-bomb.sh
new file mode 100644 (file)
index 0000000..4c58fcf
--- /dev/null
@@ -0,0 +1,67 @@
+#! /bin/sh
+# Copyright (C) 2012-2017 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/>.
+
+# Due to how the handling of $(BUILT_SOURCES) is implemented in Automake-NG,
+# a recursive make call in the recipe of any $(BUILT_SOURCES) (or of any of
+# its prerequisites) might cause an infinite recursion (complete with fork
+# bomb, yuck) if not handled correctly.  Verify that this doesn't happen.
+# For more background, see:
+# <http://lists.gnu.org/archive/html/help-smalltalk/2012-08/msg00027.html>
+# <http://lists.gnu.org/archive/html/automake-patches/2012-08/msg00052.html>
+# Backported to improve coverage of mainline Automake.
+
+required=GNUmake
+. test-init.sh
+
+echo AC_OUTPUT >> configure.ac
+
+cat > Makefile.am << 'END'
+BUILT_SOURCES = foo
+.PHONY: build-foo
+build-foo:
+       echo OK > foo
+foo:
+       $(MAKE) build-foo
+
+# If the bug is still present, we want this test to fail, not to actually
+# go fork bomb and potentially crash the user machine.  Take care of that.
+
+is_too_deep := $(shell test $(MAKELEVEL) -lt 10 && echo no)
+
+## Extra indentation here required to avoid confusing Automake.
+ ifeq ($(is_too_deep),no)
+   # All is ok.
+ else
+   $(error ::OOPS:: Recursion too deep, $(MAKELEVEL) levels)
+ endif
+END
+
+$ACLOCAL
+$AUTOMAKE -Wno-portability
+$AUTOCONF
+
+./configure
+
+run_make -M -- -n foo
+test ! -f foo
+# Guard against possible infinite recursion.
+$FGREP '::OOPS::' output && exit 1
+
+run_make -M -- foo
+# Guard against possible infinite recursion.
+$FGREP '::OOPS::' output && exit 1
+
+:
diff --git a/t/built-sources-install.sh b/t/built-sources-install.sh
new file mode 100644 (file)
index 0000000..6a59aa2
--- /dev/null
@@ -0,0 +1,69 @@
+#! /bin/sh
+# Copyright (C) 2002-2017 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.
+
+. test-init.sh
+
+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
+
+:
old mode 100755 (executable)
new mode 100644 (file)
similarity index 72%
rename from t/subdirbuiltsources.sh
rename to t/built-sources-subdir.sh
index 2f50708..04b5298
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2001-2012 Free Software Foundation, Inc.
+# Copyright (C) 2001-2017 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 when using SUBDIR that all BUILT_SOURCES are built.
+# Make sure when using SUBDIRS that all BUILT_SOURCES are built.
 # A bug occurred where subdirs do not have all-recursive or
 # all-recursive-am which depended on BUILT_SOURCES.
 
 required=cc
-. ./defs || Exit 1
+. test-init.sh
 
 mkdir lib
 
@@ -31,14 +31,6 @@ AM_PROG_AR
 AC_OUTPUT
 END
 
-# Files required because we are using '--gnu'.
-: > INSTALL
-: > NEWS
-: > README
-: > COPYING
-: > AUTHORS
-: > ChangeLog
-
 cat > Makefile.am << 'END'
 SUBDIRS = lib
 END
@@ -47,25 +39,24 @@ cat > lib/Makefile.am << 'END'
 pkgdata_DATA =
 noinst_LIBRARIES = libfoo.a
 libfoo_a_SOURCES = foo.c
-BUILT_SOURCES=foo.h
+BUILT_SOURCES = foo.h
 foo.h:
        echo \#define FOO_DEFINE 1 >$@
+CLEANFILES = $(BUILT_SOURCES)
 END
 
 cat > lib/foo.c << 'END'
 #include <foo.h>
-int foo () { return !FOO_DEFINE;}
+int foo (void) { return !FOO_DEFINE; }
 END
 
 
 $ACLOCAL
 $AUTOCONF
-$AUTOMAKE --include-deps --copy --force-missing --add-missing --gnu
+$AUTOMAKE --copy --add-missing
 
 ./configure
-
-# Remove the comment to get a successful test.
-# $MAKE -C lib foo.h
 $MAKE
+$MAKE distcheck
 
 :
diff --git a/t/built-sources.sh b/t/built-sources.sh
new file mode 100644 (file)
index 0000000..139cf4e
--- /dev/null
@@ -0,0 +1,68 @@
+#! /bin/sh
+# Copyright (C) 2003-2017 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/>.
+
+# Basic test on BUILT_SOURCES.
+
+required=cc
+. test-init.sh
+
+cat >> configure.ac <<'END'
+AC_PROG_CC
+AC_OUTPUT
+END
+
+cat > Makefile.am << 'END'
+BUILT_SOURCES = foo.c
+noinst_PROGRAMS = bar baz
+foo.c:
+       rm -f $@ $@-t
+## Use printf, not echo, to avoid spurious interpretation of
+## the "\n" as a newline (seen on NetBSD 5.1).
+       printf '%s\n' '#include <stdio.h>'               >  $@-t
+       printf '%s\n' 'int main (void)'                  >> $@-t
+       printf '%s\n' '{               '                 >> $@-t
+       printf '%s\n' '  printf ("%s\n", FOOMSG);'       >> $@-t
+       printf '%s\n' '  return 0;'                      >> $@-t
+       printf '%s\n' '}'                                >> $@-t
+       mv -f $@-t $@
+CLEANFILES = foo.c
+END
+
+cat > bar.c <<'END'
+#define FOOMSG "Howdy, World"
+#include "foo.c"
+END
+
+cat > baz.c <<'END'
+#define FOOMSG "Hello, Earth"
+#include "foo.c"
+END
+
+$ACLOCAL
+$AUTOMAKE
+$AUTOCONF
+
+./configure
+$MAKE
+if cross_compiling; then :; else
+  ./bar
+  ./bar | grep 'Howdy, World'
+  ./baz
+  ./baz | grep 'Hello, Earth'
+fi
+$MAKE distcheck
+
+:
diff --git a/t/c-demo.sh b/t/c-demo.sh
new file mode 100644 (file)
index 0000000..4a2c8d1
--- /dev/null
@@ -0,0 +1,178 @@
+#! /bin/sh
+# Copyright (C) 2012-2017 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/>.
+
+# Demo on C support, also testing automatic dependency tracking,
+# conditional SUBDIRS and convenience libraries.
+
+required=cc
+am_create_testdir=empty
+. test-init.sh
+
+cat > configure.ac << 'END'
+AC_INIT([GNU C Demo], [22.3.2], [bug-automake@gnu.org])
+AC_CONFIG_SRCDIR([tests/test.test])
+AC_CONFIG_AUX_DIR([build-aux])
+AM_INIT_AUTOMAKE
+AC_PROG_CC
+AM_PROG_AR
+AC_PROG_RANLIB
+AM_CONDITIONAL([RUN_TESTS], [test x"$run_tests" != x"no"])
+AC_CONFIG_FILES([Makefile src/Makefile lib/Makefile tests/Makefile])
+AC_OUTPUT
+END
+
+if cross_compiling; then
+  run_tests=no
+else
+  run_tests=yes
+fi
+export run_tests
+
+mkdir build-aux lib src tests
+
+cat > Makefile.am <<'END'
+SUBDIRS = lib src
+
+if RUN_TESTS
+SUBDIRS += tests
+endif
+
+.PHONY: test-objs
+check-local: test-objs
+test-objs:
+       test -f src/zardoz-main.$(OBJEXT)
+       test -f lib/foo.$(OBJEXT)
+       test -f lib/bar.$(OBJEXT)
+END
+
+cat > src/Makefile.am << 'END'
+bin_PROGRAMS = zardoz
+zardoz_SOURCES = main.c
+zardoz_LDADD = $(top_builddir)/lib/lib-convenience.a
+zardoz_CPPFLAGS = -I$(top_builddir)/lib -I$(top_srcdir)/lib
+END
+
+cat > lib/Makefile.am << 'END'
+noinst_LIBRARIES = lib-convenience.a
+lib_convenience_a_SOURCES = foo.c
+lib_convenience_a_SOURCES += bar.c
+dist_lib_convenience_a_SOURCES = bar.h
+nodist_lib_convenience_a_SOURCES = foo.h
+
+# We want this to be auto-generated an removed by "make clean", to
+# ensure that cleaning rules work correctly; an older implementation
+# of automatic dependency tracking support suffered of weaknesses in
+# this situation, see the "historical comments" reported in:
+# http://lists.gnu.org/archive/html/automake-patches/2012-06/msg00033.html
+foo.h: $(srcdir)/foo.c
+       sed -n 's/.*foo *(.*/&;/p' "$(srcdir)/foo.c" >$@-t
+       test 1 -eq `wc -l <$@-t`
+       chmod a-w $@-t && mv -f $@-t $@
+BUILT_SOURCES = foo.h
+CLEANFILES = $(BUILT_SOURCES)
+
+check-local:
+       test -f ${top_srcdir}/tests/test.test
+END
+
+cat > tests/Makefile.am << 'END'
+AUTOMAKE_OPTIONS = parallel-tests
+TEST_LOG_COMPILER = $(SHELL)
+TESTS = test.test
+EXTRA_DIST = $(TESTS)
+END
+
+cat > tests/test.test << 'END'
+#!/bin/sh
+set -x; set -e;
+../src/zardoz
+test "`../src/zardoz`" = 'Foo, Bar!'
+END
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE --add-missing
+
+test -f build-aux/depcomp
+test -f build-aux/compile # We have per-target flags on C sources.
+
+# Don't reject slow dependency extractors.
+./configure --enable-dependency-tracking
+
+cat > src/main.c << 'END'
+#include "foo.h"
+#include "bar.h"
+int main (void)
+{
+  printf ("%s, %s!\n", foo (), bar ());
+  return 0;
+}
+END
+
+cat > lib/foo.c << 'END'
+#include "foo.h"
+static char s[4];
+volatile char *foo (void)
+{
+  s[0] = 'F';
+  s[1] = s[2] = 'o';
+  s[3] = '\0';
+  return s;
+}
+END
+
+cat > lib/bar.c << 'END'
+#include "bar.h"
+const char *bar (void)
+{
+  return BARBAR;
+}
+END
+
+cat > lib/bar.h << 'END'
+#define BARBAR "Bar"
+const char *bar (void);
+END
+
+$MAKE
+ls -l . src lib # For debugging.
+$MAKE test-objs
+
+VERBOSE=x $MAKE check
+if cross_compiling; then
+  test ! -e tests/test-suite.log
+  test ! -e tests/test.log
+else
+  test -f tests/test-suite.log
+  grep 'Foo, Bar!' tests/test.log
+fi
+
+$MAKE distcheck
+
+if ! cross_compiling && ! grep "[ $tab]depmode=none" Makefile; then
+  # Let's check automatic dependency tracking.
+  sed 's/^\(#define BARBAR \).*/\1 "Zap"/'  lib/bar.h > t
+  mv -f t lib/bar.h
+  $MAKE
+  ./src/zardoz
+  test "$(./src/zardoz)" = 'Foo, Zap!'
+fi
+
+$MAKE clean
+test ! -e lib/foo.h
+test -f lib/bar.h
+
+:
old mode 100755 (executable)
new mode 100644 (file)
index 88d8854..d723b26
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2009-2012 Free Software Foundation, Inc.
+# Copyright (C) 2009-2017 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
@@ -16,7 +16,7 @@
 
 # Test to make sure things that cannot be dist_'ed are diagnosed.
 
-. ./defs || Exit 1
+. test-init.sh
 
 echo AC_OUTPUT >>configure.ac
 
@@ -27,6 +27,6 @@ END
 
 $ACLOCAL
 AUTOMAKE_fails
-test 2 -eq `grep -c 'dist.*forbidden' stderr`
+test 2 -eq $(grep -c 'dist.*forbidden' stderr)
 
-Exit 0
+exit 0
old mode 100755 (executable)
new mode 100644 (file)
index 3e8de08..520d5f0
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2007-2012 Free Software Foundation, Inc.
+# Copyright (C) 2007-2017 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
@@ -17,7 +17,7 @@
 # PR 511: Make sure we warn about e.g. AC_CONFIG_FILES([./gmakefile]),
 # as not all make implementations treat 'file' and './file' equally.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat > configure.ac <<END
 AC_INIT([$me], [1.0])
old mode 100755 (executable)
new mode 100644 (file)
index b5038a5..ca7c92b
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 1996-2012 Free Software Foundation, Inc.
+# Copyright (C) 1996-2017 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
@@ -16,7 +16,7 @@
 
 # Test to make sure that name canonicalization error works.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_CC
old mode 100755 (executable)
new mode 100644 (file)
index 4d39a7e..b72c1b2
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 1996-2012 Free Software Foundation, Inc.
+# Copyright (C) 1996-2017 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
@@ -16,7 +16,7 @@
 
 # Test to make sure name canonicalization happens for texinfo.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat > Makefile.am << 'END'
 info_TEXINFOS = zar-doz.texi
@@ -30,6 +30,6 @@ echo '@setfilename frob' > frob.texi
 $ACLOCAL
 $AUTOMAKE
 
-grep zar-doz_TEXINFOS Makefile.in && Exit 1
+grep zar-doz_TEXINFOS Makefile.in && exit 1
 
 :
old mode 100755 (executable)
new mode 100644 (file)
index 25a8e71..853eb25
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 1996-2012 Free Software Foundation, Inc.
+# Copyright (C) 1996-2017 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
@@ -16,7 +16,7 @@
 
 # Yet another canonicalization test.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_CC
@@ -31,6 +31,6 @@ END
 $ACLOCAL
 $AUTOMAKE
 
-$FGREP 'perm_number.c' Makefile.in && Exit 1
+$FGREP 'perm_number.c' Makefile.in && exit 1
 
 :
old mode 100755 (executable)
new mode 100644 (file)
index 6cdfd41..e68419f
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 1996-2012 Free Software Foundation, Inc.
+# Copyright (C) 1996-2017 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
@@ -15,9 +15,9 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 # Test to make sure name canonicalization happens for static libraries.
-# Keep this in sync with sister test 'canon6.test'.
+# Keep this in sync with sister test 'canon6.sh'.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_CC
@@ -35,6 +35,6 @@ END
 $ACLOCAL
 $AUTOMAKE
 
-grep '^ *libx-y.*=' Makefile.in && Exit 1
+grep '^ *libx-y.*=' Makefile.in && exit 1
 
 :
old mode 100755 (executable)
new mode 100644 (file)
index 0d71d83..098effc
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 1999-2012 Free Software Foundation, Inc.
+# Copyright (C) 1999-2017 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
@@ -17,7 +17,7 @@
 # Test to make sure that we allow variable names starting in
 # non-letters.  Whatever that might mean.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_CC
old mode 100755 (executable)
new mode 100644 (file)
index 64f946c..01b3939
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 1996-2012 Free Software Foundation, Inc.
+# Copyright (C) 1996-2017 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 # Test to make sure name canonicalization happens for libtool libraries.
-# Keep this in sync with sister test 'canon4.test'.
+# Keep this in sync with sister test 'canon4.sh'.
 
 required='libtoolize'
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_CC
@@ -37,6 +37,6 @@ END
 $ACLOCAL
 $AUTOMAKE -a
 
-grep '^ *libx-y.*=' Makefile.in && Exit 1
+grep '^ *libx-y.*=' Makefile.in && exit 1
 
 :
old mode 100755 (executable)
new mode 100644 (file)
index d9d22c2..fe44e76
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2010-2012 Free Software Foundation, Inc.
+# Copyright (C) 2010-2017 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
@@ -17,7 +17,7 @@
 # Stress test on canonicalization.
 
 required='cc libtool libtoolize'
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_CC
old mode 100755 (executable)
new mode 100644 (file)
index 180e333..66e8616
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 1996-2012 Free Software Foundation, Inc.
+# Copyright (C) 1996-2017 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
@@ -16,7 +16,7 @@
 
 # Check that canonicalization does not transliterate the '@' charactrer.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_CC
@@ -32,6 +32,6 @@ $AUTOMAKE
 # The first grep is here mostly for debugging.
 grep foob.rquux Makefile.in
 grep foob@rquux Makefile.in
-grep 'foob[^@]rquux' Makefile.in && Exit 1
+grep 'foob[^@]rquux' Makefile.in && exit 1
 
 :
diff --git a/t/ccnoco-deps.sh b/t/ccnoco-deps.sh
new file mode 100755 (executable)
index 0000000..ea44a91
--- /dev/null
@@ -0,0 +1,82 @@
+#! /bin/sh
+# Copyright (C) 2013-2017 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 dependency tracking can also work with compilers that
+# doesn't understand '-c -o', even if the AM_PROG_CC_C_O macro is not
+# explicitly called.
+
+required=gcc # For 'cc-no-c-o'.
+. test-init.sh
+
+echo '#define myStr "Hello"' > foobar.h
+
+cat > foo.c << 'END'
+#include <stdio.h>
+#include "foobar.h"
+int main (void)
+{
+  printf ("%s\n", myStr);
+  return 0;
+}
+END
+
+cat > Makefile.am <<'END'
+bin_PROGRAMS = foo
+foo_SOURCES = foo.c foobar.h
+check-deps: all
+       test -n '$(DEPDIR)' && test -d '$(DEPDIR)'
+       ls -l $(DEPDIR)
+       grep 'stdio\.h' $(DEPDIR)/foo.Po
+       grep 'foobar\.h' $(DEPDIR)/foo.Po
+check-updated: all
+       is_newest foo$(EXEEXT) foobar.h
+END
+
+# We deliberately don't invoke AM_PROG_CC_C_O here.
+cat >> configure.ac << 'END'
+AC_PROG_CC
+AC_OUTPUT
+END
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE --add-missing
+
+# Make sure the compiler doesn't understand '-c -o'.
+CC=$am_testaux_builddir/cc-no-c-o; export CC
+
+./configure >stdout || { cat stdout; exit 1; }
+cat stdout
+$EGREP 'understands? -c and -o together.* no$' stdout
+grep '^checking dependency style .*\.\.\. gcc' stdout
+
+$MAKE check-deps
+
+if ! cross_compiling; then
+  ./foo
+  test "$(./foo)" = Hello
+fi
+
+$sleep
+echo '#define myStr "Howdy"' > foobar.h
+$MAKE check-updated
+
+if ! cross_compiling; then
+  ./foo
+  test "$(./foo)" = Howdy
+fi
+
+:
diff --git a/t/ccnoco-lib.sh b/t/ccnoco-lib.sh
new file mode 100755 (executable)
index 0000000..09a8835
--- /dev/null
@@ -0,0 +1,73 @@
+#! /bin/sh
+# Copyright (C) 2001-2017 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 we can compile when the compiler doesn't
+# understand '-c -o'.
+
+required=gcc # For cc-no-c-o.
+. test-init.sh
+
+cat >> configure.ac << 'END'
+AC_PROG_CC
+$CC --version || exit 1
+$CC -v || exit 1
+AC_PROG_RANLIB
+AM_PROG_AR
+AC_OUTPUT
+END
+
+cat > Makefile.am << 'END'
+mylibsdir = $(libdir)/my-libs
+mylibs_LIBRARIES = libwish.a
+libwish_a_SOURCES = a.c
+# Make sure we need something strange.
+libwish_CFLAGS = -O0
+END
+
+cat > a.c << 'END'
+int wish_granted (void)
+{
+   return 0;
+}
+END
+
+# Make sure the compiler doesn't understand '-c -o'.
+CC=$am_testaux_builddir/cc-no-c-o; export CC
+
+$ACLOCAL
+$AUTOCONF -Wall -Werror
+$AUTOMAKE --copy --add-missing
+
+for vpath in : false; do
+  if $vpath; then
+    srcdir=..
+    mkdir build
+    cd build
+  else
+    srcdir=.
+  fi
+  $srcdir/configure >stdout || { cat stdout; exit 1; }
+  cat stdout
+  $EGREP 'understands? -c and -o together.* no$' stdout
+  # No repeated checks please.
+  test $(grep -c ".*-c['\" ].*-o['\" ]" stdout) -eq 1
+  $MAKE
+  cd $srcdir
+done
+
+$MAKE distcheck
+
+:
diff --git a/t/ccnoco-lt.sh b/t/ccnoco-lt.sh
new file mode 100755 (executable)
index 0000000..6cec96a
--- /dev/null
@@ -0,0 +1,76 @@
+#! /bin/sh
+# Copyright (C) 2001-2017 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 we can compile libtool libraries when the compiler
+# doesn't understand '-c -o'.
+
+required='gcc libtoolize' # For cc-no-c-o.
+. test-init.sh
+
+cat >> configure.ac << 'END'
+AC_PROG_CC
+AM_PROG_AR
+LT_INIT
+$CC --version
+$CC -v
+AC_OUTPUT
+END
+
+cat > Makefile.am << 'END'
+lib_LTLIBRARIES = libwish.la
+END
+
+cat > libwish.c << 'END'
+int wish_granted (void)
+{
+   return 0;
+}
+END
+
+# Make sure the compiler doesn't understand '-c -o'.
+CC=$am_testaux_builddir/cc-no-c-o; export CC
+
+libtoolize --verbose --install
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE --copy --add-missing
+
+for vpath in : false; do
+  if $vpath; then
+    srcdir=..
+    mkdir build
+    cd build
+  else
+    srcdir=.
+  fi
+  $srcdir/configure >stdout || { cat stdout; exit 1; }
+  cat stdout
+  $EGREP 'understands? -c and -o together.* no$' stdout
+  # No repeated checks please.
+  test $(grep ".*-c['\" ].*-o['\" ]" stdout \
+          | $FGREP -v ' -c -o file.o' | wc -l) -eq 1
+  # Once we have rewritten $CC to use our 'compile' wrapper script,
+  # libtool should pick it up correctly, and not mess with the
+  # redefinition.
+  grep '^checking if .*/compile .*supports -c -o file\.o\.\.\. yes' stdout
+  # And of course, we should be able to build our package.
+  $MAKE
+  cd $srcdir
+done
+
+$MAKE distcheck
+
+:
old mode 100755 (executable)
new mode 100644 (file)
index 1df950d..ac61ba6
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2001-2012 Free Software Foundation, Inc.
+# Copyright (C) 2001-2017 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
 # Test to make sure we can compile when the compiler doesn't
 # understand '-c -o'.
 
-required=gcc
-. ./defs || Exit 1
+required=gcc # For cc-no-c-o.
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_CC
-AM_PROG_CC_C_O
-# Make sure that $CC can be used after AM_PROG_CC_C_O.
+$CC --version || exit 1
 $CC -v || exit 1
 AC_OUTPUT
 END
@@ -44,27 +43,11 @@ int main ()
 }
 END
 
-cat > Mycomp << END
-#!/bin/sh
-
-case " \$* " in
- *\ -c*\ -o* | *\ -o*\ -c*)
-    exit 1
-    ;;
-esac
-
-# Use '$CC', not 'gcc', to honour the compiler chosen by 't/defs'.
-exec $CC "\$@"
-END
-
-chmod +x Mycomp
-
-# Make sure the compiler doesn't understand '-c -o'
-CC=`pwd`/Mycomp
-export CC
+# Make sure the compiler doesn't understand '-c -o'.
+CC=$am_testaux_builddir/cc-no-c-o; export CC
 
 $ACLOCAL
-$AUTOCONF
+$AUTOCONF -Wall -Werror
 $AUTOMAKE --copy --add-missing
 
 for vpath in : false; do
@@ -75,9 +58,15 @@ for vpath in : false; do
   else
     srcdir=.
   fi
-  $srcdir/configure
+  $srcdir/configure >stdout || { cat stdout; exit 1; }
+  cat stdout
+  $EGREP 'understands? -c and -o together.* no$' stdout
+  # No repeated checks please.
+  test $(grep -c ".*-c['\" ].*-o['\" ]" stdout) -eq 1
   $MAKE
   cd $srcdir
 done
 
+$MAKE distcheck
+
 :
old mode 100755 (executable)
new mode 100644 (file)
index eb291ec..75c193c
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2001-2012 Free Software Foundation, Inc.
+# Copyright (C) 2001-2017 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
 
 # Test to make sure 'compile' doesn't call 'mv SRC SRC'.
 
-required=gcc
-. ./defs || Exit 1
+required=gcc # For cc-no-c-o.
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_CC
-AM_PROG_CC_C_O
 $CC --version; $CC -v; # For debugging.
 AC_OUTPUT
 END
@@ -43,20 +42,8 @@ int main ()
 }
 END
 
-cat > Mycomp << END
-#!/bin/sh
-
-case " \$* " in
- *\ -c*\ -o* | *\ -o*\ -c*)
-    exit 1
-    ;;
-esac
-
-# Use '$CC', not 'gcc', to honour the compiler chosen by 't/defs'.
-exec $CC "\$@"
-END
-
-chmod +x Mycomp
+# Make sure the compiler doesn't understand '-c -o'
+CC=$am_testaux_builddir/cc-no-c-o; export CC
 
 $ACLOCAL
 $AUTOCONF
@@ -65,13 +52,8 @@ $AUTOMAKE --copy --add-missing
 mkdir build
 cd build
 
-# Make sure the compiler doesn't understand '-c -o'
-CC=`pwd`/../Mycomp
-export CC
-
 ../configure
-$MAKE 2>stderr || { cat stderr >&2; Exit 1; }
-cat stderr >&2
-grep 'mv.*the same file' stderr && Exit 1
+run_make -E
+grep 'mv.*the same file' stderr && exit 1
 
 :
diff --git a/t/ccnoco4.sh b/t/ccnoco4.sh
new file mode 100644 (file)
index 0000000..eba3002
--- /dev/null
@@ -0,0 +1,53 @@
+#! /bin/sh
+# Copyright (C) 2001-2017 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-generated C compilation rules don't mistakenly
+# use the "-c -o" options combination unconditionally (even with losing
+# compilers) when the 'subdir-objects' is used but sources are only
+# present in the top-level directory.  Reported by Nick Bowler in the
+# discussion on automake bug#13378:
+# <http://debbugs.gnu.org/cgi/bugreport.cgi?bug=13378#35>
+# <http://debbugs.gnu.org/cgi/bugreport.cgi?bug=13378#44>
+
+required=gcc # For cc-no-c-o.
+. test-init.sh
+
+cat >> configure.ac << 'END'
+AC_PROG_CC
+$CC --version; $CC -v; # For debugging.
+AC_OUTPUT
+END
+
+cat > Makefile.am << 'END'
+AUTOMAKE_OPTIONS = subdir-objects
+bin_PROGRAMS = foo bar
+bar_SOURCES = foo.c
+END
+
+echo 'int main (void) { return 0; }' > foo.c
+
+# Make sure the compiler doesn't understand '-c -o'
+CC=$am_testaux_builddir/cc-no-c-o; export CC
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE --copy --add-missing
+
+./configure
+$MAKE
+$MAKE distcheck
+
+:
old mode 100755 (executable)
new mode 100644 (file)
index 1cb8422..78c274c
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2011-2012 Free Software Foundation, Inc.
+# Copyright (C) 2011-2017 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
@@ -18,7 +18,7 @@
 # even when the Automake-generated parallel testsuite harness failed.
 # See automake bug#9245.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_OUTPUT
@@ -42,17 +42,16 @@ $AUTOMAKE -a
 
 ./configure
 
-# Some make implementations don't grok the '-j' option.
-$MAKE -j1 || Exit 77
+$MAKE -j1 || skip_ "'$MAKE' doesn't support the -j option"
 
 for j in '' -j1 -j2; do
-  $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
+  run_make -e FAIL -- $j TESTS=foo.test check
+  $MAKE $j recheck && exit 1
+  run_make -e FAIL -- $j TEST_LOGS=foo.log check
   rm -f test-suite.log
-  $MAKE $j test-suite.log && Exit 1
-  test -f test-suite.log || Exit 1
+  run_make -e FAIL $j test-suite.log
+  test -f test-suite.log || exit 1
 done
 
 :
old mode 100755 (executable)
new mode 100644 (file)
index 29db586..dbf8da4
@@ -1,14 +1,15 @@
 #! /bin/sh
 # This file has been automatically generated.  DO NOT EDIT BY HAND!
-. ./defs-static || exit '99';
+. test-lib.sh
+
 am_serial_tests=yes
 # 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/t/check-exported-srcdir.sh"; then
     echo "$0: will source $dir/t/check-exported-srcdir.sh"
-    . "$dir/t/check-exported-srcdir.sh"; exit "$?"
+    . "$dir/t/check-exported-srcdir.sh"; exit $?
   fi
 done
 echo "$0: cannot find wrapped test 't/check-exported-srcdir.sh'" >&2
-exit '99'
+exit 99
old mode 100755 (executable)
new mode 100644 (file)
index c6fda21..688344d
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2011-2012 Free Software Foundation, Inc.
+# Copyright (C) 2011-2017 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 # Check that the testsuite driver (either with or without the
-# parallel-tests option enabled) exports the 'srcdir' value in the
+# serial-tests option enabled) exports the 'srcdir' value in the
 # environment of the tests.  This is documented in the manual.
 
 # For gen-testsuite-part: ==> try-with-serial-tests <==
-. ./defs || Exit 1
+. test-init.sh
 
 show_info ()
 {
@@ -58,7 +58,7 @@ $AUTOMAKE -a
 cd ../BuildDir
 ../SrcDir/configure
 
-$MAKE check || { show_info; Exit 1; }
+$MAKE check || { show_info; exit 1; }
 show_info
 
 :
old mode 100755 (executable)
new mode 100644 (file)
index aab066d..151092e
@@ -1,14 +1,15 @@
 #! /bin/sh
 # This file has been automatically generated.  DO NOT EDIT BY HAND!
-. ./defs-static || exit '99';
+. test-lib.sh
+
 am_serial_tests=yes
 # 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/t/check-fd-redirect.sh"; then
     echo "$0: will source $dir/t/check-fd-redirect.sh"
-    . "$dir/t/check-fd-redirect.sh"; exit "$?"
+    . "$dir/t/check-fd-redirect.sh"; exit $?
   fi
 done
 echo "$0: cannot find wrapped test 't/check-fd-redirect.sh'" >&2
-exit '99'
+exit 99
old mode 100755 (executable)
new mode 100644 (file)
index 618aa80..c668d4e
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2011-2012 Free Software Foundation, Inc.
+# Copyright (C) 2011-2017 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
 
 # Simple Tests support: redirection of file descriptors with
 # AM_TESTS_FD_REDIRECT.
-# See also related test 'parallel-tests-fd-redirect.test'.
+# See also related test 'parallel-tests-fd-redirect.sh'.
 
 # For gen-testsuite-part: ==> try-with-serial-tests <==
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_OUTPUT
@@ -46,20 +46,17 @@ do_check ()
   cat foo.test # For debugging.
   echo 'this line will be removed' > four
   echo 'this line will not be removed' > five
-  st=0
-  echo 'ok ok ok' | $MAKE check >stdout 2>stderr || st=1
-  cat stdout
-  cat stderr >&2
+  st=0; echo 'ok ok ok' | run_make -O -E -e IGNORE check || st=$?
   cat four
   test x"$am_serial_tests" = x"yes" || cat foo.log
   test $st -eq 0
   grep '[ /]foo\.test: foofoofoo$' stdout
   grep '[ /]foo\.test: barbarbar$' stderr
-  grep 'this line' four && Exit 1
+  grep 'this line' four && exit 1
   grep '^3333$' four
   grep '^this line will not be removed$' five
   grep '^ok ok ok$' five
-  $EGREP '(foofoofoo|barbarbar|3333|ok ok ok|this line)' foo.log && Exit 1
+  $EGREP '(foofoofoo|barbarbar|3333|ok ok ok|this line)' foo.log && exit 1
   :
 }
 
old mode 100755 (executable)
new mode 100644 (file)
index 84ea325..36f6f73
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2011-2012 Free Software Foundation, Inc.
+# Copyright (C) 2011-2017 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 # Check that auxiliary script 'test-driver' doesn't get needlessly
-# installed or referenced when the 'parallel-tests' option is not
-# used.
+# installed or referenced when the 'serial-tests' option is used.
 
 am_serial_tests=yes
-. ./defs || Exit 1
+. test-init.sh
 
-echo 'TESTS = foo.test' > Makefile.am
+cat > Makefile.am <<'END'
+AUTOMAKE_OPTIONS = serial-tests
+TESTS = foo.test
+END
 
 $ACLOCAL
 
 for opts in '' '-a' '--add-missing --copy'; do
   $AUTOMAKE $opts
-  $FGREP 'test-driver' Makefile.in && Exit 1
-  find . | $FGREP 'test-driver' && Exit 1
+  $FGREP 'test-driver' Makefile.in && exit 1
+  find . | $FGREP 'test-driver' && exit 1
   : For shells with busted 'set -e'.
 done
 
old mode 100755 (executable)
new mode 100644 (file)
index d23d202..4cb74a3
@@ -1,14 +1,15 @@
 #! /bin/sh
 # This file has been automatically generated.  DO NOT EDIT BY HAND!
-. ./defs-static || exit '99';
+. test-lib.sh
+
 am_serial_tests=yes
 # 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/t/check-subst-prog.sh"; then
     echo "$0: will source $dir/t/check-subst-prog.sh"
-    . "$dir/t/check-subst-prog.sh"; exit "$?"
+    . "$dir/t/check-subst-prog.sh"; exit $?
   fi
 done
 echo "$0: cannot find wrapped test 't/check-subst-prog.sh'" >&2
-exit '99'
+exit 99
old mode 100755 (executable)
new mode 100644 (file)
index 540c749..237ad29
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2008-2012 Free Software Foundation, Inc.
+# Copyright (C) 2008-2017 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 # Check @substituted@ TESTS, some of which are also PROGRAMS.
-# See also sister test 'check-subst.test'.
+# See also sister test 'check-subst.sh'.
 
 # For gen-testsuite-part: ==> try-with-serial-tests <==
 required='cc native'
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_CC
old mode 100755 (executable)
new mode 100644 (file)
index ecf3d8c..2e46890
@@ -1,14 +1,15 @@
 #! /bin/sh
 # This file has been automatically generated.  DO NOT EDIT BY HAND!
-. ./defs-static || exit '99';
+. test-lib.sh
+
 am_serial_tests=yes
 # 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/t/check-subst.sh"; then
     echo "$0: will source $dir/t/check-subst.sh"
-    . "$dir/t/check-subst.sh"; exit "$?"
+    . "$dir/t/check-subst.sh"; exit $?
   fi
 done
 echo "$0: cannot find wrapped test 't/check-subst.sh'" >&2
-exit '99'
+exit 99
old mode 100755 (executable)
new mode 100644 (file)
index ac8fe89..77886d4
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2008-2012 Free Software Foundation, Inc.
+# Copyright (C) 2008-2017 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
 
 # Check @substituted@ TESTS.
 # Note that in this test, we rely on the .test extension for the
-# substituted names: this is necessary for parallel-tests.
-# See also sister test 'check-subst-prog.test'.
+# substituted names: this is necessary for the parallel harness.
+# See also sister test 'check-subst-prog.sh'.
 
 # For gen-testsuite-part: ==> try-with-serial-tests <==
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_SUBST([script_tests], ['subst-pass-script.sh subst-xfail-script.sh'])
old mode 100755 (executable)
new mode 100644 (file)
index 08575db..a07df16
@@ -1,14 +1,15 @@
 #! /bin/sh
 # This file has been automatically generated.  DO NOT EDIT BY HAND!
-. ./defs-static || exit '99';
+. test-lib.sh
+
 am_serial_tests=yes
 # 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/t/check-tests-in-builddir.sh"; then
     echo "$0: will source $dir/t/check-tests-in-builddir.sh"
-    . "$dir/t/check-tests-in-builddir.sh"; exit "$?"
+    . "$dir/t/check-tests-in-builddir.sh"; exit $?
   fi
 done
 echo "$0: cannot find wrapped test 't/check-tests-in-builddir.sh'" >&2
-exit '99'
+exit 99
old mode 100755 (executable)
new mode 100644 (file)
index 323c3bc..b9070bc
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2011-2012 Free Software Foundation, Inc.
+# Copyright (C) 2011-2017 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
@@ -18,7 +18,7 @@
 # well as in builddir, and that is prefers those in the builddir.
 
 # For gen-testsuite-part: ==> try-with-serial-tests <==
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_OUTPUT
@@ -35,7 +35,7 @@ exit ${FOO_EXIT_STATUS-0}
 END
 chmod a+x foo.test
 
-unset FOO_EXIT_STATUS || :
+unset FOO_EXIT_STATUS
 
 $ACLOCAL
 $AUTOCONF
@@ -52,41 +52,38 @@ exit 0
 END
 chmod a+x bar.test
 
-$MAKE check >out 2>&1 || { cat out; Exit1; }
-cat out
-# The simple-tests driver does not strip VPATH components from
-# the name of the test, but the parallel-tests driver should.
+run_make -M check
+# The serial test driver does not strip VPATH components from
+# the name of the test, but the parallel driver should.
 if test x"$am_serial_tests" = x"yes"; then
-  grep '^PASS: .*foo\.test *$' out
+  grep '^PASS: .*foo\.test *$' output
 else
-  grep '\.\./foo' out && Exit 1
-  grep '^PASS: foo\.test *$' out
+  grep '\.\./foo' output && exit 1
+  grep '^PASS: foo\.test *$' output
 fi
-grep '^PASS: bar\.test *$' out
+grep '^PASS: bar\.test *$' output
 
 rm -f test-suite.log foo.log bar.log
 
-FOO_EXIT_STATUS=1 $MAKE check >out 2>&1 && { cat out; Exit1; }
-cat out
-# The simple-tests driver does not strip VPATH components from
-# the name of the test, but the parallel-tests driver should.
+run_make -M -e FAIL FOO_EXIT_STATUS=1 check
+# The serial test driver does not strip VPATH components from
+# the name of the test, but the parallel driver should.
 if test x"$am_serial_tests" = x"yes"; then
-  grep '^FAIL: .*foo\.test *$' out
+  grep '^FAIL: .*foo\.test *$' output
 else
-  grep '\.\./foo' out && Exit 1
-  grep '^FAIL: foo\.test *$' out
+  grep '\.\./foo' output && exit 1
+  grep '^FAIL: foo\.test *$' output
 fi
-grep '^PASS: bar\.test *$' out
+grep '^PASS: bar\.test *$' output
 
 rm -f test-suite.log foo.log bar.log
 
 # Check that if the same test is present in srcdir and builddir,
 # the one in builddir is preferred.
 cp bar.test foo.test
-FOO_EXIT_STATUS=1 $MAKE check >out 2>&1 || { cat out; Exit1; }
-cat out
-grep '^PASS: foo\.test *$' out
-grep '^PASS: bar\.test *$' out
+run_make -M FOO_EXIT_STATUS=1 check
+grep '^PASS: foo\.test *$' output
+grep '^PASS: bar\.test *$' output
 
 # The tests in the builddir must be preferred also by "make dist".
 FOO_EXIT_STATUS=1 $MAKE distcheck
old mode 100755 (executable)
new mode 100644 (file)
index 8b7d76a..eb1b867
@@ -1,14 +1,15 @@
 #! /bin/sh
 # This file has been automatically generated.  DO NOT EDIT BY HAND!
-. ./defs-static || exit '99';
+. test-lib.sh
+
 am_serial_tests=yes
 # 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/t/check.sh"; then
     echo "$0: will source $dir/t/check.sh"
-    . "$dir/t/check.sh"; exit "$?"
+    . "$dir/t/check.sh"; exit $?
   fi
 done
 echo "$0: cannot find wrapped test 't/check.sh'" >&2
-exit '99'
+exit 99
old mode 100755 (executable)
new mode 100644 (file)
index 1edd60f..b7956cc
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2001-2012 Free Software Foundation, Inc.
+# Copyright (C) 2001-2017 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
@@ -17,7 +17,7 @@
 # Test Automake style tests.
 
 # For gen-testsuite-part: ==> try-with-serial-tests <==
-. ./defs || Exit 1
+. test-init.sh
 
 cat > Makefile.am << 'END'
 TESTS = frob.test
@@ -29,13 +29,13 @@ $ACLOCAL
 $AUTOMAKE
 
 grep 'check-TESTS.*:' Makefile.in
-grep 'check-DEJAGNU' Makefile.in && Exit 1
+grep 'check-DEJAGNU' Makefile.in && exit 1
 
 # 'check-TESTS' is phony.
 sed -n '/^\.PHONY:/,/^$/p' Makefile.in | $EGREP '(^| )check-TESTS($| )'
 
 # 'check' should depend directly on 'check-am' (similar tests are
-# in check2.test and check3.test).
+# in check2.sh and check3.sh).
 $EGREP '^check:.* check-am( |$)' Makefile.in
 
 :
old mode 100755 (executable)
new mode 100644 (file)
index 9f436ad..92a0233
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2008-2012 Free Software Foundation, Inc.
+# Copyright (C) 2008-2017 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
@@ -18,7 +18,7 @@
 
 # This test only makes sense for the older serial testsuite driver.
 am_serial_tests=yes
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_OUTPUT
@@ -56,30 +56,27 @@ $AUTOMAKE -a
 
 ./configure
 (
-  # 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
-  :
-) >stdout || { cat stdout; Exit 1; }
+  run_make -e IGNORE TESTS=pass check
+  run_make -e IGNORE TESTS=fail check
+  run_make -e IGNORE TESTS=skip check
+  run_make -e IGNORE TESTS=xfail check
+  run_make -e IGNORE TESTS=xpass check
+  run_make -e IGNORE TESTS="pass pass2" check
+  run_make -e IGNORE TESTS="fail fail2" check
+  run_make -e IGNORE TESTS="skip skip2" check
+  run_make -e IGNORE TESTS="xfail xfail2" check
+  run_make -e IGNORE TESTS="xpass xpass2" check
+  run_make -e IGNORE TESTS='pass skip xfail' check
+  run_make -e IGNORE check
+) >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
 
 :
old mode 100755 (executable)
new mode 100644 (file)
index 111d71a..613c3ff
@@ -1,14 +1,15 @@
 #! /bin/sh
 # This file has been automatically generated.  DO NOT EDIT BY HAND!
-. ./defs-static || exit '99';
+. test-lib.sh
+
 am_serial_tests=yes
 # 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/t/check11.sh"; then
     echo "$0: will source $dir/t/check11.sh"
-    . "$dir/t/check11.sh"; exit "$?"
+    . "$dir/t/check11.sh"; exit $?
   fi
 done
 echo "$0: cannot find wrapped test 't/check11.sh'" >&2
-exit '99'
+exit 99
old mode 100755 (executable)
new mode 100644 (file)
index fc1209c..9f34405
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2009-2012 Free Software Foundation, Inc.
+# Copyright (C) 2009-2017 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
@@ -17,7 +17,7 @@
 # Check skip summary.
 
 # For gen-testsuite-part: ==> try-with-serial-tests <==
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_OUTPUT
@@ -40,19 +40,17 @@ $AUTOMAKE -a
 
 ./configure
 
-env TESTS=skip $MAKE -e check >stdout || { cat stdout; Exit 1; }
-cat stdout
+run_make -O TESTS=skip check
 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
 
-env TESTS="skip skip2" $MAKE -e check >stdout || { cat stdout; Exit 1; }
-cat stdout
+run_make -O TESTS="skip skip2" check
 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
old mode 100755 (executable)
new mode 100644 (file)
index a263f21..3838e33
@@ -1,14 +1,15 @@
 #! /bin/sh
 # This file has been automatically generated.  DO NOT EDIT BY HAND!
-. ./defs-static || exit '99';
+. test-lib.sh
+
 am_serial_tests=yes
 # 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/t/check12.sh"; then
     echo "$0: will source $dir/t/check12.sh"
-    . "$dir/t/check12.sh"; exit "$?"
+    . "$dir/t/check12.sh"; exit $?
   fi
 done
 echo "$0: cannot find wrapped test 't/check12.sh'" >&2
-exit '99'
+exit 99
old mode 100755 (executable)
new mode 100644 (file)
index dbb3101..9a63a43
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2010-2012 Free Software Foundation, Inc.
+# Copyright (C) 2010-2017 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
@@ -19,7 +19,7 @@
 
 # For gen-testsuite-part: ==> try-with-serial-tests <==
 required=runtest
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_OUTPUT
@@ -136,39 +136,37 @@ for vpath in : false; do
   test -f hammer.sum
   test -f spanner.log
   test -f spanner.sum
-  # This checks will be run only by the autogenerated 'check12-p.test'.
   if test x"$am_serial_tests" != x"yes"; then
     test -f test-suite.log
     test -f a.log
     test -f b.log
-  else :; fi
+  fi
   grep 'check-local succeeded :-)' local.log
 
   cp -f config.status config-status.sav
 
   $MAKE distclean
-  test ! -r hammer.log
-  test ! -r hammer.sum
-  test ! -r spanner.log
-  test ! -r spanner.sum
-  test ! -r test-suite.log
-  test ! -r a.log
-  test ! -r b.log
-  test ! -r local.log
+  test ! -e hammer.log
+  test ! -e hammer.sum
+  test ! -e spanner.log
+  test ! -e spanner.sum
+  test ! -e test-suite.log
+  test ! -e a.log
+  test ! -e b.log
+  test ! -e local.log
 
   mv -f config-status.sav config.status
   ./config.status
 
-  NAIL=screw $MAKE check && Exit 1
+  NAIL=screw $MAKE check && exit 1
   test -f hammer.log
   test -f hammer.sum
   test -f spanner.log
   test -f spanner.sum
   grep 'FAIL: test_hammer' hammer.sum
-  grep 'FAIL:' spanner.sum && Exit 1
+  grep 'FAIL:' spanner.sum && exit 1
 
-  B_EXIT_STATUS=1 $MAKE check && Exit 1
-  # This checks will be run only by the autogenerated 'check12-p.test'.
+  B_EXIT_STATUS=1 $MAKE check && exit 1
   if test x"$am_serial_tests" != x"yes"; then
     cat test-suite.log
     cat a.log
@@ -177,11 +175,11 @@ for vpath in : false; do
     grep '^b\.test: exit status: 1$' b.log
     grep '^FAIL: b$' test-suite.log
     grep '^b\.test: exit status: 1$' test-suite.log
-    grep '^a\.test' test-suite.log && Exit 1
+    grep '^a\.test' test-suite.log && exit 1
     : For shells with busted 'set -e'.
-  else :; fi
+  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'.
@@ -191,8 +189,7 @@ for vpath in : false; do
   test -f spanner.log
   test -f spanner.sum
   grep 'FAIL: test_hammer' hammer.sum
-  grep 'FAIL:' spanner.sum && Exit 1
-  # This checks will be run only by the autogenerated 'check12-p.test'.
+  grep 'FAIL:' spanner.sum && exit 1
   if test x"$am_serial_tests" != x"yes"; then
     cat test-suite.log
     cat a.log
@@ -201,9 +198,9 @@ for vpath in : false; do
     grep '^b\.test: exit status: 23$' b.log
     grep '^FAIL: b$' test-suite.log
     grep '^b\.test: exit status: 23$' test-suite.log
-    grep '^a\.test' test-suite.log && Exit 1
+    grep '^a\.test' test-suite.log && exit 1
     : For shells with busted 'set -e'.
-  else :; fi
+  fi
   grep 'check-local failed :-(' local.log
 
   cd $srcdir
old mode 100755 (executable)
new mode 100644 (file)
index 9405d9f..f90540f
@@ -1,14 +1,15 @@
 #! /bin/sh
 # This file has been automatically generated.  DO NOT EDIT BY HAND!
-. ./defs-static || exit '99';
+. test-lib.sh
+
 am_serial_tests=yes
 # 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/t/check2.sh"; then
     echo "$0: will source $dir/t/check2.sh"
-    . "$dir/t/check2.sh"; exit "$?"
+    . "$dir/t/check2.sh"; exit $?
   fi
 done
 echo "$0: cannot find wrapped test 't/check2.sh'" >&2
-exit '99'
+exit 99
old mode 100755 (executable)
new mode 100644 (file)
index 73eb0b7..9fa1837
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2002-2012 Free Software Foundation, Inc.
+# Copyright (C) 2002-2017 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
@@ -17,7 +17,7 @@
 # Test Automake style tests.
 
 # For gen-testsuite-part: ==> try-with-serial-tests <==
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_CONFIG_FILES([dir/Makefile])
@@ -51,13 +51,12 @@ $AUTOCONF
 $AUTOMAKE
 ./configure
 
-$MAKE check >stdout || { cat stdout; Exit 1; }
-cat stdout
+run_make -O check
 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).
+# in 'check.sh' and 'built-sources-check.sh').
 $EGREP '^check:.* check-recursive( |$)' Makefile.in
 $EGREP '^check:.* check-am( |$)' dir/Makefile.in
 
old mode 100755 (executable)
new mode 100644 (file)
index 7018f83..037be03
@@ -1,14 +1,15 @@
 #! /bin/sh
 # This file has been automatically generated.  DO NOT EDIT BY HAND!
-. ./defs-static || exit '99';
+. test-lib.sh
+
 am_serial_tests=yes
 # 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/t/check4.sh"; then
     echo "$0: will source $dir/t/check4.sh"
-    . "$dir/t/check4.sh"; exit "$?"
+    . "$dir/t/check4.sh"; exit $?
   fi
 done
 echo "$0: cannot find wrapped test 't/check4.sh'" >&2
-exit '99'
+exit 99
old mode 100755 (executable)
new mode 100644 (file)
index 78415e0..73e4883
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2005-2012 Free Software Foundation, Inc.
+# Copyright (C) 2005-2017 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
@@ -17,7 +17,7 @@
 # Make sure 'make -k check' processes all directories.
 
 # For gen-testsuite-part: ==> try-with-serial-tests <==
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_CONFIG_FILES([dir/Makefile])
@@ -49,23 +49,20 @@ $ACLOCAL
 $AUTOCONF
 $AUTOMAKE --add-missing
 
-./configure --prefix "`pwd`/inst"
+./configure --prefix "$(pwd)/inst"
 
-$MAKE check >stdout && { cat stdout; Exit 1; }
-cat stdout
+run_make -O -e FAIL -- check
 grep '^FAIL: fail\.sh *$' stdout
-grep '^PASS: ok\.sh *$' stdout && Exit 1
+grep '^PASS: ok\.sh *$' stdout && exit 1
 
 # The exit status of 'make -k' can be anything
 # (depending on the Make implementation)
-$MAKE -k check >stdout || :
-cat stdout
+run_make -O -e IGNORE -- -k check
 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
+run_make -O -e IGNORE -- -s -k check
 grep '^FAIL: fail\.sh *' stdout
 grep '^PASS: ok\.sh *' stdout
 
@@ -75,8 +72,7 @@ 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
+  run_make -e FAIL -O -- --no-print-directory -k check
   grep '^FAIL: fail\.sh *$' stdout
   grep '^PASS: ok\.sh *$' stdout
 fi
old mode 100755 (executable)
new mode 100644 (file)
index f6cb8d6..a857fd9
@@ -1,14 +1,15 @@
 #! /bin/sh
 # This file has been automatically generated.  DO NOT EDIT BY HAND!
-. ./defs-static || exit '99';
+. test-lib.sh
+
 am_serial_tests=yes
 # 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/t/check5.sh"; then
     echo "$0: will source $dir/t/check5.sh"
-    . "$dir/t/check5.sh"; exit "$?"
+    . "$dir/t/check5.sh"; exit $?
   fi
 done
 echo "$0: cannot find wrapped test 't/check5.sh'" >&2
-exit '99'
+exit 99
old mode 100755 (executable)
new mode 100644 (file)
index 8865f3e..a793c83
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2006-2012 Free Software Foundation, Inc.
+# Copyright (C) 2006-2017 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
@@ -18,7 +18,7 @@
 
 # For gen-testsuite-part: ==> try-with-serial-tests <==
 required='cc native'
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_CC
@@ -32,9 +32,8 @@ check-local:
        test -f one$(EXEEXT)
        test -f two$(EXEEXT)
        touch ok
-.PHONY: print-tests
-print-tests:
-       echo BEG: $(TESTS) :END
+expect-tests:
+       is $(TESTS) == one$(EXEEXT) two$(EXEEXT)
 END
 
 $ACLOCAL
@@ -52,11 +51,10 @@ cp one.c two.c
 ./configure
 $MAKE check
 test -f ok
-EXEEXT=.bin $MAKE -e print-tests >stdout || { cat stdout; Exit 1; }
-cat stdout
-$FGREP 'BEG: one.bin two.bin :END' stdout
+run_make expect-tests
+run_make expect-tests EXEEXT=.bin
 # No am__EXEEXT_* variable is needed.
-grep '_EXEEXT_[1-9]' Makefile.in && Exit 1
+grep '_EXEEXT_[1-9]' Makefile.in && exit 1
 $FGREP 'TESTS = $(check_PROGRAMS)' Makefile.in
 
 :
old mode 100755 (executable)
new mode 100644 (file)
index 9bd01e2..1fe43e3
@@ -1,14 +1,15 @@
 #! /bin/sh
 # This file has been automatically generated.  DO NOT EDIT BY HAND!
-. ./defs-static || exit '99';
+. test-lib.sh
+
 am_serial_tests=yes
 # 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/t/check6.sh"; then
     echo "$0: will source $dir/t/check6.sh"
-    . "$dir/t/check6.sh"; exit "$?"
+    . "$dir/t/check6.sh"; exit $?
   fi
 done
 echo "$0: cannot find wrapped test 't/check6.sh'" >&2
-exit '99'
+exit 99
old mode 100755 (executable)
new mode 100644 (file)
index 0f33f8d..870aed9
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2006-2012 Free Software Foundation, Inc.
+# Copyright (C) 2006-2017 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
@@ -18,7 +18,7 @@
 # Also test that Solaris make VPATH rewriting is honored
 
 # For gen-testsuite-part: ==> try-with-serial-tests <==
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_OUTPUT
old mode 100755 (executable)
new mode 100644 (file)
index 921a314..5b95664
@@ -1,14 +1,15 @@
 #! /bin/sh
 # This file has been automatically generated.  DO NOT EDIT BY HAND!
-. ./defs-static || exit '99';
+. test-lib.sh
+
 am_serial_tests=yes
 # 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/t/check7.sh"; then
     echo "$0: will source $dir/t/check7.sh"
-    . "$dir/t/check7.sh"; exit "$?"
+    . "$dir/t/check7.sh"; exit $?
   fi
 done
 echo "$0: cannot find wrapped test 't/check7.sh'" >&2
-exit '99'
+exit 99
old mode 100755 (executable)
new mode 100644 (file)
index 54d2b2b..bdf6fcc
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2007-2012 Free Software Foundation, Inc.
+# Copyright (C) 2007-2017 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
@@ -18,7 +18,7 @@
 
 # For gen-testsuite-part: ==> try-with-serial-tests <==
 required=cc
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_CC
@@ -32,9 +32,8 @@ check_PROGRAMS = a c d
 check_SCRIPTS = b
 EXTRA_DIST = $(check_SCRIPTS)
 
-.PHONY: print-xfail-tests
-print-xfail-tests:
-       @echo BEG: $(XFAIL_TESTS) :END
+expect-xfail-tests:
+       is $(XFAIL_TESTS) == a$(EXEEXT) b c$(EXEEXT) d$(EXEEXT)
 END
 
 cat > b <<'END'
@@ -60,9 +59,8 @@ $AUTOMAKE -a
 
 ./configure
 $MAKE check
-EXEEXT=.bin $MAKE -e print-xfail-tests >stdout || {  cat stdout; Exit 1; }
-cat stdout
-$FGREP 'BEG: a.bin b c.bin d.bin :END' stdout
+run_make expect-xfail-tests
+run_make expect-xfail-tests EXEEXT=.bin
 
 $MAKE distcheck
 
old mode 100755 (executable)
new mode 100644 (file)
index ff2fd06..2302176
@@ -1,14 +1,15 @@
 #! /bin/sh
 # This file has been automatically generated.  DO NOT EDIT BY HAND!
-. ./defs-static || exit '99';
+. test-lib.sh
+
 am_serial_tests=yes
 # 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/t/check8.sh"; then
     echo "$0: will source $dir/t/check8.sh"
-    . "$dir/t/check8.sh"; exit "$?"
+    . "$dir/t/check8.sh"; exit $?
   fi
 done
 echo "$0: cannot find wrapped test 't/check8.sh'" >&2
-exit '99'
+exit 99
old mode 100755 (executable)
new mode 100644 (file)
index d33c002..cafcf46
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2008-2012 Free Software Foundation, Inc.
+# Copyright (C) 2008-2017 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
 
 # For gen-testsuite-part: ==> try-with-serial-tests <==
 required='cc native'
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_CC
-AM_PROG_CC_C_O
 AC_OUTPUT
 END
 
@@ -65,28 +64,24 @@ $AUTOCONF
 $AUTOMAKE -a
 
 ./configure
-AM_COLOR_TESTS=always $MAKE check >stdout 2>stderr &&
-  { cat stdout; cat stderr >&2; Exit 1; }
-cat stdout
-cat stderr >&2
+run_make -E -O -e FAIL check
 grep 'XPASS.* foo$' stdout
 grep '^[^X]*PASS.* sub/foo$' stdout
 grep '^[^X]*PASS.* bar' stdout
 grep '^[^X]*PASS.* sub/bar' stdout
 grep '^[^X]*FAIL.* baz' stdout
 grep 'XFAIL.* sub/baz' stdout
-# 'parallel-tests' should not add circular dependencies.
+# The parallel test driver should cause circular dependencies.
 # Look for known warnings from a couple of 'make' implementations.
-grep -i 'circular.*dependency' stderr && Exit 1
-grep -i 'graph cycles' stderr && Exit 1
+grep -i 'circular.*dependency' stderr && exit 1
+grep -i 'graph cycles' stderr && exit 1
 
 $MAKE distclean
 
 mkdir build
 cd build
 ../configure
-$MAKE check >stdout && { cat stdout; Exit 1; }
-cat stdout
+run_make -O -e FAIL check
 # Note: we are not grepping for the space in the lines from the 'foo'
 # tests, due to the Solaris make VPATH rewriting (if we fix that, we
 # can still write a separate test for it).
old mode 100755 (executable)
new mode 100644 (file)
index 3b04d56..8e2f543
@@ -1,5 +1,5 @@
 #!/bin/sh
-# Copyright (C) 1996-2012 Free Software Foundation, Inc.
+# Copyright (C) 1996-2017 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
@@ -16,7 +16,7 @@
 
 # Test for bug where check target doesn't depend on all.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat > Makefile.am << 'END'
 bin_SCRIPTS = derived
old mode 100755 (executable)
new mode 100644 (file)
index 279e162..4d27b91
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 1998-2012 Free Software Foundation, Inc.
+# Copyright (C) 1998-2017 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
@@ -16,7 +16,7 @@
 
 # Test to make sure a clean target depends on previous one.
 
-. ./defs || Exit 1
+. test-init.sh
 
 : > Makefile.am
 
old mode 100755 (executable)
new mode 100644 (file)
index 0b5bbcd..bdef0ce
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 1996-2012 Free Software Foundation, Inc.
+# Copyright (C) 1996-2017 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
@@ -16,7 +16,7 @@
 
 # Test that := definitions produce warnings, but otherwise work.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat > Makefile.am << 'END'
 ICONS := $(wildcard *.xbm)
old mode 100755 (executable)
new mode 100644 (file)
index b313441..44408b4
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 1996-2012 Free Software Foundation, Inc.
+# Copyright (C) 1996-2017 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
@@ -16,7 +16,7 @@
 
 # Test that := in var substitutions works.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_OUTPUT
old mode 100755 (executable)
new mode 100644 (file)
index 728cc32..ced4ce3
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2010-2012 Free Software Foundation, Inc.
+# Copyright (C) 2010-2017 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
@@ -17,7 +17,7 @@
 # Test that := definitions work as expected at make time.
 
 required=GNUmake
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_OUTPUT
old mode 100755 (executable)
new mode 100644 (file)
index f5cb4e0..620a973
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 1996-2012 Free Software Foundation, Inc.
+# Copyright (C) 1996-2017 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
@@ -17,7 +17,7 @@
 # Test for bug reported by Nyul Laszlo.  When using the ":" syntax in
 # AC_OUTPUT, Automake fails to find the correct file.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac <<'END'
 AC_CONFIG_FILES([foo.h:foo.hin])
old mode 100755 (executable)
new mode 100644 (file)
index 2b06151..17c9a41
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 1996-2012 Free Software Foundation, Inc.
+# Copyright (C) 1996-2017 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
@@ -15,9 +15,9 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 # Make sure ":" works with files automake generates.
-# See also sister test 'colon3.test'.
+# See also sister test 'colon3.sh'.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat > configure.ac <<END
 AC_INIT([$me], [1.0])
@@ -43,7 +43,7 @@ $FGREP 'zardoz.am' zardoz.in
 $FGREP 'zardoz.in' zardoz.in
 sed -e 's|zardoz\.am|zrdz.am|g' \
     -e 's|zardoz\.in|zrdz.in|g' \
-  <zardoz.in | $FGREP 'zardoz' && Exit 1
+  <zardoz.in | $FGREP 'zardoz' && exit 1
 
 # The configure-generated Makefile should depend on zardoz.in, two.in and
 # three.in.  The automake-generated zardoz.in should depend on zardoz.am.
@@ -58,7 +58,7 @@ test -f Makefile # Sanity check.
 $MAKE dummy
 # Again, make sure that the generated Makefile do not unduly
 # refer to 'zardoz' .
-$MAKE -n zardoz && Exit 1
+$MAKE -n zardoz && exit 1
 
 $sleep
 cat >> zardoz.am <<END
old mode 100755 (executable)
new mode 100644 (file)
index 5d7b3b2..fcad752
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 1996-2012 Free Software Foundation, Inc.
+# Copyright (C) 1996-2017 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
@@ -16,9 +16,9 @@
 
 # Make sure ":" works with files automake generates.
 # This test is for multiple ":"s.
-# See also sister test 'colon2.test'.
+# See also sister test 'colon2.sh'.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat > configure.ac <<END
 AC_INIT([$me], [1.0])
@@ -47,7 +47,7 @@ $FGREP 'zardoz.am' zardoz.in
 $FGREP 'zardoz.in' zardoz.in
 sed -e 's|zardoz\.am|zrdz.am|g' \
     -e 's|zardoz\.in|zrdz.in|g' \
-  <zardoz.in | $FGREP 'zardoz' && Exit 1
+  <zardoz.in | $FGREP 'zardoz' && exit 1
 
 # The configure-generated Makefile should depend on zardoz.in, two.in and
 # three.in.  The automake-generated zardoz.in should depend on zardoz.am.
@@ -64,7 +64,7 @@ test -f Makefile # Sanity check.
 $MAKE dummy
 # Again, make sure that the generated Makefile do not unduly
 # refer to 'zardoz' .
-$MAKE -n zardoz && Exit 1
+$MAKE -n zardoz && exit 1
 
 $sleep
 cat >> zardoz.am <<END
old mode 100755 (executable)
new mode 100644 (file)
index 6dad3ab..f296346
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 1998-2012 Free Software Foundation, Inc.
+# Copyright (C) 1998-2017 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
@@ -18,7 +18,7 @@
 # rebuild rules.
 # Test from Maciej W. Rozycki.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac <<END
 AC_CONFIG_FILES([zardoz:one:two:three])
@@ -35,5 +35,5 @@ $AUTOMAKE
 
 # The rule should regenerate the file "zardoz", not a meaningless
 # file "'zardoz:one:two".
-$FGREP 'zardoz:one:two' Makefile.in && Exit 1
-Exit 0
+$FGREP 'zardoz:one:two' Makefile.in && exit 1
+exit 0
old mode 100755 (executable)
new mode 100644 (file)
index 5a0ef37..4ffa820
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 1998-2012 Free Software Foundation, Inc.
+# Copyright (C) 1998-2017 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
@@ -16,7 +16,7 @@
 
 # Another multi-":" test, this time from Doug Evans.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat > configure.ac <<END
 AC_INIT([$me], [1.0])
@@ -50,8 +50,8 @@ $AUTOMAKE
 
 ./configure
 
-grep '=GrEpMe_am=' Makefile && Exit 1  # Sanity check.
-grep '=GrEpMe_dep=' Makefile && Exit 1 # Likewise.
+grep '=GrEpMe_am=' Makefile && exit 1  # Sanity check.
+grep '=GrEpMe_dep=' Makefile && exit 1 # Likewise.
 
 $MAKE test-distcommon
 $MAKE test-distdir
old mode 100755 (executable)
new mode 100644 (file)
index 9f14d2a..51d6819
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 1998-2012 Free Software Foundation, Inc.
+# Copyright (C) 1998-2017 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
@@ -16,7 +16,7 @@
 
 # Yet another multi-":" test, this time from Ken Pizzini.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat > configure.ac <<END
 AC_INIT([$me], [1.0])
@@ -37,7 +37,7 @@ $AUTOMAKE
 # These are older "grepping checks", kept mostly for backward-compatibility.
 # They might (unlikely, but possibly) require updating when automake
 # internals are changed.  Just relax or remove if they become too fragile.
-$EGREP 'Makefile:.*(demo|version)' demo/Makefile.in && Exit 1
+$EGREP 'Makefile:.*(demo|version)' demo/Makefile.in && exit 1
 grep 'version\.good:.*version\.gin' demo/Makefile.in
 
 $AUTOCONF
@@ -74,7 +74,7 @@ for vpath in : false; do
   # Makefile should not depend on version.good.
   rm -f version.good
   $MAKE Makefile
-  test ! -r version.good
+  test ! -e version.good
 
   # version.good should be rebuilt from version.gin.
   $MAKE version.good
@@ -83,12 +83,11 @@ for vpath in : false; do
   # Makefile should not depend on version.gin.
   rm -f ../$srcdir/demo/version.gin
   $MAKE Makefile
-  test ! -r ../$srcdir/demo/version.gin # Sanity check.
+  test ! -e ../$srcdir/demo/version.gin # Sanity check.
 
   # version.good should depend on version.gin.
   rm -f version.good
-  $MAKE version.good >output 2>&1 && { cat output; Exit 1; }
-  cat output
+  run_make -M -e FAIL version.good
   # Try to verify that we errored out for the right reason.
   $FGREP version.gin output
 
old mode 100755 (executable)
new mode 100644 (file)
index 1b84d80..1adf681
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 1998-2012 Free Software Foundation, Inc.
+# Copyright (C) 1998-2017 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
@@ -17,7 +17,7 @@
 # Another test for a failing ":" in AC_OUTPUT.
 # Report from Maciej Stachowiak.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat > configure.ac << 'END'
 AC_INIT([colon7], [1.0])
@@ -44,7 +44,7 @@ $ACLOCAL
 $AUTOMAKE
 
 # Should nowhere refer to 'bar.in'.
-$FGREP 'bar.in' Makefile.in subdir/Makefile.in && Exit 1
+$FGREP 'bar.in' Makefile.in subdir/Makefile.in && exit 1
 
 $AUTOCONF
 ./configure
old mode 100755 (executable)
new mode 100644 (file)
similarity index 64%
rename from t/version.sh
rename to t/color-tests-opt.sh
index 431eb0d..e930ae2
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 1996-2012 Free Software Foundation, Inc.
+# Copyright (C) 2007-2017 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 to make sure [...] is ok in version number.  Report from Jim
-# Meyering.
+# Check that the 'color-tests' option, now active by default, is
+# nonetheless still silently accepted, for backward compatibility.
 
-. ./defs || Exit 1
+. test-init.sh
 
-cat > configure.ac << 'END'
-AC_INIT
-AM_INIT_AUTOMAKE([sh-utils], [1.12o])
+cat >configure.ac <<END
+AC_INIT([$me], [1.0])
+AM_INIT_AUTOMAKE([color-tests])
 AC_CONFIG_FILES([Makefile])
 AC_OUTPUT
 END
 
-: > Makefile.am
+cat >Makefile.am <<END
+AUTOMAKE_OPTIONS = color-tests
+TESTS = foo.test
+END
 
-# Files required by Gnits.
-: > INSTALL
-: > NEWS
-: > README
-: > COPYING
-: > AUTHORS
-: > ChangeLog
-: > THANKS
+: > test-driver
 
 $ACLOCAL
-$AUTOMAKE --gnits -Wno-obsolete
+$AUTOMAKE
+
+:
old mode 100755 (executable)
new mode 100644 (file)
similarity index 52%
rename from t/color-w.sh
rename to t/color-tests-w.sh
index 387a433..9f3a725
@@ -1,14 +1,15 @@
 #! /bin/sh
 # This file has been automatically generated.  DO NOT EDIT BY HAND!
-. ./defs-static || exit '99';
+. test-lib.sh
+
 am_serial_tests=yes
 # 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/t/color.sh"; then
-    echo "$0: will source $dir/t/color.sh"
-    . "$dir/t/color.sh"; exit "$?"
+  if test -f "$dir/t/color-tests.sh"; then
+    echo "$0: will source $dir/t/color-tests.sh"
+    . "$dir/t/color-tests.sh"; exit $?
   fi
 done
-echo "$0: cannot find wrapped test 't/color.sh'" >&2
-exit '99'
+echo "$0: cannot find wrapped test 't/color-tests.sh'" >&2
+exit 99
old mode 100755 (executable)
new mode 100644 (file)
similarity index 79%
rename from t/color.sh
rename to t/color-tests.sh
index 6f5c902..34d41d3
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2007-2012 Free Software Foundation, Inc.
+# Copyright (C) 2007-2017 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 # Test Automake TESTS color output, by forcing it.
-# Keep this in sync with the sister test 'color2.test'.
+# Keep this in sync with the sister test 'color-tests2.sh'.
 
+required='grep-nonprint'
 # For gen-testsuite-part: ==> try-with-serial-tests <==
-. ./defs || Exit 1
+. test-init.sh
 
-esc='\e'
 # Escape '[' for grep, below.
 red="$esc\[0;31m"
 grn="$esc\[0;32m"
@@ -29,20 +29,11 @@ blu="$esc\[1;34m"
 mgn="$esc\[0;35m"
 std="$esc\[m"
 
-# Check that grep can parse nonprinting characters.
-# BSD 'grep' works from a pipe, but not a seekable file.
-# GNU or BSD 'grep -a' works on files, but is not portable.
-case `echo "$std" | grep .` in
-  "$std") ;;
-  *) skip_ "grep can't parse nonprinting characters";;
-esac
-
 cat >>configure.ac <<END
 AC_OUTPUT
 END
 
 cat >Makefile.am <<'END'
-AUTOMAKE_OPTIONS = color-tests
 TESTS = $(check_SCRIPTS)
 check_SCRIPTS = pass fail skip xpass xfail error
 XFAIL_TESTS = xpass xfail
@@ -78,7 +69,8 @@ $AUTOMAKE --add-missing
 
 test_color ()
 {
-  # Not a useless use of cat; see above comments about grep.
+  # Not a useless use of cat; see above comments "grep-nonprinting"
+  # requirement in 'test-init.sh'.
   cat stdout | grep "^${grn}PASS${std}: .*pass"
   cat stdout | grep "^${red}FAIL${std}: .*fail"
   cat stdout | grep "^${blu}SKIP${std}: .*skip"
@@ -106,7 +98,8 @@ test_no_color ()
     # not unduly colorized.
     (
       set +e # In case some grepped regex below isn't matched.
-      # Not a useless use of cat; see above comments about grep.
+      # 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.*:"
@@ -119,10 +112,10 @@ test_no_color ()
       cat stdout | grep '===='
       cat stdout | grep '[Ss]ee .*test-suite\.log'
       cat stdout | grep '[Tt]estsuite summary'
-    ) | grep "$esc" && Exit 1
+    ) | grep "$esc" && exit 1
     : For shells with broken 'set -e'
   else
-    cat stdout | grep "$esc" && Exit 1
+    cat stdout | grep "$esc" && exit 1
     : For shells with broken 'set -e'
   fi
 }
@@ -141,13 +134,12 @@ 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 \
-    && { cat stdout; Exit 1; }
-  cat stdout
+  AM_COLOR_TESTS=always; export AM_COLOR_TESTS
+  run_make -e FAIL -O TERM=dumb check
   test_color
 
-  TERM=ansi $MAKE -e check >stdout && { cat stdout; Exit 1; }
-  cat stdout
+  unset AM_COLOR_TESTS
+  run_make -e FAIL -O TERM=ansi check
   test_no_color
 
   $MAKE distclean
old mode 100755 (executable)
new mode 100644 (file)
similarity index 51%
rename from t/check3-w.sh
rename to t/color-tests2-w.sh
index c8ee701..fe2fe81
@@ -1,14 +1,15 @@
 #! /bin/sh
 # This file has been automatically generated.  DO NOT EDIT BY HAND!
-. ./defs-static || exit '99';
+. test-lib.sh
+
 am_serial_tests=yes
 # 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/t/check3.sh"; then
-    echo "$0: will source $dir/t/check3.sh"
-    . "$dir/t/check3.sh"; exit "$?"
+  if test -f "$dir/t/color-tests2.sh"; then
+    echo "$0: will source $dir/t/color-tests2.sh"
+    . "$dir/t/color-tests2.sh"; exit $?
   fi
 done
-echo "$0: cannot find wrapped test 't/check3.sh'" >&2
-exit '99'
+echo "$0: cannot find wrapped test 't/color-tests2.sh'" >&2
+exit 99
old mode 100755 (executable)
new mode 100644 (file)
similarity index 78%
rename from t/color2.sh
rename to t/color-tests2.sh
index b073d5c..f24e184
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2007-2012 Free Software Foundation, Inc.
+# Copyright (C) 2007-2017 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 # Test Automake TESTS color output, using the expect(1) program.
-# Keep this in sync with the sister test 'color.test'.
+# Keep this in sync with the sister test 'color-tests.sh'.
 
+required='grep-nonprint'
 # For gen-testsuite-part: ==> try-with-serial-tests <==
-. ./defs || Exit 1
+. test-init.sh
 
-esc='\e'
 # Escape '[' for grep, below.
 red="$esc\[0;31m"
 grn="$esc\[0;32m"
@@ -29,17 +29,8 @@ blu="$esc\[1;34m"
 mgn="$esc\[0;35m"
 std="$esc\[m"
 
-# Check that grep can parse nonprinting characters.
-# BSD 'grep' works from a pipe, but not a seekable file.
-# GNU or BSD 'grep -a' works on files, but is not portable.
-case `echo "$std" | grep .` in
-  "$std") ;;
-  *) skip_ "grep can't parse nonprinting characters";;
-esac
-
 # 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
@@ -67,12 +58,14 @@ rm -f expect-check Makefile
 
 # Do the tests.
 
-cat >>configure.ac <<END
+cat >>configure.ac << 'END'
+if $testsuite_colorized; then :; else
+  AC_SUBST([AM_COLOR_TESTS], [no])
+fi
 AC_OUTPUT
 END
 
 cat >Makefile.am <<'END'
-AUTOMAKE_OPTIONS = color-tests
 TESTS = $(check_SCRIPTS)
 check_SCRIPTS = pass fail skip xpass xfail error
 XFAIL_TESTS = xpass xfail
@@ -108,7 +101,8 @@ $AUTOMAKE --add-missing
 
 test_color ()
 {
-  # Not a useless use of cat; see above comments about grep.
+  # Not a useless use of cat; see above comments "grep-nonprinting"
+  # requirement in 'test-init.sh'.
   cat stdout | grep "^${grn}PASS${std}: .*pass"
   cat stdout | grep "^${red}FAIL${std}: .*fail"
   cat stdout | grep "^${blu}SKIP${std}: .*skip"
@@ -136,7 +130,8 @@ test_no_color ()
     # not unduly colorized.
     (
       set +e # In case some grepped regex below isn't matched.
-      # Not a useless use of cat; see above comments about grep.
+      # 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.*:"
@@ -149,14 +144,21 @@ test_no_color ()
       cat stdout | grep '===='
       cat stdout | grep '[Ss]ee .*test-suite\.log'
       cat stdout | grep '[Tt]estsuite summary'
-    ) | grep "$esc" && Exit 1
+    ) | grep "$esc" && exit 1
     : For shells with broken 'set -e'
   else
-    cat stdout | grep "$esc" && Exit 1
+    cat stdout | grep "$esc" && exit 1
     : For shells with broken 'set -e'
   fi
 }
 
+our_make ()
+{
+  set "MAKE=$MAKE" ${1+"$@"}
+  env "$@" expect -f $srcdir/expect-make >stdout || { cat stdout; exit 1; }
+  cat stdout
+}
+
 cat >expect-make <<'END'
 eval spawn $env(MAKE) -e check
 expect eof
@@ -174,21 +176,23 @@ for vpath in false :; do
 
   $srcdir/configure
 
-  TERM=ansi MAKE=$MAKE expect -f $srcdir/expect-make >stdout \
-    || { cat stdout; Exit 1; }
-  cat stdout
+  our_make TERM=ansi
   test_color
 
-  TERM=dumb MAKE=$MAKE expect -f $srcdir/expect-make >stdout \
-    || { cat stdout; Exit 1; }
-  cat stdout
+  our_make TERM=dumb
   test_no_color
 
-  AM_COLOR_TESTS=no MAKE=$MAKE expect -f $srcdir/expect-make >stdout \
-    || { cat stdout; Exit 1; }
-  cat stdout
+  our_make AM_COLOR_TESTS=no
+  test_no_color
+
+  $srcdir/configure testsuite_colorized=false
+
+  our_make TERM=ansi
   test_no_color
 
+  our_make TERM=ansi MAKE="env AM_COLOR_TESTS=always $MAKE"
+  test_color
+
   $MAKE distclean
   cd $srcdir
 
diff --git a/t/color2-w.sh b/t/color2-w.sh
deleted file mode 100755 (executable)
index 8f0b213..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-#! /bin/sh
-# This file has been automatically generated.  DO NOT EDIT BY HAND!
-. ./defs-static || exit '99';
-am_serial_tests=yes
-# 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/t/color2.sh"; then
-    echo "$0: will source $dir/t/color2.sh"
-    . "$dir/t/color2.sh"; exit "$?"
-  fi
-done
-echo "$0: cannot find wrapped test 't/color2.sh'" >&2
-exit '99'
old mode 100755 (executable)
new mode 100644 (file)
index d0c246a..205ba48
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2005-2012 Free Software Foundation, Inc.
+# Copyright (C) 2005-2017 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
@@ -17,7 +17,7 @@
 # Make sure comments following trailing backslashes are diagnosed.
 # Report from Harald Dunkel.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat > Makefile.am << 'END'
 SUBDIRS = foo \
old mode 100755 (executable)
new mode 100644 (file)
index d4b264a..41a6a27
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2005-2012 Free Software Foundation, Inc.
+# Copyright (C) 2005-2017 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
@@ -18,7 +18,7 @@
 # comments following a trailing backslash, even when the combination
 # follows a variable assignment that is preceded by a comment.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat > Makefile.am << 'END'
 # initial comment
old mode 100755 (executable)
new mode 100644 (file)
similarity index 84%
rename from t/block.sh
rename to t/comment-block.sh
index a6e9e32..34c46db
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 1996-2012 Free Software Foundation, Inc.
+# Copyright (C) 1996-2017 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
@@ -17,7 +17,7 @@
 # Make sure block comments are not double-spaced.
 # Report from François Pinard.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat > Makefile.am << 'END'
 #START
@@ -30,5 +30,5 @@ END
 $ACLOCAL
 $AUTOMAKE
 
-(sed -e '/^#START/,/^#END/ !d' Makefile.in | grep -v '^#') && Exit 1
-Exit 0
+(sed -e '/^#START/,/^#END/ !d' Makefile.in | grep -v '^#') && exit 1
+exit 0
old mode 100755 (executable)
new mode 100644 (file)
index 6ca98ba..412cc93
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 1996-2012 Free Software Foundation, Inc.
+# Copyright (C) 1996-2017 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
@@ -17,7 +17,7 @@
 # Make sure that '#' as start of word in AUTOMAKE_OPTIONS means
 # comment.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat > Makefile.am << 'END'
 AUTOMAKE_OPTIONS = #no such option
old mode 100755 (executable)
new mode 100644 (file)
index a63075c..129396e
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 1996-2012 Free Software Foundation, Inc.
+# Copyright (C) 1996-2017 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
@@ -17,7 +17,7 @@
 # Make sure comment recognition works in PROGRAMS.  Report from Mark
 # Galassi.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_CC
@@ -30,5 +30,5 @@ END
 $ACLOCAL
 $AUTOMAKE
 
-grep '^image_proc' Makefile.in && Exit 1
-Exit 0
+grep '^image_proc' Makefile.in && exit 1
+exit 0
old mode 100755 (executable)
new mode 100644 (file)
index 8f80945..3f0e023
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2001-2012 Free Software Foundation, Inc.
+# Copyright (C) 2001-2017 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
@@ -19,7 +19,7 @@
 # shell, which in turn can't find '#' as a command.
 # Sigh.  Some vendors must be destroyed.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat > Makefile.am << 'END'
 install-data-local:
old mode 100755 (executable)
new mode 100644 (file)
index 42e7bf9..cf7cc5c
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2002-2012 Free Software Foundation, Inc.
+# Copyright (C) 2002-2017 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
@@ -16,7 +16,7 @@
 
 # Make sure commented variables are output near their comments.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac <<'EOF'
 AC_OUTPUT
@@ -31,9 +31,11 @@ EOF
 
 $ACLOCAL
 $AUTOMAKE
-# UnIqUe_COPYRIGHT_BOILERPLATE should appear near the top of the file
-test `sed -n -e '1,/UnIqUe_COPYRIGHT_BOILERPLATE/p' Makefile.in \
-      | wc -l` -le 30
+# UnIqUe_COPYRIGHT_BOILERPLATE should appear near the top of the file.
+test $(sed -n -e '1,/UnIqUe_COPYRIGHT_BOILERPLATE/p' \
+                 Makefile.in | wc -l) -le 30
 # UnIqUe_MUMBLE_COMMENT should appear right before the mumble declaration.
-test `sed -n -e '/UnIqUe_MUMBLE_COMMENT/,/UnIqUe_MUMBLE_VALUE/p' Makefile.in \
-      | wc -l` -eq 2
+test $(sed -n -e '/UnIqUe_MUMBLE_COMMENT/,/UnIqUe_MUMBLE_VALUE/p' \
+                 Makefile.in | wc -l) -eq 2
+
+:
old mode 100755 (executable)
new mode 100644 (file)
index 0c2a4d6..bcc8218
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2002-2012 Free Software Foundation, Inc.
+# Copyright (C) 2002-2017 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
@@ -17,7 +17,7 @@
 # Test for PR/280.
 # (Automake should complain about trailing backslashes in comments.)
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac <<'EOF'
 AC_OUTPUT
old mode 100755 (executable)
new mode 100644 (file)
index 9fd8d10..2593a2b
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2002-2012 Free Software Foundation, Inc.
+# Copyright (C) 2002-2017 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
@@ -18,7 +18,7 @@
 # Automake 1.6.1 seems to have a problem parsing comments that use
 # '\' to span multiple lines.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac <<'EOF'
 AC_OUTPUT
old mode 100755 (executable)
new mode 100644 (file)
index 5637fb7..b7bd998
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2002-2012 Free Software Foundation, Inc.
+# Copyright (C) 2002-2017 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
@@ -17,7 +17,7 @@
 # Make sure comment for conditional variables are output near the
 # corresponding conditional definitions.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac <<'EOF'
 AM_CONDITIONAL([COND], [true])
@@ -36,9 +36,11 @@ EOF
 $ACLOCAL
 $AUTOMAKE
 
+$FGREP '@COND' Makefile.in # For debugging, mostly.
+
 # The VAR definition appears once for each condition.
-test `grep '@COND_TRUE@VAR' Makefile.in | wc -l` = 1
-test `grep '@COND_FALSE@VAR' Makefile.in | wc -l` = 1
+test $(grep -c '@COND_TRUE@VAR' Makefile.in) = 1
+test $(grep -c '@COND_FALSE@VAR' Makefile.in) = 1
 
 # Make sure the right definition follows each comment.
 sed -n '/^#.*VAR.*COND_TRUE/ {
@@ -51,3 +53,5 @@ sed -n '/^#.*VAR.*COND_FALSE/ {
           p
         }' Makefile.in |
   grep '@COND_FALSE@VAR = bar'
+
+:
old mode 100755 (executable)
new mode 100644 (file)
index 3ed31e7..eac61b0
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2004-2012 Free Software Foundation, Inc.
+# Copyright (C) 2004-2017 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
@@ -17,7 +17,7 @@
 # Make sure += does not append to a comment.
 # Report from Stepan Kasal.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac <<'EOF'
 AM_CONDITIONAL([COND1], [true])
old mode 100755 (executable)
new mode 100644 (file)
index a75fafc..72eff4e
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2005-2012 Free Software Foundation, Inc.
+# Copyright (C) 2005-2017 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
@@ -17,7 +17,7 @@
 # Make sure ##-comments are ignored in variable definitions.
 # Report from Julien Sopena.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat > Makefile.am << 'EOF'
 TESTS = \
@@ -48,6 +48,6 @@ sed -n -e '/^TESTS =.*\\$/ {
    }' -e '/^TESTS =/ p' Makefile.in > tests
 
 grep '3\.test' tests
-grep '##' tests && Exit 1
-grep '4\.test' tests && Exit 1
+grep '##' tests && exit 1
+grep '4\.test' tests && exit 1
 grep '5\.test' tests
old mode 100755 (executable)
new mode 100644 (file)
index 5c01d76..a8ec739
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2011-2012 Free Software Foundation, Inc.
+# Copyright (C) 2011-2017 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
@@ -17,7 +17,7 @@
 # Make sure Automake ignores in-line comments when using variables,
 # but preserve them in the output.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac <<'END'
 AC_OUTPUT
old mode 100755 (executable)
new mode 100644 (file)
index 86ce9ef..b1d0476
@@ -1,14 +1,15 @@
 #! /bin/sh
 # This file has been automatically generated.  DO NOT EDIT BY HAND!
-. ./defs-static || exit '99';
+. test-lib.sh
+
 am_test_prefer_config_shell=yes
 # 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/t/compile.sh"; then
     echo "$0: will source $dir/t/compile.sh"
-    . "$dir/t/compile.sh"; exit "$?"
+    . "$dir/t/compile.sh"; exit $?
   fi
 done
 echo "$0: cannot find wrapped test 't/compile.sh'" >&2
-exit '99'
+exit 99
old mode 100755 (executable)
new mode 100644 (file)
index 638a0d7..ec10261
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2004-2012 Free Software Foundation, Inc.
+# Copyright (C) 2004-2017 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
@@ -17,7 +17,7 @@
 # Make sure 'compile' preserves spaces in its arguments.
 
 am_create_testdir=empty
-. ./defs || Exit 1
+. test-init.sh
 
 get_shell_script compile
 
@@ -33,13 +33,13 @@ rm -f 'a  c' ./-o a.o a.c
 
 ./compile touch a.o -- -o 'a  c.o' a.c
 test -f 'a  c.o'
-test ! -f ./-o
-test ! -f a.o
+test ! -e ./-o
+test ! -e a.o
 test -f a.c
 
 # Make sure 'compile' works for .obj too.
 ./compile touch a.obj -- -o ac.obj a.c
-test ! -f a.obj
+test ! -e a.obj
 test ac.obj
 
 :
old mode 100755 (executable)
new mode 100644 (file)
index aecb103..5137636
@@ -1,14 +1,15 @@
 #! /bin/sh
 # This file has been automatically generated.  DO NOT EDIT BY HAND!
-. ./defs-static || exit '99';
+. test-lib.sh
+
 am_test_prefer_config_shell=yes
 # 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/t/compile2.sh"; then
     echo "$0: will source $dir/t/compile2.sh"
-    . "$dir/t/compile2.sh"; exit "$?"
+    . "$dir/t/compile2.sh"; exit $?
   fi
 done
 echo "$0: cannot find wrapped test 't/compile2.sh'" >&2
-exit '99'
+exit 99
old mode 100755 (executable)
new mode 100644 (file)
index f808607..49eab5e
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2009-2012 Free Software Foundation, Inc.
+# Copyright (C) 2009-2017 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
@@ -17,7 +17,7 @@
 # Make sure 'compile' deals correctly with Windows-style paths.
 
 am_create_testdir=empty
-. ./defs || Exit 1
+. test-init.sh
 
 get_shell_script compile
 
old mode 100755 (executable)
new mode 100644 (file)
index f740c3a..6ec0ed0
@@ -1,14 +1,15 @@
 #! /bin/sh
 # This file has been automatically generated.  DO NOT EDIT BY HAND!
-. ./defs-static || exit '99';
+. test-lib.sh
+
 am_test_prefer_config_shell=yes
 # 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/t/compile3.sh"; then
     echo "$0: will source $dir/t/compile3.sh"
-    . "$dir/t/compile3.sh"; exit "$?"
+    . "$dir/t/compile3.sh"; exit $?
   fi
 done
 echo "$0: cannot find wrapped test 't/compile3.sh'" >&2
-exit '99'
+exit 99
old mode 100755 (executable)
new mode 100644 (file)
index 009de70..d87953f
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2010-2012 Free Software Foundation, Inc.
+# Copyright (C) 2010-2017 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
@@ -18,7 +18,7 @@
 
 am_create_testdir=empty
 required=xsi-lib-shell
-. ./defs || Exit 1
+. test-init.sh
 
 get_shell_script compile
 
@@ -34,25 +34,29 @@ chmod +x ./cl
 # -l and -L options and their respective arguments.  Traditionally,
 # this should work also without a space.  Try both usages.
 for sp in '' ' '; do
+
   # Check if compile handles "-o foo", -I, -l, -L, -Xlinker -Wl,
-  opts=`LIB= ./compile ./cl foo.c -o foo -l${sp}bar -L${sp}gazonk -I${sp}baz -Xlinker foobar -Wl,-foo,bar`
-  test x"$opts" = x"foo.c -Fefoo bar.lib -Ibaz -link -LIBPATH:gazonk foobar -foo bar"
+  opts=$(LIB= ./compile ./cl foo.c -o foo -l${sp}bar -L${sp}gazonk \
+                             -I${sp}baz -Xlinker foobar -Wl,-foo,bar)
+  test x"$opts" = \
+       x"foo.c -Fefoo bar.lib -Ibaz -link -LIBPATH:gazonk foobar -foo bar"
 
   # Check if compile handles "-o foo.obj"
-  opts=`./compile ./cl -c foo.c -o foo.obj -I${sp}baz`
+  opts=$(./compile ./cl -c foo.c -o foo.obj -I${sp}baz)
   test x"$opts" = x"-c foo.c -Fofoo.obj -Ibaz"
 
   # Check if compile handles "-o foo.o"
-  opts=`./compile ./cl -c foo.c -o foo.o -I${sp}baz`
+  opts=$(./compile ./cl -c foo.c -o foo.o -I${sp}baz)
   test x"$opts" = x"-c foo.c -Fofoo.o -Ibaz"
 
   # Check if compile handles "foo.cc" as C++.
-  opts=`./compile ./cl -c foo.cc -o foo.o -I${sp}baz`
+  opts=$(./compile ./cl -c foo.cc -o foo.o -I${sp}baz)
   test x"$opts" = x"-c -Tpfoo.cc -Fofoo.o -Ibaz"
 
   # Check if compile clears the "eat" variable properly.
-  opts=`eat=1 ./compile ./cl -c foo.c -o foo.obj -I${sp}baz`
+  opts=$(eat=1 ./compile ./cl -c foo.c -o foo.obj -I${sp}baz)
   test x"$opts" = x"-c foo.c -Fofoo.obj -Ibaz"
+
 done
 
 :
old mode 100755 (executable)
new mode 100644 (file)
index 88b0155..6f71b4c
@@ -1,14 +1,15 @@
 #! /bin/sh
 # This file has been automatically generated.  DO NOT EDIT BY HAND!
-. ./defs-static || exit '99';
+. test-lib.sh
+
 am_test_prefer_config_shell=yes
 # 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/t/compile4.sh"; then
     echo "$0: will source $dir/t/compile4.sh"
-    . "$dir/t/compile4.sh"; exit "$?"
+    . "$dir/t/compile4.sh"; exit $?
   fi
 done
 echo "$0: cannot find wrapped test 't/compile4.sh'" >&2
-exit '99'
+exit 99
old mode 100755 (executable)
new mode 100644 (file)
index bb9f671..d8020d6
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2010-2012 Free Software Foundation, Inc.
+# Copyright (C) 2010-2017 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
 # with respect to absolute paths.
 
 required='cl'
-. ./defs || Exit 1
+. test-init.sh
 
 get_shell_script compile
 
 mkdir sub
 
 cat >sub/foo.c <<'EOF'
-int
-foo ()
+int foo (void)
 {
   return 0;
 }
 EOF
 
 cat >main.c <<'EOF'
-extern int foo ();
-int
-main ()
+extern int foo (void);
+int main (void)
 {
   return foo ();
 }
 EOF
 
-absfoodir=`pwd`/sub
-absmainc=`pwd`/main.c
-absmainobj=`pwd`/main.obj
+cwd=$(pwd) || fatal_ "cannot get current directory"
+absfoodir=$cwd/sub
+absmainc=$cwd/main.c
+absmainobj=$cwd/main.obj
 
 cat >> configure.ac << 'END'
 AC_PROG_CC
-AM_PROG_CC_C_O
 AM_PROG_AR
 AC_PROG_RANLIB
 AC_CONFIG_FILES([sub/Makefile])
@@ -71,22 +69,13 @@ $MAKE
 
 ./compile cl $CPPFLAGS $CFLAGS -c -o "$absmainobj" "$absmainc"
 
-# cl expects archives to be named foo.lib, not libfoo.a so
-# make a simple copy here if needed. This is a severe case
-# of badness, but ignore that since this is not what is
-# being tested here...
-if test -f sub/libfoo.a; then
-  cp sub/libfoo.a sub/foo.lib
-fi
-
 # POSIX mandates that the compiler accepts a space between the -I,
 # -l and -L options and their respective arguments.  Traditionally,
 # this should work also without a space.  Try both usages.
 for sp in '' ' '; do
   rm -f main
-
-  ./compile cl $CFLAGS $LDFLAGS -L${sp}"$absfoodir" "$absmainobj" -o main -l${sp}foo
-
+  ./compile cl $CFLAGS $LDFLAGS -L${sp}"$absfoodir" "$absmainobj" \
+               -o main -l${sp}foo
   ./main
 done
 
old mode 100755 (executable)
new mode 100644 (file)
index 92f0f1f..71a955a
@@ -1,14 +1,15 @@
 #! /bin/sh
 # This file has been automatically generated.  DO NOT EDIT BY HAND!
-. ./defs-static || exit '99';
+. test-lib.sh
+
 am_test_prefer_config_shell=yes
 # 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/t/compile5.sh"; then
     echo "$0: will source $dir/t/compile5.sh"
-    . "$dir/t/compile5.sh"; exit "$?"
+    . "$dir/t/compile5.sh"; exit $?
   fi
 done
 echo "$0: cannot find wrapped test 't/compile5.sh'" >&2
-exit '99'
+exit 99
old mode 100755 (executable)
new mode 100644 (file)
index 02afca3..ada706b
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2010-2012 Free Software Foundation, Inc.
+# Copyright (C) 2010-2017 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
@@ -17,7 +17,7 @@
 # Make sure the file name translation in the 'compile' script works
 # correctly
 
-. ./defs || Exit 1
+. test-init.sh
 
 get_shell_script compile
 
@@ -62,7 +62,7 @@ $AUTOMAKE -a
 ./configure
 . ./check_host
 
-pwd=`pwd`
+cwd=$(pwd) || fatal_ "cannot get current directory"
 
 # POSIX mandates that the compiler accepts a space between the -I,
 # -l and -L options and their respective arguments.  Traditionally,
@@ -70,15 +70,10 @@ pwd=`pwd`
 for sp in '' ' '; do
   # Check if "compile cl" transforms absolute file names to
   # host format (e.g /somewhere -> c:/msys/1.0/somewhere).
-
-  res=`./compile ./cl -L${sp}"$pwd" | sed -e 's/-link -LIBPATH://'`
-
+  res=$(./compile ./cl -L${sp}"$cwd" | sed -e 's/-link -LIBPATH://')
   case $res in
-    ?:[\\/]*)
-      ;;
-    *)
-      Exit 1
-      ;;
+    ?:[\\/]*) ;;
+    *) exit 1 ;;
   esac
 done
 
old mode 100755 (executable)
new mode 100644 (file)
index b4e0716..c7dfe42
@@ -1,14 +1,15 @@
 #! /bin/sh
 # This file has been automatically generated.  DO NOT EDIT BY HAND!
-. ./defs-static || exit '99';
+. test-lib.sh
+
 am_test_prefer_config_shell=yes
 # 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/t/compile6.sh"; then
     echo "$0: will source $dir/t/compile6.sh"
-    . "$dir/t/compile6.sh"; exit "$?"
+    . "$dir/t/compile6.sh"; exit $?
   fi
 done
 echo "$0: cannot find wrapped test 't/compile6.sh'" >&2
-exit '99'
+exit 99
old mode 100755 (executable)
new mode 100644 (file)
index 9db3373..6bcaf22
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2010-2012 Free Software Foundation, Inc.
+# Copyright (C) 2010-2017 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
@@ -18,7 +18,7 @@
 
 am_create_testdir=empty
 required=xsi-lib-shell
-. ./defs || Exit 1
+. test-init.sh
 
 get_shell_script compile
 
@@ -34,72 +34,82 @@ chmod +x ./cl
 # -l and -L options and their respective arguments.  Traditionally,
 # this should work also without a space.  Try both usages.
 for sp in '' ' '; do
+
   rm -rf lib lib2 syslib "sys  lib2"
 
   mkdir syslib
-  :> syslib/foo.lib
+  : > syslib/foo.lib
 
-  syslib=`pwd`/syslib
+  syslib=$(pwd)/syslib
   LIB=$syslib
   export LIB
 
   mkdir lib
-  :> lib/bar.lib
-  :> lib/bar.dll.lib
+  : > lib/bar.lib
+  : > lib/bar.dll.lib
+  : > lib/libbar.a
+  : > lib/libbaz.a
 
   # Check if compile library search correctly
-  opts=`./compile ./cl foo.c -o foo -L${sp}lib -l${sp}bar -l${sp}foo`
+  opts=$(./compile ./cl foo.c -o foo -L${sp}lib -l${sp}bar -l${sp}foo)
   test x"$opts" = x"foo.c -Fefoo lib/bar.dll.lib $syslib/foo.lib -link -LIBPATH:lib"
 
   # Check if -static makes compile avoid bar.dll.lib
-  opts=`./compile ./cl foo.c -o foo -L${sp}lib -static -l${sp}bar -l${sp}foo`
+  opts=$(./compile ./cl foo.c -o foo -L${sp}lib -static -l${sp}bar -l${sp}foo)
   test x"$opts" = x"foo.c -Fefoo lib/bar.lib $syslib/foo.lib -link -LIBPATH:lib"
 
-  :> syslib/bar.lib
-  :> syslib/bar.dll.lib
+  : > syslib/bar.lib
+  : > syslib/bar.dll.lib
+  : > syslib/libbar.a
 
   # Check if compile finds bar.dll.lib in syslib
-  opts=`./compile ./cl foo.c -o foo -l${sp}bar -l${sp}foo`
+  opts=$(./compile ./cl foo.c -o foo -l${sp}bar -l${sp}foo)
   test x"$opts" = x"foo.c -Fefoo $syslib/bar.dll.lib $syslib/foo.lib"
 
   # Check if compile prefers -L over $LIB
-  opts=`./compile ./cl foo.c -o foo -L${sp}lib -l${sp}bar -l${sp}foo`
+  opts=$(./compile ./cl foo.c -o foo -L${sp}lib -l${sp}bar -l${sp}foo)
   test x"$opts" = x"foo.c -Fefoo lib/bar.dll.lib $syslib/foo.lib -link -LIBPATH:lib"
 
+  # Check if compile falls back to finding classic libname.a style libraries
+  # when name.lib or name.dll.lib isn't available.
+  opts=$(./compile ./cl foo.c -o foo -L${sp}lib -l${sp}baz)
+  test x"$opts" = x"foo.c -Fefoo lib/libbaz.a -link -LIBPATH:lib"
+
   mkdir lib2
-  :> lib2/bar.dll.lib
+  : > lib2/bar.dll.lib
 
   # Check if compile avoids bar.dll.lib in lib2 when -static
-  opts=`./compile ./cl foo.c -o foo -L${sp}lib2 -static -l${sp}bar -l${sp}foo`
+  opts=$(./compile ./cl foo.c -o foo -L${sp}lib2 -static -l${sp}bar -l${sp}foo)
   test x"$opts" = x"foo.c -Fefoo $syslib/bar.lib $syslib/foo.lib -link -LIBPATH:lib2"
 
   # Check if compile gets two different bar libraries when -static
   # is added in the middle
-  opts=`./compile ./cl foo.c -o foo -L${sp}lib2 -L${sp}lib -l${sp}bar -static -l${sp}bar`
+  opts=$(./compile ./cl foo.c -o foo -L${sp}lib2 -L${sp}lib -l${sp}bar -static -l${sp}bar)
   test x"$opts" = x"foo.c -Fefoo lib2/bar.dll.lib lib/bar.lib -link -LIBPATH:lib2 -LIBPATH:lib"
 
   # Check if compile gets the correct bar.dll.lib
-  opts=`./compile ./cl foo.c -o foo -L${sp}lib -L${sp}lib2 -l${sp}bar -l${sp}foo`
+  opts=$(./compile ./cl foo.c -o foo -L${sp}lib -L${sp}lib2 -l${sp}bar -l${sp}foo)
   test x"$opts" = x"foo.c -Fefoo lib/bar.dll.lib $syslib/foo.lib -link -LIBPATH:lib -LIBPATH:lib2"
 
   # Check if compile gets the correct bar.dll.lib
-  opts=`./compile ./cl foo.c -o foo -L${sp}lib2 -L${sp}lib -l${sp}bar -l${sp}foo`
+  opts=$(./compile ./cl foo.c -o foo -L${sp}lib2 -L${sp}lib -l${sp}bar -l${sp}foo)
   test x"$opts" = x"foo.c -Fefoo lib2/bar.dll.lib $syslib/foo.lib -link -LIBPATH:lib2 -LIBPATH:lib"
 
   mkdir "sys  lib2"
-  :> "sys  lib2/foo.dll.lib"
+  : > "sys  lib2/foo.dll.lib"
 
-  syslib2="`pwd`/sys  lib2"
+  syslib2="$(pwd)/sys  lib2"
   LIB="$syslib2;$LIB"
 
-  # Check if compile handles spaces in $LIB and that it prefers the order
+  # Check if compile handles spaces in $LIB and that it obeys the order
   # in a multi-component $LIB.
-  opts=`./compile ./cl foo.c -o foo -l${sp}foo`
+  opts=$(./compile ./cl foo.c -o foo -l${sp}foo)
   test x"$opts" = x"foo.c -Fefoo $syslib2/foo.dll.lib"
 
   # Check if compile handles the 2nd directory in a multi-component $LIB.
-  opts=`./compile ./cl foo.c -o foo -static -l${sp}foo`
+  opts=$(./compile ./cl foo.c -o foo -static -l${sp}foo)
   test x"$opts" = x"foo.c -Fefoo $syslib/foo.lib"
+
 done
 
 :
old mode 100755 (executable)
new mode 100644 (file)
similarity index 53%
rename from t/instsh3-w.sh
rename to t/compile7-w.sh
index ef0242f..9aa60d0
@@ -1,14 +1,15 @@
 #! /bin/sh
 # This file has been automatically generated.  DO NOT EDIT BY HAND!
-. ./defs-static || exit '99';
+. test-lib.sh
+
 am_test_prefer_config_shell=yes
 # 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/t/instsh3.sh"; then
-    echo "$0: will source $dir/t/instsh3.sh"
-    . "$dir/t/instsh3.sh"; exit "$?"
+  if test -f "$dir/t/compile7.sh"; then
+    echo "$0: will source $dir/t/compile7.sh"
+    . "$dir/t/compile7.sh"; exit $?
   fi
 done
-echo "$0: cannot find wrapped test 't/instsh3.sh'" >&2
-exit '99'
+echo "$0: cannot find wrapped test 't/compile7.sh'" >&2
+exit 99
diff --git a/t/compile7.sh b/t/compile7.sh
new file mode 100644 (file)
index 0000000..c6405d9
--- /dev/null
@@ -0,0 +1,82 @@
+#! /bin/sh
+# Copyright (C) 2010-2017 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 'compile' wraps the Intel C/C++ compiler (icl) correctly
+# with respect to absolute paths.
+
+required='icl'
+. test-init.sh
+
+get_shell_script compile
+
+mkdir sub
+
+cat >sub/foo.c <<'EOF'
+int foo (void)
+{
+  return 0;
+}
+EOF
+
+cat >main.c <<'EOF'
+extern int foo (void);
+int main (void)
+{
+  return foo ();
+}
+EOF
+
+cwd=$(pwd) || fatal_ "cannot get current directory"
+absfoodir=$cwd/sub
+absmainc=$cwd/main.c
+absmainobj=$cwd/main.obj
+
+cat >> configure.ac << 'END'
+AC_PROG_CC
+AM_PROG_AR
+AC_PROG_RANLIB
+AC_CONFIG_FILES([sub/Makefile])
+AC_OUTPUT
+END
+
+cat > Makefile.am << 'END'
+SUBDIRS = sub
+END
+
+cat > sub/Makefile.am << 'END'
+lib_LIBRARIES = libfoo.a
+libfoo_a_SOURCES = foo.c
+END
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE -a
+./configure
+$MAKE
+
+./compile icl $CPPFLAGS $CFLAGS -c -o "$absmainobj" "$absmainc"
+
+# POSIX mandates that the compiler accepts a space between the -I,
+# -l and -L options and their respective arguments.  Traditionally,
+# this should work also without a space.  Try both usages.
+for sp in '' ' '; do
+  rm -f main
+  ./compile icl $CFLAGS $LDFLAGS -L${sp}"$absfoodir" "$absmainobj" \
+               -o main -l${sp}foo
+  ./main
+done
+
+:
old mode 100755 (executable)
new mode 100644 (file)
index 806c59f..b65ae9c
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 1998-2012 Free Software Foundation, Inc.
+# Copyright (C) 1998-2017 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
@@ -16,9 +16,9 @@
 
 # Test to make sure rules to invoke all compilers are selected with
 # mixed source objects.
-# (copied from compile_f_c_cxx.test) Mike Nolta <mrnolta@princeton.edu>
+# (copied from compile_f_c_cxx.sh) Mike Nolta <mrnolta@princeton.edu>
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_CC
old mode 100755 (executable)
new mode 100644 (file)
index 99893d8..b52c960
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 1998-2012 Free Software Foundation, Inc.
+# Copyright (C) 1998-2017 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
@@ -18,7 +18,7 @@
 # mixed source objects.
 # Matthew D. Langston <langston@SLAC.Stanford.EDU>
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_CC
@@ -39,8 +39,8 @@ $ACLOCAL
 $AUTOMAKE
 
 # Look for the macros at the beginning of rules.
-$FGREP "$tab\$(COMPILE)"    Makefile.in
-$FGREP "$tab\$(CXXCOMPILE)" Makefile.in
-$FGREP "$tab\$(F77COMPILE)" Makefile.in
+$FGREP "$tab\$(AM_V_CC)\$(COMPILE)"     Makefile.in
+$FGREP "$tab\$(AM_V_CXX)\$(CXXCOMPILE)" Makefile.in
+$FGREP "$tab\$(AM_V_F77)\$(F77COMPILE)" Makefile.in
 
 :
old mode 100755 (executable)
new mode 100644 (file)
index 5d18b5c..4b03769
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2001-2012 Free Software Foundation, Inc.
+# Copyright (C) 2001-2017 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
@@ -16,7 +16,7 @@
 
 # Check basic use of conditionals.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AM_CONDITIONAL([TEST], [true])
old mode 100755 (executable)
new mode 100644 (file)
index f7f0a8c..feb971a
--- a/t/cond.sh
+++ b/t/cond.sh
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 1997-2012 Free Software Foundation, Inc.
+# Copyright (C) 1997-2017 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
@@ -16,7 +16,7 @@
 
 # Check basic use of conditionals.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AM_CONDITIONAL([TEST], [true])
@@ -34,8 +34,8 @@ END
 $ACLOCAL
 $AUTOMAKE
 
-grep '^TEST_FALSE' Makefile.in && Exit 1
-grep '^TEST_TRUE' Makefile.in && Exit 1
+grep '^TEST_FALSE' Makefile.in && exit 1
+grep '^TEST_TRUE' Makefile.in && exit 1
 grep '^@TEST_TRUE@VAR = true$' Makefile.in
 grep '^@TEST_FALSE@VAR = false$' Makefile.in
 
old mode 100755 (executable)
new mode 100644 (file)
index 56a9083..5600c88
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2001-2012 Free Software Foundation, Inc.
+# Copyright (C) 2001-2017 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
@@ -16,7 +16,7 @@
 
 # Test for bug in conditionals.  From Raja R Harinath.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_CC
old mode 100755 (executable)
new mode 100644 (file)
index b53cb70..9210502
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2001-2012 Free Software Foundation, Inc.
+# Copyright (C) 2001-2017 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
@@ -18,7 +18,7 @@
 # This checks that, if LDADD is set from a conditional variable
 # and an AC_SUBST, the _DEPENDENCIES variable is set correctly.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_SUBST([CC], [false])
@@ -47,7 +47,6 @@ END
 
 : > config.guess
 : > config.sub
-: > compile
 
 $ACLOCAL
 $AUTOCONF
old mode 100755 (executable)
new mode 100644 (file)
index 1ab328d..02c3173
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2001-2012 Free Software Foundation, Inc.
+# Copyright (C) 2001-2017 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
@@ -17,7 +17,7 @@
 # Test for bug in conditionals.
 # Report from Lars J. Aas.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_CC
old mode 100755 (executable)
new mode 100644 (file)
index f3725c3..8ff22f6
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2001-2012 Free Software Foundation, Inc.
+# Copyright (C) 2001-2017 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
@@ -17,7 +17,7 @@
 # Test for bug in conditionals.
 # Report from Robert Boehne.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_CC
@@ -46,6 +46,6 @@ $ACLOCAL
 $AUTOMAKE
 
 $FGREP helldl Makefile.in # For debugging.
-test `$FGREP -c 'helldl$(EXEEXT):' Makefile.in` -eq 2
+test $($FGREP -c 'helldl$(EXEEXT):' Makefile.in) -eq 2
 
 :
old mode 100755 (executable)
new mode 100644 (file)
index 68f70fd..3186700
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2001-2012 Free Software Foundation, Inc.
+# Copyright (C) 2001-2017 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
@@ -16,7 +16,7 @@
 
 # Regression test for conditionally defined overriding of automatic rules.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_CC
@@ -53,8 +53,8 @@ $ACLOCAL
 $AUTOMAKE
 
 $FGREP helldl Makefile.in # For debugging.
-num1=`$FGREP 'helldl$(EXEEXT):' Makefile.in | wc -l`
-num2=`$FGREP '@COND1_FALSE@@COND2_TRUE@helldl$(EXEEXT):' Makefile.in | wc -l`
+num1=$($FGREP -c 'helldl$(EXEEXT):' Makefile.in)
+num2=$($FGREP -c '@COND1_FALSE@@COND2_TRUE@helldl$(EXEEXT):' Makefile.in)
 test $num1 -eq 4
 test $num2 -eq 1
 
old mode 100755 (executable)
new mode 100644 (file)
index 11a4f68..6d63dea
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2001-2012 Free Software Foundation, Inc.
+# Copyright (C) 2001-2017 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
@@ -18,7 +18,7 @@
 # references.
 # Report from Richard Boulton.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AM_CONDITIONAL([COND1], [true])
old mode 100755 (executable)
new mode 100644 (file)
index 37a0793..5f32571
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2001-2012 Free Software Foundation, Inc.
+# Copyright (C) 2001-2017 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
@@ -18,7 +18,7 @@
 # according to a conditional.
 # Report from Richard Boulton.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_CC
old mode 100755 (executable)
new mode 100644 (file)
index 32c0ab2..8a1b1d7
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2001-2012 Free Software Foundation, Inc.
+# Copyright (C) 2001-2017 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
@@ -17,7 +17,7 @@
 # Regression test for substitution references to conditional variables.
 # Report from Richard Boulton.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AM_CONDITIONAL([COND1], [true])
old mode 100755 (executable)
new mode 100644 (file)
index 86f677e..feb3b2c
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2001-2012 Free Software Foundation, Inc.
+# Copyright (C) 2001-2017 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
@@ -17,7 +17,7 @@
 # Regression test for substitution references to conditional variables.
 # Report from Richard Boulton.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_SUBST([CC], [false])
old mode 100755 (executable)
new mode 100644 (file)
index 40e41f1..3956495
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2001-2012 Free Software Foundation, Inc.
+# Copyright (C) 2001-2017 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
@@ -17,7 +17,7 @@
 # Regression test for recursion handling in substitution references to
 # conditional variables.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_CC
old mode 100755 (executable)
new mode 100644 (file)
index 7719c83..94d76f8
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2002-2012 Free Software Foundation, Inc.
+# Copyright (C) 2002-2017 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
@@ -16,7 +16,7 @@
 
 # Check for use of = and += in different conditions.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AM_CONDITIONAL([COND1], [true])
old mode 100755 (executable)
new mode 100644 (file)
index 7a58c24..fd8b884
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2002-2012 Free Software Foundation, Inc.
+# Copyright (C) 2002-2017 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
@@ -17,7 +17,7 @@
 # Regression test for bug when sources listed in conditional.
 # Report from Richard Boulton.  PR/326.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 CC=false; AC_SUBST([CC])
old mode 100755 (executable)
new mode 100644 (file)
index d6c2bdf..7af8996
@@ -1,5 +1,5 @@
 #!/bin/sh
-# Copyright (C) 2002-2012 Free Software Foundation, Inc.
+# Copyright (C) 2002-2017 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
@@ -17,7 +17,7 @@
 # Check that conditional redefinitions of AC_SUBST'ed variables are detected.
 # Report from Patrik Weiskircher.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat >>configure.ac <<EOF
 AM_CONDITIONAL([COND], [true])
old mode 100755 (executable)
new mode 100644 (file)
index b7038cc..9fc4abb
@@ -1,5 +1,5 @@
 #!/bin/sh
-# Copyright (C) 2002-2012 Free Software Foundation, Inc.
+# Copyright (C) 2002-2017 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
@@ -17,7 +17,7 @@
 # Check that conditional redefinitions of AC_SUBST'ed variables are detected.
 # Report from Patrik Weiskircher.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat >>configure.ac <<EOF
 AC_SUBST([foo], [bar])
old mode 100755 (executable)
new mode 100644 (file)
index c427033..e654ce1
@@ -1,5 +1,5 @@
 #!/bin/sh
-# Copyright (C) 2002-2012 Free Software Foundation, Inc.
+# Copyright (C) 2002-2017 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
@@ -17,7 +17,7 @@
 # Check that conditional primaries can use non-conditional directories.
 # From Pavel Roskin.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat >>configure.ac << 'EOF'
 AM_CONDITIONAL([USE_FOO], [true])
old mode 100755 (executable)
new mode 100644 (file)
index f0aac96..01af6c4
@@ -1,5 +1,5 @@
 #!/bin/sh
-# Copyright (C) 2002-2012 Free Software Foundation, Inc.
+# Copyright (C) 2002-2017 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
@@ -17,7 +17,7 @@
 # Check that non-conditional primaries can use conditional directories.
 # Reported by Juergen Keil.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat >>configure.ac << 'EOF'
 AM_CONDITIONAL([USE_FOO], [true])
old mode 100755 (executable)
new mode 100644 (file)
index 0a8263d..b56973b
@@ -1,5 +1,5 @@
 #!/bin/sh
-# Copyright (C) 2002-2012 Free Software Foundation, Inc.
+# Copyright (C) 2002-2017 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
@@ -17,7 +17,7 @@
 # Check that non-conditional primaries cannot use directories defined
 # in some conditions (but not others).
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat >>configure.ac << 'EOF'
 AM_CONDITIONAL([USE_FOO], [true])
@@ -32,7 +32,7 @@ EOF
 
 $ACLOCAL
 AUTOMAKE_fails
-grep ' USE_FOO' stderr && Exit 1
+grep ' USE_FOO' stderr && exit 1
 grep '!USE_FOO' stderr
 
 :
old mode 100755 (executable)
new mode 100644 (file)
index 7a6bcff..1f49288
@@ -1,5 +1,5 @@
 #!/bin/sh
-# Copyright (C) 2002-2012 Free Software Foundation, Inc.
+# Copyright (C) 2002-2017 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
@@ -17,7 +17,7 @@
 # Check that conditional primaries can use directories defined
 # in the same conditions (but not others).
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat >>configure.ac << 'EOF'
 AM_CONDITIONAL([USE_FOO], [true])
old mode 100755 (executable)
new mode 100644 (file)
index 2bcb8c1..647bafa
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 1997-2012 Free Software Foundation, Inc.
+# Copyright (C) 1997-2017 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
@@ -17,7 +17,7 @@
 # Test sources listed in conditional.
 # Report from Rob Savoye <rob@cygnus.com>, and Lars J. Aas.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_CC
old mode 100755 (executable)
new mode 100644 (file)
index 6c2b396..cd0d113
@@ -1,5 +1,5 @@
 #!/bin/sh
-# Copyright (C) 2003-2012 Free Software Foundation, Inc.
+# Copyright (C) 2003-2017 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
@@ -16,7 +16,7 @@
 
 # For PR/352: make sure we support bin_PROGRAMS being defined conditionally.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat >>configure.ac <<'EOF'
 AM_CONDITIONAL([C1], [test -z "$two"])
old mode 100755 (executable)
new mode 100644 (file)
index d6006cb..77ad9b5
@@ -1,5 +1,5 @@
 #!/bin/sh
-# Copyright (C) 2003-2012 Free Software Foundation, Inc.
+# Copyright (C) 2003-2017 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
@@ -16,7 +16,7 @@
 
 # Make sure we define conditional _DEPENDENCIES correctly.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat >>configure.ac <<'EOF'
 AC_SUBST([CC], [false])
old mode 100755 (executable)
new mode 100644 (file)
index 7ff1a41..2e92d6a
@@ -1,5 +1,5 @@
 #!/bin/sh
-# Copyright (C) 2003-2012 Free Software Foundation, Inc.
+# Copyright (C) 2003-2017 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
@@ -16,7 +16,7 @@
 
 # Make sure the user can override a conditional _DEPENDENCIES.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat >>configure.ac <<'EOF'
 AM_CONDITIONAL([C1], [test -z "$two"])
old mode 100755 (executable)
new mode 100644 (file)
index 9655d3b..99147d5
@@ -1,5 +1,5 @@
 #!/bin/sh
-# Copyright (C) 2004-2012 Free Software Foundation, Inc.
+# Copyright (C) 2004-2017 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
@@ -18,7 +18,7 @@
 # correctly.
 # Report from Ralf Corsepius.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat >>configure.ac <<'EOF'
 AM_CONDITIONAL([INC], [test -z "$two"])
@@ -47,19 +47,19 @@ $ACLOCAL
 $AUTOCONF
 $AUTOMAKE
 
-cwd=`pwd` || fatal_ "cannot get current directory"
+cwd=$(pwd) || fatal_ "cannot get current directory"
 mkdir nowhere
 chmod a-w nowhere
 
 ./configure --prefix="$cwd"/nowhere --bindir="$cwd"/bin \
             --includedir="$cwd"/inc
 $MAKE installdirs
-test ! -d bin
+test ! -e bin
 test -d inc/foo
-test ! -f inc/foo/foo.h
+test ! -e inc/foo/foo.h
 rm -rf inc
 $MAKE install
-test ! -d bin
+test ! -e bin
 test -f inc/foo/foo.h
 $MAKE distdircheck
 
@@ -68,11 +68,11 @@ rm -rf inc
 ./configure two=two --prefix="$cwd"/nowhere --bindir="$cwd"/bin \
                     --includedir="$cwd"/inc
 $MAKE install
-test ! -d inc
+test ! -e inc
 test -f bin/x.sh
 rm -rf inc
 $MAKE installdirs
-test ! -d inc
+test ! -e inc
 test -d bin
 $MAKE distdircheck
 
old mode 100755 (executable)
new mode 100644 (file)
index 8349406..224a10d
@@ -1,5 +1,5 @@
 #!/bin/sh
-# Copyright (C) 2004-2012 Free Software Foundation, Inc.
+# Copyright (C) 2004-2017 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
@@ -17,7 +17,7 @@
 # Check for _DEPENDENCIES definition with conditional _LDADD.
 # Report from Elena A. Vengerova.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat >>configure.ac <<'EOF'
 AM_CONDITIONAL([TWO], [test -n "$two"])
@@ -54,22 +54,18 @@ $AUTOCONF
 $AUTOMAKE
 ./configure
 
-$MAKE dep-test1 >stdout || { cat stdout; Exit 1; }
-cat stdout
+run_make -O dep-test1
 $FGREP 'BEG: one.z somethingelse.a :END' stdout
 
-$MAKE dep-test2 >stdout || { cat stdout; Exit 1; }
-cat stdout
+run_make -O dep-test2
 $FGREP 'BEG: three.z :END' stdout
 
 ./configure two=2
 
-$MAKE dep-test1 >stdout || { cat stdout; Exit 1; }
-cat stdout
+run_make -O dep-test1
 $FGREP 'BEG: two.z somethingelse.a :END' stdout
 
-$MAKE dep-test2 >stdout || { cat stdout; Exit 1; }
-cat stdout
+run_make -O dep-test2
 $FGREP 'BEG: two.z somethingelse.a :END' stdout
 
 :
old mode 100755 (executable)
new mode 100644 (file)
index 043b3b0..d6fffb2
@@ -1,5 +1,5 @@
 #!/bin/sh
-# Copyright (C) 2004-2012 Free Software Foundation, Inc.
+# Copyright (C) 2004-2017 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
@@ -18,7 +18,7 @@
 # Report from Roman Fietze.
 
 required='cc lex yacc'
-. ./defs || Exit 1
+. test-init.sh
 
 cat >>configure.ac <<'EOF'
 AM_CONDITIONAL([CASE_A], [test -z "$case_B"])
@@ -55,7 +55,7 @@ $AUTOCONF
 $AUTOMAKE --add-missing
 
 $FGREP 'tparse.h' Makefile.in # For debugging.
-test `$FGREP -c 'tparse.h:' Makefile.in` = 1
+test $($FGREP -c 'tparse.h:' Makefile.in) -eq 1
 
 cat > tscan.l << 'END'
 %{
old mode 100755 (executable)
new mode 100644 (file)
index 82200cc..f913a08
@@ -1,5 +1,5 @@
 #!/bin/sh
-# Copyright (C) 2004-2012 Free Software Foundation, Inc.
+# Copyright (C) 2004-2017 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
@@ -16,7 +16,7 @@
 
 # Check rules output for parser defined conditionally.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat >>configure.ac <<'EOF'
 AM_CONDITIONAL([CASE_A], [test -z "$case_B"])
@@ -54,7 +54,7 @@ $AUTOMAKE -Wno-error
 
 # Still and all, it should generate two rules.
 $FGREP 'tparse.h' Makefile.in # For debugging.
-test `$FGREP -c 'tparse.h:' Makefile.in` = 2
+test $($FGREP -c 'tparse.h:' Makefile.in) -eq 2
 $FGREP '@CASE_A_TRUE@tparse.h:' Makefile.in
 $FGREP '@CASE_A_FALSE@tparse.h:' Makefile.in
 
old mode 100755 (executable)
new mode 100644 (file)
index 6423d39..2fe057e
@@ -1,5 +1,5 @@
 #!/bin/sh
-# Copyright (C) 2004-2012 Free Software Foundation, Inc.
+# Copyright (C) 2004-2017 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
@@ -17,7 +17,7 @@
 # Check conditional local rules.
 # Report from Simon Josefsson.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat >>configure.ac <<'EOF'
 AM_CONDITIONAL([CASE_A], [test -n "$case_A"])
@@ -39,19 +39,15 @@ $AUTOCONF
 $AUTOMAKE
 
 ./configure
-$MAKE check >stdout || { cat stdout; Exit 1; }
-cat stdout
-grep GrepMe1 stdout && Exit 1
-$MAKE install >stdout || { cat stdout; Exit 1; }
-cat stdout
+run_make -O check
+grep GrepMe1 stdout && exit 1
+run_make -O install
 grep GrepMe2 stdout
 
 ./configure case_A=1
-$MAKE check >stdout || { cat stdout; Exit 1; }
-cat stdout
+run_make -O check
 grep GrepMe1 stdout
-$MAKE install >stdout || { cat stdout; Exit 1; }
-cat stdout
-grep GrepMe2 stdout && Exit 1
+run_make -O install
+grep GrepMe2 stdout && exit 1
 
 :
old mode 100755 (executable)
new mode 100644 (file)
index 71ae69a..2b0bef2
@@ -1,5 +1,5 @@
 #!/bin/sh
-# Copyright (C) 2005-2012 Free Software Foundation, Inc.
+# Copyright (C) 2005-2017 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
@@ -17,7 +17,7 @@
 # Check conditional variable ordering.
 # Report from Ed Hartnett.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat >>configure.ac <<'EOF'
 AM_CONDITIONAL([CASE_A], :)
old mode 100755 (executable)
new mode 100644 (file)
index 840b8b8..210c837
@@ -1,5 +1,5 @@
 #!/bin/sh
-# Copyright (C) 2008-2012 Free Software Foundation, Inc.
+# Copyright (C) 2008-2017 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
@@ -17,7 +17,7 @@
 # Build either as CONFIG_FILE or as PROGRAM.
 
 required=cc
-. ./defs || Exit 1
+. test-init.sh
 
 mkdir sub
 
@@ -78,24 +78,22 @@ $AUTOCONF
 $AUTOMAKE --add-missing
 
 ./configure COND=true
-$MAKE 2>stderr || { cat stderr >&2; Exit 1; }
-cat stderr >&2
-grep 'overriding commands' stderr && Exit 1
+run_make -E
+grep 'overriding commands' stderr && exit 1
 $MAKE sure-exist
-./prog1 && Exit 1
-./sub/prog2 && Exit 1
+./prog1 && exit 1
+./sub/prog2 && exit 1
 $MAKE clean
 $MAKE sure-not-exist
 $MAKE
 $MAKE sure-exist
-./prog1 && Exit 1
-./sub/prog2 && Exit 1
+./prog1 && exit 1
+./sub/prog2 && exit 1
 $MAKE distclean
 
 ./configure COND=false
-$MAKE 2>stderr || { cat stderr >&2; Exit 1; }
-cat stderr >&2
-grep 'overriding commands' stderr && Exit 1
+run_make -E
+grep 'overriding commands' stderr && exit 1
 ./prog1
 ./sub/prog2
 $MAKE clean
old mode 100755 (executable)
new mode 100644 (file)
index 9bd0cc6..a40f662
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 1998-2012 Free Software Foundation, Inc.
+# Copyright (C) 1998-2017 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
@@ -16,7 +16,7 @@
 
 # Another sources-in-conditional test.  Report from Tim Goodwin.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_SUBST([CC], [false])
@@ -48,8 +48,8 @@ $ACLOCAL
 $AUTOMAKE -i
 
 # We should not output useless definitions.
-grep '^@ONE_FALSE@' Makefile.in && Exit 1
-grep '^@TWO_FALSE@' Makefile.in && Exit 1
+grep '^@ONE_FALSE@' Makefile.in && exit 1
+grep '^@TWO_FALSE@' Makefile.in && exit 1
 
 $AUTOCONF
 
old mode 100755 (executable)
new mode 100644 (file)
index 7dadfc1..a17c699
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2008-2012 Free Software Foundation, Inc.
+# Copyright (C) 2008-2017 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
@@ -16,7 +16,7 @@
 
 # Test AM_COND_IF.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat >>configure.ac <<'END'
 AC_DEFUN([FOO],
@@ -58,26 +58,26 @@ $AUTOMAKE -a
 
 ./configure cond=yes cond1=yes cond2=no cond3=yes
 test -f file1
-test ! -f file2
+test ! -e file2
 test -f file3
 rm -f file1 file3
 $MAKE file1 file3
-$MAKE file2 && Exit 1
+$MAKE file2 && exit 1
 test -f file1
-test ! -f file2
+test ! -e file2
 test -f file3
 $MAKE distclean
 
 ./configure cond=no cond1=yes cond2=yes
-test ! -f file1
+test ! -e file1
 test -f file2
-test ! -f file3
+test ! -e file3
 rm -f file2
-$MAKE file1 && Exit 1
+$MAKE file1 && exit 1
 $MAKE file2
-$MAKE file3 && Exit 1
-test ! -f file1
+$MAKE file3 && exit 1
+test ! -e file1
 test -f file2
-test ! -f file3
+test ! -e file3
 
 :
old mode 100755 (executable)
new mode 100644 (file)
index 7c59a0a..7cdc992
@@ -1,5 +1,5 @@
 #!/bin/sh
-# Copyright (C) 2008-2012 Free Software Foundation, Inc.
+# Copyright (C) 2008-2017 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
 
 # AM_COND_IF with an undefined condition should fail.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat >>configure.ac <<'END'
 AM_COND_IF([BAD_COND], [AC_CONFIG_FILES([file1])])
 AC_OUTPUT
 END
 
-$ACLOCAL 2>stderr && { cat stderr >&2; Exit 1; }
+$ACLOCAL 2>stderr && { cat stderr >&2; exit 1; }
 cat stderr >&2
 grep '^configure\.ac:4:.*AM_COND_IF.* no such condition.*BAD_COND' stderr
 
old mode 100755 (executable)
new mode 100644 (file)
index d4eee01..c4c3b5d
@@ -1,5 +1,6 @@
 #!/bin/sh
-# Copyright (C) 2008-2012 Free Software Foundation, Inc.
+nfig
+# Copyright (C) 2008-2017 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
@@ -18,7 +19,7 @@
 # This shouldn't happen with user input, as _AM_COND_* are not documented,
 # but better to be safe.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat >>configure.ac <<'END'
 AM_CONDITIONAL([COND], [:])
@@ -28,10 +29,10 @@ _AM_COND_IF([COND])
 AC_OUTPUT
 END
 
-edit_configure_in ()
+edit_configure_ac ()
 {
-  sed "$@" < configure.ac >configure.int
-  mv -f configure.int configure.ac
+  sed "$@" < configure.ac >configure.tmp
+  mv -f configure.tmp configure.ac
   rm -rf autom4te*.cache
 }
 
@@ -41,19 +42,19 @@ $ACLOCAL
 AUTOMAKE_fails
 grep '^configure\.ac:8:.* condition stack' stderr
 
-edit_configure_in 's/_AM_COND_IF/_AM_COND_ELSE/'
+edit_configure_ac 's/_AM_COND_IF/_AM_COND_ELSE/'
 AUTOMAKE_fails
 grep '^configure\.ac:7:.* else without if' stderr
 
-edit_configure_in 's/_AM_COND_ELSE/_AM_COND_ENDIF/'
+edit_configure_ac 's/_AM_COND_ELSE/_AM_COND_ENDIF/'
 AUTOMAKE_fails
 grep '^configure\.ac:7:.* endif without if' stderr
 
-edit_configure_in 's/\(_AM_COND_ENDIF\).*/_AM_COND_IF\
+edit_configure_ac 's/\(_AM_COND_ENDIF\).*/_AM_COND_IF\
 _AM_COND_ENDIF/'
 AUTOMAKE_fails
 grep '^configure\.ac:7:.* not enough arguments.* _AM_COND_IF' stderr
 grep '^configure\.ac:8:.* not enough arguments.* _AM_COND_ENDIF' stderr
-test 2 = `grep -c 'not enough arguments' stderr`
+test 2 -eq $($FGREP -c 'not enough arguments' stderr)
 
 :
old mode 100755 (executable)
new mode 100644 (file)
index 028168e..c1e832d
@@ -1,5 +1,5 @@
 #!/bin/sh
-# Copyright (C) 2008-2012 Free Software Foundation, Inc.
+# Copyright (C) 2008-2017 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
@@ -16,7 +16,7 @@
 
 # Ensure an error with underquoted usage of AM_COND_IF in configure.ac.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat >>configure.ac <<'END'
 AM_CONDITIONAL([COND1], [:])
@@ -36,8 +36,8 @@ $EGREP '^configure\.ac:7:.* missing m4 quoting.*macro depth 2( |$)' stderr
 sed '/.AM_COND_IF/{
         s/^/[/
         s/$/]/
-     }' < configure.ac > configure.int
-mv -f configure.int configure.ac
+     }' < configure.ac > configure.tmp
+mv -f configure.tmp configure.ac
 rm -rf autom4te*.cache
 $AUTOMAKE
 
old mode 100755 (executable)
new mode 100644 (file)
index 8cc2c2e..b2afc61
@@ -1,5 +1,5 @@
 #!/bin/sh
-# Copyright (C) 2002-2012 Free Software Foundation, Inc.
+# Copyright (C) 2002-2017 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
@@ -15,9 +15,9 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 # Check that redefinitions of AC_SUBST'ed AM_SUBST_NOTMAKE'd variables
-# are not diagnosed.  See cond23.test.
+# are not diagnosed.  See 'cond23.sh'.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat >>configure.ac <<EOF
 AM_CONDITIONAL([COND], [true])
@@ -33,6 +33,6 @@ EOF
 
 $ACLOCAL
 AUTOMAKE_run
-grep 'libdir was already defined' stderr && Exit 1
-grep '^libdir = ' Makefile.in && Exit 1
-Exit 0
+grep 'libdir was already defined' stderr && exit 1
+grep '^libdir = ' Makefile.in && exit 1
+exit 0
old mode 100755 (executable)
new mode 100644 (file)
index 1296cd1..d4adbe3
@@ -1,5 +1,5 @@
 #!/bin/sh
-# Copyright (C) 2002-2012 Free Software Foundation, Inc.
+# Copyright (C) 2002-2017 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
@@ -15,9 +15,9 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 # Check that redefinitions of AC_SUBST'ed AM_SUBST_NOTMAKE'd variables
-# are not diagnosed.  See cond24.test.
+# are not diagnosed.  See 'cond24.sh'.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat >>configure.ac <<EOF
 AC_SUBST([foo], [bar])
@@ -34,6 +34,6 @@ EOF
 
 $ACLOCAL
 AUTOMAKE_run
-grep 'foo was already defined' stderr && Exit 1
-grep '^foo =' Makefile.in && Exit 1
-Exit 0
+grep 'foo was already defined' stderr && exit 1
+grep '^foo =' Makefile.in && exit 1
+exit 0
old mode 100755 (executable)
new mode 100644 (file)
index c89caf9..d221903
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2009-2012 Free Software Foundation, Inc.
+# Copyright (C) 2009-2017 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
@@ -16,7 +16,7 @@
 
 # Ensure the right condition is listed after 'else' and 'endif'.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AM_CONDITIONAL([USE_A], [test x = y])
old mode 100755 (executable)
new mode 100644 (file)
index 3961303..2f3a4fa
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 1998-2012 Free Software Foundation, Inc.
+# Copyright (C) 1998-2017 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
@@ -16,7 +16,7 @@
 
 # Yet another sources-in-conditional test.  Report from Tim Goodwin.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_CC
@@ -45,8 +45,8 @@ $ACLOCAL
 $AUTOMAKE 2>stderr &
 pid=$!
 
-# MSYS bash seems to have a bug in kill, so don't try to kill too soon;
-# and avoid maintainer-check test.
+# MSYS bash seems to have a bug in kill, so don't try to kill too soon.
+# The extra quoting avoids a maintainer-check failure.
 sleep '2'
 
 # Make at most 30 tries, one every 10 seconds (= 300 seconds = 5 min).
@@ -55,15 +55,15 @@ while test $try -le 30; do
   if kill -0 $pid; then
     : process $pid is still alive, wait and retry
     sleep '10'
-    try=`expr $try + 1`
+    try=$(($try + 1))
   else
     cat stderr >&2
     # Automake must fail with a proper error message.
     grep 'variable.*OPT_SRC.*recursively defined' stderr
-    Exit 0
+    exit 0
   fi
 done
 # The automake process probably hung.  Kill it, and exit with failure.
 echo "$me: Automake process $pid hung"
 kill $pid
-Exit 1
+exit 1
old mode 100755 (executable)
new mode 100644 (file)
index f6a499d..4a3ce2d
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 1998-2012 Free Software Foundation, Inc.
+# Copyright (C) 1998-2017 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
@@ -16,7 +16,7 @@
 
 # Test for an odd conditional bug.  Report from Matt Leach.
 
-. ./defs || Exit 1
+. test-init.sh
 
 echo 'AM_CONDITIONAL([FOO], [true])' >> configure.ac
 
@@ -57,7 +57,7 @@ touch aclocal.m4 # Avoid unnecessary firing the remake rules.
 $AUTOCONF
 $AUTOMAKE Makefile
 
-./configure --prefix="`pwd`/_inst"
+./configure --prefix="$(pwd)/_inst"
 
 $MAKE test
 
old mode 100755 (executable)
new mode 100644 (file)
index 1651ac9..9d06604
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 1998-2012 Free Software Foundation, Inc.
+# Copyright (C) 1998-2017 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
@@ -16,7 +16,7 @@
 
 # Test for an odd conditional bug.  Report from Pavel Roskin.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 compat=yes
@@ -35,5 +35,5 @@ END
 $ACLOCAL
 $AUTOMAKE
 
-grep '^[^#].*002' Makefile.in && Exit 1
-Exit 0
+grep '^[^#].*002' Makefile.in && exit 1
+exit 0
old mode 100755 (executable)
new mode 100644 (file)
index f21aacb..7162940
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 1999-2012 Free Software Foundation, Inc.
+# Copyright (C) 1999-2017 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
@@ -17,7 +17,7 @@
 # Test to make sure _PROGRAMS conditionals can be written in a useful
 # way.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_CC
@@ -58,10 +58,10 @@ END
 
 cp x.c y.c
 
-instdir=`pwd`/_inst || fatal_ "cannot get current directory"
+instdir=$(pwd)/_inst || fatal_ "cannot get current directory"
 
 # Skip the rest of the test in case of e.g. missing C compiler.
-./configure --prefix="$instdir" x=yes || Exit $?
+./configure --prefix="$instdir" x=yes || exit $?
 $MAKE install
 $MAKE get-built
 $MAKE get-installed
old mode 100755 (executable)
new mode 100644 (file)
index b9addab..d9fd2db
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 1999-2012 Free Software Foundation, Inc.
+# Copyright (C) 1999-2017 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
@@ -16,7 +16,7 @@
 
 # Test for bug in conditionals.  From Raja R Harinath.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AM_CONDITIONAL([WRONG], [test x = y])
old mode 100755 (executable)
new mode 100644 (file)
index be32b7d..fe9d5e3
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2001-2012 Free Software Foundation, Inc.
+# Copyright (C) 2001-2017 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
@@ -16,7 +16,7 @@
 
 # Test for bug in conditionals.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 dnl Define a macro with the same name as the conditional to exhibit
@@ -65,7 +65,7 @@ mkdir foo bar
 
 $ACLOCAL
 $AUTOCONF
-grep "meaningless;characters" configure && Exit 1
+grep "meaningless;characters" configure && exit 1
 $AUTOMAKE
 ./configure
 $MAKE test
old mode 100755 (executable)
new mode 100644 (file)
index 3b0f89c..3885db7
@@ -1,5 +1,5 @@
 #!/bin/sh
-# Copyright (C) 2004-2012 Free Software Foundation, Inc.
+# Copyright (C) 2004-2017 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 # Test install when a conditional install-*-hook is not defined.
-# Keep this in sync with sister test condhook2.test.
+# Keep this in sync with sister test 'condhook2.sh'.
 # Report by Nik A. Melchior (PR/428).
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AM_CONDITIONAL([TEST], [false])
@@ -39,10 +39,10 @@ $ACLOCAL
 $AUTOCONF
 $AUTOMAKE
 
-./configure --prefix "`pwd`/inst"
+./configure --prefix "$(pwd)/inst"
 
 $MAKE install
 test -f inst/etc/mumble
-test ! -f bad
+test ! -e bad
 
 :
old mode 100755 (executable)
new mode 100644 (file)
index a853e37..e96da11
@@ -1,5 +1,5 @@
 #!/bin/sh
-# Copyright (C) 2010-2012 Free Software Foundation, Inc.
+# Copyright (C) 2010-2017 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
@@ -15,9 +15,9 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 # Test install when a conditional install-*-hook is defined.
-# Keep this in sync with sister test condhook.test.
+# Keep this in sync with sister test 'condhook.sh'.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AM_CONDITIONAL([TEST], [true])
@@ -38,7 +38,7 @@ $ACLOCAL
 $AUTOCONF
 $AUTOMAKE
 
-./configure --prefix "`pwd`/inst"
+./configure --prefix "$(pwd)/inst"
 
 $MAKE install
 test -f inst/etc/mumble
old mode 100755 (executable)
new mode 100644 (file)
index b7011e7..db73a3c
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 1999-2012 Free Software Foundation, Inc.
+# Copyright (C) 1999-2017 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
@@ -16,7 +16,7 @@
 
 # Make sure a conditional include statement is handled properly.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AM_CONDITIONAL([TOBE], [false])
@@ -36,7 +36,7 @@ END
 $ACLOCAL
 $AUTOMAKE
 
-grep '^target:' Makefile.in && Exit 1
+grep '^target:' Makefile.in && exit 1
 grep '^@TOBE_TRUE@target:' Makefile.in
 
 :
old mode 100755 (executable)
new mode 100644 (file)
index e88b0d2..f92a57b
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 1999-2012 Free Software Foundation, Inc.
+# Copyright (C) 1999-2017 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
@@ -16,7 +16,7 @@
 
 # Another test of conditional include statements.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AM_CONDITIONAL([TOBE], [false])
old mode 100755 (executable)
new mode 100644 (file)
index fae04bf..a1bfff1
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2001-2012 Free Software Foundation, Inc.
+# Copyright (C) 2001-2017 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
@@ -17,7 +17,7 @@
 # Test for bug with conditional library.
 # From Harlan Stenn.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_RANLIB
@@ -40,5 +40,5 @@ END
 $ACLOCAL
 $AUTOMAKE
 
-$FGREP librsaref.a.c Makefile.in && Exit 1
-Exit 0
+$FGREP librsaref.a.c Makefile.in && exit 1
+exit 0
old mode 100755 (executable)
new mode 100644 (file)
index fbb3844..e06f63d
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 1998-2012 Free Software Foundation, Inc.
+# Copyright (C) 1998-2017 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
@@ -16,7 +16,7 @@
 
 # Make sure appropriate man install targets generated in all cases.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat > Makefile.am << 'END'
 man_MANS = foo.1 foo.2
old mode 100755 (executable)
new mode 100644 (file)
index 9f2714f..1be7095
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2010-2012 Free Software Foundation, Inc.
+# Copyright (C) 2010-2017 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
@@ -16,7 +16,7 @@
 
 # Make sure conditionals work with man pages.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AM_CONDITIONAL([COND], [test x"$FOO" = x"true"])
@@ -58,14 +58,14 @@ $EGREP 'MANS|\.([123456789]|man)' Makefile.in # For debugging.
 
 mkdir build
 cd build
-../configure FOO=true --prefix="`pwd`/_inst"
+../configure FOO=true --prefix="$(pwd)/_inst"
 $EGREP 'MANS|\.([123456789]|man)' Makefile # For debugging.
 touch foo.1 6.man
 $MAKE install
 $MAKE test1
 
 cd ..
-./configure FOO=false --prefix="`pwd`/_inst"
+./configure FOO=false --prefix="$(pwd)/_inst"
 $EGREP 'MANS|\.([123456789]|man)' Makefile # For debugging.
 touch bar.2 baz.1 zap.5
 $MAKE install
old mode 100755 (executable)
new mode 100644 (file)
index f508d45..fbd1c77
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2001-2012 Free Software Foundation, Inc.
+# Copyright (C) 2001-2017 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
@@ -16,7 +16,7 @@
 
 # Make sure that config* files are properly regenerated.
 
-. ./defs || Exit 1
+. test-init.sh
 
 echo "FOO = foo" > Makefile.am
 
@@ -32,6 +32,6 @@ echo "$me: Not generated by aclocal ..."
 sed -n '3,$p' aclocal.m4 >aclocal.m4t
 mv -f aclocal.m4t aclocal.m4
 $AUTOMAKE
-grep '^\$(ACLOCAL_M4):' Makefile.in && Exit 1
+grep '^\$(ACLOCAL_M4):' Makefile.in && exit 1
 
 :
old mode 100755 (executable)
new mode 100644 (file)
index d969660..d62b3ea
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2003-2012 Free Software Foundation, Inc.
+# Copyright (C) 2003-2017 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
@@ -17,7 +17,7 @@
 # Make sure rebuild rules work even when AC_CONFIG_FILES uses colons.
 # Report from Alexander Turbov.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_CONFIG_FILES([bar/Makefile:bar/Makefile.in:Makefile.bot])
@@ -47,11 +47,9 @@ $AUTOMAKE
 $MAKE
 
 cd bar
-$MAKE top-rule >stdout || { cat stdout; Exit 1; }
-cat stdout
+run_make -O top-rule
 grep 'top rule' stdout
-$MAKE bot-rule >stdout || { cat stdout; Exit 1; }
-cat stdout
+run_make -O bot-rule
 grep 'bot rule' stdout
 cd ..
 
@@ -64,11 +62,9 @@ END
 $MAKE
 
 cd bar
-$MAKE top-rule >stdout || { cat stdout; Exit 1; }
-cat stdout
+run_make -O top-rule
 grep 'top2 rule' stdout
-$MAKE bot-rule >stdout || { cat stdout; Exit 1; }
-cat stdout
+run_make -O bot-rule
 grep 'bot rule' stdout
 cd ..
 
@@ -81,11 +77,9 @@ END
 $MAKE
 
 cd bar
-$MAKE top-rule >stdout || { cat stdout; Exit 1; }
-cat stdout
+run_make -O top-rule
 grep 'top2 rule' stdout
-$MAKE bot-rule >stdout || { cat stdout; Exit 1; }
-cat stdout
+run_make -O bot-rule
 grep 'bot2 rule' stdout
 cd ..
 
old mode 100755 (executable)
new mode 100644 (file)
index 2c42f29..c0b41ea
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2003-2012 Free Software Foundation, Inc.
+# Copyright (C) 2003-2017 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
 
 # Make sure empty calls to AC_CONFIG_FILES or AC_CONFIG_HEADERS are diagnosed.
 
-. ./defs || Exit 1
+. test-init.sh
 
-# We avoid using configure.ac stub initialized by ./defs, since we need
-# to keep track of line numbers (to grep for error messages).
+# We avoid using configure.ac stub initialized by our testsuite setup, as
+# we need to keep track of line numbers (to grep for error messages).
 cat > configure.ac << END
 AC_INIT([$me], [1.0])
 AM_INIT_AUTOMAKE
old mode 100755 (executable)
new mode 100644 (file)
index 9c4cb4f..feb2e14
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2012 Free Software Foundation, Inc.
+# Copyright (C) 2012-2017 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
@@ -19,7 +19,7 @@
 # broken in that case.
 
 required=GNUmake
-. ./defs || Exit 1
+. test-init.sh
 
 cat > configure.ac << END
 AC_INIT([$me], [1.0])
@@ -54,8 +54,7 @@ $sleep
 touch Makefile.am
 # Check that remake rules do truly break -- otherwise automake is
 # giving a bogus warning.
-$MAKE 2>stderr && { cat stderr >&2; Exit 1; }
-cat stderr >&2
+run_make -e FAIL -E
 grep "config\\.status:.*invalid argument.*Makefile" stderr
 
 :
old mode 100755 (executable)
new mode 100644 (file)
similarity index 85%
rename from t/subdir6.sh
rename to t/confh-subdir-clean.sh
index 5c17b65..7f28657
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2002-2012 Free Software Foundation, Inc.
+# Copyright (C) 2002-2017 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
 
 # Test to make sure config headers in subdirectories are cleaned.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
-AM_CONFIG_HEADER([sub/config.h:sub/config.hin])
+AC_CONFIG_HEADERS([sub/config.h:sub/config.hin])
 AC_OUTPUT
 END
 
@@ -35,6 +35,6 @@ test -f sub/stamp-h1
 $MAKE clean
 test -f sub/stamp-h1
 $MAKE distclean
-test -f sub/stamp-h1 && Exit 1
+test -f sub/stamp-h1 && exit 1
 
 :
old mode 100755 (executable)
new mode 100644 (file)
index 4759619..4ab770d
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 1999-2012 Free Software Foundation, Inc.
+# Copyright (C) 1999-2017 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
 # Test to make sure config.h works in a subdir.
 # Report from Alexandre Oliva.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
-AM_CONFIG_HEADER([include/config.h])
+AC_CONFIG_HEADERS([include/config.h])
 AC_OUTPUT
 END
 
old mode 100755 (executable)
new mode 100644 (file)
index ea6a9ff..0ec5ee4
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 1999-2012 Free Software Foundation, Inc.
+# Copyright (C) 1999-2017 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
 #  Use AM_CONFIG_HEADER(subdir/config.h) to place configuration
 #  header in subdirectory and observe that it is not included.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_CONFIG_FILES([include/Makefile])
-AM_CONFIG_HEADER([include/config.h])
+AC_CONFIG_HEADERS([include/config.h])
 AC_PROG_CC
 END
 
old mode 100755 (executable)
new mode 100644 (file)
index c35c3e8..4065a60
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2003-2012 Free Software Foundation, Inc.
+# Copyright (C) 2003-2017 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
@@ -16,7 +16,7 @@
 
 # Make sure we do not distribute header sources when they are built.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_SUBST([FOO], [NameToBeGrepped])
@@ -31,7 +31,6 @@ cat > Makefile.am << 'END'
 test: distdir
        test -f $(distdir)/config.h.in
        test -f $(distdir)/include/config.h.in.in
-       : # Solaris Sh does not support 'test -e'.
        test ! -f $(distdir)/include/config.h.in
        test ! -r $(distdir)/include/config.h.in
 END
old mode 100755 (executable)
new mode 100644 (file)
index c5e7d7e..37ed73e
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 1998-2012 Free Software Foundation, Inc.
+# Copyright (C) 1998-2017 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
 # idea is that if config.h is in a subdir, and there is no Makefile in
 # that subdir, then we want to build config.h as the top level.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
-AM_CONFIG_HEADER([subdir/config.h])
+AC_CONFIG_HEADERS([subdir/config.h])
 AC_OUTPUT
 END
 
old mode 100755 (executable)
new mode 100644 (file)
index 4080779..ccb517f
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 1997-2012 Free Software Foundation, Inc.
+# Copyright (C) 1997-2017 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 # Test to make sure several config headers are allowed.
-# See also sister "semantic" test 'confh8.test'.
+# See also sister "semantic" test 'confh8.sh'.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
-AM_CONFIG_HEADER([config.h two.h])
+AC_CONFIG_HEADERS([config.h two.h])
 END
 
 : > Makefile.am
old mode 100755 (executable)
new mode 100644 (file)
index c3a27d1..aa71b85
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2010-2012 Free Software Foundation, Inc.
+# Copyright (C) 2010-2017 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 # Test to make sure several config headers are allowed.
-# See also sister "minimalistic" test 'confh7.test'.
+# See also sister "minimalistic" test 'confh7.sh'.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
-AM_CONFIG_HEADER([one.h two.h])
+AC_CONFIG_HEADERS([one.h two.h])
 AC_OUTPUT
 END
 
old mode 100755 (executable)
new mode 100644 (file)
index cedba55..ae1fd95
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2010-2012 Free Software Foundation, Inc.
+# Copyright (C) 2010-2017 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/>.
 
+# Diagnose if the autoconf input is named configure.in.
 # Diagnose if both configure.in and configure.ac are present, prefer
 # configure.ac.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat >configure.ac <<EOF
 AC_INIT([$me], [1.0])
@@ -33,11 +34,11 @@ EOF
 
 : >Makefile.am
 
-$ACLOCAL 2>stderr && { cat stderr >&2; Exit 1; }
+$ACLOCAL 2>stderr && { cat stderr >&2; exit 1; }
 cat stderr >&2
 grep 'configure\.ac.*configure\.in.*both present' stderr
 
-$ACLOCAL -Wno-error 2>stderr || { cat stderr >&2; Exit 1; }
+$ACLOCAL -Wno-error 2>stderr || { cat stderr >&2; exit 1; }
 cat stderr >&2
 grep 'configure\.ac.*configure\.in.*both present' stderr
 grep 'proceeding.*configure\.ac' stderr
@@ -51,4 +52,8 @@ AUTOMAKE_run -Wno-error
 grep 'configure\.ac.*configure\.in.*both present' stderr
 grep 'proceeding.*configure\.ac' stderr
 
+mv -f configure.ac configure.in
+AUTOMAKE_fails
+grep "autoconf input.*'configure.ac', not 'configure.in'" stderr
+
 :
old mode 100755 (executable)
new mode 100644 (file)
index dfc7551..ef52d59
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 1996-2012 Free Software Foundation, Inc.
+# Copyright (C) 1996-2017 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
@@ -18,7 +18,7 @@
 # If config.h is not used, @CONFIG_INCLUDE_SPEC@ should not appear
 # in Makefile.in.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_CC
@@ -31,6 +31,6 @@ END
 $ACLOCAL
 $AUTOMAKE
 
-$FGREP '@CONFIG_INCLUDE_SPEC@' Makefile.in && Exit 1
+$FGREP '@CONFIG_INCLUDE_SPEC@' Makefile.in && exit 1
 
 :
old mode 100755 (executable)
new mode 100644 (file)
index 93851ca..7b10417
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2003-2012 Free Software Foundation, Inc.
+# Copyright (C) 2003-2017 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
@@ -17,7 +17,7 @@
 # Test to make sure links created by AC_CONFIG_LINKS get removed with
 # 'make distclean'
 
-. ./defs || Exit 1
+. test-init.sh
 
 echo 'SUBDIRS = sdir' > Makefile.am
 : > src
@@ -60,11 +60,11 @@ $MAKE distclean
 test -f src
 test -f sdir/src2
 
-test -r dest && Exit 1
-test -r dest2 && Exit 1
-test -r sdir/dest3 && Exit 1
-test -r dest4 && Exit 1
-test -r sdir/dest5 && Exit 1
-test -r sdir-no-make/dest6 && Exit 1
+test -r dest && exit 1
+test -r dest2 && exit 1
+test -r sdir/dest3 && exit 1
+test -r dest4 && exit 1
+test -r sdir/dest5 && exit 1
+test -r sdir-no-make/dest6 && exit 1
 
 :
old mode 100755 (executable)
new mode 100644 (file)
index 4a1478b..c9abb59
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2003-2012 Free Software Foundation, Inc.
+# Copyright (C) 2003-2017 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
@@ -17,7 +17,7 @@
 # Test to make sure that sources for links created by AC_CONFIG_LINKS
 # are distributed.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat > Makefile.am << 'END'
 SUBDIRS = sdir
old mode 100755 (executable)
new mode 100644 (file)
index ffb0d98..254e610
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2003-2012 Free Software Foundation, Inc.
+# Copyright (C) 2003-2017 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
@@ -17,7 +17,7 @@
 # Test to make sure that AC_CONFIG_LINKS using a variable source
 # is not broken.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat > Makefile.am << 'END'
 SUBDIRS = sdir
@@ -59,8 +59,8 @@ $AUTOMAKE
 
 # $my_src_dir and $my_dest are variables local to configure, they should
 # not appear in Makefile.
-grep my_src_dir Makefile.in && Exit 1
-grep my_dest Makefile.in && Exit 1
+grep my_src_dir Makefile.in && exit 1
+grep my_dest Makefile.in && exit 1
 
 ./configure
 test -r sdir/dest2
@@ -71,12 +71,12 @@ test -r dest5
 $MAKE test
 
 $MAKE distclean
-test ! -r sdir/dest2
-test ! -r sdir/dest3
+test ! -e sdir/dest2
+test ! -e sdir/dest3
 test -r dest  # Should still exist, Automake knows nothing about it.
 test -r dest5 # Ditto.
 rm -f dest dest5
-test ! -r dest4
+test ! -e dest4
 
 mkdir build
 cd build
old mode 100755 (executable)
new mode 100644 (file)
index a1f2f0e..57c0de6
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2003-2012 Free Software Foundation, Inc.
+# Copyright (C) 2003-2017 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
@@ -17,7 +17,7 @@
 # Test to make sure links to _identical files_ created by AC_CONFIG_LINKS get
 # removed with 'make distclean' only if doing a VPATH build.
 
-. ./defs || Exit 1
+. test-init.sh
 
 mkdir nonmk-subdir sdir sdir/mk-subdir
 : > src
@@ -72,10 +72,10 @@ test -f ../sdir/src2
 test -f ../nonmk-subdir/src3
 test -f ../sdir/mk-subdir/src4
 
-test -r src && Exit 1
-test -r sdir/src2 && Exit 1
-test -r nonmk-subdir/src3 && Exit 1
-test -r sdir/mk-subdir/src4 && Exit 1
+test -r src && exit 1
+test -r sdir/src2 && exit 1
+test -r nonmk-subdir/src3 && exit 1
+test -r sdir/mk-subdir/src4 && exit 1
 
 cd ..
 ./configure
old mode 100755 (executable)
new mode 100644 (file)
index b13f26a..dbf8b34
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 1996-2012 Free Software Foundation, Inc.
+# Copyright (C) 1996-2017 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
 # Test to make sure config.h can be in subdir.
 # Also, make sure config.h is properly rebuilt.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_CONFIG_FILES([subdir/Makefile])
-AM_CONFIG_HEADER([subdir/config.h:subdir/config.hin])
+AC_CONFIG_HEADERS([subdir/config.h:subdir/config.hin])
 AC_OUTPUT
 END
 
@@ -43,7 +43,7 @@ $AUTOMAKE
 #
 # cd $(top_builddir) && $(SHELL) ./config.status subdir/config.h
 ($FGREP 'subdir/config.h' subdir/Makefile.in |
-   $FGREP -v 'cd $(top_builddir)') && Exit 1
+   $FGREP -v 'cd $(top_builddir)') && exit 1
 
 $AUTOCONF
 ./configure
old mode 100755 (executable)
new mode 100644 (file)
index e77563e..dbc351e
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 1996-2012 Free Software Foundation, Inc.
+# Copyright (C) 1996-2017 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
@@ -16,7 +16,7 @@
 
 # Test to make sure configure_vars stuff works.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_SUBST([QBERT])
old mode 100755 (executable)
new mode 100644 (file)
index bc6ffca..45b374b
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 1996-2012 Free Software Foundation, Inc.
+# Copyright (C) 1996-2017 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
@@ -16,7 +16,7 @@
 
 # Test for bug reported by Jim Meyering.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_SUBST([OTHER_SCRIPTS])
old mode 100755 (executable)
new mode 100644 (file)
index a9f0f56..a9437fb
--- a/t/copy.sh
+++ b/t/copy.sh
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 1999-2012 Free Software Foundation, Inc.
+# Copyright (C) 1999-2017 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
@@ -17,7 +17,7 @@
 # Test to make sure '-c' works.  Report from Andris Pavenis.
 # See also the much more in-depth test 'add-missing'.
 
-. ./defs || Exit 1
+. test-init.sh
 
 # We'll have to cater to systems like MSYS/MinGW where there are no
 # true symlinks ('ln -s' behaves like 'cp -p'); see automake bug#10441.
@@ -77,7 +77,7 @@ test -f auxdir/install-sh
 is_symlink auxdir/install-sh
 test -f auxdir/depcomp
 is_not_symlink auxdir/depcomp
-test FAKE-DEPCOMP = `cat auxdir/depcomp`
+test FAKE-DEPCOMP = "$(cat auxdir/depcomp)"
 
 # 'automake -a -c' should not create symlinks, even when there are
 # already symlinked required auxiliary files.
old mode 100755 (executable)
new mode 100644 (file)
index dbc4993..b254567
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2009-2012 Free Software Foundation, Inc.
+# Copyright (C) 2009-2017 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
 
 # Test cscope functionality.
 
-. ./defs || Exit 1
+. test-init.sh
 
 plan_ 18
 
-ocwd=`pwd` || fatal_ "getting top-level directory"
+ocwd=$(pwd) || fatal_ "getting top-level directory"
 
-cat >> configure.ac << 'END'
-AC_CONFIG_FILES([sub/Makefile])
+cat > configure.ac << 'END'
+AC_INIT([cscope-test], [1.0])
+AM_INIT_AUTOMAKE([subdir-objects])
+AC_CONFIG_FILES([Makefile sub/Makefile])
 AC_SUBST([CC],  [who-cares])
 AC_SUBST([CXX], [who-cares])
 AC_SUBST([FC],  [who-cares])
@@ -83,10 +85,10 @@ test_cleanup ()
     # VPATH build.
     $MAKE distcleancheck
   fi \
-    && test ! -f cscope.files \
-    && test ! -f cscope.out \
-    && test ! -f cscope.in.out \
-    && test ! -f cscope.po.out \
+    && test ! -e cscope.files \
+    && test ! -e cscope.out \
+    && test ! -e cscope.in.out \
+    && test ! -e cscope.po.out \
     || r='not ok'
   result_ "$r" "[$pfx] make distcheck"
 }
@@ -105,8 +107,7 @@ test_cscope ()
   fi
 
   r=ok
-  $MAKE cscope 2>stderr || r='not ok'
-  cat stderr >&2
+  run_make -E cscope || r='not ok'
   grep 'cannot find file' stderr && r='not ok'
   rm -f stderr
   result_ "$r" "[$pfx] make cscope"
@@ -156,7 +157,7 @@ if using_gmake; then
 
 else
 
-  skip_row_ 12 -r "cscope in VPATH required GNU make"
+  skip_row_ 12 -r "cscope in VPATH requires GNU make"
 
 fi
 
old mode 100755 (executable)
new mode 100644 (file)
index f72bb6a..8cb618e
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2009-2012 Free Software Foundation, Inc.
+# Copyright (C) 2009-2017 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
@@ -17,7 +17,7 @@
 # The 'cscope' target should not fail if there are no sources.
 
 required=
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_OUTPUT
old mode 100755 (executable)
new mode 100644 (file)
index 47bcd4d..2edcad0
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2009-2012 Free Software Foundation, Inc.
+# Copyright (C) 2009-2017 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
@@ -19,7 +19,7 @@
 # is empty.
 
 required=cscope
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_CONFIG_FILES([sub/Makefile])
diff --git a/t/cxx-demo.sh b/t/cxx-demo.sh
new file mode 100644 (file)
index 0000000..1fb7e54
--- /dev/null
@@ -0,0 +1,182 @@
+#! /bin/sh
+# Copyright (C) 2012-2017 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/>.
+
+# Demo on C++ support.
+
+required=c++
+am_create_testdir=empty
+. test-init.sh
+
+cat > configure.ac << 'END'
+AC_INIT([GNU C++ Demo], [1.3], [bug-automake@gnu.org])
+AC_CONFIG_SRCDIR([play.c++])
+AC_CONFIG_AUX_DIR([build-aux])
+AM_INIT_AUTOMAKE
+# The C compiler shouldn't be required in any way.
+CC=false; AC_SUBST([CC])
+AC_PROG_CXX
+AH_BOTTOM([
+#ifndef GREETINGS
+#  define GREETINGS "Howdy"
+#endif])
+AC_DEFINE([OK_AC], [1],
+          [Give "good to go" declaration from configure.ac])
+AC_CONFIG_HEADERS([config.hxx])
+AC_CONFIG_FILES([Makefile])
+AC_OUTPUT
+END
+
+cat > Makefile.am << 'END'
+AUTOMAKE_OPTIONS = subdir-objects
+
+bin_PROGRAMS = work play
+common_sources = common.hpp foo.cpp sub/bar.cc
+AM_CPPFLAGS = -DOK_AM=1
+play_SOURCES = play.c++ play.hh $(common_sources)
+work_SOURCES = work.cxx work.h++ $(common_sources)
+work_CXXFLAGS = -D'GREETINGS="Good morning"'
+
+.PHONY: test-objs
+check-local: test-objs
+test-objs:
+       test -f play.$(OBJEXT)
+       test -f foo.$(OBJEXT)
+       test -f sub/bar.$(OBJEXT)
+       test -f work-foo.$(OBJEXT)
+       test -f sub/work-bar.$(OBJEXT)
+       test -f work-work.$(OBJEXT)
+END
+
+mkdir sub build-aux
+
+$ACLOCAL
+$AUTOHEADER
+test -f config.hxx.in
+$AUTOCONF
+$AUTOMAKE --add-missing
+test -f build-aux/depcomp
+# Not needed by C++ compilers.
+test ! -e build-aux/compile
+
+cat > work.h++ << 'END'
+#define ACTION "work"
+class Hello_CXX
+{
+  public:
+    Hello_CXX() { }
+    virtual ~Hello_CXX () { }
+    void hello_cxx_class ();
+};
+END
+
+cat > play.hh << 'END'
+#define ACTION "play"
+void hello_cxx_function (void);
+END
+
+cat > common.hpp << 'END'
+/* Common header. */
+
+#include <config.hxx>
+
+#if !OK_AM
+#error "missing OK from Makefile.am"
+choke me
+#endif
+
+#if !OK_AC
+#error "missing OK from configure.ac"
+choke me
+#endif
+
+#include <iostream>
+END
+
+cat > work.cxx << 'END'
+#include "common.hpp"
+#include "work.h++"
+#include <cstdlib>
+using namespace std;
+int main (void)
+{
+  cout << "We are working :-(" << endl;
+  Hello_CXX *hello = new Hello_CXX;
+  hello->hello_cxx_class ();
+  return EXIT_SUCCESS;
+}
+END
+
+cat > play.c++ << 'END'
+#include "common.hpp"
+#include "play.hh"
+int main (void)
+{
+  std::cout << "We are playing :-)" << std::endl;
+  hello_cxx_function ();
+  return 0;
+}
+END
+
+cat > foo.cpp <<'END'
+#include <config.hxx>
+#include "work.h++"
+#include <iostream>
+using namespace std;
+void Hello_CXX::hello_cxx_class (void)
+{
+  cout << GREETINGS << ", " << ACTION << "." << endl;
+}
+END
+
+cat > sub/bar.cc << 'END'
+#include <config.hxx>
+#include "play.hh"
+#include <stdio.h>
+void hello_cxx_function (void)
+{
+  printf ("%s, %s!\n", GREETINGS, ACTION);
+}
+END
+
+./configure
+$MAKE
+$MAKE test-objs
+
+if ! cross_compiling; then
+  unindent > exp.play << 'END'
+    We are playing :-)
+    Howdy, play!
+END
+  unindent > exp.work << 'END'
+    We are working :-(
+    Good morning, work.
+END
+  for p in play work; do
+    # The program must run correctly (exit status = 0).
+    ./$p
+    # And it must have the expected output.  Note that we strip extra
+    # CR characters (if any), to cater to MinGW programs on MSYS.
+    # See automake bug#14493.
+    ./$p | tr -d '\015' > got.$p || { cat got.$p; exit 1; }
+    cat exp.$p
+    cat got.$p
+    diff exp.$p got.$p
+  done
+fi
+
+$MAKE distcheck
+
+:
diff --git a/t/cxx-lt-demo.sh b/t/cxx-lt-demo.sh
new file mode 100644 (file)
index 0000000..852cee7
--- /dev/null
@@ -0,0 +1,134 @@
+#! /bin/sh
+# Copyright (C) 2012-2017 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/>.
+
+# Demo on Libtool/C++ support.
+
+required='libtoolize c++'
+am_create_testdir=empty
+. test-init.sh
+
+cat > configure.ac << 'END'
+AC_INIT([GNU C++/Libtool Demo], [0.73], [bug-automake@gnu.org])
+AC_CONFIG_SRCDIR([lib/libfoo.c++])
+AC_CONFIG_AUX_DIR([ax])
+AM_INIT_AUTOMAKE
+AC_CANONICAL_HOST
+AC_CANONICAL_BUILD
+AC_PROG_CXX
+AM_PROG_AR
+LT_INIT
+AC_CONFIG_FILES([
+  Makefile
+  src/Makefile
+  lib/Makefile
+  try.sh:try.in
+])
+AC_OUTPUT
+END
+
+mkdir ax lib src
+
+cat > Makefile.am <<'END'
+SUBDIRS = lib src
+
+AUTOMAKE_OPTIONS = parallel-tests
+TEST_EXTENSIONS = .sh
+SH_LOG_COMPILER = $(SHELL) -ex
+TESTS = try.sh
+
+.PHONY: test-objs
+check-local: test-objs
+test-objs:
+       test -f src/main.$(OBJEXT)
+       test -f lib/libfoo.lo
+END
+
+cat > src/Makefile.am << 'END'
+bin_PROGRAMS = zardoz
+zardoz_SOURCES = main.cc
+zardoz_LDADD = $(top_builddir)/lib/libfoo.la
+AM_CPPFLAGS = -I$(top_builddir)/lib
+END
+
+cat > lib/Makefile.am << 'END'
+lib_LTLIBRARIES = libfoo.la
+nodist_libfoo_la_SOURCES = libfoo.h++
+libfoo_la_SOURCES = libfoo.c++
+libfoo.h++: $(srcdir)/libfoo.c++
+       echo '#include <string>' >$@-t
+       grep "target *(" "$(srcdir)/libfoo.c++" >>$@-t
+       echo ';' >>$@-t
+       chmod a-w $@-t && mv -f $@-t $@
+BUILT_SOURCES = libfoo.h++
+DISTCLEANFILES = $(BUILT_SOURCES)
+END
+
+cat > try.in << 'END'
+#!/bin/sh
+set -e
+if test x"$host_alias" = x || test x"$build_alias" = x"$host_alias"; then
+  ./src/zardoz
+  test "`./src/zardoz`" = 'Howdy, Testsuite!'
+else
+  echo "Skip: cannot run a cross-compiled program"
+  exit 77
+fi
+END
+
+libtoolize --copy
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE --add-missing --copy
+
+ls -l . ax # For debugging.
+# Ideally, the 'compile' script should not be required by C++ compilers.
+# But alas, LT_INIT seems to invoke AC_PROG_CC anyway, and that brings in
+# that script.
+for f in ltmain.sh depcomp compile config.guess config.sub; do
+  test -f ax/$f && test ! -h ax/$f || exit 1
+done
+
+cat > src/main.cc << 'END'
+#include "libfoo.h++"
+#include <iostream>
+using namespace std;
+int main (void)
+{
+  cout << "Howdy, " << target () << "!" << endl;
+  return 0;
+}
+END
+
+cat > lib/libfoo.c++ << 'END'
+#include "libfoo.h++"
+std::string target (void)
+{
+  std::string s1 = "Test";
+  std::string s2 = "suite";
+  return (s1 + s2);
+}
+END
+
+./configure
+run_make CC=false
+ls -l . src lib # For debugging.
+$MAKE test-objs
+VERBOSE=yes $MAKE check-TESTS
+grep 'Howdy.*Testsuite' try.log || grep 'Skip:.*cross-compiled' try.log
+
+$MAKE distcheck
+
+:
old mode 100755 (executable)
new mode 100644 (file)
index 63e55b8..d31a3ad
--- a/t/cxx.sh
+++ b/t/cxx.sh
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2001-2012 Free Software Foundation, Inc.
+# Copyright (C) 2001-2017 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
@@ -17,7 +17,7 @@
 # Test that '.c++' extension works.
 # From Ralf Corsepius.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_CXX
old mode 100755 (executable)
new mode 100644 (file)
index 243e607..c97f6d4
--- a/t/cxx2.sh
+++ b/t/cxx2.sh
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2002-2012 Free Software Foundation, Inc.
+# Copyright (C) 2002-2017 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
@@ -16,7 +16,7 @@
 
 # Test that Automake suggests using AC_PROG_CXX if C++ sources are used.
 
-. ./defs || Exit 1
+. test-init.sh
 
 echo AC_PROG_CC >>configure.ac
 
old mode 100755 (executable)
new mode 100644 (file)
index cc69163..7de24f7
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 1998-2012 Free Software Foundation, Inc.
+# Copyright (C) 1998-2017 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
@@ -16,7 +16,7 @@
 
 # Make sure automake sees AC_PROG_CXXCPP.  From Garth Corral.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_CXXCPP
@@ -27,4 +27,6 @@ END
 $ACLOCAL
 $AUTOMAKE
 
-grep '^CXXCPP' Makefile.in
+grep '^CXXCPP =' Makefile.in
+
+:
old mode 100755 (executable)
new mode 100644 (file)
index 6f4ce2e..9714d67
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 1997-2012 Free Software Foundation, Inc.
+# Copyright (C) 1997-2017 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
@@ -16,7 +16,7 @@
 
 # Test to make sure LIBOBJS and C++ sources work right.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_CXX
old mode 100755 (executable)
new mode 100644 (file)
index 5ce3beb..b4ee5d8
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 1996-2012 Free Software Foundation, Inc.
+# Copyright (C) 1996-2017 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
@@ -16,7 +16,7 @@
 
 # Test to make sure C++ linker is used when appropriate.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_CC
old mode 100755 (executable)
new mode 100644 (file)
index 66d0b0d..df2e6fe
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 1996-2012 Free Software Foundation, Inc.
+# Copyright (C) 1996-2017 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
@@ -16,7 +16,7 @@
 
 # Test to make sure pure C++ sources don't include C-specific code.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_CXX
@@ -33,5 +33,5 @@ END
 $ACLOCAL
 $AUTOMAKE
 
-$FGREP '(CC)' Makefile.in && Exit 1
-Exit 0
+$FGREP '(CC)' Makefile.in && exit 1
+exit 0
diff --git a/t/cxxo.sh b/t/cxxo.sh
deleted file mode 100755 (executable)
index a754701..0000000
--- a/t/cxxo.sh
+++ /dev/null
@@ -1,34 +0,0 @@
-#! /bin/sh
-# Copyright (C) 1996-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 C++ files are rewritten to ".o" and not just "o".
-. ./defs || Exit 1
-
-cat >> configure.ac << 'END'
-AC_PROG_CXX
-END
-
-cat > Makefile.am << 'END'
-sbin_PROGRAMS = anonymous
-anonymous_SOURCES = doe.C
-END
-
-: > doe.C
-
-$ACLOCAL
-$AUTOMAKE
-
-$FGREP 'doe.$(OBJEXT)' Makefile.in
diff --git a/t/cygnus-dependency-tracking.sh b/t/cygnus-dependency-tracking.sh
deleted file mode 100755 (executable)
index 6c858c1..0000000
+++ /dev/null
@@ -1,74 +0,0 @@
-#! /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/>.
-
-# Check that cygnus mode disables automatic dependency tracking.
-# And check that this *cannot* be overridden.
-
-required=cc
-. ./defs || Exit 1
-
-cat >> configure.ac <<'END'
-AM_MAINTAINER_MODE
-AC_PROG_CC
-AC_OUTPUT
-END
-
-cat > Makefile.am <<'END'
-AUTOMAKE_OPTIONS = -Wno-obsolete
-bin_PROGRAMS = foo
-foo_SOURCES = foo.c
-.PHONY: test-nodeps
-test-nodeps:
-       test ! -d .deps
-       test ! -d _deps
-       test ! -d '$(DEPDIR)'
-END
-
-cat > foo.c <<'END'
-#include "bar.h"
-int main ()
-{
-  GIVE_BACK 0;
-}
-END
-
-cat > bar.sav <<'END'
-#define GIVE_BACK return
-END
-
-cp bar.sav bar.h
-
-$ACLOCAL
-$AUTOMAKE --include-deps --cygnus --include-deps
-$AUTOCONF
-
-# Unknown options should cause just warnings from configure.
-./configure --enable-dependency-tracking
-$MAKE
-$MAKE test-nodeps
-
-: > bar.h
-$MAKE
-$MAKE test-nodeps
-
-# Sanity check.
-$MAKE clean
-$MAKE >out 2>&1 && { cat out; Exit 1; }
-cat out
-# Not all compilers mention the undefined symbol in the error message.
-grep GIVE_BACK out || grep main out
-
-:
diff --git a/t/cygnus-imply-foreign.sh b/t/cygnus-imply-foreign.sh
deleted file mode 100755 (executable)
index 1173a47..0000000
+++ /dev/null
@@ -1,60 +0,0 @@
-#! /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/>.
-
-# Check that 'cygnus' mode imply 'foreign' mode.
-
-. ./defs || Exit 1
-
-cat >> configure.ac <<'END'
-# This is *required* in cygnus mode
-AM_MAINTAINER_MODE
-END
-
-$ACLOCAL
-
-: > Makefile.am
-
-# We want complete control automake flags, while honouring the
-# user overrides for $AUTOMAKE.
-AUTOMAKE=$am_original_AUTOMAKE
-
-# Sanity check: gnu mode must complain about missing files and
-# portability problems.
-AUTOMAKE_fails
-grep 'required file.*README' stderr
-
-# But cygnus mode should imply foreign mode, so no complaints.
-# And cygnus mode should by able to override gnu and gnits modes.
-$AUTOMAKE --cygnus -Werror
-$AUTOMAKE --gnu --cygnus -Werror
-$AUTOMAKE --gnits --cygnus -Werror
-
-# Try again, this time enabling cygnus mode from Makefile.am.
-cp Makefile.am Makefile.sav
-echo 'AUTOMAKE_OPTIONS = gnu cygnus' >> Makefile.am
-$AUTOMAKE -Werror
-mv -f Makefile.sav Makefile.am
-
-# Try again, this time enabling cygnus mode from configure.ac.
-cp configure.ac configure.sav
-sed 's/^AM_INIT_AUTOMAKE/&([gnits cygnus])/' configure.sav >configure.ac
-cmp configure.ac configure.sav && fatal_ 'failed to edit configure.ac'
-
-$ACLOCAL --force
-$AUTOMAKE -Werror
-mv -f configure.sav configure.ac
-
-:
diff --git a/t/cygnus-no-dist.sh b/t/cygnus-no-dist.sh
deleted file mode 100755 (executable)
index d94a8f5..0000000
+++ /dev/null
@@ -1,86 +0,0 @@
-#! /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/>.
-
-# Check that cygnus mode forbids creation of distribution tarball.
-
-. ./defs || Exit 1
-
-echo AM_MAINTAINER_MODE >> configure.ac
-mv -f configure.ac configure.stub
-
-cat configure.stub - > configure.ac <<'END'
-AC_OUTPUT
-END
-
-: > Makefile.am
-
-$ACLOCAL
-$AUTOCONF
-$AUTOMAKE --cygnus -Wno-obsolete
-
-./configure
-$MAKE
-
-for target in dist distdir distcheck dist-all dist-gzip; do
-  $MAKE -n $target >out 2>&1 && { cat out; Exit 1; }
-  cat out
-  grep $target out
-done
-
-# Now check that cygnus mode in a subdirectory disables
-# distribution-building in that subdirectory.
-
-cat > Makefile.am <<'END'
-SUBDIRS = sub1 sub2
-END
-
-mkdir sub1 sub2
-: > sub1/Makefile.am
-cat > sub2/Makefile.am <<'END'
-# The '-Wall' after 'cygnus' should ensure no warning gets
-# unintentionally disabled.  We are particularly interested
-# in override warnings, for when (below) we add the 'distdir'
-# target.
-AUTOMAKE_OPTIONS = cygnus -Wall
-# This is required because the 'cygnus' option is now deprecated.
-AUTOMAKE_OPTIONS += -Wno-obsolete
-END
-
-cat configure.stub - > configure.ac <<'END'
-AC_CONFIG_FILES([sub1/Makefile sub2/Makefile])
-AC_OUTPUT
-END
-
-$AUTOCONF
-$AUTOMAKE
-
-./configure
-$MAKE
-cd sub2
-$MAKE -n distdir >out 2>&1 && { cat out; Exit 1; }
-grep distdir out
-cd ..
-
-cat >> sub2/Makefile.am <<'END'
-distdir:
-END
-$AUTOMAKE sub2/Makefile
-./config.status sub2/Makefile
-
-$MAKE distdir
-$MAKE dist
-
-:
diff --git a/t/cygnus-no-installinfo.sh b/t/cygnus-no-installinfo.sh
deleted file mode 100755 (executable)
index d46b6b3..0000000
+++ /dev/null
@@ -1,55 +0,0 @@
-#! /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/>.
-
-# Check that cygnus mode enables the 'no-installinfo' option.
-
-required=makeinfo
-. ./defs || Exit 1
-
-cat >> configure.ac <<'END'
-AM_MAINTAINER_MODE
-AC_OUTPUT
-END
-
-cat > Makefile.am <<'END'
-info_TEXINFOS = foo.texi
-END
-
-cat > foo.texi <<'END'
-@setfilename foo.info
-END
-
-$ACLOCAL
-# -Wno-override works around a buglet in definition of $(MAKEINFO)
-# in cygnus mode; see also xfailing test 'txinfo5.test'.
-# -Wno-obsolete accounts for the fact that the cygnus mode is now
-# deprecated.
-$AUTOMAKE --cygnus -Wno-override -Wno-obsolete
-$AUTOCONF
-
-cwd=`pwd` || Exit 1
-./configure --prefix="$cwd"/_inst
-$MAKE
-$MAKE install
-test ! -d _inst
-test ! -r foo.info
-test ! -d _inst/share/info
-$MAKE install-info
-ls -l _inst
-test -f foo.info
-test -f _inst/share/info/foo.info
-
-:
old mode 100755 (executable)
new mode 100644 (file)
similarity index 61%
rename from t/cygnus-deprecation.sh
rename to t/cygnus-no-more.sh
index 779914b..ab2860e
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2012 Free Software Foundation, Inc.
+# Copyright (C) 2012-2017 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
 # That feature will be removed in the next major Automake release.
 # See automake bug#11034.
 
-. ./defs || Exit 1
+. test-init.sh
 
-warn_rx='support for Cygnus.*trees.*deprecated'
-
-cat >> configure.ac <<'END'
-AC_PROG_CC
-AM_MAINTAINER_MODE
-END
+warn_rx='support for Cygnus.*trees.*removed'
 
 $ACLOCAL
-$AUTOCONF
-
-: > Makefile.am
 
-# 'cygnus' option from command line
-$AUTOMAKE --cygnus -Wno-obsolete
-AUTOMAKE_fails --cygnus
-grep "^automake.*: .*$warn_rx" stderr
-AUTOMAKE_fails -Wnone -Wobsolete --cygnus
-grep "^automake.*: .*$warn_rx" stderr
-AUTOMAKE_fails --cygnus -Wnone -Wobsolete
-grep "^automake.*: .*$warn_rx" stderr
-
-rm -rf autom4te*.cache
+# Use of 'cygnus' option must raise an unconditional error, not a
+# warning.
+AUTOMAKE="$am_original_AUTOMAKE -Wnone -Wno-error"
 
 # 'cygnus' option in Makefile.am
 echo "AUTOMAKE_OPTIONS = cygnus" > Makefile.am
-cat Makefile.am # For debugging.
-$AUTOMAKE -Wno-obsolete
 AUTOMAKE_fails
 grep "^Makefile\.am:1:.*$warn_rx" stderr
-AUTOMAKE_fails -Wnone -Wobsolete
-grep "^Makefile\.am:1:.*$warn_rx" stderr
 
 rm -rf autom4te*.cache
 
@@ -59,10 +40,7 @@ rm -rf autom4te*.cache
 sed "s|^\\(AM_INIT_AUTOMAKE\\).*|\1([cygnus])|" configure.ac > t
 diff configure.ac t && fatal_ "failed to edit configure.ac"
 mv -f t configure.ac
-$AUTOMAKE -Wno-obsolete
 AUTOMAKE_fails
 grep "^configure\.ac:2:.*$warn_rx" stderr
-AUTOMAKE_fails -Wnone -Wobsolete
-grep "^configure\.ac:2:.*$warn_rx" stderr
 
 :
old mode 100755 (executable)
new mode 100644 (file)
index 9415fb6..2a144ab
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 1997-2012 Free Software Foundation, Inc.
+# Copyright (C) 1997-2017 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
@@ -16,7 +16,7 @@
 
 # Test basic Cygwin32 functionality.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_CC
@@ -32,7 +32,7 @@ END
 $ACLOCAL
 $AUTOMAKE
 
-grep '^CYGWIN' Makefile.in && Exit 1
+grep '^CYGWIN' Makefile.in && exit 1
 grep 'EXEEXT' Makefile.in
 
 :
old mode 100755 (executable)
new mode 100644 (file)
index 992bf62..5df5e6a
--- a/t/dash.sh
+++ b/t/dash.sh
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 1999-2012 Free Software Foundation, Inc.
+# Copyright (C) 1999-2017 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
@@ -17,7 +17,7 @@
 # Test to make sure '-' can be used in path.
 # Report from Matthew D. Langston.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat > Makefile.am << 'END'
 include Make-lang
old mode 100755 (executable)
new mode 100644 (file)
index 9b66a56..ae7517d
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 1996-2012 Free Software Foundation, Inc.
+# Copyright (C) 1996-2017 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
@@ -16,7 +16,7 @@
 
 # Make sure aclocal picks up on all macro definitions.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat > acinclude.m4 << 'END'
 AC_DEFUN([AM_FUNC_THREE])
old mode 100755 (executable)
new mode 100644 (file)
index 0b3f96b..b65c370
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 1996-2012 Free Software Foundation, Inc.
+# Copyright (C) 1996-2017 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
@@ -17,7 +17,7 @@
 # Make sure we don't mistake a macro definition for an invocation.
 # From Jim Meyering.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 dnl if buggy this will require getloadavg.c
old mode 100755 (executable)
new mode 100644 (file)
index 8cdc3a1..0961b30
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2011-2012 Free Software Foundation, Inc.
+# Copyright (C) 2011-2017 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
@@ -18,7 +18,7 @@
 # to an absolute path.
 
 required=runtest
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_OUTPUT
old mode 100755 (executable)
new mode 100644 (file)
index 05ae200..0e6cdf1
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2011-2012 Free Software Foundation, Inc.
+# Copyright (C) 2011-2017 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
@@ -18,7 +18,7 @@
 # (both as TCL variable and as environment variable).
 
 required=runtest
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_OUTPUT
@@ -43,7 +43,7 @@ END
 cat > env.test/env.exp << 'END'
 set env_srcdir $env(srcdir)
 send_user "env_srcdir: $env_srcdir\n"
-if { [ regexp "^\.\.?$" $env_srcdir ] } {
+if { [ regexp "^\.(\./\.\.)?$" $env_srcdir ] } {
     pass "test_env_src"
 } else {
     fail "test_env_src"
@@ -52,13 +52,13 @@ END
 
 cat > tcl.test/tcl.exp << 'END'
 send_user "tcl_srcdir: $srcdir\n"
-if { [ regexp "^\.\.?$" $srcdir ] } {
+if { [ regexp "^\.(\./\.\.)?$" $srcdir ] } {
     pass "test_tcl_src"
 } else {
     fail "test_tcl_src"
 }
 send_user "tcl_orig_srcdir: $orig_srcdir\n"
-if { [ regexp "^\.\.?$" $orig_srcdir ] } {
+if { [ regexp "^\.(\./\.\.)?$" $orig_srcdir ] } {
     pass "test_tcl_orig_src"
 } else {
     fail "test_tcl_orig_src"
old mode 100755 (executable)
new mode 100644 (file)
index c3bfff6..1af3774
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2011-2012 Free Software Foundation, Inc.
+# Copyright (C) 2011-2017 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
@@ -17,7 +17,7 @@
 # Check that the files in $(EXTRA_DEJAGNU_SITE_CONFIG) get appended to
 # site.exp in the same order in which they're listed in that variable.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_OUTPUT
old mode 100755 (executable)
new mode 100644 (file)
index f0f6194..d111f3c
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2011-2012 Free Software Foundation, Inc.
+# Copyright (C) 2011-2017 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
@@ -18,7 +18,7 @@
 # automake-generated Makefile.
 
 required=runtest
-. ./defs || Exit 1
+. test-init.sh
 
 write_check_for ()
 {
@@ -78,7 +78,7 @@ set baz "/foo/"
 set qux "/foo/"
 END
 
-$MAKE check && { cat site.exp; Exit 1; }
+$MAKE check && { cat site.exp; exit 1; }
 grep 'PASS: test_foo' tool.sum
 grep 'FAIL: test_bar' tool.sum
 grep 'FAIL: test_baz' tool.sum
@@ -104,7 +104,7 @@ $sleep
 $AUTOMAKE Makefile
 ./config.status Makefile
 
-$MAKE check || { cat site.exp; Exit 1; }
+$MAKE check || { cat site.exp; exit 1; }
 cat site.exp
 cat bar.dir/bar
 $FGREP '/bar/' site.exp
@@ -147,13 +147,13 @@ grep 'zardoz.*/quux/' site.exp
 $MAKE check
 grep 'PASS: test_zardoz' tool.sum
 grep 'zardoz: /zardoz/' tool.log
-grep 'zardoz.*quux' tool.log && Exit 1
+grep 'zardoz.*quux' tool.log && exit 1
 
 # Check that files in $(EXTRA_DEJAGNU_SITE_CONFIG) are not distributed
 # by default.
 $MAKE distdir
 ls -l $distdir
-test ! -r $distdir/bar.dir/bar
-test ! -r $distdir/quux.exp
+test ! -e $distdir/bar.dir/bar
+test ! -e $distdir/quux.exp
 
 :
old mode 100755 (executable)
new mode 100644 (file)
index 9be5eba..6f3a75f
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2011-2012 Free Software Foundation, Inc.
+# Copyright (C) 2011-2017 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
@@ -17,7 +17,7 @@
 # Check that the user can edit the Makefile-generated site.exp, and
 # have its edits survive to the remaking of that file.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_OUTPUT
@@ -56,7 +56,7 @@ $MAKE site.exp
 cat site.exp
 is_newest site.exp Makefile  # Sanity check.
 grep '|objdir|' site.exp
-test `grep -c '|objdir|' site.exp` -eq 1
+test $($FGREP -c '|objdir|' site.exp) -eq 1
 
 # We can do a "more semantic" check if DejaGnu is available.
 if runtest SOMEPROGRAM=someprogram --version; then
old mode 100755 (executable)
new mode 100644 (file)
index 583158f..563bae9
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 1996-2012 Free Software Foundation, Inc.
+# Copyright (C) 1996-2017 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
@@ -15,9 +15,9 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 # Superficial test to check that dejagnu tests and automake-style
-# tests can coexist.  See also related deeper test 'check12.test'.
+# tests can coexist.  See also related deeper test 'check12.sh'.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat > Makefile.am << 'END'
 AUTOMAKE_OPTIONS = dejagnu
old mode 100755 (executable)
new mode 100644 (file)
index 0a0d091..f4088b6
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2001-2012 Free Software Foundation, Inc.
+# Copyright (C) 2001-2017 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
@@ -16,7 +16,7 @@
 
 # Make sure we don't override the user's site.exp rule.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac <<'END'
 AC_OUTPUT
@@ -34,7 +34,7 @@ $AUTOCONF
 $AUTOMAKE -Wno-override
 
 grep 'site\.exp' Makefile.in
-test `grep -c '^site\.exp:' Makefile.in` -eq 1
+test $(grep -c '^site\.exp:' Makefile.in) -eq 1
 
 ./configure
 $MAKE site.exp
old mode 100755 (executable)
new mode 100644 (file)
index 7d15bc9..e0413ae
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2003-2012 Free Software Foundation, Inc.
+# Copyright (C) 2003-2017 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
@@ -17,7 +17,7 @@
 # Check that the DejaGnu rules work for a simple program and test case.
 
 required=runtest
-. ./defs || Exit 1
+. test-init.sh
 
 cat > hammer << 'END'
 #! /bin/sh
@@ -62,9 +62,8 @@ $MAKE distcheck
 
 # Ensure that the envvar RUNTESTFLAGS is used.
 # Report from Mark Mitchell.
-RUNTESTFLAGS=--unknown-runtest-option $MAKE check >output 2>&1 \
-  && { cat output; Exit 1; }
-cat output
+RUNTESTFLAGS=--unknown-runtest-option; export RUNTESTFLAGS
+run_make -M -e FAIL check
 $FGREP 'unknown-runtest-option' output
 
 :
old mode 100755 (executable)
new mode 100644 (file)
index 44904df..1ad535b
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2003-2012 Free Software Foundation, Inc.
+# Copyright (C) 2003-2017 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
 # Check that the DejaGnu rules work for a simple program and test case.
 # Also check PR 488: Failure of the first of several tools tested.
 # From the original bug report:
-# ``If you use dejagnu for testing and have multiple tools (i.e.,
+#   If you use dejagnu for testing and have multiple tools (i.e.,
 #   multiple entries in the DEJATOOL variable) then the success/failure
 #   of "make check" is only dependent on the success/failure of the
 #   tests on the final tool. Thus there may be failures in the tests on
-#   previous tools, but at first glance "make check" has passed.''
+#   previous tools, but at first glance "make check" has passed.
 
 required=runtest
-. ./defs || Exit 1
+. test-init.sh
 
 cat > hammer << 'END'
 #! /bin/sh
@@ -93,7 +93,7 @@ mv -f thammer hammer
 chmod +x hammer
 
 rm -f hammer.log hammer.sum spanner.log spanner.sum
-$MAKE check && Exit 1
+$MAKE check && exit 1
 test -f hammer.log
 test -f hammer.sum
 test -f spanner.log
old mode 100755 (executable)
new mode 100644 (file)
index 26eaa60..6da93b6
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2003-2012 Free Software Foundation, Inc.
+# Copyright (C) 2003-2017 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
@@ -18,7 +18,7 @@
 # the package by default.
 
 required=runtest
-. ./defs || Exit 1
+. test-init.sh
 
 package=$me
 
old mode 100755 (executable)
new mode 100644 (file)
index 38255f6..459874a
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2003-2012 Free Software Foundation, Inc.
+# Copyright (C) 2003-2017 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
@@ -17,7 +17,7 @@
 # Check that "make check" fails, when a DejaGnu test fails.
 
 required=runtest
-. ./defs || Exit 1
+. test-init.sh
 
 cat > faildeja << 'END'
 #! /bin/sh
@@ -50,7 +50,7 @@ $AUTOMAKE --add-missing
 
 ./configure
 
-$MAKE check && Exit 1
+$MAKE check && exit 1
 test -f faildeja.log
 test -f faildeja.sum
 $FGREP 'FAIL: failing_deja_test' faildeja.sum
old mode 100755 (executable)
new mode 100644 (file)
index a926955..ea4a301
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2003-2012 Free Software Foundation, Inc.
+# Copyright (C) 2003-2017 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
@@ -18,7 +18,7 @@
 # (to detect TCL errors) on a file with TCL errors.
 
 required=runtest
-. ./defs || Exit 1
+. test-init.sh
 
 runtest --help | grep '.*--status' \
   || skip_ "dejagnu lacks support for '--status'"
@@ -54,7 +54,7 @@ $AUTOMAKE --add-missing
 
 ./configure
 
-$MAKE check && Exit 1
+$MAKE check && exit 1
 test -f failtcl.log
 test -f failtcl.sum
 $FGREP 'missing close-brace' failtcl.sum
old mode 100755 (executable)
new mode 100644 (file)
index 636286c..afcb1de
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2011-2012 Free Software Foundation, Inc.
+# Copyright (C) 2011-2017 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
@@ -19,7 +19,7 @@
 # erroring out when a still-required file is missing.
 # See also discussion about automake bug#9768.
 
-. ./defs || Exit 1
+. test-init.sh
 
 echo AC_OUTPUT >> configure.ac
 
@@ -35,13 +35,12 @@ $AUTOMAKE
 $MAKE
 
 rm -f zardoz.am
-$sleep # Required to avoid racy failures with FreeBSD make.
-$MAKE >output 2>&1 && { cat output; Exit 1; }
-cat output
+using_gmake || $sleep # Required by BSD make.
+run_make -e FAIL -M
 # 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 'foobar\.am' output && exit 1 # No spurious error, please.
 
 # Try with one less indirection.
 : > foobar.am
@@ -49,9 +48,8 @@ $AUTOMAKE Makefile
 ./config.status Makefile
 $MAKE # Sanity check.
 rm -f foobar.am
-$sleep # Required to avoid racy failures with FreeBSD make.
-$MAKE >output 2>&1 && { cat output; Exit 1; }
-cat output
+using_gmake || $sleep # Required by BSD make.
+run_make -e FAIL -M
 # This error will come from automake, not make, so we can be stricter
 # in our grepping of it.
 grep 'cannot open.*foobar\.am' output
old mode 100755 (executable)
new mode 100644 (file)
index e1bbfce..a7b7e62
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2011-2012 Free Software Foundation, Inc.
+# Copyright (C) 2011-2017 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
@@ -19,7 +19,7 @@
 # erroring out when a still-required file is missing.
 # See also discussion about automake bug#9768.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac <<'END'
 m4_include([foobar.m4])
@@ -39,13 +39,12 @@ $AUTOMAKE
 $MAKE
 
 rm -f zardoz.m4
-$MAKE >output 2>&1 && { cat output; Exit 1; }
-cat output
+run_make -e FAIL -M
 # 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
 # No spurious errors, please.
-$FGREP -v ' foobar.m4:1:' output | $FGREP 'foobar.m4' && Exit 1
+$FGREP -v ' foobar.m4:1:' output | $FGREP 'foobar.m4' && exit 1
 
 # Try with one less indirection.
 : > foobar.m4
@@ -54,12 +53,11 @@ $AUTOCONF
 ./configure
 $MAKE # Sanity check.
 rm -f foobar.m4
-$MAKE >output 2>&1 && { cat output; Exit 1; }
-cat output
+run_make -e FAIL -M
 # 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
 # No spurious errors, please (ok, this is really paranoid).
-$FGREP 'zardoz.m4' output && Exit 1
+$FGREP 'zardoz.m4' output && exit 1
 
 :
old mode 100755 (executable)
new mode 100644 (file)
index 378a1a2..56690f5
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 1996-2012 Free Software Foundation, Inc.
+# Copyright (C) 1996-2017 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
@@ -17,7 +17,7 @@
 # Test to make sure dependencies work when required macro is part of
 # autoconf.
 
-. ./defs || Exit 1
+. test-init.sh
 
 echo 'AM_FOO' >> configure.ac
 echo 'AC_DEFUN([AM_FOO], [AC_REQUIRE([AC_HEADER_STDC])])' > AM_FOO.m4
old mode 100755 (executable)
new mode 100644 (file)
index b4e26de..c3647d1
@@ -2,6 +2,7 @@
 # Automatically generated test.  DO NOT EDIT BY HAND!
 am_create_testdir=empty depmode=auto depcomp_with_libtool=no
 required="cc"
-. ./defs || Exit 1
+. test-init.sh
 plan_ 28
-. "$am_testauxdir/depcomp.sh"; exit "$?"
+. depcomp.sh
+exit $?
old mode 100755 (executable)
new mode 100644 (file)
index a415f21..36bd38a
@@ -2,6 +2,7 @@
 # Automatically generated test.  DO NOT EDIT BY HAND!
 am_create_testdir=empty depmode=cpp depcomp_with_libtool=no
 required="gcc"
-. ./defs || Exit 1
+. test-init.sh
 plan_ 28
-. "$am_testauxdir/depcomp.sh"; exit "$?"
+. depcomp.sh
+exit $?
old mode 100755 (executable)
new mode 100644 (file)
index 6e5fa6f..b8b848e
@@ -2,6 +2,7 @@
 # Automatically generated test.  DO NOT EDIT BY HAND!
 am_create_testdir=empty depmode=dashmstdout depcomp_with_libtool=no
 required="gcc"
-. ./defs || Exit 1
+. test-init.sh
 plan_ 28
-. "$am_testauxdir/depcomp.sh"; exit "$?"
+. depcomp.sh
+exit $?
old mode 100755 (executable)
new mode 100644 (file)
index a6b3b93..dd6ad4b
@@ -2,6 +2,7 @@
 # Automatically generated test.  DO NOT EDIT BY HAND!
 am_create_testdir=empty depmode=disabled depcomp_with_libtool=no
 required="cc"
-. ./defs || Exit 1
+. test-init.sh
 plan_ 28
-. "$am_testauxdir/depcomp.sh"; exit "$?"
+. depcomp.sh
+exit $?
old mode 100755 (executable)
new mode 100644 (file)
index 4026ed7..08809f9
@@ -2,6 +2,7 @@
 # Automatically generated test.  DO NOT EDIT BY HAND!
 am_create_testdir=empty depmode=gcc depcomp_with_libtool=no
 required="gcc"
-. ./defs || Exit 1
+. test-init.sh
 plan_ 28
-. "$am_testauxdir/depcomp.sh"; exit "$?"
+. depcomp.sh
+exit $?
old mode 100755 (executable)
new mode 100644 (file)
similarity index 92%
rename from t/subdir4.sh
rename to t/depcomp-implicit-auxdir.sh
index 81528b2..1281b19
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2000-2012 Free Software Foundation, Inc.
+# Copyright (C) 2000-2017 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
@@ -17,7 +17,7 @@
 # Make sure a top-level depcomp file is found when
 # AC_CONFIG_AUX_DIR is not specified.
 
-. ./defs || Exit 1
+. test-init.sh
 
 mkdir lib src
 
@@ -65,6 +65,6 @@ $AUTOMAKE --gnu
 # so that more files are included in lib's DIST_COMMON definition,
 # then you must handle the case in which depcomp is listed on a
 # continued line.
-grep '^DIST_COMMON.*depcomp' lib/Makefile.in && Exit 1
+grep '^DIST_COMMON.*depcomp' lib/Makefile.in && exit 1
 
 :
old mode 100755 (executable)
new mode 100644 (file)
index 61abb2b..da47f54
@@ -2,6 +2,7 @@
 # Automatically generated test.  DO NOT EDIT BY HAND!
 am_create_testdir=empty depmode=auto depcomp_with_libtool=yes
 required="cc libtoolize"
-. ./defs || Exit 1
+. test-init.sh
 plan_ 84
-. "$am_testauxdir/depcomp.sh"; exit "$?"
+. depcomp.sh
+exit $?
old mode 100755 (executable)
new mode 100644 (file)
index 322916e..a73f301
@@ -2,6 +2,7 @@
 # Automatically generated test.  DO NOT EDIT BY HAND!
 am_create_testdir=empty depmode=cpp depcomp_with_libtool=yes
 required="gcc libtoolize"
-. ./defs || Exit 1
+. test-init.sh
 plan_ 28
-. "$am_testauxdir/depcomp.sh"; exit "$?"
+. depcomp.sh
+exit $?
old mode 100755 (executable)
new mode 100644 (file)
index b5df560..040b756
@@ -2,6 +2,7 @@
 # Automatically generated test.  DO NOT EDIT BY HAND!
 am_create_testdir=empty depmode=dashmstdout depcomp_with_libtool=yes
 required="gcc libtoolize"
-. ./defs || Exit 1
+. test-init.sh
 plan_ 28
-. "$am_testauxdir/depcomp.sh"; exit "$?"
+. depcomp.sh
+exit $?
old mode 100755 (executable)
new mode 100644 (file)
index 1ab998e..fbdb538
@@ -2,6 +2,7 @@
 # Automatically generated test.  DO NOT EDIT BY HAND!
 am_create_testdir=empty depmode=disabled depcomp_with_libtool=yes
 required="cc libtoolize"
-. ./defs || Exit 1
+. test-init.sh
 plan_ 28
-. "$am_testauxdir/depcomp.sh"; exit "$?"
+. depcomp.sh
+exit $?
old mode 100755 (executable)
new mode 100644 (file)
index 13e34fd..1b4cb1c
@@ -2,6 +2,7 @@
 # Automatically generated test.  DO NOT EDIT BY HAND!
 am_create_testdir=empty depmode=gcc depcomp_with_libtool=yes
 required="gcc libtoolize"
-. ./defs || Exit 1
+. test-init.sh
 plan_ 28
-. "$am_testauxdir/depcomp.sh"; exit "$?"
+. depcomp.sh
+exit $?
old mode 100755 (executable)
new mode 100644 (file)
index af2e422..0f4a1b4
@@ -1,7 +1,8 @@
 #! /bin/sh
 # Automatically generated test.  DO NOT EDIT BY HAND!
 am_create_testdir=empty depmode=makedepend depcomp_with_libtool=yes
-required="cc makedepend libtoolize"
-. ./defs || Exit 1
+required="cc makedepend -c-o libtoolize"
+. test-init.sh
 plan_ 28
-. "$am_testauxdir/depcomp.sh"; exit "$?"
+. depcomp.sh
+exit $?
old mode 100755 (executable)
new mode 100644 (file)
index ce6d3cb..c1aa561
@@ -2,6 +2,7 @@
 # Automatically generated test.  DO NOT EDIT BY HAND!
 am_create_testdir=empty depmode=msvcmsys depcomp_with_libtool=yes
 required="cl mingw libtoolize"
-. ./defs || Exit 1
+. test-init.sh
 plan_ 28
-. "$am_testauxdir/depcomp.sh"; exit "$?"
+. depcomp.sh
+exit $?
old mode 100755 (executable)
new mode 100644 (file)
index 2f1f4e0..0b53a83
@@ -2,6 +2,7 @@
 # Automatically generated test.  DO NOT EDIT BY HAND!
 am_create_testdir=empty depmode=msvisualcpp depcomp_with_libtool=yes
 required="cl cygpath libtoolize"
-. ./defs || Exit 1
+. test-init.sh
 plan_ 28
-. "$am_testauxdir/depcomp.sh"; exit "$?"
+. depcomp.sh
+exit $?
old mode 100755 (executable)
new mode 100644 (file)
index c0338c9..5874242
@@ -1,7 +1,8 @@
 #! /bin/sh
 # Automatically generated test.  DO NOT EDIT BY HAND!
 am_create_testdir=empty depmode=makedepend depcomp_with_libtool=no
-required="cc makedepend"
-. ./defs || Exit 1
+required="cc makedepend -c-o"
+. test-init.sh
 plan_ 28
-. "$am_testauxdir/depcomp.sh"; exit "$?"
+. depcomp.sh
+exit $?
old mode 100755 (executable)
new mode 100644 (file)
index 7b4a0db..4f08799
@@ -2,6 +2,7 @@
 # Automatically generated test.  DO NOT EDIT BY HAND!
 am_create_testdir=empty depmode=msvcmsys depcomp_with_libtool=no
 required="cl mingw"
-. ./defs || Exit 1
+. test-init.sh
 plan_ 28
-. "$am_testauxdir/depcomp.sh"; exit "$?"
+. depcomp.sh
+exit $?
old mode 100755 (executable)
new mode 100644 (file)
index ed94b11..7f7a1fe
@@ -2,6 +2,7 @@
 # Automatically generated test.  DO NOT EDIT BY HAND!
 am_create_testdir=empty depmode=msvisualcpp depcomp_with_libtool=no
 required="cl cygpath"
-. ./defs || Exit 1
+. test-init.sh
 plan_ 28
-. "$am_testauxdir/depcomp.sh"; exit "$?"
+. depcomp.sh
+exit $?
old mode 100755 (executable)
new mode 100644 (file)
index f2e0370..5a5d5ba
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2001-2012 Free Software Foundation, Inc.
+# Copyright (C) 2001-2017 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
@@ -17,7 +17,7 @@
 # Test to make sure depcomp is installed and found properly
 # when required for multiple directories.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat > configure.ac << END
 AC_INIT([$me], [1.0])
old mode 100755 (executable)
new mode 100644 (file)
index 624dee6..00c1f23
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2001-2012 Free Software Foundation, Inc.
+# Copyright (C) 2001-2017 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
@@ -18,7 +18,7 @@
 # From Pavel Roskin.
 
 required=cc
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_CONFIG_FILES([subdir/Makefile])
@@ -43,8 +43,11 @@ END
 $ACLOCAL
 $AUTOMAKE --add-missing
 $AUTOCONF
-./configure 2>stderr || { cat stderr >&2; Exit 1; }
+./configure 2>stderr || { cat stderr >&2; exit 1; }
 cat stderr >&2
-test ! -s stderr
+# Ignore warning messages sometimes seen on Mac OS X; they are
+# not automake's fault anyway, but either autoconf's or Mac's.
+sed '/rm:.*conftest\.dSYM/d' stderr >stderr2
+test -s stderr2 && { cat stderr2; exit 1; }
 
 :
old mode 100755 (executable)
new mode 100644 (file)
index 01a2403..0db7bf6
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2010-2012 Free Software Foundation, Inc.
+# Copyright (C) 2010-2017 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
 
 # Test for regressions in computation of names of .Po files for
 # automatic dependency tracking.
-# Keep this in sync with sister test 'depcomp8b.test', which checks the
+# Keep this in sync with sister test 'depcomp8b.sh', which checks the
 # same thing for libtool objects.
 
 required=cc
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_CC
-#x AM_PROG_CC_C_O
 AC_OUTPUT
 END
 
@@ -37,20 +36,25 @@ mkdir sub
 cat > foo.c << 'END'
 int main (void)
 {
-  extern int bar;
-  return bar;
+  extern int bar (void);
+  return bar ();
 }
 END
 cat > sub/bar.c << 'END'
-extern int bar = 0;
+int bar (void)
+{
+  return 0;
+}
 END
 
 $ACLOCAL
-$AUTOMAKE -a
+# FIXME: stop disabling the warnings in the 'unsupported' category
+# FIXME: once the 'subdir-objects' option has been mandatory.
+$AUTOMAKE -a -Wno-unsupported
 grep include Makefile.in # For debugging.
 grep 'include.*\./\$(DEPDIR)/foo\.P' Makefile.in
 grep 'include.*\./\$(DEPDIR)/bar\.P' Makefile.in
-grep 'include.*/\./\$(DEPDIR)' Makefile.in && Exit 1
+grep 'include.*/\./\$(DEPDIR)' Makefile.in && exit 1
 
 $AUTOCONF
 # Don't reject slower dependency extractors, for better coverage.
@@ -61,16 +65,13 @@ DISTCHECK_CONFIGURE_FLAGS='--enable-dependency-tracking' $MAKE distcheck
 
 # Try again with subdir-objects option.
 
-sed 's/#x //' configure.ac >configure.int
-mv -f configure.int configure.ac
 echo AUTOMAKE_OPTIONS = subdir-objects >> Makefile.am
 
-$ACLOCAL
-$AUTOMAKE -a
+$AUTOMAKE
 grep include Makefile.in # For debugging.
 grep 'include.*\./\$(DEPDIR)/foo\.P' Makefile.in
 grep 'include.*[^a-zA-Z0-9_/]sub/\$(DEPDIR)/bar\.P' Makefile.in
-$EGREP 'include.*/(\.|sub)/\$\(DEPDIR\)' Makefile.in && Exit 1
+$EGREP 'include.*/(\.|sub)/\$\(DEPDIR\)' Makefile.in && exit 1
 
 $AUTOCONF
 # Don't reject slower dependency extractors, for better coverage.
old mode 100755 (executable)
new mode 100644 (file)
index b5f7371..9f57a2b
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2010-2012 Free Software Foundation, Inc.
+# Copyright (C) 2010-2017 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
 
 # Test for regressions in computation of names of .Plo files for
 # automatic dependency tracking.
-# Keep this in sync with sister test 'depcomp8a.test', which checks the
+# Keep this in sync with sister test 'depcomp8a.sh', which checks the
 # same thing for non-libtool objects.
 
 required='cc libtoolize'
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_CC
@@ -31,22 +31,27 @@ AC_OUTPUT
 END
 
 cat > Makefile.am << 'END'
+## FIXME: stop disabling the warnings in the 'unsupported' category
+## FIXME: once the 'subdir-objects' option has been mandatory.
+AUTOMAKE_OPTIONS = -Wno-unsupported
 lib_LTLIBRARIES = libzardoz.la
 libzardoz_la_SOURCES = foo.c sub/bar.c
 END
 
 mkdir sub
-echo 'extern int foo = 0;' > foo.c
-echo 'extern int bar = 0;' > sub/bar.c
+echo 'int foo (void) { return 0; }' > foo.c
+echo 'int bar (void) { return 0; }' > sub/bar.c
 
 libtoolize
 
 $ACLOCAL
-$AUTOMAKE -a
+# FIXME: stop disabling the warnings in the 'unsupported' category
+# FIXME: once the 'subdir-objects' option has been mandatory.
+$AUTOMAKE -a -Wno-unsupported
 grep include Makefile.in # For debugging.
 grep 'include.*\./\$(DEPDIR)/foo\.P' Makefile.in
 grep 'include.*\./\$(DEPDIR)/bar\.P' Makefile.in
-grep 'include.*/\./\$(DEPDIR)' Makefile.in && Exit 1
+grep 'include.*/\./\$(DEPDIR)' Makefile.in && exit 1
 
 $AUTOCONF
 # Don't reject slower dependency extractors, for better coverage.
@@ -56,16 +61,13 @@ DISTCHECK_CONFIGURE_FLAGS='--enable-dependency-tracking' $MAKE distcheck
 
 # Try again with subdir-objects option.
 
-sed 's/#x //' configure.ac >configure.int
-mv -f configure.int configure.ac
-echo AUTOMAKE_OPTIONS = subdir-objects >> Makefile.am
+echo AUTOMAKE_OPTIONS += subdir-objects >> Makefile.am
 
-$ACLOCAL
-$AUTOMAKE -a
+$AUTOMAKE
 grep include Makefile.in # For debugging.
 grep 'include.*\./\$(DEPDIR)/foo\.P' Makefile.in
 grep 'include.*[^a-zA-Z0-9_/]sub/\$(DEPDIR)/bar\.P' Makefile.in
-$EGREP 'include.*/(\.|sub)/\$\(DEPDIR\)' Makefile.in && Exit 1
+$EGREP 'include.*/(\.|sub)/\$\(DEPDIR\)' Makefile.in && exit 1
 
 $AUTOCONF
 # Don't reject slower dependency extractors, for better coverage.
old mode 100755 (executable)
new mode 100644 (file)
index e81e097..4a740c6
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2001-2012 Free Software Foundation, Inc.
+# Copyright (C) 2001-2017 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
@@ -18,7 +18,7 @@
 # From Eric Magnien.
 
 required=cc
-. ./defs || Exit 1
+. test-init.sh
 
 rm -f configure.ac
 
old mode 100755 (executable)
new mode 100644 (file)
index a2e3bd8..4aa056b
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 1996-2012 Free Software Foundation, Inc.
+# Copyright (C) 1996-2017 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
@@ -18,7 +18,7 @@
 # In some cases the auto-dependency can get confused and try
 # to '-include' a directory (if a backslash-newline appears in _SOURCES).
 
-. ./defs || Exit 1
+. test-init.sh
 
 echo AC_PROG_CC >> configure.ac
 
@@ -31,4 +31,6 @@ END
 $ACLOCAL
 $AUTOMAKE
 
-test 1 = `grep '^@AMDEP_TRUE@@am__include@' Makefile.in | wc -l`
+test 1 -eq $(grep -c '^@AMDEP_TRUE@@am__include@' Makefile.in)
+
+:
old mode 100755 (executable)
new mode 100644 (file)
index 8f8431a..1d6f3ed
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 1997-2012 Free Software Foundation, Inc.
+# Copyright (C) 1997-2017 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
@@ -16,7 +16,7 @@
 
 # Test _DEPENDENCIES variable.  From Lee Iverson.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_CC
old mode 100755 (executable)
new mode 100644 (file)
index d9896f8..6e20235
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2001-2012 Free Software Foundation, Inc.
+# Copyright (C) 2001-2017 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
@@ -16,7 +16,7 @@
 
 # Check that dependencies are included when there are many header files.
 
-. ./defs || Exit 1
+. test-init.sh
 
 echo AC_PROG_CC >> configure.ac
 
@@ -30,7 +30,7 @@ for header in one.h two.h three.h four.h five.h six.h; do
     fred_SOURCES = fred1.c $headers
 END
   $AUTOMAKE
-  test 1 = `grep '^@AMDEP_TRUE@@am__include@' Makefile.in | wc -l`
+  test 1 -eq $(grep -c '^@AMDEP_TRUE@@am__include@' Makefile.in)
 done
 
 :
old mode 100755 (executable)
new mode 100644 (file)
index ca900f0..7400e61
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2008-2012 Free Software Foundation, Inc.
+# Copyright (C) 2008-2017 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
@@ -18,7 +18,7 @@
 # quoting in $CONFIG_FILES, done by newer Autoconf.
 
 required=cc
-. ./defs || Exit 1
+. test-init.sh
 
 cat >>configure.ac << END
 AC_PROG_CC
@@ -47,9 +47,8 @@ else
   depdir=
 fi
 
-# For the fun of it, we should also cope with makefile
-# names that contain weird characters, with Autoconf 2.62
-# and newer.
+# For the fun of it, we should also cope with Makefile names
+# that contain weird characters and newer.
 # Pick the first name that the file system will accept.
 for name in \
   'weird  name with $ `#() &! characters"' \
@@ -65,13 +64,13 @@ for arg in Makefile \
 do
   rm -rf .deps _deps
   ./config.status "$arg" depfiles >stdout 2>stderr ||
-    { cat stdout; cat stderr >&2; Exit 1; }
+    { cat stdout; cat stderr >&2; exit 1; }
   cat stdout
   cat stderr >&2
-  grep '[Nn]o such file' stderr && Exit 1
+  grep '[Nn]o such file' stderr && exit 1
 
   if test -n "$depdir"; then
-    test -d $depdir || Exit 1
+    test -d $depdir || exit 1
   fi
 done
 
old mode 100755 (executable)
new mode 100644 (file)
index fb4c140..0f38685
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2008-2012 Free Software Foundation, Inc.
+# Copyright (C) 2008-2017 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
@@ -17,7 +17,7 @@
 # Check for _AM_OUTPUT_DEPENDENCY_COMMANDS grouping bug,
 # reported by Markus Duft.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat >>configure.ac << END
 AC_PROG_CC
@@ -38,9 +38,9 @@ $ACLOCAL
 $AUTOMAKE
 $AUTOCONF
 ./configure --disable-dependency-tracking 2>stderr || {
-  stat=$?; cat stderr >&2; Exit $stat;
+  stat=$?; cat stderr >&2; exit $stat;
 }
 cat stderr >&2
-grep shift stderr && Exit 1
+grep shift stderr && exit 1
 
 :
old mode 100755 (executable)
new mode 100644 (file)
index d130f9c..45ec19e
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2011-2012 Free Software Foundation, Inc.
+# Copyright (C) 2011-2017 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
@@ -17,7 +17,7 @@
 # Check that automake and autoconf complain about an old-style AC_INIT
 # call used with a new-style AM_AUTOMAKE_INIT call.
 
-. ./defs || Exit 1
+. test-init.sh
 
 : > Makefile.am
 
@@ -37,11 +37,11 @@ for ac_init in AC_INIT 'AC_INIT([Makefile.am])'; do
         AC_CONFIG_FILES([Makefile])
 END
     cat configure.ac # For debugging.
-    $ACLOCAL 2>stderr && { cat stderr >&2; Exit 1; }
+    $ACLOCAL 2>stderr && { cat stderr >&2; exit 1; }
     cat stderr >&2
     grep "^configure\\.ac:.* $errmsg" stderr
     cp aclocal-m4.sav aclocal.m4
-    $AUTOCONF 2>stderr && { cat stderr >&2; Exit 1; }
+    $AUTOCONF 2>stderr && { cat stderr >&2; exit 1; }
     cat stderr >&2
     grep "^configure\\.ac:.* $errmsg" stderr
     AUTOMAKE_fails
old mode 100755 (executable)
new mode 100644 (file)
index 22bf184..93c02a1
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2002-2012 Free Software Foundation, Inc.
+# Copyright (C) 2002-2017 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
@@ -21,7 +21,7 @@
 # It will only work for non-root users.
 required='ro-dir'
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac <<'EOF'
 AC_OUTPUT
@@ -45,6 +45,6 @@ $ACLOCAL
 $AUTOCONF
 $AUTOMAKE -a
 ./configure
-$MAKE distcheck && Exit 1
+$MAKE distcheck && exit 1
 
 :
old mode 100755 (executable)
new mode 100644 (file)
similarity index 66%
rename from t/subdir7.sh
rename to t/dir-named-obj-is-bad.sh
index a2c47a1..c3e5a6c
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2002-2012 Free Software Foundation, Inc.
+# Copyright (C) 2002-2017 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
@@ -16,7 +16,7 @@
 
 # Naming a subdirectory 'obj/' is a bad idea.  Automake should say so.
 
-. ./defs || Exit 1
+. test-init.sh
 
 mkdir obj
 
@@ -26,12 +26,12 @@ AC_OUTPUT
 END
 
 : > obj/Makefile.am
-echo 'SUBDIRS = obj' >Makefile.am
+echo 'SUBDIRS = obj' > Makefile.am
 
 $ACLOCAL
 
 AUTOMAKE_fails
-grep 'Makefile.am:1:.*obj.*BSD' stderr
+grep "^Makefile\.am:1:.*'obj'.*BSD make" stderr
 
 cat >Makefile.am <<'END'
 SUBDIRS = @STH@
@@ -40,6 +40,22 @@ DIST_SUBDIRS = $(FOO)
 END
 
 AUTOMAKE_fails
-grep 'Makefile.am:2:.*obj.*BSD' stderr
+grep "^Makefile\\.am:2:.*'obj'.*BSD make" stderr
+
+rm -rf autom4te*.cache
+
+cat >configure.ac << 'END'
+AC_INIT([x], [1.0])
+AC_CONFIG_AUX_DIR([obj])
+AM_INIT_AUTOMAKE
+AC_CONFIG_FILES([Makefile])
+END
+
+rm -f obj/Makefile.am
+: > Makefile.am
+
+$ACLOCAL
+AUTOMAKE_fails -a
+grep "^configure\.ac:2:.*'obj'.*BSD make" stderr
 
 :
old mode 100755 (executable)
new mode 100644 (file)
index 7a01dc7..ab0866d
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 1996-2012 Free Software Foundation, Inc.
+# Copyright (C) 1996-2017 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
 
 # Test to make sure LIBOBJS file cannot be mentioned explicitly.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
+AC_PROG_CC
 AC_PROG_RANLIB
 AM_PROG_AR
-AC_PROG_CC
 AC_LIBOBJ([fsusage])
 AC_OUTPUT
 END
old mode 100755 (executable)
new mode 100644 (file)
index f84514a..bf11a46
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2011-2012 Free Software Foundation, Inc.
+# Copyright (C) 2011-2017 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
 
 am_create_testdir=empty
 required=cc
-. ./defs || Exit 1
+. test-init.sh
 
 count=0
-ocwd=`pwd` || fatal_ "cannot get current working directory"
+ocwd=$(pwd) || fatal_ "cannot get current working directory"
 
 # Usage: do_check [--add-missing] [CONFIG-AUXDIR-PATH=.]
 do_check ()
@@ -33,7 +33,7 @@ do_check ()
   esac
   auxdir=${1-.}
 
-  count=`expr $count + 1`
+  count=$(($count + 1))
   mkdir T$count.d
   cd T$count.d
 
@@ -41,7 +41,7 @@ do_check ()
   unindent > configure.ac << END
     AC_INIT([$me], [$count])
     AC_CONFIG_AUX_DIR([$auxdir])
-    AM_INIT_AUTOMAKE([parallel-tests])
+    AM_INIT_AUTOMAKE
     AC_PROG_CC
     # We don't want to require python or emcas in this test, so
     # the tricks below.
@@ -56,8 +56,6 @@ END
     foo_SOURCES = foo.c
     ## For py-compile.
     python_PYTHON = bar.py
-    ## For elisp-comp.
-    lisp_LISP = baz.el
     ## For test-driver.
     TESTS =
 END
@@ -65,9 +63,9 @@ END
   required_files='
     install-sh
     missing
+    compile
     depcomp
     py-compile
-    elisp-comp
     test-driver
   '
 
old mode 100755 (executable)
new mode 100644 (file)
index b7e2e2d..b977ee2
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2011-2012 Free Software Foundation, Inc.
+# Copyright (C) 2011-2017 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
@@ -20,7 +20,7 @@
 # Related to automake bug#9651.
 
 am_create_testdir=empty
-. ./defs || Exit 1
+. test-init.sh
 
 cat > configure.ac <<END
 AC_INIT([$me], [1.0])
old mode 100755 (executable)
new mode 100644 (file)
index 9f7e8ee..fef805b
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2011-2012 Free Software Foundation, Inc.
+# Copyright (C) 2011-2017 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
 # directory was set to '.' by AC_CONFIG_AUX_DIR.
 
 am_create_testdir=empty
-. ./defs || Exit 1
+. test-init.sh
 
 i=0
 for auxdir in build-aux ''; do
 
   echo "*** Testing with auxdir '$auxdir' ***"
 
-  i=`expr $i + 1`
+  i=$(($i + 1))
   mkdir T$i.d
   cd T$i.d
 
@@ -59,9 +59,9 @@ END
 END
 
   mkdir subdir
-  echo > subdir/Makefile.am # 'echo', not ':', for Solaris /bin/sh.
+  : > subdir/Makefile.am
 
-  test -z "$auxdir" || mkdir "$auxdir" || Exit 99
+  test -z "$auxdir" || mkdir "$auxdir" || exit 99
 
   if test -z "$auxdir"; then
     auxdir=.
@@ -84,7 +84,7 @@ END
   $AUTOMAKE
   ./configure
   $MAKE test
-  $EGREP '(foo\.txt|bar\.sh|zardoz)' subdir/Makefile.in && Exit 1
+  $EGREP '(foo\.txt|bar\.sh|zardoz)' subdir/Makefile.in && exit 1
 
   $MAKE distcheck
 
old mode 100755 (executable)
new mode 100644 (file)
index 26c6c97..a32fa21
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2012 Free Software Foundation, Inc.
+# Copyright (C) 2012-2017 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
 # archives.
 
 am_create_testdir=empty
-. ./defs || Exit 1
+. test-init.sh
 
-plan_ 70
+plan_ 66
 
 # ---------------------------------------------------- #
 #  Common and/or auxiliary subroutines and variables.  #
 # ---------------------------------------------------- #
 
-ocwd=`pwd` || fatal_ "obtaining current working directory"
+ocwd=$(pwd) || fatal_ "getting current working directory"
 
-TAR='' && unset TAR
+unset TAR
 
 # Create common aclocal.m4 file, for later tests.
 mkdir setup \
@@ -56,55 +56,67 @@ setup_vars_for_compression_format ()
   suffix=NONE compressor=NONE
   case $1 in
     gzip) suffix=tar.gz  compressor=gzip     ;;
-    tarZ) suffix=tar.Z   compressor=compress ;;
     lzip) suffix=tar.lz  compressor=lzip     ;;
       xz) suffix=tar.xz  compressor=xz       ;;
    bzip2) suffix=tar.bz2 compressor=bzip2    ;;
      zip) suffix=zip     compressor=zip      ;;
-    shar) suffix=shar.gz compressor=shar     ;;
        *) fatal_ "invalid compression format '$1'";;
   esac
 }
 
-all_compression_formats='gzip tarZ lzip xz bzip2 zip shar'
+have_compressor ()
+{
+  test $# -eq 1 || fatal_ "have_compressor(): bad usage"
+  if test $1 = gzip; then
+    # Assume gzip(1) is available on every reasonable portability target.
+    return 0
+  fi
+  needed_programs=$1
+  # Assume by default the other compressors we care about support the
+  # '--version' option.  We'll special-case the one which don't.
+  checker_option=--version
+  case $1 in
+    bzip2)
+      # Do not use --version, or older versions bzip2 would try to
+      # compress stdin.  This would cause binary output in the test
+      # logs, with potential breakage of our testsuite harness.
+      checker_option=--help
+      ;;
+    zip)
+      # OpenSolaris zip do not support the '--version' option, but
+      # accepts the '-v' one with a similar meaning (if no further
+      # arguments are given).
+      checker_option=-v
+      # Also, we need 'unzip' to decompress the created zipped archives
+      # (bug#15181).
+      needed_programs='zip unzip'
+      ;;
+  esac
+  # Redirect to stderr to avoid polluting the output, in case this
+  # function is used in a command substitution (as it is, later in
+  # this script).
+  for p in $needed_programs; do
+    $p $checker_option </dev/null >&2 || return 1
+  done
+  return 0
+}
+
+all_compression_formats='gzip lzip xz bzip2 zip'
 
-all_compressors=`
+all_compressors=$(
   for x in $all_compression_formats; do
     setup_vars_for_compression_format $x
     echo $compressor
-  done | tr "$nl" ' '`
+  done | tr "$nl" ' ')
 echo All compressors: $all_compressors
 
-missing_compressors=`
+missing_compressors=$(
   for c in $all_compressors; do
-    case $c in
-      # Assume gzip(1) is available on every reasonable portability target.
-      gzip)
-        continue
-        ;;
-      # On Cygwin, as of 9/2/2012, 'compress' is provided by sharutils
-      # and is just a dummy script that is not able to actually compress
-      # (it can only decompress).  So, check that the 'compress' program
-      # is actually able to compress input.
-      # Note that, at least on GNU/Linux, 'compress' does (and is
-      # documented to) exit with status 2 if the output is larger than
-      # the input after (attempted) compression; so we need to pass it
-      # an input that it can actually reduce in size when compressing.
-      compress)
-        for x in 1 2 3 4 5 6 7 8; do
-          echo aaaaaaaaaaaaaaa
-        done | $c -c >/dev/null && continue
-        : For shells with busted 'set -e'.
-        ;;
-      *)
-        $c --version </dev/null >&2 && continue
-        : For shells with busted 'set -e'.
-        ;;
-    esac
-    echo $c
-  done | tr "$nl" ' '`
+    have_compressor $c || echo $c
+  done | tr "$nl" ' ')
 echo Missing compressors: $missing_compressors
 
+# Redefine to avoid re-running the already executed checks.
 have_compressor ()
 {
   case " $missing_compressors " in *\ $1\ *) false;; *) : ;; esac
@@ -122,8 +134,8 @@ start_subtest ()
   if test $# -gt 0; then
     eval "$@" || fatal_ "start_subtest: evaluating assignments"
   fi
-  ac_opts=`echo $ac_opts | tr ',' ' '`
-  am_opts=`echo $am_opts | tr ',' ' '`
+  ac_opts=$(echo $ac_opts | tr ',' ' ')
+  am_opts=$(echo $am_opts | tr ',' ' ')
   mkdir "$name"
   cd "$name"
   unindent > configure.ac <<END
@@ -171,7 +183,7 @@ can_compress ()
         && $MAKE dist-$format \
         && test -f $tarname-1.0.$suffix \
         && ls -l *$tarname* \
-        && test "`ls *$tarname*`" = $tarname-1.0.$suffix'
+        && test "$(echo *$tarname*)" = $tarname-1.0.$suffix'
 
   unset suffix compressor format tarname
 }
@@ -188,7 +200,7 @@ command_ok_ "default [configure]"       ./configure
 command_ok_ "default [make distcheck]"  $MAKE distcheck
 
 command_ok_ "'make dist' only builds *.tar.gz by default" \
-            test "`ls *defaults*`" = defaults-1.0.tar.gz
+            test "$(ls *defaults*)" = defaults-1.0.tar.gz
 
 rm -rf *defaults*
 
@@ -281,7 +293,7 @@ END
 nogzip in am  and  bzip2  in  am
 nogzip in ac  and  xz     in  am
 nogzip in am  and  lzip   in  ac
-nogzip in ac  and  tarZ   in  ac
+nogzip in ac  and  zip    in  ac
 
 
 # ----------------------------------------------------------- #
@@ -300,13 +312,13 @@ end_subtest
 #  Parallel compression.  #
 # ----------------------- #
 
-# We only use formats requiring 'gzip', 'bzip2' and 'compress' programs,
-# since there are the most likely to be all found on the great majority
+# We only use formats requiring 'gzip', 'bzip2' and 'xz' programs,
+# since there are the most likely to be all found on the majority
 # of systems.
 
-start_subtest parallel-compression ac_opts=dist-bzip2 am_opts=dist-tarZ
+start_subtest parallel-compression ac_opts=dist-bzip2 am_opts=dist-xz
 
-desc=gzip+bzip2+tarZ
+desc=gzip+bzip2+xz
 tarname=parallel-compression-1.0
 
 check_tarball ()
@@ -329,11 +341,17 @@ check_tarball ()
 
 command_ok_ "$desc [automake]" $AUTOMAKE
 
-skip_reason=
-have_compressor compress || skip_reason="'compress' not available"
-have_compressor bzip2 || skip_reason="'bzip2' not available"
+if ! have_compressor xz && ! have_compressor bzip2; then
+  skip_reason="both 'bzip2' and 'xz' are unavailable"
+elif ! have_compressor xz; then
+  skip_reason="'xz' not available"
+elif ! have_compressor bzip2; then
+  skip_reason="'bzip2' not available"
+else
+  skip_reason=
+fi
 if test "$MAKE_j4" = false; then
-  test -z "$skip_reason" || skip_reason="$skip_reason and "
+  test -z "$skip_reason" || skip_reason="$skip_reason, and "
   skip_reason="${skip_reason}make concurrency unavailable"
 fi
 
@@ -346,7 +364,7 @@ else
   ls -l # For debugging.
   command_ok_ "$desc [check .tar.gz tarball]"  check_tarball gzip
   command_ok_ "$desc [check .tar.bz2 tarball]" check_tarball bzip2
-  command_ok_ "$desc [check .tar.Z tarball]"   check_tarball tarZ
+  command_ok_ "$desc [check .tar.xz tarball]"  check_tarball xz
 fi
 
 unset tarname desc skip_reason
@@ -421,8 +439,8 @@ END
 chmod a+x check-distdir grep-distdir-error
 for prog in tar $all_compressors; do
   case $prog in
-    tar|shar|zip) cp check-distdir $prog;;
-               *) cp grep-distdir-error $prog;;
+    tar|zip) cp check-distdir $prog;;
+          *) cp grep-distdir-error $prog;;
   esac
 done
 unset prog
@@ -430,7 +448,7 @@ ls -l # For debugging.
 cd ..
 
 oPATH=$PATH
-PATH=`pwd`/bin$PATH_SEPARATOR$PATH; export PATH
+PATH=$(pwd)/bin$PATH_SEPARATOR$PATH; export PATH
 
 command_ok_ \
   "$desc ['make dist-all', stubbed]" \
old mode 100755 (executable)
new mode 100644 (file)
index ae135ae..b93cca0
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2002-2012 Free Software Foundation, Inc.
+# Copyright (C) 2002-2017 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
@@ -16,7 +16,7 @@
 
 # Make sure included files in parent directory are distributed.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_CONFIG_FILES([sub/Makefile])
@@ -45,5 +45,7 @@ $AUTOCONF
 $AUTOMAKE
 # Use --srcdir with an absolute path because it's harder
 # to support in 'distdir'.
-./configure --srcdir "`pwd`"
+./configure --srcdir "$(pwd)"
 $MAKE test
+
+:
old mode 100755 (executable)
new mode 100644 (file)
similarity index 93%
rename from t/insh2.sh
rename to t/dist-install-sh.sh
index cd74f82..4d98152
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 1996-2012 Free Software Foundation, Inc.
+# Copyright (C) 1996-2017 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
@@ -16,7 +16,7 @@
 
 # Test for bug where install-sh not included in distribution.
 
-. ./defs || Exit 1
+. test-init.sh
 
 echo AC_OUTPUT >> configure.ac
 
old mode 100755 (executable)
new mode 100644 (file)
similarity index 89%
rename from t/lzma.sh
rename to t/dist-lzma.sh
index 8e78f86..a18c3c7
--- a/t/lzma.sh
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2003-2012 Free Software Foundation, Inc.
+# Copyright (C) 2003-2017 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
@@ -16,7 +16,7 @@
 
 # Check support for no-dist-gzip with lzma.
 
-. ./defs || Exit 1
+. test-init.sh
 
 errmsg='support for lzma.*removed'
 
@@ -25,8 +25,8 @@ $ACLOCAL --force
 AUTOMAKE_fails -Wnone -Wno-error
 grep "^Makefile\\.am:1:.*$errmsg" stderr
 
-cat > configure.ac << 'END'
-AC_INIT([lzma], [1.0])
+cat > configure.ac <<END
+AC_INIT([$me], [1.0])
 AM_INIT_AUTOMAKE([no-dist-gzip dist-lzma])
 AC_CONFIG_FILES([Makefile])
 AC_OUTPUT
old mode 100755 (executable)
new mode 100644 (file)
index 0765b0c..311de4b
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2011-2012 Free Software Foundation, Inc.
+# Copyright (C) 2011-2017 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
@@ -19,7 +19,7 @@
 # required '.am' file from a distribution tarball.
 # See discussion about automake bug#9768.
 
-. ./defs || Exit 1
+. test-init.sh
 
 echo AC_OUTPUT >> configure.ac
 
@@ -39,7 +39,7 @@ $AUTOMAKE
 
 # A faulty distribution tarball, with a required '.am' file missing.
 # Building from it should fail, both for in-tree and VPATH builds.
-ocwd=`pwd` || fatal_ "cannot get current working directory"
+ocwd=$(pwd) || fatal_ "cannot get current working directory"
 for vpath in false :; do
   $MAKE distdir
   test -f $distdir/zardoz.am # Sanity check.
@@ -54,12 +54,11 @@ for vpath in false :; do
     cd $distdir
     ./configure
   fi
-  $MAKE >output 2>&1 && { cat output; Exit 1; }
-  cat output
+  run_make -e FAIL -M
   # 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 'foobar\.am' output && exit 1 # No spurious error, please.
   cd "$ocwd" || fatal_ "cannot chdir back to top-level test directory"
 done
 
old mode 100755 (executable)
new mode 100644 (file)
index 5960003..4d25523
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2011-2012 Free Software Foundation, Inc.
+# Copyright (C) 2011-2017 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
@@ -18,9 +18,9 @@
 # for '.m4' files shouldn't prevent "make" from diagnosing a missing
 # required '.m4' file from a distribution tarball.
 # See discussion about automake bug#9768.
-# See also sister test 'dist-missing-m4.test'.
+# See also sister test 'dist-missing-m4.sh'.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac <<'END'
 m4_include([foobar.m4])
@@ -41,7 +41,7 @@ $AUTOMAKE
 
 # A faulty distribution tarball, with a required '.m4' file missing.
 # Building from it should fail, both for in-tree and VPATH builds.
-ocwd=`pwd` || fatal_ "cannot get current working directory"
+ocwd=$(pwd) || fatal_ "cannot get current working directory"
 for vpath in false :; do
   $MAKE distdir
   test -f $distdir/zardoz.m4 # Sanity check.
@@ -56,12 +56,11 @@ for vpath in false :; do
     cd $distdir
     ./configure
   fi
-  $MAKE >output 2>&1 && { cat output; Exit 1; }
-  cat output
+  run_make -e FAIL -M
   # 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 'foobar\.m4' output && exit 1 # No spurious error, please.
   cd "$ocwd" || fatal_ "cannot chdir back to top-level test directory"
 done
 
old mode 100755 (executable)
new mode 100644 (file)
index 9a418d3..bf691d2
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2011-2012 Free Software Foundation, Inc.
+# Copyright (C) 2011-2017 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
@@ -18,9 +18,9 @@
 # for '.m4' files shouldn't prevent "make" from diagnosing a missing
 # required '.m4' file from a distribution tarball.
 # See discussion about automake bug#9768.
-# See also sister test 'dist-missing-included-m4.test'.
+# See also sister test 'dist-missing-included-m4.sh'.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac <<'END'
 m4_pattern_forbid([^MY_])
@@ -43,7 +43,7 @@ $AUTOMAKE
 
 # A faulty distribution tarball, with a required '.m4' file missing.
 # Building from it should fail, both for in-tree and VPATH builds.
-ocwd=`pwd` || fatal_ "cannot get current working directory"
+ocwd=$(pwd) || fatal_ "cannot get current working directory"
 for vpath in false :; do
   $MAKE distdir
   test -f $distdir/m4/zardoz.m4 # Sanity check.
@@ -58,12 +58,11 @@ for vpath in false :; do
     cd $distdir
     ./configure
   fi
-  $MAKE >output 2>&1 && { cat output; Exit 1; }
-  cat output
+  run_make -e FAIL -M
   # 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 'MY_FOOBAR' output && exit 1 # No spurious error, please.
   cd "$ocwd" || fatal_ "cannot chdir back to top-level test directory"
 done
 
old mode 100755 (executable)
new mode 100644 (file)
index 2e22e84..abdb47e
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2012 Free Software Foundation, Inc.
+# Copyright (C) 2012-2017 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
@@ -19,7 +19,7 @@
 # so that the latter ones fail.
 
 required=bzip2
-. ./defs || Exit 1
+. test-init.sh
 
 echo AC_OUTPUT >> configure.ac
 : > Makefile.am
@@ -31,9 +31,9 @@ $AUTOMAKE || fatal_ "automake failed"
 ./configure
 $MAKE dist-gzip dist-bzip2
 
-gzip -dc $distdir.tar.gz | tar tf - > one || { cat one; Exit 1; }
+gzip -dc $distdir.tar.gz | tar tf - > one || { cat one; exit 1; }
 cat one
-bzip2 -dc $distdir.tar.gz | tar tf - > two || { cat two; Exit 1; }
+bzip2 -dc $distdir.tar.gz | tar tf - > two || { cat two; exit 1; }
 cat two
 
 $FGREP "$distdir/Makefile.am" one
old mode 100755 (executable)
new mode 100644 (file)
index 2bf2a6d..9b9faa8
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2011-2012 Free Software Foundation, Inc.
+# Copyright (C) 2011-2017 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
@@ -20,7 +20,7 @@
 # This test expect the user to be unable to write on files lacking
 # write permissions -- so it won't work if the user is 'root'.
 required='non-root cc'
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_CC
@@ -53,10 +53,10 @@ $AUTOMAKE
 ./configure
 $MAKE distdir
 ls -l $distdir # For debugging.
-test -f foo.c && test ! -w foo.c || Exit 1
-(echo x > foo.c) && Exit 1
-test -f bar.txt && test ! -w bar.txt || Exit 1
-(echo x > bar.txt) && Exit 1
+test -f foo.c && test ! -w foo.c || exit 1
+(echo x > foo.c) && exit 1
+test -f bar.txt && test ! -w bar.txt || exit 1
+(echo x > bar.txt) && exit 1
 $MAKE distcheck
 
 :
old mode 100755 (executable)
new mode 100644 (file)
index 6651e72..18e4271
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2011-2012 Free Software Foundation, Inc.
+# Copyright (C) 2011-2017 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
@@ -18,7 +18,7 @@
 # The distdir target should take care of not copying it more than one
 # time anyway.
 
-. ./defs || Exit 1
+. test-init.sh
 
 echo AC_OUTPUT >> configure.ac
 
@@ -45,7 +45,7 @@ pythondir = ${prefix}/py
 PYTHON = false
 END
 
-ocwd=`pwd` || fatal_ "cannot get current working directory"
+ocwd=$(pwd) || fatal_ "cannot get current working directory"
 
 # Help to ensure cp won't see the same file twice.
 mkdir bin
@@ -80,7 +80,7 @@ esac
 exec cp "\$@"
 END
 chmod a+x bin/cp
-PATH=`pwd`/bin$PATH_SEPARATOR$PATH; export PATH;
+PATH=$(pwd)/bin$PATH_SEPARATOR$PATH; export PATH;
 
 : > foo.c
 : > bar.py
diff --git a/t/dist-shar.sh b/t/dist-shar.sh
new file mode 100644 (file)
index 0000000..308ce13
--- /dev/null
@@ -0,0 +1,47 @@
+#! /bin/sh
+# Copyright (C) 2013-2017 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 no-dist-gzip with dist-shar.
+
+required='shar unshar'
+. test-init.sh
+
+errmsg='support for shar .*deprecated'
+
+echo AUTOMAKE_OPTIONS = dist-shar > Makefile.am
+$ACLOCAL
+AUTOMAKE_fails -Wnone -Wobsolete
+grep "^Makefile\\.am:1:.*$errmsg" stderr
+
+cat > configure.ac <<END
+AC_INIT([$me], [1.0])
+AM_INIT_AUTOMAKE([no-dist-gzip dist-shar])
+AC_CONFIG_FILES([Makefile])
+AC_OUTPUT
+END
+: > Makefile.am
+
+rm -rf autom4te*.cache
+$ACLOCAL
+AUTOMAKE_run -Wno-error
+grep "^configure\\.ac:2:.*$errmsg" stderr
+
+$AUTOCONF
+./configure
+$MAKE distcheck
+test -f $distdir.shar.gz
+
+:
diff --git a/t/dist-tarZ.sh b/t/dist-tarZ.sh
new file mode 100644 (file)
index 0000000..baf3f20
--- /dev/null
@@ -0,0 +1,59 @@
+#! /bin/sh
+# Copyright (C) 2013-2017 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 no-dist-gzip with dist-tarZ.
+
+. test-init.sh
+
+# On Cygwin, as of 9/2/2012, 'compress' is provided by sharutils
+# and is just a dummy script that is not able to actually compress
+# (it can only decompress).  So, check that the 'compress' program
+# is actually able to compress input.
+# Note that, at least on GNU/Linux, 'compress' does (and is
+# documented to) exit with status 2 if the output is larger than
+# the input after (attempted) compression; so we need to pass it
+# an input that it can actually reduce in size when compressing.
+for x in 1 2 3 4 5 6 7 8; do
+  echo aaaaaaaaaaaaaaaaaaaaa
+done | compress -c >/dev/null \
+  || skip_ "cannot find a working 'compress' program"
+
+errmsg=".*legacy .*'compress' .*deprecated"
+
+echo AUTOMAKE_OPTIONS = dist-tarZ > Makefile.am
+$ACLOCAL
+AUTOMAKE_fails -Wnone -Wobsolete
+grep "^Makefile\\.am:1:.*$errmsg" stderr
+
+cat > configure.ac <<END
+AC_INIT([$me], [1.0])
+AM_INIT_AUTOMAKE([no-dist-gzip dist-tarZ])
+AC_CONFIG_FILES([Makefile])
+AC_OUTPUT
+END
+: > Makefile.am
+
+rm -rf autom4te*.cache
+$ACLOCAL
+AUTOMAKE_run -Wno-error
+grep "^configure\\.ac:2:.*$errmsg" stderr
+
+$AUTOCONF
+./configure
+$MAKE distcheck
+test -f dist-tarz-1.0.tar.Z
+
+:
old mode 100755 (executable)
new mode 100644 (file)
similarity index 92%
rename from t/install2.sh
rename to t/dist-with-unreadable-makefile-fails.sh
index bd400f4..269b8ca
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 1999-2012 Free Software Foundation, Inc.
+# Copyright (C) 1999-2017 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
@@ -18,7 +18,7 @@
 # From Pavel Roskin.
 
 am_create_testdir=empty
-. ./defs || Exit 1
+. test-init.sh
 
 cat > configure.ac << END
 AC_INIT([$me], [1.0])
@@ -46,7 +46,7 @@ test ! -r Makefile.am || skip_ "cannot drop file read permissions"
 
 # 'dist' should fail because we can't copy Makefile.am.
 if $MAKE dist; then
-  Exit 1
+  exit 1
 else
-  Exit 0
+  exit 0
 fi
old mode 100755 (executable)
new mode 100644 (file)
index 7dbe2ab..df825e4
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2011-2012 Free Software Foundation, Inc.
+# Copyright (C) 2011-2017 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
@@ -17,7 +17,7 @@
 # Check support for AM_DISTCHECK_CONFIGURE_FLAGS at "make distcheck"
 # time, and its interactions with DISTCHECK_CONFIGURE_FLAGS.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_ARG_ENABLE([success], [], [success=$enableval], [success=no])
@@ -27,7 +27,7 @@ AS_IF([test $success = yes && test "$sentence" = 'it works :-)'],
 AC_OUTPUT
 END
 
-unset sentence || :
+unset sentence
 
 cat > Makefile.am << 'END'
 AM_DISTCHECK_CONFIGURE_FLAGS = $(dc_flags1) $(dc_flags2)
@@ -40,7 +40,7 @@ $AUTOMAKE
 $FGREP '$(DISTCHECK_CONFIGURE_FLAGS)' Makefile.in
 $FGREP '$(AM_DISTCHECK_CONFIGURE_FLAGS)' Makefile.in
 grep 'DISTCHECK_CONFIGURE_FLAGS.*AM_DISTCHECK_CONFIGURE_FLAGS' Makefile.in \
-  && Exit 1
+  && exit 1
 
 $AUTOCONF
 ./configure --enable-success sentence='it works :-)'
@@ -59,8 +59,7 @@ END
 $AUTOMAKE Makefile
 ./config.status Makefile
 
-$MAKE distcheck >output 2>&1 && { cat output; Exit 1; }
-cat output
+run_make -e FAIL -M distcheck
 grep "^configure:.* success='no', sentence='it works :-)'" output
 
 $MAKE distcheck DISTCHECK_CONFIGURE_FLAGS="--enable-success=yes"
old mode 100755 (executable)
new mode 100644 (file)
index 45d0e0c..64b34b9
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2011-2012 Free Software Foundation, Inc.
+# Copyright (C) 2011-2017 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
@@ -20,7 +20,7 @@
 # passed down to the configure script of the subpackage.  This is
 # explicitly documented in the manual.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_CONFIG_SUBDIRS([subpkg])
@@ -63,7 +63,7 @@ $FGREP 'DISTCHECK_CONFIGURE_FLAGS' Makefile.in subpkg/Makefile.in
 
 grep '^AM_DISTCHECK_CONFIGURE_FLAGS =' Makefile.in
 grep '^DISTCHECK_CONFIGURE_FLAGS =' Makefile.in
-$EGREP '^(AM_)?DISTCHECK_CONFIGURE_FLAGS' subpkg/Makefile.in && Exit 1
+$EGREP '^(AM_)?DISTCHECK_CONFIGURE_FLAGS' subpkg/Makefile.in && exit 1
 
 ./configure dc=ok am_dc=ok
 
@@ -74,8 +74,7 @@ $MAKE distcheck
 
 # ... but not when "make distcheck" is run from the subpackage.
 cd subpkg
-$MAKE distcheck >output 2>&1 && { cat output; Exit 1; }
-cat output
+run_make -e FAIL -M distcheck
 grep '^configure:.* dc=KO am_dc=KO' output
 
 :
old mode 100755 (executable)
new mode 100644 (file)
index ae9fe40..8091895
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2011-2012 Free Software Foundation, Inc.
+# Copyright (C) 2011-2017 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
@@ -16,7 +16,7 @@
 
 # Check support for DISTCHECK_CONFIGURE_FLAGS at "make distcheck" time.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_ARG_ENABLE([success], [], [success=$enableval], [success=no])
@@ -26,7 +26,7 @@ AS_IF([test $success = yes && test "$sentence" = 'it works :-)'],
 AC_OUTPUT
 END
 
-unset sentence || :
+unset sentence
 
 : > Makefile.am
 
@@ -41,14 +41,13 @@ $AUTOCONF
 # make command line or in the environment.
 
 env DISTCHECK_CONFIGURE_FLAGS='--enable-success sentence=it\ works\ :-\)' \
-  $MAKE distcheck # Not 'make -e' here, deliberately.
+  $MAKE distcheck
 
 $MAKE distcheck \
   DISTCHECK_CONFIGURE_FLAGS="--enable-success=yes sentence='it works :-)'"
 
 # Sanity check.
-$MAKE distcheck >output 2>&1 && { cat output; Exit 1; }
-cat output
+run_make -M -e FAIL distcheck
 grep "^configure:.* success='no', sentence=''" output
 
 :
old mode 100755 (executable)
new mode 100644 (file)
index dfc2001..f519088
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2011-2012 Free Software Foundation, Inc.
+# Copyright (C) 2011-2017 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
@@ -16,7 +16,7 @@
 
 # Check basic support for distcheck-hook.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_OUTPUT
@@ -43,9 +43,9 @@ $AUTOCONF
 ./configure
 
 $MAKE
-$MAKE check && Exit 1
+$MAKE check && exit 1
 $MAKE distdir
-test -f $distdir/dc-hook-has-run && Exit 1
+test -f $distdir/dc-hook-has-run && exit 1
 $MAKE distcheck
 
 :
old mode 100755 (executable)
new mode 100644 (file)
index 93446b3..e060af0
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2011-2012 Free Software Foundation, Inc.
+# Copyright (C) 2011-2017 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
@@ -18,7 +18,7 @@
 # Automake, and that a used-defined 'distcheck-hook' is *not* honored
 # in a subpackage Makefile.am.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_CONFIG_SUBDIRS([subpkg])
@@ -63,14 +63,14 @@ 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
 grep '^distcheck-hook:' Makefile.in
 
 ./configure
 
 $MAKE
-$MAKE check && Exit 1
+$MAKE check && exit 1
 cd subpkg
 $MAKE check
 cd ..
old mode 100755 (executable)
new mode 100644 (file)
index e583be1..ad1a247
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2011-2012 Free Software Foundation, Inc.
+# Copyright (C) 2011-2017 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
 # missing from the dist tarball (interaction with '--install').
 # See automake bug#9037.
 
-. ./defs || Exit 1
+. test-init.sh
 
-cwd=`pwd` || fatal_ "cannot get current working directory"
+cwd=$(pwd) || fatal_ "cannot get current working directory"
 
-cp "$am_testauxdir"/distcheck-hook-m4.am . \
+cp "$am_testaux_srcdir"/distcheck-hook-m4.am . \
   || fatal_ "cannot fetch makefile fragment 'distcheck-hook-m4.am'"
 
 cat > Makefile.am << 'END'
@@ -60,22 +60,21 @@ ACLOCAL_PATH=$cwd/pth; export ACLOCAL_PATH
 # We don't use '--install' here.  Our distcheck-hook should catch this.
 $ACLOCAL -I m4
 $AUTOCONF
-$EGREP 'MY_(FOO|BAR|BAZ|ZAR)' configure && Exit 1 # Sanity check.
+$EGREP 'MY_(FOO|BAR|BAZ|ZAR)' configure && exit 1 # Sanity check.
 $AUTOMAKE
 
 check_no_spurious_error ()
 {
-  $EGREP -i 'mkdir:|:.*(permission|denied)' output && Exit 1
+  $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 -v 'rm -rf ' output | grep -i 'autom4te.*\.cache' && exit 1
   : To placate 'set -e'.
 }
 
 ./configure
 
-$MAKE distcheck >output 2>&1 && { cat output; Exit 1; }
-cat output
+run_make -M -e FAIL distcheck
 for x in bar baz zar; do
   $EGREP "required m4 file.*not distributed.* $x.m4( |$)" output
 done
@@ -98,15 +97,14 @@ MY_BLA
 END
 
 $MAKE
-$EGREP 'MY_(FOO|BAR|BAZ|QUX|ZAR|BLA)' configure && Exit 1 # Sanity check.
+$EGREP 'MY_(FOO|BAR|BAZ|QUX|ZAR|BLA)' configure && exit 1 # Sanity check.
 
-$MAKE distcheck >output 2>&1 && { cat output; Exit 1; }
-cat output
+run_make -M -e FAIL distcheck
 $EGREP "required m4 file.*not distributed.* qux.m4( |$)" output
 $EGREP "required m4 file.*not distributed.* bla.m4( |$)" output
 check_no_spurious_error
 # Check that we don't complain for files that should have been found.
-$FGREP " (bar|baz|zar).m4" output && Exit 1
+$FGREP " (bar|baz|zar).m4" output && exit 1
 
 # Now we again use '--install', and "make distcheck" should pass.
 $ACLOCAL -I m4 --install
diff --git a/t/distcheck-no-prefix-or-srcdir-override.sh b/t/distcheck-no-prefix-or-srcdir-override.sh
new file mode 100644 (file)
index 0000000..c99a7d9
--- /dev/null
@@ -0,0 +1,60 @@
+#! /bin/sh
+# Copyright (C) 2013-2017 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 "make distcheck" overrides any --srcdir or --prefix flag
+# (mistakenly) defined in $(AM_DISTCHECK_CONFIGURE_FLAGS) or
+# $(DISTCHECK_CONFIGURE_FLAGS).  See automake bug#14991.
+
+. test-init.sh
+
+echo AC_OUTPUT >> configure.ac
+
+orig_cwd=$(pwd); export orig_cwd
+
+cat > Makefile.am << 'END'
+# configure should choke on non-absolute prefix or non-existent
+# srcdir.  We'll sanity-check that later.
+AM_DISTCHECK_CONFIGURE_FLAGS = --srcdir am-src --prefix am-pfx
+END
+
+# Same comments as above applies.
+DISTCHECK_CONFIGURE_FLAGS='--srcdir user-src --prefix user-pfx'
+export DISTCHECK_CONFIGURE_FLAGS
+
+$ACLOCAL
+$AUTOMAKE
+$AUTOCONF
+
+# Sanity check: configure should choke on non-absolute prefix
+# or non-existent srcdir.
+./configure --prefix foobar 2>stderr && { cat stderr >&2; exit 99; }
+cat stderr >&2
+grep "expected an absolute directory name for --prefix" stderr || exit 99
+./configure --srcdir foobar 2>stderr && { cat stderr >&2; exit 99; }
+cat stderr >&2
+grep "cannot find sources.* in foobar" stderr || exit 99
+
+./configure
+run_make -E -O distcheck
+test ! -s stderr
+# Sanity check: the flags have been actually seen.
+$PERL -e 'undef $/; $_ = <>; s/ \\\n/ /g; print;' <stdout >t
+grep '/configure .* --srcdir am-src'   t || exit 99
+grep '/configure .* --prefix am-pfx'   t || exit 99
+grep '/configure .* --srcdir user-src' t || exit 99
+grep '/configure .* --prefix user-pfx' t || exit 99
+
+:
old mode 100755 (executable)
new mode 100644 (file)
index 71ae3dd..12591ce
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2011-2012 Free Software Foundation, Inc.
+# Copyright (C) 2011-2017 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
 # files in a dist tarball (interaction with '--install').
 # See automake bug#9037.
 
-. ./defs || Exit 1
+. test-init.sh
 
-cwd=`pwd` || fatal_ "cannot get current working directory"
+cwd=$(pwd) || fatal_ "cannot get current working directory"
 
-cp "$am_testauxdir"/distcheck-hook-m4.am . \
+cp "$am_testaux_srcdir"/distcheck-hook-m4.am . \
   || fatal_ "cannot fetch makefile fragment 'distcheck-hook-m4.am'"
 
 cat > Makefile.am << 'END'
@@ -59,10 +59,10 @@ $MAKE distcheck # Sanity check.
 
 check_no_spurious_error ()
 {
-  $EGREP -i 'mkdir:|:.*(permission|denied)' output && Exit 1
+  $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 -v 'rm -rf ' output | grep -i 'autom4te.*\.cache' && exit 1
   : To placate 'set -e'.
 }
 
@@ -79,13 +79,11 @@ AC_DEFUN([MY_ZARDOZ], [:])
 END
 
 $MAKE # Rebuild configure and makefiles.
-$MAKE distcheck >output 2>&1 && { cat output; Exit 1; }
-cat output
-
+run_make -M -e FAIL distcheck
 $EGREP "required m4 file.* outdated.* baz.m4( |$)" output
 check_no_spurious_error
 # Check that we don't complain for files that aren't outdated.
-$EGREP " (foo|bar).m4" output && Exit 1
+$EGREP " (foo|bar).m4" output && exit 1
 
 # Now we again use '--install' explicitly, and "make distcheck"
 # should pass.
@@ -121,12 +119,11 @@ AC_DEFUN([MY_FNORD], [:])
 END
 
 $MAKE # Rebuild configure and makefiles.
-$MAKE distcheck >output 2>&1 && { cat output; Exit 1; }
-cat output
+run_make -M -e FAIL distcheck
 $EGREP "required m4 file.* outdated.* fnord.m4( |$)" output
 check_no_spurious_error
 # Check that we don't complain for files that aren't outdated.
-$EGREP " (foo|bar|baz).m4" output && Exit 1
+$EGREP " (foo|bar|baz).m4" output && exit 1
 
 # Now we again use '--install' explicitly, and "make distcheck"
 # should pass.
old mode 100755 (executable)
new mode 100644 (file)
index 746b5f8..efe5a94
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2011-2012 Free Software Foundation, Inc.
+# Copyright (C) 2011-2017 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
@@ -18,7 +18,7 @@
 # working.  Related to automake bug#9579.
 
 required='makeinfo tex texi2dvi install-info'
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_OUTPUT
@@ -38,13 +38,30 @@ installcheck-local:
        fi
 END
 
-cat > main.texi << 'END'
-\input texinfo
-@setfilename main.info
-@settitle main
-@node Top
-Hello walls.
-@bye
+# Protect with leading " # " to avoid spurious maintainer-check failures.
+sed 's/^ *# *//' > main.texi << 'END'
+ # \input texinfo
+ # @setfilename main.info
+ # @settitle main
+ #
+ # @c Explicit calls to @dircategory and @direntry required to ensure that
+ # @c a 'dir' file will be created also by older versions of 'install-info'
+ # @c (e.g., the one coming with Texinfo 4.8).
+ #
+ # @dircategory Software development
+ # @direntry
+ # * Automake: (automake).  Making GNU standards-compliant Makefiles
+ # @end direntry
+ #
+ # @dircategory Individual utilities
+ # @direntry
+ # * aclocal-invocation: (automake)aclocal Invocation.   Generating aclocal.m4
+ # * automake-invocation: (automake)automake Invocation. Generating Makefile.in
+ # @end direntry
+ #
+ # @node Top
+ # Hello walls.
+ # @bye
 END
 
 $ACLOCAL
@@ -55,7 +72,7 @@ $AUTOCONF
 $MAKE
 
 $MAKE distcheck
-infodir="`pwd`"/_info $MAKE -e distcheck
-test -f _info/dir || Exit 99 # Sanity check.
+run_make infodir="$(pwd)/_info" distcheck
+test -f _info/dir || exit 99 # Sanity check.
 
 :
old mode 100755 (executable)
new mode 100644 (file)
index e4d8252..5424d02
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2012 Free Software Foundation, Inc.
+# Copyright (C) 2012-2017 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
@@ -19,7 +19,7 @@
 # by a process (e.g., that is its "current working directory").
 # See automake bug#10470.
 
-. ./defs || Exit 1
+. test-init.sh
 
 mkdir foo.d
 sh -c "cd foo.d && sleep '4'" &
@@ -45,14 +45,13 @@ chmod a+x foo.test
 
 $ACLOCAL
 $AUTOCONF
-$AUTOMAKE
+$AUTOMAKE -a
 ./configure
 
 # We can build the distribution.
-$MAKE distcheck >output 2>&1 || { cat output; Exit 1; }
-cat output
+run_make -M distcheck
 # 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"
+$EGREP "(^| )(rm|find):.*$distdir" output || fatal_ "expected code path not covered"
 
 :
diff --git a/t/distcheck-pr18286.sh b/t/distcheck-pr18286.sh
new file mode 100644 (file)
index 0000000..549ec22
--- /dev/null
@@ -0,0 +1,70 @@
+#! /bin/sh
+# Copyright (C) 2014-2017 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 "make distcheck" detects all missing files, without getting
+# confused by the fact that they exists in the "original" source tree
+# from which "make distcheck" is run. See automake bug#18286.
+
+. test-init.sh
+
+echo AC_OUTPUT >> configure.ac
+
+cat > Makefile.am <<'END'
+$(srcdir)/test_data.am: $(srcdir)/test_data.txt $(srcdir)/gen-testdata.sh
+       cd $(srcdir) && $(SHELL) gen-testdata.sh <test_data.txt >test_data.am
+
+include $(srcdir)/test_data.am
+
+check-local:
+       is $(testdata) == foo bar
+END
+
+cat > test_data.txt <<'END'
+foo
+bar
+END
+
+
+cat > gen-testdata.sh <<'END'
+#!/bin/sh
+printf 'testdata = \\\n'
+sed 's/$/ \\/'
+echo '$(empty_string)'
+END
+chmod a+x gen-testdata.sh
+
+$sleep
+./gen-testdata.sh <test_data.txt >test_data.am
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE -a
+
+./configure
+
+$MAKE check
+
+# Oops, we failed to distribute some required files!
+run_make -e FAIL -M distcheck
+$FGREP '../../test_data.txt' output
+
+# But if we distribute them, everything will be OK.
+echo 'EXTRA_DIST = test_data.txt gen-testdata.sh' >> Makefile.am
+
+using_gmake || $MAKE Makefile
+$MAKE distcheck
+
+:
old mode 100755 (executable)
new mode 100644 (file)
index 8c78900..2034f17
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2011-2012 Free Software Foundation, Inc.
+# Copyright (C) 2011-2017 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
@@ -17,7 +17,7 @@
 # Check against automake bug#9579: distcheck does not always detect
 # incomplete uninstall as advertised.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_OUTPUT
@@ -42,7 +42,7 @@ $ACLOCAL
 $AUTOMAKE
 $AUTOCONF
 
-./configure --prefix="`pwd`/inst"
+./configure --prefix="$(pwd)/inst"
 
 # Sanity checks.
 $MAKE install
@@ -54,9 +54,7 @@ $MAKE uninstall
 test -f inst/share/dir
 rm -rf inst
 
-$MAKE distcheck >output 2>&1 && { cat output; Exit 1; }
-cat output
-
+run_make -M -e FAIL distcheck
 $FGREP 'ERROR: files left after uninstall:' output
 grep '/share/dir *$' output
 
@@ -86,9 +84,7 @@ test -f inst/mu/share/info/dir
 test -f inst/share/info/more/dir
 rm -rf inst
 
-$MAKE distcheck >output 2>&1 && { cat output; Exit 1; }
-cat output
-
+run_make -M -e FAIL distcheck
 $FGREP 'ERROR: files left after uninstall:' output
 grep '/mu/share/info/dir *$' output
 grep '/share/info/more/dir *$' output
old mode 100755 (executable)
new mode 100644 (file)
index bbc50f4..5234337
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2012 Free Software Foundation, Inc.
+# Copyright (C) 2012-2017 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
@@ -21,7 +21,7 @@
 # case too (since it doesn't cost us anything but this test).
 # See automake bug#10878.
 
-. ./defs || Exit 1
+. test-init.sh
 
 echo AC_OUTPUT >> configure.ac
 
old mode 100755 (executable)
new mode 100644 (file)
index 39197d7..ed92e77
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2008-2012 Free Software Foundation, Inc.
+# Copyright (C) 2008-2017 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
@@ -18,7 +18,7 @@
 # The example Makefile.am we use is from the FAQ entry 'distcleancheck'.
 
 required=cc
-. ./defs || Exit 1
+. test-init.sh
 
 cat >>configure.ac << 'END'
 AC_PROG_CC
@@ -62,9 +62,7 @@ mv -f t Makefile.am
 $AUTOMAKE
 ./configure
 $MAKE
-$MAKE distcheck 2>stderr && { cat srderr >&2; Exit 1; }
-cat stderr >&2
-
+run_make -E -e FAIL distcheck
 grep 'ERROR:.*files left in build directory after distclean' stderr
 grep '^\./foo\.1$' stderr
 
old mode 100755 (executable)
new mode 100644 (file)
index 4da74d0..999400b
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2004-2012 Free Software Foundation, Inc.
+# Copyright (C) 2004-2017 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
 # 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
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_CONFIG_FILES([subdir/Makefile])
 AC_PROG_CC
+AC_PROG_FGREP
 AC_OUTPUT
 END
 
 cat > Makefile.am << 'END'
 SUBDIRS = subdir
+test-distdir: distdir
+       test -f $(distdir)/depcomp
+.PHONY: test-distdir
+check-local: test-distdir
 END
 
 rm -f depcomp
 mkdir subdir
 
-: > subdir/Makefile.am
+cat > subdir/Makefile.am << 'END'
+.PHONY: test-distcom
+test-distcom:
+       echo ' ' $(DIST_COMMON) ' ' | $(FGREP) ' $(top_srcdir)/depcomp '
+END
 
 $ACLOCAL
 $AUTOCONF
 $AUTOMAKE
-test ! -f depcomp
+test ! -e depcomp
 
-cat > subdir/Makefile.am << 'END'
+cat >> subdir/Makefile.am << 'END'
 bin_PROGRAMS = foo
+.PHONY: test-distcom
+test-distcom:
+       echo ' ' $(DIST_COMMON) ' ' | $(FGREP) ' $(top_srcdir)/depcomp '
+check-local: test-distcom
 END
 
-: > subdir/foo.c
+cat > subdir/foo.c <<'END'
+int main (void)
+{
+  return 0;
+}
+END
 
 $AUTOMAKE -a subdir/Makefile
 test -f depcomp
 
-# FIXME: the logic of this check and other similar ones in other
-# FIXME: 'distcom*.test' files should be factored out in a common
-# FIXME: subroutine in 'defs'...
-sed -n -e "
-  /^DIST_COMMON =.*\\\\$/ {
-    :loop
-    p
-    n
-    t clear
-    :clear
-    s/\\\\$/\\\\/
-    t loop
-    s/$/ /
-    s/[$tab ][$tab ]*/ /g
-    p
-    n
-  }" subdir/Makefile.in > dc.txt
-cat dc.txt
-$FGREP ' $(top_srcdir)/depcomp ' dc.txt
-
 ./configure
-$MAKE distdir
-test -f $distdir/depcomp
+(cd subdir && $MAKE test-distcom)
+$MAKE test-distdir
+
+$MAKE distcheck
 
 :
old mode 100755 (executable)
new mode 100644 (file)
index 4b86f92..47895a9
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2001-2012 Free Software Foundation, Inc.
+# Copyright (C) 2001-2017 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
 # Report from Pavel Roskin.  Report of problems with '--no-force' from
 # Scott James Remnant (Debian #206299)
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_CC
-AM_PROG_CC_C_O
 AC_CONFIG_FILES([subdir/Makefile])
 AC_OUTPUT
 END
@@ -44,28 +43,26 @@ $ACLOCAL
 
 for opt in '' --no-force; do
 
+  rm -f compile depcomp
+
   $AUTOMAKE $opt --add-missing
 
   test -f compile
   test -f depcomp
 
   for dir in . subdir; do
-    # FIXME: the logic of this check and other similar ones in other
-    # FIXME: 'distcom*.test' files should be factored out in a common
-    # FIXME: subroutine in 'defs'...
     sed -n -e "
-      /^DIST_COMMON =.*\\\\$/ {
+      /^am__DIST_COMMON =.*/ {
+        b body
         :loop
-        p
         n
-        t clear
-        :clear
+        :body
+        p
         s/\\\\$/\\\\/
         t loop
         s/$/ /
         s/[$tab ][$tab ]*/ /g
         p
-        n
       }" $dir/Makefile.in > $dir/dc.txt
   done
 
@@ -74,7 +71,7 @@ for opt in '' --no-force; do
 
   $FGREP ' $(top_srcdir)/depcomp ' subdir/dc.txt
   # The 'compile' script will be listed in the DIST_COMMON of the top-level
-  # Makefile because it's required in configure.ac (by AM_PROG_CC_C_O).
+  # Makefile because it's required in configure.ac (by AC_PROG_CC).
   $FGREP ' $(top_srcdir)/compile ' dc.txt || $FGREP ' compile ' dc.txt
 
 done
old mode 100755 (executable)
new mode 100644 (file)
index 34ad709..d4bc895
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2001-2012 Free Software Foundation, Inc.
+# Copyright (C) 2001-2017 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
 # Test to make sure that non-existing common files are distributed
 # if they are buildable.
 
-. ./defs || Exit 1
+. test-init.sh
+
+echo AC_OUTPUT >> configure.ac
 
 cat > Makefile.am << 'END'
 README:
        echo 'I bet you are reading me.' > README
+test-distcommon:
+       echo ' ' $(DIST_COMMON) ' ' | grep ' README '
 END
 
 # Files required by '--gnu'.
@@ -32,24 +36,18 @@ END
 $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
-
-sed -n -e '/^DIST_COMMON =.*\\$/ {
-   :loop
-   p
-   n
-   t clear
-   :clear
-   s/\\$/\\/
-   t loop
-   p
-   n
-   }' -e '/^DIST_COMMON =/ p' Makefile.in | grep README
+grep README output && exit 1
 
+$AUTOCONF
+./configure
+$MAKE test-distcommon
+$MAKE distdir
+test -f $distdir/README
 
 # Should warn about missing README.
+rm -f README
 : > Makefile.am
 AUTOMAKE_fails --add-missing --gnu
 grep 'required file.*README.*not found' stderr
old mode 100755 (executable)
new mode 100644 (file)
index dc37fcf..4c3fbee
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2003-2012 Free Software Foundation, Inc.
+# Copyright (C) 2003-2017 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
 
 # Test to make sure config files are distributed, and only once.
 # This tries to distribute a file from a subdirectory, without
-# Makefile in that directory.  distcom5.test performs the same
+# Makefile in that directory.  'distcom5.sh' performs the same
 # test with a Makefile in the directory.
-# Also make sure that README appears first in DIST_COMMON.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
    AC_CONFIG_FILES([tests/autoconf:tests/wrapper.in],
@@ -44,8 +43,13 @@ mkdir tests
 : > README
 : > tests/wrapper.in
 cat > Makefile.am << 'END'
-.PHONY: test
-test: distdir
+.PHONY: test1 test 2
+test1:
+       for x in $(DIST_COMMON); do echo $$x; done \
+         | grep 'tests/' > lst
+       cat lst # For debugging.
+       test `wc -l <lst` -eq 1
+test2: distdir
        test -f $(distdir)/tests/wrapper.in
 END
 
@@ -53,25 +57,6 @@ $ACLOCAL
 $AUTOCONF
 $AUTOMAKE --add-missing
 ./configure
-$MAKE test
-
-sed -n -e '/^DIST_COMMON =.*\\$/ {
-   :loop
-   p
-   n
-   t clear
-   :clear
-   s/\\$/\\/
-   t loop
-   p
-   n
-   }' -e '/^DIST_COMMON =/ p' Makefile.in > dc.txt
-
-cat dc.txt # For debugging.
-
-test 1 = `grep tests dc.txt | wc -l`
-grep configure dc.txt
-# README must come first.
-grep 'DIST_COMMON = README' Makefile.in
+$MAKE test1 test2
 
 :
old mode 100755 (executable)
new mode 100644 (file)
index adfbe52..6885c17
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2003-2012 Free Software Foundation, Inc.
+# Copyright (C) 2003-2017 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
 
 # Test to make sure config files are distributed, and only once.
 # This tries to distribute a file from a subdirectory, with
-# a Makefile in that directory.  distcom4.test performs the same
+# a Makefile in that directory.  'distcom4.sh' performs the same
 # test without Makefile in the directory.
 
-. ./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+"$@"}
-}
+. test-init.sh
 
 cat >> configure.ac << 'END'
    AC_CONFIG_FILES([tests/autoconf:tests/wrapper.in],
@@ -57,28 +42,31 @@ END
 
 mkdir tests
 : > tests/wrapper.in
-: > tests/Makefile.am
+
 cat > Makefile.am << 'END'
 SUBDIRS = tests
 .PHONY: test
 test: distdir
        test -f $(distdir)/tests/wrapper.in
+check-local: test
+       for x in $(DIST_COMMON); do echo $$x; done \
+         | grep tests && exit 1; :
+END
+
+cat > tests/Makefile.am <<'END'
+check-local:
+       for x in $(DIST_COMMON); do echo $$x; done \
+         | grep wrapper.in > lst
+       cat lst # For debugging.
+       test `wc -l <lst` -eq 1
 END
 
 $ACLOCAL
 $AUTOCONF
 $AUTOMAKE --add-missing
 ./configure
-$MAKE test
-
-extract_distcommon Makefile.in > top.txt
-extract_distcommon tests/Makefile.in > inner.txt
-
-# Might be useful for debugging.
-cat top.txt
-cat inner.txt
-
-test 0 = `grep tests top.txt | wc -l`
-test 1 = `grep wrapper inner.txt | wc -l`
+$MAKE check
+# Sanity check.
+test -f tests/lst
 
 :
old mode 100755 (executable)
new mode 100644 (file)
index 0657928..e1f8c41
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 1996-2012 Free Software Foundation, Inc.
+# Copyright (C) 1996-2017 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
@@ -21,7 +21,7 @@
 # Also test DISTFILES containing a directory and a file in it,
 # and repeated directories.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_OUTPUT
@@ -64,19 +64,18 @@ cd build
 ../configure
 $MAKE distdir
 # Check to make sure 'foo' isn't made in build directory.
-test -d foo && Exit 1
+test -d foo && exit 1
 
 rm -rf $me-1.0
 # Remove the dot from VERSION for the next grep.
-VERSION=10 MKDIR_P='echo MKDIR_P' $MAKE -e distdir >stdout || :
-cat stdout
+run_make -O -e IGNORE VERSION=10 MKDIR_P='echo MKDIR_P' distdir
 
 # Make sure no './' appear in the directory names.  srcdir is '..', so
 # this also checks that no directory is created in the source tree.
-grep 'MKDIR_P.*\.' stdout && Exit 1
+grep 'MKDIR_P.*\.' stdout && exit 1
 
 cd ..
-./configure --prefix "`pwd`"
+./configure --prefix "$(pwd)"
 $MAKE distcheck
 
 :
old mode 100755 (executable)
new mode 100644 (file)
index 9804e99..0c2cfdb
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2012 Free Software Foundation, Inc.
+# Copyright (C) 2012-2017 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
@@ -16,7 +16,7 @@
 
 # Check that 'dist-hook' works.  See automake bug#10878.
 
-. ./defs || Exit 1
+. test-init.sh
 
 echo AC_OUTPUT >> configure.ac
 
@@ -71,18 +71,15 @@ chmod a-x execute
 $MAKE distdir
 ls -l $distdir $distdir/doc
 cd $distdir
-test "`cat write`" = "all is ok"
-test ! -f removed
-test ! -r removed
+test "$(cat write)" = "all is ok"
+test ! -e removed
 test -f doc/README
 test -f doc/RELEASE-DATE
-test ! -f doc/HACING
-test ! -r doc/HACING
+test ! -e doc/HACING
 ./execute
 ./execute | grep 'I run successfully'
 cd ..
 
-
 $MAKE distcheck
 test -f distcheck-run
 
old mode 100755 (executable)
new mode 100644 (file)
index 08244c0..c876228
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2010-2012 Free Software Foundation, Inc.
+# Copyright (C) 2010-2017 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
@@ -17,7 +17,7 @@
 # Check that distributed symlinks in the source tree will be expanded
 # as regular files in $(distdir).
 
-. ./defs || Exit 1
+. test-init.sh
 
 echo text > file
 
@@ -36,7 +36,7 @@ ln -s foo  bar1
 ln -s bar1 bar2
 ln -s bar2 bar3
 
-ln -s "`pwd`/foo" quux
+ln -s "$(pwd)/foo" quux
 
 cat >> configure.ac << 'END'
 AC_OUTPUT
old mode 100755 (executable)
new mode 100644 (file)
index b7732ca..39604e0
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2010-2012 Free Software Foundation, Inc.
+# Copyright (C) 2010-2017 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
@@ -17,7 +17,7 @@
 # Check that distributed broken symlinks cause 'make dist' to fail, and
 # to do so with (mostly) meaningful diagnostic.
 
-. ./defs || Exit 1
+. test-init.sh
 
 # We need, for our broken symlinks, names that make it hard to get false
 # positives when grepping make output to look for them.
@@ -29,16 +29,16 @@ lnkb=${lnk_base}__bbb
 
 ln -s nonesuch $lnk1 || skip_ "cannot create broken symlinks"
 
-ln -s "`pwd`/nonesuch" $lnk2
+ln -s "$(pwd)/nonesuch" $lnk2
 
 ln -s $lnk1 $lnka
 ln -s $lnka $lnkb
 
-# Sanity checks.  Use 'test -r', since Solaris Sh doesn't grok 'test -e'.
-test ! -r $lnk1
-test ! -r $lnk2
-test ! -r $lnka
-test ! -r $lnkb
+# Sanity checks.
+test ! -e $lnk1
+test ! -e $lnk2
+test ! -e $lnka
+test ! -e $lnkb
 test -h $lnk1
 test -h $lnk2
 test -h $lnka
@@ -60,9 +60,8 @@ for lnk in $lnk1 $lnk2 $lnka $lnkb; do
   $AUTOMAKE
   ./configure
   # Distribution must fail, with a decent error message.
-  $MAKE distdir >out 2>&1 && { cat out; Exit 1; }
-  cat out
-  $FGREP $lnk out
+  run_make -M -e FAIL distdir
+  $FGREP $lnk output
 done
 
 :
old mode 100755 (executable)
new mode 100644 (file)
index 0ef3cdb..503e782
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2001-2012 Free Software Foundation, Inc.
+# Copyright (C) 2001-2017 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
@@ -18,7 +18,7 @@
 # From Rainer Orth.
 
 required=cc
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_CONFIG_SRCDIR([a.c])
@@ -40,8 +40,8 @@ $AUTOMAKE --include-deps --copy --add-missing
 $MAKE dist
 
 gzip -d $me-1.0.tar.gz
-tar tf $me-1.0.tar > stdout || { cat stdout; Exit 1; }
+tar tf $me-1.0.tar > stdout || { cat stdout; exit 1; }
 cat stdout
-$FGREP ./$me-1.0/a.c stdout && Exit 1
+$FGREP ./$me-1.0/a.c stdout && exit 1
 
 :
old mode 100755 (executable)
new mode 100644 (file)
index 2bf6a7c..ea7854d
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2010-2012 Free Software Foundation, Inc.
+# Copyright (C) 2010-2017 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
@@ -16,7 +16,7 @@
 
 # Simple checks on the 'AM_WITH_DMALLOC' macro.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_CONFIG_HEADERS([config.h])
old mode 100755 (executable)
new mode 100644 (file)
index 8ff27f1..5d2dbb3
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2011-2012 Free Software Foundation, Inc.
+# Copyright (C) 2011-2017 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
@@ -22,7 +22,7 @@
 # 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>
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat > Makefile.am <<'END'
 $(FOO:=x): bar
old mode 100755 (executable)
new mode 100644 (file)
index 22c981c..190c9a9
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2011-2012 Free Software Foundation, Inc.
+# Copyright (C) 2011-2017 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
@@ -20,7 +20,7 @@
 # If you cause some parts of this test to fail, chances are that you've
 # improved the Automake parser ;-)
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat > Makefile.am <<END
 .PHONY: test
@@ -47,8 +47,8 @@ echo AC_OUTPUT >> configure.ac
 $ACLOCAL
 $AUTOMAKE
 
-$FGREP '$(EXEEEXT)' Makefile.in && Exit 1
-grep 'all:.*all-local' Makefile.in && Exit 1
+$FGREP '$(EXEEEXT)' Makefile.in && exit 1
+grep 'all:.*all-local' Makefile.in && exit 1
 grep "^${tab}bin_PROGRAMS = foo" Makefile.in
 
 $AUTOCONF
old mode 100755 (executable)
new mode 100644 (file)
index 92ed26a..5910ad0
@@ -1,5 +1,5 @@
 #!/bin/sh
-# Copyright (C) 2002-2012 Free Software Foundation, Inc.
+# Copyright (C) 2002-2017 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
@@ -21,7 +21,7 @@
 # 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
+. test-init.sh
 
 echo AC_OUTPUT >> configure.ac
 
@@ -38,7 +38,9 @@ EOF
 $ACLOCAL
 $AUTOCONF
 $AUTOMAKE
-./configure --prefix "`pwd`/inst"
+./configure --prefix "$(pwd)/inst"
 $MAKE install
 test -f 'inst/my/hello$world'
 $MAKE check-dist
+
+:
old mode 100755 (executable)
new mode 100644 (file)
index 940ef23..720818b
@@ -1,5 +1,5 @@
 #!/bin/sh
-# Copyright (C) 2009-2012 Free Software Foundation, Inc.
+# Copyright (C) 2009-2017 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
@@ -22,7 +22,7 @@
 # containing a '$' on the left hand side of an assignment are not
 # portable in practice, even though POSIX allows them.  :-/
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat >Makefile.am <<'EOF'
 x = 1
@@ -35,6 +35,7 @@ blo = $(foo${x})
 EOF
 
 $ACLOCAL
+
 AUTOMAKE_fails -Wportability
 grep 'Makefile.am:2' stderr
 grep 'Makefile.am:3' stderr
@@ -43,21 +44,13 @@ grep 'Makefile.am:5' stderr
 grep 'Makefile.am:6' stderr
 grep 'Makefile.am:7' stderr
 
-# On the other hand, if we allow 'silent-rules' mode, then we need to
-# allow recursive variable expansion, too.
-
-# This should work with the AM_SILENT_RULES macro.
-$sleep
-echo 'AM_SILENT_RULES' >> configure.ac
-
-$ACLOCAL --force
-AUTOMAKE_fails -Wportability
+AUTOMAKE_fails -Wportability -Wno-portability-recursive
 grep 'Makefile.am:2' stderr
 grep 'Makefile.am:3' stderr
 grep 'Makefile.am:4' stderr
 grep 'Makefile.am:5' stderr
-grep 'Makefile.am:6' stderr && Exit 1
-grep 'Makefile.am:7' stderr && Exit 1
+grep 'Makefile.am:6' stderr && exit 1
+grep 'Makefile.am:7' stderr && exit 1
 
 
 :
old mode 100755 (executable)
new mode 100644 (file)
index cef85bb..80b0319
@@ -1,5 +1,5 @@
 #!/bin/sh
-# Copyright (C) 2009-2012 Free Software Foundation, Inc.
+# Copyright (C) 2009-2017 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
@@ -17,7 +17,7 @@
 # Test to make sure that -Wportability turns on portability-recursive,
 # likewise for -Wno-...
 
-. ./defs || Exit 1
+. test-init.sh
 
 #
 # First, try a setup where we have a 'portability-recursive' warning,
@@ -65,27 +65,22 @@ grep 'recursive variable expansion' stderr
 cat >Makefile.am <<'EOF'
 x = 1
 bla = $(foo$(x))
-noinst_PROGRAMS = foo
-foo_CPPFLAGS = -Dwhatever
+oops = $(var-with-dash)
 EOF
 
-echo AC_PROG_CC >> configure.ac
-
-$ACLOCAL --force
-
 # Can disable both 'portability' and 'portability-recursive' warnings.
 $AUTOMAKE -Wno-portability
 
 # Disabling 'portability-recursive' warnings should not disable
 # 'portability' warnings.
 AUTOMAKE_fails -Wportability -Wno-portability-recursive
-grep AM_PROG_CC_C_O stderr
-grep 'recursive variable expansion' stderr && Exit 1
+grep 'var-with-dash' stderr
+grep 'recursive variable expansion' stderr && exit 1
 
 # Enabling 'portability-recursive' warnings should not enable
 # all the 'portability' warning.
 AUTOMAKE_fails -Wno-portability -Wportability-recursive
-grep AM_PROG_CC_C_O stderr && Exit 1
+grep 'var-with-dash' stderr && exit 1
 grep 'recursive variable expansion' stderr
 
 :
old mode 100755 (executable)
new mode 100644 (file)
index 7f353b7..9b00e9e
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 1999-2012 Free Software Foundation, Inc.
+# Copyright (C) 1999-2017 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
@@ -17,7 +17,7 @@
 # Test to make sure listing a program twice is ok.
 # Report from Manu Rouat.
 
-. ./defs || Exit 1
+. test-init.sh
 
 echo AC_PROG_CC >> configure.ac
 
old mode 100755 (executable)
new mode 100644 (file)
index d405828..5373130
--- a/t/dup2.sh
+++ b/t/dup2.sh
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 1996-2012 Free Software Foundation, Inc.
+# Copyright (C) 1996-2017 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
@@ -16,7 +16,7 @@
 
 # Make sure aclocal only warns about definitions overridden by acinclude.m4.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AM_FUNC_STRTOD
old mode 100755 (executable)
new mode 100644 (file)
index 74d2158..4bf755d
--- a/t/else.sh
+++ b/t/else.sh
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 1998-2012 Free Software Foundation, Inc.
+# Copyright (C) 1998-2017 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
@@ -16,7 +16,7 @@
 
 # Test to make sure line numbers are correct in some error reports.
 
-. ./defs || Exit 1
+. test-init.sh
 
 echo 'AM_CONDITIONAL(FOO, true)' >> configure.ac
 
old mode 100755 (executable)
new mode 100644 (file)
similarity index 88%
rename from t/empty.sh
rename to t/empty-data-primary.sh
index 795f922..c80fa0f
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 1996-2012 Free Software Foundation, Inc.
+# Copyright (C) 1996-2017 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
@@ -17,7 +17,7 @@
 # Test for bug where if the list of installables is empty, invalid sh
 # code is generated.
 
-. ./defs || Exit 1
+. test-init.sh
 
 echo AC_OUTPUT >>configure.ac
 echo 'data_DATA =' >Makefile.am
@@ -25,5 +25,7 @@ echo 'data_DATA =' >Makefile.am
 $ACLOCAL
 $AUTOCONF
 $AUTOMAKE
-./configure --prefix "`pwd`/inst"
+./configure --prefix "$(pwd)/inst"
 $MAKE install
+
+:
old mode 100755 (executable)
new mode 100644 (file)
similarity index 58%
rename from t/empty4.sh
rename to t/empty-sources-primary.tap
index 8106426..36a20dd
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 1999-2012 Free Software Foundation, Inc.
+# Copyright (C) 1999-2017 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 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
+. test-init.sh
+
+plan_ 5
 
 cat >> configure.ac << 'END'
 AC_PROG_CC
-AC_SUBST(ZOO_OBJ)
+AC_SUBST([zoo_obj])
 END
 
 cat > Makefile.am << 'END'
+sbin_PROGRAMS = pavel
+
+bin_PROGRAMS = pavel2
+pavel2_SOURCES =
+
 noinst_PROGRAMS = zoo
 zoo_SOURCES =
 EXTRA_zoo_SOURCES = bar.c foo.c
-zoo_DEPENDENCIES = $(ZOO_OBJ)
+zoo_DEPENDENCIES = $(zoo_obj)
 zoo_LDADD = $(zoo_DEPENDENCIES)
 END
 
-$ACLOCAL
-$AUTOMAKE
-$FGREP zoo. Makefile.in && Exit 1
-Exit 0
+command_ok_ "aclocal" $ACLOCAL
+command_ok_ "automake" $AUTOMAKE
+
+command_ok_ "default _SOURCES" $FGREP ' pavel.c' Makefile.in
+command_ok_ "empty _SOURCES (basic)" not $FGREP 'pavel2.' Makefile.in
+command_ok_ "empty _SOURCES (elaborate)" not $FGREP 'zoo.' Makefile.in
+
+:
diff --git a/t/empty2.sh b/t/empty2.sh
deleted file mode 100755 (executable)
index 7d12423..0000000
+++ /dev/null
@@ -1,35 +0,0 @@
-#! /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 empty _SOURCES suppresses assumption about default
-# name.  Report from Pavel Roskin.
-
-. ./defs || Exit 1
-
-cat >> configure.ac << 'END'
-AC_PROG_CC
-END
-
-cat > Makefile.am << 'END'
-bin_PROGRAMS = pavel
-pavel_SOURCES =
-END
-
-$ACLOCAL
-$AUTOMAKE
-
-grep 'pavel\.[co]' Makefile.in && Exit 1
-Exit 0
diff --git a/t/empty3.sh b/t/empty3.sh
deleted file mode 100755 (executable)
index 6aabfba..0000000
+++ /dev/null
@@ -1,32 +0,0 @@
-#! /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/>.
-
-# A test for missing _SOURCES variable.
-
-. ./defs || Exit 1
-
-cat >> configure.ac << 'END'
-AC_PROG_CC
-END
-
-cat > Makefile.am << 'END'
-bin_PROGRAMS = pavel
-END
-
-$ACLOCAL
-$AUTOMAKE
-
-grep 'pavel\.[co]' Makefile.in
old mode 100755 (executable)
new mode 100644 (file)
index 6e048d2..d34701d
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 1996-2012 Free Software Foundation, Inc.
+# Copyright (C) 1996-2017 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
@@ -16,7 +16,7 @@
 
 # Check to make sure new extended directory mechanism works.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat > Makefile.am << 'EOF'
 htmldir = $(prefix)/html
old mode 100755 (executable)
new mode 100644 (file)
index ddaac58..84ec535
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 1998-2012 Free Software Foundation, Inc.
+# Copyright (C) 1998-2017 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
@@ -16,7 +16,7 @@
 
 # Test to make sure undefined directories are invalid.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat > Makefile.am << 'EOF'
 quuz_DATA = zot.html
@@ -25,5 +25,5 @@ EOF
 
 $ACLOCAL
 AUTOMAKE_fails
-grep 'pkgdatadir' stderr && Exit 1
+grep 'pkgdatadir' stderr && exit 1
 grep 'Makefile.am:1:.*quuzdir.*undefined' stderr
old mode 100755 (executable)
new mode 100644 (file)
index 672548c..10accc0
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2007-2012 Free Software Foundation, Inc.
+# Copyright (C) 2007-2017 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
@@ -16,7 +16,7 @@
 
 # Test to make sure pkgdatadir can be overridden via AC_SUBST.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat >>configure.ac <<'EOF'
 AC_SUBST([pkgdatadir], ["FOO"])
old mode 100755 (executable)
new mode 100644 (file)
index 42fa574..2df3b02
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2001-2012 Free Software Foundation, Inc.
+# Copyright (C) 2001-2017 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
@@ -22,7 +22,7 @@
 # aren't left around.  Report from Jim Meyering.
 
 required=cc
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_CC
@@ -32,7 +32,6 @@ AC_OUTPUT
 END
 
 cat > Makefile.am << 'END'
-## Use a different dir for each to make grep easy.
 bin_PROGRAMS = maude
 sbin_PROGRAMS = maude.static
 ## We don't define this one for now.  Probably it is an error.
@@ -46,11 +45,17 @@ if WANT_RMT
   libexec_PROGRAMS = rmt
 endif
 
-print:
-       @echo 1BEG: $(bin_PROGRAMS) :END1
-       @echo 2BEG: $(sbin_PROGRAMS) :END2
-       @echo 3BEG: $(check_PROGRAMS) :END3
-       @echo 4BEG: $(libexec_PROGRAMS) :END4
+test-default:
+       is $(bin_PROGRAMS)      ==  maude$(EXEEXT) mt$(EXEEXT)
+       is $(sbin_PROGRAMS)     ==  maude.static$(EXEEXT)
+       is $(check_PROGRAMS)    ==  maude3$(EXEEXT)
+       is $(libexec_PROGRAMS)  ==  rmt$(EXEEXT)
+
+test-revert:
+       is $(bin_PROGRAMS)      ==  maude$(EXEEXT)
+       is $(sbin_PROGRAMS)     ==  maude.static$(EXEEXT)
+       is $(check_PROGRAMS)    ==  maude3$(EXEEXT)
+       is $(libexec_PROGRAMS)  ==
 END
 
 $ACLOCAL
@@ -62,27 +67,17 @@ grep '^maude\.static$(EXEEXT):' Makefile.in
 grep '^maude3$(EXEEXT):' Makefile.in
 grep '^mt$(EXEEXT):' Makefile.in
 grep '^rmt$(EXEEXT):' Makefile.in
-test `grep '^bin_PROGRAMS =' Makefile.in | wc -l` = 1
+test $(grep -c '^bin_PROGRAMS =' Makefile.in) -eq 1
 
 # Make sure $(EXEEXT) gets stripped before canonicalization.
-grep 'maude3__EXEEXT__OBJECTS' Makefile.in && Exit 1
+grep 'maude3__EXEEXT__OBJECTS' Makefile.in && exit 1
 
 ./configure
-
-EXEEXT=.foo $MAKE -e print > stdout
-cat stdout
-
-grep '1BEG: maude.foo mt.foo :END1' stdout
-grep '2BEG: maude.static.foo :END2' stdout
-grep '3BEG: maude3.foo :END3' stdout
-grep '4BEG: rmt.foo :END4' stdout
+run_make test-default
+run_make test-default EXEEXT=.foo
 
 ./configure revert=yes
+run_make test-revert
+run_make test-revert EXEEXT=.foo
 
-EXEEXT=.foo $MAKE -e print > stdout
-cat stdout
-
-grep '1BEG: maude.foo :END1' stdout
-grep '2BEG: maude.static.foo :END2' stdout
-grep '3BEG: maude3.foo :END3' stdout
-grep '4BEG: :END4' stdout
+:
old mode 100755 (executable)
new mode 100644 (file)
index 3315ad8..82700ac
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2001-2012 Free Software Foundation, Inc.
+# Copyright (C) 2001-2017 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
@@ -16,7 +16,7 @@
 
 # Make sure no-exeext option works.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_CC
old mode 100755 (executable)
new mode 100644 (file)
index 1bc1a10..7a5d0e6
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2002-2012 Free Software Foundation, Inc.
+# Copyright (C) 2002-2017 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
@@ -16,7 +16,7 @@
 
 # Make sure we can override a program rule.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_CC
@@ -36,6 +36,8 @@ $ACLOCAL
 $AUTOMAKE -Wno-override
 
 $FGREP 'maude$(EXEEXT):' Makefile.in
-test 1 = `grep 'maude.*:' Makefile.in | wc -l`
+test 1 -eq $(grep -c 'maude.*:' Makefile.in)
 $FGREP '3dldf$(EXEEXT):' Makefile.in
-test 1 = `grep '3dldf.*:' Makefile.in | wc -l`
+test 1 -eq $(grep -c '3dldf.*:' Makefile.in)
+
+:
old mode 100755 (executable)
new mode 100644 (file)
index b3d3e3e..7c7710c
@@ -1,14 +1,15 @@
 #! /bin/sh
 # This file has been automatically generated.  DO NOT EDIT BY HAND!
-. ./defs-static || exit '99';
+. test-lib.sh
+
 am_serial_tests=yes
 # 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/t/exeext4.sh"; then
     echo "$0: will source $dir/t/exeext4.sh"
-    . "$dir/t/exeext4.sh"; exit "$?"
+    . "$dir/t/exeext4.sh"; exit $?
   fi
 done
 echo "$0: cannot find wrapped test 't/exeext4.sh'" >&2
-exit '99'
+exit 99
old mode 100755 (executable)
new mode 100644 (file)
index d9099b6..b3c1774
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2003-2012 Free Software Foundation, Inc.
+# Copyright (C) 2003-2017 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
@@ -18,7 +18,7 @@
 # programs, but not to @substitutions@.
 
 # For gen-testsuite-part: ==> try-with-serial-tests <==
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AM_CONDITIONAL([COND], [test -n "$cond"])
@@ -64,7 +64,7 @@ $MAKE test-cond
 
 # Only two am__EXEEXT_* variables are needed here: one for BAR, and one
 # BAZ.  The latter must use the former.
-test 2 = `grep '__EXEEXT_. =' Makefile.in | wc -l`
+test 2 -eq $(grep -c '__EXEEXT_. =' Makefile.in)
 grep 'am__EXEEXT_2 = .*am__EXEEXT_1' Makefile.in
 
 :
old mode 100755 (executable)
new mode 100644 (file)
index c62dbd3..0b2435a
--- a/t/ext.sh
+++ b/t/ext.sh
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 1999-2012 Free Software Foundation, Inc.
+# Copyright (C) 1999-2017 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
 
 # Test to make sure extensions are set correctly for various languages.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_F77
 AC_PROG_FC
 AC_PROG_OBJC
-# FIXME: this is to cater to older autoconf; remove this once we
-# FIXME: automake requires Autoconf 2.65 or later.
-m4_ifdef([AC_PROG_OBJCXX], [AC_PROG_OBJCXX], [
-  AC_SUBST([OBJCXX], [whocares])
-  AM_CONDITIONAL([am__fastdepOBJCXX], [whocares])
-])
+AC_PROG_OBJCXX
 AM_PROG_UPC
 END
 
@@ -39,13 +34,10 @@ END
 $ACLOCAL
 $AUTOMAKE
 
-for ext in f for f90 f95 F F90 F95 r m mm upc
-do
-   # Some versions of the BSD shell wrongly exit when 'set -e' is active
-   # if the last command within a compound statement fails and is guarded
-   # by an && only.  So we play safe and use the following idiom, instead
-   # of the apparently simpler 'grep ... && Exit 1'.
-   if grep "^$ext\.o:" Makefile.in; then Exit 1; else :; fi
+for ext in f for f90 f95 F F90 F95 r m mm upc; do
    grep "^\.$ext\.o:" Makefile.in
+   grep "^$ext\.o:" Makefile.in && exit 1
+   : For shells with busted 'set -e'.
 done
-Exit 0
+
+:
old mode 100755 (executable)
new mode 100644 (file)
index ac5b777..6e65807
--- a/t/ext2.sh
+++ b/t/ext2.sh
@@ -1,5 +1,5 @@
 #!/bin/sh
-# Copyright (C) 2002-2012 Free Software Foundation, Inc.
+# Copyright (C) 2002-2017 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
 # Using different extensions for the same language should not
 # output the build rules several times.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat >>configure.ac <<EOF
 AC_PROG_CXX
 EOF
 
 cat >Makefile.am <<EOF
+AUTOMAKE_OPTIONS = subdir-objects
 bin_PROGRAMS = p q r
 p_SOURCES = a.cc b.cpp c.cxx
 q_SOURCES = sub/d.cc sub/e.cpp sub/f.cxx
old mode 100755 (executable)
new mode 100644 (file)
index bd5ed6d..bfce9e6
--- a/t/ext3.sh
+++ b/t/ext3.sh
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2009-2012 Free Software Foundation, Inc.
+# Copyright (C) 2009-2017 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
@@ -20,7 +20,7 @@
 # In both cases, we don't try to create a rule; but we shouldn't
 # fail either, because magic might be happening behind our back.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 END
@@ -36,4 +36,4 @@ END
 $ACLOCAL
 $AUTOMAKE
 
-Exit 0
+exit 0
old mode 100755 (executable)
new mode 100644 (file)
similarity index 66%
rename from t/txinfo6.sh
rename to t/extra-data.sh
index b289efe..b6614af
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 1998-2012 Free Software Foundation, Inc.
+# Copyright (C) 1998-2017 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 to make sure '.txi' extension works.
+# Checks on the obsolete EXTRA_DATA variable.
 
-. ./defs || Exit 1
+. test-init.sh
 
-cat > Makefile.am << 'END'
-info_TEXINFOS = foo.txi
-END
-
-echo '@setfilename foo.info' > foo.txi
-: > texinfo.tex
+echo 'AC_SUBST([CODICIL])' >> configure.ac
 
 $ACLOCAL
+
+# EXTRA_DATA is not required ....
+echo sysconf_DATA = @CODICIL@ > Makefile.am
 $AUTOMAKE
 
-grep '^\.txi\.info: *$' Makefile.in
+# ... but it can nonetheless be specified.
+echo EXTRA_DATA = codicil.txt >> Makefile.am
+$AUTOMAKE
 
 :
old mode 100755 (executable)
new mode 100644 (file)
similarity index 81%
rename from t/extradep2.sh
rename to t/extra-deps-lt.sh
index 91722bd..8f77736
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2010-2012 Free Software Foundation, Inc.
+# Copyright (C) 2010-2017 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 EXTRA_*_DEPENDENCIES, libtool version; see extradep.test.
+# Test EXTRA_*_DEPENDENCIES, libtool version; see 'extra-deps.sh' for
+# non-libtool variant.
 
 required='cc libtoolize'
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_CC
@@ -43,8 +44,7 @@ EXTRA_DIST = bardep
 
 .PHONY: bar-has-been-updated
 bar-has-been-updated:
-       stat older bar$(EXEEXT) libfoo.la || : For debugging.
-       test `ls -t bar$(EXEEXT) older | sed q` = bar$(EXEEXT)
+       is_newest bar$(EXEEXT) libfoo.la
 END
 
 cat >libfoo.c <<'END'
@@ -68,16 +68,14 @@ $AUTOCONF
 : >foodep
 : >foodep2
 : >bardep
-$MAKE >stdout || { cat stdout; Exit 1; }
-cat stdout
+run_make -O
 grep 'making libfoodep' stdout
 
 rm -f bardep
-$MAKE && Exit 1
+$MAKE && exit 1
 : >bardep
 
 $MAKE
-: > older
 $sleep
 touch libfoo.la
 $MAKE
old mode 100755 (executable)
new mode 100644 (file)
similarity index 83%
rename from t/extradep.sh
rename to t/extra-deps.sh
index 77b806a..79a7a55
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2010-2012 Free Software Foundation, Inc.
+# Copyright (C) 2010-2017 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 EXTRA_*_DEPENDENCIES.  See extradep2 for libtool variant.
+# Test EXTRA_*_DEPENDENCIES.  See 'extra-deps-lt.sh' for libtool variant.
 
 required=cc
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_CC
@@ -48,8 +48,7 @@ EXTRA_DIST = foodep bardep
 
 .PHONY: bar-has-been-updated
 bar-has-been-updated:
-       stat older bar$(EXEEXT) libfoo.a || : For debugging.
-       test `ls -t bar$(EXEEXT) older | sed q` = bar$(EXEEXT)
+       is_newest bar$(EXEEXT) libfoo.a
 END
 
 cat >libfoo.c <<'END'
@@ -79,24 +78,22 @@ $AUTOCONF
 : >foodep
 : >foodep2
 : >bardep
-$MAKE >stdout || { cat stdout; Exit 1; }
-cat stdout
+run_make -O
 grep 'making libfoodep' stdout
 
 rm -f foodep
-$MAKE && Exit 1
+$MAKE && exit 1
 : >foodep
 
 rm -f foodep2
-$MAKE && Exit 1
+$MAKE && exit 1
 : >foodep2
 
 rm -f bardep
-$MAKE && Exit 1
+$MAKE && exit 1
 : >bardep
 
 $MAKE
-: > older
 $sleep
 touch libfoo.a
 $MAKE
old mode 100755 (executable)
new mode 100644 (file)
similarity index 94%
rename from t/extra6.sh
rename to t/extra-dist-dirs-and-subdirs.sh
index 6b51211..d010078
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2002-2012 Free Software Foundation, Inc.
+# Copyright (C) 2002-2017 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
@@ -17,7 +17,7 @@
 # Check to make sure EXTRA_DIST can contain a directory or
 # a subdirectory, in $(builddir) or $(srcdir).
 
-. ./defs || Exit 1
+. test-init.sh
 
 echo AC_OUTPUT >> configure.ac
 
@@ -53,3 +53,5 @@ mkdir baz2
 touch baz2/foo2
 
 $MAKE check
+
+:
old mode 100755 (executable)
new mode 100644 (file)
similarity index 95%
rename from t/extra7.sh
rename to t/extra-dist-vpath-dir-merge.sh
index 4ad7789..e0a2cc7
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2002-2012 Free Software Foundation, Inc.
+# Copyright (C) 2002-2017 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
@@ -19,7 +19,7 @@
 # $(srcdir)/X and ./X, with the files from the later overriding the
 # files from the former.
 
-. ./defs || Exit 1
+. test-init.sh
 
 echo AC_OUTPUT >> configure.ac
 
@@ -62,3 +62,5 @@ mkdir baz
 echo build > baz/foo2
 
 $MAKE check
+
+:
old mode 100755 (executable)
new mode 100644 (file)
similarity index 92%
rename from t/extra5.sh
rename to t/extra-dist-vpath-dir.sh
index 7fdd983..cfea384
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2001-2012 Free Software Foundation, Inc.
+# Copyright (C) 2001-2017 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
@@ -17,7 +17,7 @@
 # Check to make sure EXTRA_DIST can contain a directory from $buildir.
 # From Dean Povey.
 
-. ./defs || Exit 1
+. test-init.sh
 
 echo AC_OUTPUT >> configure.ac
 
@@ -36,3 +36,5 @@ mkdir build
 cd build
 ../configure
 $MAKE distdir
+
+:
old mode 100755 (executable)
new mode 100644 (file)
similarity index 96%
rename from t/extra11.sh
rename to t/extra-dist-wildcards-gnu.sh
index a645afb..12bb2f6
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2010-2012 Free Software Foundation, Inc.
+# Copyright (C) 2010-2017 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
@@ -18,7 +18,7 @@
 # Suggested by observations from Braden McDaniel.
 
 required=GNUmake
-. ./defs || Exit 1
+. test-init.sh
 
 echo AC_OUTPUT >> configure.ac
 
old mode 100755 (executable)
new mode 100644 (file)
similarity index 94%
rename from t/extra12.sh
rename to t/extra-dist-wildcards-vpath.sh
index 9794115..d1be5df
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2010-2012 Free Software Foundation, Inc.
+# Copyright (C) 2010-2017 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
@@ -19,7 +19,7 @@
 # Suggested by observations from Braden McDaniel.
 
 required=GNUmake
-. ./defs || Exit 1
+. test-init.sh
 
 echo AC_OUTPUT >> configure.ac
 
@@ -49,3 +49,5 @@ echo ddd > build/d.bar
 cd build
 ../configure
 $MAKE test
+
+:
old mode 100755 (executable)
new mode 100644 (file)
similarity index 84%
rename from t/extra10.sh
rename to t/extra-dist-wildcards.sh
index 8fe7133..f00a25f
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2010-2012 Free Software Foundation, Inc.
+# Copyright (C) 2010-2017 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
 
 # Check that wildcards in EXTRA_DIST are honoured.
 # Suggested by observations from Braden McDaniel.
-# See also sister test 'extra11.test', that check a similar usage
-# with the involvement of the $(wildcard) GNU make builtin.
+# See also sister test 'extra-dist-wildcards-gnu.sh', that checks a
+# similar usage with the involvement of the $(wildcard) GNU make builtin.
 
 required=GNUmake
-. ./defs || Exit 1
+. test-init.sh
 
 echo AC_OUTPUT >> configure.ac
 
old mode 100755 (executable)
new mode 100644 (file)
index 3ad6375..3e04f5f
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2011-2012 Free Software Foundation, Inc.
+# Copyright (C) 2011-2017 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
@@ -20,7 +20,7 @@
 #   2. '-Wno-portability' must imply '-Wno-extra-portability'.
 #   3. '-Wall' must imply '-Wextra-portability'.
 
-. ./defs || Exit 1
+. test-init.sh
 
 # We want (almost) complete control over automake options.
 AUTOMAKE="$am_original_AUTOMAKE --foreign -Werror"
@@ -40,7 +40,7 @@ $ACLOCAL
 
 cat >Makefile.am <<END
 EXTRA_LIBRARIES = libfoo.a
-libfoo_a_SOURCES = sub/foo.c
+libfoo_a_SOURCES = foo.c
 END
 
 # Sanity check: extra-portability warnings causes the expected error.
@@ -62,31 +62,30 @@ $AUTOMAKE -Wall -Wno-portability
 # Now, a setup where also a "simple" portability warning is present.
 #
 
-# Per-target flags require the use of AM_PROG_CC_C_O in configure.ac.
-echo libfoo_a_CPPFLAGS = -Dwhatever >> Makefile.am
+echo 'var = $(foo--bar)' >> Makefile.am
 
 # Enabling extra-portability enables portability as well ...
 AUTOMAKE_fails -Wextra-portability
-grep 'requires.*AM_PROG_CC_C_O' stderr
+grep 'foo--bar' stderr
 grep 'requires.*AM_PROG_AR' stderr
 # ... even if it had been previously disabled.
 AUTOMAKE_fails -Wno-portability -Wextra-portability
-grep 'requires.*AM_PROG_CC_C_O' stderr
+grep 'foo--bar' stderr
 grep 'requires.*AM_PROG_AR' stderr
 
 # Disabling extra-portability leaves portability intact (1).
 AUTOMAKE_fails -Wportability -Wno-extra-portability
-grep 'requires.*AM_PROG_CC_C_O' stderr
-grep 'requires.*AM_PROG_AR' stderr && Exit 1
+grep 'foo--bar' stderr
+grep 'requires.*AM_PROG_AR' stderr && exit 1
 # Disabling extra-portability leaves portability intact (2).
 AUTOMAKE_fails -Wall -Wno-extra-portability
-grep 'requires.*AM_PROG_CC_C_O' stderr
-grep 'requires.*AM_PROG_AR' stderr && Exit 1
+grep 'foo--bar' stderr
+grep 'requires.*AM_PROG_AR' stderr && exit 1
 
 # Enabling portability does not enable extra-portability.
 AUTOMAKE_fails -Wportability
-grep 'requires.*AM_PROG_CC_C_O' stderr
-grep 'requires.*AM_PROG_AR' stderr && Exit 1
+grep 'foo--bar' stderr
+grep 'requires.*AM_PROG_AR' stderr && exit 1
 
 # Disabling portability disables extra-portability.
 $AUTOMAKE -Wno-portability
old mode 100755 (executable)
new mode 100644 (file)
index 2d33008..edcabf8
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2011-2012 Free Software Foundation, Inc.
+# Copyright (C) 2011-2017 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
@@ -17,7 +17,7 @@
 # Make sure that extra-portability warnings are not enabled by --gnits,
 # --gnu and --foreign.
 
-. ./defs || Exit 1
+. test-init.sh
 
 # We want complete control over automake options.
 AUTOMAKE=$am_original_AUTOMAKE
old mode 100755 (executable)
new mode 100644 (file)
index 13d6084..77680c6
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2011-2012 Free Software Foundation, Inc.
+# Copyright (C) 2011-2017 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
@@ -17,7 +17,7 @@
 # Check interactions between the 'portability-recursive' and
 # 'extra-portability' warning categories.
 
-. ./defs || Exit 1
+. test-init.sh
 
 # We want (almost) complete control over automake options.
 AUTOMAKE="$am_original_AUTOMAKE --foreign -Werror"
@@ -44,14 +44,14 @@ grep 'recursive variable expansion' stderr
 # We can disable 'extra-portability' while leaving
 # 'portability-recursive' intact.
 AUTOMAKE_fails -Wportability-recursive -Wno-extra-portability
-grep 'requires.*AM_PROG_AR' stderr && Exit 1
+grep 'requires.*AM_PROG_AR' stderr && exit 1
 grep 'recursive variable expansion' stderr
 
 # We can disable 'portability-recursive' while leaving
 # 'extra-portability' intact.
 AUTOMAKE_fails -Wextra-portability -Wno-portability-recursive
 grep 'requires.*AM_PROG_AR' stderr
-grep 'recursive variable expansion' stderr && Exit 1
+grep 'recursive variable expansion' stderr && exit 1
 
 # Disabling 'portability' disables 'portability-recursive' and
 # 'extra-portability'.
old mode 100755 (executable)
new mode 100644 (file)
similarity index 92%
rename from t/extra9.sh
rename to t/extra-programs-and-libs.sh
index b5a6007..fe402a2
@@ -1,5 +1,5 @@
 #!/bin/sh
-# Copyright (C) 2009-2012 Free Software Foundation, Inc.
+# Copyright (C) 2009-2017 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
@@ -18,7 +18,7 @@
 # are missing; but only if the former is not AC_SUBSTed itself
 # (lib_LIBRARIES is in the same boat here).
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat >>configure.ac <<'END'
 AC_PROG_CC
@@ -38,6 +38,6 @@ END
 $ACLOCAL
 AUTOMAKE_fails
 grep 'bin_PROGRAMS.*contains configure substitution' stderr
-grep 'lib_LIBRARIES.*contains configure substitution' stderr && Exit 1
+grep 'lib_LIBRARIES.*contains configure substitution' stderr && exit 1
 
-Exit 0
+:
old mode 100755 (executable)
new mode 100644 (file)
index 37e1a2b..9220ff7
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2003-2012 Free Software Foundation, Inc.
+# Copyright (C) 2003-2017 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
@@ -18,7 +18,7 @@
 # This check has been introduced in commit 'Release-1-9-254-g9d0eaef'
 # into the former test 'subst2.test'.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_CONFIG_FILES([Makefile2 Makefile3])
old mode 100755 (executable)
new mode 100644 (file)
similarity index 92%
rename from t/extra8.sh
rename to t/extra-programs-misc.sh
index 9eef189..ca51a87
@@ -1,5 +1,5 @@
 #!/bin/sh
-# Copyright (C) 2009-2012 Free Software Foundation, Inc.
+# Copyright (C) 2009-2017 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
@@ -18,7 +18,7 @@
 # and that referring to the same program with inconsistent addition
 # of $(EXEEXT) works, too.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat >>configure.ac <<'END'
 AC_PROG_CC
old mode 100755 (executable)
new mode 100644 (file)
similarity index 79%
rename from t/extra2.sh
rename to t/extra-sources-no-spurious.sh
index 30eaeed..ccc15c6
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 1996-2012 Free Software Foundation, Inc.
+# Copyright (C) 1996-2017 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
@@ -14,9 +14,9 @@
 # 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 to make sure EXTRA_foo_SOURCES not defined unnecessarily.
+# Check to make sure EXTRA_foo_SOURCES are not defined unnecessarily.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_CC
@@ -29,5 +29,6 @@ END
 $ACLOCAL
 $AUTOMAKE
 
-grep EXTRA_foo_SOURCES Makefile.in && Exit 1
-Exit 0
+grep EXTRA_foo_SOURCES Makefile.in && exit 1
+
+:
old mode 100755 (executable)
new mode 100644 (file)
similarity index 90%
rename from t/exsource.sh
rename to t/extra-sources.sh
index 15b274f..09e797d
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 1996-2012 Free Software Foundation, Inc.
+# Copyright (C) 1996-2017 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
@@ -17,7 +17,7 @@
 # Test to make sure EXTRA_..._SOURCES actually works.
 # Bug report from Henrik Frystyk Nielsen.
 
-. ./defs || Exit 1
+. test-init.sh
 
 echo AC_PROG_CC >> configure.ac
 
@@ -28,10 +28,9 @@ EXTRA_www_SOURCES = xtra.c
 www_LDADD = @extra_stuff@
 END
 
-: > www.c
-: > xtra.c
-
 $ACLOCAL
 $AUTOMAKE
 
 grep '@am__include@ .*/xtra\.P' Makefile.in
+
+:
old mode 100755 (executable)
new mode 100644 (file)
index 7bad9ef..28dbf00
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 1996-2012 Free Software Foundation, Inc.
+# Copyright (C) 1996-2017 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
@@ -19,7 +19,7 @@
 # targets should always be generated.  However, they should not be
 # built by default.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_CC
@@ -36,5 +36,6 @@ $AUTOMAKE
 grep "^zardoz" Makefile.in
 
 # Can't have EXTRA clean rules.
-grep 'clean.*EXTRA' Makefile.in && Exit 1
-Exit 0
+grep 'clean.*EXTRA' Makefile.in && exit 1
+
+:
diff --git a/t/extra4.sh b/t/extra4.sh
deleted file mode 100755 (executable)
index 5b31b63..0000000
+++ /dev/null
@@ -1,29 +0,0 @@
-#! /bin/sh
-# Copyright (C) 1998-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 to make sure EXTRA_DATA can be specified.
-
-. ./defs || Exit 1
-
-echo 'AC_SUBST(CODICIL)' >> configure.ac
-
-cat > Makefile.am << 'END'
-sysconf_DATA = @CODICIL@
-EXTRA_DATA = codicil.txt
-END
-
-$ACLOCAL
-$AUTOMAKE
old mode 100755 (executable)
new mode 100644 (file)
index a65a91e..73687f4
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 1998-2012 Free Software Foundation, Inc.
+# Copyright (C) 1998-2017 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
@@ -15,9 +15,9 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 # Make sure programs with only Fortran 90 source are handled properly.
-# (copied from fonly.test) Mike Nolta <mrnolta@princeton.edu>
+# (copied from 'fonly.sh') Mike Nolta <mrnolta@princeton.edu>
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_FC
old mode 100755 (executable)
new mode 100644 (file)
index 6a1fddb..2222d1a
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2009-2012 Free Software Foundation, Inc.
+# Copyright (C) 2009-2017 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
@@ -18,7 +18,7 @@
 # options like '--ignore-deps' and '--silent-rules' are preserved across
 # automake reruns.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AM_MAINTAINER_MODE
@@ -57,21 +57,4 @@ for flavor in --gnits --gnu --foreign --ignore-deps; do
 
 done
 
-# Cygnus mode is deprecated now, and must be handled separately.
-$AUTOMAKE --cygnus -Wno-obsolete
-./configure --enable-maintainer-mode
-grep " --cygnus" Makefile
-$MAKE
-# Two code paths in configure.am:
-# - either a file in $(am__configure_deps) has been updated ...
-$sleep
-touch aclocal.m4
-$MAKE
-grep " --cygnus" Makefile
-# - ... or not; i.e., Makefile.am or an included file has.
-$sleep
-touch Makefile.am
-$MAKE
-grep " --cygnus" Makefile
-
 :
old mode 100755 (executable)
new mode 100644 (file)
index 4f5701b..856931b
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 1998-2012 Free Software Foundation, Inc.
+# Copyright (C) 1998-2017 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
@@ -17,7 +17,7 @@
 # Make sure 'AC_F77_LIBRARY_LDFLAGS' works properly.
 # Matthew D. Langston <langston@SLAC.Stanford.EDU>
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_F77
old mode 100755 (executable)
new mode 100644 (file)
index 900b36b..15db582
--- a/t/fn99.sh
+++ b/t/fn99.sh
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2004-2012 Free Software Foundation, Inc.
+# Copyright (C) 2004-2017 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
@@ -16,7 +16,7 @@
 
 # Check the filename-length-max=99 option.
 
-. ./defs || Exit 1
+. test-init.sh
 
 echo AC_OUTPUT >> configure.ac
 
@@ -26,7 +26,7 @@ EXTRA_DIST = 12345678
 END
 
 (for i in 1 2 3 4 5 6 7 8 9; do
-  mkdir -p 12345678 && cd 12345678 && touch x || Exit 1
+  mkdir -p 12345678 && cd 12345678 && touch x || exit 1
 done) || skip_ "failed to create deep directory hierarchy"
 
 # AIX 5.3 'cp -R' is too buggy for 'make dist'.
@@ -40,12 +40,11 @@ $AUTOMAKE
 $MAKE distcheck
 
 (for i in 1 2 3 4 5 6 7 8 9 10 11; do
-  mkdir -p 12345678 && cd 12345678 && touch x || Exit 1
+  mkdir -p 12345678 && cd 12345678 && touch x || exit 1
 done) || skip_ "failed to create deeper directory hierarchy"
 
-$MAKE dist 2>stderr && { cat stderr >&2; Exit 1; }
-cat stderr >&2
+run_make -E -e FAIL dist
 grep 'filenames are too long' stderr
-test 2 = `grep 12345678 stderr | wc -l`
+test 2 -eq $(grep -c 12345678 stderr)
 
 :
old mode 100755 (executable)
new mode 100644 (file)
index beb0261..5754dcd
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2006-2012 Free Software Foundation, Inc.
+# Copyright (C) 2006-2017 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
@@ -17,7 +17,7 @@
 # PR 507: Check the filename-length-max=99 option
 # in conjunction with AC_CONFIG_SUBDIRS.
 
-. ./defs || Exit 1
+. test-init.sh
 
 # The name is so that 99 is exactly hit (including final \0).
 subdirname='cnfsubdir'
@@ -46,9 +46,9 @@ AUTOMAKE_OPTIONS = filename-length-max=99
 EXTRA_DIST = 12345678
 END
 
-(cd $subdirname || Exit 1
+(cd $subdirname || exit 1
 for i in 1 2 3 4 5 6 7 8; do
-  mkdir -p 12345678 && cd 12345678 && touch x || Exit 1
+  mkdir -p 12345678 && cd 12345678 && touch x || exit 1
 done) || skip_ "failed to create deep directory hierarchy"
 
 # AIX 5.3 'cp -R' is too buggy for 'make dist'.
@@ -68,14 +68,13 @@ $AUTOMAKE
 ./configure
 $MAKE distcheck
 
-(cd $subdirname || Exit 1
+(cd $subdirname || exit 1
 for i in 1 2 3 4 5 6 7 8 9; do
-  mkdir -p 12345678 && cd 12345678 && touch x || Exit 1
+  mkdir -p 12345678 && cd 12345678 && touch x || exit 1
 done) || skip_ "failed to create deeper directory hierarchy"
 
-$MAKE dist 2>stderr && { cat stderr >&2; Exit 1; }
-cat stderr >&2
+run_make -E -e FAIL dist
 grep 'filenames are too long' stderr
-test 1 = `grep 12345678 stderr | wc -l`
+test 1 -eq $(grep -c 12345678 stderr)
 
 :
old mode 100755 (executable)
new mode 100644 (file)
index fbd2135..7d6f515
--- a/t/fnoc.sh
+++ b/t/fnoc.sh
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 1998-2012 Free Software Foundation, Inc.
+# Copyright (C) 1998-2017 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
@@ -18,7 +18,7 @@
 # C-specific code.
 # Matthew D. Langston <langston@SLAC.Stanford.EDU>
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_F77
@@ -35,5 +35,5 @@ END
 $ACLOCAL
 $AUTOMAKE
 
-grep '[^F]CC' Makefile.in | grep -v MKDEP && Exit 1
-Exit 0
+grep '[^F]CC' Makefile.in | grep -v MKDEP && exit 1
+exit 0
old mode 100755 (executable)
new mode 100644 (file)
index c3ae614..2877f3a
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 1998-2012 Free Software Foundation, Inc.
+# Copyright (C) 1998-2017 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
@@ -17,7 +17,7 @@
 # Make sure programs with only Fortran 77 source are handled properly.
 # Matthew D. Langston <langston@SLAC.Stanford.EDU>
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_F77
old mode 100755 (executable)
new mode 100644 (file)
index d7d0800..d4c9c8f
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2000-2012 Free Software Foundation, Inc.
+# Copyright (C) 2000-2017 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
@@ -16,7 +16,7 @@
 
 # Test to make sure that 'automake --force-missing' works.
 
-. ./defs || Exit 1
+. test-init.sh
 
 rm -f install-sh
 
@@ -29,6 +29,6 @@ $AUTOMAKE --add-missing --force-missing
 
 ls -l install-sh
 test -f install-sh
-grep zot install-sh && Exit 1
+grep zot install-sh && exit 1
 
 :
old mode 100755 (executable)
new mode 100644 (file)
index 3c75722..031a3cb
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2000-2012 Free Software Foundation, Inc.
+# Copyright (C) 2000-2017 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
@@ -17,7 +17,7 @@
 # Test to make sure that 'automake --force-missing' works, even with
 # symlinked files.
 
-. ./defs || Exit 1
+. test-init.sh
 
 rm -f install-sh
 
@@ -34,7 +34,7 @@ $AUTOMAKE --add-missing --force-missing
 ls -l install-sh
 
 test -f install-sh
-grep zot install-sh && Exit 1
+grep zot install-sh && exit 1
 diff foo foo2
 
 :
old mode 100755 (executable)
new mode 100644 (file)
index 6bf58fe..ca45bdf
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2002-2012 Free Software Foundation, Inc.
+# Copyright (C) 2002-2017 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
@@ -17,7 +17,7 @@
 # Test that Automake suggests using AC_PROG_F77/FC if Fortran sources
 # are used.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat >Makefile.am <<END
 bin_PROGRAMS = hello
old mode 100755 (executable)
new mode 100644 (file)
index d345592..142067f
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2006-2012 Free Software Foundation, Inc.
+# Copyright (C) 2006-2017 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
 # Test that AC_FC_SRCEXT(f9x) works as intended:
 # - $(FCFLAGS_f) will be used
 
-# Cf. fort1.test and link_f90_only.test.
+# Cf. 'fort1.sh' and 'link_f90_only.sh'.
 
-. ./defs || Exit 1
+required=gfortran # Required only in order to run ./configure.
+. test-init.sh
 
 mkdir sub
 
@@ -30,33 +31,62 @@ AC_FC_SRCEXT([f95])
 AC_FC_SRCEXT([f03])
 AC_FC_SRCEXT([f08])
 AC_FC_SRCEXT([blabla])
+AC_OUTPUT
 END
 
 cat >Makefile.am <<'END'
+AUTOMAKE_OPTIONS = subdir-objects
+FC = fake-fc
 bin_PROGRAMS = hello goodbye
-hello_SOURCES = hello.f90 foo.f95 sub/bar.f95 hi.f03 sub/howdy.f03 greets.f08 sub/bonjour.f08
+hello_SOURCES = hello.f90 foo.f95 sub/bar.f95 hi.f03 sub/howdy.f03 \
+                greets.f08 sub/bonjour.f08
 goodbye_SOURCES = bye.f95 sub/baz.f90
-goodbye_FCFLAGS =
+goodbye_FCFLAGS = --gby
 END
 
 $ACLOCAL
 $AUTOMAKE
-# The following tests aren't fool-proof, but they don't
-# need a Fortran compiler.
-grep '.\$(LINK)'       Makefile.in && Exit 1
+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
-# 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
+grep -v '\$(FCFLAGS_f' stdout && exit 1
+grep '.\$(FC.*\$(FCFLAGS_blabla' 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
+
+run_make -O -- -n \
+  FCFLAGS_f90=--@90 FCFLAGS_f95=--@95 FCFLAGS_f03=--@03 FCFLAGS_f08=--@08
+# 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
 
 :
old mode 100755 (executable)
new mode 100644 (file)
index a23c9bd..e1ddb1c
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2006-2012 Free Software Foundation, Inc.
+# Copyright (C) 2006-2017 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
@@ -19,7 +19,7 @@
 # For now, require the GNU compilers (to avoid some Libtool/Autoconf
 # issues).
 required='g77 gfortran'
-. ./defs || Exit 1
+. test-init.sh
 
 mkdir sub
 
@@ -65,16 +65,16 @@ LDADD = $(FCLIBS)
 END
 
 $ACLOCAL
-$AUTOMAKE -a
+$AUTOMAKE -a -Wno-unsupported
 # The Fortran 77 linker should be preferred:
-grep '.\$(FCLINK)' Makefile.in && Exit 1
+grep '.\$(FCLINK)' Makefile.in && exit 1
 
 $AUTOCONF
 # ./configure may exit with status 77 if no compiler is found,
 # or if the compiler cannot compile Fortran 90 files).
 ./configure
 $MAKE
-subobjs=`echo sub/*.o sub/*.obj`
+subobjs=$(echo sub/*.o sub/*.obj)
 test "$subobjs" = 'sub/*.o sub/*.obj'
 $MAKE distcheck
 
@@ -83,10 +83,12 @@ echo 'AUTOMAKE_OPTIONS = subdir-objects' >> Makefile.am
 $AUTOMAKE
 ./configure
 $MAKE
-test ! -f bar.o
-test ! -f bar.obj
-test ! -f baz.o
-test ! -f baz.obj
-test ! -f goodbye-baz.o
-test ! -f goodbye-baz.obj
+test ! -e bar.o
+test ! -e bar.obj
+test ! -e baz.o
+test ! -e baz.obj
+test ! -e goodbye-baz.o
+test ! -e goodbye-baz.obj
 $MAKE distcheck
+
+:
old mode 100755 (executable)
new mode 100644 (file)
index 4614b66..facc57d
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2006-2012 Free Software Foundation, Inc.
+# Copyright (C) 2006-2017 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
@@ -19,7 +19,7 @@
 # For now, require the GNU compilers (to avoid some Libtool/Autoconf
 # issues).
 required='libtoolize g77 gfortran'
-. ./defs || Exit 1
+. test-init.sh
 
 mkdir sub
 
@@ -75,7 +75,9 @@ END
 
 libtoolize --force
 $ACLOCAL
-$AUTOMAKE -a
+# FIXME: stop disabling the warnings in the 'unsupported' category
+# FIXME: once the 'subdir-objects' option has been mandatory.
+$AUTOMAKE -a -Wno-unsupported
 $AUTOCONF
 
 # This test requires Libtool >= 2.0.  Earlier Libtool does not
@@ -89,7 +91,7 @@ grep " --tag=FC" Makefile.in
 # or if the compiler cannot compile Fortran 90 files).
 ./configure
 $MAKE
-subobjs=`echo sub/*.lo`
+subobjs=$(echo sub/*.lo)
 test "$subobjs" = 'sub/*.lo'
 $MAKE distcheck
 
@@ -99,7 +101,9 @@ echo 'AUTOMAKE_OPTIONS = subdir-objects' >> Makefile.am
 $AUTOMAKE -a
 ./configure
 $MAKE
-test ! -f bar.lo
-test ! -f baz.lo
-test ! -f libgoodbye_la-baz.lo
+test ! -e bar.lo
+test ! -e baz.lo
+test ! -e libgoodbye_la-baz.lo
 $MAKE distcheck
+
+:
old mode 100755 (executable)
new mode 100644 (file)
index d10644d..2574a3f
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2000-2012 Free Software Foundation, Inc.
+# Copyright (C) 2000-2017 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
@@ -17,7 +17,7 @@
 # Test to make sure dependency tracking doesn't interfere with Fortran.
 # For PR 75.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_CONFIG_SRCDIR([foo.f])
@@ -35,5 +35,5 @@ END
 $ACLOCAL
 $AUTOMAKE
 
-grep 'foo\.Po' Makefile.in && Exit 1
-Exit 0
+grep 'foo\.Po' Makefile.in && exit 1
+exit 0
old mode 100755 (executable)
new mode 100644 (file)
index b510f1c..637d3f9
--- a/t/gcj.sh
+++ b/t/gcj.sh
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 1999-2012 Free Software Foundation, Inc.
+# Copyright (C) 1999-2017 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
@@ -16,7 +16,7 @@
 
 # Test of compiled java.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 _AM_DEPENDENCIES([GCJ])
old mode 100755 (executable)
new mode 100644 (file)
index 2c4d60f..ab4ca67
--- a/t/gcj2.sh
+++ b/t/gcj2.sh
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 1999-2012 Free Software Foundation, Inc.
+# Copyright (C) 1999-2017 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
@@ -16,7 +16,7 @@
 
 # Make sure '..' invalid in subdir .o's.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 _AM_DEPENDENCIES(GCJ)
old mode 100755 (executable)
new mode 100644 (file)
index a8ec120..24a1d20
--- a/t/gcj3.sh
+++ b/t/gcj3.sh
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2001-2012 Free Software Foundation, Inc.
+# Copyright (C) 2001-2017 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
@@ -16,7 +16,7 @@
 
 # Make sure dependency tracking works for java.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 _AM_DEPENDENCIES([GCJ])
@@ -31,7 +31,6 @@ END
 $ACLOCAL
 $AUTOMAKE
 
-num=`grep depcomp Makefile.in | wc -l`
-test $num -gt 1
+test $($FGREP -c depcomp Makefile.in) -gt 1
 
 :
old mode 100755 (executable)
new mode 100644 (file)
index a860f89..feb1547
--- a/t/gcj4.sh
+++ b/t/gcj4.sh
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2002-2012 Free Software Foundation, Inc.
+# Copyright (C) 2002-2017 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
@@ -17,7 +17,7 @@
 # Make sure dependency tracking works for Java.
 
 required=gcj
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AM_PROG_GCJ
@@ -32,7 +32,7 @@ END
 $ACLOCAL
 $AUTOCONF
 $AUTOMAKE
-./configure >stdout
+./configure >stdout || { cat stdout; exit 1; }
 cat stdout
 
 # Configure must be checking the dependency style of gcj ...
@@ -40,7 +40,7 @@ grep 'dependency style of gcj' stdout >filt
 cat filt
 
 # ... only once.
-test `wc -l < filt` = 1
+test $(wc -l < filt) = 1
 
 # Accept any outcome but 'none'
 # (at the time of writing it should be gcc or gcc3).
old mode 100755 (executable)
new mode 100644 (file)
index f3c218f..4a1d40c
--- a/t/gcj5.sh
+++ b/t/gcj5.sh
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2002-2012 Free Software Foundation, Inc.
+# Copyright (C) 2002-2017 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
@@ -16,7 +16,7 @@
 
 # Make sure Automake suggests AM_PROG_GCJ when GCJ is needed.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 _AM_DEPENDENCIES(GCJ)
old mode 100755 (executable)
new mode 100644 (file)
index 3fe4a31..b0d01ba
--- a/t/gcj6.sh
+++ b/t/gcj6.sh
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2009-2012 Free Software Foundation, Inc.
+# Copyright (C) 2009-2017 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
@@ -17,7 +17,7 @@
 # AM_PROG_GCJ should cause OBJEXT and EXEEXT to be set.
 
 required='gcj'
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AM_PROG_GCJ
old mode 100755 (executable)
new mode 100644 (file)
index ac09a63..986c1dd
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2011-2012 Free Software Foundation, Inc.
+# Copyright (C) 2011-2017 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
@@ -20,7 +20,7 @@
 # we won't have to ask him for more information to start analyzing the
 # failure (that had happened too many times in the past!).
 
-. ./defs || Exit 1
+. test-init.sh
 
 st=0
 if test -d "$am_top_srcdir"/.git; then
@@ -46,6 +46,14 @@ $PERL -V || st=1
 # happen with older perl installation, or on MinGW/MSYS.
 $PERL -e 'use TAP::Parser; print $TAP::Parser::VERSION, "\n"' || :
 
+# It's OK if the selected Lex and Yacc programs don't know how to print
+# the version number or the help screen; those are usually available only
+# for Flex and Bison.
+$LEX --version || :
+$LEX --help || :
+$YACC --version || :
+$YACC --help || :
+
 cat "$am_top_builddir/config.log" || st=1
 cat "$am_top_builddir/t/wrap/aclocal-$APIVERSION" || st=1
 cat "$am_top_builddir/t/wrap/automake-$APIVERSION" || st=1
@@ -54,9 +62,9 @@ if test $st -eq 0; then
   # This test SKIPs, so that all the information it has gathered and
   # printed will get unconditionally copied into the 'test-suite.log'
   # file.
-  Exit 77
+  exit 77
 fi
 
 # Some unexpected error occurred; this must be reported as an hard
 # error by the testsuite driver.
-Exit 99
+exit 99
diff --git a/t/gettext-basics.sh b/t/gettext-basics.sh
new file mode 100644 (file)
index 0000000..7ba1667
--- /dev/null
@@ -0,0 +1,58 @@
+#! /bin/sh
+# Copyright (C) 2002-2017 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 basic gettext support.
+
+required='gettext'
+. test-init.sh
+
+cat >> configure.ac << 'END'
+AM_GNU_GETTEXT
+AC_OUTPUT
+END
+
+: > Makefile.am
+: > config.rpath
+mkdir po intl
+
+$ACLOCAL
+$AUTOCONF
+
+# po/ and intl/ are required.
+
+AUTOMAKE_fails --add-missing
+grep 'AM_GNU_GETTEXT.*SUBDIRS' stderr
+
+echo 'SUBDIRS = po' >Makefile.am
+AUTOMAKE_fails --add-missing
+grep 'AM_GNU_GETTEXT.*intl' stderr
+
+echo 'SUBDIRS = intl' >Makefile.am
+AUTOMAKE_fails --add-missing
+grep 'AM_GNU_GETTEXT.*po' stderr
+
+# Ok.
+
+echo 'SUBDIRS = po intl' >Makefile.am
+$AUTOMAKE --add-missing
+
+# Make sure distcheck runs './configure --with-included-gettext'.
+./configure
+echo distdir: > po/Makefile
+echo distdir: > intl/Makefile
+$MAKE -n distcheck | grep '.*--with-included-gettext'
+
+:
diff --git a/t/gettext-config-rpath.sh b/t/gettext-config-rpath.sh
new file mode 100644 (file)
index 0000000..aaedd61
--- /dev/null
@@ -0,0 +1,45 @@
+#! /bin/sh
+# Copyright (C) 2002-2017 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 the config.rpath requirement.
+
+required='gettext'
+. test-init.sh
+
+cat >> configure.ac << 'END'
+AM_GNU_GETTEXT
+# config.rpath is required by versions >= 0.14.3.
+AM_GNU_GETTEXT_VERSION([0.14.3])
+AC_OUTPUT
+END
+
+echo 'SUBDIRS = po intl' >Makefile.am
+mkdir po intl
+
+# If aclocal fails here, it may be that gettext is too old to provide
+# AM_GNU_GETTEXT_VERSION.  Similarly, autopoint will fail if it's
+# from an older version.  If gettext is too old to provide autopoint,
+# this will fail as well, so we're safe here.
+if ! $ACLOCAL && autopoint -n; then
+  skip_ "too old gettext installation"
+fi
+
+AUTOMAKE_fails --add-missing
+grep '^configure\.ac:.*required file.*config.rpath' stderr
+: > config.rpath
+$AUTOMAKE
+
+:
old mode 100755 (executable)
new mode 100644 (file)
similarity index 87%
rename from t/gettext2.sh
rename to t/gettext-external-pr338.sh
index 8b8a062..b4912eb
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2002-2012 Free Software Foundation, Inc.
+# Copyright (C) 2002-2017 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
@@ -18,7 +18,7 @@
 # PR/338, reported by Charles Wilson.
 
 required='gettext'
-. ./defs || Exit 1
+. test-init.sh
 
 cat >>configure.ac <<END
 AM_GNU_GETTEXT([external])
@@ -29,6 +29,7 @@ END
 mkdir foo po
 
 $ACLOCAL
+$AUTOCONF
 
 # config.rpath is required.
 : >config.rpath
@@ -47,9 +48,12 @@ grep 'AM_GNU_GETTEXT.*po' stderr
 echo 'SUBDIRS = po' >Makefile.am
 $AUTOMAKE --add-missing
 
+
 # Don't try running ./configure --with-included-gettext if the
 # user is using AM_GNU_GETTEXT([external]).
-grep 'with-included-gettext' Makefile.in && Exit 1
+grep 'with-included-gettext' Makefile.in && exit 1
+./configure
+$MAKE -n distcheck | grep 'with-included-gettext' && exit 1
 
 # intl/ isn't wanted with AM_GNU_GETTEXT([external]).
 
old mode 100755 (executable)
new mode 100644 (file)
similarity index 94%
rename from t/gettext3.sh
rename to t/gettext-intl-subdir.sh
index 9a39af2..e55fffc
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2006-2012 Free Software Foundation, Inc.
+# Copyright (C) 2006-2017 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
@@ -17,7 +17,7 @@
 # Check gettext 'AM_GNU_GETTEXT_INTL_SUBDIR' support.
 
 required='gettext'
-. ./defs || Exit 1
+. test-init.sh
 
 cat >>configure.ac <<END
 AM_GNU_GETTEXT([external])
@@ -45,3 +45,5 @@ grep 'AM_GNU_GETTEXT.*intl.*SUBDIRS' stderr
 
 echo 'SUBDIRS = po intl' > Makefile.am
 $AUTOMAKE --add-missing
+
+:
old mode 100755 (executable)
new mode 100644 (file)
index 416a8e5..10baffa
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2011-2012 Free Software Foundation, Inc.
+# Copyright (C) 2011-2017 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
@@ -18,7 +18,7 @@
 # to the test cases requiring them.
 # See also automake bug#9807.
 
-. ./defs || Exit 1
+. test-init.sh
 
 extract_program_version ()
 {
@@ -28,28 +28,19 @@ extract_program_version ()
 echo "# Automatically generated by $me." > get.sh
 echo : >> get.sh
 
-# The 'gettextize' and 'autopoint' scripts will look into Makefile.am.
+# The 'autopoint' script will look into Makefile.am.
 echo ACLOCAL_AMFLAGS = -I m4 > Makefile.am
 
-# Prefer autopoint to gettextize, since the more modern versions of the
-# latter might unconditionally require user interaction to complete;
-# yes, this means confirmation from /dev/tty (!) -- see:
+# Prefer autopoint to gettextize, since the latter unconditionally
+# requires user interaction to complete; yes, this means confirmation
+# from /dev/tty (!) -- see:
 #  <http://lists.gnu.org/archive/html/bug-gettext/2011-12/msg00000.html>
-# Since this "forced interaction" behaviour of gettextize wasn't present
-# before the introduction of autopoint, we should be able to safely
-# fall back to calling gettextize non-interactively if autopoint is not
-# present.
-if autopoint --version; then
-  am_gettextize_command=autopoint
-else
-  am_gettextize_command=gettextize
-fi
 
-# We will need to specify the correct autopoint (or gettextize) version
-# in the AM_GNU_GETTEXT_VERSION call in configure.ac if we want autopoint
-# (or gettextize) to setup the correct infrastructure -- in particular,
-# for what concerns us, to bring in all the required .m4 files.
-autopoint_version=`extract_program_version $am_gettextize_command` \
+# We will need to specify the correct autopoint version in the
+# AM_GNU_GETTEXT_VERSION call in configure.ac if we want autopoint to
+# setup the correct infrastructure -- in particular, for what concerns
+# us, to bring in all the required .m4 files.
+autopoint_version=$(extract_program_version autopoint) \
   && test -n "$autopoint_version" \
   || autopoint_version=0.10.35
 
@@ -61,11 +52,11 @@ AM_GNU_GETTEXT
 AM_GNU_GETTEXT_VERSION([$autopoint_version])
 END
 
-if $am_gettextize_command --force && test -f m4/gettext.m4; then
-  echo "ACLOCAL_PATH='`pwd`/m4':\$ACLOCAL_PATH" >> get.sh
+if autopoint --force && test -f m4/gettext.m4; then
+  echo "ACLOCAL_PATH='$(pwd)/m4':\$ACLOCAL_PATH" >> get.sh
   echo "export ACLOCAL_PATH" >> get.sh
 else
-  # Older versions of gettext might not have a gettextize program
+  # Older versions of gettext might not have an autopoint program
   # available, but this doesn't mean the user hasn't made the gettext
   # macros available, e.g., by properly setting ACLOCAL_PATH.
   rm -rf m4
@@ -78,8 +69,6 @@ else
   fi
 fi
 
-. ./get.sh
-
 cat >> get.sh <<'END'
 # Even recent versions of gettext used the now-obsolete 'AM_PROG_MKDIR_P'
 # m4 macro.  So we need the following to avoid spurious errors.
@@ -87,19 +76,21 @@ ACLOCAL="$ACLOCAL -Wno-obsolete"
 AUTOMAKE="$AUTOMAKE -Wno-obsolete"
 END
 
+. ./get.sh
+
 $ACLOCAL --force -I m4 || cat >> get.sh <<'END'
 # We need to use '-Wno-syntax', since we do not want our test suite
 # to fail merely because some third-party '.m4' file is underquoted.
 ACLOCAL="$ACLOCAL -Wno-syntax"
 END
 
-# Remove any Makefile.in possibly created by gettextize/autopoint, to
-# avoid spurious maintainer-check failures.
-rm -f `find . -name Makefile.in`
+# Remove any Makefile.in possibly created by autopoint, to avoid spurious
+# maintainer-check failures.
+rm -f $(find . -name Makefile.in)
 
-# The file gettextize or autopoint might have copied in the 'm4'
-# subdirectory of the test directory are going to be needed by
-# other tests, so we must not remove the test directory.
+# The file autopoint might have copied in the 'm4' subdirectory of the
+# test directory are going to be needed by other tests, so we must not
+# remove the test directory.
 keep_testdirs=yes
 
 :
old mode 100755 (executable)
new mode 100644 (file)
similarity index 60%
rename from t/remake3.sh
rename to t/gettext-pr381.sh
index 96294fb..a76d751
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2001-2012 Free Software Foundation, Inc.
+# Copyright (C) 2002-2017 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/>.
 
-# Weak "grepping" test trying to ensure that remake rules work for files
-# in a subdirectory even when there is no Makefile for that subdirectory.
-# See also sister functional test 'remake3a.test'.
+# Automake gettext support: regression check for PR/381:
+# 'SUBDIRS = po intl' must not be required if 'po/' doesn't exist.
 
-. ./defs || Exit 1
+required='gettext'
+. test-init.sh
 
 cat >> configure.ac << 'END'
-AC_CONFIG_FILES([sub/foo])
+AM_GNU_GETTEXT
 AC_OUTPUT
 END
 
-: > Makefile.am
+$ACLOCAL
 
-mkdir sub
-: > sub/foo.in
+: > config.guess
+: > config.rpath
+: > config.sub
 
-$ACLOCAL
+test ! -d po # Sanity check.
+mkdir sub
+echo 'SUBDIRS = sub' > Makefile.am
 $AUTOMAKE
 
-grep '^sub/foo' Makefile.in
+# Still, SUBDIRS must be defined.
+
+: > Makefile.am
+AUTOMAKE_fails
+grep '^configure\.ac:.*AM_GNU_GETTEXT used but SUBDIRS not defined' stderr
 
 :
diff --git a/t/gettext.sh b/t/gettext.sh
deleted file mode 100755 (executable)
index a9181e4..0000000
+++ /dev/null
@@ -1,87 +0,0 @@
-#! /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 gettext support.
-
-required='gettext'
-. ./defs || Exit 1
-
-cat >>configure.ac <<END
-AM_GNU_GETTEXT
-AM_GNU_GETTEXT_VERSION([0.14.3])
-AC_OUTPUT
-END
-
-: >Makefile.am
-mkdir po intl
-
-# config.rpath is required by versions >= 0.14.3.  We try to verify
-# this requirement, but only when we find we have a working and recent
-# gettext installation.
-
-# If aclocal fails here, it may be that gettext is too old to
-# provide AM_GNU_GETTEXT_VERSION.
-if $ACLOCAL; then
-
-  # autopoint will fail if it's from an older version.
-  # If gettext is too old to provide autopoint, this will
-  # fail as well, so we're safe here.
-  if autopoint -n; then
-    AUTOMAKE_fails --add-missing
-    grep 'required.*config.rpath' stderr
-  fi
-fi
-
-: >config.rpath
-sed '/AM_GNU_GETTEXT_VERSION/d' configure.ac >configure.int
-mv -f configure.int configure.ac
-
-$ACLOCAL
-
-# po/ and intl/ are required.
-
-AUTOMAKE_fails --add-missing
-grep 'AM_GNU_GETTEXT.*SUBDIRS' stderr
-
-echo 'SUBDIRS = po' >Makefile.am
-AUTOMAKE_fails --add-missing
-grep 'AM_GNU_GETTEXT.*intl' stderr
-
-echo 'SUBDIRS = intl' >Makefile.am
-AUTOMAKE_fails --add-missing
-grep 'AM_GNU_GETTEXT.*po' stderr
-
-# Ok.
-
-echo 'SUBDIRS = po intl' >Makefile.am
-$AUTOMAKE --add-missing
-
-# Make sure distcheck runs './configure --with-included-gettext'.
-grep 'with-included-gettext' Makefile.in
-
-# 'SUBDIRS = po intl' isn't required if po/ doesn't exist.
-# PR/381.
-
-rmdir po
-mkdir sub
-echo 'SUBDIRS = sub' >Makefile.am
-$AUTOMAKE
-
-# Still, SUBDIRS must be defined.
-
-: >Makefile.am
-AUTOMAKE_fails --add-missing
-grep 'AM_GNU_GETTEXT.*SUBDIRS' stderr
old mode 100755 (executable)
new mode 100644 (file)
index badb8b0..fb1e821
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 1996-2012 Free Software Foundation, Inc.
+# Copyright (C) 1996-2017 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
@@ -16,7 +16,7 @@
 
 # Test to ensure --gnits version checking is correct.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat > configure.ac << END
 AC_INIT([$me], [3.5.3.2])
old mode 100755 (executable)
new mode 100644 (file)
index ef7078c..c6a30ab
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2002-2012 Free Software Foundation, Inc.
+# Copyright (C) 2002-2017 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
@@ -17,7 +17,7 @@
 # Test to ensure std-options checking is correct.
 
 required='cc native'
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_CC
@@ -91,24 +91,25 @@ chmod +x sub/scriptnok.sh
 : > THANKS
 
 # The following file should not be distributed.
-# (alpha.test checks the case where it must be distributed.)
+# (alpha.sh checks the case where it must be distributed.)
 : > README-alpha
 
 $ACLOCAL
 $AUTOCONF
 $AUTOMAKE -a
 
-grep README-alpha Makefile.in && Exit 1
+grep README-alpha Makefile.in && exit 1
 
 mkdir build
 cd build
 
 # Use --program-prefix to make sure the std-options check honors it.
-../configure "--prefix=`pwd`/../inst-dir" --program-prefix=p
+../configure "--prefix=$(pwd)/../inst-dir" --program-prefix=p
 $MAKE all
 $MAKE test-install
-$MAKE -k installcheck 2>stderr || : # Never trust the exit status of make -k.
-cat stderr >&2
+# Don't trust th exit status of "make -k" for non-GNU makes.
+if using_gmake; then status=FAIL; else status=IGNORE; fi
+run_make -e $status -E -- -k installcheck
 $MAKE grep-stderr
 
 :
old mode 100755 (executable)
new mode 100644 (file)
index f479762..a9748c7
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2002-2012 Free Software Foundation, Inc.
+# Copyright (C) 2002-2017 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
@@ -17,7 +17,7 @@
 # Check that AM_INSTALLCHECK_STD_OPTIONS_EXEMPT works.
 
 required=cc
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_CC
@@ -83,12 +83,13 @@ mkdir build
 cd build
 
 # Use --program-prefix to make sure the std-options check honors it.
-../configure "--prefix=`pwd`/../inst-dir" --program-prefix=p
+../configure "--prefix=$(pwd)/../inst-dir" --program-prefix=p
 $MAKE
 $MAKE install
-$MAKE installcheck && Exit 1
-$MAKE -k installcheck 2>stderr || : # Never trust the exit status of make -k.
-cat stderr >&2
+$MAKE installcheck && exit 1
+# Don't trust th exit status of "make -k" for non-GNU makes.
+if using_gmake; then status=FAIL; else status=IGNORE; fi
+run_make -e $status -E -- -k installcheck
 $MAKE grep-stderr
 
 # Make sure there is no more error when all targets are exempted.
old mode 100755 (executable)
new mode 100644 (file)
index b1ea000..b5502cc
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2003-2012 Free Software Foundation, Inc.
+# Copyright (C) 2003-2017 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
@@ -18,7 +18,7 @@
 # Report from Braden McDaniel.
 
 required=GNUmake
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_CONFIG_FILES([sub/GNUmakefile])
old mode 100755 (executable)
new mode 100644 (file)
index 5aac432..fbea36d
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2002-2012 Free Software Foundation, Inc.
+# Copyright (C) 2002-2017 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
@@ -16,7 +16,7 @@
 
 # Check that Automake warns about user variables being overridden.
 
-. ./defs || Exit 1
+. test-init.sh
 
 # We need (almost) complete control over automake options.
 AUTOMAKE="$am_original_AUTOMAKE -Werror"
@@ -47,7 +47,7 @@ AUTOMAKE_fails --add-missing --gnu
 grep '^Makefile\.am:1:.*CFLAGS' stderr
 grep '^Makefile\.am:2:.*LDFLAGS' stderr
 # No reason to warn about CXXFLAGS since it's not used.
-grep CXXFLAGS stderr && Exit 1
+grep CXXFLAGS stderr && exit 1
 # Don't warn if -Wno-gnu.
 $AUTOMAKE --gnu -Wno-gnu
 
old mode 100755 (executable)
new mode 100644 (file)
index 6a68d65..ebf6c09
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2003-2012 Free Software Foundation, Inc.
+# Copyright (C) 2003-2017 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
@@ -16,7 +16,7 @@
 
 # Check diagnostics about no-installman being disallowed in 'gnu'.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat > configure.ac << 'END'
 AC_INIT([gnuwarn2], [1.0])
old mode 100755 (executable)
new mode 100644 (file)
index 1e31cd2..9f66903
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 1999-2012 Free Software Foundation, Inc.
+# Copyright (C) 1999-2017 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
@@ -17,7 +17,7 @@
 # Test to make sure header vars defined only once when including.
 # Report from Marcus G. Daniels.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac <<END
 AC_OUTPUT
@@ -25,26 +25,22 @@ END
 
 cat > Makefile.am << 'END'
 include Will_Be_Included_In_Makefile
+test-distcommon:
+       echo ' ' $(DIST_COMMON) ' ' \
+          | grep '[ /]Will_Be_Included_In_Makefile '
 END
 
-: > Will_Be_Included_In_Makefile
+id=0c35bbde7c95b569a
+echo "# $id" > Will_Be_Included_In_Makefile
 
 $ACLOCAL
 $AUTOMAKE
-len=`grep '^srcdir' Makefile.in | wc -l`
-test $len -eq 1
-
-# Also make sure include file is distributed.
-sed -n -e '/^DIST_COMMON =.*\\$/ {
-   :loop
-   p
-   n
-   t clear
-   :clear
-   s/\\$/\\/
-   t loop
-   p
-   n
-   }' -e '/^DIST_COMMON =/ p' Makefile.in | grep Will_Be_Included_In_Makefile
+test $(grep -c '^srcdir' Makefile.in) -eq 1
+
+$AUTOCONF
+./configure
+$MAKE test-distcommon
+$MAKE distdir
+grep "$id" $distdir/Will_Be_Included_In_Makefile
 
 :
old mode 100755 (executable)
new mode 100644 (file)
index dc93ac8..161d3ac
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2000-2012 Free Software Foundation, Inc.
+# Copyright (C) 2000-2017 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
@@ -23,7 +23,7 @@
 #  in the HEADERS variable for *all* generated Makefile.ins in the
 #  project.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_SUBST([MY_HEADERS])
@@ -41,5 +41,5 @@ END
 $ACLOCAL
 $AUTOMAKE
 
-grep '[^@]MY_HEADERS' Makefile.in && Exit 1
-Exit 0
+grep '[^@]MY_HEADERS' Makefile.in && exit 1
+exit 0
old mode 100755 (executable)
new mode 100644 (file)
index c69d564..cc49fb0
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2010-2012 Free Software Foundation, Inc.
+# Copyright (C) 2010-2017 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
@@ -16,9 +16,9 @@
 
 # Make sure that our private macro 'AM_DEP_TRACK' adds proper text to
 # the configure help screen.
-# Keep this in sync with sister test 'help-depend2.test'
+# Keep this in sync with sister test 'help-depend2.sh'
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat > configure.ac <<END
 AC_INIT([$me], [1.0])
old mode 100755 (executable)
new mode 100644 (file)
index 58a8342..60f64ca
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2010-2012 Free Software Foundation, Inc.
+# Copyright (C) 2010-2017 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
@@ -16,9 +16,9 @@
 
 # Make sure that when automake automatically activates support for
 # dependency tracking, it adds proper text to the configure help screen.
-# Keep this in sync with sister test 'help-depend.test'
+# Keep this in sync with sister test 'help-depend.sh'
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat > configure.ac <<END
 AC_INIT([$me], [1.0])
old mode 100755 (executable)
new mode 100644 (file)
index a9ab69f..430a733
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2010-2012 Free Software Foundation, Inc.
+# Copyright (C) 2010-2017 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
@@ -17,7 +17,7 @@
 # Make sure that our macro 'AM_WITH_DMALLOC' adds proper text to
 # the configure help screen.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat > configure.ac <<END
 AC_INIT([$me], [1.0])
old mode 100755 (executable)
new mode 100644 (file)
index d1cff1c..e20674a
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2010-2012 Free Software Foundation, Inc.
+# Copyright (C) 2010-2017 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
@@ -17,7 +17,7 @@
 # Make sure that our grand macro 'AM_INIT_AUTOMAKE' add proper text
 # to the configure help screen.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat > configure.ac <<END
 AC_INIT([$me], [1.0])
@@ -27,7 +27,7 @@ END
 $ACLOCAL
 $AUTOCONF
 
-./configure --help >stdout || { cat stdout; Exit 1; }
+./configure --help >stdout || { cat stdout; exit 1; }
 cat stdout
 
 grep '^  --program-prefix[= ]' stdout
old mode 100755 (executable)
new mode 100644 (file)
index ca1ddfc..9b9fdbc
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2010-2012 Free Software Foundation, Inc.
+# Copyright (C) 2010-2017 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
@@ -17,7 +17,7 @@
 # Make sure that our macro 'AM_PATH_LISPDIR' adds proper text to
 # the configure help screen.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat > configure.ac <<END
 AC_INIT([$me], [1.0])
@@ -27,7 +27,7 @@ END
 $ACLOCAL
 $AUTOCONF
 
-./configure --help >stdout || { cat stdout; Exit 1; }
+./configure --help >stdout || { cat stdout; exit 1; }
 cat stdout
 
 grep_configure_help --with-lispdir ' override.*lisp directory'
old mode 100755 (executable)
new mode 100644 (file)
index 501b545..6439081
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2011-2012 Free Software Foundation, Inc.
+# Copyright (C) 2011-2017 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
@@ -17,7 +17,7 @@
 # Make sure that macro 'AM_PATH_PYTHON' adds proper text to the
 # configure help screen.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat > configure.ac <<END
 AC_INIT([$me], [1.0])
old mode 100755 (executable)
new mode 100644 (file)
index d5fc342..0725fad
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2010-2012 Free Software Foundation, Inc.
+# Copyright (C) 2010-2017 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 that our macro 'AM_SILENT_RULES' adds proper text to
-# the configure help screen.
+# Make sure configure options relative to automake silent rules are
+# added to the configure help screen.
 
-. ./defs || Exit 1
-
-cat > configure.ac <<END
-AC_INIT([$me], [1.0])
-AM_SILENT_RULES
-END
+. test-init.sh
 
+: > Makefile.am
 $ACLOCAL
 
-mv -f configure.ac configure.tmpl
-
-q="[\`'\"]"
+cp configure.ac configure.tmpl
 
-for args in '' '([])' '([yes])' '([no])'; do
-  sed "s/AM_SILENT_RULES.*/&$args/" configure.tmpl >configure.ac
-  cat configure.ac
+for args in '' 'yes' 'no'; do
+  cp -f configure.tmpl configure.ac
+  test x"$args" = x || echo "AM_SILENT_RULES([$args])/" >> configure.ac
+  cat configure.ac # For debugging.
   $AUTOCONF --force
   grep_configure_help --enable-silent-rules \
-                      " less verbose build.*\\(undo.*${q}make V=1${q}"
+                      ' less verbose build.*\(undo.*"make V=1".*\)'
   grep_configure_help --disable-silent-rules \
-                      " verbose build.*\\(undo.*${q}make V=0${q}"
+                      ' verbose build.*\(undo.*"make V=0".*\)'
 done
 
 :
old mode 100755 (executable)
new mode 100644 (file)
index b81b387..ed6678e
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2010-2012 Free Software Foundation, Inc.
+# Copyright (C) 2010-2017 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
@@ -17,7 +17,7 @@
 # Make sure that our macro 'AM_PROG_UPC' adds proper text to
 # the configure help screen.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat > configure.ac <<END
 AC_INIT([$me], [1.0])
old mode 100755 (executable)
new mode 100644 (file)
index 2f7c2d1..9b951c8
--- a/t/help.sh
+++ b/t/help.sh
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2003-2012 Free Software Foundation, Inc.
+# Copyright (C) 2003-2017 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
@@ -17,7 +17,7 @@
 # Make sure --help and --version work, even when no configure.ac nor
 # configure.in is in the current directory.
 
-. ./defs || Exit 1
+. test-init.sh
 
 # Ensure we run in an empty directory.
 mkdir emptydir
@@ -35,12 +35,10 @@ $AUTOMAKE --help
 
 # Sanity checks: aclocal and automake cannot work without configure.ac
 # nor configure.in.
-$ACLOCAL 2>stderr && { cat stderr >&2; Exit 1; }
+$ACLOCAL 2>stderr && { cat stderr >&2; exit 1; }
 cat stderr >&2
 $FGREP configure.ac stderr
-$FGREP configure.in stderr
 AUTOMAKE_fails
 $FGREP configure.ac stderr
-$FGREP configure.in stderr
 
 :
old mode 100755 (executable)
new mode 100644 (file)
index 0d433f4..4618f3a
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2010-2012 Free Software Foundation, Inc.
+# Copyright (C) 2010-2017 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
@@ -16,7 +16,7 @@
 
 # Make sure --help and --version work, even when the current directory
 # contains a broken configure.ac and a broken acinclude.m4.
-. ./defs || Exit 1
+. test-init.sh
 
 # Ensure we run in a new, clean directory.
 mkdir cleandir
@@ -36,14 +36,14 @@ $ACLOCAL --version
 $ACLOCAL --help
 
 # Sanity check: aclocal cannot work with broken acinclude.m4.
-$ACLOCAL 2>stderr && { cat stderr >&2; Exit 1; }
+$ACLOCAL 2>stderr && { cat stderr >&2; exit 1; }
 cat stderr >&2
 $FGREP acinclude.m4 stderr
 
 rm -f acinclude.m4
 
 # Sanity checks: aclocal and automake cannot work with broken configure.ac.
-$ACLOCAL 2>stderr && { cat stderr >&2; Exit 1; }
+$ACLOCAL 2>stderr && { cat stderr >&2; exit 1; }
 cat stderr >&2
 $FGREP configure.ac stderr
 AUTOMAKE_fails
old mode 100755 (executable)
new mode 100644 (file)
index 54e06d5..738aba8
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2010-2012 Free Software Foundation, Inc.
+# Copyright (C) 2010-2017 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
@@ -16,7 +16,7 @@
 
 # Make sure --help and --version takes precedence over other options.
 
-. ./defs || Exit 1
+. test-init.sh
 
 # We must have full control over the content of the current directory.
 mkdir cleandir
@@ -40,9 +40,9 @@ pkgdata_DATA =
 END
 
 $ACLOCAL --force --help --output=foo.m4
-test ! -r foo.m4
+test ! -e foo.m4
 $ACLOCAL --output=foo.m4 --version --force
-test ! -r foo.m4
+test ! -e foo.m4
 # Sanity check.
 $ACLOCAL --output=foo.m4 --force
 test -f foo.m4
@@ -50,9 +50,9 @@ test -f foo.m4
 mv -f foo.m4 aclocal.m4 # autoconf will need aclocal.m4
 
 $AUTOMAKE --add-missing --help --copy
-test ! -r install-sh
+test ! -e install-sh
 $AUTOMAKE --copy --version --add-mising
-test ! -r install-sh
+test ! -e install-sh
 # Sanity check.
 $AUTOMAKE --add-missing --copy
 test -f install-sh
old mode 100755 (executable)
new mode 100644 (file)
index 9747968..61bbd44
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2010-2012 Free Software Foundation, Inc.
+# Copyright (C) 2010-2017 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
@@ -17,7 +17,7 @@
 # Check that the first among --help and --version to be specified on
 # the command line takes precedence over the following one.
 
-. ./defs || Exit 1
+. test-init.sh
 
 # Ensure we run in an empty directory.
 mkdir emptydir
@@ -29,26 +29,26 @@ ACLOCAL=$am_original_ACLOCAL
 AUTOMAKE=$am_original_AUTOMAKE
 
 escape_dots () { sed 's/\./\\./g'; } # Avoid issues with "\" in backquotes.
-apiversion_rx=`echo "$APIVERSION" | escape_dots`
+apiversion_rx=$(echo "$APIVERSION" | escape_dots)
 
-$ACLOCAL --version --help >stdout || { cat stdout; Exit 1; }
+$ACLOCAL --version --help >stdout || { cat stdout; exit 1; }
 cat stdout
 grep "^aclocal.*$apiversion_rx" stdout
-grep "^Usage" stdout && Exit 1
+grep "^Usage" stdout && exit 1
 
-$ACLOCAL --help --version >stdout || { cat stdout; Exit 1; }
+$ACLOCAL --help --version >stdout || { cat stdout; exit 1; }
 cat stdout
 grep "^Usage" stdout
-grep "^aclocal.*$apiversion_rx" stdout && Exit 1
+grep "^aclocal.*$apiversion_rx" stdout && exit 1
 
-$AUTOMAKE --version --help >stdout || { cat stdout; Exit 1; }
+$AUTOMAKE --version --help >stdout || { cat stdout; exit 1; }
 cat stdout
 grep "^automake.*$apiversion_rx" stdout
-grep "^Usage" stdout && Exit 1
+grep "^Usage" stdout && exit 1
 
-$AUTOMAKE --help --version >stdout || { cat stdout; Exit 1; }
+$AUTOMAKE --help --version >stdout || { cat stdout; exit 1; }
 cat stdout
 grep "^Usage" stdout
-grep "^automake.*$apiversion_rx" stdout && Exit 1
+grep "^automake.*$apiversion_rx" stdout && exit 1
 
 :
old mode 100755 (executable)
new mode 100644 (file)
index 6000040..c29d4d9
--- a/t/hfs.sh
+++ b/t/hfs.sh
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2004-2012 Free Software Foundation, Inc.
+# Copyright (C) 2004-2017 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
@@ -20,7 +20,7 @@
 # Darwin).
 # Report from Peter O'Gorman.
 
-. ./defs || Exit 1
+. test-init.sh
 echo AC_OUTPUT >>configure.ac
 
 : >CHANGELOG
old mode 100755 (executable)
new mode 100644 (file)
index a9a068b..a49b54e
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 1996-2012 Free Software Foundation, Inc.
+# Copyright (C) 1996-2017 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
@@ -17,7 +17,7 @@
 # Test to make sure implicit .o's are listed as appropriate.  Report
 # from Henrik Frystyk Nielsen.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_CC
old mode 100755 (executable)
new mode 100644 (file)
index d576814..25057f5
--- a/t/init.sh
+++ b/t/init.sh
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2006-2012 Free Software Foundation, Inc.
+# Copyright (C) 2006-2017 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
@@ -17,7 +17,7 @@
 # Make sure we give a sensible error message when AC_INIT and
 # AM_INIT_AUTOMAKE are both given less than two arguments.
 
-. ./defs || Exit 1
+. test-init.sh
 
 for ac_init_args in '' '([x])'; do
   for am_init_args in '' '([1.10])'; do
@@ -28,9 +28,9 @@ for ac_init_args in '' '([x])'; do
 END
     cat configure.ac # For debugging.
     # The error message should mention AC_INIT, not AC_PACKAGE_VERSION.
-    ($ACLOCAL && $AUTOCONF) 2>stderr && { cat stderr >&2; Exit 1; }
+    ($ACLOCAL && $AUTOCONF) 2>stderr && { cat stderr >&2; exit 1; }
     cat stderr >&2
-    $FGREP AC_PACKAGE_VERSION stderr && Exit 1
+    $FGREP AC_PACKAGE_VERSION stderr && exit 1
     grep 'configure\.ac:.* AC_INIT .*arguments' stderr
   done
 done
old mode 100755 (executable)
new mode 100644 (file)
index 44e79cb..3e30e1b
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2010-2012 Free Software Foundation, Inc.
+# Copyright (C) 2010-2017 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
@@ -17,7 +17,7 @@
 # Make sure we give a sensible error message when AM_INIT_AUTOMAKE
 # contains junk.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat >configure.ac <<END
 AC_INIT([init2], [1.0])
@@ -27,4 +27,4 @@ END
 $ACLOCAL
 AUTOMAKE_fails
 grep 'nosuchoption.*recognized' stderr
-Exit 0
+exit 0
old mode 100755 (executable)
new mode 100644 (file)
index 12b2293..ef3be1b
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2011-2012 Free Software Foundation, Inc.
+# Copyright (C) 2011-2017 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
 # inlined, below.
 
 # FIXME: this test is a good candidate for a conversion to TAP,
-# FIXME: and could be merged with 'txinfo27.test'.
+# FIXME: and could be merged with 'txinfo27.sh'.
 
 required=makeinfo
-. ./defs || Exit 1
+. test-init.sh
 
-cwd=`pwd` || fatal_ "cannot get current working directory"
+cwd=$(pwd) || fatal_ "cannot get current working directory"
 
 mkdir bin
 saved_PATH=$PATH; export saved_PATH
@@ -87,22 +87,23 @@ if test $have_installinfo = yes; then
 
   $MAKE install-info
   test -f $instdir/info/foo.info
-  test -f $instdir/info/dir
+  cat $instdir/info/dir
   $FGREP 'Does nothing at all, but has a nice name' $instdir/info/dir
 
   $MAKE uninstall
-  test ! -f $instdir/info/foo.info
-  $FGREP 'but has a nice name' $instdir/info/dir && Exit 1
+  test ! -e $instdir/info/foo.info
+  cat $instdir/info/dir
+  $FGREP 'but has a nice name' $instdir/info/dir && exit 1
 
   dir="$destdir/$cwd/$instdir/info"
 
   $MAKE DESTDIR="$cwd/$destdir" install-info
   test -f "$dir"/foo.info
-  test -f "$dir"/dir
+  cat "$dir"/dir
   $FGREP 'Does nothing at all, but has a nice name' "$dir"/dir
   $MAKE DESTDIR="$cwd/$destdir" uninstall
-  test ! -f "$dir"/foo.info
-  $FGREP 'but has a nice name' "$dir"/dir && Exit 1
+  test ! -e "$dir"/foo.info
+  $FGREP 'but has a nice name' "$dir"/dir && exit 1
 
   unset dir
 
@@ -118,11 +119,10 @@ echo error from install-info >&2
 exit 127
 END
 chmod a+x bin/install-info
-$MAKE install-info >output 2>&1 || { cat output; Exit 1; }
-cat output
+run_make -M install-info
 test -f $instdir/info/foo.info
-test ! -f $instdir/info/dir
-grep 'error from install-info' output && Exit 1
+test ! -e $instdir/info/dir
+grep 'error from install-info' output && exit 1
 
 rm -rf $instdir output
 
@@ -142,11 +142,11 @@ if test $have_installinfo = yes; then
 END
   $MAKE install-info
   test -f $instdir/info/foo.info
-  test -f $instdir/info/dir
+  cat $instdir/info/dir
   $MAKE uninstall
-  test ! -f $instdir/info/foo.info
-  test -f $instdir/info/dir
-  $FGREP 'but has a nice name' $instdir/info/dir && Exit 1
+  test ! -e $instdir/info/foo.info
+  cat $instdir/info/dir
+  $FGREP 'but has a nice name' $instdir/info/dir && exit 1
   : For shells with busted 'set -e'.
 fi
 
@@ -159,7 +159,7 @@ for val in no NO n; do
   rm -rf $instdir
   env AM_UPDATE_INFO_DIR="$val" $MAKE install-info
   test -f $instdir/info/foo.info
-  test ! -f $instdir/info/dir
+  test ! -e $instdir/info/dir
 done
 
 $MAKE install-info
@@ -170,6 +170,7 @@ fi
 chmod a-w $instdir/info/dir
 for val in no NO n; do
   env AM_UPDATE_INFO_DIR="$val" $MAKE uninstall
+  cat $instdir/info/dir
   $FGREP 'Does nothing at all, but has a nice name' $instdir/info/dir
 done
 
@@ -178,10 +179,10 @@ if test $have_installinfo = yes; then
     rm -rf $instdir
     env AM_UPDATE_INFO_DIR="$val" $MAKE install-info
     test -f $instdir/info/foo.info
-    test -f $instdir/info/dir
+    cat $instdir/info/dir
     env AM_UPDATE_INFO_DIR="$val" $MAKE uninstall
-    test ! -f $instdir/info/foo.info
-    $FGREP 'but has a nice name' $instdir/info/dir && Exit 1
+    test ! -e $instdir/info/foo.info
+    $FGREP 'but has a nice name' $instdir/info/dir && exit 1
     : For shells with busted 'set -e'.
   done
 fi
old mode 100755 (executable)
new mode 100644 (file)
similarity index 50%
rename from t/missing-w.sh
rename to t/install-sh-option-C-w.sh
index 6854501..c064417
@@ -1,14 +1,15 @@
 #! /bin/sh
 # This file has been automatically generated.  DO NOT EDIT BY HAND!
-. ./defs-static || exit '99';
+. test-lib.sh
+
 am_test_prefer_config_shell=yes
 # 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/t/missing.sh"; then
-    echo "$0: will source $dir/t/missing.sh"
-    . "$dir/t/missing.sh"; exit "$?"
+  if test -f "$dir/t/install-sh-option-C.sh"; then
+    echo "$0: will source $dir/t/install-sh-option-C.sh"
+    . "$dir/t/install-sh-option-C.sh"; exit $?
   fi
 done
-echo "$0: cannot find wrapped test 't/missing.sh'" >&2
-exit '99'
+echo "$0: cannot find wrapped test 't/install-sh-option-C.sh'" >&2
+exit 99
old mode 100755 (executable)
new mode 100644 (file)
similarity index 91%
rename from t/instsh3.sh
rename to t/install-sh-option-C.sh
index 3a527cb..12880c0
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2006-2012 Free Software Foundation, Inc.
+# Copyright (C) 2006-2017 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
 
 am_create_testdir=empty
 required=non-root
-. ./defs || Exit 1
+. test-init.sh
 
 # Solaris /usr/ucb/touch does not accept -t.
-touch -t $old_timestamp foo \
+touch -t "$old_timestamp" foo \
   || skip_ "touch utility doesn't accept '-t' option"
 
 get_shell_script install-sh
@@ -41,3 +41,5 @@ diff file d1/file
 ./install-sh -C -m 444 file d1
 test -r d1/file
 test ! -w d1/file
+
+:
diff --git a/t/install-sh-unittests-w.sh b/t/install-sh-unittests-w.sh
new file mode 100644 (file)
index 0000000..c8c561a
--- /dev/null
@@ -0,0 +1,15 @@
+#! /bin/sh
+# This file has been automatically generated.  DO NOT EDIT BY HAND!
+. test-lib.sh
+
+am_test_prefer_config_shell=yes
+# 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/t/install-sh-unittests.sh"; then
+    echo "$0: will source $dir/t/install-sh-unittests.sh"
+    . "$dir/t/install-sh-unittests.sh"; exit $?
+  fi
+done
+echo "$0: cannot find wrapped test 't/install-sh-unittests.sh'" >&2
+exit 99
old mode 100755 (executable)
new mode 100644 (file)
similarity index 51%
rename from t/instsh2.sh
rename to t/install-sh-unittests.sh
index 054beb9..17188e8
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2002-2012 Free Software Foundation, Inc.
+# Copyright (C) 2002-2017 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
 # Various install-sh checks.
 
 am_create_testdir=empty
-. ./defs || Exit 1
+. test-init.sh
+
+install_sh_fail ()
+{
+  err_rx=$1; shift
+  ./install-sh ${1+"$@"} 2>stderr && { cat stderr >&2; exit 1; }
+  cat stderr >&2
+  $EGREP "install-sh:.* $err_rx" stderr || exit 1
+}
 
 get_shell_script install-sh
 
 # Basic errors.
-./install-sh && Exit 1
-./install-sh -m 644 dest && Exit 1
+install_sh_fail 'no input file specified'
+install_sh_fail 'no input file specified' dest
+install_sh_fail 'no input file specified' -m 644 dest
+install_sh_fail 'no input file specified' -c -t dest
 
-# Directories.
+# Incorrect usages.
+: > bar
+: > baz
+: > qux
+install_sh_fail 'target directory not allowed when installing a directory' \
+                -d -t foo
+install_sh_fail 'target directory not allowed when installing a directory' \
+                -d -t foo bar
+install_sh_fail 'foo: [iI]s not a directory' -t foo bar
+install_sh_fail 'foo: [iI]s not a directory' bar baz foo
+mkdir foo
+install_sh_fail 'target directory not allowed when installing a directory' \
+                -d -t foo
+install_sh_fail 'target directory not allowed when installing a directory' \
+                -d -t foo bar
+rmdir foo
+rm -f bar baz qux
 
-# It should be OK to create no directory.  We sometimes need
-# this when directory are conditionally defined.
-./install-sh -d
-# One directory.
-./install-sh -d d0
-test -d d0
-# Multiple directories (for make installdirs).
-./install-sh -d d1 d2 d3 d4
-test -d d1
-test -d d2
-test -d d3
-test -d d4
-# Subdirectories.
-./install-sh -d p1/p2/p3 p4//p5//p6//
-test -d p1/p2/p3
-test -d p4/p5/p6
+# Directories.
+for opts in '-d' '-d -T' '-T -d' '-d -T -d' '-T -d -T -d -T'; do
+  # It should be OK to create no directory.  We sometimes need
+  # this when directory are conditionally defined.
+  ./install-sh $opts
+  # One directory.
+  ./install-sh $opts d0
+  test -d d0
+  # Multiple directories (for make installdirs).
+  ./install-sh $opts d1 d2 d3 d4
+  test -d d1
+  test -d d2
+  test -d d3
+  test -d d4
+  rmdir d[0-9]
+  # Subdirectories.
+  ./install-sh $opts p1/p2/p3 p4//p5//p6//
+  test -d p1/p2/p3
+  test -d p4/p5/p6
+  rmdir p[0-9]/p[0-9]/p[0-9]
+  rmdir p[0-9]/p[0-9]
+  rmdir p[0-9]
+done
 
 # Files.
+mkdir d0 d1 d2 d3 d4
 : > x
 ./install-sh -c -m 644 x y
 test -f x
@@ -76,8 +110,8 @@ test -f d4/z
 ./install-sh -T x d3/y
 test -f x
 test -f d3/y
-./install-sh -T x d3 && Exit 1
-./install-sh -T x d4// && Exit 1
+install_sh_fail 'd3: [iI]s a directory' -T x d3
+install_sh_fail 'd4(//)?: [iI]s a directory' -T x d4//
 
 # Ensure that install-sh works with names that include spaces.
 touch 'a  b'
@@ -88,9 +122,9 @@ test -f 'a  b'
 
 # Ensure we do not run into 'test' operator precedence bugs with Tru64 sh.
 for c in = '(' ')' '!'; do
-  ./install-sh $c 2>stderr && { cat stderr >&2; Exit 1; }
-  cat stderr >&2
-  grep 'test: ' stderr && Exit 1
+  install_sh_fail 'no input file specified' $c
+  test -f stderr # sanity check
+  grep 'test: ' stderr && exit 1
   # Skip tests if the file system is not capable.
   mkdir ./$c || continue
   rmdir ./$c
old mode 100755 (executable)
new mode 100644 (file)
index dc83ee3..cf8ab0b
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2001-2012 Free Software Foundation, Inc.
+# Copyright (C) 2001-2017 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
@@ -22,7 +22,7 @@
 # installdirs is missing this.  Ideally this would be an automatic
 # feature of any exported target.
 
-. ./defs || Exit 1
+. test-init.sh
 
 echo AC_OUTPUT >> configure.ac
 
@@ -36,9 +36,9 @@ END
 $ACLOCAL
 $AUTOMAKE
 
-test `grep installdirs-local Makefile.in | wc -l` -eq 4
+test $(grep -c installdirs-local Makefile.in) -eq 4
 
-cwd=`pwd` || fatal_ "getting current working directory"
+cwd=$(pwd) || fatal_ "getting current working directory"
 
 $AUTOCONF
 ./configure --prefix="$cwd/inst"
old mode 100755 (executable)
new mode 100644 (file)
index 0754a09..53a959b
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 1998-2012 Free Software Foundation, Inc.
+# Copyright (C) 1998-2017 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
@@ -17,7 +17,7 @@
 # Test to see if defining INSTALL_DATA causes problems.  From EGCS
 # list.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac <<END
 AC_SUBST([INSTALL_DATA])
@@ -28,5 +28,6 @@ END
 $ACLOCAL
 $AUTOMAKE
 
-grep '^DATA =' Makefile.in | grep 'INSTALL_DATA' && Exit 1
-Exit 0
+grep '^DATA =' Makefile.in | grep 'INSTALL_DATA' && exit 1
+
+:
old mode 100755 (executable)
new mode 100644 (file)
index 8773fc3..9786275
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2001-2012 Free Software Foundation, Inc.
+# Copyright (C) 2001-2017 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
@@ -17,7 +17,7 @@
 # Test that installing under $exec_prefix is handled by install-exec.
 # Testing with headers for instance.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat >Makefile.am << 'EOF'
 # User directories.
@@ -62,7 +62,7 @@ pkgdata_SCRIPTS = script
 ##pkginclude_SCRIPTS = script
 EOF
 
-$ACLOCAL || Exit 1
+$ACLOCAL
 $AUTOMAKE
 
 # install-SCRIPTS targets.
@@ -75,7 +75,6 @@ EOF
 
 diff expected produced
 
-
 # install-exec targets.
 sed -n '/^install-exec-am/,/^  /p' Makefile.in > produced
 
@@ -86,4 +85,4 @@ EOF
 
 diff expected produced
 
-Exit 0
+:
old mode 100755 (executable)
new mode 100644 (file)
index 2965ff1..fc6e3b7
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2012 Free Software Foundation, Inc.
+# Copyright (C) 2012-2017 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
@@ -17,7 +17,7 @@
 # Check against automake bug#10997: directories holding only
 # conditionally-installed files should not be created unconditionally.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AM_CONDITIONAL([ENABLE_FOO], [false])
@@ -39,10 +39,10 @@ $ACLOCAL
 $AUTOMAKE
 $AUTOCONF
 
-./configure --prefix="`pwd`/inst"
+./configure --prefix="$(pwd)/inst"
 
 $MAKE install
-test ! -d inst/share/instdir-cond
-test ! -d inst/libexec/instdir-cond
+test ! -e inst/share/instdir-cond
+test ! -e inst/libexec/instdir-cond
 
 :
old mode 100755 (executable)
new mode 100644 (file)
index 1fc24b7..a3f09ad
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2012 Free Software Foundation, Inc.
+# Copyright (C) 2012-2017 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
@@ -19,9 +19,9 @@
 # FIXME: this test tries to check that the above also hold for the
 # FIXME: "installdirs" target, but that doesn't currently work :-(
 # FIXME: So this test is still xfailing.
-# See sister test 'instdir-cond.test' for the succeeding part.
+# See sister test 'instdir-cond.sh' for the succeeding part.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AM_CONDITIONAL([ENABLE_FOO], [false])
@@ -43,9 +43,9 @@ $ACLOCAL
 $AUTOMAKE
 $AUTOCONF
 
-./configure --prefix="`pwd`/inst"
+./configure --prefix="$(pwd)/inst"
 
 $MAKE installdirs
-test ! -d inst || { find inst; Exit 1; }
+test ! -e inst || { find inst; exit 1; }
 
 :
old mode 100755 (executable)
new mode 100644 (file)
index 4d47d19..37a2c22
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2009-2012 Free Software Foundation, Inc.
+# Copyright (C) 2009-2017 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
@@ -17,7 +17,7 @@
 # If $(javadir) is the empty string, then nothing should be installed there.
 
 required=javac
-. ./defs || Exit 1
+. test-init.sh
 
 cat >>configure.ac <<'END'
 AC_OUTPUT
@@ -37,23 +37,15 @@ $ACLOCAL
 $AUTOCONF
 $AUTOMAKE --add-missing
 
-instdir=`pwd`/inst
-destdir=`pwd`/dest
+cwd=$(pwd) || fatal_ "getting current working directory"
+instdir=$cwd/inst
+destdir=$cwd/dest
 mkdir build
 cd build
 ../configure --prefix="$instdir"
 $MAKE
 
-javadir=
-export javadir
-$MAKE -e install
-test ! -d "$instdir"
-$MAKE -e install DESTDIR="$destdir"
-test ! -d "$instdir"
-test ! -d "$destdir"
-$MAKE -e uninstall > stdout || { cat stdout; Exit 1; }
-cat stdout
-grep 'rm -f' stdout && Exit 1
-$MAKE -e uninstall DESTDIR="$destdir"
+nulldirs='javadir='
+null_install
 
 :
old mode 100755 (executable)
new mode 100644 (file)
index f019504..0cee035
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2009-2012 Free Software Foundation, Inc.
+# Copyright (C) 2009-2017 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
@@ -17,7 +17,7 @@
 # If $(lispdir) is the empty string, then nothing should be installed there.
 
 required=emacs
-. ./defs || Exit 1
+. test-init.sh
 
 cat >>configure.ac <<'END'
 AM_PATH_LISPDIR
@@ -34,24 +34,15 @@ $ACLOCAL
 $AUTOCONF
 $AUTOMAKE --add-missing
 
-instdir=`pwd`/inst
-destdir=`pwd`/dest
+cwd=$(pwd) || fatal_ "getting current working directory"
+instdir=$cwd/inst
+destdir=$cwd/dest
 mkdir build
 cd build
 ../configure --prefix="$instdir"
 $MAKE
 
-lispdir=
-export lispdir
-
-$MAKE -e install
-test ! -d "$instdir"
-$MAKE -e install DESTDIR="$destdir"
-test ! -d "$instdir"
-test ! -d "$destdir"
-$MAKE -e uninstall > stdout || { cat stdout; Exit 1; }
-cat stdout
-grep 'rm -f' stdout && Exit 1
-$MAKE -e uninstall DESTDIR="$destdir"
+nulldirs='lispdir='
+null_install
 
 :
old mode 100755 (executable)
new mode 100644 (file)
index ded16cd..91a27ee
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2009-2012 Free Software Foundation, Inc.
+# Copyright (C) 2009-2017 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
 # This test exercises the libtool code paths.
 
 required='cc libtoolize'
-. ./defs || Exit 1
+. test-init.sh
 
 cat >>configure.ac <<'END'
 AC_PROG_CC
-AM_PROG_CC_C_O
 AM_PROG_AR
 AC_PROG_LIBTOOL
 AM_PATH_PYTHON
@@ -59,29 +58,16 @@ $ACLOCAL
 $AUTOCONF
 $AUTOMAKE --add-missing
 
-instdir=`pwd`/inst
-destdir=`pwd`/dest
+cwd=$(pwd) || fatal_ "getting current working directory"
+instdir=$cwd/inst
+destdir=$cwd/dest
 mkdir build
 cd build
 ../configure --prefix="$instdir" PYTHON="echo" \
              am_cv_python_pythondir="$instdir/python" \
              am_cv_python_pyexecdir="$instdir/pyexec"
-$MAKE
 
-bindir= libdir= pyexecdir=
-export bindir libdir pyexecdir
-$MAKE -e install
-test ! -d "$instdir"
-$MAKE -e install DESTDIR="$destdir"
-test ! -d "$instdir"
-test ! -d "$destdir"
-$MAKE -e uninstall > stdout || { cat stdout; Exit 1; }
-cat stdout
-# Creative quoting below to please maintainer-check.
-grep 'rm'' ' stdout && Exit 1
-$MAKE -e uninstall DESTDIR="$destdir" > stdout || { cat stdout; Exit 1; }
-cat stdout
-# Creative quoting below to please maintainer-check.
-grep 'rm'' ' stdout && Exit 1
+nulldirs='bindir= libdir= pyexecdir='
+null_install
 
 :
old mode 100755 (executable)
new mode 100644 (file)
index d93add8..0474070
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2012 Free Software Foundation, Inc.
+# Copyright (C) 2012-2017 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
@@ -17,7 +17,7 @@
 # An empty "foo_PRIMARY" declaration should *not* cause "make install"
 # to create directory $(foodir).  See automake bug#10997 and bug#11030.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac <<'END'
 AC_SUBST([CC], [whatever])
@@ -95,27 +95,28 @@ $ACLOCAL
 $AUTOCONF
 $AUTOMAKE -a
 
-cwd=`pwd` || fatal_ "getting current working directory"
+cwd=$(pwd) || fatal_ "getting current working directory"
 
 doinst ()
 {
-  $MAKE install install-pdf install-ps install-dvi ${1+"$@"}
+  run_make install install-pdf install-ps install-dvi ${1+"$@"}
 }
 
 : > foo.sh
 
 ./configure --prefix="$cwd/inst"
 doinst
-test ! -d inst || { find inst; Exit 1; }
+test ! -e inst || { find inst; exit 1; }
 $MAKE uninstall
-doinst bin_SCRIPTS=foo.sh AM_MAKEFLAGS='bin_SCRIPTS=foo.sh'
+doinst bin_SCRIPTS=foo.sh
 test -f inst/bin/foo.sh
 
-./configure
-doinst DESTDIR="$cwd/dest"
-test ! -d dest || { find dest; Exit 1; }
+# Explicitly pass prefix to avoid spurious influences from
+# global config.site scripts.
+./configure --prefix="/usr/local"
+test ! -e dest || { find dest; exit 1; }
 $MAKE uninstall
-doinst DESTDIR="$cwd/dest" bin_SCRIPTS=foo.sh AM_MAKEFLAGS='bin_SCRIPTS=foo.sh'
+doinst DESTDIR="$cwd/dest" bin_SCRIPTS=foo.sh
 test -f dest/usr/local/bin/foo.sh
 
 :
old mode 100755 (executable)
new mode 100644 (file)
index e0948c0..5c6db0f
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2009-2012 Free Software Foundation, Inc.
+# Copyright (C) 2009-2017 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
 # This test exercises the prog and libs code paths.
 
 required=cc
-. ./defs || Exit 1
+. test-init.sh
 
 cat >>configure.ac <<'END'
 AC_PROG_CC
-AM_PROG_CC_C_O
 AM_PROG_AR
 AC_PROG_RANLIB
 AM_PATH_PYTHON
@@ -58,29 +57,16 @@ $ACLOCAL
 $AUTOCONF
 $AUTOMAKE --add-missing
 
-instdir=`pwd`/inst
-destdir=`pwd`/dest
+cwd=$(pwd) || fatal_ "getting current working directory"
+instdir=$cwd/inst
+destdir=$cwd/dest
 mkdir build
 cd build
 ../configure --prefix="$instdir" PYTHON="echo" \
              am_cv_python_pythondir="$instdir/python" \
              am_cv_python_pyexecdir="$instdir/pyexec"
-$MAKE
 
-bindir= libdir= pyexecdir=
-export bindir libdir pyexecdir
-$MAKE -e install
-test ! -d "$instdir"
-$MAKE -e install DESTDIR="$destdir"
-test ! -d "$instdir"
-test ! -d "$destdir"
-$MAKE -e uninstall > stdout || { cat stdout; Exit 1; }
-cat stdout
-# Creative quoting below to please maintainer-check.
-grep 'rm'' ' stdout && Exit 1
-$MAKE -e uninstall DESTDIR="$destdir" > stdout || { cat stdout; Exit 1; }
-cat stdout
-# Creative quoting below to please maintainer-check.
-grep 'rm'' ' stdout && Exit 1
+nulldirs='bindir= libdir= pyexecdir='
+null_install
 
 :
old mode 100755 (executable)
new mode 100644 (file)
index f48353d..857937e
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2009-2012 Free Software Foundation, Inc.
+# Copyright (C) 2009-2017 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
@@ -17,7 +17,7 @@
 # If $(pythondir) is the empty string, then nothing should be installed there.
 
 required=python
-. ./defs || Exit 1
+. test-init.sh
 
 cat >>configure.ac <<'END'
 AM_PATH_PYTHON
@@ -38,24 +38,15 @@ $ACLOCAL
 $AUTOCONF
 $AUTOMAKE --add-missing
 
-instdir=`pwd`/inst
-destdir=`pwd`/dest
+cwd=$(pwd) || fatal_ "getting current working directory"
+instdir=$cwd/inst
+destdir=$cwd/dest
 mkdir build
 cd build
 ../configure --prefix="$instdir"
 $MAKE
 
-pythondir=
-export pythondir
-
-$MAKE -e install
-test ! -d "$instdir"
-$MAKE -e install DESTDIR="$destdir"
-test ! -d "$instdir"
-test ! -d "$destdir"
-$MAKE -e uninstall > stdout || { cat stdout; Exit 1; }
-cat stdout
-grep 'rm -f' stdout && Exit 1
-$MAKE -e uninstall DESTDIR="$destdir"
+nulldirs='pythondir='
+null_install
 
 :
old mode 100755 (executable)
new mode 100644 (file)
index 4e4887a..3382cbd
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2009-2012 Free Software Foundation, Inc.
+# Copyright (C) 2009-2017 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
@@ -17,8 +17,8 @@
 # If $(infodir) is the empty string, then nothing should be installed there.
 # Likewise for the other install-* targets used for texinfo files.
 
-required='makeinfo-html tex texi2dvi'
-. ./defs || Exit 1
+required='makeinfo tex texi2dvi'
+. test-init.sh
 
 dvips --help \
   || skip_ "dvips is missing"
@@ -47,25 +47,16 @@ $ACLOCAL
 $AUTOCONF
 $AUTOMAKE --add-missing
 
-instdir=`pwd`/inst
-destdir=`pwd`/dest
+cwd=$(pwd) || fatal_ "getting current working directory"
+instdir=$cwd/inst
+destdir=$cwd/dest
 mkdir build
 cd build
 ../configure --prefix="$instdir"
 $MAKE all dvi ps pdf html
 ls -l
 
-infodir= htmldir= dvidir= psdir= pdfdir=
-export infodir htmldir dvidir psdir pdfdir
-
-$MAKE -e 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"
-test ! -d "$instdir"
-test ! -d "$destdir"
-$MAKE -e uninstall > stdout || { cat stdout; Exit 1; }
-cat stdout
-grep 'rm -f' stdout && Exit 1
-$MAKE -e uninstall DESTDIR="$destdir"
+nulldirs='infodir= htmldir= dvidir= psdir= pdfdir='
+null_install --texi
 
 :
old mode 100755 (executable)
new mode 100644 (file)
index f09fdfa..786e5d8
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2009-2012 Free Software Foundation, Inc.
+# Copyright (C) 2009-2017 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
@@ -16,9 +16,9 @@
 
 # If $(foodir) is the empty string, then nothing should be installed there.
 # This test only ensures this if $(foo_PRIMARY) is also empty, see
-# instdir2.test and siblings instdir-*.test for nonempty contents.
+# 'instdir2.sh' and siblings 'instdir-*.sh' for nonempty contents.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat >>configure.ac <<'END'
 AC_SUBST([foodir], ['${datadir}'/foo])
@@ -47,24 +47,15 @@ $ACLOCAL
 $AUTOCONF
 $AUTOMAKE --add-missing
 
-instdir=`pwd`/inst
-destdir=`pwd`/dest
+cwd=$(pwd) || fatal_ "getting current working directory"
+instdir=$cwd/inst
+destdir=$cwd/dest
 mkdir build
 cd build
 ../configure --prefix="$instdir"
 $MAKE
 
-bindir= datadir= includedir= foodir= bardir= man1dir= man2dir=
-export bindir datadir includedir foodir bardir man1dir man2dir
-
-$MAKE -e install
-test ! -d "$instdir"
-$MAKE -e install DESTDIR="$destdir"
-test ! -d "$instdir"
-test ! -d "$destdir"
-$MAKE -e uninstall > stdout || { cat stdout; Exit 1; }
-cat stdout
-grep 'rm -f' stdout && Exit 1
-$MAKE -e uninstall DESTDIR="$destdir"
+nulldirs='bindir= datadir= includedir= foodir= bardir= man1dir= man2dir='
+null_install
 
 :
old mode 100755 (executable)
new mode 100644 (file)
index bdfa809..0c3acf2
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2009-2012 Free Software Foundation, Inc.
+# Copyright (C) 2009-2017 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
@@ -16,9 +16,9 @@
 
 # If $(foodir) is the empty string, then nothing should be installed there.
 # This test ensures this also if $(foo_PRIMARY) is nonempty, see
-# instdir.test.
+# 'instdir.sh'.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat >>configure.ac <<'END'
 AC_SUBST([foodir], ['${datadir}'/foo])
@@ -69,24 +69,15 @@ $ACLOCAL
 $AUTOCONF
 $AUTOMAKE --add-missing
 
-instdir=`pwd`/inst
-destdir=`pwd`/dest
+cwd=$(pwd) || fatal_ "getting current working directory"
+instdir=$cwd/inst
+destdir=$cwd/dest
 mkdir build
 cd build
 ../configure --prefix="$instdir"
 $MAKE
 
-bindir= datadir= includedir= foodir= bardir= man1dir= man2dir=
-export bindir datadir includedir foodir bardir man1dir man2dir
-
-$MAKE -e install
-test ! -d "$instdir"
-$MAKE -e install DESTDIR="$destdir"
-test ! -d "$instdir"
-test ! -d "$destdir"
-$MAKE -e uninstall > stdout || { cat stdout; Exit 1; }
-cat stdout
-grep 'rm -f' stdout && Exit 1
-$MAKE -e uninstall DESTDIR="$destdir"
+nulldirs='bindir= datadir= includedir= foodir= bardir= man1dir= man2dir='
+null_install
 
 :
old mode 100755 (executable)
new mode 100644 (file)
index c033ecd..9fbfe53
@@ -1,5 +1,5 @@
 #!/bin/sh
-# Copyright (C) 1996-2012 Free Software Foundation, Inc.
+# Copyright (C) 1996-2017 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
@@ -17,7 +17,7 @@
 # Test for this bug: when a Makefile.am builds nothing, no
 # install-exec target is generated.
 
-. ./defs || Exit 1
+. test-init.sh
 
 : > Makefile.am
 
old mode 100755 (executable)
new mode 100644 (file)
index 58aef97..efea063
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2008-2012 Free Software Foundation, Inc.
+# Copyright (C) 2008-2017 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 # The install rule should honor failures of the install program.
-# Some of these are already caught by instmany.test.
+# Some of these are already caught by 'instmany.sh'.
 
 # This test has a few sister tests, for java, info, libtool.
 
 required='makeinfo'
-. ./defs || Exit 1
+. test-init.sh
 
 cat >>configure.ac <<END
 AC_OUTPUT
@@ -45,7 +45,7 @@ $ACLOCAL
 $AUTOCONF
 $AUTOMAKE --add-missing
 
-instdir=`pwd`/inst
+instdir=$(pwd)/inst || fatal_ "getting current working directory"
 ./configure --prefix="$instdir"
 $MAKE
 
@@ -56,7 +56,7 @@ for file in info1.info
 do
   chmod a-r $file
   test ! -r $file || skip_ "cannot drop file read permissions"
-  $MAKE install-data && Exit 1
+  $MAKE install-data && exit 1
   chmod u+r $file
 done
 
old mode 100755 (executable)
new mode 100644 (file)
index 0ae80f5..55b9912
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2008-2012 Free Software Foundation, Inc.
+# Copyright (C) 2008-2017 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 # The install rule should honor failures of the install program.
-# Some of these are already caught by instmany.test.
+# Some of these are already caught by 'instmany.sh'.
 
-# This is the java sister test of instfail.test.
+# This is the java sister test of 'instfail.sh'.
 
 required=javac
-. ./defs || Exit 1
+. test-init.sh
 
 cat >>configure.ac <<'END'
 AC_OUTPUT
@@ -39,7 +39,7 @@ $ACLOCAL
 $AUTOCONF
 $AUTOMAKE --add-missing
 
-instdir=`pwd`/inst
+instdir=$(pwd)/inst || fatal_ "getting current working directory"
 ./configure --prefix="$instdir"
 $MAKE
 
@@ -50,7 +50,7 @@ for file in java1.class
 do
   chmod a-r $file
   test ! -r $file || skip_ "cannot drop file read permissions"
-  $MAKE install-data && Exit 1
+  $MAKE install-data && exit 1
   chmod u+r $file
 done
 
old mode 100755 (executable)
new mode 100644 (file)
index 0acfd2c..9e48c53
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2008-2012 Free Software Foundation, Inc.
+# Copyright (C) 2008-2017 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 # The install rule should honor failures of the install program.
-# Some of these are already caught by instmany.test.
+# Some of these are already caught by 'instmany.sh'.
 
-# This is the libtool sister test of instfail.test
+# This is the libtool sister test of 'instfail.sh'.
 
 required='cc libtool libtoolize'
-. ./defs || Exit 1
+. test-init.sh
 
 cat >>configure.ac <<END
 AM_PROG_AR
@@ -55,7 +55,7 @@ $ACLOCAL
 $AUTOCONF
 $AUTOMAKE --add-missing
 
-instdir=`pwd`/inst
+instdir=$(pwd)/inst || fatal_ "getting current working directory"
 ./configure --prefix="$instdir"
 $MAKE
 
@@ -66,16 +66,16 @@ for file in liblt1.la libltn1.la
 do
   chmod a-r $file
   test ! -r $file || skip_ "cannot drop file read permissions"
-  $MAKE install-exec && Exit 1
+  $MAKE install-exec && exit 1
   chmod u+r $file
 done
 
 $MAKE unreadable-prog
-$MAKE install-exec && Exit 1
+$MAKE install-exec && exit 1
 $MAKE readable-prog
 
 $MAKE unreadable-progn
-$MAKE install-exec && Exit 1
+$MAKE install-exec && exit 1
 $MAKE readable-progn
 
 :
old mode 100755 (executable)
new mode 100644 (file)
index 1e5a340..99ea063
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2008-2012 Free Software Foundation, Inc.
+# Copyright (C) 2008-2017 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 # The install rule should honor failures of the install program.
-# Some of these are already caught by instmany.test.
+# Some of these are already caught by 'instmany.sh'.
 
 # This test has a few sister tests, for java, info, libtool.
 
 required=cc
-. ./defs || Exit 1
+. test-init.sh
 
 cat >>configure.ac <<END
 AC_PROG_CC
@@ -60,7 +60,7 @@ $ACLOCAL
 $AUTOCONF
 $AUTOMAKE --add-missing
 
-instdir=`pwd`/inst
+instdir=$(pwd)/inst || fatal_ "getting current working directory"
 ./configure --prefix="$instdir"
 $MAKE
 
@@ -71,23 +71,22 @@ for file in lib1.a libn1.a
 do
   chmod a-r $file
   test ! -r $file || skip_ "cannot drop file read permissions"
-  $MAKE install-exec && Exit 1
+  $MAKE install-exec && exit 1
   chmod u+r $file
 done
 
 $MAKE unreadable-prog
-$MAKE install-exec && Exit 1
+$MAKE install-exec && exit 1
 $MAKE readable-prog
 
 $MAKE unreadable-progn
-$MAKE install-exec && Exit 1
+$MAKE install-exec && exit 1
 $MAKE readable-progn
 
-if grep "^EMACS = no" Makefile; then :; else
-  for file in lisp1.el lisp1.elc
-  do
+if ! grep "^EMACS = no" Makefile; then
+  for file in lisp1.el lisp1.elc; do
     chmod a-r $file
-    $MAKE install-data && Exit 1
+    $MAKE install-data && exit 1
     chmod u+r $file
   done
 fi
old mode 100755 (executable)
new mode 100644 (file)
index 23bc4e0..69a0502
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2003-2012 Free Software Foundation, Inc.
+# Copyright (C) 2003-2017 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
@@ -16,7 +16,7 @@
 
 # Make sure the install-exec-hook example we give in the manual works.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat >>configure.ac <<'EOF'
 AC_PROG_LN_S
@@ -27,9 +27,9 @@ cat >Makefile.am <<'END'
 dist_bin_SCRIPTS = foo
 
 install-exec-hook:
-       cd "$(DESTDIR)$(bindir)" && \
-       mv -f foo foo-$(VERSION) && \
-       $(LN_S) foo-$(VERSION) foo
+       cd "$(DESTDIR)$(bindir)" \
+         && mv -f foo foo-$(VERSION) \
+         && $(LN_S) foo-$(VERSION) foo
 
 installcheck-local:
        test -f "$(bindir)/foo"
@@ -40,7 +40,7 @@ uninstall-hook:
        rm -f $(DESTDIR)$(bindir)/foo-$(VERSION)
 END
 
-echo 1 > foo
+echo a > foo
 
 $ACLOCAL
 $AUTOCONF
@@ -56,13 +56,13 @@ test -f ok
 # second version will overwrite 'foo'.  Hopefully 'install' and 'install-sh'
 # are smart enough to erase the 'foo' symlink before installing the new
 # version.)
-./configure "--bindir=`pwd`/bin"
+./configure "--bindir=$(pwd)/bin"
 $MAKE install
-echo 2 > foo
-VERSION=2.0 $MAKE -e install
-grep 1 bin/foo-1.0
-grep 2 bin/foo-2.0
-grep 2 bin/foo
+echo b > foo
+run_make VERSION=2.0 install
+test $(cat bin/foo-1.0) = a
+test $(cat bin/foo-2.0) = b
+test $(cat bin/foo)     = b
 
 # install-hook is an error.
 cat >>Makefile.am <<EOF
old mode 100755 (executable)
new mode 100644 (file)
index 7871045..ed0f71d
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 1996-2012 Free Software Foundation, Inc.
+# Copyright (C) 1996-2017 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
@@ -17,7 +17,7 @@
 # Make sure the MKDIR_P invocation is correct in install-man
 # target.  Bug reported by Gordon Irlam <gordoni@cygnus.com>.
 
-. ./defs || Exit 1
+. test-init.sh
 
 echo AC_OUTPUT >> configure.ac
 
@@ -30,5 +30,7 @@ EOF
 $ACLOCAL
 $AUTOMAKE
 
-grep '[^(/]MKDIR_P' Makefile.in > out
-test `wc -l < out` -eq 1
+grep 'MKDIR_P' Makefile.in # For debugging.
+test $(grep -c '[^(/]MKDIR_P' Makefile.in) -eq 1
+
+:
old mode 100755 (executable)
new mode 100644 (file)
index 04663db..2807c77
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2000-2012 Free Software Foundation, Inc.
+# Copyright (C) 2000-2017 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
@@ -17,7 +17,7 @@
 # Test to make sure mkinstalldirs invocation correct in install-man
 # target.  Bug reported by Gordon Irlam <gordoni@cygnus.com>.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat > Makefile.am << 'EOF'
 man8_MANS = frob.8
old mode 100755 (executable)
new mode 100644 (file)
index ceb3a9e..ae16f95
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2008-2012 Free Software Foundation, Inc.
+# Copyright (C) 2008-2017 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
@@ -16,9 +16,9 @@
 
 # Installing many files should not exceed the command line length limit.
 
-# This is the mans sister test of instmany.test, see there for details.
+# This is the mans sister test of 'instmany.sh', see there for details.
 
-. ./defs || Exit 1
+. test-init.sh
 
 # In order to have a useful test on modern systems (which have a high
 # limit, if any), use a fake install program that errors out for more
 limit=2500
 subdir=long_subdir_name_with_many_characters
 nfiles=81
-list=`seq_ 1 $nfiles`
+list=$(seq_ 1 $nfiles)
 
-sed "s|@limit@|$limit|g" >myinstall.in <<'END'
+oPATH=$PATH; export oPATH
+nPATH=$(pwd)/x-bin$PATH_SEPARATOR$PATH; export nPATH
+
+mkdir x-bin
+
+sed "s|@limit@|$limit|g" >x-bin/my-install <<'END'
 #! /bin/sh
-# Fake install script.  This doesn't really install
-# (the INSTALL path below would be wrong outside this directory).
 limit=@limit@
-INSTALL='@INSTALL@'
-len=`expr "$INSTALL $*" : ".*" 2>/dev/null || echo $limit`
+PATH=$oPATH; export PATH
+if test -z "$orig_INSTALL"; then
+  echo "$0: \$orig_INSTALL variable not set" >&2
+  exit 1
+fi
+len=`expr "$orig_INSTALL $*" : ".*" 2>/dev/null || echo $limit`
 if test $len -ge $limit; then
   echo "$0: safe command line limit of $limit characters exceeded" >&2
   exit 1
 fi
-exit 0
+exec $orig_INSTALL "$@"
+exit 1
 END
 
 # Creative quoting in the next line to please maintainer-check.
-sed "s|@limit@|$limit|g" >'rm' <<'END'
+sed "s|@limit@|$limit|g" >x-bin/'rm' <<'END'
 #! /bin/sh
 limit=@limit@
-PATH=$save_PATH
-export PATH
+PATH=$oPATH; export PATH
 RM='rm -f'
 len=`expr "$RM $*" : ".*" 2>/dev/null || echo $limit`
 if test $len -ge $limit; then
@@ -60,10 +67,23 @@ exec $RM "$@"
 exit 1
 END
 
-chmod +x rm
+# Creative quoting in the next line to please maintainer-check.
+chmod +x x-bin/'rm' x-bin/my-install
+
+cat >setenv.in <<'END'
+orig_INSTALL='@INSTALL@'
+# In case we've falled back on the install-sh script (seen e.g.,
+# on AIX 7.1), we need to make sure we use its absolute path,
+# as we don't know from which directory we'll be run.
+case "$orig_INSTALL" in
+   /*) ;;
+  */*) orig_INSTALL=$(pwd)/$orig_INSTALL;;
+esac
+export orig_INSTALL
+END
 
 cat >>configure.ac <<END
-AC_CONFIG_FILES([myinstall], [chmod +x ./myinstall])
+AC_CONFIG_FILES([setenv.sh:setenv.in])
 AC_CONFIG_FILES([$subdir/Makefile])
 AC_OUTPUT
 END
@@ -100,21 +120,28 @@ $ACLOCAL
 $AUTOCONF
 $AUTOMAKE --add-missing
 
-instdir=`pwd`/inst
+instdir=$(pwd)/inst
 mkdir build
 cd build
 ../configure --prefix="$instdir"
+. ./setenv.sh
+test -n "$orig_INSTALL"
 $MAKE
 # Try whether native install (or install-sh) works.
 $MAKE install
+test -f "$instdir/share/man/man1/page1.1"
 # Multiple uninstall should work, too.
 $MAKE uninstall
 $MAKE uninstall
-test `find "$instdir" -type f -print | wc -l` = 0
+test $(find "$instdir" -type f -print | wc -l) -eq 0
 
 # Try whether we don't exceed the low limit.
-INSTALL='$(SHELL) $(top_builddir)/myinstall' $MAKE -e install
-env save_PATH="$PATH" PATH="`pwd`/..$PATH_SEPARATOR$PATH" $MAKE uninstall
+PATH=$nPATH; export PATH
+run_make INSTALL=my-install install
+test -f "$instdir/share/man/man1/page1.1"
+run_make INSTALL=my-install uninstall
+test $(find "$instdir" -type f -print | wc -l) -eq 0
+PATH=$oPATH; export PATH
 
 cd $subdir
 srcdir=../../$subdir
@@ -128,13 +155,13 @@ srcdir=../../$subdir
 for file in page3.1 page$nfiles.1 npage3.1 npage$nfiles.1; do
   chmod a-r $srcdir/$file
   test ! -r $srcdir/$file || skip_ "cannot drop file read permissions"
-  $MAKE install-man1 && Exit 1
+  $MAKE install-man1 && exit 1
   chmod u+r $srcdir/$file
 done
 
 for file in page3.man page$nfiles.man npage3.man npage$nfiles.man; do
   chmod a-r $srcdir/$file
-  $MAKE install-man3 && Exit 1
+  $MAKE install-man3 && exit 1
   chmod u+r $srcdir/$file
 done
 
old mode 100755 (executable)
new mode 100644 (file)
index d0c5b1a..2fa5262
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2008-2012 Free Software Foundation, Inc.
+# Copyright (C) 2008-2017 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
 
 # Installing many files should not exceed the command line length limit.
 
-# This is the python sister test of instmany.test, see there for details.
+# This is the python sister test of 'instmany.sh', see there for details.
 
 required='python'
-. ./defs || Exit 1
+. test-init.sh
 
 limit=2500
 subdir=long_subdir_name_with_many_characters
 nfiles=81
-list=`seq_ 1 $nfiles`
+list=$(seq_ 1 $nfiles)
 
-sed "s|@limit@|$limit|g" >myinstall.in <<'END'
+oPATH=$PATH; export oPATH
+nPATH=$(pwd)/x-bin$PATH_SEPARATOR$PATH; export nPATH
+
+mkdir x-bin
+
+sed "s|@limit@|$limit|g" >x-bin/my-install <<'END'
 #! /bin/sh
-# Fake install script.  This doesn't really install
-# (the INSTALL path below would be wrong outside this directory).
 limit=@limit@
-INSTALL='@INSTALL@'
-len=`expr "$INSTALL $*" : ".*" 2>/dev/null || echo $limit`
+PATH=$oPATH; export PATH
+if test -z "$orig_INSTALL"; then
+  echo "$0: \$orig_INSTALL variable not set" >&2
+  exit 1
+fi
+len=`expr "$orig_INSTALL $*" : ".*" 2>/dev/null || echo $limit`
 if test $len -ge $limit; then
   echo "$0: safe command line limit of $limit characters exceeded" >&2
   exit 1
 fi
-exit 0
+exec $orig_INSTALL "$@"
+exit 1
 END
 
 # Creative quoting in the next line to please maintainer-check.
-sed "s|@limit@|$limit|g" >'rm' <<'END'
+sed "s|@limit@|$limit|g" >x-bin/'rm' <<'END'
 #! /bin/sh
 limit=@limit@
-PATH=$save_PATH
-export PATH
+PATH=$oPATH; export PATH
 RM='rm -f'
 len=`expr "$RM $*" : ".*" 2>/dev/null || echo $limit`
 if test $len -ge $limit; then
@@ -56,11 +63,24 @@ exec $RM "$@"
 exit 1
 END
 
-chmod +x rm
+# Creative quoting in the next line to please maintainer-check.
+chmod +x x-bin/'rm' x-bin/my-install
+
+cat >setenv.in <<'END'
+orig_INSTALL='@INSTALL@'
+# In case we've falled back on the install-sh script (seen e.g.,
+# on AIX 7.1), we need to make sure we use its absolute path,
+# as we don't know from which directory we'll be run.
+case "$orig_INSTALL" in
+   /*) ;;
+  */*) orig_INSTALL=$(pwd)/$orig_INSTALL;;
+esac
+export orig_INSTALL
+END
 
 cat >>configure.ac <<END
 AM_PATH_PYTHON
-AC_CONFIG_FILES([myinstall], [chmod +x ./myinstall])
+AC_CONFIG_FILES([setenv.sh:setenv.in])
 AC_CONFIG_FILES([$subdir/Makefile])
 AC_OUTPUT
 END
@@ -91,21 +111,28 @@ $ACLOCAL
 $AUTOCONF
 $AUTOMAKE --add-missing
 
-instdir=`pwd`/inst
+instdir=$(pwd)/inst
 mkdir build
 cd build
 ../configure --prefix="$instdir"
+. ./setenv.sh
+test -n "$orig_INSTALL"
 $MAKE
 # Try whether native install (or install-sh) works.
 $MAKE install
+test -n "$(find "$instdir" -name python1.py)"
 # Multiple uninstall should work, too.
 $MAKE uninstall
 $MAKE uninstall
-test `find "$instdir" -type f -print | wc -l` = 0
+test $(find "$instdir" -type f -print | wc -l) -eq 0
 
 # Try whether we don't exceed the low limit.
-INSTALL='$(SHELL) $(top_builddir)/myinstall' $MAKE -e install
-env save_PATH="$PATH" PATH="`pwd`/..$PATH_SEPARATOR$PATH" $MAKE uninstall
+PATH=$nPATH; export PATH
+run_make INSTALL=my-install install
+test -n "$(find "$instdir" -name python1.py)"
+run_make INSTALL=my-install uninstall
+test $(find "$instdir" -type f -print | wc -l) -eq 0
+PATH=$oPATH; export PATH
 
 cd $subdir
 srcdir=../../$subdir
@@ -116,14 +143,14 @@ for file in python3.py python$nfiles.py
 do
   chmod a-r $srcdir/$file
   test ! -r $srcdir/$file || skip_ "cannot drop file read permissions"
-  $MAKE install && Exit 1
+  $MAKE install && exit 1
   chmod u+r $srcdir/$file
 done
 
 for file in npython3.py npython$nfiles.py
 do
   chmod a-r $srcdir/$file
-  $MAKE install && Exit 1
+  $MAKE install && exit 1
   chmod u+r $srcdir/$file
 done
 
old mode 100755 (executable)
new mode 100644 (file)
index d334ebe..6a6cacb
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2008-2012 Free Software Foundation, Inc.
+# Copyright (C) 2008-2017 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
@@ -26,7 +26,7 @@
 # For texinfos, we expand names using $(srcdir) in the first place.
 # Let's hope nobody uses many texinfos.
 
-. ./defs || Exit 1
+. test-init.sh
 
 # In order to have a useful test on modern systems (which have a high
 # limit, if any), use a fake install program that errors out for more
 limit=2500
 subdir=long_subdir_name_with_many_characters
 nfiles=81
-list=`seq_ 1 $nfiles`
+list=$(seq_ 1 $nfiles)
 
-sed "s|@limit@|$limit|g" >myinstall.in <<'END'
+oPATH=$PATH; export oPATH
+nPATH=$(pwd)/x-bin$PATH_SEPARATOR$PATH; export nPATH
+
+mkdir x-bin
+
+sed "s|@limit@|$limit|g" >x-bin/my-install <<'END'
 #! /bin/sh
-# Fake install script.  This doesn't really install
-# (the INSTALL path below would be wrong outside this directory).
 limit=@limit@
-INSTALL='@INSTALL@'
-len=`expr "$INSTALL $*" : ".*" 2>/dev/null || echo $limit`
+PATH=$oPATH; export PATH
+if test -z "$orig_INSTALL"; then
+  echo "$0: \$orig_INSTALL variable not set" >&2
+  exit 1
+fi
+len=`expr "$orig_INSTALL $*" : ".*" 2>/dev/null || echo $limit`
 if test $len -ge $limit; then
   echo "$0: safe command line limit of $limit characters exceeded" >&2
   exit 1
 fi
-exit 0
+exec $orig_INSTALL "$@"
+exit 1
 END
 
 # Creative quoting in the next line to please maintainer-check.
-sed "s|@limit@|$limit|g" >'rm' <<'END'
+sed "s|@limit@|$limit|g" >x-bin/'rm' <<'END'
 #! /bin/sh
 limit=@limit@
-PATH=$save_PATH
-export PATH
+PATH=$oPATH; export PATH
 RM='rm -f'
 len=`expr "$RM $*" : ".*" 2>/dev/null || echo $limit`
 if test $len -ge $limit; then
@@ -68,10 +75,23 @@ exec $RM "$@"
 exit 1
 END
 
-chmod +x rm
+# Creative quoting in the next line to please maintainer-check.
+chmod +x x-bin/'rm' x-bin/my-install
+
+cat >setenv.in <<'END'
+orig_INSTALL='@INSTALL@'
+# In case we've falled back on the install-sh script (seen e.g.,
+# on AIX 7.1), we need to make sure we use its absolute path,
+# as we don't know from which directory we'll be run.
+case "$orig_INSTALL" in
+   /*) ;;
+  */*) orig_INSTALL=$(pwd)/$orig_INSTALL;;
+esac
+export orig_INSTALL
+END
 
 cat >>configure.ac <<END
-AC_CONFIG_FILES([myinstall], [chmod +x ./myinstall])
+AC_CONFIG_FILES([setenv.sh:setenv.in])
 AC_CONFIG_FILES([$subdir/Makefile])
 AC_OUTPUT
 END
@@ -114,21 +134,28 @@ $ACLOCAL
 $AUTOCONF
 $AUTOMAKE --add-missing
 
-instdir=`pwd`/inst
+instdir=$(pwd)/inst
 mkdir build
 cd build
 ../configure --prefix="$instdir"
+. ./setenv.sh
+test -n "$orig_INSTALL"
 $MAKE
 # Try whether native install (or install-sh) works.
 $MAKE install
+test -f "$instdir/bin/script1"
 # Multiple uninstall should work, too.
 $MAKE uninstall
 $MAKE uninstall
-test `find "$instdir" -type f -print | wc -l` = 0
+test $(find "$instdir" -type f -print | wc -l) -eq 0
 
 # Try whether we don't exceed the low limit.
-INSTALL='$(SHELL) $(top_builddir)/myinstall' $MAKE -e install
-env save_PATH="$PATH" PATH="`pwd`/..$PATH_SEPARATOR$PATH" $MAKE uninstall
+PATH=$nPATH; export PATH
+run_make INSTALL=my-install install
+test -f "$instdir/bin/script1"
+run_make INSTALL=my-install uninstall
+test $(find "$instdir" -type f -print | wc -l) -eq 0
+PATH=$oPATH; export PATH
 
 cd $subdir
 srcdir=../../$subdir
@@ -143,42 +170,42 @@ for file in script3 script$nfiles
 do
   chmod a-r $srcdir/$file
   test ! -r $srcdir/$file || skip_ "cannot drop file read permissions"
-  $MAKE install-binSCRIPTS && Exit 1
+  $MAKE install-binSCRIPTS && exit 1
   chmod u+r $srcdir/$file
 done
 
 for file in nscript3 nscript$nfiles
 do
   chmod a-r $srcdir/$file
-  $MAKE install-nobase_binSCRIPTS && Exit 1
+  $MAKE install-nobase_binSCRIPTS && exit 1
   chmod u+r $srcdir/$file
 done
 
 for file in data3 data$nfiles
 do
   chmod a-r $srcdir/$file
-  $MAKE install-dataDATA && Exit 1
+  $MAKE install-dataDATA && exit 1
   chmod u+r $srcdir/$file
 done
 
 for file in ndata3 ndata$nfiles
 do
   chmod a-r $srcdir/$file
-  $MAKE install-nobase_dataDATA && Exit 1
+  $MAKE install-nobase_dataDATA && exit 1
   chmod u+r $srcdir/$file
 done
 
 for file in header3.h header$nfiles.h
 do
   chmod a-r $srcdir/$file
-  $MAKE install-includeHEADERS && Exit 1
+  $MAKE install-includeHEADERS && exit 1
   chmod u+r $srcdir/$file
 done
 
 for file in nheader3.h nheader$nfiles.h
 do
   chmod a-r $srcdir/$file
-  $MAKE install-nobase_includeHEADERS && Exit 1
+  $MAKE install-nobase_includeHEADERS && exit 1
   chmod u+r $srcdir/$file
 done
 
diff --git a/t/instsh2-w.sh b/t/instsh2-w.sh
deleted file mode 100755 (executable)
index a0abf8e..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-#! /bin/sh
-# This file has been automatically generated.  DO NOT EDIT BY HAND!
-. ./defs-static || exit '99';
-am_test_prefer_config_shell=yes
-# 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/t/instsh2.sh"; then
-    echo "$0: will source $dir/t/instsh2.sh"
-    . "$dir/t/instsh2.sh"; exit "$?"
-  fi
-done
-echo "$0: cannot find wrapped test 't/instsh2.sh'" >&2
-exit '99'
old mode 100755 (executable)
new mode 100644 (file)
index cbe0fdf..fa07163
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2010-2012 Free Software Foundation, Inc.
+# Copyright (C) 2010-2017 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
@@ -19,7 +19,7 @@
 # Original report from James Amundson about file names with spaces.
 # Other characters added by Paul Eggert.
 
-. ./defs || Exit 99
+. test-init.sh
 
 # Usage: is_in_list ITEM [LIST...]
 is_in_list ()
@@ -219,8 +219,8 @@ if test $# -gt 0; then
     esac
   done
   # We need to determine the TAP plan adaptively.
-  n=`for t in $test_names_list; do echo $t; done | wc -l`
-  plan_ `expr $n '*' 2` # Two tests per "problematic string".
+  n=$(for t in $test_names_list; do echo $t; done | wc -l)
+  plan_ $(($n * 2)) # Two tests per "problematic string".
   unset n
 else
   test_names_list=$all_test_names_list
@@ -228,7 +228,7 @@ else
   plan_ 94
 fi
 
-ocwd=`pwd` || fatal_ "cannot get current working directory"
+ocwd=$(pwd) || fatal_ "getting current working directory"
 
 create_input_data
 
@@ -285,7 +285,13 @@ for test_name in $test_names_list; do
         ;;
       dest)
         build=build-$test_name
-        dest=$ocwd/$test_string
+        # Also use $test_name in the definition of $dest, to avoid
+        # interferences among different tests in case $test_string
+        # is strangely munged (which is not unexpected, considering
+        # how tricky its characters are).  With some shells, this
+        # has already happened (at least on OpenIndiana 11 and on
+        # Solaris 10).
+        dest=$ocwd/dest-$test_name/$test_string
         mkdir "$build" || fatal_ "cannot create '$build'"
         ;;
       *)
@@ -302,7 +308,7 @@ for test_name in $test_names_list; do
     r=ok
     ../configure --prefix "/$test_string-prefix" \
       && $MAKE all \
-      && DESTDIR="$dest" file="./$test_string" $MAKE -e test-inst \
+      && DESTDIR="$dest" file="./$test_string" $MAKE test-inst \
       || r='not ok'
 
     description="$test_name in ${where}dir"
@@ -324,10 +330,10 @@ for test_name in $test_names_list; do
     # the test directory not to be removed when the script terminates.
     if not am_keeping_testdirs && test "$r" = ok; then
       rm_rf_ "$build" "$dest" || fatal_ "removing temporary subdirectory"
-    else
-      : For lesser shells with broken 'set -e'.
     fi
 
+    : For shells with busted 'set -e'.
+
   done # $instspc_action
 
 done # $test_name
old mode 100755 (executable)
new mode 100644 (file)
index b45d449..1af6f46
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 1996-2012 Free Software Foundation, Inc.
+# Copyright (C) 1996-2017 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
@@ -16,7 +16,7 @@
 
 # Test to make sure variable interpolation works.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_CC
old mode 100755 (executable)
new mode 100644 (file)
index 3ce33e2..94d84e0
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 1996-2012 Free Software Foundation, Inc.
+# Copyright (C) 1996-2017 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
@@ -17,7 +17,7 @@
 # Test to make sure variable interpolation doesn't break other
 # features.  Report from Joel N. Weber, II.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_CC
old mode 100755 (executable)
new mode 100644 (file)
index 230fb96..83c93a9
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2011-2012 Free Software Foundation, Inc.
+# Copyright (C) 2011-2017 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
@@ -19,7 +19,7 @@
 # See automake bug#8234.
 
 required=javac
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_OUTPUT
@@ -41,12 +41,12 @@ $ACLOCAL
 $AUTOCONF
 $AUTOMAKE
 
-inst=`pwd`/_inst
+inst=$(pwd)/_inst
 
 ./configure --prefix="$inst"
 
 $MAKE
-ls | $EGREP '\.(class|stamp)$' && Exit 1
+ls | $EGREP '\.(class|stamp)$' && exit 1
 
 # Make Two.java compilable.
 echo '}' >> Two.java
@@ -57,8 +57,8 @@ ls -l # For debugging.
 test -f One.class
 test -f Two.class
 # ... but should *not* install them.
-$FGREP checkdir Makefile && Exit 1
+$FGREP checkdir Makefile && exit 1
 $MAKE install
-test -d _inst && Exit 1
+test -d _inst && exit 1
 
 :
old mode 100755 (executable)
new mode 100644 (file)
index 2399201..eaa5451
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 1998-2012 Free Software Foundation, Inc.
+# Copyright (C) 1998-2017 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
@@ -17,7 +17,7 @@
 # Test cleaning of Java class files and timestamps.
 
 required=javac
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac <<'END'
 AC_OUTPUT
@@ -55,7 +55,7 @@ for base in '' Nobase; do
   done
 done
 $MAKE clean
-find . -name '*.class' -o -name '*.stamp' | grep . && Exit 1
+find . -name '*.class' -o -name '*.stamp' | grep . && exit 1
 # We should not remove unrelated stamp files.
 echo timestamp > classjava2.stamp
 echo timestamp > classdist_java.stamp
old mode 100755 (executable)
new mode 100644 (file)
index f3340ff..8b5416d
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2011-2012 Free Software Foundation, Inc.
+# Copyright (C) 2011-2017 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
@@ -17,7 +17,7 @@
 # Test on compilation and installation of Java class files.
 
 required=javac
-. ./defs || Exit 1
+. test-init.sh
 
 cat >>configure.ac <<'EOF'
 AC_OUTPUT
@@ -87,7 +87,7 @@ $ACLOCAL
 $AUTOCONF
 $AUTOMAKE
 
-./configure --prefix="`pwd`"/_inst
+./configure --prefix="$(pwd)"/_inst
 $MAKE
 $MAKE test
 $MAKE install
old mode 100755 (executable)
new mode 100644 (file)
index 9f3c184..4a7099a
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2011-2012 Free Software Foundation, Inc.
+# Copyright (C) 2011-2017 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
 # "UNIX-style" use case.
 # This test uses a "flat" setup for the source tree (i.e., everything in
 # the top-level directory), and forces the use of the old, non-parallel
-# testsuite driver.  The sister test 'java-compile-run-nested.test' do
-# similar checks with a more usual, "nested" setup, and using the newer
-# 'parallel-tests' driver.
+# testsuite driver.  The sister test 'java-compile-run-nested.sh' do
+# similar checks with a more usual, "nested" setup, and using the older
+# 'serial-tests' driver.
 
 required='java javac'
 am_serial_tests=yes
-. ./defs || Exit 1
+. test-init.sh
 
 echo "AC_SUBST([PATH_SEPARATOR], ['$PATH_SEPARATOR'])" >> configure.ac
 
@@ -230,7 +230,7 @@ $AUTOMAKE
 # To have the parallel testsuite more verbose.
 VERBOSE=yes; export VERBOSE
 
-./configure --prefix="`pwd`/_inst"
+./configure --prefix="$(pwd)/_inst"
 cat PkgLocation.java # For debugging.
 $MAKE check
 $MAKE install
old mode 100755 (executable)
new mode 100644 (file)
index 61727f7..20e3f87
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2011-2012 Free Software Foundation, Inc.
+# Copyright (C) 2011-2017 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
 # Also meddle with wrapper scripts, as would be probably seen in a real
 # "UNIX-style" use case.
 # This test uses a typical "nested" source tree setup (i.e., different
-# components/aspects are separated into different subdirectories),
-# and uses the 'parallel-tests' testsuite driver.  The sister test
-# 'java-compile-run-flat.test' do similar checks with a "flat" setup
-# (i.e., everything in the top-level directory), and forcing the use
-# of the older non-parallel 'simple-tests' driver.
+# components/aspects are separated into different subdirectories), and
+# uses the parallel testsuite driver.
+# The sister test 'java-compile-run-flat.sh' do similar checks with
+# a "flat" setup (i.e., everything in the top-level directory), and
+# forcing the use of the older 'serial-tests' driver.
 
 required='java javac'
-. ./defs || Exit 1
+. test-init.sh
 
 echo "AC_SUBST([PATH_SEPARATOR], ['$PATH_SEPARATOR'])" >> configure.ac
 
@@ -239,7 +239,7 @@ $AUTOMAKE -a
 # To have the parallel testsuite more verbose.
 VERBOSE=yes; export VERBOSE
 
-./configure --prefix="`pwd`/_inst"
+./configure --prefix="$(pwd)/_inst"
 cat jprog/PkgLocation.java # For debugging.
 $MAKE check
 $MAKE install
old mode 100755 (executable)
new mode 100644 (file)
index 9ec48b2..a213eaa
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2011-2012 Free Software Foundation, Inc.
+# Copyright (C) 2011-2017 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
@@ -18,7 +18,7 @@
 # compilation time.  See automake bug#9306.
 
 required=javac
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac <<'END'
 AC_CONFIG_SRCDIR([org/gnu/bug/Library.java])
@@ -74,7 +74,7 @@ $AUTOCONF
 $AUTOMAKE
 ./configure
 
-unset CLASSPATH || :
+unset CLASSPATH
 $MAKE
 $MAKE clean
 
@@ -82,7 +82,7 @@ CLASSPATH=''; export CLASSPATH
 $MAKE
 $MAKE clean
 
-unset CLASSPATH || :
+unset CLASSPATH
 $MAKE distcheck
 
 :
old mode 100755 (executable)
new mode 100644 (file)
index f2fc76d..a749dd8
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2011-2012 Free Software Foundation, Inc.
+# Copyright (C) 2011-2017 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
@@ -20,7 +20,7 @@
 # conditionals).
 
 required=javac
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AM_CONDITIONAL([COND], [test x"$cond" = x"yes"])
@@ -57,8 +57,8 @@ $MAKE
 ls -l
 test -f Class1.class
 test -f Class2.class
-test ! -f Class3.class
-test ! -f Class3.java
+test ! -e Class3.class
+test ! -e Class3.java
 
 $MAKE distclean
 
@@ -66,7 +66,7 @@ $MAKE distclean
 $MAKE
 ls -l
 test -f Class1.class
-test ! -f Class2.class
+test ! -e Class2.class
 test -f Class3.class
 test -f Class3.java
 
old mode 100755 (executable)
new mode 100644 (file)
index 6ec9185..e3cf463
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2011-2012 Free Software Foundation, Inc.
+# Copyright (C) 2011-2017 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
@@ -19,7 +19,7 @@
 # modifiers.  Also check that '.java' files are not distributed by
 # default.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_OUTPUT
@@ -50,7 +50,7 @@ $AUTOCONF
 # Automake used to display non-fatal warnings with this test, but
 # they were unexpected, so we want to consider them as failures in
 # this test.
-$AUTOMAKE 2>stderr || { cat stderr >&2; Exit 1; }
+$AUTOMAKE 2>stderr || { cat stderr >&2; exit 1; }
 cat stderr >&2
 test ! -s stderr
 
@@ -58,11 +58,11 @@ test ! -s stderr
 
 $MAKE distdir
 ls -l $distdir # For debugging.
-test ! -f $distdir/Class.java
+test ! -e $distdir/Class.java
 test -f $distdir/ClassDist.java
-test ! -f $distdir/ClassNobase.java
+test ! -e $distdir/ClassNobase.java
 test -f $distdir/ClassNobaseDist.java
-test ! -f $distdir/ClassNodist.java
-test ! -f $distdir/ClassNobaseNodist.java
+test ! -e $distdir/ClassNodist.java
+test ! -e $distdir/ClassNobaseNodist.java
 
 :
old mode 100755 (executable)
new mode 100644 (file)
index 416fdb9..5121ae6
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2011-2012 Free Software Foundation, Inc.
+# Copyright (C) 2011-2017 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
@@ -17,7 +17,7 @@
 # Test that some Java-related variables and rules are not repeatedly
 # defined.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat > Makefile.am << 'END'
 javadir = $(datadir)/java
@@ -36,10 +36,10 @@ $EGREP -i '\.stamp|\.class|java|classpath' Makefile.in # For debugging.
 
 for var in JAVAC JAVAROOT CLASSPATH_ENV am__java_sources; do
   grep "^$var =" Makefile.in
-  test `grep -c "^[$sp$tab]*$var[$sp$tab]*=" Makefile.in` = 1
+  test $(grep -c "^[$sp$tab]*$var[$sp$tab]*=" Makefile.in) -eq 1
 done
 
 grep '^classjava\.stamp:' Makefile.in
-test `grep -c "class.*java.*\.stamp.*:" Makefile.in` = 1
+test $(grep -c "class.*java.*\.stamp.*:" Makefile.in) -eq 1
 
 :
old mode 100755 (executable)
new mode 100644 (file)
index ff72a13..1c720bf
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2011-2012 Free Software Foundation, Inc.
+# Copyright (C) 2011-2017 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
@@ -17,7 +17,7 @@
 # Test support of 'nobase_' with the 'JAVA' primary.
 
 required=javac
-. ./defs || Exit 1
+. test-init.sh
 
 cat >>configure.ac <<'END'
 AC_OUTPUT
@@ -56,7 +56,7 @@ $ACLOCAL
 $AUTOCONF
 $AUTOMAKE
 
-./configure --prefix="`pwd`"/_inst
+./configure --prefix="$(pwd)"/_inst
 $MAKE check
 $MAKE install
 $MAKE test-install
old mode 100755 (executable)
new mode 100644 (file)
index b11e6a0..911d831
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2011-2012 Free Software Foundation, Inc.
+# Copyright (C) 2011-2017 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
@@ -18,7 +18,7 @@
 # be installed.
 
 required=javac
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_OUTPUT
@@ -41,7 +41,7 @@ $ACLOCAL
 $AUTOMAKE
 $AUTOCONF
 
-./configure --prefix="`pwd`/_inst"
+./configure --prefix="$(pwd)/_inst"
 
 $MAKE
 ls -l
@@ -50,6 +50,6 @@ for i in 1 2 3 4 5 6; do
 done
 
 $MAKE install
-test -d _inst && { ls -l _inst; Exit 1; }
+test -d _inst && { ls -l _inst; exit 1; }
 
 :
old mode 100755 (executable)
new mode 100644 (file)
index 7672943..2567cf0
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2011-2012 Free Software Foundation, Inc.
+# Copyright (C) 2011-2017 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
@@ -17,7 +17,7 @@
 # Test rebuild rules for Java class files.
 
 required='javac'
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac <<'END'
 AC_OUTPUT
old mode 100755 (executable)
new mode 100644 (file)
index 2de9683..5d376bc
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2011-2012 Free Software Foundation, Inc.
+# Copyright (C) 2011-2017 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
@@ -17,7 +17,7 @@
 # Test definition of automake-generated private Makefile variable
 # '$(am__java_sources)'.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_OUTPUT
old mode 100755 (executable)
new mode 100644 (file)
index fb6bfa1..c380722
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 1998-2012 Free Software Foundation, Inc.
+# Copyright (C) 1998-2017 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
@@ -17,7 +17,7 @@
 # Check uninstallation of Java class files.
 
 required=javac
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_OUTPUT
@@ -56,16 +56,16 @@ $ACLOCAL
 $AUTOCONF
 $AUTOMAKE
 
-./configure --prefix="`pwd`"/_inst
+./configure --prefix="$(pwd)"/_inst
 javadir=_inst/java
 
 check_uninstallation()
 {
-  test ! -r $javadir/aClass.class
-  test ! -r $javadir/bClass.class
-  test ! -r $javadir/Zardoz.class
-  test ! -r $javadir/Baz.class
-  test ! -r $javadir/Baz2.class
+  test ! -e $javadir/aClass.class
+  test ! -e $javadir/bClass.class
+  test ! -e $javadir/Zardoz.class
+  test ! -e $javadir/Baz.class
+  test ! -e $javadir/Baz2.class
   test   -f $javadir/Foo.class
   test   -f $javadir/Bar.class
   test   -f $javadir/xClass.class
old mode 100755 (executable)
new mode 100644 (file)
index 16b1250..f35bed2
--- a/t/java.sh
+++ b/t/java.sh
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 1998-2012 Free Software Foundation, Inc.
+# Copyright (C) 1998-2017 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
@@ -17,7 +17,7 @@
 # Minimal test of Java functionality.
 
 required=javac
-. ./defs || Exit 1
+. test-init.sh
 
 cat >>configure.ac <<'EOF'
 AC_OUTPUT
@@ -34,19 +34,12 @@ $AUTOMAKE
 
 $EGREP '\.stamp|class' Makefile.in # For debugging.
 grep '^all[-a-z]*:.*classjava\.stamp' Makefile.in
-test `grep -c '^all[-a-z]*:.*classjava\.stamp' Makefile.in` -eq 1
+test $(grep -c '^all[-a-z]*:.*classjava\.stamp' Makefile.in) -eq 1
 
-cat >a.java <<EOF
-class a
-{
-}
-EOF
-
-cat >b.java <<EOF
-class b
-{
-}
-EOF
+echo 'class a { }' > a.java
+echo 'class b { }' > b.java
 
-./configure --prefix "`pwd`"
+./configure
 $MAKE distcheck
+
+:
old mode 100755 (executable)
new mode 100644 (file)
index c0b9f95..9c80e79
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2002-2012 Free Software Foundation, Inc.
+# Copyright (C) 2002-2017 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
@@ -18,7 +18,7 @@
 # no classes to compile.
 # Report from Braden McDaniel.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AM_CONDITIONAL(WITH_JDK, false)
old mode 100755 (executable)
new mode 100644 (file)
index 7d94635..88cca65
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2004-2012 Free Software Foundation, Inc.
+# Copyright (C) 2004-2017 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
@@ -18,7 +18,7 @@
 # *.java files when there are none.
 # Report from Johannes Nicolai (PR/441).
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AM_CONDITIONAL([WHO_CARES], [false])
@@ -42,15 +42,14 @@ $ACLOCAL
 $AUTOCONF
 $AUTOMAKE
 
-cwd=`pwd` || Exit 1
-./configure --prefix="$cwd/_inst"
+./configure --prefix="$(pwd)/_inst"
 $MAKE
 $MAKE install
 ls -l .
-find . -name '*.class' | grep . && Exit 1
+find . -name '*.class' | grep . && exit 1
 # If we have nothing to install, we shouldn't create any installation
 # directory.  Related to automake bug#11030.
-test ! -d _inst
+test ! -e _inst
 $MAKE uninstall
 $MAKE distcheck
 
old mode 100755 (executable)
new mode 100644 (file)
index e2ed7f6..af919e4
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2011-2012 Free Software Foundation, Inc.
+# Copyright (C) 2011-2017 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 *.class files).
 # See automake bug#8461.
 
-. ./defs || Exit 1
+. test-init.sh
 
 $ACLOCAL
 
 echo java_JAVA = a.java > Makefile.am
 AUTOMAKE_fails
 grep '^Makefile\.am:1:.*java_JAVA.*javadir.* undefined' stderr
-$EGREP '(uninitialized|line) ' stderr && Exit 1
+$EGREP '(uninitialized|line) ' stderr && exit 1
 
 echo javadir = a-dummy-value >> Makefile.am
 $AUTOMAKE
old mode 100755 (executable)
new mode 100644 (file)
index 364b21f..a10c3b9
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2011-2012 Free Software Foundation, Inc.
+# Copyright (C) 2011-2017 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
@@ -16,7 +16,7 @@
 
 # Check support for $(JAVACFLAGS) and $(AM_JAVACFLAGS).
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat > fake-javac <<'END'
 #!/bin/sh
@@ -24,10 +24,6 @@ echo "$*" > javaflags.list
 END
 chmod a+x fake-javac
 
-# Remove JAVAC from the environment, so that it won't interfere
-# with 'make -e' below.
-unset JAVAC || :
-
 cat >> configure.ac <<'END'
 AC_PROG_CC
 # Simulate presence of the java compiler using our fake-javac script.
@@ -44,13 +40,13 @@ END
 $ACLOCAL
 $AUTOMAKE
 
-grep '\$(JAVACFLAGS).*\$(AM_JAVACFLAGS)' Makefile.in && Exit 1
+grep '\$(JAVACFLAGS).*\$(AM_JAVACFLAGS)' Makefile.in && exit 1
 
 : > bar.java
 
 $AUTOCONF
 ./configure
-env JAVACFLAGS=__user_flags__ $MAKE -e
+run_make JAVACFLAGS=__user_flags__
 
 ls -l
 
old mode 100755 (executable)
new mode 100644 (file)
index fe55535..9397038
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 1998-2012 Free Software Foundation, Inc.
+# Copyright (C) 1998-2017 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
@@ -16,7 +16,7 @@
 
 # Test to make sure JAVA variable can be defined by AC_SUBST.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_SUBST([JAVA])
old mode 100755 (executable)
new mode 100644 (file)
index 455b8c6..5962b00
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 1998-2012 Free Software Foundation, Inc.
+# Copyright (C) 1998-2017 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
@@ -16,7 +16,7 @@
 
 # Test to make sure redefining JAVAC with AC_SUBST works.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_SUBST([JAVAC])
old mode 100755 (executable)
new mode 100644 (file)
index 8e16fb3..66e3c6c
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 1997-2012 Free Software Foundation, Inc.
+# Copyright (C) 1997-2017 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
@@ -17,7 +17,7 @@
 # Check to make sure incorrect LDADD usage is diagnosed.
 
 required=libtool
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_CC
@@ -38,7 +38,7 @@ END
 : > config.sub
 : > q.c
 
-$ACLOCAL || Exit 1
+$ACLOCAL || exit 1
 AUTOMAKE_fails -Wno-extra-portability
 grep "libtu_la_LDADD" stderr
 grep " use 'libtu_la_LIBADD'" stderr
old mode 100755 (executable)
new mode 100644 (file)
index 269af34..10a282d
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2000-2012 Free Software Foundation, Inc.
+# Copyright (C) 2000-2017 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
@@ -18,7 +18,7 @@
 # PR 77.
 
 required=libtool
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_CC
old mode 100755 (executable)
new mode 100644 (file)
index 8834a74..2c90b18
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2011-2012 Free Software Foundation, Inc.
+# Copyright (C) 2011-2017 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
 # Check that C++ source files derived from non-distributed Lex sources
 # are cleaned by "make clean", while C++ source files derived from
 # distributed Lex sources are cleaned by "make maintainer-clean".
-# See also sister test 'lex-clean.test'.
+# See also sister test 'lex-clean.sh'.
 
 required='c++ lex'
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_CXX
@@ -103,10 +103,10 @@ for target in clean distclean; do
   ls -l
   test -f parsefoo.cxx
   test -f bar-parsebar.cc
-  test ! -r parsebaz.l++
-  test ! -r parsebaz.c++
-  test ! -r parsequx.lpp
-  test ! -r qux-parsequx.cpp
+  test ! -e parsebaz.l++
+  test ! -e parsebaz.c++
+  test ! -e parsequx.lpp
+  test ! -e qux-parsequx.cpp
 done
 
 cp config.sav config.status
@@ -116,11 +116,11 @@ $MAKE maintainer-clean
 ls -l
 test -f parsefoo.lxx
 test -f parsebar.ll
-test ! -r parsefoo.cxx
-test ! -r bar-parsebar.cc
+test ! -e parsefoo.cxx
+test ! -e bar-parsebar.cc
 test -f parsefoo.lxx
 test -f parsebar.ll
-test ! -r parsefoo.cxx
-test ! -r bar-parsebar.cc
+test ! -e parsefoo.cxx
+test ! -e bar-parsebar.cc
 
 :
old mode 100755 (executable)
new mode 100644 (file)
index 18cf32e..376b323
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2011-2012 Free Software Foundation, Inc.
+# Copyright (C) 2011-2017 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
 # Check that .c files derived from non-distributed .l sources
 # are cleaned by "make clean", while .c files derived from
 # distributed .l sources are cleaned by "make maintainer-clean".
-# See also sister test 'lex-clean-cxx.test'.
+# See also sister test 'lex-clean-cxx.sh'.
 
 required='cc lex'
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_CC
@@ -97,9 +97,9 @@ for target in clean distclean; do
   test -f lexer.l
   test -f lexer.c
   test -f bar-lexer.c
-  test ! -r baz.l
-  test ! -r baz.c
-  test ! -r qux-baz.c
+  test ! -e baz.l
+  test ! -e baz.c
+  test ! -e qux-baz.c
 done
 
 cp config.sav config.status
@@ -108,7 +108,7 @@ cp config.sav config.status
 $MAKE maintainer-clean
 ls -l
 test -f lexer.l
-test ! -r lexer.c
-test ! -r bar-lexer.c
+test ! -e lexer.c
+test ! -e bar-lexer.c
 
 :
old mode 100755 (executable)
new mode 100644 (file)
index 7bdfdf9..1d303a7
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2011-2012 Free Software Foundation, Inc.
+# Copyright (C) 2011-2017 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
@@ -18,7 +18,7 @@
 # Test synthesized from PR automake/6.
 
 required='c++ lex'
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_CXX
@@ -40,9 +40,8 @@ test-deps-exist:
 
 .PHONY: test-obj-updated
 test-obj-updated: joe.$(OBJEXT) moe.$(OBJEXT)
-       stat older my-hdr.hxx joe.$(OBJEXT) moe.$(OBJEXT) || :
-       test `ls -t older joe.$(OBJEXT) | sed 1q` = joe.$(OBJEXT)
-       test `ls -t older moe.$(OBJEXT) | sed 1q` = moe.$(OBJEXT)
+       is_newest joe.$(OBJEXT) my-hdr.hxx
+       is_newest moe.$(OBJEXT) my-hdr.hxx
 END
 
 cat > joe.ll << 'END'
@@ -86,7 +85,6 @@ $AUTOCONF
 $MAKE test-deps-exist
 $MAKE
 
-: > older
 $sleep
 touch my-hdr.hxx
 $MAKE test-obj-updated
old mode 100755 (executable)
new mode 100644 (file)
index 0fe32ed..ac4c9b3
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 1999-2012 Free Software Foundation, Inc.
+# Copyright (C) 1999-2017 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
@@ -16,9 +16,9 @@
 
 # Test to make sure dependencies for Lex and C/C++ does not break
 # in obvious ways.  See PR automake/6, and related semantic tests
-# 'lex-depend.test' and 'lex-depend-cxx.test'.
+# 'lex-depend.sh' and 'lex-depend-cxx.sh'.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_CC
old mode 100755 (executable)
new mode 100644 (file)
index fce198d..587b6be
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2011-2012 Free Software Foundation, Inc.
+# Copyright (C) 2011-2017 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
@@ -18,7 +18,7 @@
 # Test suggested by PR automake/6.
 
 required='cc lex'
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_CC
@@ -38,8 +38,7 @@ test-deps-exist:
 
 .PHONY: test-obj-updated
 test-obj-updated: joe.$(OBJEXT)
-       stat older my-hdr.h joe.$(OBJEXT) || : For debugging.
-       test `ls -t older joe.$(OBJEXT) | sed 1q` = joe.$(OBJEXT)
+       is_newest joe.$(OBJEXT) my-hdr.h
 END
 
 cat > joe.l << 'END'
@@ -80,10 +79,15 @@ $AUTOCONF
 
 $MAKE test-deps-exist
 $MAKE
+cross_compiling || test "$(./zoo)" = 'Hello, World!' || exit 1
 
-: > older
 $sleep
-touch my-hdr.h
+cat >> my-hdr.h << 'END'
+#undef MESSAGE
+#define MESSAGE "Howdy, Earth!"
+END
 $MAKE test-obj-updated
+$MAKE
+cross_compiling || test "$(./zoo)" = 'Howdy, Earth!' || exit 1
 
 :
diff --git a/t/lex-header.sh b/t/lex-header.sh
new file mode 100644 (file)
index 0000000..01495dd
--- /dev/null
@@ -0,0 +1,93 @@
+#! /bin/sh
+# Copyright (C) 2011-2017 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 lex support can work with flex '--header-file' option (see
+# bugs #8844 and #9933).
+
+required='cc flex'
+. test-init.sh
+
+# Here, we need to use the use flex option '--header-file', but some
+# older flex versions don't support is (see automake bug#11524 and
+# bug#12836).  Skip this test if such an old flex version is detected.
+$LEX --help | grep '.*--header-file' \
+  || skip_ "flex doesn't support the '--header-file' option"
+
+cat >> configure.ac << 'END'
+AC_PROG_CC
+AC_PROG_LEX
+AC_OUTPUT
+END
+
+cat > Makefile.am << 'END'
+bin_PROGRAMS = foo
+foo_SOURCES = lexer.l main.c mylex.h
+foo_LFLAGS = --header-file=mylex.h
+BUILT_SOURCES = mylex.h
+# Recover from removal of header.
+mylex.h: foo-lexer.c
+       test -f $@ || rm -f foo-lexer.c
+       test -f $@ || $(MAKE) $(AM_MAKEFLAGS) foo-lexer.c
+END
+
+cat > lexer.l << 'END'
+%option noyywrap
+%{
+#define YY_NO_UNISTD_H 1
+%}
+%%
+"GOOD"   return EOF;
+.
+%%
+END
+
+cat > main.c <<'END'
+#define YY_NO_UNISTD_H 1
+#include "mylex.h"
+int main (void)
+{
+  /* We don't use a 'while' loop here (like a real lexer would do)
+     to avoid possible hangs. */
+  if (yylex () == EOF)
+    return 0;
+  else
+    return 1;
+}
+END
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE -a
+
+./configure
+
+# Program should build and run.
+$MAKE
+if ! cross_compiling; then
+  echo GOOD | ./foo
+  echo BAD | ./foo && exit 1
+  : For shells with busted 'set -e'.
+fi
+
+# Recovering from header removal.
+rm -f mylex.h
+$MAKE
+test -f mylex.h
+
+# Sanity check on distribution.
+yl_distcheck
+
+:
old mode 100755 (executable)
new mode 100644 (file)
index 21802c5..a83fbb5
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2011-2012 Free Software Foundation, Inc.
+# Copyright (C) 2011-2017 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
@@ -18,7 +18,7 @@
 # library, if that's available.
 
 required='cc lex'
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_CC
@@ -69,9 +69,9 @@ $MAKE have-lexlib || skip_ "no system-wide lex library found"
 
 # Program should build and run and distribute.
 $MAKE all
-if cross_compiling; then :; else
+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
old mode 100755 (executable)
new mode 100644 (file)
index 0320f75..e0f845b
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 1999-2012 Free Software Foundation, Inc.
+# Copyright (C) 1999-2017 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
 
 # Check that we can provide a personal 'yywrap' function in a custom
 # library.
-# See also test 'lex-lib-external.test'.
+# See also test 'lex-lib-external.sh'.
 
 required='cc lex'
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_CC
old mode 100755 (executable)
new mode 100644 (file)
index 3f4b860..631080a
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 1999-2012 Free Software Foundation, Inc.
+# Copyright (C) 1999-2017 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
@@ -18,7 +18,7 @@
 # LIBOBJ machinery.
 
 required='cc lex'
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_CC
old mode 100755 (executable)
new mode 100644 (file)
index a95faf3..3d99bc5
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2011-2012 Free Software Foundation, Inc.
+# Copyright (C) 2011-2017 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
 # Check that automake lex support ensures that lex-generated C
 # files use correct "#line" directives.  Try also with the
 # 'subdir-object' option enabled.
-# See also sister test 'yacc-line.test'.
+# See also sister test 'yacc-line.sh'.
 
 required='cc lex'
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_CONFIG_FILES([sub/Makefile])
 AC_PROG_CC
-AM_PROG_CC_C_O
 AC_PROG_LEX
 AC_OUTPUT
 END
@@ -87,7 +86,9 @@ c_outputs='zardoz.c bar-quux.c sub/foo-zardoz.c sub/dir/quux.c'
 
 $ACLOCAL
 $AUTOCONF
-$AUTOMAKE -a
+# FIXME: stop disabling the warnings in the 'unsupported' category
+# FIXME: once the 'subdir-objects' option has been mandatory.
+$AUTOMAKE -a -Wno-unsupported
 
 for vpath in : false; do
 
@@ -106,15 +107,15 @@ for vpath in : false; do
   ls -l . sub sub/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
diff --git a/t/lex-multiple.sh b/t/lex-multiple.sh
new file mode 100644 (file)
index 0000000..f05356c
--- /dev/null
@@ -0,0 +1,107 @@
+#! /bin/sh
+# Copyright (C) 2012-2017 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 we can build a program using several lexers at once
+# (assuming Flex is used).  That is a little tricky, but possible.
+# See:
+# <http://lists.gnu.org/archive/html/automake/2010-10/msg00081.html>
+# <http://lists.gnu.org/archive/html/automake/2009-03/msg00061.html>
+
+required='cc flex'
+. test-init.sh
+
+cat >> configure.ac << 'END'
+AC_PROG_CC
+AC_PROG_LEX
+AM_PROG_AR
+AC_PROG_RANLIB
+AC_OUTPUT
+END
+
+cat > Makefile.am << 'END'
+bin_PROGRAMS = zardoz
+
+zardoz_SOURCES = main.c
+# Convenience libraries.
+noinst_LIBRARIES = liblex.a liblex-foo.a liblex-bar.a
+zardoz_LDADD = $(noinst_LIBRARIES)
+
+liblex_a_SOURCES = 0.l
+
+# We need the output to always be named 'lex.yy.c', in order for
+# ylwrap to pick it up.
+liblex_foo_a_LFLAGS = -Pfoo -olex.yy.c
+liblex_foo_a_SOURCES = a.l
+
+# Ditto.
+liblex_bar_a_LFLAGS = -Pbar_ -olex.yy.c
+liblex_bar_a_SOURCES = b.l
+END
+
+cat > main.c << 'END'
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+int main (int argc, char *argv[])
+{
+  if (argc != 2)
+    abort ();
+  else if (!strcmp(argv[1], "--vanilla"))
+    return (yylex () != 121);
+  else if (!strcmp(argv[1], "--foo"))
+    return (foolex () != 121);
+  else if (!strcmp(argv[1], "--bar"))
+    return (bar_lex () != 121);
+  else
+    abort ();
+}
+END
+
+cat > 0.l << 'END'
+%{
+#define YY_NO_UNISTD_H 1
+%}
+%%
+"VANILLA" { printf (":%s:\n", yytext); return 121; }
+. { printf (":%s:\n", yytext); return 1; }
+%%
+/* Avoid possible link errors. */
+int yywrap (void) { return 1; }
+END
+
+sed 's/VANILLA/FOO/' 0.l > a.l
+sed 's/VANILLA/BAR/' 0.l > b.l
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE --add-missing
+
+./configure
+$MAKE
+
+if ! cross_compiling; then
+  echo VANILLA | ./zardoz --vanilla
+  echo FOO | ./zardoz --foo
+  echo BAR | ./zardoz --bar
+  ./zardoz --vanilla </dev/null && exit 1
+  echo BAR | ./zardoz --foo && exit 1
+  : For shells with busted 'set -e'.
+fi
+
+yl_distcheck
+
+:
old mode 100755 (executable)
new mode 100644 (file)
index 2e90032..7ad6b42
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2011-2012 Free Software Foundation, Inc.
+# Copyright (C) 2011-2017 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 # Checks for .c files derived from non-distributed .l sources.
-# The test 'lex-pr204.test' does similar check with AM_MAINTAINER_MODE
+# The test 'lex-pr204.sh' does similar check with AM_MAINTAINER_MODE
 # enabled.
-# The tests 'yacc-nodist.test' and 'yacc-pr204.test' does similar checks
+# The tests 'yacc-nodist.sh' and 'yacc-pr204.sh' does similar checks
 # for yacc-generated .c and .h files.
 
 required='cc lex'
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_CC
-dnl Sister test 'lex-pr204.test' should use 'AC_PROG_LEX' instead.
+dnl Sister test 'lex-pr204.sh' should use 'AC_PROG_LEX' instead.
 AM_PROG_LEX
 AC_OUTPUT
 END
old mode 100755 (executable)
new mode 100644 (file)
index 1c4a13b..c928738
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 1999-2012 Free Software Foundation, Inc.
+# Copyright (C) 1999-2017 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
@@ -17,7 +17,7 @@
 # Check Lex support with flex using the '%noyywrap' option.
 
 required='cc flex'
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_CC
@@ -63,13 +63,14 @@ $AUTOMAKE -a
 
 # Program should build and run.
 $MAKE
-if cross_compiling; then :; else
+if ! cross_compiling; then
   echo GOOD | ./foo
-  echo BAD | ./foo && Exit 1
+  echo BAD | ./foo && exit 1
   : For shells with busted 'set -e'.
 fi
 
-# Sanity check on distribution.
-yl_distcheck DISTCHECK_CONFIGURE_FLAGS='LEXLIB="none needed"'
+# Sanity check on distribution.  Escape in LEXLIB must use backspace,
+# not double-quotes, to avoid a spurious failure with AIX make.
+yl_distcheck DISTCHECK_CONFIGURE_FLAGS='LEXLIB=none\ needed'
 
 :
old mode 100755 (executable)
new mode 100644 (file)
index 3ebb572..c873a11
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2011-2012 Free Software Foundation, Inc.
+# Copyright (C) 2011-2017 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
 
 # Related to PR 204.
 # C sources derived from nodist_ lex sources should not be distributed.
-# See also related test 'lex-nodist.test'.
-# The tests 'yacc-nodist.test' and 'yacc-pr204.test' does similar checks
+# See also related test 'lex-nodist.sh'.
+# The tests 'yacc-nodist.sh' and 'yacc-pr204.sh' does similar checks
 # for yacc-generated .c and .h files.
 
 required='cc lex'
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac <<'EOF'
 AM_MAINTAINER_MODE
 AC_PROG_CC
 dnl We use AC_PROG_LEX deliberately.
-dnl Sister 'lex-nodist.test' should use 'AM_PROG_LEX' instead.
+dnl Sister 'lex-nodist.sh' should use 'AM_PROG_LEX' instead.
 AC_PROG_LEX
 AC_OUTPUT
 EOF
@@ -82,8 +82,7 @@ $sleep
 touch lexer.l lexer2.l
 $sleep
 $MAKE lexer.c lexer2.c
-stat lexer.c lexer.l lexer2.c lexer2.l || : # For debugging.
-test `ls -t lexer.c lexer.l | sed 1q` = lexer.c
-test `ls -t lexer2.c lexer2.l | sed 1q` = lexer2.c
+is_newest lexer.c lexer.l
+is_newest lexer2.c lexer2.l
 
 :
old mode 100755 (executable)
new mode 100644 (file)
index 44c9776..d6900bb
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2011-2012 Free Software Foundation, Inc.
+# Copyright (C) 2011-2017 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
 # are used, even when dependency tracking is disabled.
 
 required='cc lex'
-. ./defs || Exit 1
+. test-init.sh
 
 cat >>configure.ac <<\END
 AC_PROG_CC
-AM_PROG_CC_C_O
 AC_PROG_LEX
 AC_OUTPUT
 END
old mode 100755 (executable)
new mode 100644 (file)
index d3d256a..6f63e24
--- a/t/lex.sh
+++ b/t/lex.sh
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 1996-2012 Free Software Foundation, Inc.
+# Copyright (C) 1996-2017 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
@@ -14,7 +14,7 @@
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_CC
@@ -35,6 +35,6 @@ $FGREP '$(LEX)' Makefile.in
 
 # Test to make sure that lex source generates correct clean rule.
 # From Ralf Corsepius.
-$FGREP joel Makefile.in && Exit 1
+$FGREP joel Makefile.in && exit 1
 
 :
old mode 100755 (executable)
new mode 100644 (file)
index 4b20d14..1d72ccd
--- a/t/lex2.sh
+++ b/t/lex2.sh
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 1996-2012 Free Software Foundation, Inc.
+# Copyright (C) 1996-2017 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
@@ -16,7 +16,7 @@
 
 # Make sure that Automake suggest using AM_PROG_LEX when a lexer is used.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_CC
old mode 100755 (executable)
new mode 100644 (file)
index 125152b..b737eae
--- a/t/lex3.sh
+++ b/t/lex3.sh
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 1999-2012 Free Software Foundation, Inc.
+# Copyright (C) 1999-2017 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
@@ -19,7 +19,7 @@
 # From Matthew D. Langston.
 
 required='cc lex'
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_CC
@@ -66,9 +66,9 @@ $AUTOMAKE -a
 
 # Program should build and run.
 $MAKE
-if cross_compiling; then :; else
+if ! cross_compiling; then
   echo GOOD | ./foo
-  echo BAD | ./foo && Exit 1
+  echo BAD | ./foo && exit 1
   : For shells with busted 'set -e'.
 fi
 
@@ -86,6 +86,6 @@ $MAKE distclean
 test -f foo.c
 ./configure # Re-create 'Makefile'.
 $MAKE maintainer-clean
-test ! -f foo.c
+test ! -e foo.c
 
 :
old mode 100755 (executable)
new mode 100644 (file)
index 4b0663d..ac35f7e
--- a/t/lex5.sh
+++ b/t/lex5.sh
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2002-2012 Free Software Foundation, Inc.
+# Copyright (C) 2002-2017 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
 # Test for subdir lexers.
 
 required='cc lex'
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_CC
-AM_PROG_CC_C_O
 AM_PROG_LEX
 AC_OUTPUT
 END
old mode 100755 (executable)
new mode 100644 (file)
index 717be0e..20b5058
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2010-2012 Free Software Foundation, Inc.
+# Copyright (C) 2010-2017 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
@@ -15,9 +15,9 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 # Test to make sure Lex + C++ is supported.
-# Please keep this is sync with sister test yaccpp.test.
+# Please keep this is sync with sister test 'yaccpp.sh'.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_CXX
old mode 100755 (executable)
new mode 100644 (file)
index c731692..23f884d
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2010-2012 Free Software Foundation, Inc.
+# Copyright (C) 2010-2017 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
 # 'make' and 'make distdir' and check whether the version of 'lexer.c'
 # to be distributed is up to date.
 
-# Please keep this in sync with sister test 'yaccvapth.test'.
+# Please keep this in sync with sister test 'yaccvapth.sh'.
 
 required='cc lex'
-. ./defs || Exit 1
+. test-init.sh
 
 cat > lexoutroot.in << 'END'
 LEX_OUTPUT_ROOT='@LEX_OUTPUT_ROOT@'
old mode 100755 (executable)
new mode 100644 (file)
similarity index 76%
rename from t/lflags2.sh
rename to t/lflags-cxx.sh
index 57b7b67..9a22584
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2010-2012 Free Software Foundation, Inc.
+# Copyright (C) 2010-2017 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 # Check that $(LFLAGS) takes precedence over both $(AM_LFLAGS) and
-# $(foo_LFLAGS).
-# Please keep this in sync with the sister tests lflags.test, yflags.test
-# and yflags2.test.
+# $(foo_LFLAGS).  This is the C++ case.
+# Please keep this in sync with the sister tests:
+#  - lflags.sh
+#  - yflags.sh
+#  - yflags-cxx.sh
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat >fake-lex <<'END'
 #!/bin/sh
@@ -28,10 +30,6 @@ echo 'extern int dummy;' >> lex.yy.c
 END
 chmod a+x fake-lex
 
-# Remove Lex from the environment, so that it won't interfere
-# with 'make -e' below.
-unset LEX || :
-
 cat >> configure.ac <<'END'
 AC_SUBST([CXX], [false])
 # Simulate presence of Lex using our fake-lex script.
@@ -53,15 +51,15 @@ END
 $ACLOCAL
 $AUTOMAKE -a
 
-grep '\$(LFLAGS).*\$(bar_LFLAGS)' Makefile.in && Exit 1
-grep '\$(LFLAGS).*\$(AM_LFLAGS)' Makefile.in && Exit 1
+grep '\$(LFLAGS).*\$(bar_LFLAGS)' Makefile.in && exit 1
+grep '\$(LFLAGS).*\$(AM_LFLAGS)' Makefile.in && exit 1
 
 : > foo.ll
 : > bar.l++
 
 $AUTOCONF
 ./configure
-env LFLAGS=__user_flags__ $MAKE -e foo.cc bar-bar.c++
+run_make LFLAGS=__user_flags__ foo.cc bar-bar.c++
 
 cat foo.cc
 cat bar-bar.c++
old mode 100755 (executable)
new mode 100644 (file)
index bb939a7..ebbc8e7
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2010-2012 Free Software Foundation, Inc.
+# Copyright (C) 2010-2017 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
 
 # Check that $(LFLAGS) takes precedence over both $(AM_LFLAGS) and
 # $(foo_LFLAGS).
-# Please keep this in sync with the sister tests lflags2.test, yflags.test
-# and yflags2.test.
+# Please keep this in sync with the sister tests:
+#  - lflags-cxx.sh
+#  - yflags.sh
+#  - yflags-cxx.sh
 
 required=cc
-. ./defs || Exit 1
+. test-init.sh
 
 cat >fake-lex <<'END'
 #!/bin/sh
@@ -29,10 +31,6 @@ echo 'extern int dummy;' >> lex.yy.c
 END
 chmod a+x fake-lex
 
-# Remove Lex from the environment, so that it won't interfere
-# with 'make -e' below.
-unset LEX || :
-
 cat >> configure.ac <<'END'
 AC_SUBST([CC], [false])
 # Simulate presence of Lex using our fake-lex script.
@@ -54,15 +52,15 @@ END
 $ACLOCAL
 $AUTOMAKE -a
 
-grep '\$(LFLAGS).*\$(bar_LFLAGS)' Makefile.in && Exit 1
-grep '\$(LFLAGS).*\$(AM_LFLAGS)' Makefile.in && Exit 1
+grep '\$(LFLAGS).*\$(bar_LFLAGS)' Makefile.in && exit 1
+grep '\$(LFLAGS).*\$(AM_LFLAGS)' Makefile.in && exit 1
 
 : > foo.l
 : > bar.l
 
 $AUTOCONF
 ./configure
-env LFLAGS=__user_flags__ $MAKE -e foo.c bar-bar.c
+run_make LFLAGS=__user_flags__ foo.c bar-bar.c
 
 cat foo.c
 cat bar-bar.c
old mode 100755 (executable)
new mode 100644 (file)
index 24a934d..715a3ce
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2006-2012 Free Software Foundation, Inc.
+# Copyright (C) 2006-2017 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
@@ -16,7 +16,7 @@
 
 # PROGRAMS and LIBRARIES can be installed in (pkg)libexecdir.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat > Makefile.am << 'END'
 libexec_PROGRAMS = foo
old mode 100755 (executable)
new mode 100644 (file)
index 1165f1e..76a836a
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2010-2012 Free Software Foundation, Inc.
+# Copyright (C) 2010-2017 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
@@ -17,7 +17,7 @@
 # Make sure AC_LIBSOURCE and AC_LIBSOURCES work.
 
 required=cc
-. ./defs || Exit 1
+. test-init.sh
 
 mv configure.ac configure.proto
 cat >> configure.proto << 'END'
old mode 100755 (executable)
new mode 100644 (file)
index f19de74..efccca1
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 1999-2012 Free Software Foundation, Inc.
+# Copyright (C) 1999-2017 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
@@ -18,7 +18,7 @@
 # it's in BUILT_SOURCES.  Reported by Erez Zadok.
 
 required=cc
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_CC
old mode 100755 (executable)
new mode 100644 (file)
index c3c0057..e124b6c
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2002-2012 Free Software Foundation, Inc.
+# Copyright (C) 2002-2017 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
@@ -15,9 +15,9 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 # Test if a file can be mentioned in LIBOBJS and explicitly.
-# (See libobj13.test for the LTLIBRARIES check.)
+# (See libobj13.sh for the LTLIBRARIES check.)
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_CC
old mode 100755 (executable)
new mode 100644 (file)
index ef63d8b..4e4a4e8
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2002-2012 Free Software Foundation, Inc.
+# Copyright (C) 2002-2017 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 # Test if a file can be mentioned in LTLIBOBJS and explicitly.
-# (Like libobj12.test, but for Libtool libraries.)
+# (Like libobj12.sh, but for Libtool libraries.)
 
 required='libtoolize'
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_CC
old mode 100755 (executable)
new mode 100644 (file)
index 50554de..c02e9e0
@@ -1,5 +1,5 @@
 #!/bin/sh
-# Copyright (C) 2004-2012 Free Software Foundation, Inc.
+# Copyright (C) 2004-2017 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
@@ -19,7 +19,7 @@
 # that uses it.
 # Report from Bill Davidson.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat >>configure.ac <<'EOF'
 AC_PROG_CC
old mode 100755 (executable)
new mode 100644 (file)
index d306b71..a38d76e
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2010-2012 Free Software Foundation, Inc.
+# Copyright (C) 2010-2017 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
@@ -16,7 +16,7 @@
 
 # Nonexistent sources for AC_LIBOBJ should cause an Automake failure.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_CC
old mode 100755 (executable)
new mode 100644 (file)
index f0466fd..ed35da7
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2010-2012 Free Software Foundation, Inc.
+# Copyright (C) 2010-2017 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
@@ -16,7 +16,7 @@
 
 # Nonexistent source for AC_LIBSOURCE should cause Automake to fail.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_CC
old mode 100755 (executable)
new mode 100644 (file)
index 8fe521d..70388a3
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2010-2012 Free Software Foundation, Inc.
+# Copyright (C) 2010-2017 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
@@ -16,7 +16,7 @@
 
 # Nonexistent sources for AC_LIBSOURCES should cause Automake to fail.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_CC
@@ -45,6 +45,6 @@ grep 'configure\.ac:.*required file.*bazquux\.c.*' stderr
 : > foobar.c
 AUTOMAKE_fails
 grep 'configure\.ac:.*required file.*bazquux\.c.*' stderr
-grep 'foobar\.c' stderr && Exit 1
+grep 'foobar\.c' stderr && exit 1
 
 :
old mode 100755 (executable)
new mode 100644 (file)
index 2e1da26..82ecb93
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2010-2012 Free Software Foundation, Inc.
+# Copyright (C) 2010-2017 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 # Make sure AC_LIBOBJ and friends work.
-# Please keep this in sync with sister test 'libobj16b.test'.
+# Please keep this in sync with sister test 'libobj16b.sh'.
 
 required=cc
-. ./defs || Exit 1
+. test-init.sh
 
 mv configure.ac configure.proto
 cat >> configure.proto << 'END'
old mode 100755 (executable)
new mode 100644 (file)
index 110ba19..a020200
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2010-2012 Free Software Foundation, Inc.
+# Copyright (C) 2010-2017 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 # Make sure AC_LIBOBJ and friends work.
-# Please keep this in sync with sister test 'libobj16a.test'.
+# Please keep this in sync with sister test 'libobj16a.sh'.
 
 required=cc
-. ./defs || Exit 1
+. test-init.sh
 
 mv configure.ac configure.proto
 cat >> configure.proto << 'END'
old mode 100755 (executable)
new mode 100644 (file)
index 6c54a28..769c99b
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2010-2012 Free Software Foundation, Inc.
+# Copyright (C) 2010-2017 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
@@ -17,7 +17,7 @@
 # Make sure AC_LIBOBJ accept non-literal arguments.
 
 required=cc
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_CC
old mode 100755 (executable)
new mode 100644 (file)
index 0ac7438..275f403
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2010-2012 Free Software Foundation, Inc.
+# Copyright (C) 2010-2017 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
@@ -16,7 +16,7 @@
 
 # Make sure AC_LIBSOURCE and AC_LIBSOURCES use arguments literally.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_CC
old mode 100755 (executable)
new mode 100644 (file)
index 4d9e283..0b679fa
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2010-2012 Free Software Foundation, Inc.
+# Copyright (C) 2010-2017 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
 # Test support for AC_CONFIG_LIBOBJ_DIR.
 
 required=cc
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_CONFIG_LIBOBJ_DIR([libobj-dir])
 AC_PROG_CC
-AM_PROG_CC_C_O
 AM_PROG_AR
 AC_PROG_RANLIB
 AC_LIBOBJ([foobar])
@@ -55,7 +54,6 @@ extern int dummy;
 END
 
 cp "$am_scriptdir/ar-lib" . || fatal_ "fetching auxiliary script 'ar-lib'"
-cp "$am_scriptdir/compile" . || fatal_ "fetching auxiliary script 'compile'"
 
 $ACLOCAL
 $AUTOCONF
old mode 100755 (executable)
new mode 100644 (file)
index ce655c2..3c73688
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 1996-2012 Free Software Foundation, Inc.
+# Copyright (C) 1996-2017 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
@@ -18,7 +18,7 @@
 # Bug from Josh MacDonald.
 
 required=cc
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_CONFIG_FILES([subdir/Makefile])
old mode 100755 (executable)
new mode 100644 (file)
index d56be31..39428ea
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2010-2012 Free Software Foundation, Inc.
+# Copyright (C) 2010-2017 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
@@ -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 'libobj20b.test' and 'libobj20c.test' .
+# See also sister tests 'libobj20b.sh' and 'libobj20c.sh'.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_CONFIG_LIBOBJ_DIR([libobj-dir])
old mode 100755 (executable)
new mode 100644 (file)
index f8ca600..2a28df4
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2010-2012 Free Software Foundation, Inc.
+# Copyright (C) 2010-2017 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
@@ -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 tests 'libobj20a.sh' and 'libobj20c.sh'.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_CONFIG_LIBOBJ_DIR([libobj-dir])
old mode 100755 (executable)
new mode 100644 (file)
index 7ae51bf..323aecf
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2010-2012 Free Software Foundation, Inc.
+# Copyright (C) 2010-2017 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
@@ -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 tests 'libobj20a.sh' and 'libobj20b.sh'.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_CONFIG_LIBOBJ_DIR([libobj-dir])
old mode 100755 (executable)
new mode 100644 (file)
index 37ec6bf..d92a4f1
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 1996-2012 Free Software Foundation, Inc.
+# Copyright (C) 1996-2017 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
@@ -17,7 +17,7 @@
 # Make sure we complain if @LIBOBJS@ is used without being set in
 # configure.ac.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_RANLIB
old mode 100755 (executable)
new mode 100644 (file)
index 68711af..8a5b8f5
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 1996-2012 Free Software Foundation, Inc.
+# Copyright (C) 1996-2017 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
@@ -17,7 +17,7 @@
 # Test to make sure LIBOBJS error only occurs if LIBOBJS seen.  Report
 # from Jim Meyering.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat > Makefile.am << 'END'
 bin_PROGRAMS = foo
old mode 100755 (executable)
new mode 100644 (file)
index 036ae56..1e97502
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 1996-2012 Free Software Foundation, Inc.
+# Copyright (C) 1996-2017 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
@@ -17,7 +17,7 @@
 # Test to make sure AC_REPLACE_FUNCS works across lines.  Report from
 # Jim Meyering.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat > Makefile.am << 'END'
 bin_PROGRAMS = joe
old mode 100755 (executable)
new mode 100644 (file)
index 46f0f98..b2eaa38
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 1997-2012 Free Software Foundation, Inc.
+# Copyright (C) 1997-2017 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
@@ -17,7 +17,7 @@
 # Test for multiple replacement functions.
 
 required=cc
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_CC
old mode 100755 (executable)
new mode 100644 (file)
index 1bf34de..454f66b
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 1998-2012 Free Software Foundation, Inc.
+# Copyright (C) 1998-2017 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
@@ -16,7 +16,7 @@
 
 # Test for _DEPENDENCIES with libraries.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_RANLIB
old mode 100755 (executable)
new mode 100644 (file)
index dfa8758..5685235
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2002-2012 Free Software Foundation, Inc.
+# Copyright (C) 2002-2017 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
@@ -16,7 +16,7 @@
 
 # Make sure Automake suggest using AC_PROG_RANLIB when *_LIBRARIES is used.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_CC
old mode 100755 (executable)
new mode 100644 (file)
index 27a2b15..069bfca
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2002-2012 Free Software Foundation, Inc.
+# Copyright (C) 2002-2017 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
@@ -16,7 +16,7 @@
 
 # Make sure Automake simplify conditions in diagnostics.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat >>configure.ac <<EOF
 AC_PROG_CC
@@ -49,4 +49,6 @@ $ACLOCAL
 AUTOMAKE_fails
 grep '^Makefile.am:.*:   !A and !C and !D$' stderr
 # Is there only one missing condition?
-test `grep ':   !' stderr | wc -l` = 1 || Exit 1
+test $(grep -c ':   !' stderr) -eq 1
+
+:
old mode 100755 (executable)
new mode 100644 (file)
index 0218ef3..d756835
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2007-2012 Free Software Foundation, Inc.
+# Copyright (C) 2007-2017 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
@@ -18,7 +18,7 @@
 # Report from Guillermo Ontañón.
 
 required='cc libtoolize'
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AM_PROG_AR
@@ -53,8 +53,10 @@ $AUTOCONF
 ./configure
 $MAKE all check
 $MAKE clean
-test ! -d src/.libs
-test ! -d src/_libs
-test ! -d check/.libs
-test ! -d check/_libs
+test ! -e src/.libs
+test ! -e src/_libs
+test ! -e check/.libs
+test ! -e check/_libs
 $MAKE distcheck
+
+:
old mode 100755 (executable)
new mode 100644 (file)
index cd55cc0..a281ab9
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2008-2012 Free Software Foundation, Inc.
+# Copyright (C) 2008-2017 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
@@ -18,7 +18,7 @@
 # Report by Charles Wilson.
 
 required='cc libtoolize'
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_LIBTOOL
old mode 100755 (executable)
new mode 100644 (file)
index e5c77ac..b0507bf
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2011-2012 Free Software Foundation, Inc.
+# Copyright (C) 2011-2017 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
@@ -18,7 +18,7 @@
 # to the test cases requiring them.
 # See also automake bug#9807.
 
-. ./defs || Exit 1
+. test-init.sh
 
 echo "# Automatically generated by $me." > get.sh
 echo : >> get.sh
@@ -27,7 +27,7 @@ echo : >> get.sh
 echo ACLOCAL_AMFLAGS = -I m4 > Makefile.am
 
 if libtoolize --copy --install && test -f m4/libtool.m4; then
-  echo "ACLOCAL_PATH='`pwd`/m4':\$ACLOCAL_PATH" >> get.sh
+  echo "ACLOCAL_PATH='$(pwd)/m4':\$ACLOCAL_PATH" >> get.sh
   echo "export ACLOCAL_PATH" >> get.sh
 else
   # Libtoolize from libtool < 2.0 didn't support the '--install' option,
old mode 100755 (executable)
new mode 100644 (file)
index 7b267a7..4bc0d9a
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2001-2012 Free Software Foundation, Inc.
+# Copyright (C) 2001-2017 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
@@ -18,7 +18,7 @@
 # Report from Kevin Dalley.
 
 required=libtool
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_LIBTOOL_DLOPEN
old mode 100755 (executable)
new mode 100644 (file)
index 3b8a78b..f41316b
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2001-2012 Free Software Foundation, Inc.
+# Copyright (C) 2001-2017 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
@@ -18,7 +18,7 @@
 # Report from Eric Magnien.
 
 required=libtoolize
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_CC
old mode 100755 (executable)
new mode 100644 (file)
index dbcd519..658a2d8
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2002-2012 Free Software Foundation, Inc.
+# Copyright (C) 2002-2017 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
@@ -18,7 +18,7 @@
 # Also make sure we do not bloat the Makefile with unneeded rules.
 
 required='cc libtoolize'
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_CC
@@ -28,6 +28,10 @@ AC_OUTPUT
 END
 
 cat > Makefile.am << 'END'
+# FIXME: stop disabling the warnings in the 'unsupported' category
+# FIXME: once the 'subdir-objects' option has been mandatory.
+AUTOMAKE_OPTIONS = -Wno-unsupported
+
 lib_LTLIBRARIES = lib0.la liba/liba.la
 lib0_la_SOURCES = 0.c
 liba_liba_la_SOURCES = liba/a.c
@@ -66,7 +70,7 @@ a (void)
 END
 
 # Use --copy to workaround a bug in Cygwin's 'cp -p' during distcheck.
-# (This bug is already exhibited by subobj9.test.)  In brief: Cygwin's
+# (This bug is already exhibited by subobj9.sh.)  In brief: Cygwin's
 # 'cp -p' tries to preserve group and owner of the source and fails
 # to do so under normal accounts.  With --copy we ensure we own all files.
 
@@ -78,8 +82,8 @@ $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 '1.lo:' Makefile.in && exit 1
+$FGREP 'a.o:' Makefile.in && exit 1
 $FGREP 'a.lo:' Makefile.in
 
 ./configure
old mode 100755 (executable)
new mode 100644 (file)
index 2ce92dd..387492e
@@ -1,5 +1,5 @@
 #!/bin/sh
-# Copyright (C) 2002-2012 Free Software Foundation, Inc.
+# Copyright (C) 2002-2017 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
@@ -16,7 +16,7 @@
 
 # Make sure Automake suggests AC_PROG_LIBTOOL when *_LTLIBRARIES is used.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac <<'END'
 AC_PROG_CC
old mode 100755 (executable)
new mode 100644 (file)
index b9e778b..cc2777c
@@ -1,5 +1,5 @@
 #!/bin/sh
-# Copyright (C) 2002-2012 Free Software Foundation, Inc.
+# Copyright (C) 2002-2017 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
@@ -19,7 +19,7 @@
 # Report from Harlan Stenn.
 
 required='libtoolize'
-. ./defs || Exit 1
+. test-init.sh
 
 cat >>configure.ac <<'END'
 AM_CONDITIONAL([COND1], [true])
old mode 100755 (executable)
new mode 100644 (file)
index 13dbc73..643afed
@@ -1,5 +1,5 @@
 #!/bin/sh
-# Copyright (C) 2002-2012 Free Software Foundation, Inc.
+# Copyright (C) 2002-2017 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
@@ -18,7 +18,7 @@
 # in different directories.  PR/285.
 
 required='libtoolize'
-. ./defs || Exit 1
+. test-init.sh
 
 cat >>configure.ac <<'END'
 AM_CONDITIONAL([COND1], [true])
@@ -42,4 +42,6 @@ libtoolize
 $ACLOCAL
 $AUTOMAKE --add-missing
 # am_liba_la_rpath is defined twice, and used once
-test 3 = `grep 'am_liba_la_rpath' Makefile.in | wc -l`
+test 3 -eq $(grep -c 'am_liba_la_rpath' Makefile.in)
+
+:
old mode 100755 (executable)
new mode 100644 (file)
index bc8eaca..0dec8b9
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2003-2012 Free Software Foundation, Inc.
+# Copyright (C) 2003-2017 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
@@ -18,7 +18,7 @@
 # Also check basic support for AM_LIBTOOLFLAGS/LIBTOOLFLAGS
 
 required='cc libtoolize'
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_CC
@@ -78,31 +78,21 @@ $ACLOCAL
 $AUTOCONF
 $AUTOMAKE --add-missing --copy
 
-./configure "--prefix=`pwd`/_inst"
-env LIBTOOLFLAGS=--silent $MAKE print >output 2>&1 || {
-  cat output
-  Exit 1
-}
-cat output
+./configure "--prefix=$(pwd)/_inst"
+
+run_make -M print LIBTOOLFLAGS=--silent
 grep '1BEG: libmod1.la mod2.la :END1' output
 grep '2BEG: mod2.la :END2' output
 grep '3BEG: .*silent.*silent.* :END3' output
-test 2 -le `grep mod2_la_LIBTOOLFLAGS Makefile | wc -l`
+test 2 -le $(grep mod2_la_LIBTOOLFLAGS Makefile | wc -l)
+
 $MAKE
 
-env LIBTOOLFLAGS=--silent $MAKE install >output 2>&1 || {
-  cat output
-  Exit 1
-}
-cat output
+run_make -M install LIBTOOLFLAGS=--silent
 grep 'silent.*silent.*prg' output
 grep 'silent.*silent.*libmod1' output
 
-env LIBTOOLFLAGS=--silent $MAKE uninstall >output 2>&1 || {
-  cat output
-  Exit 1
-}
-cat output
+run_make -M uninstall LIBTOOLFLAGS=--silent
 grep 'silent.*silent.*libmod1' output
 
 :
old mode 100755 (executable)
new mode 100644 (file)
index 9182c27..5b73b43
@@ -1,5 +1,5 @@
 #!/bin/sh
-# Copyright (C) 2004-2012 Free Software Foundation, Inc.
+# Copyright (C) 2004-2017 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
@@ -17,7 +17,7 @@
 # Make sure Automake diagnoses conflicting installations.
 
 required='libtoolize'
-. ./defs || Exit 1
+. test-init.sh
 
 cat >>configure.ac <<'END'
 AM_CONDITIONAL([COND1], [true])
@@ -46,7 +46,7 @@ END
 libtoolize
 $ACLOCAL
 AUTOMAKE_fails --add-missing
-grep libb stderr && Exit 1
+grep libb stderr && exit 1
 grep 'Makefile.am:3:.*libc.la.*multiply defined' stderr
 grep "Makefile.am:9:.*'pkglib" stderr
 grep "Makefile.am:2:.*'lib" stderr
old mode 100755 (executable)
new mode 100644 (file)
index b4d7baa..f955ba7
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2005-2012 Free Software Foundation, Inc.
+# Copyright (C) 2005-2017 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
 
 # Make sure xxx_LINK is defined for each target that requires specific
 # flags.
-# Quite similar to libtool7.test, using AM_LDFLAGS in addition to
+# Quite similar to 'libtool7.sh', using AM_LDFLAGS in addition to
 # xxx_LDFLAGS.
 
 required='cc libtoolize'
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_CC
-AM_PROG_CC_C_O
 AM_PROG_AR
 AC_LIBTOOL_DLOPEN
 AM_PROG_LIBTOOL
@@ -85,18 +84,23 @@ $AUTOCONF
 $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; }
-cat output
+run_make -M -- print \
+  LDFLAGS=ldflags \
+  AM_LDFLAGS=am_ldflags \
+  libmod1_la_LDFLAGS=lm1_la_ldflags \
+  CFLAGS=cflags \
+  AM_CFLAGS=am_cflags \
+  prg2_CFLAGS=prg2_cflags
+
 grep '1BEG: libmod1.la mod2.la :END1' output
 grep '2BEG: mod2.la :END2' output
 grep '3BEG:.* am_cflags cflags .*lm1_la_ldflags ldflags.* :END3' output
-grep '3BEG: .*am_ldflags.* :END3' output && Exit 1
+grep '3BEG: .*am_ldflags.* :END3' output && exit 1
 grep '4BEG: :END4' output
 grep '5BEG: :END5' output
 grep '6BEG:.* prg2_cflags cflags .*am_ldflags ldflags.* :END6' output
-grep '6BEG: .*am_cflags.* :END6' output && Exit 1
+grep '6BEG: .*am_cflags.* :END6' output && exit 1
+
 $MAKE
 
 :
old mode 100755 (executable)
new mode 100644 (file)
index c3dad69..a2519b9
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2003-2012 Free Software Foundation, Inc.
+# Copyright (C) 2003-2017 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
@@ -16,7 +16,7 @@
 
 # Make sure COPYING is not overwritten, even with -a -f.
 
-. ./defs || Exit 1
+. test-init.sh
 
 echo AC_OUTPUT >>configure.ac
 
@@ -35,7 +35,7 @@ EOF
 :> ChangeLog
 :> README
 
-test ! -f COPYING
+test ! -e COPYING
 
 $ACLOCAL
 $AUTOCONF
old mode 100755 (executable)
new mode 100644 (file)
index d447eba..d2704ac
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2008-2012 Free Software Foundation, Inc.
+# Copyright (C) 2008-2017 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
@@ -16,7 +16,7 @@
 
 # Check that installing 'COPYING' outputs a warning.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat > Makefile.am << 'END'
 AUTOMAKE_OPTIONS = gnu
old mode 100755 (executable)
new mode 100644 (file)
index a3dac1b..b53fa68
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 1998-2012 Free Software Foundation, Inc.
+# Copyright (C) 1998-2017 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
@@ -17,7 +17,7 @@
 # Test to make sure the C++ linker is used when appropriate.
 # Matthew D. Langston <langston@SLAC.Stanford.EDU>
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_CC
@@ -39,7 +39,7 @@ $AUTOMAKE
 grep '.\$(CXXLINK)' Makefile.in
 
 # We should not see these patterns:
-grep '.\$(FLINK)' Makefile.in && Exit 1
-grep '.\$(LINK)'  Makefile.in && Exit 1
+grep '.\$(FLINK)' Makefile.in && exit 1
+grep '.\$(LINK)'  Makefile.in && exit 1
 
-Exit 0
+exit 0
old mode 100755 (executable)
new mode 100644 (file)
index 71733ba..ebbfa99
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2012 Free Software Foundation, Inc.
+# Copyright (C) 2012-2017 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
@@ -21,7 +21,7 @@
 # See automake bug#11089.
 
 required='cc c++'
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_CC
@@ -60,11 +60,11 @@ main ()
 END
 
 ./configure have_cxx=no
-CXX=false $MAKE -e
+run_make CXX=false
 
 # Sanity check.
 rm -f foo foo.exe
-CC=false $MAKE -e && Exit 99
+run_make CC=false && fatal_ '"make CC=false" succeeded unexpectedly'
 
 $MAKE distclean
 
@@ -79,10 +79,10 @@ int main (void)
 END
 
 ./configure have_cxx=yes
-CC=false $MAKE -e
+run_make CC=false
 
 # Sanity check.
 rm -f foo foo.exe
-CXX=false $MAKE -e && Exit 99
+run_make CXX=false && fatal_ '"make CXX=false" succeeded unexpectedly'
 
 :
old mode 100755 (executable)
new mode 100644 (file)
index 8ba05df..d891c2b
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2001-2012 Free Software Foundation, Inc.
+# Copyright (C) 2001-2017 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
@@ -18,7 +18,7 @@
 # *_SOURCES
 # Richard Boulton <richard@tartarus.org>
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_CC
@@ -41,7 +41,7 @@ $AUTOMAKE
 grep '.\$(CXXLINK)' Makefile.in
 
 # We should not see these patterns:
-grep '.\$(FLINK)' Makefile.in && Exit 1
-grep '.\$(LINK)'  Makefile.in && Exit 1
+grep '.\$(FLINK)' Makefile.in && exit 1
+grep '.\$(LINK)'  Makefile.in && exit 1
 
-Exit 0
+exit 0
old mode 100755 (executable)
new mode 100644 (file)
index a34d6c6..5a0764e
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 1998-2012 Free Software Foundation, Inc.
+# Copyright (C) 1998-2017 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
@@ -15,9 +15,9 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 # Test to make sure the Fortran 90 linker is used when appropriate.
-# (copied from link_f_only.test) Mike Nolta <mrnolta@princeton.edu>
+# (copied from 'link_f_only.sh') Mike Nolta <mrnolta@princeton.edu>
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_FC
@@ -38,7 +38,7 @@ $AUTOMAKE
 grep '.\$(FCLINK)' Makefile.in
 
 # We should not see these patterns:
-grep '.\$(CXXLINK)' Makefile.in && Exit 1
-grep '.\$(LINK)'    Makefile.in && Exit 1
+grep '.\$(CXXLINK)' Makefile.in && exit 1
+grep '.\$(LINK)'    Makefile.in && exit 1
 
-Exit 0
+exit 0
old mode 100755 (executable)
new mode 100644 (file)
index 25f3ef9..eb1f3fa
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 1998-2012 Free Software Foundation, Inc.
+# Copyright (C) 1998-2017 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
@@ -17,7 +17,7 @@
 # Test to make sure the Fortran 77 linker is used when appropriate.
 # Matthew D. Langston <langston@SLAC.Stanford.EDU>
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_F77
@@ -38,7 +38,7 @@ $AUTOMAKE
 grep '.\$(F77LINK)' Makefile.in
 
 # We should not see these patterns:
-grep '.\$(CXXLINK)' Makefile.in && Exit 1
-grep '.\$(LINK)'    Makefile.in && Exit 1
+grep '.\$(CXXLINK)' Makefile.in && exit 1
+grep '.\$(LINK)'    Makefile.in && exit 1
 
-Exit 0
+exit 0
old mode 100755 (executable)
new mode 100644 (file)
index 6cf8b8b..ba4fab8
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 1998-2012 Free Software Foundation, Inc.
+# Copyright (C) 1998-2017 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
@@ -17,7 +17,7 @@
 # Test to make sure the Fortran 77 linker is used when appropriate.
 # Matthew D. Langston <langston@SLAC.Stanford.EDU>
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_CC
@@ -40,7 +40,7 @@ $AUTOMAKE
 grep '.\$(F77LINK)' Makefile.in
 
 # We should not see these patterns:
-grep '.\$(LINK)'    Makefile.in && Exit 1
-grep '.\$(CXXLINK)' Makefile.in && Exit 1
+grep '.\$(LINK)'    Makefile.in && exit 1
+grep '.\$(CXXLINK)' Makefile.in && exit 1
 
-Exit 0
+exit 0
old mode 100755 (executable)
new mode 100644 (file)
index ede7b5a..fcb3eb4
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 1998-2012 Free Software Foundation, Inc.
+# Copyright (C) 1998-2017 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
@@ -17,7 +17,7 @@
 # Test to make sure the C++ linker is used when appropriate.
 # Matthew D. Langston <langston@SLAC.Stanford.EDU>
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_CC
@@ -40,7 +40,7 @@ $AUTOMAKE
 grep '.\$(CXXLINK)' Makefile.in
 
 # We should not see these patterns:
-grep '.\$(F77LINK)' Makefile.in && Exit 1
-grep '.\$(LINK)'    Makefile.in && Exit 1
+grep '.\$(F77LINK)' Makefile.in && exit 1
+grep '.\$(LINK)'    Makefile.in && exit 1
 
-Exit 0
+exit 0
old mode 100755 (executable)
new mode 100644 (file)
index 545f6a6..09a3c2b
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 1998-2012 Free Software Foundation, Inc.
+# Copyright (C) 1998-2017 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
@@ -17,7 +17,7 @@
 # Test to make sure the C++ linker is used when appropriate.
 # Matthew D. Langston <langston@SLAC.Stanford.EDU>
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_CXX
@@ -39,7 +39,7 @@ $AUTOMAKE
 grep '.\$(CXXLINK)' Makefile.in
 
 # We should not see these patterns:
-grep '.\$(F77LINK)' Makefile.in && Exit 1
-grep '.\$(LINK)'    Makefile.in && Exit 1
+grep '.\$(F77LINK)' Makefile.in && exit 1
+grep '.\$(LINK)'    Makefile.in && exit 1
 
-Exit 0
+exit 0
old mode 100755 (executable)
new mode 100644 (file)
index 48d32a2..b9e3ca1
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2009-2012 Free Software Foundation, Inc.
+# Copyright (C) 2009-2017 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
@@ -16,7 +16,7 @@
 
 # Test to make sure _LINK variables are detected and used as documented.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_CC
@@ -34,11 +34,11 @@ $AUTOMAKE -a
 
 # We should use foo_LINK not LINK.
 grep '.\$(foo_LINK)' Makefile.in
-grep '.\$(LINK).*foo' Makefile.in && Exit 1
+grep '.\$(LINK).*foo' Makefile.in && exit 1
 
 # We should not override the user definition of bar_LINK.
 # IOW, bar_LDFLAGS is useless unless bar_LINK refers to it.
-grep '^ *bar_LINK *=.*bar_LDFLAGS' Makefile.in && Exit 1
+grep '^ *bar_LINK *=.*bar_LDFLAGS' Makefile.in && exit 1
 grep '.\$(bar_LINK).*bar' Makefile.in
 
-Exit 0
+exit 0
old mode 100755 (executable)
new mode 100644 (file)
similarity index 62%
rename from t/python7.sh
rename to t/lisp-flags.sh
index ec0ac07..8085b22
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2003-2012 Free Software Foundation, Inc.
+# Copyright (C) 2003-2017 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 detection of missing Python.
-# Same as python6.test, but requiring a version.
+# Elisp byte-compilation honours AM_ELCFLAFS and ELCFLAGS.
 
-# Python is not required for this test.
-. ./defs || Exit 1
+. test-init.sh
 
-cat >>configure.ac <<\EOF
-# Hopefully the Python team will never release such a version.
-AM_PATH_PYTHON([9999.9], [], [echo "$PYTHON" > py])
-AC_OUTPUT
+cat > Makefile.am << 'EOF'
+lisp_LISP = foo.el
+AM_ELCFLAGS = __am_elcflags__
 EOF
 
-: > Makefile.am
+cat >> configure.ac << 'EOF'
+AM_PATH_LISPDIR
+AC_OUTPUT
+EOF
 
 $ACLOCAL
 $AUTOCONF
 $AUTOMAKE --add-missing
 
-./configure
-test x"`cat py`" = x:
+./configure EMACS='echo >$@' --with-lispdir="$(pwd)/unused"
+
+: > foo.el
+run_make ELCFLAGS='__usr_elcflags__'
+grep '__am_elcflags__.*__usr_elcflags__' foo.elc
 
 :
diff --git a/t/lisp-loadpath.sh b/t/lisp-loadpath.sh
new file mode 100644 (file)
index 0000000..17e2a3b
--- /dev/null
@@ -0,0 +1,67 @@
+#! /bin/sh
+# Copyright (C) 2012-2017 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/>.
+
+# Emacs lisp files in both $(srcdir) and $(builddir) are found if
+# required by other files.  Related to automake bug#11806.
+
+required=emacs
+. test-init.sh
+
+cat >> configure.ac << 'END'
+AM_PATH_LISPDIR
+AC_OUTPUT
+END
+
+cat > Makefile.am << 'END'
+noinst_LISP = requirer.el
+lisp_LISP = foo.el
+lisp_DATA = bar.el
+END
+
+echo "(require 'foo) (require 'bar)" >> requirer.el
+echo "(provide 'foo)" > foo.el
+echo "(provide 'bar)" > bar.el
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE -a
+
+mkdir build
+cd build
+../configure
+$MAKE
+test -f requirer.elc
+test -f foo.elc
+test ! -e bar.elc
+
+$MAKE clean
+test ! -e requirer.elc
+test ! -e foo.elc
+
+# In the spirit of VPATH, stuff in the builddir is preferred to
+# stuff in the srcdir.
+echo "(provide" > ../foo.el  # Break it.
+echo "defun)" > ../bar.el    # Likewise.
+$MAKE && exit 1
+$sleep
+echo "(provide 'foo)" > foo.el
+echo "(provide 'bar)" > bar.el
+$MAKE
+test -f requirer.elc
+test -f foo.elc
+test ! -e bar.elc
+
+:
old mode 100755 (executable)
new mode 100644 (file)
similarity index 63%
rename from t/specflg3.sh
rename to t/lisp-pr11806.sh
index 9e78872..b85695d
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 1999-2012 Free Software Foundation, Inc.
+# Copyright (C) 2012-2017 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 exe-specific flags with dependency tracking.
+# Compiling .el files that requires each other in a VPATH build.
+# See automake bug#11806.
 
-. ./defs || Exit 1
+required=emacs
+. test-init.sh
 
 cat >> configure.ac << 'END'
-AC_PROG_CC
-AM_PROG_CC_C_O
+AM_PATH_LISPDIR
 AC_OUTPUT
 END
 
 cat > Makefile.am << 'END'
-bin_PROGRAMS = foo
-foo_SOURCES = foo.c
-foo_CFLAGS = -DFOO
+lisp_LISP = foo.el
+lisp_DATA = bar.el
 END
 
-: > compile
+echo "(require 'bar)" > foo.el
+echo "(provide 'bar)" > bar.el
 
 $ACLOCAL
-$AUTOMAKE
-
-$FGREP ' -o foo-foo' Makefile.in
-$FGREP 'foo.o.o' Makefile.in && Exit 1
-$FGREP 'foo.$(OBJEXT).$(OBJEXT)' Makefile.in && Exit 1
-$FGREP '$(foo_CFLAGS)' Makefile.in
+$AUTOCONF
+$AUTOMAKE -a
+
+mkdir build
+cd build
+../configure
+$MAKE
+test -f foo.elc
+cd ..
+
+./configure
+$MAKE
+test -f foo.elc
 
 :
diff --git a/t/lisp-subdir-mix.sh b/t/lisp-subdir-mix.sh
new file mode 100644 (file)
index 0000000..1db1f7f
--- /dev/null
@@ -0,0 +1,96 @@
+#! /bin/sh
+# Copyright (C) 2012-2017 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 compiling elisp files in different subdirectories, where a
+# file in a subdirectory might require a file in another one.
+# This doesn't work out of the box, but can be made to work with a
+# judicious use of $(AM_ELCFLAGS).
+
+required=emacs
+. test-init.sh
+
+cat >> configure.ac << 'END'
+AM_PATH_LISPDIR
+AC_OUTPUT
+END
+
+cat > Makefile.am << 'END'
+dist_lisp_LISP = \
+  am-here.el \
+  sub1/am-one.el \
+  sub2/am-two.el \
+  sub3/subsub/am-three.el
+
+AM_ELCFLAGS = \
+  -L $(srcdir)/sub1 \
+  -L $(srcdir)/sub2 \
+  -L $(srcdir)/sub3/subsub
+
+elc-test:
+       test -f sub1/am-one.elc
+       test -f sub2/am-two.elc
+       test -f sub3/subsub/am-three.elc
+.PHONY: elc-test
+check-local: elc-test
+END
+
+mkdir sub1 sub2 sub3 sub3/subsub
+
+cat > am-here.el << 'END'
+(provide 'am-here)
+(require 'am-one)
+(require 'am-two)
+(require 'am-three)
+END
+
+cat > sub1/am-one.el << 'END'
+(require 'am-here)
+(provide 'am-one)
+(require 'am-two)
+(require 'am-three)
+END
+
+cat > sub2/am-two.el << 'END'
+(require 'am-here)
+(require 'am-one)
+(provide 'am-two)
+(require 'am-three)
+END
+
+cat > sub3/subsub/am-three.el << 'END'
+(require 'am-here)
+(require 'am-one)
+(require 'am-two)
+(provide 'am-three)
+END
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE --add-missing
+
+./configure
+
+$MAKE
+$MAKE elc-test
+$MAKE clean
+for x in am-here sub1/am-one sub2/am-two sub3/subsub/am-three; do
+  test -f $x.el
+  test ! -e $x.elc
+done
+
+$MAKE distcheck
+
+:
diff --git a/t/lisp-subdir.sh b/t/lisp-subdir.sh
new file mode 100644 (file)
index 0000000..406e3b9
--- /dev/null
@@ -0,0 +1,80 @@
+#! /bin/sh
+# Copyright (C) 2012-2017 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/>.
+
+# Emacs lisp files in subdirectories.
+
+required=emacs
+. test-init.sh
+
+cat >> configure.ac << 'END'
+AM_PATH_LISPDIR
+AC_OUTPUT
+END
+
+cat > Makefile.am << 'END'
+nobase_lisp_LISP = sub/am-one.el sub/am-two.el sub/am-three.el
+nobase_dist_lisp_LISP = sub/am-three.el
+dist_noinst_LISP = sub/am-four.el
+EXTRA_DIST = sub/am-one.el sub/am-two.el
+END
+
+mkdir sub
+echo "(require 'am-two) (provide 'am-one)"      > sub/am-one.el
+echo "(require 'am-three) (provide 'am-two)"    > sub/am-two.el
+echo "(provide 'am-three)"                      > sub/am-three.el
+echo "(require 'am-one) (require 'am-two)"      > sub/am-four.el
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE --add-missing
+
+./configure --prefix="$(pwd)/inst" \
+            --with-lispdir="$(pwd)/inst/elisp" \
+
+$MAKE
+# No byte-compiled elisp files in the top-level directory.
+test "$(echo *.elc)" = '*.elc'
+test -f sub/am-one.elc
+test -f sub/am-two.elc
+test -f sub/am-three.elc
+test -f sub/am-four.elc
+$MAKE clean
+test ! -e sub/am-one.elc
+test ! -e sub/am-two.elc
+test ! -e sub/am-three.elc
+test ! -e sub/am-four.elc
+
+# Check installation.
+
+sort > exp << 'END'
+inst/elisp/sub/am-one.elc
+inst/elisp/sub/am-two.elc
+inst/elisp/sub/am-three.elc
+END
+
+$MAKE install
+find inst # For debugging.
+find inst -name '*.elc' > lst || { cat lst; exit 1; }
+sort lst > got
+
+cat exp
+cat got
+diff exp got
+
+# Also check VPATH builds and uninstall completeness.
+$MAKE distcheck
+
+:
diff --git a/t/lisp-subdir2.sh b/t/lisp-subdir2.sh
new file mode 100644 (file)
index 0000000..a67e174
--- /dev/null
@@ -0,0 +1,78 @@
+#! /bin/sh
+# Copyright (C) 2012-2017 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/>.
+
+# Compiling elisp files in different subdirectories.
+
+required=emacs
+. test-init.sh
+
+cat >> configure.ac << 'END'
+AM_PATH_LISPDIR
+AC_OUTPUT
+END
+
+cat > Makefile.am << 'END'
+dist_lisp_LISP = am-one.el
+nodist_lisp_LISP = sub/am-two.el
+sub/am-two.el:
+       mkdir sub
+       echo "(provide 'am-two)" > $@
+DISTCLEANFILES = $(nodist_lisp_LISP)
+dist_noinst_LISP = x/y/z/am-three.el
+
+elc-test:
+       test -f am-one.elc
+       test -f sub/am-two.elc
+       test -f x/y/z/am-three.elc
+.PHONY: elc-test
+check-local: elc-test
+END
+
+mkdir x x/y x/y/z
+echo "(provide 'am-one)" > am-one.el
+# sub/am-two.el is generated at make runtime
+echo "(provide 'am-three)" > x/y/z/am-three.el
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE --add-missing
+
+./configure
+
+$MAKE
+$MAKE elc-test
+$MAKE clean
+test ! -e am-one.elc
+test ! -e sub/am-two.elc
+test ! -e x/y/z/am-three.elc
+test -f am-one.el
+test -f sub/am-two.el
+test -f x/y/z/am-three.el
+
+# Byte-compiling only a subset of the elisp files.
+$MAKE am-one.elc sub/am-two.elc
+test -f am-one.elc
+test -f sub/am-two.elc
+test ! -e x/y/z/am-three.elc
+rm -f am-one.elc sub/am-two.elc
+$MAKE x/y/z/am-three.elc
+test ! -e am-one.elc
+test ! -e sub/am-two.elc
+test -f x/y/z/am-three.elc
+
+$MAKE distcheck
+
+:
old mode 100755 (executable)
new mode 100644 (file)
index 25d174f..48d2ee0
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2002-2012 Free Software Foundation, Inc.
+# Copyright (C) 2002-2017 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
@@ -16,7 +16,7 @@
 
 # Make sure that Automake suggest using AM_PATH_LISPDIR to define lispdir.
 
-. ./defs || Exit 1
+. test-init.sh
 
 
 : TRY 1 -- We lack both EMACS and lispdir.
@@ -42,7 +42,7 @@ END
 
 $ACLOCAL
 AUTOMAKE_fails
-grep 'lispdir.*undefined' stderr && Exit 1
+grep 'lispdir.*undefined' stderr && exit 1
 grep '[Ll]isp source.*EMACS.* undefined' stderr
 grep 'define .*EMACS.* add .*AM_PATH_LISPDIR' stderr
 
@@ -56,7 +56,7 @@ END
 
 $ACLOCAL
 AUTOMAKE_fails
-grep 'EMACS.*undefined' stderr && Exit 1
+grep 'EMACS.*undefined' stderr && exit 1
 grep '[Ll]isp source.*lispdir.* undefined' stderr
 grep 'define .*lispdir.* add .*AM_PATH_LISPDIR' stderr
 
old mode 100755 (executable)
new mode 100644 (file)
index a1531d3..ed2b13c
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2003-2012 Free Software Foundation, Inc.
+# Copyright (C) 2003-2017 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
@@ -17,7 +17,7 @@
 # Test that compiling interdependent elisp files works.
 
 required=emacs
-. ./defs || Exit 1
+. test-init.sh
 
 cat > Makefile.am << 'EOF'
 lisp_LISP = am-one.el am-two.el am-three.el
@@ -40,14 +40,13 @@ $ACLOCAL
 $AUTOCONF
 $AUTOMAKE --add-missing
 
-./configure --prefix="`pwd`/_inst"
+./configure --prefix="$(pwd)/_inst"
 
 $MAKE
 
 test -f am-one.elc
 test -f am-two.elc
 test -f am-three.elc
-test -f elc-stamp
 
 # Make sure we can recover from a deletion.
 rm -f am-one.elc
@@ -63,7 +62,7 @@ find _inst # For debugging.
 # Keep thin in sync with m4/lispdir.m4.
 for dir in lib/emacs lib/xemacs share/emacs share/xemacs :; do
   if test $dir = :; then
-    Exit 1
+    exit 1
   elif test -d _inst/$dir/site-lisp; then
     break
   fi
@@ -77,16 +76,7 @@ test -f _inst/$dir/site-lisp/am-three.el
 test -f _inst/$dir/site-lisp/am-three.elc
 
 $MAKE uninstall
-find _inst | $EGREP '\.elc?$' && Exit 1
-
-# Make sure we build all files when any of them change.
-# (We grep a message to make sure the compilation happens.)
-unique=0a3346e2af8a689b85002b53df09142a
-$sleep
-echo "(message \"$unique\")(provide 'am-three)" > am-three.el
-$MAKE >output 2>&1 || { cat output; Exit 1; }
-cat output
-grep $unique output
+find _inst | $EGREP '\.elc?$' && exit 1
 
 # It should also work for VPATH-builds.
 $MAKE distcheck
old mode 100755 (executable)
new mode 100644 (file)
index 8d2de59..53d5812
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2003-2012 Free Software Foundation, Inc.
+# Copyright (C) 2003-2017 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
@@ -18,7 +18,7 @@
 # Report from Simon Josefsson.
 
 required=emacs
-. ./defs || Exit 1
+. test-init.sh
 
 cat > Makefile.am << 'EOF'
 lisp_LISP = am-one.el am-two.el am-three.el
@@ -32,7 +32,6 @@ test:
        test ! -f am-one.elc
        test ! -f am-two.elc
        test ! -f am-three.elc
-       test ! -f elc-stamp
 
 install-test: install
        test -f "$(lispdir)/am-one.el"
@@ -60,7 +59,9 @@ $ACLOCAL
 $AUTOCONF
 $AUTOMAKE --add-missing
 
-./configure --prefix "`pwd`"
+cwd=$(pwd) || fatal_ "getting current working directory"
+
+./configure --prefix "$cwd"
 $MAKE
 $MAKE test
 $MAKE install-test
@@ -70,7 +71,7 @@ $MAKE not-installed
 # Fake the absence of emacs.
 # *.el files should not be installed, but "make install" and
 # "make uninstall" should continue to work.
-./configure EMACS=no --prefix "`pwd`"
+./configure EMACS=no --prefix "$cwd"
 $MAKE
 $MAKE test
 $MAKE install
old mode 100755 (executable)
new mode 100644 (file)
index 997a56e..e0d28cd
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2003-2012 Free Software Foundation, Inc.
+# Copyright (C) 2003-2017 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/>.
 
-# Same as lisp4.test, but using the now-recommended way to install
+# Same as 'lisp4.sh', but using the now-recommended way to install
 # non-bytecompiled *.el files.
 
 required=emacs
-. ./defs || Exit 1
+. test-init.sh
 
 cat > Makefile.am << 'EOF'
 lisp_DATA = am-one.el am-two.el am-three.el
@@ -31,7 +31,6 @@ test:
        test ! -f am-one.elc
        test ! -f am-two.elc
        test ! -f am-three.elc
-       test ! -f elc-stamp
 
 install-test: install
        test -f "$(lispdir)/am-one.el"
@@ -59,7 +58,9 @@ $ACLOCAL
 $AUTOCONF
 $AUTOMAKE --add-missing
 
-./configure --prefix "`pwd`"
+cwd=$(pwd) || fatal_ "getting current working directory"
+
+./configure --prefix "$cwd"
 $MAKE
 $MAKE test
 $MAKE install-test
@@ -69,7 +70,7 @@ $MAKE not-installed
 # Fake the absence of emacs.
 # *.el files SHOULD be installed by "make install" (and uninstalled
 # by "make uninstall").
-./configure EMACS=no --prefix "`pwd`"
+./configure EMACS=no --prefix "$cwd"
 $MAKE
 $MAKE test
 $MAKE install-test
old mode 100755 (executable)
new mode 100644 (file)
index 9635ea2..042c41e
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2004-2012 Free Software Foundation, Inc.
+# Copyright (C) 2004-2017 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
@@ -17,7 +17,7 @@
 # Test for conditional _LISP.
 
 required=emacs
-. ./defs || Exit 1
+. test-init.sh
 
 cat > Makefile.am << 'EOF'
 dist_lisp_LISP = am-one.el
@@ -38,6 +38,9 @@ AM_PATH_LISPDIR
 AC_OUTPUT
 EOF
 
+# Avoid possible spurious influences from the environment.
+unset want_two
+
 echo "(provide 'am-one)" > am-one.el
 echo "(require 'am-one)" > am-two.el
 echo "(require 'am-one)" > am-three.el
@@ -46,37 +49,36 @@ $ACLOCAL
 $AUTOCONF
 $AUTOMAKE --add-missing
 
-./configure "--with-lispdir=`pwd`/lisp"
+cwd=$(pwd) || fatal_ "getting current working directory"
+
+./configure --with-lispdir="$cwd/lisp"
 
 $MAKE
 test -f am-one.elc
-test ! -f am-two.elc
+test ! -e am-two.elc
 test -f am-three.elc
-test -f elc-stamp
 
 $MAKE install
 test -f lisp/am-one.el
 test -f lisp/am-one.elc
-test ! -f lisp/am-two.el
-test ! -f lisp/am-two.elc
-test ! -f lisp/am-three.el
-test ! -f lisp/am-three.elc
+test ! -e lisp/am-two.el
+test ! -e lisp/am-two.elc
+test ! -e lisp/am-three.el
+test ! -e lisp/am-three.elc
 
 $MAKE dist-test
 
 $MAKE distclean
-test ! -f am-one.elc
-test ! -f am-two.elc
-test ! -f am-three.elc
-test ! -f elc-stamp
+test ! -e am-one.elc
+test ! -e am-two.elc
+test ! -e am-three.elc
 
-./configure "--with-lispdir=`pwd`/lisp" want_two=1
+./configure --with-lispdir="$cwd/lisp" want_two=1
 
 $MAKE
 test -f am-one.elc
 test -f am-two.elc
 test -f am-three.elc
-test -f elc-stamp
 
 # Let's mutilate the source tree, to check the recover rule.
 rm -f am-*.elc
@@ -84,22 +86,20 @@ $MAKE
 test -f am-one.elc
 test -f am-two.elc
 test -f am-three.elc
-test -f elc-stamp
 
 $MAKE install
 test -f lisp/am-one.el
 test -f lisp/am-one.elc
 test -f lisp/am-two.el
 test -f lisp/am-two.elc
-test ! -f lisp/am-three.el
-test ! -f lisp/am-three.elc
+test ! -e lisp/am-three.el
+test ! -e lisp/am-three.elc
 
 $MAKE dist-test
 
 $MAKE distclean
-test ! -f am-one.elc
-test ! -f am-two.elc
-test ! -f am-three.elc
-test ! -f elc-stamp
+test ! -e am-one.elc
+test ! -e am-two.elc
+test ! -e am-three.elc
 
 :
old mode 100755 (executable)
new mode 100644 (file)
index 79799d1..c7681ab
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2005-2012 Free Software Foundation, Inc.
+# Copyright (C) 2005-2017 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
@@ -16,7 +16,7 @@
 
 # Make sure that lisp_LISP also works when emacs is not installed.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat > Makefile.am << 'EOF'
 dist_lisp_LISP = am-one.el am-two.el am-three.el
@@ -37,14 +37,10 @@ $AUTOCONF
 $AUTOMAKE --add-missing
 ./configure
 
-$MAKE >stdout || { cat stdout; Exit 1; }
-cat stdout
-test 1 -eq `grep 'Warnings can be ignored' stdout | wc -l`
-
-test ! -f am-one.elc
-test ! -f am-two.elc
-test ! -f am-three.elc
-test -f elc-stamp
+run_make -O
+test ! -e am-one.elc
+test ! -e am-two.elc
+test ! -e am-three.elc
 
 $MAKE distcheck
 
old mode 100755 (executable)
new mode 100644 (file)
index 738cbd6..74220ab
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2005-2012 Free Software Foundation, Inc.
+# Copyright (C) 2005-2017 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
@@ -17,7 +17,7 @@
 # Check the recover rule of lisp_LISP with parallel make.
 
 required='GNUmake emacs'
-. ./defs || Exit 1
+. test-init.sh
 
 cat > Makefile.am << 'EOF'
 dist_lisp_LISP = am-one.el am-two.el am-three.el
@@ -37,29 +37,19 @@ $AUTOCONF
 $AUTOMAKE --add-missing
 ./configure
 
-# Use append mode here to avoid dropping output.  See automake bug#11413.
-: >stdout
-$MAKE -j >>stdout || { cat stdout; Exit 1; }
-
-cat stdout
-test 1 -eq `grep 'Warnings can be ignored' stdout | wc -l`
+run_make -O -- -j
 
 test -f am-one.elc
 test -f am-two.elc
 test -f am-three.elc
-test -f elc-stamp
 
+# Delete ...
 rm -f am-*.elc
 
-# Use append mode here to avoid dropping output.  See automake bug#11413.
-: >stdout
-$MAKE -j >>stdout || { cat stdout; Exit 1; }
-
-cat stdout
-test 1 -eq `grep 'Warnings can be ignored' stdout | wc -l`
+# ... and recover.
+run_make -O -- -j
 test -f am-one.elc
 test -f am-two.elc
 test -f am-three.elc
-test -f elc-stamp
 
 :
old mode 100755 (executable)
new mode 100644 (file)
index a89ffe1..87c8ba1
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2005-2012 Free Software Foundation, Inc.
+# Copyright (C) 2005-2017 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
@@ -17,7 +17,7 @@
 # Check that 'make -n' works with the lisp_LISP recover rule.
 
 required='emacs non-root'
-. ./defs || Exit 1
+. test-init.sh
 
 cat > Makefile.am << 'EOF'
 dist_lisp_LISP = am-one.el am-two.el am-three.el
@@ -42,17 +42,15 @@ $MAKE
 test -f am-one.elc
 test -f am-two.elc
 test -f am-three.elc
-test -f elc-stamp
 
-rm -f am-*.elc elc-stamp
+rm -f am-*.elc
 
 chmod a-w .
 
 $MAKE -n
 
-test ! -f am-one.elc
-test ! -f am-two.elc
-test ! -f am-three.elc
-test ! -f elc-stamp
+test ! -e am-one.elc
+test ! -e am-two.elc
+test ! -e am-three.elc
 
 :
index 52bdaf9..83e6965 100644 (file)
@@ -2,7 +2,7 @@
 ## testsuite.  This fragment is meant to be included by the Makefile.am,
 ## but also to be executed directly by make when bootstrapping automake.
 
-## Copyright (C) 2011-2012 Free Software Foundation, Inc.
+## Copyright (C) 2011-2017 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
@@ -30,21 +30,21 @@ t/pm/Version3.pl
 
 XFAIL_TESTS = \
 t/all.sh \
-t/yacc-bison-skeleton-cxx.sh \
-t/yacc-bison-skeleton.sh \
+t/auxdir-pr19311.sh \
 t/cond17.sh \
 t/gcj6.sh \
 t/override-conditional-2.sh \
+t/override-conditional-pr13940.sh \
 t/dist-pr109765.sh \
 t/instdir-cond2.sh \
 t/java-nobase.sh \
 t/objext-pr10128.sh \
-t/parallel-tests-many.sh \
-t/pr8365-remake-timing.sh \
+t/remake-timing-bug-pr8365.sh \
 t/lex-subobj-nodep.sh \
+t/subobj-indir-pr13928.sh \
+t/subobj-vpath-pr13928.sh \
 t/remake-am-pr10111.sh \
 t/remake-m4-pr10111.sh \
-t/txinfo5.sh \
 $(perl_fake_XFAIL_TESTS)
 
 perl_TESTS = \
@@ -73,47 +73,58 @@ t/perf/testsuite-summary.sh
 handwritten_TESTS = \
 t/get-sysconf.sh \
 $(perl_TESTS) \
-$(perf_TESTS) \
 t/instspc.tap \
 t/aclocal.sh \
-t/aclocal3.sh \
-t/aclocal4.sh \
-t/aclocal5.sh \
-t/aclocal6.sh \
-t/aclocal7.sh \
-t/aclocal8.sh \
-t/aclocal9.sh \
-t/acloca10.sh \
-t/acloca11.sh \
-t/acloca12.sh \
-t/acloca13.sh \
-t/acloca14.sh \
-t/acloca15.sh \
-t/acloca16.sh \
-t/acloca17.sh \
-t/acloca18.sh \
-t/acloca19.sh \
-t/acloca20.sh \
-t/acloca21.sh \
-t/acloca22.sh \
-t/acloca23.sh \
+t/aclocal-I-order-1.sh \
+t/aclocal-I-order-2.sh \
+t/aclocal-I-order-3.sh \
+t/aclocal-I-and-install.sh \
 t/aclocal-acdir.sh \
+t/aclocal-amflags.sh \
+t/aclocal-autoconf-version-check.sh \
+t/aclocal-comments-respected.sh \
+t/aclocal-deleted-header-aclocal-amflags.sh \
+t/aclocal-deleted-header.sh \
+t/aclocal-deps-subdir.sh \
+t/aclocal-deps.sh \
+t/aclocal-dirlist.sh \
+t/aclocal-dirlist-globbing.sh \
+t/aclocal-dirlist-abspath.sh \
 t/aclocal-install-absdir.sh \
-t/aclocal-print-acdir.sh \
+t/aclocal-install-fail.sh \
+t/aclocal-install-mkdir.sh \
+t/aclocal-m4-include-are-scanned-aclocal-amflags.sh \
+t/aclocal-m4-include-are-scanned.sh \
+t/aclocal-m4-sinclude.sh \
+t/aclocal-macrodir.tap \
+t/aclocal-macrodirs.tap \
+t/aclocal-missing-macros.sh \
+t/aclocal-no-extra-scan.sh \
+t/aclocal-no-force.sh \
+t/aclocal-no-install-no-mkdir.sh \
+t/aclocal-no-symlinked-overwrite.sh \
+t/aclocal-no-unused-required.sh \
 t/aclocal-path.sh \
 t/aclocal-path-install.sh \
 t/aclocal-path-install-serial.sh \
 t/aclocal-path-nonexistent.sh \
 t/aclocal-path-precedence.sh \
-t/aclocal-install-fail.sh \
-t/aclocal-install-mkdir.sh \
-t/aclocal-no-install-no-mkdir.sh \
+t/aclocal-pr450.sh \
+t/aclocal-print-acdir.sh \
+t/aclocal-req.sh \
+t/aclocal-remake-misc.sh \
+t/aclocal-scan-configure-ac-pr319.sh \
+t/aclocal-serial.sh \
+t/aclocal-underquoted-defun.sh \
 t/aclocal-verbose-install.sh \
+t/auxdir-pr15981.sh \
+t/auxdir-cc-pr15981.sh \
 t/ac-output-old.tap \
 t/acsilent.sh \
 t/acsubst.sh \
 t/acsubst2.sh \
 t/add-missing.tap \
+t/add-missing-multiple.sh \
 t/all.sh \
 t/all2.sh \
 t/alloca.sh \
@@ -124,12 +135,18 @@ t/amhello-cflags.sh \
 t/amhello-cross-compile.sh \
 t/amhello-binpkg.sh \
 t/aminit-moreargs-deprecation.sh \
+t/aminit-trailing-dnl-comment-pr16841.sh \
 t/amassign.sh \
-t/ammissing.sh \
+t/am-config-header.sh \
+t/am-prog-cc-stdc.sh \
+t/am-prog-cc-c-o.sh \
+t/am-macro-not-found.sh \
 t/amopt.sh \
 t/amopts-location.sh \
 t/amopts-variable-expansion.sh \
 t/amsubst.sh \
+t/am-default-source-ext.sh \
+t/am-include-only-one-generated-fragment.sh \
 t/ansi2knr-no-more.sh \
 t/ar-lib.sh \
 t/ar-lib2.sh \
@@ -158,9 +175,9 @@ t/autodist-configure-no-subdir.sh \
 t/autodist-no-duplicate.sh \
 t/autodist-stamp-vti.sh \
 t/autohdr.sh \
-t/autohdr2.sh \
 t/autohdr3.sh \
 t/autohdr4.sh \
+t/autohdr-subdir-pr12495.sh \
 t/autohdrdry.sh \
 t/automake-cmdline.tap \
 t/auxdir.sh \
@@ -171,22 +188,24 @@ t/auxdir-autodetect.sh \
 t/auxdir-computed.tap \
 t/auxdir-misplaced.sh \
 t/auxdir-nonexistent.sh \
+t/auxdir-pr19311.sh \
 t/auxdir-unportable.tap \
 t/backcompat.sh \
 t/backcompat2.sh \
 t/backcompat3.sh \
-t/backcompat4.sh \
-t/backcompat5.sh \
 t/backcompat6.sh \
-t/backsl.sh \
-t/backsl2.sh \
-t/backsl3.sh \
-t/backsl4.sh \
+t/backcompat-acout.sh \
+t/backslash-issues.sh \
+t/backslash-before-trailing-whitespace.sh \
 t/badline.sh \
 t/badopt.sh \
 t/badprog.sh \
-t/block.sh \
-t/bsource.sh \
+t/built-sources-check.sh \
+t/built-sources-cond.sh \
+t/built-sources-fork-bomb.sh \
+t/built-sources-install.sh \
+t/built-sources-subdir.sh \
+t/built-sources.sh \
 t/candist.sh \
 t/canon.sh \
 t/canon2.sh \
@@ -198,11 +217,13 @@ t/canon7.sh \
 t/canon8.sh \
 t/canon-name.sh \
 t/ccnoco.sh \
-t/ccnoco2.sh \
+t/ccnoco-lib.sh \
+t/ccnoco-lt.sh \
 t/ccnoco3.sh \
+t/ccnoco4.sh \
+t/ccnoco-deps.sh \
 t/check.sh \
 t/check2.sh \
-t/check3.sh \
 t/check4.sh \
 t/check5.sh \
 t/check6.sh \
@@ -220,7 +241,6 @@ t/check-no-test-driver.sh \
 t/check-concurrency-bug9245.sh \
 t/checkall.sh \
 t/clean.sh \
-t/clean2.sh \
 t/colneq.sh \
 t/colneq2.sh \
 t/colneq3.sh \
@@ -231,8 +251,9 @@ t/colon4.sh \
 t/colon5.sh \
 t/colon6.sh \
 t/colon7.sh \
-t/color.sh \
-t/color2.sh \
+t/color-tests.sh \
+t/color-tests2.sh \
+t/color-tests-opt.sh \
 t/comment.sh \
 t/comment2.sh \
 t/comment3.sh \
@@ -244,6 +265,7 @@ t/comment8.sh \
 t/comment9.sh \
 t/commen10.sh \
 t/commen11.sh \
+t/comment-block.sh \
 t/comments-in-var-def.sh \
 t/compile.sh \
 t/compile2.sh \
@@ -251,11 +273,11 @@ t/compile3.sh \
 t/compile4.sh \
 t/compile5.sh \
 t/compile6.sh \
+t/compile7.sh \
 t/compile_f90_c_cxx.sh \
 t/compile_f_c_cxx.sh \
 t/cond-basic.sh \
 t/cond.sh \
-t/cond2.sh \
 t/cond3.sh \
 t/cond4.sh \
 t/cond5.sh \
@@ -317,6 +339,7 @@ t/confh5.sh \
 t/confh6.sh \
 t/confh7.sh \
 t/confh8.sh \
+t/confh-subdir-clean.sh \
 t/confincl.sh \
 t/conflnk.sh \
 t/conflnk2.sh \
@@ -329,20 +352,16 @@ t/copy.sh \
 t/cscope.tap \
 t/cscope2.sh \
 t/cscope3.sh \
+t/c-demo.sh \
 t/cxx.sh \
 t/cxx2.sh \
 t/cxxcpp.sh \
+t/cxx-demo.sh \
+t/cxx-lt-demo.sh \
 t/cxxlibobj.sh \
 t/cxxlink.sh \
 t/cxxnoc.sh \
-t/cxxo.sh \
-t/cygnus-deprecation.sh \
-t/cygnus-check-without-all.sh \
-t/cygnus-dependency-tracking.sh \
-t/cygnus-imply-foreign.sh \
-t/cygnus-no-dist.sh \
-t/cygnus-no-installinfo.sh \
-t/cygnus-requires-maintainer-mode.sh \
+t/cygnus-no-more.sh \
 t/cygwin32.sh \
 t/dash.sh \
 t/defun.sh \
@@ -366,6 +385,7 @@ t/depcomp.sh \
 t/depcomp2.sh \
 t/depcomp8a.sh \
 t/depcomp8b.sh \
+t/depcomp-implicit-auxdir.sh \
 t/depdist.sh \
 t/depend.sh \
 t/depend3.sh \
@@ -374,11 +394,12 @@ t/depend5.sh \
 t/depend6.sh \
 t/deprecated-acinit.sh \
 t/destdir.sh \
-t/dirlist.sh \
-t/dirlist2.sh \
-t/dirlist-abspath.sh \
+t/dir-named-obj-is-bad.sh \
 t/discover.sh \
 t/dist-formats.tap \
+t/dist-lzma.sh \
+t/dist-tarZ.sh \
+t/dist-shar.sh \
 t/dist-auxdir-many-subdirs.sh \
 t/dist-auxfile-2.sh \
 t/dist-auxfile.sh \
@@ -408,9 +429,11 @@ t/distcheck-hook2.sh \
 t/distcheck-writable-srcdir.sh \
 t/distcheck-missing-m4.sh \
 t/distcheck-outdated-m4.sh \
+t/distcheck-no-prefix-or-srcdir-override.sh \
 t/distcheck-override-infodir.sh \
 t/distcheck-pr9579.sh \
 t/distcheck-pr10470.sh \
+t/distcheck-pr18286.sh \
 t/dmalloc.sh \
 t/doc-parsing-buglets-colneq-subst.sh \
 t/doc-parsing-buglets-tabs.sh \
@@ -420,10 +443,8 @@ t/dollarvar2.sh \
 t/double.sh \
 t/dup2.sh \
 t/else.sh \
-t/empty.sh \
-t/empty2.sh \
-t/empty3.sh \
-t/empty4.sh \
+t/empty-data-primary.sh \
+t/empty-sources-primary.tap \
 t/exdir.sh \
 t/exdir2.sh \
 t/exdir3.sh \
@@ -431,35 +452,33 @@ t/exeext.sh \
 t/exeext2.sh \
 t/exeext3.sh \
 t/exeext4.sh \
-t/exsource.sh \
+t/extra-sources.sh \
 t/ext.sh \
 t/ext2.sh \
 t/ext3.sh \
 t/extra.sh \
-t/extra2.sh \
-t/extra3.sh \
-t/extra4.sh \
-t/extra5.sh \
-t/extra6.sh \
-t/extra7.sh \
-t/extra8.sh \
-t/extra9.sh \
-t/extra10.sh \
-t/extra11.sh \
-t/extra12.sh \
+t/extra-sources-no-spurious.sh \
+t/extra-data.sh \
+t/extra-dist-vpath-dir.sh \
+t/extra-dist-dirs-and-subdirs.sh \
+t/extra-dist-vpath-dir-merge.sh \
+t/extra-dist-wildcards.sh \
+t/extra-dist-wildcards-gnu.sh \
+t/extra-dist-wildcards-vpath.sh \
+t/extra-programs-misc.sh \
+t/extra-programs-and-libs.sh \
 t/extra-programs-empty.sh \
 t/extra-portability.sh \
 t/extra-portability2.sh \
 t/extra-portability3.sh \
-t/extradep.sh \
-t/extradep2.sh \
+t/extra-deps.sh \
+t/extra-deps-lt.sh \
 t/f90only.sh \
 t/flavor.sh \
 t/flibs.sh \
 t/fn99.sh \
 t/fn99subdir.sh \
 t/fnoc.sh \
-t/fo.sh \
 t/forcemiss.sh \
 t/forcemiss2.sh \
 t/fort1.sh \
@@ -474,9 +493,11 @@ t/gcj3.sh \
 t/gcj4.sh \
 t/gcj5.sh \
 t/gcj6.sh \
-t/gettext.sh \
-t/gettext2.sh \
-t/gettext3.sh \
+t/gettext-basics.sh \
+t/gettext-config-rpath.sh \
+t/gettext-external-pr338.sh \
+t/gettext-intl-subdir.sh \
+t/gettext-pr381.sh \
 t/gnumake.sh \
 t/gnuwarn.sh \
 t/gnuwarn2.sh \
@@ -494,21 +515,19 @@ t/help-depend2.sh \
 t/help-dmalloc.sh \
 t/help-init.sh \
 t/help-lispdir.sh \
-t/help-multilib.sh \
 t/help-python.sh \
 t/help-silent.sh \
 t/help-upc.sh \
 t/hfs.sh \
 t/implicit.sh \
-t/info.sh \
 t/init.sh \
 t/init2.sh \
-t/insh2.sh \
-t/install2.sh \
+t/dist-install-sh.sh \
+t/dist-with-unreadable-makefile-fails.sh \
 t/installdir.sh \
-t/instsh.sh \
-t/instsh2.sh \
-t/instsh3.sh \
+t/add-missing-install-sh.sh \
+t/install-sh-unittests.sh \
+t/install-sh-option-C.sh \
 t/instdat.sh \
 t/instdat2.sh \
 t/instdir.sh \
@@ -566,9 +585,11 @@ t/lex5.sh \
 t/lexcpp.sh \
 t/lexvpath.sh \
 t/lex-subobj-nodep.sh \
+t/lex-header.sh \
 t/lex-lib.sh \
 t/lex-lib-external.sh \
 t/lex-libobj.sh \
+t/lex-multiple.sh \
 t/lex-noyywrap.sh \
 t/lex-clean-cxx.sh \
 t/lex-clean.sh \
@@ -579,7 +600,7 @@ t/lex-line.sh \
 t/lex-nodist.sh \
 t/lex-pr204.sh \
 t/lflags.sh \
-t/lflags2.sh \
+t/lflags-cxx.sh \
 t/libexec.sh \
 t/libobj-basic.sh \
 t/libobj2.sh \
@@ -634,7 +655,13 @@ t/lisp5.sh \
 t/lisp6.sh \
 t/lisp7.sh \
 t/lisp8.sh \
+t/lisp-loadpath.sh \
+t/lisp-subdir.sh \
+t/lisp-subdir2.sh \
+t/lisp-subdir-mix.sh \
 t/lispdry.sh \
+t/lisp-pr11806.sh \
+t/lisp-flags.sh \
 t/listval.sh \
 t/location.sh \
 t/longline.sh \
@@ -648,7 +675,6 @@ t/ltinstloc.sh \
 t/ltlibobjs.sh \
 t/ltlibsrc.sh \
 t/ltorder.sh \
-t/lzma.sh \
 t/m4-inclusion.sh \
 t/maintclean.sh \
 t/maintclean-vpath.sh \
@@ -659,12 +685,13 @@ t/makej.sh \
 t/makej2.sh \
 t/maken.sh \
 t/maken3.sh \
-t/make-dryrun.tap \
 t/makevars.sh \
+t/make-dryrun.tap \
+t/make-keepgoing.tap \
+t/make-is-gnu.sh \
 t/man.sh \
 t/man2.sh \
 t/man3.sh \
-t/man4.sh \
 t/man5.sh \
 t/man6.sh \
 t/man7.sh \
@@ -675,22 +702,20 @@ t/mdate3.sh \
 t/mdate4.sh \
 t/mdate5.sh \
 t/mdate6.sh \
-t/missing.sh \
-t/missing2.sh \
+t/missing-version-mismatch.sh \
 t/missing3.sh \
-t/missing4.sh \
-t/missing5.sh \
-t/missing6.sh \
+t/am-missing-prog.sh \
 t/missing-auxfile-stops-makefiles-creation.sh \
+t/mkdir_p.sh \
 t/mkdirp-deprecation.sh \
 t/mkinstall.sh \
 t/mkinst2.sh \
 t/mkinst3.sh \
 t/mmode.sh \
 t/mmodely.sh \
-t/multlib.sh \
+t/no-extra-c-stuff.sh \
 t/no-extra-makefile-code.sh \
-t/no-outdir-option.sh \
+t/no-spurious-install-recursive.sh \
 t/nobase.sh \
 t/nobase-libtool.sh \
 t/nobase-python.sh \
@@ -719,7 +744,6 @@ t/objcxx-flags.sh \
 t/objcxx-deps.sh \
 t/objc-megademo.sh \
 t/objext-pr10128.sh \
-t/obsolete.sh \
 t/oldvars.sh \
 t/order.sh \
 t/output.sh \
@@ -738,21 +762,23 @@ t/output13.sh \
 t/output-order.sh \
 t/override-conditional-1.sh \
 t/override-conditional-2.sh \
+t/override-conditional-pr13940.sh \
 t/override-html.sh \
 t/override-suggest-local.sh \
 t/parallel-am.sh \
 t/parallel-am2.sh \
 t/parallel-am3.sh \
 t/serial-tests.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/parallel-tests9.sh \
-t/parallel-tests10.sh \
+t/parallel-tests-basics.sh \
+t/parallel-tests-concurrency.sh \
+t/parallel-tests-concurrency-2.sh \
+t/parallel-tests-empty.sh \
+t/parallel-tests-exit-status-reported.sh \
+t/parallel-tests-generated-and-distributed.sh \
+t/parallel-tests-recheck.sh \
+t/parallel-tests-trailing-whitespace.sh \
 t/parallel-tests-recheck-depends-on-all.sh \
+t/parallel-tests-recheck-pr11791.sh \
 t/parallel-tests-exeext.sh \
 t/parallel-tests-suffix.sh \
 t/parallel-tests-suffix-prog.sh \
@@ -781,8 +807,6 @@ t/parallel-tests-no-spurious-summary.sh \
 t/parallel-tests-exit-statuses.sh \
 t/parallel-tests-console-output.sh \
 t/parallel-tests-once.sh \
-t/parallel-tests-trailing-bslash.sh \
-t/parallel-tests-many.sh \
 t/tests-environment.sh \
 t/am-tests-environment.sh \
 t/tests-environment-backcompat.sh \
@@ -820,7 +844,9 @@ t/test-extensions-cond.sh \
 t/parse.sh \
 t/percent.sh \
 t/percent2.sh \
+t/per-target-flags.sh \
 t/phony.sh \
+t/precious.sh \
 t/pluseq.sh \
 t/pluseq2.sh \
 t/pluseq3.sh \
@@ -864,6 +890,10 @@ t/pr401.sh \
 t/pr401b.sh \
 t/pr401c.sh \
 t/prefix.sh \
+t/preproc-basics.sh \
+t/preproc-c-compile.sh \
+t/preproc-demo.sh \
+t/preproc-errmsg.sh \
 t/primary.sh \
 t/primary2.sh \
 t/primary3.sh \
@@ -875,7 +905,6 @@ t/print-libdir.sh \
 t/proginst.sh \
 t/programs-primary-rewritten.sh \
 t/py-compile-basic.sh \
-t/py-compile-basic2.sh \
 t/py-compile-basedir.sh \
 t/py-compile-destdir.sh \
 t/py-compile-env.sh \
@@ -884,49 +913,55 @@ t/py-compile-usage.sh \
 t/python.sh \
 t/python2.sh \
 t/python3.sh \
-t/python4.sh \
-t/python5.sh \
-t/python5b.sh \
-t/python6.sh \
-t/python7.sh \
-t/python8.sh \
-t/python9.sh \
 t/python10.sh \
 t/python11.sh \
 t/python12.sh \
+t/python-am-path-iftrue.sh \
+t/python-missing.sh \
+t/python-too-old.sh \
 t/python-dist.sh \
 t/python-vars.sh \
 t/python-virtualenv.sh \
 t/python-pr10995.sh \
-t/recurs.sh \
-t/recurs2.sh \
+t/recurs-user.sh \
+t/recurs-user2.sh \
+t/recurs-user-deeply-nested.sh \
+t/recurs-user-indir.sh \
+t/recurs-user-keep-going.sh \
+t/recurs-user-many.sh \
+t/recurs-user-no-subdirs.sh \
+t/recurs-user-no-top-level.sh \
+t/recurs-user-override.sh \
+t/recurs-user-phony.sh \
+t/recurs-user-wrap.sh \
 t/relativize.tap \
-t/remake.sh \
-t/remake1a.sh \
-t/remake2.sh \
-t/remake3.sh \
-t/remake3a.sh \
-t/remake4.sh \
-t/remake5.sh \
-t/remake6.sh \
-t/remake7.sh \
-t/remake8a.sh \
-t/remake8b.sh \
-t/remake9a.sh \
-t/remake9b.sh \
-t/remake9c.sh \
-t/remake9d.sh \
-t/remake10a.sh \
-t/remake10b.sh \
-t/remake10c.sh \
-t/remake11.sh \
-t/remake12.sh \
+t/remake-fail.sh \
+t/remake-not-after-make-dist.sh \
+t/remake-maintainer-mode.sh \
+t/remake-makefile-intree.sh \
+t/remake-makefile-vpath.sh \
+t/remake-after-configure-ac.sh \
+t/remake-after-makefile-am.sh \
+t/remake-after-acinclude-m4.sh \
+t/remake-after-aclocal-m4.sh \
+t/remake-include-configure.sh \
+t/remake-include-makefile.sh \
+t/remake-include-aclocal.sh \
+t/remake-config-status-dependencies.sh \
+t/remake-configure-dependencies.sh \
+t/remake-deeply-nested.sh \
+t/remake-mild-stress.sh \
 t/remake-all-1.sh \
 t/remake-all-2.sh \
-t/remake-subdir-from-subdir.sh \
-t/remake-subdir-gnu.sh \
+t/remake-recurs-user.sh \
 t/remake-subdir.sh \
 t/remake-subdir2.sh \
+t/remake-subdir3.sh \
+t/remake-subdir-only.sh \
+t/remake-subdir-grepping.sh \
+t/remake-subdir-from-subdir.sh \
+t/remake-subdir-gnu.sh \
+t/remake-subdir-no-makefile.sh \
 t/remake-subdir-long-time.sh \
 t/remake-gnulib-add-acsubst.sh \
 t/remake-gnulib-add-header.sh \
@@ -942,68 +977,54 @@ t/remake-deleted-am-2.sh \
 t/remake-deleted-am-subdir.sh \
 t/remake-deleted-am.sh \
 t/remake-renamed-am.sh \
-t/pr8365-remake-timing.sh \
-t/req.sh \
-t/reqd.sh \
+t/remake-aclocal-version-mismatch.sh \
+t/remake-macrodir.sh \
+t/remake-timing-bug-pr8365.sh \
 t/reqd2.sh \
 t/repeated-options.sh \
+t/rm-f-probe.sh \
 t/rulepat.sh \
-t/self-check-cleanup.tap \
+t/self-check-cc-no-c-o.sh \
 t/self-check-configure-help.sh \
 t/self-check-dir.tap \
-t/self-check-env-sanitize.tap \
 t/self-check-exit.tap \
 t/self-check-explicit-skips.sh \
 t/self-check-is_newest.tap \
 t/self-check-me.tap \
-t/self-check-reexec.tap \
 t/self-check-report.sh \
-t/self-check-sanity.sh \
 t/self-check-seq.tap \
+t/self-check-shell-no-trail-bslash.sh \
 t/self-check-is-blocked-signal.tap \
-t/self-check-tap.sh \
 t/self-check-unindent.tap \
 t/sanity.sh \
-t/scripts.sh \
 t/seenc.sh \
-t/silent.sh \
-t/silent2.sh \
-t/silent3.sh \
-t/silent4.sh \
-t/silent6.sh \
-t/silent7.sh \
-t/silent8.sh \
-t/silent9.sh \
-t/silentcxx.sh \
-t/silentcxx-gcc.sh \
-t/silentf77.sh \
-t/silentf90.sh \
-t/silent-amopts.sh \
-t/silent-many-gcc.sh \
-t/silent-many-generic.sh \
-t/silent-nowarn.sh \
-t/silent-configsite.sh \
-t/silent-nested-vars.sh \
+t/silent-c.sh \
+t/silent-cxx.sh \
+t/silent-lt.sh \
+t/silent-f77.sh \
+t/silent-f90.sh \
+t/silent-many-languages.sh \
+t/silent-gen.sh \
+t/silent-texi.sh \
 t/silent-lex.sh \
 t/silent-yacc.sh \
 t/silent-yacc-headers.sh \
-t/srcsub.sh \
-t/srcsub2.sh \
+t/silent-configsite.sh \
+t/silent-nested-vars.sh \
+t/silent-custom.sh \
+t/src-acsubst.sh \
+t/sourcefile-in-subdir.sh \
 t/space.sh \
-t/specflg.sh \
-t/specflg2.sh \
-t/specflg3.sh \
 t/specflg6.sh \
 t/specflg7.sh \
 t/specflg8.sh \
 t/specflg9.sh \
-t/specflg10.sh \
 t/specflg-dummy.sh \
 t/spell.sh \
 t/spell2.sh \
 t/spell3.sh \
 t/spelling.sh \
-t/spy.sh \
+t/spy-double-colon.sh \
 t/spy-rm.tap \
 t/stdinc.sh \
 t/stamph2.sh \
@@ -1015,19 +1036,18 @@ t/strip.sh \
 t/strip2.sh \
 t/strip3.sh \
 t/subdir.sh \
-t/subdir2.sh \
-t/subdir3.sh \
-t/subdir4.sh \
-t/subdir5.sh \
-t/subdir6.sh \
-t/subdir7.sh \
-t/subdir8.sh \
-t/subdir9.sh \
-t/subdir10.sh \
-t/subdirbuiltsources.sh \
-t/subcond.sh \
-t/subcond2.sh \
-t/subcond3.sh \
+t/subdir-ac-subst.sh \
+t/subdir-add-pr46.sh \
+t/subdir-add2-pr46.sh \
+t/subdir-am-cond.sh \
+t/subdir-cond-err.sh \
+t/subdir-cond-gettext.sh \
+t/subdir-env-interference.sh \
+t/subdir-order.sh \
+t/subdir-with-slash.sh \
+t/subdir-subsub.sh \
+t/subdir-distclean.sh \
+t/subdir-keep-going-pr12554.sh \
 t/subobj.sh \
 t/subobj2.sh \
 t/subobj4.sh \
@@ -1041,11 +1061,16 @@ t/subobj11a.sh \
 t/subobj11b.sh \
 t/subobj11c.sh \
 t/subobjname.sh \
+t/subobj-clean-pr10697.sh \
+t/subobj-clean-lt-pr10697.sh \
+t/subobj-indir-pr13928.sh \
+t/subobj-vpath-pr13928.sh \
 t/subpkg.sh \
 t/subpkg2.sh \
 t/subpkg3.sh \
 t/subpkg4.sh \
 t/subpkg-yacc.sh \
+t/subpkg-macrodir.sh \
 t/subst.sh \
 t/subst3.sh \
 t/subst4.sh \
@@ -1067,9 +1092,11 @@ t/suffix8.tap \
 t/suffix9.sh \
 t/suffix10.tap \
 t/suffix11.tap \
-t/suffix12.sh \
-t/suffix13.sh \
 t/suffix-chain.tap \
+t/suffix-custom-pr14441.sh \
+t/suffix-custom-subobj.sh \
+t/suffix-custom-subobj-and-specflg.sh \
+t/suffix-extra-c-stuff-pr14560.sh \
 t/symlink.sh \
 t/symlink2.sh \
 t/syntax.sh \
@@ -1132,7 +1159,6 @@ t/tap-planskip-whitespace.sh \
 t/tap-planskip-badexit.sh \
 t/tap-planskip-bailout.sh \
 t/tap-planskip-later-errors.sh \
-t/tap-realtime.sh \
 t/tap-test-number-0.sh \
 t/tap-recheck-logs.sh \
 t/tap-result-comment.sh \
@@ -1158,45 +1184,51 @@ t/tap-summary-color.sh \
 t/tags.sh \
 t/tags2.sh \
 t/tagsub.sh \
-t/tar.sh \
-t/tar2.sh \
-t/tar3.sh \
+t/tags-pr12372.sh \
+t/tar-ustar.sh \
+t/tar-pax.sh \
+t/tar-opts-errors.sh \
+t/tar-ustar-id-too-high.sh \
 t/tar-override.sh \
 t/target-cflags.sh \
 t/targetclash.sh \
 t/tests-environment-fd-redirect.sh \
 t/tests-environment-and-log-compiler.sh \
-t/txinfo.sh \
-t/txinfo2.sh \
-t/txinfo3.sh \
-t/txinfo4.sh \
-t/txinfo5.sh \
-t/txinfo5b.sh \
-t/txinfo6.sh \
-t/txinfo7.sh \
-t/txinfo8.sh \
-t/txinfo9.sh \
-t/txinfo10.sh \
-t/txinfo13.sh \
-t/txinfo16.sh \
-t/txinfo17.sh \
+t/txinfo-absolute-srcdir-pr408.sh \
+t/txinfo-add-missing-and-dist.sh \
+t/txinfo-bsd-make-recurs.sh \
+t/txinfo-builddir.sh \
+t/txinfo-clean.sh \
+t/txinfo-dvi-recurs.sh \
+t/txinfo-info-in-srcdir.sh \
+t/txinfo-include.sh \
+t/txinfo-makeinfo-error-no-clobber.sh \
+t/txinfo-many-output-formats.sh \
+t/txinfo-many-output-formats-vpath.sh \
+t/txinfo-nodist-info.sh \
+t/txinfo-no-clutter.sh \
+t/txinfo-no-extra-dist.sh \
+t/txinfo-no-installinfo.sh \
+t/txinfo-no-repeated-targets.sh \
+t/txinfo-other-suffixes.sh \
+t/txinfo-override-infodeps.sh \
+t/txinfo-override-texinfo-tex.sh \
+t/txinfo-setfilename-repeated.sh \
+t/txinfo-setfilename-suffix-strip.sh \
+t/txinfo-subdir-pr343.sh \
+t/txinfo-tex-dist.sh \
+t/txinfo-unrecognized-extension.sh \
+t/txinfo-unrecognized-info-suffix.sh \
+t/txinfo-vtexi.sh \
+t/txinfo-vtexi2.sh \
+t/txinfo-vtexi3.sh \
+t/txinfo-vtexi4.sh \
+t/txinfo-without-info-suffix.sh \
 t/txinfo19.sh \
-t/txinfo20.sh \
-t/txinfo21.sh \
-t/txinfo22.sh \
 t/txinfo23.sh \
 t/txinfo24.sh \
 t/txinfo25.sh \
-t/txinfo26.sh \
-t/txinfo27.sh \
 t/txinfo28.sh \
-t/txinfo29.sh \
-t/txinfo30.sh \
-t/txinfo31.sh \
-t/txinfo32.sh \
-t/txinfo33.sh \
-t/txinfo-no-clutter.sh \
-t/txinfo-unrecognized-extension.sh \
 t/transform.sh \
 t/transform2.sh \
 t/transform3.sh \
@@ -1206,35 +1238,32 @@ t/unused.sh \
 t/upc.sh \
 t/upc2.sh \
 t/upc3.sh \
-t/vala.sh \
-t/vala2.sh \
-t/vala3.sh \
-t/vala4.sh \
-t/vala5.sh \
-t/vala-vapi.sh \
+t/vala-configure.sh \
+t/vala-grepping.sh \
 t/vala-headers.sh \
 t/vala-libs.sh \
-t/vala-vpath.sh \
 t/vala-mix.sh \
 t/vala-mix2.sh \
+t/vala-non-recursive-setup.sh \
 t/vala-parallel.sh \
+t/vala-per-target-flags.sh \
+t/vala-recursive-setup.sh \
+t/vala-vapi.sh \
+t/vala-vpath.sh \
 t/vars.sh \
 t/vars3.sh \
+t/var-recurs.sh \
+t/var-recurs2.sh \
 t/vartar.sh \
 t/vartypos.sh \
 t/vartypo2.sh \
-t/version.sh \
-t/version2.sh \
 t/version3.sh \
 t/version4.sh \
 t/version6.sh \
 t/version7.sh \
 t/version8.sh \
 t/vpath.sh \
-t/vtexi.sh \
-t/vtexi2.sh \
-t/vtexi3.sh \
-t/vtexi4.sh \
+t/warnings-obsolete-default.sh \
 t/warnings-override.sh \
 t/warnings-precedence.sh \
 t/warnings-strictness-interactions.sh \
@@ -1248,15 +1277,10 @@ t/werror3.sh \
 t/werror4.sh \
 t/whoami.sh \
 t/xsource.sh \
-t/yacc.sh \
-t/yacc2.sh \
-t/yacc4.sh \
-t/yacc5.sh \
-t/yacc7.sh \
-t/yacc8.sh \
-t/yaccdry.sh \
-t/yaccpp.sh \
-t/yaccvpath.sh \
+t/yacc-misc.sh \
+t/yacc-dry.sh \
+t/yacc-cxx-grepping.sh \
+t/yacc-vpath.sh \
 t/yacc-auxdir.sh \
 t/yacc-basic.sh \
 t/yacc-cxx.sh \
@@ -1272,13 +1296,17 @@ t/yacc-depend.sh \
 t/yacc-depend2.sh \
 t/yacc-dist-nobuild-subdir.sh \
 t/yacc-dist-nobuild.sh \
+t/yacc-grepping.sh \
+t/yacc-grepping2.sh \
+t/yacc-headers-and-dist-pr47.sh \
 t/yacc-line.sh \
 t/yacc-mix-c-cxx.sh \
 t/yacc-nodist.sh \
 t/yacc-pr204.sh \
+t/yacc-subdir.sh \
 t/yacc-weirdnames.sh \
 t/yflags.sh \
-t/yflags2.sh \
+t/yflags-cxx.sh \
 t/yflags-cmdline-override.sh \
 t/yflags-conditional.sh \
 t/yflags-d-false-positives.sh \
@@ -1286,7 +1314,8 @@ t/yflags-force-conditional.sh \
 t/yflags-force-override.sh \
 t/yflags-var-expand.sh \
 t/libtool-macros.sh \
-t/gettext-macros.sh
+t/gettext-macros.sh \
+t/pkg-config-macros.sh
 
 print-list-of-tests:
        @echo $(handwritten_TESTS)
old mode 100755 (executable)
new mode 100644 (file)
index 5e2f9a6..76eabad
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2001-2012 Free Software Foundation, Inc.
+# Copyright (C) 2001-2017 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
@@ -18,7 +18,7 @@
 # From Adam J. Richter.
 
 required=libtool
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_SUBST([LTLIBOBJS])
old mode 100755 (executable)
new mode 100644 (file)
index f9dd289..f3b4a11
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2002-2012 Free Software Foundation, Inc.
+# Copyright (C) 2002-2017 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
@@ -16,7 +16,7 @@
 
 # Test for locations in error messages.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AM_CONDITIONAL([COND1], [true])
@@ -48,8 +48,6 @@ END
 # Smash the useless difference of lib file locations.
 smash_useless_diffs ()
 {
-  # FIXME: we could get rid of the second 's,,,' once we improve our
-  # wrapper scripts ...
   sed -e "s,^$am_amdir/\\([a-z]*\.am\\),\\1," \
       -e "s,^automake-$APIVERSION:,automake:," ${1+"$@"};
 }
@@ -84,7 +82,7 @@ END
 
 cat expected
 cat observed
-diff expected observed || Exit 1
+diff expected observed || exit 1
 
 AUTOMAKE_fails -Werror
 smash_useless_diffs stderr >observed
@@ -94,6 +92,6 @@ mv -f t expected
 cat expected
 cat observed
 
-diff expected observed || Exit 1
+diff expected observed || exit 1
 
 :
old mode 100755 (executable)
new mode 100644 (file)
index 1ba8072..d28142f
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2005-2012 Free Software Foundation, Inc.
+# Copyright (C) 2005-2017 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
 # Long lines should be wrapped.
 # Report from Albert Chin.
 
-. ./defs || Exit 1
+. test-init.sh
 
-n=1
-files=
-match=
+n=1 files= match=
 while test $n -le 100
 do
   files="$files filename$n"
   match="..........$match"
-  n=`expr $n + 1`
+  n=$(($n + 1))
 done
-files2=`echo "$files" | sed s/filename/filenameb/g`
+files2=$(echo "$files" | sed s/filename/filenameb/g)
 
 cat >Makefile.am <<EOF
 FOO = $files $files2 \
@@ -44,5 +42,7 @@ EOF
 $ACLOCAL
 $AUTOMAKE
 
-grep $match Makefile.in && Exit 1
+grep $match Makefile.in && exit 1
 grep 'filenameb100 grepme' Makefile.in
+
+:
old mode 100755 (executable)
new mode 100644 (file)
index dd5664d..63dc32c
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2004-2012 Free Software Foundation, Inc.
+# Copyright (C) 2004-2017 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
@@ -17,7 +17,7 @@
 # Long lines of += should be wrapped.
 # Report from Simon Josefsson.
 
-. ./defs || Exit 1
+. test-init.sh
 
 (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;
@@ -27,4 +27,6 @@ done) > Makefile.am
 
 $ACLOCAL
 $AUTOMAKE
-test 80 -ge `grep DUMMY Makefile.in | wc -c`
+test 80 -ge $(grep DUMMY Makefile.in | wc -c)
+
+:
old mode 100755 (executable)
new mode 100644 (file)
index d5098ea..c4f9595
@@ -1,5 +1,5 @@
 #!/bin/sh
-# Copyright (C) 2003-2012 Free Software Foundation, Inc.
+# Copyright (C) 2003-2017 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
@@ -18,7 +18,7 @@
 # This combines two examples from the manual.
 
 required='cc libtoolize'
-. ./defs || Exit 1
+. test-init.sh
 
 cat >>configure.ac <<'END'
 AM_CONDITIONAL([WANT_LIBFOO], [true])
@@ -61,45 +61,46 @@ $ACLOCAL
 $AUTOCONF
 $AUTOMAKE --add-missing
 
+cwd=$(pwd) || fatal_ "getting current working directory"
+
 # Install libraries in lib/, and the rest in empty/.
 # (in fact there is no "rest", so as the name imply empty/ is
 # expected to remain empty).
-./configure "--prefix=`pwd`/empty" "--libdir=`pwd`/lib"
+./configure --prefix="$cwd/empty" --libdir="$cwd/lib"
 
 $MAKE
 test -f lib1foo.la
 test -f lib1bar.la
 test -f lib2foo.la
-test ! -f lib2bar.la
-test ! -f lib3foo.la
-test ! -f lib3bar.la
+test ! -e lib2bar.la
+test ! -e lib3foo.la
+test ! -e lib3bar.la
 
 $MAKE check
-test ! -f lib2bar.la
+test ! -e lib2bar.la
 test -f lib3foo.la
-test ! -f lib3bar.la
+test ! -e lib3bar.la
 
 $MAKE install
 test -f lib/lib1foo.la
 test -f lib/lib1bar.la
 test -f lib/lib2foo.la
-test ! -f lib/lib3foo.la
+test ! -e lib/lib3foo.la
 find empty -type f -print > empty.lst
-cat empty.lst
-test 0 = `wc -l < empty.lst`
+test -s empty.lst && { cat empty.lst; exit 1; }
 
 $MAKE uninstall
 find lib -type f -print > lib.lst
-test 0 = `wc -l < lib.lst`
+test -s lib.lst && { cat lib.lst; exit 1; }
 test -f lib1foo.la
 test -f lib1bar.la
 test -f lib2foo.la
 test -f lib3foo.la
 
 $MAKE clean
-test ! -f lib1foo.la
-test ! -f lib1bar.la
-test ! -f lib2foo.la
-test ! -f lib3foo.la
+test ! -e lib1foo.la
+test ! -e lib1bar.la
+test ! -e lib2foo.la
+test ! -e lib3foo.la
 
 :
old mode 100755 (executable)
new mode 100644 (file)
index 4a72394..f2ec9ec
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2003-2012 Free Software Foundation, Inc.
+# Copyright (C) 2003-2017 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
@@ -17,7 +17,7 @@
 # Test for bug in conditionals.
 
 required='cc native libtoolize'
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_CC
@@ -56,25 +56,19 @@ check-local:
 END
 
 cat > hello-linux.c <<'END'
-const char* str (void)
-{
-  return "hello-linux";
-}
+const char* str = "hello-linux";
 END
 
 cat > hello-generic.c <<'END'
-const char* str (void)
-{
-  return "hello-generic";
-}
+const char* str = "hello-generic";
 END
 
 cat > hello-common.c <<'END'
 #include <stdio.h>
-const char* str (void);
+extern const char* str;
 void print (void)
 {
-  puts (str ());
+  puts (str);
 }
 END
 
old mode 100755 (executable)
new mode 100644 (file)
index 19ed8b3..6ec44a5
@@ -1,5 +1,5 @@
 #!/bin/sh
-# Copyright (C) 2003-2012 Free Software Foundation, Inc.
+# Copyright (C) 2003-2017 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
@@ -18,7 +18,7 @@
 # This example is taken from the manual.
 
 required='cc native libtoolize'
-. ./defs || Exit 1
+. test-init.sh
 
 cat >>configure.ac <<'END'
 AC_PROG_CC
@@ -110,10 +110,12 @@ $ACLOCAL
 $AUTOCONF
 $AUTOMAKE --add-missing
 
+cwd=$(pwd) || fatal_ "getting current working directory"
+
 # Install libraries in lib/, programs in bin/, and the rest in empty/.
 # (in fact there is no "rest", so as the name imply empty/ is
 # expected to remain empty).
-./configure "--prefix=`pwd`/empty" "--libdir=`pwd`/lib" "--bindir=`pwd`/bin"
+./configure --prefix="$cwd/empty" --libdir="$cwd/lib" --bindir="$cwd/bin"
 
 $MAKE
 test -f libtop.la
@@ -132,25 +134,25 @@ test -f installcheck-ok
 rm -f installcheck-ok
 
 find empty -type f -print > empty.lst
-cat empty.lst
-test 0 = `wc -l < empty.lst`
+test -s empty.lst && { cat empty.lst; exit 1; }
 
 $MAKE clean
-test ! -f libtop.la
-test ! -f sub1/libsub1.la
-test ! -f sub2/libsub2.la
-test ! -f sub2/sub21/libsub21.la
-test ! -f sub2/sub22/libsub22.la
-test ! -f ltconvtest
+test ! -e libtop.la
+test ! -e sub1/libsub1.la
+test ! -e sub2/libsub2.la
+test ! -e sub2/sub21/libsub21.la
+test ! -e sub2/sub22/libsub22.la
+test ! -e ltconvtest
 
 $MAKE installcheck
 test -f installcheck-ok
 rm -f installcheck-ok
 
 $MAKE uninstall
-find lib -type f -print > lib.lst
-test 0 = `wc -l < lib.lst`
-find bin -type f -print > bin.lst
-test 0 = `wc -l < bin.lst`
+for d in lib bin; do
+  find $d -type f -print > $d.lst
+  test -s $d.lst && { cat $d.lst; exit 1; }
+  : For shells with busted 'set -e'.
+done
 
 :
old mode 100755 (executable)
new mode 100644 (file)
index 100d045..5623053
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2001-2012 Free Software Foundation, Inc.
+# Copyright (C) 2001-2017 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
@@ -17,7 +17,7 @@
 # Test to make sure libtool library dependencies are correct.
 # Report from Lars J. Aas.
 required=libtool
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AM_PROG_AR
@@ -57,5 +57,5 @@ END
 $ACLOCAL
 $AUTOMAKE
 
-grep 'OBJECTS =$' Makefile.in && Exit 1
-Exit 0
+grep 'OBJECTS =$' Makefile.in && exit 1
+exit 0
old mode 100755 (executable)
new mode 100644 (file)
index 49ddbe0..9d41a88
@@ -1,5 +1,5 @@
 #!/bin/sh
-# Copyright (C) 2011-2012 Free Software Foundation, Inc.
+# Copyright (C) 2011-2017 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
@@ -19,7 +19,7 @@
 # present since libtool 1.9b, circa 2004).
 
 required='cc libtoolize'
-. ./defs || Exit 1
+. test-init.sh
 
 cat >>configure.ac <<'END'
 AC_PROG_CC
@@ -49,14 +49,13 @@ libtoolize
   if test $? -eq 63; then
     skip_ "libtool is too old (probably < 2.0)"
   else
-    Exit 1
+    exit 1
   fi
 }
-$EGREP 'LT_(INIT|PREREQ)' configure && Exit 1 # Sanity check.
+$EGREP 'LT_(INIT|PREREQ)' configure && exit 1 # Sanity check.
 $AUTOMAKE -a
 
-cwd=`pwd`
-./configure --prefix="$cwd/inst" >stdout || { cat stdout; Exit 1; }
+./configure --prefix="$(pwd)/inst" >stdout || { cat stdout; exit 1; }
 cat stdout
 grep '^checking.*dlfcn\.h.* no$' stdout || grep '^checking.*dlopen' stdout
 
old mode 100755 (executable)
new mode 100644 (file)
index 6906994..47ce1ac
@@ -1,5 +1,5 @@
 #!/bin/sh
-# Copyright (C) 2008-2012 Free Software Foundation, Inc.
+# Copyright (C) 2008-2017 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
@@ -18,7 +18,7 @@
 
 
 required='libtoolize'
-. ./defs || Exit 1
+. test-init.sh
 
 cat >>configure.ac <<'END'
 AC_PROG_CC
@@ -35,6 +35,7 @@ lib_LTLIBRARIES = liba1.la sub/liba2.la
 pkglib_LTLIBRARIES = liba1.la
 nobase_lib_LTLIBRARIES = sub/liba2.la
 endif
+AUTOMAKE_OPTIONS = subdir-objects
 END
 
 libtoolize
old mode 100755 (executable)
new mode 100644 (file)
index 5cdccf0..d95dea3
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 1999-2012 Free Software Foundation, Inc.
+# Copyright (C) 1999-2017 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
@@ -17,7 +17,7 @@
 # Test to make sure LTLIBOBJS alone works ok.
 # Report from Vadim Zeitlin.
 required=libtool
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_SUBST([LTLIBOBJS])
old mode 100755 (executable)
new mode 100644 (file)
index 11e2a1d..f40f5b9
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2003-2012 Free Software Foundation, Inc.
+# Copyright (C) 2003-2017 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
@@ -17,7 +17,7 @@
 # Test to make sure a sensible default source for libraries is used.
 
 required='cc libtool'
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_CC
@@ -35,6 +35,8 @@ noinst_LTLIBRARIES = foo.la zoo.d/old2.la
 
 $(srcdir)/zoo_d_old2_la.c: $(srcdir)/old_la.c
        cp $(srcdir)/old_la.c $@
+
+AUTOMAKE_OPTIONS = -Wno-unsupported
 END
 
 cat > foo.c << 'END'
old mode 100755 (executable)
new mode 100644 (file)
index 358e620..0a99f29
@@ -1,5 +1,5 @@
 #!/bin/sh
-# Copyright (C) 2008-2012 Free Software Foundation, Inc.
+# Copyright (C) 2008-2017 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
@@ -17,7 +17,7 @@
 # Test for correct installation order of nobase libtool libraries.
 
 required='cc libtoolize'
-. ./defs || Exit 1
+. test-init.sh
 
 cat >>configure.ac <<'END'
 AC_PROG_CC
@@ -27,6 +27,7 @@ AC_OUTPUT
 END
 
 cat >Makefile.am <<'END'
+AUTOMAKE_OPTIONS = subdir-objects
 nobase_lib_LTLIBRARIES = liba1.la sub/liba2.la sub/liba3.la liba4.la liba5.la
 sub_liba2_la_LIBADD = liba1.la
 sub_liba3_la_LIBADD = sub/liba2.la
@@ -49,14 +50,13 @@ $ACLOCAL
 $AUTOCONF
 $AUTOMAKE --add-missing
 
-./configure "--prefix=`pwd`/inst"
+./configure --prefix="$(pwd)/inst"
 
 $MAKE
-$MAKE install 2>stderr || { cat stderr >&2; Exit 1; }
-cat stderr >&2
-grep 'has not been installed' stderr && Exit 1
+run_make -E install
+grep 'has not been installed' stderr && exit 1
 
 $MAKE uninstall
-test `find inst -type f -print | wc -l` -eq 0
+test $(find inst -type f -print | wc -l) -eq 0
 
 :
old mode 100755 (executable)
new mode 100644 (file)
index 52dae22..9778b38
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 1998-2012 Free Software Foundation, Inc.
+# Copyright (C) 1998-2017 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
@@ -16,7 +16,7 @@
 
 # Test to see if 'm4_sinclude' and 'm4_include' works.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac <<'EOF'
 sinclude([doesntexist.m4])
@@ -48,7 +48,7 @@ echo 'm4_include([sub/h.m4])' >> aclocal.m4
 
 $AUTOMAKE
 
-grep doesntexist Makefile.in && Exit 1
+grep doesntexist Makefile.in && exit 1
 grep MAGICALPIG Makefile.in
 grep MAGICALHOG Makefile.in
 grep GREPME Makefile.in
old mode 100755 (executable)
new mode 100644 (file)
index 11e97a6..f50a58b
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2011-2012 Free Software Foundation, Inc.
+# Copyright (C) 2011-2017 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 # Make sure distclean and maintainer-clean erase the right files.
-# This test is for VPATH builds; see sister test 'maintclean.test'
+# This test is for VPATH builds; see sister test 'maintclean.sh'
 # for in-tree builds.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_CONFIG_FILES([bar sub/Makefile])
@@ -70,10 +70,10 @@ test -f sub/zap
 $test_cache
 
 $MAKE distclean
-test ! -f bar
-test ! -f Makefile
-test ! -f sub/Makefile
-test ! -f config.status
+test ! -e bar
+test ! -e Makefile
+test ! -e sub/Makefile
+test ! -e config.status
 test -f foo.c
 test -f sub/zap
 test -f ../sub/zap.sh
@@ -93,12 +93,12 @@ chmod u+w ..
 
 $MAKE maintainer-clean
 test -f ../sub/zap.sh
-test ! -f bar
-test ! -f foo.c
-test ! -f sub/zap
-test ! -f Makefile
-test ! -f sub/Makefile
-test ! -f config.status
-test ! -d ../autom4te.cache
+test ! -e bar
+test ! -e foo.c
+test ! -e sub/zap
+test ! -e Makefile
+test ! -e sub/Makefile
+test ! -e config.status
+test ! -e ../autom4te.cache
 
 :
old mode 100755 (executable)
new mode 100644 (file)
index c5d3d0e..67fc5cf
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2001-2012 Free Software Foundation, Inc.
+# Copyright (C) 2001-2017 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 # Make sure distclean and maintainer-clean erase the right files.
-# This test is for in-tree builds; see sister test 'maintclean-vpath.test'
+# This test is for in-tree builds; see sister test 'maintclean-vpath.sh'
 # for VPATH builds.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_CONFIG_FILES([bar sub/Makefile])
@@ -64,10 +64,10 @@ test -f sub/zap
 $test_cache
 
 $MAKE distclean
-test ! -f bar
-test ! -f Makefile
-test ! -f sub/Makefile
-test ! -f config.status
+test ! -e bar
+test ! -e Makefile
+test ! -e sub/Makefile
+test ! -e config.status
 test -f foo.c
 test -f sub/zap
 test -f sub/zap.sh
@@ -85,12 +85,12 @@ cd ..
 
 $MAKE maintainer-clean
 test -f sub/zap.sh
-test ! -f bar
-test ! -f foo.c
-test ! -f sub/zap
-test ! -f Makefile
-test ! -f sub/Makefile
-test ! -f config.status
-test ! -d autom4te.cache
+test ! -e bar
+test ! -e foo.c
+test ! -e sub/zap
+test ! -e Makefile
+test ! -e sub/Makefile
+test ! -e config.status
+test ! -e autom4te.cache
 
 :
old mode 100755 (executable)
new mode 100644 (file)
index 8a7c451..d2eaf90
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2010-2012 Free Software Foundation, Inc.
+# Copyright (C) 2010-2017 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
@@ -19,7 +19,7 @@
 # related to the enabling/disabling of maintainer mode are correct (see
 # automake bug#9890).
 
-. ./defs || Exit 1
+. test-init.sh
 
 set_maintmode ()
 {
@@ -34,11 +34,10 @@ set_maintmode ()
 check_configure_message_with ()
 {
   answer=$1; shift
-  ./configure ${1+"$@"} >stdout || { cat stdout; Exit 1; }
+  ./configure ${1+"$@"} >stdout || { cat stdout; exit 1; }
   cat stdout
   grep "^checking whether to enable maintainer-specific.*\\.\\.\\. $answer$" stdout
-  test `grep -c 'checking.*maint' stdout` -eq 1
-  :
+  test $(grep -c 'checking.*maint' stdout) -eq 1
 }
 
 set_maintmode "DEFAULT"
@@ -63,7 +62,7 @@ check_configure_message_with "yes" --enable-maintainer-mode
 set_maintmode "enable"
 
 $AUTOCONF --force
-./configure --help >stdout || { cat stdout; Exit 1; }
+./configure --help >stdout || { cat stdout; exit 1; }
 cat stdout
 grep_configure_help --disable-maintainer-mode 'disable make rules'
 
old mode 100755 (executable)
new mode 100644 (file)
index 2172124..203f975
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2012 Free Software Foundation, Inc.
+# Copyright (C) 2012-2017 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
 
 # Check that $(am__make_dryrun) works as expected.
 
-. ./defs || Exit 1
+. test-init.sh
 
-plan_ 14
+plan_ 60
 
-if echo "all: ; @+printf %sbb%s aa cc" | $MAKE -n -f - | grep aabbcc; then
+if echo "all: ; +@printf %sbb%s aa cc" | $MAKE -n -f - | grep aabbcc; then
   make_plus_silence () { return 0; }
 else
   make_plus_silence () { return 1; }
 fi
 
-mkdir sub
+mkdir none # Also used later.
+if echo nil: | $MAKE -I none -f -; then
+  make_supports_option_I () { return 0; }
+else
+  make_supports_option_I () { return 1; }
+fi
 
 echo AC_OUTPUT >> configure.ac
 
 cat > Makefile.am <<'END'
 all:
        : Dummy, nothing to do.
-foo:
-       $(MAKE) all
-notdry:
-       @echo ":: $$MAKEFLAGS ::"; : For debugging.
-       $(am__make_dryrun) && exit 1; exit 0
+run:
+       @echo ":: $$MAKEFLAGS :: $$MFLAGS ::" ;: For debugging.
+       $(am__make_dryrun) && exit 1; echo ok > from-run
 dry:
-       +@echo ":: $$MAKEFLAGS ::"; : For debugging.
-       +$(am__make_dryrun) || exit 1; echo ok > from-dry-mode
+       +@echo ":: $$MAKEFLAGS :: $$MFLAGS ::" ;: For debugging.
+       +$(am__make_dryrun) || exit 1; echo ok > from-dry
 END
 
+check_make ()
+{
+  msg= mode= condition=: directive= reason= skip_reason=
+  case $1 in
+    --dry) mode=dry;;
+    --run) mode=run;;
+    *) fatal_ "check_run: invalid usage";;
+  esac
+  shift
+  while test $# -gt 0; do
+    case $1 in
+      -C) condition=$2 skip_reason=$3; shift; shift;;
+      -M) msg=$2; shift;;
+      --) shift; break;;
+       *) break;;
+    esac
+    shift
+  done
+  for opts in '' '-s'  '-s -r'; do
+    r=ok
+    pmsg=${mode}${msg:+" [$msg]"}${opts:+" ($opts)"}
+    if $condition; then
+      $MAKE $opts "$mode" ${1+"$@"} || r='not ok'
+      test -f from-$mode            || r='not ok'
+      test ! -e bad                 || r='not ok'
+      rm -f bad from-*              || fatal_ "cleaning up"
+    else
+      directive=SKIP reason=$skip_reason
+    fi
+    result_ "$r" -D "$directive" -r "$reason" "$pmsg"
+  done
+  unset r msg pmsg opts mode condition directive reason skip_reason
+}
+
+# ----------------------------------------------------------------------
+
 $ACLOCAL    || fatal_ "aclocal failed"
 $AUTOCONF   || fatal_ "autoconf failed"
 $AUTOMAKE   || fatal_ "automake failed"
@@ -50,48 +89,40 @@ $AUTOMAKE   || fatal_ "automake failed"
 
 # ----------------------------------------------------------------------
 
-check_no_dryrun ()
-{
-  command_ok_ "dry-run ($cnt)" $MAKE notdry ${1+"$@"}
-  cnt=`expr $cnt + 1`
-}
-cnt=1
-
-check_no_dryrun
+check_make --run
 
 # Test against a known regression.  This was especially heinous, since
 # make running in normal mode was sometimes mistaken for make running
 # in dry mode.
-check_no_dryrun TESTS="n1.test n2.test"
-check_no_dryrun TESTS="n1 n2" AM_MAKEFLAGS="TESTS='n1 n2'"
-check_no_dryrun TESTS="n1 n2" AM_MAKEFLAGS='TESTS="n1 n2"'
-check_no_dryrun FOOFLAGS="-n -n -knf2 n --none -n"
-check_no_dryrun MYFLAGS="-n --dryrun -n --dry-run -n"
+check_make --run TESTS="n1.test n2.test"
+check_make --run TESTS="n1 n2" AM_MAKEFLAGS="TESTS='n1 n2'"
+check_make --run TESTS="n1 n2" AM_MAKEFLAGS='TESTS="n1 n2"'
+check_make --run FOOFLAGS="-n -n -knf2 n --none -n"
+check_make --run MYFLAGS="-n --dryrun -n --dry-run -n"
 
 # ----------------------------------------------------------------------
 
-check_dryrun ()
-{
-  r=ok directive=
-  case $1 in
-    -C) condition=$2 reason=$3; shift; shift; shift;;
-     *) condition=: reason=;;
-  esac
-  if $condition; then
-    $MAKE dry ${1+"$@"}   || r='not ok'
-    test -f from-dry-mode || r='not ok'
-    rm -f from-dry-mode   || fatal_ "cleaning up"
-  else
-    directive=SKIP
-  fi
-  result_ "$r" -D "$directive" -r "$reason" "not dry-run ($cnt)"
-  unset r directive reason
-  cnt=`expr $cnt + 1`
-}
-cnt=1
+check_make --dry -C make_plus_silence 'recipe prefix "+" unsupported' -n
+check_make --dry -C using_gmake "\$MAKE is not GNU make" --dry-run -k
+
+# ----------------------------------------------------------------------
+
+# Automake bug#13760: the "n" in "none" used to confound am__make_dryrun
+# into thinking the '-n' option had been passed.
+
+pr='bug#13760'
+
+check_make --run -C make_supports_option_I "-I make option unsupported" \
+                 -M "$pr" -I none
+
+check_make --run -C using_gmake "\$MAKE is not GNU make" \
+                 -M "$pr" -I none --include dry-run
+
+check_make --dry -C make_supports_option_I "-I make option unsupported" \
+                 -M "$pr" -I none -n
 
-check_dryrun -C make_plus_silence 'recipe prefix "+" unsupported' -n
-check_dryrun -C using_gmake "\$MAKE is not GNU make" --dry-run -k
+check_make --dry -C using_gmake "\$MAKE is not GNU make" \
+                 -M "$pr" --dry-run -I none --include dry-run
 
 # ----------------------------------------------------------------------
 
@@ -99,25 +130,17 @@ check_dryrun -C using_gmake "\$MAKE is not GNU make" --dry-run -k
 
 check_metachars ()
 {
-  r=ok
-  $MAKE notdry ${1+"$@"} || r='not ok'
-  if test -f bad; then
-    r='not ok'
-  else
-    rm -f bad || fatal_ "cleaning up"
-  fi
-  result_ "$r" "dry-run, with shell metachars ($cnt)"
-  unset r
-  cnt=`expr $cnt + 1`
+  check_make --run -M "metachars" "$@"
 }
-cnt=1
 
 check_metachars MYFLAGS="-n \"n\" '-n' --none -n"
 check_metachars MYFLAGS='-knf2\ n\ \\n'
 check_metachars MYFLAGS="(&) | ; \" \` '"
 check_metachars MYFLAGS=" ' # ' "
 check_metachars MYFLAGS='$(foo)'
+check_metachars MYFLAGS='$(foo -n)'
 check_metachars MYFLAGS='`touch bad`'
+check_metachars MYFLAGS='`touch --dry-run bad`'
 
 # ----------------------------------------------------------------------
 
diff --git a/t/make-is-gnu.sh b/t/make-is-gnu.sh
new file mode 100644 (file)
index 0000000..13fb176
--- /dev/null
@@ -0,0 +1,65 @@
+#! /bin/sh
+# Copyright (C) 2013-2017 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 $(am__is_gnu_make) can be used to correctly determine if
+# we are running under GNU make.
+
+. test-init.sh
+
+if using_gmake; then
+ as_expected () { test $1 -eq 0 && test -f ok && test ! -e ko; }
+else
+ as_expected () { test $1 -gt 0 && test -f ko && test ! -e ok; }
+fi
+
+echo AC_OUTPUT >> configure.ac
+
+cat > Makefile.am <<'END'
+all: file
+       $(am__is_gnu_make)
+file:
+       if $(am__is_gnu_make); then : > ok; else : > ko; fi
+END
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE
+./configure
+
+st=0; $MAKE || st=$?
+if using_gmake; then
+ test $st -eq 0
+ test -f ok
+ test ! -e ko
+else
+ test $st -gt 0
+ test -f ko
+ test ! -e ok
+fi
+
+rm -f ok ko
+
+run_make -M -- -s file
+if using_gmake; then
+ test -f ok
+ test ! -e ko
+else
+ test -f ko
+ test ! -e ok
+fi
+test ! -s output
+
+:
diff --git a/t/make-keepgoing.tap b/t/make-keepgoing.tap
new file mode 100644 (file)
index 0000000..cce23c3
--- /dev/null
@@ -0,0 +1,137 @@
+#! /bin/sh
+# Copyright (C) 2013-2017 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 $(am__make_keepgoing) works as expected.
+
+. test-init.sh
+
+plan_ 60
+
+mkdir kool # Also used later.
+if echo nil: | $MAKE -I kool -f -; then
+  make_supports_option_I () { return 0; }
+else
+  make_supports_option_I () { return 1; }
+fi
+
+echo AC_OUTPUT >> configure.ac
+
+cat > Makefile.am <<'END'
+all:
+       @echo 'Default target $@ should not be called'>&2; exit 1;
+k-y:
+       @echo ":: $$MAKEFLAGS :: $$MFLAGS ::" ;: For debugging.
+       $(am__make_keepgoing)
+k-n:
+       @echo ":: $$MAKEFLAGS :: $$MFLAGS ::" ;: For debugging.
+       $(am__make_keepgoing) && exit 1; exit 0
+END
+
+check_make ()
+{
+  msg= mode= condition=: directive= reason= skip_reason=
+  case $1 in
+    k-[yn]) mode=$1;;
+    *) fatal_ "check_run: invalid usage";;
+  esac
+  shift
+  while test $# -gt 0; do
+    case $1 in
+      -C) condition=$2 skip_reason=$3; shift; shift;;
+      -M) msg=$2; shift;;
+      -X) directive=TODO;;
+      --) shift; break;;
+       *) break;;
+    esac
+    shift
+  done
+  for opts in '' '-s'  '-s -r'; do
+    r=ok
+    pmsg=${mode}${msg:+" [$msg]"}${opts:+" ($opts)"}
+    if $condition; then
+      $MAKE $opts "$mode" ${1+"$@"} || r='not ok'
+    else
+      directive=SKIP reason=$skip_reason
+    fi
+    result_ "$r" -D "$directive" -r "$reason" "$pmsg"
+  done
+  unset r msg pmsg opts mode condition directive reason skip_reason
+}
+
+# ----------------------------------------------------------------------
+
+$ACLOCAL    || fatal_ "aclocal failed"
+$AUTOCONF   || fatal_ "autoconf failed"
+$AUTOMAKE   || fatal_ "automake failed"
+./configure || fatal_ "configure failed"
+
+# ----------------------------------------------------------------------
+
+check_make k-n
+
+# Test against a possible regressions similar to those that affected
+# detection of dry mode ("make -n").
+check_make k-n TESTS="k.test k2.test"
+check_make k-n TESTS="k1 k2" AM_MAKEFLAGS="TESTS='k1 k2'"
+check_make k-n TESTS="k1 k k2" AM_MAKEFLAGS='TESTS="k1 k k2"'
+check_make k-n FOOFLAGS="-k -k -nkf2 k -ks --keep -k"
+check_make k-n MYFLAGS="-k --keepgoing -k --keep-run -k"
+
+# ----------------------------------------------------------------------
+
+check_make k-y -k
+check_make k-y -C using_gmake "\$MAKE is not GNU make" --keep-going
+
+# ----------------------------------------------------------------------
+
+# Related to automake bug#12554: the "k" in "kool" used to confound
+# am__make_keepgoing into thinking the '-k' option had been passed.
+
+pr='bug#12554'
+
+check_make k-n -C make_supports_option_I "-I make option unsupported" \
+               -M "$pr" -I kool
+
+check_make k-n -C using_gmake "\$MAKE is not GNU make" \
+               -M "$pr" -I kool --include keep-going
+
+check_make k-y -C make_supports_option_I "-I make option unsupported" \
+               -M "$pr" -I kool -k
+
+check_make k-y -C using_gmake "\$MAKE is not GNU make" \
+               -M "$pr" --keep-going -I kool --include keep-going
+
+# ----------------------------------------------------------------------
+
+# Test for when shell metacharacters or backslashes are in $(MAKEFLAGS).
+
+check_metachars ()
+{
+  check_make k-n -M "metachars" "$@"
+}
+
+check_metachars MYFLAGS="-k \"k\" '-k' --keep-going -k"
+check_metachars MYFLAGS='-knf2\ k\ \\k'
+check_metachars MYFLAGS="(&) | ; \" \` '"
+check_metachars MYFLAGS=" ' # ' "
+check_metachars MYFLAGS='$(foo)'
+check_metachars MYFLAGS='$(foo -k)'
+check_metachars MYFLAGS='`touch bad`'
+check_metachars MYFLAGS='`touch --keep-going bad`'
+
+# ----------------------------------------------------------------------
+
+:
old mode 100755 (executable)
new mode 100644 (file)
index e292e38..8ff715f
--- a/t/make.sh
+++ b/t/make.sh
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2001-2012 Free Software Foundation, Inc.
+# Copyright (C) 2001-2017 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
@@ -18,7 +18,7 @@
 # From Ralf Corsepius.
 
 required=GNUmake
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AM_MAKE_INCLUDE
@@ -49,4 +49,4 @@ for flag in '' -w; do
    rm -f config.cache
 done
 
-Exit 0
+exit 0
old mode 100755 (executable)
new mode 100644 (file)
index 83f3cae..0d4e9ca
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2011-2012 Free Software Foundation, Inc.
+# Copyright (C) 2011-2017 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
 # Make sure we don't emit a rule with empty target if list of
 # automatically-computed dependencies for Makefile.in is empty.
 
-. ./defs || Exit 1
+. test-init.sh
 
 : > Makefile.am
 
 $ACLOCAL
 $AUTOMAKE
 
-grep "^ *:" Makefile.in && Exit 1
+grep "^ *:" Makefile.in && exit 1
 
 :
old mode 100755 (executable)
new mode 100644 (file)
index 64c5f28..80efd64
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2003-2012 Free Software Foundation, Inc.
+# Copyright (C) 2003-2017 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
@@ -22,7 +22,7 @@
 # via autom4te.
 
 required=GNUmake
-. ./defs || Exit 1
+. test-init.sh
 
 cat >configure.ac <<END
 m4_include([version.m4])
old mode 100755 (executable)
new mode 100644 (file)
index 8183887..c23d8f6
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2009-2012 Free Software Foundation, Inc.
+# Copyright (C) 2009-2017 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
@@ -18,7 +18,7 @@
 # without -B, it may reuse the same shell for separate commands in a
 # rule, which can lead to interesting results.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat >>configure.ac <<'END'
 AC_OUTPUT
@@ -35,10 +35,10 @@ $AUTOMAKE
 
 mkdir build
 cd build
-../configure "--prefix=`pwd`/inst"
+../configure --prefix="$(pwd)/inst"
 
 $MAKE -j2 || skip_ "$MAKE failed to run with two parallel jobs"
 $MAKE -j2 distcheck
 $MAKE test-distdir-removed
 
-Exit 0
+:
old mode 100755 (executable)
new mode 100644 (file)
index bb64444..ce9c22e
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2009-2012 Free Software Foundation, Inc.
+# Copyright (C) 2009-2017 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
@@ -19,7 +19,7 @@
 # Also, ensure that 'make -n dist' and 'make -n distcheck' show what
 # would happen, at least when using GNU make.
 
-. ./defs || Exit 1
+. test-init.sh
 
 mkdir sub
 
@@ -47,16 +47,16 @@ $AUTOCONF
 $AUTOMAKE
 ./configure
 
-$sleep
 echo stamp > stampfile
 $sleep
 for target in dist distcheck; do
   $MAKE -n $target
   if using_gmake; then
-    $MAKE -n $target | grep stamp-sub-dist-hook || Exit 1
+    $MAKE -n $target | grep stamp-sub-dist-hook || exit 1
   fi
   $MAKE test-no-distdir
-  test `ls -1t | sed 1q` = stampfile
+  # No file has been actually touched or created.
+  is_newest stampfile $(find . -type f) sub
 done
 
-Exit 0
+:
old mode 100755 (executable)
new mode 100644 (file)
index 20addd8..a78f79c
@@ -1,14 +1,15 @@
 #! /bin/sh
 # This file has been automatically generated.  DO NOT EDIT BY HAND!
-. ./defs-static || exit '99';
+. test-lib.sh
+
 am_serial_tests=yes
 # 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/t/maken3.sh"; then
     echo "$0: will source $dir/t/maken3.sh"
-    . "$dir/t/maken3.sh"; exit "$?"
+    . "$dir/t/maken3.sh"; exit $?
   fi
 done
 echo "$0: cannot find wrapped test 't/maken3.sh'" >&2
-exit '99'
+exit 99
old mode 100755 (executable)
new mode 100644 (file)
index 832bdcf..6fc6fd8
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2009-2012 Free Software Foundation, Inc.
+# Copyright (C) 2009-2017 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
 #     special target, the output from make is sufficiently complete.
 #
 # This test exercises the GCS-mandated targets (except for dist)
-# as well as tags, TAGS.
+# as well as tags.
 
 # For gen-testsuite-part: ==> try-with-serial-tests <==
-. ./defs || Exit 1
+. test-init.sh
 
 # Does $MAKE support the '.MAKE' special target?
 have_dotmake=false
@@ -111,8 +111,6 @@ installcheck-local:
        @: > stamp-installcheck-sub
 tags:
        @: > stamp-tags-sub
-TAGS:
-       @: > stamp-TAGS-sub
 mostlyclean-local:
        @: > stamp-mostlyclean-sub
 maintainer-clean-local:
@@ -127,7 +125,7 @@ html:
        @: > sub2-$@-should-not-be-executed
 install-info install-html install-dvi install-pdf install-ps:
        @: > sub2-$@-should-not-be-executed
-installcheck installdirs tags TAGS mostlyclean:
+installcheck installdirs tags mostlyclean:
        @: > sub2-$@-should-not-be-executed
 ## These targets cannot be overridden like this:
 ## install-strip distclean maintainer-clean
@@ -142,35 +140,34 @@ check_targets ()
     all install install-strip uninstall clean distclean check \
     info html dvi pdf ps \
     install-info install-html install-dvi install-pdf install-ps \
-    installcheck installdirs tags TAGS mostlyclean maintainer-clean
+    installcheck installdirs tags mostlyclean maintainer-clean
   do
-    $MAKE -n $target >stdout || { cat stdout; Exit 1; }
-    cat stdout
+    run_make -O -- -n $target
     case $target in
-    install-* | installdirs | tags | TAGS ) ;;
+    install-* | installdirs | tags ) ;;
     *)
       if $have_dotmake; then
-        grep "stamp-$target$" stdout || Exit 1
+        grep "stamp-$target$" stdout || exit 1
       fi
-      test ! -f "stamp-$target$" || Exit 1
+      test ! -e "stamp-$target" || exit 1
       ;;
     esac
     case $target in
     install-* | installdirs ) ;;
     *)
       if $have_dotmake; then
-        grep "stamp-$target-sub" stdout || Exit 1
+        grep "stamp-$target-sub" stdout || exit 1
       fi
-      test ! -f "sub/stamp-$target-sub" || Exit 1
+      test ! -e "sub/stamp-$target-sub" || exit 1
       ;;
     esac
     case $target in
     distclean | maintainer-clean ) ;;
     *)
       if $have_dotmake; then
-        grep "should-not-be-executed" stdout || Exit 1
+        grep "should-not-be-executed" stdout || exit 1
       fi
-      test ! -f "sub2/sub2-$target-should-not-be-executed" || Exit 1
+      test ! -e "sub2/sub2-$target-should-not-be-executed" || exit 1
       ;;
     esac
   done
@@ -178,7 +175,7 @@ check_targets ()
 
 $AUTOMAKE -a -Wno-override
 ./configure
-check_targets || Exit 1
+check_targets || exit 1
 
 # Now, introduce BUILT_SOURCES into the toplevel Makefile
 # TODO: add BUILT_SOURCES to sub2, fix fallout.
@@ -186,6 +183,6 @@ sed 's/##//' < Makefile.am > t
 mv -f t Makefile.am
 $AUTOMAKE -Wno-override --force Makefile
 ./configure
-check_targets || Exit 1
+check_targets || exit 1
 
-Exit 0
+exit 0
old mode 100755 (executable)
new mode 100644 (file)
index ad18830..691a52b
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2001-2012 Free Software Foundation, Inc.
+# Copyright (C) 2001-2017 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
@@ -17,7 +17,7 @@
 # Test to make sure that automake includes the needed variables,
 # but not too many.
 
-. ./defs || Exit 1
+. test-init.sh
 
 # Find the macros wanted by Automake.
 $ACLOCAL
@@ -28,6 +28,6 @@ $ACLOCAL
 $AUTOMAKE
 
 # We are definitely not needing a compiler or preprocessor.
-$EGREP '^ *(CC|CPP|CXX|CXXCPP) *=' Makefile.in && Exit 1
+$EGREP '^ *(CC|CPP|CXX|CXXCPP) *=' Makefile.in && exit 1
 
 :
old mode 100755 (executable)
new mode 100644 (file)
index d2e5dd6..8b5c1f5
--- a/t/man.sh
+++ b/t/man.sh
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 1996-2012 Free Software Foundation, Inc.
+# Copyright (C) 1996-2017 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
@@ -16,7 +16,7 @@
 
 # Test to make sure 'dist' prefix works with man pages.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat > Makefile.am << 'END'
 dist_man_MANS = foo.1
old mode 100755 (executable)
new mode 100644 (file)
index 38c3992..a212938
--- a/t/man2.sh
+++ b/t/man2.sh
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2002-2012 Free Software Foundation, Inc.
+# Copyright (C) 2002-2017 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
@@ -17,7 +17,7 @@
 # Make sure that man pages listed in man_MANS are installed and
 # renamed as documented.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac <<'END'
 AC_OUTPUT
@@ -36,18 +36,20 @@ $ACLOCAL
 $AUTOCONF
 $AUTOMAKE
 
+cwd=$(pwd) || fatal_ "getting current working directory"
+
 # Let's play with $DESTDIR too, it shouldn't hurt.
 ./configure --prefix='' --mandir=/man
-$MAKE DESTDIR="`pwd`/_inst" install
+$MAKE DESTDIR="$cwd/_inst" install
 
-test -f ./_inst/man/man2/foo.2
-test -f ./_inst/man/man4/foo.4
-test -f ./_inst/man/man4/bar.4
+test -f _inst/man/man2/foo.2
+test -f _inst/man/man4/foo.4
+test -f _inst/man/man4/bar.4
 
-$MAKE DESTDIR="`pwd`/_inst" uninstall
+$MAKE DESTDIR="$cwd/_inst" uninstall
 
-test ! -f ./_inst/man/man2/foo.2
-test ! -f ./_inst/man/man4/foo.4
-test ! -f ./_inst/man/man4/bar.4
+test ! -_inst/man/man2/foo.2
+test ! -_inst/man/man4/foo.4
+test ! -_inst/man/man4/bar.4
 
 :
old mode 100755 (executable)
new mode 100644 (file)
index a842d38..65f7e7f
--- a/t/man3.sh
+++ b/t/man3.sh
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2008-2012 Free Software Foundation, Inc.
+# Copyright (C) 2008-2017 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
@@ -16,7 +16,7 @@
 
 # PR 516: Prefer generated manpages to distributed ones.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat > Makefile.am << 'END'
 dist_man_MANS = foo.1
@@ -39,6 +39,6 @@ $ACLOCAL
 $AUTOMAKE
 $AUTOCONF
 ./configure
-DISTCHECK_CONFIGURE_FLAGS=foo=bar $MAKE -e distcheck
+run_make DISTCHECK_CONFIGURE_FLAGS='foo=bar' distcheck
 
 :
diff --git a/t/man4.sh b/t/man4.sh
deleted file mode 100755 (executable)
index c7333b9..0000000
--- a/t/man4.sh
+++ /dev/null
@@ -1,105 +0,0 @@
-#! /bin/sh
-# Copyright (C) 2008-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 'make dist' fails when help2man replacement man pages are created.
-#
-# The assumption here is the following: if the developer uses help2man to
-# generate man pages from --help output, then these man pages may not be
-# stored in VCS.  However, they should be distributed, so that the end user
-# that receives the tarball doesn't have to install help2man.  If they are
-# not distributed, then the developer should make help2man a prerequisite
-# to building the package from a tarball, e.g., with a configure check for
-# help2man that errors out if it is unavailable.  In both cases it is
-# sufficient to check only distributed man pages.
-#
-# Idea of this whole shenanigan is to allow somebody to check out sources from
-# a VCS and build and install them without needing help2man installed.  The
-# installed man pages will be bogus in this case.  Typically, this happens
-# when developers ask users to try out a fix from VCS; the developers themselves
-# will usually have help2man installed (or should install it).
-
-. ./defs || Exit 1
-
-cat > Makefile.am << 'END'
-dist_man_MANS = $(srcdir)/foo.1 bar.1
-dist_bin_SCRIPTS = foo bar
-$(srcdir)/foo.1:
-       $(HELP2MAN) --output=$@ $(srcdir)/foo
-bar.1:
-       $(HELP2MAN) --output=$(srcdir)/bar.1 $(srcdir)/bar
-END
-
-cat >>configure.ac <<'END'
-AM_MISSING_PROG([HELP2MAN], [help2man])
-AC_OUTPUT
-END
-
-cat > foo <<'END'
-#! /bin/sh
-while test $# -gt 0; do
-  case $1 in
-    -h | --help) echo "usage: $0 [OPTIONS]..."; exit 0;;
-    -v | --version) echo "$0 1.0"; exit 0;;
-  esac
-  shift
-done
-END
-cp foo bar
-chmod +x foo bar
-
-mkdir bin
-cat > bin/help2man <<'END'
-#! /bin/sh
-# Fake help2man script that lets 'missing' think it is not installed.
-exit 127
-END
-chmod +x bin/help2man
-PATH=`pwd`/bin$PATH_SEPARATOR$PATH
-
-grep_error_messages()
-{
-  grep ' man pages contain.*missing help2man.* replacement text' stderr \
-   && grep 'install help2man' stderr \
-   && grep 'regenerate the man pages' stderr \
-   || Exit 1
-}
-
-$ACLOCAL
-$AUTOMAKE
-$AUTOCONF
-
-./configure
-$MAKE
-$MAKE dist 2>stderr && { cat stderr >&2; Exit 1; }
-cat stderr >&2
-grep_error_messages
-$MAKE distcheck 2>stderr && { cat stderr >&2; Exit 1; }
-cat stderr >&2
-grep_error_messages
-$MAKE distclean
-
-mkdir build
-cd build
-../configure
-$MAKE
-$MAKE dist 2>stderr && { cat stderr >&2; Exit 1; }
-cat stderr >&2
-grep_error_messages
-$MAKE distcheck 2>stderr && { cat stderr >&2; Exit 1; }
-cat stderr >&2
-grep_error_messages
-
-:
old mode 100755 (executable)
new mode 100644 (file)
index 674ea03..2dff9d3
--- a/t/man5.sh
+++ b/t/man5.sh
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2009-2012 Free Software Foundation, Inc.
+# Copyright (C) 2009-2017 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
@@ -16,7 +16,7 @@
 
 # Make sure to extract the correct mansection from files in man_MANS.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac <<'END'
 AC_OUTPUT
@@ -40,28 +40,30 @@ $ACLOCAL
 $AUTOCONF
 $AUTOMAKE
 
+cwd=$(pwd) || fatal_ "getting current working directory"
+
 # Let's play with $DESTDIR too, it shouldn't hurt.
 ./configure --mandir=/man
-$MAKE DESTDIR="`pwd`/_inst" install
+$MAKE DESTDIR="$cwd/_inst" install
 
-test -f ./_inst/man/man2/foo.2
-test -f ./_inst/man/man2/nfoo.2
-test -f ./_inst/man/man2/baz-1.4.2
-test -f ./_inst/man/man2/nbaz-1.4.2
-test -f ./_inst/man/man3/bar.3
-test -f ./_inst/man/man3/nbar.3
+test -f _inst/man/man2/foo.2
+test -f _inst/man/man2/nfoo.2
+test -f _inst/man/man2/baz-1.4.2
+test -f _inst/man/man2/nbaz-1.4.2
+test -f _inst/man/man3/bar.3
+test -f _inst/man/man3/nbar.3
 
-test ! -d ./_inst/man/man1
-test ! -d ./_inst/man/man4
-test ! -d ./_inst/man/man5
+test ! -_inst/man/man1
+test ! -_inst/man/man4
+test ! -_inst/man/man5
 
-$MAKE DESTDIR="`pwd`/_inst" uninstall
+$MAKE DESTDIR="$cwd/_inst" uninstall
 
-test ! -f ./_inst/man/man2/foo.2
-test ! -f ./_inst/man/man2/nfoo.2
-test ! -f ./_inst/man/man2/baz-1.4.2
-test ! -f ./_inst/man/man2/nbaz-1.4.2
-test ! -f ./_inst/man/man3/bar.3
-test ! -f ./_inst/man/man3/nbar.3
+test ! -_inst/man/man2/foo.2
+test ! -_inst/man/man2/nfoo.2
+test ! -_inst/man/man2/baz-1.4.2
+test ! -_inst/man/man2/nbaz-1.4.2
+test ! -_inst/man/man3/bar.3
+test ! -_inst/man/man3/nbar.3
 
 :
old mode 100755 (executable)
new mode 100644 (file)
index 1a7b267..c160981
--- a/t/man6.sh
+++ b/t/man6.sh
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2010-2012 Free Software Foundation, Inc.
+# Copyright (C) 2010-2017 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
@@ -18,7 +18,7 @@
 # even if the 'missing' script is involved.
 
 required=help2man
-. ./defs || Exit 1
+. test-init.sh
 
 # Avoid a spurious failure due to a known FreeBSD make incompatibility.
 useless_vpath_rebuild \
@@ -65,7 +65,7 @@ cd build
 
 ../configure
 # Sanity check.
-grep '^HELP2MAN *=.*/missing --run help2man' Makefile
+grep '^HELP2MAN *=.*/missing help2man' Makefile
 
 $MAKE
 $FGREP foobar ../foobar.1
@@ -84,7 +84,7 @@ rm -f *.1 # Remove leftover generated manpages.
 
 ./configure
 # Sanity check.
-grep '^HELP2MAN *=.*/missing --run help2man' Makefile
+grep '^HELP2MAN *=.*/missing help2man' Makefile
 
 $MAKE
 $FGREP foobar  foobar.1
old mode 100755 (executable)
new mode 100644 (file)
index 37bec90..14a5000
--- a/t/man7.sh
+++ b/t/man7.sh
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2010-2012 Free Software Foundation, Inc.
+# Copyright (C) 2010-2017 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
@@ -16,7 +16,7 @@
 
 # Check for a bug in maintainer-clean w.r.t. generated manpages.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat > Makefile.am << 'END'
 dist_man_MANS = $(srcdir)/foo.1 bar.1
@@ -42,8 +42,8 @@ test -f bar.1
 test -f ../foo.1
 
 $MAKE maintainer-clean
-test ! -f bar.1
-test ! -f ../foo.1
+test ! -e bar.1
+test ! -e ../foo.1
 
 cd ..
 ./configure
@@ -53,7 +53,7 @@ test -f bar.1
 test -f foo.1
 
 $MAKE maintainer-clean
-test ! -f bar.1
-test ! -f foo.1
+test ! -e bar.1
+test ! -e foo.1
 
 :
old mode 100755 (executable)
new mode 100644 (file)
index 14c190b..f5c5e02
--- a/t/man8.sh
+++ b/t/man8.sh
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2010-2012 Free Software Foundation, Inc.
+# Copyright (C) 2010-2017 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
@@ -16,7 +16,7 @@
 
 # Check for a bug in distcheck w.r.t. generated manpages.
 
-. ./defs || Exit 1
+. test-init.sh
 
 # Avoid a spurious failure due to a known FreeBSD make incompatibility.
 useless_vpath_rebuild \
old mode 100755 (executable)
new mode 100644 (file)
index b33bf63..c093038
@@ -1,5 +1,5 @@
 #!/bin/sh
-# Copyright (C) 1996-2012 Free Software Foundation, Inc.
+# Copyright (C) 1996-2017 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
@@ -16,7 +16,7 @@
 
 # Test that mdate-sh is required when Texinfo used and version.texi needed.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat > Makefile.am << 'END'
 info_TEXINFOS = textutils.texi
old mode 100755 (executable)
new mode 100644 (file)
index 093de5e..2eabac1
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 1996-2012 Free Software Foundation, Inc.
+# Copyright (C) 1996-2017 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
@@ -16,7 +16,7 @@
 
 # Test to make sure mdate-sh is included in distribution.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat > Makefile.am << 'END'
 info_TEXINFOS = textutils.texi
@@ -29,7 +29,7 @@ END
 # Required when using Texinfo.
 : > texinfo.tex
 : > mdate-sh
-echo '@setfilename textutils' > textutils.texi
+echo '@setfilename textutils.info' > textutils.texi
 
 # Use "././" to confuse Automake into thinking this is a subdir build.
 $ACLOCAL
old mode 100755 (executable)
new mode 100644 (file)
index a37e60b..6a7d39e
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 1999-2012 Free Software Foundation, Inc.
+# Copyright (C) 1999-2017 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
@@ -16,7 +16,7 @@
 
 # Test to make sure mdate-sh run correctly.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat > configure.ac << END
 AC_INIT([$me], [1.0])
@@ -45,5 +45,5 @@ mv missing foo
 $ACLOCAL
 $AUTOMAKE
 
-grep '[^/]mdate-sh' Makefile.in && Exit 1
-Exit 0
+grep '[^/]mdate-sh' Makefile.in && exit 1
+exit 0
old mode 100755 (executable)
new mode 100644 (file)
index ac1be3a..d5a5cc2
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2001-2012 Free Software Foundation, Inc.
+# Copyright (C) 2001-2017 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
@@ -17,7 +17,7 @@
 # Test to make sure that mdate-sh is added to the right directory.
 # Report from Kevin Dalley.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_CONFIG_FILES([sub/Makefile])
old mode 100755 (executable)
new mode 100644 (file)
index eb06116..ab1211a
@@ -1,14 +1,15 @@
 #! /bin/sh
 # This file has been automatically generated.  DO NOT EDIT BY HAND!
-. ./defs-static || exit '99';
+. test-lib.sh
+
 am_test_prefer_config_shell=yes
 # 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/t/mdate5.sh"; then
     echo "$0: will source $dir/t/mdate5.sh"
-    . "$dir/t/mdate5.sh"; exit "$?"
+    . "$dir/t/mdate5.sh"; exit $?
   fi
 done
 echo "$0: cannot find wrapped test 't/mdate5.sh'" >&2
-exit '99'
+exit 99
old mode 100755 (executable)
new mode 100644 (file)
index 4cef952..c294a58
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 1999-2012 Free Software Foundation, Inc.
+# Copyright (C) 1999-2017 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
 # Test to make sure mdate-sh works correctly.
 
 am_create_testdir=empty
-. ./defs || Exit 1
+. test-init.sh
 
 get_shell_script mdate-sh
 
-set x `./mdate-sh mdate-sh`
+set x $(./mdate-sh mdate-sh)
 shift
 echo "$*" # For debugging.
 
 # Check that mdate output looks like a date:
 test $# = 3
-case $1$3 in *[!0-9]*) Exit 1;; esac
+case $1$3 in *[!0-9]*) exit 1;; esac
 test $1 -lt 32
 # Hopefully automake will be obsolete in 80 years ;-)
-case $3 in 20[0-9][0-9]) :;; *) Exit 1;; esac
+case $3 in 20[0-9][0-9]) :;; *) exit 1;; esac
 case $2 in
   January|February|March|April|May|June|July|August) ;;
   September|October|November|December) ;;
-  *) Exit 1
+  *) exit 1
 esac
 
 # Stricter checks on the year required a POSIX date(1) command.
-if year=`date +%Y` && test $year -gt 2010; then
-  test $year = $3 || Exit 1
+if year=$(date +%Y) && test $year -gt 2010; then
+  test $year = $3 || exit 1
 fi
 
 :
old mode 100755 (executable)
new mode 100644 (file)
index df01672..43c0c7f
@@ -1,14 +1,15 @@
 #! /bin/sh
 # This file has been automatically generated.  DO NOT EDIT BY HAND!
-. ./defs-static || exit '99';
+. test-lib.sh
+
 am_test_prefer_config_shell=yes
 # 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/t/mdate6.sh"; then
     echo "$0: will source $dir/t/mdate6.sh"
-    . "$dir/t/mdate6.sh"; exit "$?"
+    . "$dir/t/mdate6.sh"; exit $?
   fi
 done
 echo "$0: cannot find wrapped test 't/mdate6.sh'" >&2
-exit '99'
+exit 99
old mode 100755 (executable)
new mode 100644 (file)
index ca3ca21..6b657ea
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2010-2012 Free Software Foundation, Inc.
+# Copyright (C) 2010-2017 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
@@ -17,7 +17,7 @@
 # mdate-sh can work with weird file names, doesn't eval too much.
 
 am_create_testdir=empty
-. ./defs || Exit 1
+. test-init.sh
 
 a=
 file='file  name $a'
@@ -27,7 +27,7 @@ file='file  name $a'
 get_shell_script mdate-sh
 
 ./mdate-sh "$file" >stdout 2>stderr ||
-  { cat stdout; cat stderr >&2; Exit 1; }
+  { cat stdout; cat stderr >&2; exit 1; }
 cat stdout
 cat stderr >&2
 grep '[12][0-9]\{3\}' stdout
old mode 100755 (executable)
new mode 100644 (file)
index d708081..64c7b2d
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2011-2012 Free Software Foundation, Inc.
+# Copyright (C) 2011-2017 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
@@ -17,7 +17,7 @@
 # Automake should stop the creation of Makefile.in files at the first
 # encountered error due to a required auxiliary file not found.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac <<END
 AM_PATH_PYTHON
@@ -36,7 +36,7 @@ done
 
 $ACLOCAL
 
-unset AUTOMAKE_JOBS || :
+unset AUTOMAKE_JOBS
 
 AUTOMAKE_fails
 ls -l Makefile.in */Makefile.in || : # For debugging.
@@ -44,10 +44,10 @@ ls -l Makefile.in */Makefile.in || : # For debugging.
 # too strict semantics here, so don't check for it.  But the later
 # files shouldn't exist.
 test -f sub1/Makefile.in
-test ! -f sub2/Makefile.in
-test ! -f sub3/Makefile.in
-test ! -f sub4/Makefile.in
-test ! -f sub5/Makefile.in
+test ! -e sub2/Makefile.in
+test ! -e sub3/Makefile.in
+test ! -e sub4/Makefile.in
+test ! -e sub5/Makefile.in
 
 rm -f Makefile.in */Makefile.in
 
@@ -59,7 +59,7 @@ ls -l Makefile.in */Makefile.in || : # For debugging.
 test -f sub1/Makefile.in
 test -f sub2/Makefile.in
 test -f sub3/Makefile.in
-test ! -f sub4/Makefile.in
-test ! -f sub5/Makefile.in
+test ! -e sub4/Makefile.in
+test ! -e sub5/Makefile.in
 
 :
diff --git a/t/missing-version-mismatch-w.sh b/t/missing-version-mismatch-w.sh
new file mode 100644 (file)
index 0000000..298a65d
--- /dev/null
@@ -0,0 +1,15 @@
+#! /bin/sh
+# This file has been automatically generated.  DO NOT EDIT BY HAND!
+. test-lib.sh
+
+am_test_prefer_config_shell=yes
+# 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/t/missing-version-mismatch.sh"; then
+    echo "$0: will source $dir/t/missing-version-mismatch.sh"
+    . "$dir/t/missing-version-mismatch.sh"; exit $?
+  fi
+done
+echo "$0: cannot find wrapped test 't/missing-version-mismatch.sh'" >&2
+exit 99
diff --git a/t/missing-version-mismatch.sh b/t/missing-version-mismatch.sh
new file mode 100644 (file)
index 0000000..e06ccd6
--- /dev/null
@@ -0,0 +1,50 @@
+#! /bin/sh
+# Copyright (C) 2003-2017 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 missing with version mismatches.
+
+am_create_testdir=empty
+. test-init.sh
+
+get_shell_script missing
+
+do_check ()
+{
+  progname=$1; shift;
+  ./missing "$@" 2>stderr && { cat stderr >&2; exit 1; }
+  cat stderr >&2
+  $FGREP "WARNING: '$progname' is probably too old." stderr
+}
+
+echo 'AC_INIT([x], [1.0]) AC_PREREQ([9999])' >> configure.ac
+
+do_check autoconf               $AUTOCONF
+do_check autoheader             $AUTOHEADER
+do_check aclocal-$APIVERSION    $am_original_ACLOCAL
+
+cat > configure.ac << 'END'
+AC_INIT([x], [0])
+AM_INIT_AUTOMAKE
+AC_CONFIG_FILES([Makefile])
+END
+
+echo AUTOMAKE_OPTIONS = 9999.9999 > Makefile.am
+$ACLOCAL
+: > install-sh
+# FIXME: this doesn't work due to a bug in automake (not 'missing').
+#do_check automake-$APIVERSION  $am_original_AUTOMAKE
+
+:
diff --git a/t/missing.sh b/t/missing.sh
deleted file mode 100755 (executable)
index 473d041..0000000
+++ /dev/null
@@ -1,66 +0,0 @@
-#! /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 missing with version mismatches.
-
-. ./defs || Exit 1
-
-cat >>configure.ac <<'EOF'
-AC_OUTPUT
-EOF
-
-: > Makefile.am
-
-get_shell_script missing
-
-$ACLOCAL
-$AUTOCONF
-$AUTOMAKE --add-missing
-
-# Make sure we do use missing, even if the user exported AUTOCONF.
-# (We cannot export this new value, because it would be used by Automake
-# when tracing, and missing is no good for this.)
-MYAUTOCONF="./missing --run $AUTOCONF"
-unset AUTOCONF
-
-./configure AUTOCONF="$MYAUTOCONF"
-$MAKE
-$sleep
-# Hopefully the install version of Autoconf cannot compete with this one...
-echo 'AC_PREREQ(9999)' >> aclocal.m4
-$MAKE distdir
-
-# Try version number suffixes if we can add them safely.
-case $MYAUTOCONF in *autoconf)
-  ./configure AUTOCONF="${MYAUTOCONF}6789"
-  $MAKE
-  $sleep
-  # Hopefully the install version of Autoconf cannot compete with this one...
-  echo 'AC_PREREQ(9999)' >> aclocal.m4
-  $MAKE distdir
-esac
-
-# Run again, but without missing, to ensure that timestamps were updated.
-export AUTOMAKE ACLOCAL
-./configure AUTOCONF="$MYAUTOCONF"
-$MAKE
-
-# Make sure $MAKE fails when timestamps aren't updated and missing is not used.
-$sleep
-touch aclocal.m4
-$MAKE && Exit 1
-
-:
diff --git a/t/missing2-w.sh b/t/missing2-w.sh
deleted file mode 100755 (executable)
index e3ff8dd..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-#! /bin/sh
-# This file has been automatically generated.  DO NOT EDIT BY HAND!
-. ./defs-static || exit '99';
-am_test_prefer_config_shell=yes
-# 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/t/missing2.sh"; then
-    echo "$0: will source $dir/t/missing2.sh"
-    . "$dir/t/missing2.sh"; exit "$?"
-  fi
-done
-echo "$0: cannot find wrapped test 't/missing2.sh'" >&2
-exit '99'
diff --git a/t/missing2.sh b/t/missing2.sh
deleted file mode 100755 (executable)
index 89e9a5d..0000000
+++ /dev/null
@@ -1,58 +0,0 @@
-#! /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 missing with version mismatches.
-
-. ./defs || Exit 1
-
-cat >>configure.ac <<'EOF'
-m4_include([v.m4])
-AC_OUTPUT
-EOF
-
-: > v.m4
-
-: > Makefile.am
-
-get_shell_script missing
-
-$ACLOCAL
-$AUTOCONF
-$AUTOMAKE --add-missing
-
-# See missing.test for explanations about this.
-MYAUTOCONF="./missing --run $AUTOCONF"
-unset AUTOCONF
-
-./configure AUTOCONF="$MYAUTOCONF"
-
-$MAKE
-$sleep
-# Hopefully the install version of Autoconf cannot compete with this one...
-echo 'AC_PREREQ(9999)' > v.m4
-$MAKE distdir
-
-# Run again, but without missing, to ensure that timestamps were updated.
-export AUTOMAKE ACLOCAL
-./configure AUTOCONF="$MYAUTOCONF"
-$MAKE
-
-# Make sure $MAKE fail when timestamps aren't updated and missing is not used.
-$sleep
-touch v.m4
-$MAKE && Exit 1
-
-:
old mode 100755 (executable)
new mode 100644 (file)
index f0effbd..d7c4bf9
@@ -1,14 +1,15 @@
 #! /bin/sh
 # This file has been automatically generated.  DO NOT EDIT BY HAND!
-. ./defs-static || exit '99';
+. test-lib.sh
+
 am_test_prefer_config_shell=yes
 # 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/t/missing3.sh"; then
     echo "$0: will source $dir/t/missing3.sh"
-    . "$dir/t/missing3.sh"; exit "$?"
+    . "$dir/t/missing3.sh"; exit $?
   fi
 done
 echo "$0: cannot find wrapped test 't/missing3.sh'" >&2
-exit '99'
+exit 99
old mode 100755 (executable)
new mode 100644 (file)
index a26f954..2a6f2f3
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2004-2012 Free Software Foundation, Inc.
+# Copyright (C) 2004-2017 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
 # Test missing when running a tool's --version.
 
 am_create_testdir=empty
-. ./defs || Exit 1
+. test-init.sh
 
 get_shell_script missing
 
 # b7cb8259 assumed not to exist.
 
-./missing b7cb8259 --version 2>stderr && { cat stderr >&2; Exit 1; }
-cat stderr >&2
-grep . stderr && Exit 1
-./missing b7cb8259 --grep 2>stderr && { cat stderr >&2; Exit 1; }
-cat stderr >&2
-grep WARNING stderr
-
-./missing --run b7cb8259 --version && Exit 1
-./missing --run b7cb8259 --grep 2>stderr && { cat stderr >&2; Exit 1; }
-cat stderr >&2
-grep WARNING stderr
+run_cmd ()
+{
+  st=0; "$@" >stdout 2>stderr || st=$?
+  cat stdout
+  cat stderr >&2
+  return $st
+}
+
+run_cmd ./missing b7cb8259 --version && exit 1
+grep WARNING stderr && exit 1
+run_cmd ./missing b7cb8259 --grep && exit 1
+
+if test x"$am_test_prefer_config_shell" != x"yes"; then
+  # The /bin/sh from Solaris 10 is a spectacular failure.  After a failure
+  # due to a "command not found", it sets '$?' to '1'.
+  if (st=0; /bin/sh -c 'no--such--command' || st=$?; test $st -eq 127); then
+    grep 'WARNING:.*missing on your system' stderr
+  fi
+fi
 
 # missing itself it known to exist :)
 
-./missing ./missing --version 2>stderr && { cat stderr >&2; Exit 1; }
-cat stderr >&2
-grep . stderr && Exit 1
-./missing ./missing --grep 2>stderr && { cat stderr >&2; Exit 1; }
-cat stderr >&2
-grep WARNING stderr
-
-./missing --run ./missing --version 2>stderr || { cat stderr >&2; Exit 1; }
-cat stderr >&2
-grep . stderr && Exit 1
-./missing --run ./missing --grep 2>stderr && { cat stderr >&2; Exit 1; }
-cat stderr >&2
-grep WARNING stderr && Exit 1
-grep Unknown stderr
+run_cmd ./missing ./missing --version || exit 1
+grep 'missing .*(GNU [aA]utomake)' stdout
+test -s stderr && exit 1
+run_cmd ./missing ./missing --grep && exit 1
+grep WARNING stderr && exit 1
+grep "missing:.* unknown '--grep'" stderr
+
+:
diff --git a/t/missing5-w.sh b/t/missing5-w.sh
deleted file mode 100755 (executable)
index 20faa60..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-#! /bin/sh
-# This file has been automatically generated.  DO NOT EDIT BY HAND!
-. ./defs-static || exit '99';
-am_test_prefer_config_shell=yes
-# 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/t/missing5.sh"; then
-    echo "$0: will source $dir/t/missing5.sh"
-    . "$dir/t/missing5.sh"; exit "$?"
-  fi
-done
-echo "$0: cannot find wrapped test 't/missing5.sh'" >&2
-exit '99'
diff --git a/t/missing5.sh b/t/missing5.sh
deleted file mode 100755 (executable)
index 80bba36..0000000
+++ /dev/null
@@ -1,64 +0,0 @@
-#! /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 how well 'missing' finds output file names of various tools.
-# PR automake/483.
-
-am_create_testdir=empty
-. ./defs || Exit 1
-
-get_shell_script missing
-
-# These programs may be invoked by 'missing'.
-needed_tools='chmod find sed test touch'
-needed_tools_csep=`echo $needed_tools | sed 's/ /, /g'`
-
-cat >configure.ac <<EOF
-AC_INIT([missing4], [1.0])
-m4_foreach([tool], [$needed_tools_csep],
-          [AC_PATH_PROG(tool, tool, [false])
-           AC_CONFIG_FILES(tool, chmod +x tool)
-          ])
-AC_OUTPUT
-EOF
-
-for tool in $needed_tools; do
-  unindent >$tool.in <<EOF
-    #! /bin/sh
-    exec @$tool@ "\$@"
-EOF
-done
-
-$AUTOCONF
-./configure
-
-echo output-file > output-file
-cp output-file my--output--file-o
-
-save_PATH=$PATH
-PATH=.
-export PATH
-missing --help
-missing --version
-for tool in autom4te help2man makeinfo; do
-  missing --run $tool -o my--output--file-o input
-  missing --run $tool --output my--output--file-o input
-done
-PATH=$save_PATH
-export PATH
-diff output-file my--output--file-o
-test ! -f ./--file-o
-test ! -f input
old mode 100755 (executable)
new mode 100644 (file)
similarity index 62%
rename from t/clean2.sh
rename to t/mkdir_p.sh
index b5f5df2..ad571cb
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2004-2012 Free Software Foundation, Inc.
+# Copyright (C) 2012-2017 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 distclean works in cygnus mode.
-# Report from Daniel Jacobowitz.
+# AM_INIT_AUTOMAKE should still define $(mkdir_p), for backward
+# compatibility.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
-AM_MAINTAINER_MODE
 AC_CONFIG_FILES([sub/Makefile])
 AC_OUTPUT
 END
 
 cat > Makefile.am << 'END'
 SUBDIRS = sub
-
-data_DATA = bar
-
-bar:
-       touch $@
-
-DISTCLEANFILES = bar
+all-local:
+       $(mkdir_p) . dir1/a
+       @mkdir_p@ . dir2/b
+check-local: all
+       test -d dir1/a
+       test -d dir2/b
+       test -d dir3/c
+       test -d dir3/d
 END
 
 mkdir sub
-
 cat > sub/Makefile.am << 'END'
-data_DATA = foo
-
-foo:
-       touch $@
-
-CLEANFILES = $(data_DATA)
+# '$(mkdir_p)' should continue to work even in subdir makefiles.
+all-local:
+       $(mkdir_p) .. ../dir3/c
+       @mkdir_p@ .. ../dir3/d
 END
 
 $ACLOCAL
-$AUTOCONF
-$AUTOMAKE --cygnus -Wno-obsolete
+$AUTOCONF -Werror -Wall
+$AUTOMAKE
 
 ./configure
-$MAKE
-ls -l
-test -f bar
-test -f sub/foo
-$MAKE distclean
-ls -l
-test ! -r bar
-test ! -r sub/foo
-test ! -r Makefile
-test ! -r config.status
-test -f Makefile.in
-test -f configure
+$MAKE check-local
+$MAKE distcheck
 
 :
old mode 100755 (executable)
new mode 100644 (file)
index 7b8f67f..5087d67
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2012 Free Software Foundation, Inc.
+# Copyright (C) 2012-2017 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
@@ -17,7 +17,7 @@
 # Check that the AM_PROG_MKDIR_P macro is deprecated.  It will be
 # be removed in the next major Automake release.
 
-. ./defs || Exit 1
+. test-init.sh
 
 echo AM_PROG_MKDIR_P >> configure.ac
 : > Makefile.am
@@ -32,7 +32,7 @@ grep_err ()
 
 $ACLOCAL
 
-$AUTOCONF -Werror -Wobsolete 2>stderr && { cat stderr >&2; Exit 1; }
+$AUTOCONF -Werror -Wobsolete 2>stderr && { cat stderr >&2; exit 1; }
 cat stderr >&2
 grep_err
 
old mode 100755 (executable)
new mode 100644 (file)
index 6582836..309dd40
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 1996-2012 Free Software Foundation, Inc.
+# Copyright (C) 1996-2017 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
@@ -16,7 +16,7 @@
 
 # Test to make sure no-installman suppresses man dir creation.
 
-. ./defs || Exit 1
+. test-init.sh
 
 echo AC_OUTPUT >> configure.ac
 
@@ -30,7 +30,11 @@ END
 $ACLOCAL
 $AUTOCONF
 $AUTOMAKE
-./configure --prefix "`pwd`/sub"
+./configure --prefix "$(pwd)/sub"
 
 $MAKE installdirs
-test ! -d sub/man
+test ! -e sub/man
+$MAKE install
+test ! -e sub/man
+
+:
old mode 100755 (executable)
new mode 100644 (file)
index dd6b7ab..28d4e90
@@ -1,14 +1,15 @@
 #! /bin/sh
 # This file has been automatically generated.  DO NOT EDIT BY HAND!
-. ./defs-static || exit '99';
+. test-lib.sh
+
 am_test_prefer_config_shell=yes
 # 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/t/mkinst3.sh"; then
     echo "$0: will source $dir/t/mkinst3.sh"
-    . "$dir/t/mkinst3.sh"; exit "$?"
+    . "$dir/t/mkinst3.sh"; exit $?
   fi
 done
 echo "$0: cannot find wrapped test 't/mkinst3.sh'" >&2
-exit '99'
+exit 99
old mode 100755 (executable)
new mode 100644 (file)
index fbe01c6..e667f48
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2005-2012 Free Software Foundation, Inc.
+# Copyright (C) 2005-2017 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
@@ -17,7 +17,9 @@
 # Test mkinstalldirs with spaces in directory names.
 
 am_create_testdir=empty
-. ./defs || Exit 1
+. test-init.sh
+
+cwd=$(pwd) || fatal_ "getting current working directory"
 
 # Make sure the directory we will create can be created...
 mkdir '~a b' && mkdir '~a b/-x  y' \
@@ -49,10 +51,9 @@ exec mkdir "$@"
 EOF
 
 chmod +x bin/mkdir
-AM_PATH=$PATH
-export AM_PATH
-PATH=`pwd`/bin$PATH_SEPARATOR$PATH
-export PATH
+
+AM_PATH=$PATH; export AM_PATH
+PATH=$cwd/bin$PATH_SEPARATOR$PATH; export PATH
 
 # Test mkinstalldirs without mkdir -p.
 
@@ -60,6 +61,8 @@ export PATH
 test -d '~a b/-x  y'
 rm -rf '~a b'
 
-./mkinstalldirs "`pwd`///~a b//-x  y"
-test -d "`pwd`/~a b/-x  y"
+./mkinstalldirs "$cwd///~a b//-x  y"
+test -d "$cwd/~a b/-x  y"
 rm -rf '~a b'
+
+:
old mode 100755 (executable)
new mode 100644 (file)
index e6b3bc2..3018446
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 1996-2012 Free Software Foundation, Inc.
+# Copyright (C) 1996-2017 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
@@ -16,7 +16,7 @@
 
 # Test for bug where mkinstalldirs variable can be set incorrectly.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat > Makefile.am << 'END'
 pkgdata_DATA =
@@ -27,5 +27,5 @@ END
 $ACLOCAL
 $AUTOMAKE ././Makefile
 
-grep ' /mkinstalldirs' Makefile.in && Exit 1
-Exit 0
+grep ' /mkinstalldirs' Makefile.in && exit 1
+exit 0
old mode 100755 (executable)
new mode 100644 (file)
index 6c80399..aa9b629
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2008-2012 Free Software Foundation, Inc.
+# Copyright (C) 2008-2017 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
@@ -16,7 +16,7 @@
 
 # Check for AM_MAINTAINER_MODE defaults.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AM_MAINTAINER_MODE
@@ -36,29 +36,29 @@ grep '^MAINT.*#' Makefile
 grep '^MAINT.*#' Makefile
 
 ./configure --enable-maintainer-mode
-grep '^MAINT.*#' Makefile && Exit 1
+grep '^MAINT.*#' Makefile && exit 1
 
-sed 's/\(AM_MAINTAINER_MODE\).*/\1([disable])/' configure.ac > configure.int
-mv -f configure.int configure.ac
+sed 's/\(AM_MAINTAINER_MODE\).*/\1([disable])/' configure.ac > configure.tmp
+mv -f configure.tmp configure.ac
 mv configure configure1
 $AUTOCONF --force
 diff configure configure1
 
-sed 's/\(AM_MAINTAINER_MODE\).*/\1([enable])/' configure.ac > configure.int
-mv -f configure.int configure.ac
+sed 's/\(AM_MAINTAINER_MODE\).*/\1([enable])/' configure.ac > configure.tmp
+mv -f configure.tmp configure.ac
 $AUTOCONF --force
 
 ./configure
-grep '^MAINT.*#' Makefile && Exit 1
+grep '^MAINT.*#' Makefile && exit 1
 
 ./configure --enable-maintainer-mode
-grep '^MAINT.*#' Makefile && Exit 1
+grep '^MAINT.*#' Makefile && exit 1
 
 ./configure --disable-maintainer-mode
 grep '^MAINT.*#' Makefile
 
-sed 's/\(AM_MAINTAINER_MODE\).*/\1([foo])/' configure.ac > configure.int
-mv -f configure.int configure.ac
-$AUTOCONF --force -Werror && Exit 1
+sed 's/\(AM_MAINTAINER_MODE\).*/\1([foo])/' configure.ac > configure.tmp
+mv -f configure.tmp configure.ac
+$AUTOCONF --force -Werror && exit 1
 
 :
old mode 100755 (executable)
new mode 100644 (file)
index 6c61915..38a70e4
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2004-2012 Free Software Foundation, Inc.
+# Copyright (C) 2004-2017 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
@@ -19,7 +19,7 @@
 # From Derek R. Price.
 
 required=cc
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AM_MAINTAINER_MODE
@@ -81,13 +81,14 @@ cat >mylex.sh <<'END'
 echo "$@" >lex.yy.c
 END
 chmod +x myyacc.sh mylex.sh
-PATH="`pwd`$PATH_SEPARATOR$PATH"
+PATH=$(pwd)$PATH_SEPARATOR$PATH; export PATH
 
 # "make maintainer-clean; ./configure; make" should always work,
 # per GNU Standard.
 $MAKE maintainer-clean
 ./configure
-YACC="myyacc.sh" LEX="mylex.sh" \
-   LEX_OUTPUT_ROOT='lex.yy' $MAKE -e zardoz.c joe.c
-grep zardoz.y zardoz.c
-grep joe.l joe.c
+run_make YACC=myyacc.sh LEX=mylex.sh LEX_OUTPUT_ROOT=lex.yy zardoz.c joe.c
+$FGREP zardoz.y zardoz.c
+$FGREP joe.l joe.c
+
+:
diff --git a/t/no-extra-c-stuff.sh b/t/no-extra-c-stuff.sh
new file mode 100644 (file)
index 0000000..700059b
--- /dev/null
@@ -0,0 +1,74 @@
+#! /bin/sh
+# Copyright (C) 2013-2017 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 doesn't generated rules or definitions related
+# to compilation of C sources for a project that doesn't use nor need
+# a C Compiler.  Inspired by the issues reported in automake bug#14560.
+
+am_create_testdir=empty
+. test-init.sh
+
+cat > configure.ac <<END
+AC_INIT([$me], [1.0])
+AC_CONFIG_AUX_DIR([.])
+AM_INIT_AUTOMAKE
+AC_CONFIG_FILES([
+    Makefile
+    sub/Makefile
+    sub2/Makefile
+])
+AC_PROG_CXX
+AC_PROG_F77
+AC_OUTPUT
+END
+
+cat > Makefile.am <<END
+SUBDIRS = sub sub2
+bin_PROGRAMS = bar
+bar_SOURCES = bar.cc
+END
+
+mkdir sub sub2
+
+cat > sub/Makefile.am <<END
+bin_PROGRAMS = foo
+foo_SOURCES = foo.f
+END
+
+cat > sub2/Makefile.am <<END
+bin_PROGRAMS = baz
+baz_SOURCES = baz.cxx
+END
+
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE --add-missing
+
+test   -f install-sh
+test ! -e compile
+
+# Sanity checks.
+$FGREP '$(CXX)' Makefile.in
+$FGREP '$(CXX)' sub2/Makefile.in
+$FGREP '$(F77)' Makefile.in sub2/Makefile.in && exit 1
+$FGREP '$(F77)' sub/Makefile.in
+$FGREP '$(CXX)' sub/Makefile.in && exit 1
+
+$EGREP '(^COMPILE|$\(CC\)|AM_V_CC)' \
+  Makefile.in sub/Makefile.in sub2/Makefile.in && exit 1
+
+:
old mode 100755 (executable)
new mode 100644 (file)
index 1742dc4..7fb7bd8
@@ -1,5 +1,5 @@
 #!/bin/sh
-# Copyright (C) 1996-2012 Free Software Foundation, Inc.
+# Copyright (C) 2011-2017 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
 # by a regression caused by removal of automatic de-ANSI-fication support:
 # <http://lists.gnu.org/archive/html/automake-patches/2011-08/msg00200.html>
 
-. ./defs || Exit 1
+. test-init.sh
 
 echo AC_OUTPUT >> configure.ac
 
 : > Makefile.am
 
+# Automake shouldn't need nor require these.
 rm -f depcomp compile
 
 $ACLOCAL
+
+# Don't use '--add-missing' here, so that we can implicitly
+# check that the auxiliary scripts 'compile' and 'depcomp'
+# are not spuriously required by Automake.
 $AUTOMAKE
 
-$EGREP 'DEFAULT_INCLUDES|@am__isrc@|-compile|\$\(OBJEXT\)|tab\.[ch]' \
-  Makefile.in && Exit 1
+$EGREP 'INCLUDES|@am__isrc@|-compile|\$\(OBJEXT\)|tab\.[ch]' \
+  Makefile.in && exit 1
 
 :
diff --git a/t/no-outdir-option.sh b/t/no-outdir-option.sh
deleted file mode 100755 (executable)
index 6212534..0000000
+++ /dev/null
@@ -1,29 +0,0 @@
-#! /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/>.
-
-# Check that the '-o' aka '--output-dir' option is not recognized anymore.
-
-. ./defs || Exit 1
-
-: > Makefile.am
-
-AUTOMAKE_fails -Wno-error --output-dir=foo
-grep 'unrecognized option.*--output-dir' stderr
-
-AUTOMAKE_fails -Wno-error -o foo
-grep 'unrecognized option.*-o' stderr
-
-:
old mode 100755 (executable)
new mode 100644 (file)
similarity index 87%
rename from t/bsource.sh
rename to t/no-spurious-install-recursive.sh
index 482015f..88ecb86
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2003-2012 Free Software Foundation, Inc.
+# Copyright (C) 2003-2017 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
@@ -17,7 +17,7 @@
 # Regression test for install-recursive appearing in a non recursive Makefile.
 # Report from Bruno Haible.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat > Makefile.am << 'END'
 noinst_SCRIPTS = hostname
@@ -27,6 +27,6 @@ END
 
 $ACLOCAL
 $AUTOMAKE
-grep 'install-recursive' Makefile.in && Exit 1
+grep 'install-recursive' Makefile.in && exit 1
 
 :
old mode 100755 (executable)
new mode 100644 (file)
index 38008cd..42dcad7
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2001-2012 Free Software Foundation, Inc.
+# Copyright (C) 2001-2017 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 # Make sure nobase_* works for libtool libraries and programs as well.
-# This is just the libtool equivalent of nobase.test, split
-# up for greater exposure of nobase.test.
+# This is just the libtool equivalent of 'nobase.sh', split up to allow
+# greater exposure of that test.
 
 required='cc libtoolize'
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac <<'EOF'
 AC_PROG_CC
@@ -54,8 +54,7 @@ EOF
 mkdir sub
 
 cat >source.c <<'EOF'
-int
-main (int argc, char *argv[])
+int main (int argc, char *argv[])
 {
   return 0;
 }
@@ -68,14 +67,14 @@ libtoolize
 $ACLOCAL
 $AUTOCONF
 $AUTOMAKE -a --copy
-./configure --prefix "`pwd`/inst" --program-prefix=p
+./configure --prefix "$(pwd)/inst" --program-prefix=p
 
 $MAKE
 $MAKE test-install-data
 $MAKE test-install-exec
 $MAKE uninstall
 
-test `find inst/foo -type f -print | wc -l` = 0
+test $(find inst/foo -type f -print | wc -l) -eq 0
 
 $MAKE install-strip
 
@@ -85,11 +84,11 @@ $MAKE uninstall
 $MAKE distclean
 mkdir build
 cd build
-../configure --prefix "`pwd`/inst" --program-prefix=p
+../configure --prefix "$(pwd)/inst" --program-prefix=p
 $MAKE
 $MAKE test-install-data
 $MAKE test-install-exec
 $MAKE uninstall
-test `find inst/foo -type f -print | wc -l` = 0
+test $(find inst/foo -type f -print | wc -l) -eq 0
 
 :
old mode 100755 (executable)
new mode 100644 (file)
index 54b940b..e42a86d
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2011-2012 Free Software Foundation, Inc.
+# Copyright (C) 2011-2017 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
@@ -16,7 +16,7 @@
 
 # Interaction of 'nobase_' and 'nodist_' prefixes.
 
-. ./defs || Exit 1
+. test-init.sh
 
 # Simulate no emacs and no python (it shouldn't be needed in this test).
 EMACS="no" PYTHON=":"; export EMCAS PYTHON
@@ -46,15 +46,15 @@ $AUTOMAKE -a
 $MAKE distdir
 
 ls -l $distdir $distdir/* # For debugging.
-test ! -f $distdir/foo1.el
-test ! -f $distdir/sub/foo2.el
-test ! -f $distdir/foo3.el
-test ! -f $distdir/sub/foo4.el
-test ! -f $distdir/bar1.java
-test ! -f $distdir/sub/bar2.java
-test ! -f $distdir/bar3.java
-test ! -f $distdir/sub/bar4.java
-test ! -f $distdir/baz1.py
-test ! -f $distdir/sub/baz2.py
+test ! -e $distdir/foo1.el
+test ! -e $distdir/sub/foo2.el
+test ! -e $distdir/foo3.el
+test ! -e $distdir/sub/foo4.el
+test ! -e $distdir/bar1.java
+test ! -e $distdir/sub/bar2.java
+test ! -e $distdir/bar3.java
+test ! -e $distdir/sub/bar4.java
+test ! -e $distdir/baz1.py
+test ! -e $distdir/sub/baz2.py
 
 :
old mode 100755 (executable)
new mode 100644 (file)
index 2850901..ba197d0
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2008-2012 Free Software Foundation, Inc.
+# Copyright (C) 2008-2017 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
@@ -17,7 +17,7 @@
 # Make sure nobase_* works for python files.
 
 required=python
-. ./defs || Exit 1
+. test-init.sh
 
 cat >>configure.ac <<EOF
 AM_PATH_PYTHON
@@ -28,25 +28,34 @@ cat > Makefile.am <<'END'
 mydir=$(prefix)/my
 my_PYTHON = one.py sub/base.py
 nobase_my_PYTHON = two.py sub/nobase.py
-
-test-install-data: install-data
-       find inst -print; : For debugging.
-       test   -f inst/my/one.py
-       test   -f inst/my/one.pyc
-       test   -f inst/my/two.py
-       test   -f inst/my/two.pyc
-       test   -f inst/my/base.py
-       test   -f inst/my/base.pyc
-       test   -f inst/my/sub/nobase.py
-       test   -f inst/my/sub/nobase.pyc
-       test ! -f inst/my/nobase.py
-       test ! -f inst/my/nobase.pyc
 END
 
+test_install()
+{
+  $MAKE install-data
+  find inst -print # For debugging.
+  py_installed inst/my/one.py
+  py_installed inst/my/one.pyc
+  py_installed inst/my/two.py
+  py_installed inst/my/two.pyc
+  py_installed inst/my/base.py
+  py_installed inst/my/base.pyc
+  py_installed inst/my/sub/nobase.py
+  py_installed inst/my/sub/nobase.pyc
+  py_installed --not inst/my/nobase.py
+  py_installed --not inst/my/nobase.pyc
+}
+
+test_uninstall()
+{
+  $MAKE uninstall
+  test -d inst/my
+  ! find inst/my -type f -print | grep .
+}
+
 mkdir sub
 
-for file in one.py sub/base.py two.py sub/nobase.py
-do
+for file in one.py sub/base.py two.py sub/nobase.py; do
   echo 'def one(): return 1' >$file
 done
 
@@ -54,26 +63,22 @@ $ACLOCAL
 $AUTOCONF
 $AUTOMAKE --add-missing
 
-./configure --prefix "`pwd`/inst" --program-prefix=p
+./configure --prefix "$(pwd)/inst" --program-prefix=p
 
 $MAKE
-$MAKE test-install-data
-$MAKE uninstall
-
-find inst/my -type f -print | grep . && Exit 1
+test_install
+test_uninstall
 
 $MAKE install-strip
+test_uninstall
 
 # Likewise, in a VPATH build.
 
-$MAKE uninstall
 $MAKE distclean
 mkdir build
 cd build
-../configure --prefix "`pwd`/inst" --program-prefix=p
-$MAKE
-$MAKE test-install-data
-$MAKE uninstall
-find inst/my -type f -print | grep . && Exit 1
+../configure --prefix "$(pwd)/inst" --program-prefix=p
+test_install
+test_uninstall
 
 :
old mode 100755 (executable)
new mode 100644 (file)
index e7661c0..25d613b
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2001-2012 Free Software Foundation, Inc.
+# Copyright (C) 2001-2017 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
@@ -17,7 +17,7 @@
 # Make sure nobase_* works.
 
 required=cc
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac <<'EOF'
 AC_PROG_CC
@@ -120,14 +120,14 @@ rm -f install-sh
 $ACLOCAL
 $AUTOCONF
 $AUTOMAKE -a --copy
-./configure --prefix "`pwd`/inst" --program-prefix=p
+./configure --prefix "$(pwd)/inst" --program-prefix=p
 
 $MAKE
 $MAKE test-install-data
 $MAKE test-install-exec
 $MAKE uninstall
 
-test `find inst/foo -type f -print | wc -l` = 0
+test $(find inst/foo -type f -print | wc -l) -eq 0
 
 $MAKE install-strip
 
@@ -137,11 +137,11 @@ $MAKE uninstall
 $MAKE distclean
 mkdir build
 cd build
-../configure --prefix "`pwd`/inst" --program-prefix=p
+../configure --prefix "$(pwd)/inst" --program-prefix=p
 $MAKE
 $MAKE test-install-data
 $MAKE test-install-exec
 $MAKE uninstall
-test `find inst/foo -type f -print | wc -l` = 0
+test $(find inst/foo -type f -print | wc -l) -eq 0
 
 :
old mode 100755 (executable)
new mode 100644 (file)
index 3c55745..889d968
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2002-2012 Free Software Foundation, Inc.
+# Copyright (C) 2002-2017 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
@@ -16,7 +16,7 @@
 
 # Make sure that PACKAGE and VERSION are AC_DEFINEd when requested.
 
-. ./defs || Exit 1
+. test-init.sh
 
 # -------------------------------------------------------------------
 # Do not upgrade this file to use the modern AC_INIT/AM_INIT_AUTOMAKE
@@ -53,6 +53,6 @@ $ACLOCAL
 $AUTOCONF
 ./configure
 
-grep 'DEFS.*-DVERSION=\\"UnIqUe' output && Exit 1
+grep 'DEFS.*-DVERSION=\\"UnIqUe' output && exit 1
 
 :
old mode 100755 (executable)
new mode 100644 (file)
index 1af7b0d..c5e729e
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2002-2012 Free Software Foundation, Inc.
+# Copyright (C) 2002-2017 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
@@ -16,7 +16,7 @@
 
 # Make sure that PACKAGE and VERSION are AC_DEFINEd when requested.
 
-. ./defs || Exit 1
+. test-init.sh
 
 # First, check that PACKAGE and VERSION are output by default.
 
@@ -49,6 +49,6 @@ $AUTOCONF
 $AUTOMAKE # Dummy call to make sure Automake grok 'no-define' silently.
 ./configure
 
-grep 'DEFS.*-DVERSION=\\"UnIqUe' output && Exit 1
+grep 'DEFS.*-DVERSION=\\"UnIqUe' output && exit 1
 
 :
old mode 100755 (executable)
new mode 100644 (file)
index 5dcad1c..1fb77e0
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 1999-2012 Free Software Foundation, Inc.
+# Copyright (C) 1999-2017 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
@@ -17,7 +17,7 @@
 # Test to make sure no-dependencies option does the right thing.
 # Bug report from Greg A. Woods.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat > Makefile.am << 'END'
 AUTOMAKE_OPTIONS = no-dependencies
@@ -36,5 +36,7 @@ mkdir x
 $ACLOCAL
 $AUTOMAKE
 
-grep '%' Makefile.in && Exit 1
-Exit 0
+sed 's/printf .*%s//' Makefile.in > Makefile.tmp
+grep '%' Makefile.tmp && exit 1
+
+:
old mode 100755 (executable)
new mode 100644 (file)
index cc80058..2dcb271
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2006-2012 Free Software Foundation, Inc.
+# Copyright (C) 2006-2017 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
@@ -16,7 +16,7 @@
 
 # Another test to make sure no-dependencies option does the right thing.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat > Makefile.am << 'END'
 bin_PROGRAMS = foo
@@ -30,12 +30,7 @@ AC_CONFIG_FILES([Makefile])
 AC_PROG_CC
 AC_PROG_CXX
 AC_PROG_OBJC
-# FIXME: this is to cater to older autoconf; remove this once we
-# FIXME: automake requires Autoconf 2.65 or later.
-m4_ifdef([AC_PROG_OBJCXX], [AC_PROG_OBJCXX], [
-  AC_SUBST([OBJCXX], [whocares])
-  AM_CONDITIONAL([am__fastdepOBJCXX], [whocares])
-])
+AC_PROG_OBJCXX
 AM_PROG_AS
 AM_PROG_GCJ
 AM_PROG_UPC
@@ -45,6 +40,6 @@ END
 $ACLOCAL
 $AUTOMAKE
 
-grep DEPMODE Makefile.in && Exit 1
+grep DEPMODE Makefile.in && exit 1
 
 :
old mode 100755 (executable)
new mode 100644 (file)
index 4691efa..e6d9e58
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2000-2012 Free Software Foundation, Inc.
+# Copyright (C) 2000-2017 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
@@ -16,7 +16,7 @@
 
 # Test to make sure depcomp isn't always required.
 
-. ./defs || Exit 1
+. test-init.sh
 
 rm -f depcomp
 
old mode 100755 (executable)
new mode 100644 (file)
index 92cc2f7..d0d51b3
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 1999-2012 Free Software Foundation, Inc.
+# Copyright (C) 1999-2017 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
@@ -16,7 +16,7 @@
 
 # Test to make sure dist_*_SOURCES and nodist_*_SOURCES work.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_CC
@@ -35,6 +35,6 @@ $AUTOMAKE
 
 grep '^am_eyeball_OBJECTS' Makefile.in
 grep '^DIST_SOURCES =' Makefile.in
-grep '^DIST_SOURCES =.*nodist' Makefile.in && Exit 1
+grep '^DIST_SOURCES =.*nodist' Makefile.in && exit 1
 
 :
old mode 100755 (executable)
new mode 100644 (file)
index 36851be..750a098
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2001-2012 Free Software Foundation, Inc.
+# Copyright (C) 2001-2017 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
@@ -17,7 +17,7 @@
 # Test to make sure nodist_noinst_HEADERS work.
 # For PR 249.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac <<'EOF'
 AC_OUTPUT
@@ -32,7 +32,7 @@ EOF
 $ACLOCAL
 $AUTOCONF
 $AUTOMAKE -a
-./configure --prefix "`pwd`/install"
+./configure --prefix "$(pwd)/install"
 $MAKE install-data
 
 :
old mode 100755 (executable)
new mode 100644 (file)
index 23becc1..2131fe7
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2003-2012 Free Software Foundation, Inc.
+# Copyright (C) 2003-2017 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
@@ -16,7 +16,7 @@
 
 # Test to make sure no-dist option works.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_CC
@@ -31,7 +31,7 @@ END
 $ACLOCAL
 $AUTOMAKE
 
-grep '^dist:' Makefile.in && Exit 1
-grep '^DIST_SOURCES =' Makefile.in && Exit 1
+grep '^dist:' Makefile.in && exit 1
+grep '^DIST_SOURCES =' Makefile.in && exit 1
 
 :
old mode 100755 (executable)
new mode 100644 (file)
index 887c7a7..4e306c5
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 1996-2012 Free Software Foundation, Inc.
+# Copyright (C) 1996-2017 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
@@ -17,7 +17,7 @@
 # Check to make sure "make install" will build all in directory with
 # nothing to install.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat > Makefile.am << 'END'
 all-local:
old mode 100755 (executable)
new mode 100644 (file)
index 39abdc7..8424380
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2001-2012 Free Software Foundation, Inc.
+# Copyright (C) 2001-2017 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
@@ -17,7 +17,8 @@
 # Test to make sure that noinst_* and check_* are not installed.
 # From Pavel Roskin.
 
-. ./defs || Exit 1
+required=cc
+. test-init.sh
 
 cat > Makefile.am << 'END'
 noinst_SCRIPTS = foo.sh
@@ -36,6 +37,7 @@ cat >> configure.ac << 'END'
 AC_PROG_CC
 AM_PROG_AR
 AC_PROG_RANLIB
+AC_OUTPUT
 END
 
 : > ar-lib
@@ -43,7 +45,26 @@ END
 $ACLOCAL
 $AUTOMAKE
 
-grep 'noinstdir' Makefile.in && Exit 1
-grep 'checkdir' Makefile.in && Exit 1
+$EGREP '(noinst|check)dir' Makefile.in && exit 1
+
+$AUTOCONF
+./configure --prefix="$(pwd)/inst"
+
+echo 'int main (void) { return 0; }' > foo.c
+echo 'int main (void) { return 0; }' > bar.c
+
+echo 'int foo (void) { return 0; }' > libfoo.c
+echo 'int bar (void) { return 0; }' > libbar.c
+
+: > foo.sh
+: > foo.xpm
+: > foo.h
+: > bar.sh
+: > bar.xpm
+: > bar.h
+
+$MAKE
+$MAKE install
+test ! -e inst
 
 :
old mode 100755 (executable)
new mode 100644 (file)
index dea6271..b5f5a0b
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2001-2012 Free Software Foundation, Inc.
+# Copyright (C) 2001-2017 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
@@ -16,7 +16,7 @@
 
 # Make sure Automake does not emit a link rule for unknown languages.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat > Makefile.am << 'END'
 AUTOMAKE_OPTIONS = no-exeext
@@ -31,6 +31,6 @@ END
 $ACLOCAL
 $AUTOMAKE -Wno-override
 
-grep '^meal.*:' Makefile.in | grep -v beef.meat && Exit 1
+grep '^meal.*:' Makefile.in | grep -v beef.meat && exit 1
 
-Exit 0
+exit 0
old mode 100755 (executable)
new mode 100644 (file)
index 8b780a6..363a5c2
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 1999-2012 Free Software Foundation, Inc.
+# Copyright (C) 1999-2017 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
@@ -21,7 +21,7 @@
 # just skip the rest of the test if configure fails to find a working C
 # compiler.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_CC
@@ -37,7 +37,7 @@ END
 $ACLOCAL
 $AUTOMAKE
 
-$EGREP '(-I *\.|-I.*srcdir|am__isrc)' Makefile.in && Exit 1
+$EGREP '(-I *\.|-I.*srcdir|am__isrc)' Makefile.in && exit 1
 
 # We'll test the fully-processed Makefile too.
 $AUTOCONF
@@ -45,12 +45,12 @@ $AUTOCONF
 # Test with $builddir != $srcdir
 mkdir build
 cd build
-../configure || Exit $?
-$EGREP '.*-I *(\.|\$.srcdir.)' Makefile && Exit 1
+../configure || exit $?
+$EGREP '.*-I *(\.|\$.srcdir.)' Makefile && exit 1
 
 # Test with $builddir = $srcdir
 cd ..
-./configure || Exit $?
-$EGREP '.*-I *(\.|\$.srcdir.)' Makefile && Exit 1
+./configure || exit $?
+$EGREP '.*-I *(\.|\$.srcdir.)' Makefile && exit 1
 
-Exit 0
+exit 0
old mode 100755 (executable)
new mode 100644 (file)
index 487b66f..b85b7d7
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2008-2012 Free Software Foundation, Inc.
+# Copyright (C) 2008-2017 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
@@ -17,7 +17,7 @@
 # Check all notrans_, dist_, nodist_ prefix combinations for MANS
 # primary and install-man dependencies.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat >>configure.ac <<'END'
 AC_OUTPUT
@@ -79,8 +79,8 @@ test-install: install
        test -f inst/man/man2/z-bar2.2
        test -f inst/man/man1/z-baz.1
        test -f inst/man/man1/z-baz2.1
-       if test -d inst/man/man8; then (exit 1); else :; fi
-       if test -d inst/man/man9; then (exit 1); else :; fi
+       test ! -d inst/man/man8
+       test ! -d inst/man/man9
 EOF
 
 : > foo.1
@@ -106,16 +106,18 @@ grep '^install-man3:' Makefile.in | grep '\$(nodist_man_MANS)'
 grep '^install-man4:' Makefile.in | grep '\$(notrans_man_MANS)'
 grep '^install-man5:' Makefile.in | grep '\$(notrans_dist_man_MANS)'
 grep '^install-man6:' Makefile.in | grep '\$(notrans_nodist_man_MANS)'
+grep '^install-man8:' Makefile.in && exit 1
+grep '^install-man9:' Makefile.in && exit 1
 
-if grep '^install-man8:' Makefile.in; then Exit 1; else :; fi
-if grep '^install-man9:' Makefile.in; then Exit 1; else :; fi
+cwd=$(pwd) || fatal_ "getting current working directory"
 
-./configure --program-prefix=gnu- --prefix "`pwd`"/inst --mandir "`pwd`"/inst/man
+./configure --program-prefix=gnu- --prefix "$cwd"/inst \
+                                  --mandir "$cwd"/inst/man
 $MAKE
 $MAKE test-install
-test `find inst/man -type f -print | wc -l` = 24
+test $(find inst/man -type f -print | wc -l) -eq 24
 $MAKE uninstall
-test `find inst/man -type f -print | wc -l` = 0
+test $(find inst/man -type f -print | wc -l) -eq 0
 
 # Opportunistically test for installdirs.
 rm -rf inst
@@ -127,5 +129,7 @@ test -d inst/man/man4
 test -d inst/man/man5
 test -d inst/man/man6
 test -d inst/man/man7
-if test -d inst/man/man8; then Exit 1; else :; fi
-if test -d inst/man/man9; then Exit 1; else :; fi
+test -d inst/man/man8 && exit 1
+test -d inst/man/man9 && exit 1
+
+:
old mode 100755 (executable)
new mode 100644 (file)
index b96e118..f037c68
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 1996-2012 Free Software Foundation, Inc.
+# Copyright (C) 1996-2017 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 to make sure _OBJECTS only generated once.  Bug reported by
+# Test to make sure _OBJECTS is only generated once.  Bug reported by
 # Joerg-Martin Schwarz.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_CC
@@ -31,7 +31,6 @@ $ACLOCAL
 $AUTOMAKE
 
 grep '^zardoz_OBJECTS' Makefile.in
-count=`grep -c '^zardoz_OBJECTS' Makefile.in`
-test $count -eq 1
+test $(grep -c '^zardoz_OBJECTS' Makefile.in) -eq 1
 
 :
old mode 100755 (executable)
new mode 100644 (file)
index f608fbc..8dad76f
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2012 Free Software Foundation, Inc.
+# Copyright (C) 2012-2017 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
@@ -15,7 +15,7 @@
 # require an Objective-C compiler.
 # See also sister test 'objcxx-basic.sh'.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat > Makefile.am <<'END'
 bin_PROGRAMS = hello
old mode 100755 (executable)
new mode 100644 (file)
index a2e4212..5914ddd
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2012 Free Software Foundation, Inc.
+# Copyright (C) 2012-2017 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
@@ -17,7 +17,7 @@
 # Automatic dependency tracking for Objective C.
 # See also sister test 'objcxx-deps.sh'.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_OBJC
@@ -55,7 +55,7 @@ $AUTOMAKE --add-missing
 
 ./configure --enable-dependency-tracking
 $MAKE
-cross_compiling || (./foo | $FGREP 'Hello, World') || Exit 1
+cross_compiling || (./foo | $FGREP 'Hello, World') || exit 1
 $sleep
 : > old
 echo '#define MSG "Howdy, Earth"' > baz2.h
@@ -65,7 +65,7 @@ if test -f foo; then
 else
   is_newest foo.exe old
 fi
-cross_compiling || (./foo | $FGREP 'Howdy, Earth') || Exit 1
+cross_compiling || (./foo | $FGREP 'Howdy, Earth') || exit 1
 
 $MAKE distcheck
 
old mode 100755 (executable)
new mode 100644 (file)
index 6c2b1e6..0a7444a
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2012 Free Software Foundation, Inc.
+# Copyright (C) 2012-2017 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
@@ -16,7 +16,7 @@
 
 # Test Objective C compilation flags.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_OBJC
@@ -52,11 +52,11 @@ $AUTOCONF
 $AUTOMAKE -a
 
 $FGREP OBJCFLAGS Makefile.in # For debugging.
-grep '\$(OBJCFLAGS).*\$(AM_OBJCFLAGS)'       Makefile.in && Exit 1
-grep '\$(OBJCFLAGS).*\$(foo.*_OBJCFLAGS)'    Makefile.in && Exit 1
-grep '\$(foo.*_OBJCFLAGS).*\$(AM_OBJCFLAGS)' Makefile.in && Exit 1
+grep '\$(OBJCFLAGS).*\$(AM_OBJCFLAGS)'       Makefile.in && exit 1
+grep '\$(OBJCFLAGS).*\$(foo.*_OBJCFLAGS)'    Makefile.in && exit 1
+grep '\$(foo.*_OBJCFLAGS).*\$(AM_OBJCFLAGS)' Makefile.in && exit 1
 
 ./configure OBJCFLAGS=-UERROR
-$MAKE 
+$MAKE
 
 :
old mode 100755 (executable)
new mode 100644 (file)
index bad2aee..6b54d1f
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2012 Free Software Foundation, Inc.
+# Copyright (C) 2012-2017 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
 # Stress test on Objective C/C++.
 
 required=libtoolize
-. ./defs || Exit 1
+am_create_testdir=empty
+. test-init.sh
 
 ## Autotools Input Files.
 
 cat > configure.ac << 'END'
 AC_INIT([play], [1.3], [bug-automake@gnu.org])
 
-dnl Support for Object C++ was introduced only in Autoconf 2.65.
-AC_PREREQ([2.65])
 AC_CONFIG_SRCDIR([play.c])
 AC_CONFIG_AUX_DIR([build-aux])
 AC_CONFIG_MACRO_DIR([m4])
@@ -86,13 +85,7 @@ END
 ## Run Autotools.
 
 libtoolize
-if $ACLOCAL; then
-  : We have a modern enough autoconf, go ahead.
-elif test $? -eq 63; then
-  skip_ "Object C++ support requires Autoconf 2.65 or later"
-else
-  Exit 1 # Some other aclocal failure.
-fi
+$ACLOCAL
 $AUTOHEADER
 $AUTOCONF
 $AUTOMAKE --add-missing
@@ -329,14 +322,14 @@ END
 ./configure
 $MAKE
 
-if cross_compiling; then :; else
+if ! cross_compiling; then
   unindent > exp << 'END'
     [Hello C, world C]
     [Hello C++, world C++]
     [Hello ObjC, world ObjC]
     [Hello ObjC++, world ObjC++]
 END
-  ./play > got || { cat got; Exit 1; }
+  ./play > got || { cat got; exit 1; }
   cat exp
   cat got
   diff exp got
old mode 100755 (executable)
new mode 100644 (file)
index acd7e19..8c313b4
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2012 Free Software Foundation, Inc.
+# Copyright (C) 2012-2017 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
@@ -18,7 +18,7 @@
 # See also sister test 'objcxx-minidemo.sh'.
 
 required=native
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_OBJC
@@ -60,7 +60,7 @@ if $ACLOCAL; then
 elif test $? -eq 63; then
   skip_ "Object C++ support requires Autoconf 2.65 or later"
 else
-  Exit 1 # Some other aclocal failure.
+  exit 1 # Some other aclocal failure.
 fi
 
 $ACLOCAL
old mode 100755 (executable)
new mode 100644 (file)
index be2cdf7..b4a0944
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2012 Free Software Foundation, Inc.
+# Copyright (C) 2012-2017 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
@@ -15,7 +15,7 @@
 # require an Objective-C++ compiler.
 # See also sister test 'objc-basic.sh'.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat > Makefile.am <<'END'
 bin_PROGRAMS = hello
@@ -30,19 +30,10 @@ grep "add .*'AC_PROG_OBJCXX'" stderr
 rm -rf autom4te*.cache
 
 cat >> configure.ac <<'END'
-dnl Support for Object C++ was introduced only in Autoconf 2.65.
-AC_PREREQ([2.65])
 AC_PROG_OBJCXX
 END
 
-if $ACLOCAL; then
-  : We have a modern enough autoconf, go ahead.
-elif test $? -eq 63; then
-  skip_ "Object C++ support requires Autoconf 2.65 or later"
-else
-  Exit 1 # Some other aclocal failure.
-fi
-
+$ACLOCAL
 $AUTOMAKE
 $EGREP '^\.SUFFIXES:.* \.mm( |$)' Makefile.in
 
old mode 100755 (executable)
new mode 100644 (file)
index 782193a..4494fd8
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2012 Free Software Foundation, Inc.
+# Copyright (C) 2012-2017 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
 # Automatic dependency tracking for Objective C++.
 # See also sister test 'objc-deps.sh'.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
-dnl Support for Object C++ was introduced only in Autoconf 2.65.
-AC_PREREQ([2.65])
 AC_PROG_OBJCXX
 AC_OUTPUT
 END
@@ -50,19 +48,13 @@ int main (void)
 }
 END
 
-if $ACLOCAL; then
-  : We have a modern enough autoconf, go ahead.
-elif test $? -eq 63; then
-  skip_ "Object C++ support requires Autoconf 2.65 or later"
-else
-  Exit 1 # Some other aclocal failure.
-fi
+$ACLOCAL
 $AUTOCONF
 $AUTOMAKE --add-missing
 
 ./configure --enable-dependency-tracking
 $MAKE
-cross_compiling || (./foo | $FGREP 'Hello, World') || Exit 1
+cross_compiling || (./foo | $FGREP 'Hello, World') || exit 1
 
 $sleep
 : > old
@@ -73,7 +65,7 @@ if test -f foo; then
 else
   is_newest foo.exe old
 fi
-cross_compiling || (./foo | $FGREP 'Howdy, Earth') || Exit 1
+cross_compiling || (./foo | $FGREP 'Howdy, Earth') || exit 1
 
 $MAKE distcheck
 
old mode 100755 (executable)
new mode 100644 (file)
index aea7e19..7c104a5
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2012 Free Software Foundation, Inc.
+# Copyright (C) 2012-2017 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
 # Test Objective C++ compilation flags.
 # See also sister test 'objc-flags.sh'.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
-dnl Support for Object C++ was introduced only in Autoconf 2.65.
-AC_PREREQ([2.65])
 AC_PROG_OBJCXX
 AC_OUTPUT
 END
@@ -50,23 +48,16 @@ for i in 2 4; do
 END
 done
 
-if $ACLOCAL; then
-  : We have a modern enough autoconf, go ahead.
-elif test $? -eq 63; then
-  skip_ "Object C++ support requires Autoconf 2.65 or later"
-else
-  Exit 1 # Some other aclocal failure.
-fi
-
+$ACLOCAL
 $AUTOCONF
 $AUTOMAKE -a
 
 $FGREP OBJCXXFLAGS Makefile.in # For debugging.
-grep '\$(OBJCXXFLAGS).*\$(AM_OBJCXXFLAGS)'       Makefile.in && Exit 1
-grep '\$(OBJCXXFLAGS).*\$(foo.*_OBJCXXFLAGS)'    Makefile.in && Exit 1
-grep '\$(foo.*_OBJCXXFLAGS).*\$(AM_OBJCXXFLAGS)' Makefile.in && Exit 1
+grep '\$(OBJCXXFLAGS).*\$(AM_OBJCXXFLAGS)'       Makefile.in && exit 1
+grep '\$(OBJCXXFLAGS).*\$(foo.*_OBJCXXFLAGS)'    Makefile.in && exit 1
+grep '\$(foo.*_OBJCXXFLAGS).*\$(AM_OBJCXXFLAGS)' Makefile.in && exit 1
 
 ./configure OBJCXXFLAGS=-UERROR
-$MAKE 
+$MAKE
 
 :
old mode 100755 (executable)
new mode 100644 (file)
index 74e152c..f4477d4
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2012 Free Software Foundation, Inc.
+# Copyright (C) 2012-2017 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
 # See also sister test 'objc-minidemo.sh'.
 
 required=native
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
-dnl Support for Object C++ was introduced only in Autoconf 2.65.
-AC_PREREQ([2.65])
 AC_PROG_OBJCXX
 AC_CONFIG_HEADERS([config.h])
 AC_OUTPUT
@@ -57,13 +55,7 @@ int main (void)
 }
 END
 
-if $ACLOCAL; then
-  : We have a modern enough autoconf, go ahead.
-elif test $? -eq 63; then
-  skip_ "Object C++ support requires Autoconf 2.65 or later"
-else
-  Exit 1 # Some other aclocal failure.
-fi
+$ACLOCAL
 $AUTOCONF
 $AUTOHEADER
 $AUTOMAKE --add-missing
old mode 100755 (executable)
new mode 100644 (file)
index 2fe2dfd..2f3eb1d
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2012 Free Software Foundation, Inc.
+# Copyright (C) 2012-2017 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
@@ -17,7 +17,7 @@
 # Test for automake bug#10128: $(OBJEXT) redefinition causes
 # $(foo_OBJECTS) to be defined as empty.
 
-. ./defs || Exit 1
+. test-init.sh
 
 echo AC_OUTPUT >> configure.ac
 
@@ -52,7 +52,7 @@ touch foo.lisp mu1.lisp mu2.lisp
 $MAKE all
 cat foo
 cat zardoz
-test "`cat foo`"    = "Linked foo from foo.fasl"
-test "`cat zardoz`" = "Linked zardoz from mu1.fasl mu2.fasl"
+test "$(cat foo)"    = "Linked foo from foo.fasl"
+test "$(cat zardoz)" = "Linked zardoz from mu1.fasl mu2.fasl"
 
 :
diff --git a/t/obsolete.sh b/t/obsolete.sh
deleted file mode 100755 (executable)
index c4240c2..0000000
+++ /dev/null
@@ -1,57 +0,0 @@
-#! /bin/sh
-# Copyright (C) 1996-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 obsolete macros can be autoupdated.
-
-# We need the following indirection in case someone exported e.g.
-# AUTOUPDATE='autoupdate --verbose'.
-set x ${AUTOUPDATE-autoupdate}
-required=$2
-. ./defs || Exit 1
-
-cat > configure.ac << 'END'
-AC_INIT
-END
-
-$PERL -ne '/AU_DEFUN\(\[(\w+)\]/ && print "$1\n"' \
-  "$am_automake_acdir/obsolete.m4" > obs
-cat obs >> configure.ac
-$PERL -ne 'chomp; print "grep $_ output || Exit 1\n"; ' obs > obs.1
-$PERL -ne 'chomp; print "grep $_ configure.ac && Exit 1\n"; ' obs > obs.2
-echo : >> obs.1 # Since it will be sourced, it must end with a success.
-echo : >> obs.2 # Likewise.
-
-cat configure.ac # For debugging.
-cat obs.1        # Likewise.
-cat obs.2        # Likewise.
-
-# Sanity check.  Make sure we have added something to configure.ac.
-test `wc -l <configure.ac` -gt 1
-
-$ACLOCAL
-
-# Expect Autoconf to complain about each of the macros in obs.
-$AUTOCONF -Wobsolete >output 2>&1 || { cat output; Exit 1; }
-cat output
-. ./obs.1
-# Make sure Autoupdate remove each of these macros.
-$AUTOUPDATE
-. ./obs.2
-
-# Autoconf should be able to grok the updated configure.ac.
-$AUTOCONF
-
-:
old mode 100755 (executable)
new mode 100644 (file)
index 87d9cf1..1a17f2e
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2010-2012 Free Software Foundation, Inc.
+# Copyright (C) 2010-2017 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
@@ -17,7 +17,7 @@
 # Use of these variables is deprecated:
 # LISP, HEADERS, DATA, SCRIPTS, LTLIBRARIES, LIBRARIES, PROGRAMS, MANS.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat >Makefile.am <<\EOF
 DATA =
@@ -32,4 +32,6 @@ EOF
 
 $ACLOCAL
 AUTOMAKE_fails
-test `grep -c anachronism stderr` -eq 8
+test $(grep -c anachronism stderr) -eq 8
+
+:
old mode 100755 (executable)
new mode 100644 (file)
index 2383403..4174d36
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 1996-2012 Free Software Foundation, Inc.
+# Copyright (C) 1996-2017 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
@@ -17,7 +17,7 @@
 # Make sure AC_DEFUN is handled correctly.  This test isn't named very
 # well.  Report from Jim Meyering.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 jm_TEST
old mode 100755 (executable)
new mode 100644 (file)
index 879b678..438c1da
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2008-2012 Free Software Foundation, Inc.
+# Copyright (C) 2008-2017 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
@@ -17,7 +17,7 @@
 # Test that 'automake -a' output order is stable.
 # From report by Bruno Haible.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat >>configure.ac <<'END'
 AC_OUTPUT
@@ -41,7 +41,7 @@ END
 $ACLOCAL
 $AUTOCONF
 rm -f missing install-sh
-$AUTOMAKE --add-missing --copy 2>stderr || { cat stderr >&2; Exit 1; }
+$AUTOMAKE --add-missing --copy 2>stderr || { cat stderr >&2; exit 1; }
 cat stderr >&2
 
 for i in 1 2 3 4 5 6; do
old mode 100755 (executable)
new mode 100644 (file)
index faf877b..40cde23
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 1996-2012 Free Software Foundation, Inc.
+# Copyright (C) 1996-2017 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
@@ -16,7 +16,7 @@
 
 # Test to make sure files listed in AC_OUTPUT are found.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat > configure.ac <<END
 AC_INIT([$me], [1.0])
old mode 100755 (executable)
new mode 100644 (file)
index 92492f6..44a89fa
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2003-2012 Free Software Foundation, Inc.
+# Copyright (C) 2003-2017 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 # Make sure an AC_CONFIG_FILES can have an AC_CONFIG_FILES output as input.
-# This is comparable to output9.test, but testing Makefile rules.
+# This is comparable to 'output9.sh', but testing Makefile rules.
 # PR/411
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << END
 AC_SUBST([FOO], [top])
old mode 100755 (executable)
new mode 100644 (file)
index 4413f97..dd0fd53
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2005-2012 Free Software Foundation, Inc.
+# Copyright (C) 2005-2017 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
@@ -16,7 +16,7 @@
 
 # Make sure an AC_CONFIG_FILES ignore filenames with shell variables.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << \END
 AC_SUBST([FOO], [foo])
@@ -53,7 +53,7 @@ $ACLOCAL
 $AUTOCONF
 $AUTOMAKE
 
-$FGREP ' $file' Makefile.in sub/Makefile.in && Exit 1
+$FGREP ' $file' Makefile.in sub/Makefile.in && exit 1
 
 ./configure
 $MAKE distcheck
old mode 100755 (executable)
new mode 100644 (file)
index a3693cc..4e49851
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2005-2012 Free Software Foundation, Inc.
+# Copyright (C) 2005-2017 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
@@ -16,7 +16,7 @@
 
 # Make sure an AC_CONFIG_FILES process filenames with AC_SUBST variables.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << \END
 AC_SUBST([FOO], [foo])
old mode 100755 (executable)
new mode 100644 (file)
index 065bdb5..f8cd82e
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2007-2012 Free Software Foundation, Inc.
+# Copyright (C) 2007-2017 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
@@ -17,7 +17,7 @@
 # Make sure an AC_CONFIG_FILES, AC_CONFIG_LINKS, and AC_CONFIG_COMMANDS
 # are not prerequisites of 'all'.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << \END
 AC_SUBST([FOO], [foo])
@@ -40,9 +40,9 @@ $AUTOMAKE
 
 ./configure create=false
 $MAKE
-test ! -f file
-test ! -f link
-test ! -f stamp
+test ! -e file
+test ! -e link
+test ! -e stamp
 
 ./configure create=:
 test -f file
old mode 100755 (executable)
new mode 100644 (file)
index 41c81bf..fbbaf5a
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 1996-2012 Free Software Foundation, Inc.
+# Copyright (C) 1996-2017 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
@@ -16,7 +16,7 @@
 
 # Another AC_OUTPUT test.  From report by Ulrich Drepper.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat > configure.ac <<END
 AC_INIT([$me], [1.0])
@@ -34,5 +34,5 @@ mkdir intl po misc
 $ACLOCAL
 $AUTOMAKE
 
-grep '^gettextize' Makefile.in && Exit 1
-Exit 0
+grep '^gettextize' Makefile.in && exit 1
+exit 0
old mode 100755 (executable)
new mode 100644 (file)
index dd7aaef..643d1f3
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 1996-2012 Free Software Foundation, Inc.
+# Copyright (C) 1996-2017 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
@@ -16,7 +16,7 @@
 
 # Yet another AC_OUTPUT test.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat > configure.ac <<END
 AC_INIT([$me], [1.0])
old mode 100755 (executable)
new mode 100644 (file)
index fa6a95e..bd99360
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 1996-2012 Free Software Foundation, Inc.
+# Copyright (C) 1996-2017 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
@@ -16,7 +16,7 @@
 
 # It's hard to believe there are so many AC_OUTPUT-related bugs.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat > configure.ac <<END
 AC_INIT([$me], [1.0])
@@ -31,5 +31,5 @@ mkdir tests
 $ACLOCAL
 $AUTOMAKE
 
-grep tests/defs.in tests/Makefile.in && Exit 1
-Exit 0
+grep tests/defs.in tests/Makefile.in && exit 1
+exit 0
old mode 100755 (executable)
new mode 100644 (file)
index 8bf9403..522c355
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 1997-2012 Free Software Foundation, Inc.
+# Copyright (C) 1997-2017 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
@@ -16,7 +16,7 @@
 
 # Make sure Automake complains when there is no Makefile specified.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat > configure.ac << 'END'
 AC_INIT([foo], [bar], [baz])
old mode 100755 (executable)
new mode 100644 (file)
index b55f5e3..efc750c
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2003-2012 Free Software Foundation, Inc.
+# Copyright (C) 2003-2017 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
@@ -16,7 +16,7 @@
 
 # Check for support for colon-separated input files in AC_CONFIG_FILES.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat > configure.ac << END
 AC_INIT([$me], [1.0])
old mode 100755 (executable)
new mode 100644 (file)
index 0f4725f..f02f2c0
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2003-2012 Free Software Foundation, Inc.
+# Copyright (C) 2003-2017 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
@@ -17,7 +17,7 @@
 # Check for support for colon separated input files in AC_CONFIG_FILES,
 # with sources in sub directories.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat > configure.ac << END
 AC_INIT([$me], [1.0])
@@ -63,10 +63,9 @@ $ACLOCAL
 $AUTOCONF
 $AUTOMAKE
 ./configure
-$MAKE >output
-cat output
-grep in--mk output
-grep in--sub output
-grep at--toplevel output
+run_make -O
+grep in--mk stdout
+grep in--sub stdout
+grep at--toplevel stdout
 
 $MAKE distcheck
old mode 100755 (executable)
new mode 100644 (file)
index 1339c67..341600d
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2003-2012 Free Software Foundation, Inc.
+# Copyright (C) 2003-2017 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
@@ -17,7 +17,7 @@
 # Check AC_CONFIG_FILES support for files starting with '../'.
 # Report from Bruno Haible.
 
-. ./defs || Exit 1
+. test-init.sh
 
 mkdir testdir
 cd testdir
@@ -42,11 +42,13 @@ $AUTOMAKE --add-missing
 
 ./configure
 $MAKE
-test "`cat a/foo.sh`" = foo
+test "$(cat a/foo.sh)" = foo
 
 $sleep
 echo 'bar' >a/foo.sh.in
 
 cd a
 $MAKE foo.sh
-test "`cat foo.sh`" = bar
+test "$(cat foo.sh)" = bar
+
+:
old mode 100755 (executable)
new mode 100644 (file)
index f075910..79f9f67
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2003-2012 Free Software Foundation, Inc.
+# Copyright (C) 2003-2017 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
@@ -16,7 +16,7 @@
 
 # Make sure an AC_CONFIG_FILES can have an AC_CONFIG_FILES output as input.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << END
 AC_CONFIG_FILES([a/mid.in:a/input.in.in])
old mode 100755 (executable)
new mode 100644 (file)
index 1f66d3f..16afc71
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2010-2012 Free Software Foundation, Inc.
+# Copyright (C) 2010-2017 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
@@ -16,7 +16,7 @@
 
 # Test for conditionally-defined overrides.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AM_CONDITIONAL([COND], [test x"$cond" = x"yes"])
@@ -36,7 +36,7 @@ $ACLOCAL
 $AUTOMAKE -Wno-override
 
 # "ps:" should be output in two conditions
-test `grep '[^-]ps:' Makefile.in | wc -l` = 2
+test $(grep -c '[^-]ps:' Makefile.in) -eq 2
 grep '@COND_TRUE@ps: *foobar' Makefile.in
 grep '@COND_FALSE@ps: *ps-am' Makefile.in
 
@@ -44,7 +44,7 @@ $AUTOCONF
 
 ./configure cond=no
 $MAKE ps
-test ! -r foobar
+test ! -e foobar
 
 ./configure cond=yes
 $MAKE ps
old mode 100755 (executable)
new mode 100644 (file)
index 4f06888..5ce601d
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2010-2012 Free Software Foundation, Inc.
+# Copyright (C) 2010-2017 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
@@ -18,7 +18,7 @@
 # This test is still xfailing; see the FIXME in Automake::Rule::define.
 # Once that is fixed, the test should succeed.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AM_CONDITIONAL([COND], [:])
diff --git a/t/override-conditional-pr13940.sh b/t/override-conditional-pr13940.sh
new file mode 100644 (file)
index 0000000..6782af8
--- /dev/null
@@ -0,0 +1,44 @@
+#! /bin/sh
+# Copyright (C) 2013-2017 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/>.
+
+# Expose automake bug#1394: automake erroneously think that a .PHONY
+# target's rule is overridden only because we declare dependencies
+# to such targets twice: one in an Automake conditional, and once
+# unconditionally.
+
+. test-init.sh
+
+cat >> configure.ac << 'END'
+AM_CONDITIONAL([FOO], [true])
+AC_OUTPUT
+END
+
+cat > Makefile.am << 'END'
+# The conditional here is important: Automake only appears to warn
+# when one of the all-local rules is inside a conditional and the
+# other is not.
+if FOO
+all-local: bar
+bar: ; @echo bar
+endif
+all-local: baz
+baz: ; @echo baz
+END
+
+$ACLOCAL
+$AUTOMAKE -a
+
+:
old mode 100755 (executable)
new mode 100644 (file)
index 6438c99..8c48207
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2010-2012 Free Software Foundation, Inc.
+# Copyright (C) 2010-2017 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
@@ -17,7 +17,7 @@
 # Test that overriding 'html' target causes only one "html:" rule to
 # be output.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat > Makefile.am << 'END'
 html:
@@ -28,6 +28,6 @@ $ACLOCAL
 $AUTOMAKE -Wno-override
 
 # Overriding 'html' should cause only one "html:" rule to be output.
-test `grep '^html:' Makefile.in | wc -l` = 1
+test $(grep -c '^html:' Makefile.in) -eq 1
 
 :
old mode 100755 (executable)
new mode 100644 (file)
index 286c888..4337c67
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2010-2012 Free Software Foundation, Inc.
+# Copyright (C) 2010-2017 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
@@ -17,7 +17,7 @@
 # Make sure automake -Woverride suggests using TARGET-local instead
 # of TARGET when possible.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat > Makefile.am << 'END'
 install:
@@ -34,11 +34,11 @@ $ACLOCAL
 $AUTOMAKE -Wno-override
 AUTOMAKE_fails
 # There is no such thing as 'install-local'.
-grep ':.*install-local' stderr && Exit 1
+grep ':.*install-local' stderr && exit 1
 grep ':.*installcheck-local' stderr
 grep ':.*html-local' stderr
 # Make sure overriding *-am targets suggest using *-local, not *-am.
-grep ':.*clean-am-local' stderr && Exit 1
+grep ':.*clean-am-local' stderr && exit 1
 grep ':.*clean-local' stderr
 
 :
old mode 100755 (executable)
new mode 100644 (file)
index db184b2..f3b389e
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2008-2012 Free Software Foundation, Inc.
+# Copyright (C) 2008-2017 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
@@ -36,7 +36,7 @@
 # This test checks (0), (1), and (2).  See sister tests for further coverage.
 
 required=perl-threads
-. ./defs || Exit 1
+. test-init.sh
 
 cat > configure.ac << 'END'
 AC_INIT([parallel-am], [1.0])
@@ -80,10 +80,10 @@ $ACLOCAL
 # Further, automake output should be stable.
 
 # Generate expected output using the non-threaded code.
-unset AUTOMAKE_JOBS || :
+unset AUTOMAKE_JOBS
 AUTOMAKE_run --add-missing
 mv stderr expected
-Makefile_ins=`find . -name Makefile.in`
+Makefile_ins=$(find . -name Makefile.in)
 for file in $Makefile_ins; do
   mv $file $file.exp
 done
old mode 100755 (executable)
new mode 100644 (file)
index a8ee1b9..3ab6589
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2008-2012 Free Software Foundation, Inc.
+# Copyright (C) 2008-2017 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
@@ -21,7 +21,7 @@
 #    warnings should be omitted in the same way as without threads.
 
 required=perl-threads
-. ./defs || Exit 1
+. test-init.sh
 
 mkdir sub
 
@@ -60,7 +60,7 @@ $ACLOCAL
 # Thus we install the auxiliary files in a prior step.
 
 # Generate expected output using non-threaded code.
-unset AUTOMAKE_JOBS || :
+unset AUTOMAKE_JOBS
 rm -f install-sh missing depcomp
 AUTOMAKE_fails --add-missing
 mv stderr expected
old mode 100755 (executable)
new mode 100644 (file)
index d630290..b0a5f37
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2008-2012 Free Software Foundation, Inc.
+# Copyright (C) 2008-2017 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
@@ -22,7 +22,7 @@
 #    installation of aux files should be race-free.
 
 required=perl-threads
-. ./defs || Exit 1
+. test-init.sh
 
 cat > configure.ac << 'END'
 AC_INIT([parallel-am], [1.0])
@@ -56,7 +56,7 @@ mkdir build-aux
 $ACLOCAL
 
 # Generate expected output using the non-threaded code.
-unset AUTOMAKE_JOBS || :
+unset AUTOMAKE_JOBS
 AUTOMAKE_run --add-missing
 mv stderr expected
 mv Makefile.in Makefile.in.exp
old mode 100755 (executable)
new mode 100644 (file)
similarity index 71%
rename from t/parallel-tests.sh
rename to t/parallel-tests-basics.sh
index 459a24d..579f514
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2009-2012 Free Software Foundation, Inc.
+# Copyright (C) 2009-2017 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
@@ -23,7 +23,7 @@
 #  - TEST_LOGS redefinition at runtime
 #  - RECHECK_LOGS redefinition at runtime
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_OUTPUT
@@ -64,37 +64,35 @@ $AUTOMAKE -a
 
 ./configure
 
-$MAKE check >stdout && { cat stdout; Exit 1; }
-cat stdout
+run_make -O -e FAIL check
 count_test_results total=3 pass=1 fail=1 skip=0 xfail=0 xpass=0 error=1
 test -f test-suite.log
 cat test-suite.log
-test `grep -c '^FAIL:' test-suite.log` -eq 1
-test `grep -c '^ERROR:' test-suite.log` -eq 1
-$EGREP '^(X?PASS|XFAIL|SKIP)' test-suite.log && Exit 1
+test $(grep -c '^FAIL:' test-suite.log) -eq 1
+test $(grep -c '^ERROR:' test-suite.log) -eq 1
+$EGREP '^(X?PASS|XFAIL|SKIP)' test-suite.log && exit 1
 test -f baz.log
 test -f bar.log
 test -f foo.log
 
 $MAKE clean
-test ! -f baz.log
-test ! -f bar.log
-test ! -f foo.log
-test ! -f test-suite.log
+test ! -e baz.log
+test ! -e bar.log
+test ! -e foo.log
+test ! -e test-suite.log
 
 # 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; }
-cat stdout
+run_make -O -e FAIL TESTS='bar.test' check
 grep '^FAIL: baz\.test$' stdout
 grep '^ERROR: bar\.test$' stdout
 
 test -f baz.log
 test -f bar.log
-test ! -f foo.log
+test ! -e foo.log
 test -f test-suite.log
 
 # Upon a lazy rerun, foo.test should be run, but the others shouldn't.
@@ -103,49 +101,44 @@ test -f test-suite.log
 # 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.
-env RECHECK_LOGS= $MAKE -e check > stdout && { cat stdout; Exit 1; }
-cat stdout
+run_make -O -e FAIL check RECHECK_LOGS=
 test -f foo.log
 grep '^PASS: foo\.test$' stdout
-grep bar.test stdout && Exit 1
-grep baz.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
 
 # Now, explicitly retry with all test logs already updated, and ensure
 # that the summary is still displayed.
-env RECHECK_LOGS= $MAKE -e check > 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
+run_make -O -e FAIL check RECHECK_LOGS=
+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
+run_make -O -e FAIL check RECHECK_LOGS=foo.log
 grep foo.test stdout
-grep bar.test stdout && Exit 1
-grep baz.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
 
 $MAKE clean
-env TEST_LOGS=baz.log $MAKE -e check > stdout && { cat stdout; Exit 1; }
-cat stdout
-grep foo.test stdout && Exit 1
-grep bar.test stdout && Exit 1
+run_make -O -e FAIL TEST_LOGS=baz.log check
+grep foo.test stdout && exit 1
+grep bar.test stdout && exit 1
 grep baz.test stdout
 
 $MAKE clean
-env TESTS=baz.test $MAKE -e check > stdout && { cat stdout; Exit 1; }
-cat stdout
-grep foo.test stdout && Exit 1
-grep bar.test stdout && Exit 1
+run_make -O -e FAIL TESTS=baz.test check
+grep foo.test stdout && exit 1
+grep bar.test stdout && exit 1
 grep baz.test stdout
 
 :
old mode 100755 (executable)
new mode 100644 (file)
index 5c48640..243b85a
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2011-2012 Free Software Foundation, Inc.
+# Copyright (C) 2011-2017 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
@@ -17,7 +17,7 @@
 # Check that we can use indirections when overriding TESTS and
 # TEST_LOGS from the command line.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_OUTPUT
@@ -60,8 +60,7 @@ END
 
 do_check ()
 {
-  env "$@" $MAKE -e check >stdout || { cat stdout; Exit 1; }
-  cat stdout
+  run_make -O -- "$@" check
   grep '^PASS:' stdout | LC_ALL=C sort > got-out
   cat got-out
   ls . | grep '\.log$' | LC_ALL=C sort > got-log
old mode 100755 (executable)
new mode 100644 (file)
similarity index 95%
rename from t/parallel-tests5.sh
rename to t/parallel-tests-concurrency-2.sh
index bb5a876..67e1beb
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2009-2012 Free Software Foundation, Inc.
+# Copyright (C) 2009-2017 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
@@ -21,7 +21,7 @@
 # It merely serves as demonstration.  :-)
 
 required='cc native GNUmake'
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_CC
old mode 100755 (executable)
new mode 100644 (file)
similarity index 82%
rename from t/parallel-tests3.sh
rename to t/parallel-tests-concurrency.sh
index 8e3be0e..3940a5f
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2009-2012 Free Software Foundation, Inc.
+# Copyright (C) 2009-2017 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
 # Check parallel-tests features:
 # - concurrent parallel execution
 
-. ./defs || Exit 1
+# FIXME: we should factor out (into am-test-lib.sh?) the code to determine
+#        how to run make in parallel mode ...
+
+. test-init.sh
 
 case $MAKE in
   *\ -j*) skip_ "\$MAKE contains '-j'";;
@@ -37,7 +40,7 @@ END
     if test x"$j" = xNONE; then
       skip_ "can't run make in parallel mode"
     fi
-    $MAKE ${j}2 all >output 2>&1 || continue
+    run_make -M -- ${j}2 all || continue
     $EGREP -i "(warning|error):|-j[\"\'\` ]" output && continue
     break
   done
@@ -86,19 +89,22 @@ for build in serial parallel; do
 done
 
 cd serial
-$MAKE ${j}1 check &
-cd ../parallel
+# Do *not* use "make -j1" here; apparently, some make implementations
+# (e.g., AIX 7.1) interpret it as a synonym of "make -j" :-(
+$MAKE check &
+cd ..
+
+cd parallel
 $sleep
-# Use append mode here to avoid dropping output.  See automake bug#11413.
-: > stdout
-$MAKE ${j}4 check >> stdout
+run_make -O -- ${j}4 check
 cd ..
+
 # Ensure the tests are really being run in parallel mode: if this is
 # the case, the serial run of the dummy testsuite started above should
 # still be ongoing when the parallel one has terminated.
 kill -0 $!
 cat parallel/stdout
-test `grep -c '^PASS:' parallel/stdout` -eq 12
+test $(grep -c '^PASS:' parallel/stdout) -eq 12
 
 # Wait long enough so that there are no open files any more when the
 # post-test cleanup runs.  But exit after we've waited for two minutes
@@ -106,7 +112,7 @@ test `grep -c '^PASS:' parallel/stdout` -eq 12
 # already happened).
 i=1
 while test ! -f serial/test-suite.log && test $i -le 120; do
-  i=`expr $i + 1`
+  i=$(($i + 1))
   sleep '1' # Extra quoting to please maintainer-check.
 done
 $sleep
old mode 100755 (executable)
new mode 100644 (file)
index 5a78efd..fa441e0
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2011-2012 Free Software Foundation, Inc.
+# Copyright (C) 2011-2017 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
@@ -17,7 +17,7 @@
 # parallel-tests: some checks on console output about testsuite
 # progress.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_OUTPUT
@@ -92,8 +92,7 @@ for vpath in : false; do
     srcdir=.
   fi
   $srcdir/configure
-  $MAKE check >stdout && { cat stdout; Exit 1; }
-  cat stdout
+  run_make -O -e FAIL check
   LC_ALL=C grep '^[A-Z][A-Z]*:' stdout > got
   cat got
   diff $srcdir/exp got
old mode 100755 (executable)
new mode 100644 (file)
index fcfa38d..63942bc
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2011-2012 Free Software Foundation, Inc.
+# Copyright (C) 2011-2017 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 # Check that auxiliary script 'test-driver' gets automatically installed
-# in the correct directory by 'parallel-tests' option.
+# in the correct directory.
 
-. ./defs || Exit 1
-
-: Try first with parallel-tests defined in AM_INIT_AUTOMAKE.
-
-mkdir am-init-automake
-cd am-init-automake
+am_create_testdir=empty
+. test-init.sh
 
 cat > configure.ac <<END
 AC_INIT([$me], [1.0])
 AC_CONFIG_AUX_DIR([my_aux_dir])
-AM_INIT_AUTOMAKE([parallel-tests])
+AM_INIT_AUTOMAKE
 AC_CONFIG_FILES([Makefile sub/Makefile])
 AC_OUTPUT
 END
@@ -44,49 +40,14 @@ TESTS = bar.test
 END
 
 $ACLOCAL
-$AUTOMAKE -a 2>stderr || { cat stderr >&2; Exit 1; }
+$AUTOMAKE -a 2>stderr || { cat stderr >&2; exit 1; }
 cat stderr >&2
 
 ls -l . sub my_aux_dir # For debugging.
 test -f my_aux_dir/test-driver
-test ! -r test-driver
-test ! -r sub/test-driver
-
-grep '^configure\.ac:3:.*installing.*my_aux_dir/test-driver' stderr
-
-cd ..
-
-: Now try with parallel-tests defined in AUTOMAKE_OPTIONS.
-
-mkdir automake-options
-cd automake-options
-
-cat > configure.ac <<END
-AC_INIT([$me], [1.0])
-AC_CONFIG_AUX_DIR([build-aux])
-AM_INIT_AUTOMAKE
-AC_CONFIG_FILES([dir/GNUmakefile])
-AC_OUTPUT
-END
-
-mkdir build-aux dir
-
-cat > dir/GNUmakefile.am <<END
-TESTS = foo.test
-AUTOMAKE_OPTIONS = parallel-tests
-TESTS += bar.test
-END
-
-$ACLOCAL
-$AUTOMAKE --add-missing --copy dir/GNUmakefile 2>stderr \
-  || { cat stderr >&2; Exit 1; }
-cat stderr >&2
-
-ls -l . dir build-aux # For debugging.
-test -f build-aux/test-driver
-test ! -r test-driver
-test ! -r dir/test-driver
+test ! -e test-driver
+test ! -e sub/test-driver
 
-grep '^dir/GNUmakefile\.am:2:.*installing.*build-aux/test-driver' stderr
+grep '^parallel-tests:.*installing.*my_aux_dir/test-driver' stderr
 
 :
old mode 100755 (executable)
new mode 100644 (file)
index 6fdcb98..26deed3
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2012 Free Software Foundation, Inc.
+# Copyright (C) 2012-2017 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/>.
 
-# Check parallel-tests interactions with "make -n".
-# See also sister test 'parallel-tests-dry-run-2.test'.
+# Check interactions between the parallel test harness and "make -n".
+# See also sister test 'parallel-tests-dry-run-2.sh'.
 
-. ./defs || Exit 1
+. test-init.sh
 
 echo AC_OUTPUT >> configure.ac
 
@@ -82,7 +82,7 @@ END
 
 chmod a+x foo.test bar.test
 
-$MAKE check && Exit 1
+$MAKE check && exit 1
 
 for targ in recheck clean mostlyclean distclean; do
   $MAKE -n "$targ"
old mode 100755 (executable)
new mode 100644 (file)
index 20ccb5d..40a8734
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2011-2012 Free Software Foundation, Inc.
+# Copyright (C) 2011-2017 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/>.
 
-# Check parallel-tests interactions with "make -n".
-# See also sister test 'parallel-tests-dry-run-1.test'.
+# Check interactions between the parallel test harness and "make -n".
+# See also sister test 'parallel-tests-dry-run-1.sh'.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_OUTPUT
@@ -37,11 +37,10 @@ $AUTOCONF
 make_n_ ()
 {
   st=0
-  $MAKE -n "$@" >output 2>&1 || { cat output; ls -l; Exit 1; }
-  cat output
+  run_make -M -- -n "$@" || { ls -l; exit 1; }
   # Look out for possible errors from common tools used by recipes.
-  $EGREP -i ' (exist|permission|denied|no .*(such|file))' output && Exit 1
-  $EGREP '(mv|cp|rm|cat|grep|sed|awk): ' output && Exit 1
+  $EGREP -i ' (exist|permission|denied|no .*(such|file))' output && exit 1
+  $EGREP '(mv|cp|rm|cat|grep|sed|awk): ' output && exit 1
   :
 }
 
@@ -49,19 +48,19 @@ make_n_ ()
 
 files='foo.log bar.log foo.trs bar.trs'
 
+echo 'exit 0' > foo.test
+echo 'exit 1' > bar.test
+
 for target in check recheck test-suite.log; do
-  test ! -f foo.log
-  test ! -f foo.trs
-  test ! -f bar.log
-  test ! -f bar.trs
-  test ! -f test-suite.log
+  make_n_ $target
+  test ! -e foo.log
+  test ! -e foo.trs
+  test ! -e bar.log
+  test ! -e bar.trs
+  test ! -e test-suite.log
 done
 
-# Creative quoting below to please maintainer-check.
-echo exit '0' > foo.test
-echo exit '1' > bar.test
-
-$MAKE check && Exit 1
+$MAKE check && exit 1
 
 chmod a-w .
 
@@ -71,17 +70,16 @@ test -f foo.trs
 test -f foo.log
 test -f bar.trs
 
-# Creative quoting below to please maintainer-check.
 cat > foo.test <<END
 echo this is bad
 exit 1
 END
-echo exit '0' > bar.test
+echo 'exit 0' > bar.test
 
 for target in check recheck test-suite.log; do
   make_n_ $target
   grep '^:test-result: *FAIL' bar.trs
-  grep 'this is bad' foo.log test-suite.log && Exit 1
+  grep 'this is bad' foo.log test-suite.log && exit 1
   : For shells with busted 'set -e'.
 done
 
@@ -92,7 +90,7 @@ else
   for target in check recheck test-suite.log; do
     make_n_ $target
     for f in $files; do
-      test -f $f && test ! -r $f || Exit 1
+      test -f $f && test ! -r $f || exit 1
     done
   done
 fi
@@ -103,9 +101,9 @@ rm -f foo.log bar.trs
 chmod a-w .
 for target in check recheck test-suite.log $files; do
   make_n_ $target
-  test ! -f foo.log
+  test ! -e foo.log
   test -f foo.trs
-  test ! -f bar.trs
+  test ! -e bar.trs
   test -f bar.log
 done
 
old mode 100755 (executable)
new mode 100644 (file)
index 619eae5..0592847
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2011-2012 Free Software Foundation, Inc.
+# Copyright (C) 2011-2017 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
@@ -18,7 +18,7 @@
 # - empty TESTS
 # - empty TEST_LOGS
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_CONFIG_FILES([sub1/Makefile sub2/Makefile])
@@ -62,7 +62,7 @@ $AUTOMAKE -a
 
 no_test_has_run ()
 {
-  ls -1 *.log | grep -v '^test-suite\.log$' | grep . && Exit 1
+  ls -1 *.log | grep -v '^test-suite\.log$' | grep . && exit 1
   grep '^# TOTAL: *0$' test-suite.log
   :
 }
@@ -80,9 +80,9 @@ for vpath in : false; do
   VERBOSE=yes $MAKE check
   no_test_has_run
   cd ../sub2
-  VERBOSE=yes TESTS='' $MAKE -e check
+  run_make VERBOSE=yes TESTS= check
   no_test_has_run
-  VERBOSE=yes TEST_LOGS='' $MAKE -e check
+  run_make VERBOSE=yes TEST_LOGS= check
   no_test_has_run
   cd ..
   $MAKE check
old mode 100755 (executable)
new mode 100644 (file)
similarity index 83%
rename from t/parallel-tests6.sh
rename to t/parallel-tests-empty.sh
index 46b455c..1e17d42
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2009-2012 Free Software Foundation, Inc.
+# Copyright (C) 2009-2017 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
 # Check parallel-tests features:
 # - empty TESTS
 # BSD make will expand '$(TESTS:=.log)' to '.log' unless overridden.
-# See parallel-tests10.test for a similar issue.
+# See 'parallel-tests-trailing-whitespace.sh' for a similar issue.
+
+. test-init.sh
 
-. ./defs || Exit 1
 cat >> configure.ac << 'END'
 AC_OUTPUT
 END
@@ -33,10 +34,9 @@ $AUTOCONF
 $AUTOMAKE -a
 
 ./configure
-$MAKE check >stdout || { cat stdout; Exit 1; }
-cat stdout
+run_make -O check
 for x in TOTAL PASS FAIL XPASS FAIL SKIP ERROR; do
   grep "^# $x: *0$" stdout
 done
 
-Exit 0
+:
old mode 100755 (executable)
new mode 100644 (file)
index 5a3af46..40d4b82
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2011-2012 Free Software Foundation, Inc.
+# Copyright (C) 2011-2017 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
@@ -17,7 +17,7 @@
 # parallel-tests:
 #   - check2.am and interaction with $(EXEEXT)
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 dnl We need to fool the init.m4 internals a little.
@@ -56,9 +56,9 @@ touch x y.bin a.test b.test.bin
 $MAKE check
 ls -l # For debugging.
 test -f y.log
-test ! -r y.bin.log
+test ! -e y.bin.log
 test -f b.log
-test ! -r b.test.log
+test ! -e b.test.log
 
 $EGREP '^y\.log: y(\$\(EXEEXT\)|\.bin)' Makefile
 $EGREP '^\.test(\$\(EXEEXT\)|\.bin)\.log:' Makefile
diff --git a/t/parallel-tests-exit-status-reported.sh b/t/parallel-tests-exit-status-reported.sh
new file mode 100644 (file)
index 0000000..e27f0d7
--- /dev/null
@@ -0,0 +1,68 @@
+#! /bin/sh
+# Copyright (C) 2013-2017 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 exit status of a test should be reported in the test logs, so
+# that one can see at a glance whether the test has succeeded or failed,
+# without having to look also into the corresponding .trs file.
+# See automake bug#11814.
+
+. test-init.sh
+
+echo AC_OUTPUT >> configure.ac
+
+echo XFAIL_TESTS = t3.test t00.test > Makefile.am
+echo TESTS = t00.test >> Makefile.am
+for s in 0 1 2 3 5 77 78 99 100 126 127; do
+  echo "TESTS += t${s}.test" >> Makefile.am
+  cat > t${s}.test <<END
+#!/bin/sh
+printf "%s\\n%s\\n" 'random' 'will exit with status $s'
+exit $s
+END
+done
+cp t0.test t00.test
+
+chmod a+x *.test
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE -a
+
+./configure
+run_make -e FAIL check
+ls -l  # For debugging.
+
+match_result ()
+{
+  cat "$1.log"  # For debugging.
+  test $(wc -l <"$1.log") -eq 3
+  sed -n '$p' "$1.log" | grep "^$2 $1\\.test (exit status: $3)$"
+}
+
+match_result  t0   PASS  0
+match_result  t00  XPASS 0
+match_result  t1   FAIL  1
+match_result  t2   FAIL  2
+match_result  t3   XFAIL 3
+match_result  t5   FAIL  5
+match_result  t77  SKIP  77
+match_result  t78  FAIL  78
+match_result  t99  ERROR 99
+match_result  t100 FAIL  100
+match_result  t126 FAIL  126
+match_result  t127 FAIL  127
+
+:
old mode 100755 (executable)
new mode 100644 (file)
index 90583d5..0020edc
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2011-2012 Free Software Foundation, Inc.
+# Copyright (C) 2011-2017 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
@@ -17,7 +17,7 @@
 # Check parallel-tests features: normal and special exit statuses
 # in the test scripts.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_OUTPUT
@@ -25,15 +25,15 @@ END
 
 # $failure_statuses should be defined to the list of all integers between
 # 1 and 255 (inclusive), excluded 77 and 99.
-failure_statuses=`seq_ 1 255 | $EGREP -v '^(77|99)$' | tr "$nl" ' '`
+failure_statuses=$(seq_ 1 255 | $EGREP -v '^(77|99)$' | tr "$nl" ' ')
 # For debugging.
 echo "failure_statuses: $failure_statuses"
 # Sanity check.
-test `for st in $failure_statuses; do echo $st; done | wc -l` -eq 253 \
+test $(for st in $failure_statuses; do echo $st; done | wc -l) -eq 253 \
   || fatal_ "initializing list of exit statuses for simple failures"
 
 cat > Makefile.am <<END
-LOG_COMPILER = ./do-exit
+LOG_COMPILER = $AM_TEST_RUNNER_SHELL ./do-exit
 fail_tests = $failure_statuses
 TESTS = 0 77 99 $failure_statuses
 \$(TESTS):
@@ -44,7 +44,7 @@ cat > do-exit <<'END'
 echo "$0: $1"
 case $1 in
   [0-9]|[0-9][0-9]|[0-9][0-9][0-9]) st=$1;;
-  */[0-9]|*/[0-9][0-9]|*/[0-9][0-9][0-9]) st=`echo x"$1" | sed 's|.*/||'`;;
+  */[0-9]|*/[0-9][0-9]|*/[0-9][0-9][0-9]) st=${1##*/};;
   *) st=99;;
 esac
 exit $st
@@ -62,40 +62,30 @@ $AUTOMAKE -a
   for st in $failure_statuses; do
     echo "FAIL: $st"
   done
-} | LC_ALL=C sort > exp-fail
+} | LC_ALL=C sort > exp-0
 
-sed 's/^FAIL:/XFAIL:/' exp-fail | LC_ALL=C sort > exp-xfail-1
-sed '/^ERROR:/d' exp-xfail-1 > exp-xfail-2
-
-sort exp-fail
-sort exp-xfail-1
-sort exp-xfail-2
+sed 's/^FAIL:/XFAIL:/' exp-0 | LC_ALL=C sort > exp-1
+sed '/^ERROR:/d' exp-1 > exp-2
 
 ./configure
 
-st=1
-$MAKE check >stdout && st=0
-cat stdout
-cat test-suite.log
-test $st -gt 0 || Exit 1
-LC_ALL=C grep '^[A-Z][A-Z]*:' stdout | LC_ALL=C sort > got-fail
-diff exp-fail got-fail
-
-st=1
-XFAIL_TESTS="$failure_statuses 99" $MAKE -e check >stdout && st=0
-cat stdout
-cat test-suite.log
-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
+mk_ ()
+{
+  n=$1; shift
+  unset am_make_rc
+  run_make -e IGNORE -O -- ${1+"$@"} check
+  cat test-suite.log
+  LC_ALL=C grep '^[A-Z][A-Z]*:' stdout | LC_ALL=C sort > got-$n
+  cat exp-$n
+  cat got-$n
+  diff exp-$n got-$n
+}
 
-st=0
-XFAIL_TESTS="$failure_statuses" TESTS="0 77 $failure_statuses" \
-  $MAKE -e check >stdout || st=$?
-cat stdout
-cat test-suite.log
-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
+mk_ 0
+test $am_make_rc -gt 0
+mk_ 1 XFAIL_TESTS="$failure_statuses 99"
+test $am_make_rc -gt 0
+mk_ 2 XFAIL_TESTS="$failure_statuses" TESTS="0 77 $failure_statuses"
+test $am_make_rc -eq 0
 
 :
old mode 100755 (executable)
new mode 100644 (file)
index c9d13da..5ab5537
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2011-2012 Free Software Foundation, Inc.
+# Copyright (C) 2011-2017 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
@@ -18,7 +18,7 @@
 # (or even be) $(EXTRA_PROGRAMS).
 
 required='cc native'
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_CC
@@ -115,16 +115,13 @@ $AUTOMAKE -a
 #    'test-suite.log' file shouldn't be created (as it depends
 #     on *all* the test logs).
 
-st=0
-$MAKE -k check >stdout 2>stderr || st=$?
-cat stdout
-cat stderr >&2
+run_make -E -O -e IGNORE -- -k check
 ls -l
 if using_gmake; then
-  test $st -gt 0 || Exit 1
+  test $am_make_rc -gt 0 || exit 1
 else
   # Don't trust exit status of "make -k" for non-GNU make.
-  $MAKE check && Exit 1
+  $MAKE check && exit 1
   : For shells with busted 'set -e'.
 fi
 
@@ -134,8 +131,8 @@ grep foofoofoo foo.log
 grep barbarbar bar.log
 grep yepyepyep baz.log
 # Files that shouldn't have been created.
-test ! -f none.log
-test ! -f test-suite.log
+test ! -e none.log
+test ! -e test-suite.log
 # Expected testsuite progress output.
 grep '^PASS: baz\.test$' stdout
 # Don't anchor the end of the next two patterns, to allow for non-empty
@@ -158,11 +155,9 @@ $sleep
 
 echo 'int main (void) { return 0; }' > none.c
 
-st=0
-RECHECK_LOGS= $MAKE -e check >stdout || st=$?
-cat stdout
-ls -l
-test $st -eq 0 || Exit 1
+run_make -O -e IGNORE check RECHECK_LOGS=
+ls -l # For debugging.
+test $am_make_rc -eq 0 || exit 1
 
 # For debugging.
 stat stamp foo.log bar.log baz.log || :
@@ -173,7 +168,7 @@ is_newest stamp foo.log bar.log baz.log
 test -f none.log
 test -f test-suite.log
 # Tests that shouldn't have been re-run.
-$EGREP '(foo|bar)\.bin|baz\.test$' stdout && Exit 1
+$EGREP '(foo|bar)\.bin|baz\.test$' stdout && exit 1
 # Tests that should have been run.  Again, we don't anchor the end
 # of the next pattern, to allow for non-empty $(EXEEXT).
 grep '^PASS: none\.bin' stdout
old mode 100755 (executable)
new mode 100644 (file)
index 5683658..306eb39
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2011-2012 Free Software Foundation, Inc.
+# Copyright (C) 2011-2017 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
 # AM_TESTS_FD_REDIRECT, for tests which are binary executables
 # We use some tricks to ensure that all code paths in 'lib/am/check2.am'
 # are covered, even on platforms where $(EXEEXT) would be naturally empty.
-# See also the more generic test 'check-fd-redirect.test', and
-# sister test 'parallel-tests-fd-redirect.test'.
+# See also the more generic test 'check-fd-redirect.sh', and
+# sister test 'parallel-tests-fd-redirect.sh'.
 
 required='cc native'
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_CC
@@ -104,14 +104,12 @@ grep '^\.test\$(EXEEXT)\.log:' Makefile || st=1
 grep '^qux\.log:' Makefile && st=1
 test $st -eq 0 || fatal_ "doesn't cover expected code paths"
 
-st=0
-$MAKE check >stdout || st=1
-cat stdout
+run_make -O -e IGNORE check
 cat baz.log
 cat qux.log
-test $st -eq 0
+test $am_make_rc -eq 0
 grep "^ bazbazbaz$" stdout
 grep "^ quxquxqux$" stdout
-$EGREP '(bazbazbaz|quxquxqux)' *.log && Exit 1
+$EGREP '(bazbazbaz|quxquxqux)' *.log && exit 1
 
 :
old mode 100755 (executable)
new mode 100644 (file)
index d2dba94..98392fc
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2011-2012 Free Software Foundation, Inc.
+# Copyright (C) 2011-2017 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
 
 # parallel-tests support: redirection of file descriptors with
 # AM_TESTS_FD_REDIRECT, even when using tests without suffix.
-# The sister 'parallel-tests-fd-redirect-exeext.test' do a similar
+# The sister 'parallel-tests-fd-redirect-exeext.sh' do a similar
 # check for tests that are binary executables.
-# See also the more generic test 'check-fd-redirect.test'.
+# See also the more generic test 'check-fd-redirect.sh'.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_OUTPUT
@@ -57,13 +57,12 @@ grep '^bar\.log:.*bar' Makefile || st=1
 grep '^foo\.log:' Makefile && st=1
 test $st -eq 0 || fatal_ "doesn't cover expected code paths"
 
-st=0; $MAKE check >stdout || st=1
-cat stdout
+run_make -O -e IGNORE check
 cat foo.log
 cat bar.log
-test $st -eq 0
+test $am_make_rc -eq 0
 grep "^ foofoofoo$" stdout
 grep "^ barbarbar$" stdout
-$EGREP '(foofoofoo|barbarbar)' *.log && Exit 1
+$EGREP '(foofoofoo|barbarbar)' *.log && exit 1
 
 :
old mode 100755 (executable)
new mode 100644 (file)
index 108d6ea..7aa19d8
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2011-2012 Free Software Foundation, Inc.
+# Copyright (C) 2011-2017 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
@@ -18,7 +18,7 @@
 #  - If $(TEST_SUITE_LOG) is in $(TEST_LOGS), we get a diagnosed
 #    error, not a make hang or a system freeze.
 
-. ./defs || Exit 1
+. test-init.sh
 
 # We don't want localized error messages from make, since we'll have
 # to grep them.  See automake bug#11452.
@@ -98,16 +98,14 @@ $AUTOMAKE -a -Wno-portability
 
 do_check ()
 {
-  st=0
   log=$1; shift
-  env "$@" $MAKE -e check >output 2>&1 || st=$?
-  cat output
-  $FGREP '::OOPS::' output && Exit 1 # Possible infinite recursion.
+  run_make -M -e IGNORE -- "$@" check
+  $FGREP '::OOPS::' output && exit 1 # Possible infinite recursion.
   # Check that at least we don't create a botched global log file.
-  test ! -f "$log"
+  test ! -e "$log"
   if using_gmake; then
     grep "[Cc]ircular.*dependency" output | $FGREP "$log"
-    test $st -gt 0
+    test $am_make_rc -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
@@ -128,7 +126,7 @@ do_check ()
       err_seen=yes
       break
     done
-    test $err_seen = yes || Exit 1
+    test $err_seen = yes || exit 1
   fi
 }
 
old mode 100755 (executable)
new mode 100644 (file)
similarity index 94%
rename from t/parallel-tests8.sh
rename to t/parallel-tests-generated-and-distributed.sh
index 7363929..61c0fb9
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2009-2012 Free Software Foundation, Inc.
+# Copyright (C) 2009-2017 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
@@ -24,7 +24,7 @@
 #       manual for the ugliness in this area, when VPATH comes into
 #       play.  :-/
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_OUTPUT
@@ -68,7 +68,7 @@ mkdir build
 cd build
 ../configure
 $MAKE check
-test ! -f ../foo.log
+test ! -e ../foo.log
 $MAKE distcheck
 
 :
old mode 100755 (executable)
new mode 100644 (file)
index fc7a3c3..32b113a
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2011-2012 Free Software Foundation, Inc.
+# Copyright (C) 2011-2017 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
@@ -16,7 +16,7 @@
 
 # Check parallel-tests features: DISABLE_HARD_ERRORS
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_CONFIG_FILES([sub/Makefile])
@@ -64,13 +64,12 @@ DISABLE_HARD_ERRORS=x $MAKE check
 # But an empty values for DISABLE_HARD_ERRORS means that hard errors
 # are not to be counted like normal failures.
 
-$MAKE check DISABLE_HARD_ERRORS='' && Exit 1
+$MAKE check DISABLE_HARD_ERRORS= && exit 1
 cat test-suite.log
 grep '^ERROR: foo$' test-suite.log
 
 cd sub
-# The '-e' is wanted here.
-DISABLE_HARD_ERRORS='' $MAKE -e check && Exit 1
+$MAKE check DISABLE_HARD_ERRORS= && exit 1
 cat test-suite.log
 grep '^ERROR: bar$' test-suite.log
 cd ..
@@ -85,8 +84,8 @@ $MAKE DISABLE_HARD_ERRORS=y distcheck
 echo 'DISABLE_HARD_ERRORS = yes' >> Makefile.am
 $AUTOMAKE Makefile
 ./config.status Makefile
-VERBOSE=yes $MAKE check && Exit 1
-grep '^FAIL' test-suite.log && Exit 1
+VERBOSE=yes $MAKE check && exit 1
+grep '^FAIL' test-suite.log && exit 1
 grep '^ERROR: bar$' sub/test-suite.log
 
 echo 'DISABLE_HARD_ERRORS = zardoz' >> sub/Makefile
old mode 100755 (executable)
new mode 100644 (file)
index afc1956..a57667c
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2011-2012 Free Software Foundation, Inc.
+# Copyright (C) 2011-2017 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/>.
 
-# Check that the parallel-tests driver removed incomplete log files
+# Check that the parallel testsuite harness removes incomplete log files
 # when interrupt upon some signal.  This test is definitely too hacky,
 # but we couldn't find a better way to deal with inter-processes
 # signals and the whole process-synchronization mess.
 
-. ./defs || Exit 1
+. test-init.sh
 
 plan_ 16
 
@@ -30,7 +30,7 @@ END
 cat > Makefile.am << 'END'
 TESTS = foo.test
 ## Provide more debugging info.
-TEST_LOG_COMPILER = $(SHELL) -x
+TEST_LOG_COMPILER = $(SHELL) -ex
 ## Required by foo.test; see below.
 AM_TESTS_FD_REDIRECT = 9>&1
 END
old mode 100755 (executable)
new mode 100644 (file)
index 1f16d9f..4168f52
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2009-2012 Free Software Foundation, Inc.
+# Copyright (C) 2009-2017 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
@@ -17,9 +17,9 @@
 # Check parallel-tests features:
 # - per-extension "test runners" a.k.a. "log compilers" (xxx_LOG_COMPILER
 #   and xxx_LOG_FLAGS), also with AC_SUBST'd stuff.
-# See also related test 'parallel-tests-log-compiler-2.test'.
+# See also related test 'parallel-tests-log-compiler-2.sh'.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_SUBST([acsubst_compiler], [t-compiler])
@@ -69,7 +69,7 @@ END
 sed 's/--chk/--am-test/' chk-compiler > test-compiler
 
 mkdir bin
-PATH=`pwd`/bin$PATH_SEPARATOR$PATH; export PATH
+PATH=$(pwd)/bin$PATH_SEPARATOR$PATH; export PATH
 
 cat > bin/t-compiler <<'END'
 #! /bin/sh
@@ -101,7 +101,7 @@ $AUTOCONF
 $AUTOMAKE -a
 
 ./configure
-$MAKE check || { cat test-suite.log; Exit 1; }
+$MAKE check || { cat test-suite.log; exit 1; }
 ls -l . sub
 cat test-suite.log
 test -f foo.log
@@ -111,13 +111,13 @@ test -f bla.log
 test -f bli.suff.log
 test -f sub/test.log
 
-T_LOG_FLAGS=--bad $MAKE -e check && Exit 1
+run_make -e FAIL T_LOG_FLAGS=--bad check
 cat test-suite.log
 cat bla.log
 # With the above flag overridden, bla.t should fail ...
 $EGREP '(^ *|/)t-compiler:.* invalid .*--bad' bla.log
 # ... but no other test should.
-grep -v '^FAIL: bla\.t ' bla.log | grep 'FAIL:' && Exit 1
+grep -v '^FAIL: bla\.t ' bla.log | grep 'FAIL:' && exit 1
 
 # Try also with a VPATH build.
 $MAKE distcheck
old mode 100755 (executable)
new mode 100644 (file)
index 72fba68..ed836cf
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2009-2012 Free Software Foundation, Inc.
+# Copyright (C) 2009-2017 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
 # Check parallel-tests features:
 # - per-extension "test runners" a.k.a. "log compilers" (xxx_LOG_COMPILER
 #   and xxx_LOG_FLAGS), when some tests are PROGRAMS.
-# See also related test 'parallel-tests-log-compiler-1.test'.
+# See also related test 'parallel-tests-log-compiler-1.sh'.
 
 required='cc native'
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_CC
@@ -82,7 +82,7 @@ $AUTOMAKE -a
 ./configure
 
 $MAKE
-$MAKE check || { cat test-suite.log; Exit 1; }
+$MAKE check || { cat test-suite.log; exit 1; }
 ls -l . sub
 cat test-suite.log
 grep 'chk-compiler  *1  *2' foo.log
old mode 100755 (executable)
new mode 100644 (file)
index 60dd7bd..32f9702
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2011-2012 Free Software Foundation, Inc.
+# Copyright (C) 2011-2017 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
@@ -18,7 +18,7 @@
 # LOG_COMPILER and LOG_FLAGS given in the manual.
 
 required=python
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac <<END
 AC_SUBST([PERL], ['$PERL'])
@@ -58,7 +58,7 @@ $MAKE check || st=$?
 cat foo.log
 cat bar.log
 cat baz.log
-test $st -eq 0 || Exit $st
+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
old mode 100755 (executable)
new mode 100644 (file)
index 55f6082..ea5b99b
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2011-2012 Free Software Foundation, Inc.
+# Copyright (C) 2011-2017 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
@@ -16,7 +16,7 @@
 
 # Check parallel-tests features: runtime redefinition of $(TEST_SUITE_LOG).
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac <<'END'
 AC_OUTPUT
@@ -57,7 +57,7 @@ test_log_expected ()
 {
   test_log_edit orig > exp
   test_log_edit $1   > got
-  diff exp got || Exit 1
+  diff exp got || exit 1
   rm -f exp got
 }
 
@@ -73,37 +73,37 @@ cat test-suite.log
 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
+run_make TEST_SUITE_LOG=zardoz.log check
 ls -l
-test ! -f test-suite.log
+test ! -e test-suite.log
 cat zardoz.log
 test_log_expected zardoz.log
 # Sanity check the distribution too (this also does minimal checks on
 # VPATH support).
-TEST_SUITE_LOG=zardoz.log $MAKE -e distcheck
+run_make TEST_SUITE_LOG=zardoz.log distcheck
 
 # Check that cleanup rules remove the correct file even when
 # user overrides are in place.
 cp orig test-suite.log
-TEST_SUITE_LOG=zardoz.log $MAKE -e clean
+run_make TEST_SUITE_LOG=zardoz.log clean
 ls -l
-test ! -f zardoz.log
+test ! -e zardoz.log
 diff orig test-suite.log
 
 # Check that the default testsuite log doesn't get unduly modified.
 # Also check that the testsuite log file doesn't need to be named
 # accordingly to the '*.log' pattern.
 chmod a-w test-suite.log
-TEST_SUITE_LOG=TheLogFile $MAKE -e check
+run_make TEST_SUITE_LOG=TheLogFile check
 ls -l
 diff orig test-suite.log
 test_log_expected TheLogFile
-TEST_SUITE_LOG=TheLogFile $MAKE -e clean
+run_make TEST_SUITE_LOG=TheLogFile clean
 ls -l
-test ! -f TheLogFile
+test ! -e TheLogFile
 diff orig test-suite.log
 
 :
old mode 100755 (executable)
new mode 100644 (file)
index eccefcc..8066580
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2011-2012 Free Software Foundation, Inc.
+# Copyright (C) 2011-2017 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
@@ -18,7 +18,7 @@
 #  - $(TEST_SUITE_LOG) and $(TESTS)
 #  - $(TEST_SUITE_LOG) and $(TEST_LOGS)
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac <<'END'
 AC_OUTPUT
@@ -60,24 +60,22 @@ for test_list_override in \
   'TESTS=pass.test skip.test' \
   'TEST_LOGS=pass.log skip.log'
 do
-  env TEST_SUITE_LOG=partial.log "$test_list_override" \
-    $MAKE -e check >stdout || { cat stdout; Exit 1; }
-  cat stdout
+  run_make -O TEST_SUITE_LOG=partial.log "$test_list_override" check
   ls -l
   count_test_results total=2 pass=1 fail=0 skip=1 xfail=0 xpass=0 error=0
   cat pass.log
   cat skip.log
   cat partial.log
-  test ! -f test-suite.log
-  test ! -f pass2.log
-  test ! -f skip2.log
-  test ! -f fail.log
+  test ! -e test-suite.log
+  test ! -e pass2.log
+  test ! -e skip2.log
+  test ! -e fail.log
   grep '^PASS: pass\.test$' stdout
   grep '^SKIP: skip\.test$' stdout
   $FGREP 'SKIP: skip' partial.log
   $FGREP '% skipped test %' partial.log
-  $EGREP '(pass2|skip2|fail)\.test' stdout && Exit 1
-  $EGREP '(pass2|skip2|fail)' partial.log && Exit 1
+  $EGREP '(pass2|skip2|fail)\.test' stdout && exit 1
+  $EGREP '(pass2|skip2|fail)' partial.log && exit 1
   rm -f *.log
 done
 
old mode 100755 (executable)
new mode 100644 (file)
index 5fc39a4..f721966
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2011-2012 Free Software Foundation, Inc.
+# Copyright (C) 2011-2017 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
@@ -17,7 +17,7 @@
 # Check parallel-tests features: runtime redefinition of $(TEST_SUITE_LOG)
 # for the recheck target.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac <<'END'
 AC_OUTPUT
@@ -47,7 +47,7 @@ END
 
 chmod a+x *.test
 
-unset BAZ_EXIT_STATUS || :
+unset BAZ_EXIT_STATUS
 
 $ACLOCAL
 $AUTOCONF
@@ -61,35 +61,34 @@ filter_stdout ()
 }
 
 ./configure
-$MAKE check >stdout && { cat stdout; Exit 1; }
-cat stdout
+run_make -O -e FAIL check
+
+using_gmake || $sleep # Required by BSD make.
 
 chmod a-rw test-suite.log
-TEST_SUITE_LOG=my.log $MAKE -e recheck >stdout \
-  && { cat stdout; Exit 1; }
-cat stdout
+run_make -O -e FAIL TEST_SUITE_LOG=my.log recheck
 ls -l
 filter_stdout
 count_test_results total=2 pass=0 fail=1 skip=0 xfail=0 xpass=0 error=1
 for x in stdout my.log; do
-  $FGREP foofoo $x && Exit 1
+  $FGREP foofoo $x && exit 1
   $FGREP barbar $x
   $FGREP bazbaz $x
 done
 
+using_gmake || $sleep # Required by BSD make.
+
 chmod a-rw my.log
-BAZ_EXIT_STATUS=0 TEST_SUITE_LOG=my2.log $MAKE -e recheck >stdout \
-  && { cat stdout; Exit 1; }
-cat stdout
+run_make -O -e FAIL BAZ_EXIT_STATUS=0 TEST_SUITE_LOG=my2.log recheck
 ls -l
 count_test_results total=2 pass=1 fail=0 skip=0 xfail=0 xpass=0 error=1
 filter_stdout
-$FGREP foofoo stdout && Exit 1
+$FGREP foofoo stdout && exit 1
 $FGREP barbar stdout
 $FGREP bazbaz stdout
-$FGREP foofoo my2.log && Exit 1
+$FGREP foofoo my2.log && exit 1
 $FGREP barbar my2.log
-$FGREP bazbaz my2.log && Exit 1
+$FGREP bazbaz my2.log && exit 1
 
 chmod u+r test-suite.log my.log
 $FGREP bazbaz test-suite.log
diff --git a/t/parallel-tests-many.sh b/t/parallel-tests-many.sh
deleted file mode 100755 (executable)
index 65db6e6..0000000
+++ /dev/null
@@ -1,189 +0,0 @@
-#! /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 parallel-tests harness does not hit errors due to
-# an exceeded command line length when there are many tests.
-# For automake bug#7868.  This test is currently expected to fail.
-
-. ./defs || Exit 1
-
-cat >> configure.ac << 'END'
-AC_OUTPUT
-END
-
-cat > Makefile.am <<'END'
-# Sanity check that the $(TESTS) is going to exceed the system
-# command line length.
-# Extra quoting and indirections below are required to ensure the
-# various make implementations (e.g, GNU make or Sun Distributed Make)
-# will truly spawn a shell to execute this command, instead of relying
-# on optimizations that might mask the "Argument list too long" error
-# we expect.
-this-will-fail:
-       @":" && ":" $(TEST_LOGS)
-TEST_LOG_COMPILER = true
-include list-of-tests.am
-# So that we won't have to create a ton of dummy test cases.
-$(TESTS):
-END
-
-# The real instance will be dynamically created later.
-echo TESTS = foo.test > list-of-tests.am
-
-$ACLOCAL && $AUTOCONF && $AUTOMAKE -a \
-  || framework_failure_ "unexpected autotools failure"
-./configure \
-  || framework_failure_ "unexpected configure failure"
-
-# We want to hit the system command-line length limit without hitting
-# the filename length limit or the PATHMAX limit; so we use longish
-# (but not too long) names for the testcase, and place them in a nested
-# (but not too deeply) directory.
-# We also prefer to use the minimal(ish) number of test cases that can
-# make us hit the command-line length limit, since the more the test
-# cases are, the more time "automake" and "make check" will take to run
-# (especially on Cygwin and MinGW/MSYS).
-
-tname="wow-this-is-a-very-long-name-for-a-simple-dummy-test-case"
-dname="and-this-too-is-a-very-long-name-for-a-dummy-directory"
-
-deepdir=.
-depth=0
-for i in 1 2 3 4 5 6 7 8 9 10 12 13 14 15 16 17 18 19 29 21 22 23 24; do
-  new_deepdir=$deepdir/$dname.d$i
-  mkdir $new_deepdir || break
-  tmpfile=$new_deepdir/$tname-some-more-chars-for-good-measure
-  if touch $tmpfile; then
-    rm -f $tmpfile || Exit 99
-  else
-    rmdir $new_deepdir || Exit 99
-  fi
-  deepdir=$new_deepdir
-  unset tmpfile new_deepdir
-  depth=$i
-done
-
-cat <<END
-*********************************************************************
-Our tests will be in the following directory (depth = $depth)
-*********************************************************************
-$deepdir
-*********************************************************************
-END
-
-setup_data ()
-{
-  # Use perl, not awk, to avoid errors like "awk: string too long"
-  # (seen e.g. with Solaris 10 /usr/bin/awk).
-  count=$count deepdir=$deepdir tname=$tname $PERL -e '
-    use warnings FATAL => "all";
-    use strict;
-    print "TESTS = \\\n";
-    my $i = 0;
-    while (++$i)
-      {
-        print "  $ENV{deepdir}/$ENV{tname}-$i.test";
-        if ($i >= $ENV{count})
-          {
-            print "\n";
-            last;
-          }
-        else
-          {
-            print " \\\n";
-          }
-      }
-  ' > list-of-tests.am || Exit 99
-  sed 20q list-of-tests.am || Exit 99 # For debugging.
-  $AUTOMAKE Makefile \
-    || framework_failure_ "unexpected automake failure"
-  ./config.status Makefile \
-    || framework_failure_ "unexpected config.status failure"
-}
-
-for count in 1 2 4 8 12 16 20 24 28 32 48 64 96 128 E_HUGE; do
-  test $count = E_HUGE && break
-  count=`expr $count '*' 100` || Exit 99
-  setup_data
-  if $MAKE this-will-fail; then
-    continue
-  else
-    # We have managed to find a number of test cases large enough to
-    # hit the system command-line limits; we can stop.  But first, for
-    # good measure, increase the number of tests of some 20%, to be
-    # "even more sure" of really tickling command line length limits.
-    count=`expr '(' $count '*' 12 ')' / 10` || Exit 99
-    setup_data
-    break
-  fi
-done
-
-if test $count = E_HUGE; then
-  framework_failure_ "system has a too-high limit on command line length"
-else
-  cat <<END
-*********************************************************************
-               Number of tests we will use: $count
-*********************************************************************
-END
-fi
-
-env TESTS=$deepdir/$tname-1.test $MAKE -e check \
-  && test -f $deepdir/$tname-1.log \
-  || framework_failure_ "\"make check\" with one single tests"
-
-rm -f $deepdir/* || Exit 99
-
-$MAKE check > stdout || { cat stdout; Exit 1; }
-cat stdout
-
-grep "^# TOTAL: $count$" stdout
-grep "^# PASS:  $count$" stdout
-
-grep "^PASS: .*$tname-[0-9][0-9]*\.test" stdout > grp
-ls -1 $deepdir | grep '\.log$' > lst
-
-sed 20q lst # For debugging.
-sed 20q grp # Likewise.
-
-test `cat <grp | wc -l` -eq $count
-test `cat <lst | wc -l` -eq $count
-
-# We need to simulate a failure of two tests.
-st=0
-env TESTS="$deepdir/$tname-1.test $deepdir/$tname-2.test" \
-    TEST_LOG_COMPILER=false $MAKE -e check > stdout && st=1
-cat stdout
-test `grep -c '^FAIL:' stdout` -eq 2 || st=1
-test $st -eq 0 || fatal_ "couldn't simulate failure of two tests"
-unset st
-
-$MAKE recheck > stdout || { cat stdout; Exit 1; }
-cat stdout
-grep "^PASS: .*$tname-1\.test" stdout
-grep "^PASS: .*$tname-2\.test" stdout
-test `LC_ALL=C grep -c "^[A-Z][A-Z]*:" stdout` -eq 2
-grep "^# TOTAL: 2$" stdout
-grep "^# PASS:  2$" stdout
-
-# "make clean" might ignore some failures, so we prefer to also grep its
-# output to ensure that no "Argument list too long" error was encountered.
-$MAKE clean >output 2>&1 || { cat output; Exit 1; }
-cat output
-grep -i 'list.* too long' output && Exit 1
-ls $deepdir | grep '\.log$' && Exit 1
-
-:
old mode 100755 (executable)
new mode 100644 (file)
index 69414f7..7633d24
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2011-2012 Free Software Foundation, Inc.
+# Copyright (C) 2011-2017 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
 
 # Colorized output from the testsuite report shouldn't end up in log files.
 
-. ./defs || Exit 1
-
-esc='\e'
-
-# Check that grep can parse nonprinting characters.
-# BSD 'grep' works from a pipe, but not a seekable file.
-# GNU or BSD 'grep -a' works on files, but is not portable.
-case `echo "$esc" | $FGREP "$esc"` in
-  "$esc") ;;
-# Creative quoting below to please maintainer-check.
-  *) echo "$me: f""grep can't parse nonprinting characters" >&2; Exit 77;;
-esac
+required='grep-nonprint'
+. test-init.sh
 
 TERM=ansi; export TERM
 
@@ -37,18 +27,17 @@ END
 
 cat >Makefile.am <<'END'
 LOG_COMPILER = $(SHELL)
-AUTOMAKE_OPTIONS = color-tests parallel-tests
+AUTOMAKE_OPTIONS = color-tests
 TESTS = pass fail skip xpass xfail error
 XFAIL_TESTS = xpass xfail
 END
 
-# Creative quoting to please maintainer-check.
-echo exit '0' > pass
-echo exit '0' > xpass
-echo exit '1' > fail
-echo exit '1' > xfail
-echo exit '77' > skip
-echo exit '99' > error
+echo 'exit 0' > pass
+echo 'exit 0' > xpass
+echo 'exit 1' > fail
+echo 'exit 1' > xfail
+echo 'exit 77' > skip
+echo 'exit 99' > error
 
 $ACLOCAL
 $AUTOCONF
@@ -56,7 +45,9 @@ $AUTOMAKE --add-missing
 
 ./configure
 mv config.log config-log # Avoid possible false positives below.
-AM_COLOR_TESTS=always $MAKE -e check && Exit 1
-$FGREP "$esc" *.log && Exit 1
+run_make -e FAIL AM_COLOR_TESTS=always check
+# Not a useless use of cat; see above comments "grep-nonprinting"
+# requirement in 'test-init.sh'.
+cat *.log | grep "$esc" && exit 1
 
 :
old mode 100755 (executable)
new mode 100644 (file)
index 6400b3b..dbe6b3c
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2009-2012 Free Software Foundation, Inc.
+# Copyright (C) 2009-2017 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
@@ -17,7 +17,7 @@
 # Check that ':test-results:' directives in test scripts' output doesn't
 # originate spurious results in the testsuite summary.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_OUTPUT
@@ -49,13 +49,11 @@ $AUTOMAKE -a
 
 ./configure
 
-st=0
-$MAKE check >stdout || st=$?
-cat stdout
+run_make -O -e IGNORE check
 cat test-suite.log
 cat foo.log
 cat bar.log
-test $st -eq 0 || Exit $st
+test $am_make_rc -eq 0
 
 grep '^:test-result:XFAIL$'  foo.log
 grep '^:test-result: SKIP$'  foo.log
old mode 100755 (executable)
new mode 100644 (file)
index 51912fb..c4f8b80
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2011-2012 Free Software Foundation, Inc.
+# Copyright (C) 2011-2017 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
@@ -18,7 +18,7 @@
 # clean directory.  An early implementation of the '.trs' intermediate
 # files incurred a similar problem.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_OUTPUT
@@ -30,7 +30,7 @@ END
 
 cat > foo.test <<'END'
 #! /bin/sh
-test -f foo.run && Exit 1
+test -f foo.run && exit 1
 : > foo.run
 END
 chmod a+x foo.test
old mode 100755 (executable)
new mode 100644 (file)
index 9464a36..199d105
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2012 Free Software Foundation, Inc.
+# Copyright (C) 2012-2017 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
@@ -18,7 +18,7 @@
 # See automake bug#11252.
 
 required='cc native'
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_CC
@@ -63,10 +63,9 @@ $AUTOCONF
 $AUTOMAKE -a
 ./configure
 
-$MAKE check >stdout && { cat stdout; Exit 1; }
-cat stdout
+run_make -O -e FAIL check
 count_test_results total=3 pass=1 fail=2 skip=0 xfail=0 xpass=0 error=0
-test ! -f status
+test ! -e status
 
 $sleep
 : > status
@@ -79,14 +78,12 @@ int main (void)
 }
 END
 
-$MAKE recheck >stdout || { cat stdout; Exit 1; }
-cat stdout
+run_make -O recheck
 count_test_results total=2 pass=2 fail=0 skip=0 xfail=0 xpass=0 error=0
 grep '^PASS: b\.test$' stdout
 grep '^PASS: c\.test$' stdout
 
-$MAKE recheck >stdout || { cat stdout; Exit 1; }
-cat stdout
+run_make -O recheck
 count_test_results total=0 pass=0 fail=0 skip=0 xfail=0 xpass=0 error=0
 
 :
diff --git a/t/parallel-tests-recheck-pr11791.sh b/t/parallel-tests-recheck-pr11791.sh
new file mode 100644 (file)
index 0000000..9eccf92
--- /dev/null
@@ -0,0 +1,85 @@
+#! /bin/sh
+# Copyright (C) 2012-2017 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/>.
+
+# parallel-tests: "make recheck" and "make -k recheck" in the face of
+# build failures for the test cases.  See automake bug#11791.
+
+required='cc native'
+. test-init.sh
+
+cat >> configure.ac << 'END'
+AC_PROG_CC
+AC_OUTPUT
+END
+
+cat > Makefile.am << 'END'
+TESTS = $(EXTRA_PROGRAMS)
+EXTRA_PROGRAMS = foo
+END
+
+echo 'int main (void) { return 1; }' > foo.c
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE -a
+
+./configure
+
+run_make -O -e FAIL check
+count_test_results total=1 pass=0 fail=1 xpass=0 xfail=0 skip=0 error=0
+
+using_gmake || $sleep # Required by BSD make.
+run_make -O -e IGNORE -- -k recheck
+# Don't trust the exit status of "make -k" for non-GNU makes.
+! using_gmake || test $am_make_rc -gt 0 || exit 1
+count_test_results total=1 pass=0 fail=1 xpass=0 xfail=0 skip=0 error=0
+
+# Introduce an error in foo.c, that should cause a compilation failure.
+$sleep
+echo choke me >> foo.c
+
+run_make -O -e FAIL recheck
+# We don't get a change to run the testsuite.
+$EGREP '(X?PASS|X?FAIL|SKIP|ERROR):' stdout && exit 1
+# These shouldn't be removed, otherwise the next make recheck will do
+# nothing.
+test -f foo.log
+test -f foo.trs
+
+using_gmake || $sleep # Required by BSD make.
+run_make -O -e IGNORE -- -k recheck
+# Don't trust the exit status of "make -k" for non-GNU makes.
+! using_gmake || test $am_make_rc -gt 0 || exit 1
+# We don't get a change to run the testsuite.
+$EGREP '(X?PASS|X?FAIL|SKIP|ERROR):' stdout && exit 1
+test -f foo.log
+test -f foo.trs
+
+# "Repair" foo.c, and expect everything to work.
+$sleep
+echo 'int main (void) { return 0; }' > foo.c
+
+run_make -O recheck
+count_test_results total=1 pass=1 fail=0 xpass=0 xfail=0 skip=0 error=0
+test -f foo.log
+test -f foo.trs
+
+run_make -O recheck
+count_test_results total=0 pass=0 fail=0 xpass=0 xfail=0 skip=0 error=0
+test -f foo.log
+test -f foo.trs
+
+:
old mode 100755 (executable)
new mode 100644 (file)
similarity index 73%
rename from t/parallel-tests9.sh
rename to t/parallel-tests-recheck.sh
index 42d0e2d..9a84fea
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2009-2012 Free Software Foundation, Inc.
+# Copyright (C) 2009-2017 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
@@ -17,7 +17,7 @@
 # Check parallel-tests features:
 # - recheck
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_OUTPUT
@@ -55,25 +55,28 @@ $AUTOCONF
 $AUTOMAKE -a
 
 ./configure
-$MAKE check >stdout && { cat stdout; Exit 1; }
-cat stdout
+run_make -O -e FAIL check
 count_test_results total=3 pass=1 fail=1 skip=0 xfail=0 xpass=0 error=1
 
-$MAKE recheck >stdout && { cat stdout; Exit 1; }
-cat stdout
-count_test_results total=2 pass=0 fail=1 skip=0 xfail=0 xpass=0 error=1
-grep 'foo\.test' stdout && Exit 1
-grep '^ERROR: bar\.test$' stdout
-grep '^FAIL: baz\.test$' stdout
+# Running this two times in a row should produce the same results the
+# second time.
+for i in 1 2; do
+  using_gmake || $sleep # Required by BSD make.
+  run_make -O -e FAIL recheck
+  count_test_results total=2 pass=0 fail=1 skip=0 xfail=0 xpass=0 error=1
+  grep 'foo\.test' stdout && exit 1
+  grep '^ERROR: bar\.test$' stdout
+  grep '^FAIL: baz\.test$' stdout
+done
 
 # Ensure that recheck builds check_SCRIPTS, and that
 # recheck reruns nothing if check has not been run.
 $MAKE clean
 $MAKE recheck
 test -f bla
-test ! -f foo.log
-test ! -f bar.log
-test ! -f baz.log
+test ! -e foo.log
+test ! -e bar.log
+test ! -e baz.log
 test -f mylog.log
 
 :
old mode 100755 (executable)
new mode 100644 (file)
index cf9fb6c..c77c9a3
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2011-2012 Free Software Foundation, Inc.
+# Copyright (C) 2011-2017 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/>.
 
-# Check that the parallel-tests driver correctly handle overrides of the
+# Check that the testsuite harness correctly handle overrides of the
 # TERM variable by either TESTS_ENVIRONMENT and AM_TESTS_ENVIRONMENT.
 
-. ./defs || Exit 1
-
-esc='\e['
+required='grep-nonprint'
+. test-init.sh
 
 TERM=ansi; export TERM
 
-# Check that grep can parse nonprinting characters.
-# BSD 'grep' works from a pipe, but not a seekable file.
-# GNU or BSD 'grep -a' works on files, but is not portable.
-case `echo "$esc" | $FGREP "$esc"` in
-  "$esc") ;;
-  *) skip_ "$FGREP can't parse nonprinting characters" ;;
-esac
-
 cat >> configure.ac << 'END'
 AC_OUTPUT
 END
@@ -50,15 +41,11 @@ chmod a+x foobar
 
 mkcheck ()
 {
-  if $MAKE "$@" check > stdout; then
-    rc=0
-  else
-    rc=1
-  fi
+  run_make -O -e IGNORE "$@" check
   cat stdout
   cat foobar.log
   cat test-suite.log
-  return $rc
+  return $am_make_rc
 }
 
 $ACLOCAL
@@ -67,9 +54,9 @@ $AUTOMAKE -a
 ./configure
 
 mkcheck TESTS_ENVIRONMENT='TERM=dumb'
-cat stdout | grep "PASS.*foobar" | $FGREP "$esc"
+cat stdout | grep "PASS.*foobar" | grep "$esc\\["
 
 mkcheck AM_TESTS_ENVIRONMENT='TERM=dumb'
-cat stdout | grep "PASS.*foobar" | $FGREP "$esc"
+cat stdout | grep "PASS.*foobar" | grep "$esc\\["
 
 :
old mode 100755 (executable)
new mode 100644 (file)
index 2698a53..8679603
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2011-2012 Free Software Foundation, Inc.
+# Copyright (C) 2011-2017 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/>.
 
-# Check that the parallel-tests driver creates parent directories for
+# Check that the parallel test harness creates parent directories for
 # the log files when needed.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_OUTPUT
old mode 100755 (executable)
new mode 100644 (file)
index 28dd349..4163dbc
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2009-2012 Free Software Foundation, Inc.
+# Copyright (C) 2009-2017 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
 
 # Check parallel-tests features:
 # - suffix rules, with PROGRAMS involved
-# See also sister test 'parallel-tests-suffix.test'.
+# See also sister test 'parallel-tests-suffix.sh'.
 
 required='cc native'
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_CC
@@ -27,6 +27,7 @@ AC_OUTPUT
 END
 
 cat > Makefile.am << 'END'
+AUTOMAKE_OPTIONS = subdir-objects
 ## Note that automake should not match the '/test' part of 'sub/test' as
 ## '.test' suffix, nor the '/chk' part of 'sub/chk' as '.chk' suffix.
 TESTS = $(dist_TESTS) $(check_PROGRAMS)
old mode 100755 (executable)
new mode 100644 (file)
index 9e9e843..c3dc0a5
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2009-2012 Free Software Foundation, Inc.
+# Copyright (C) 2009-2017 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
@@ -16,9 +16,9 @@
 
 # Check parallel-tests features:
 # - suffix rules
-# See also sister test 'parallel-tests-suffix-prog.test'.
+# See also sister test 'parallel-tests-suffix-prog.sh'.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_OUTPUT
diff --git a/t/parallel-tests-trailing-bslash.sh b/t/parallel-tests-trailing-bslash.sh
deleted file mode 100755 (executable)
index 1291764..0000000
+++ /dev/null
@@ -1,113 +0,0 @@
-#! /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 new testsuite harness do not generate recipes that can
-# have a trailing '\', since that can cause spurious syntax errors with
-# older bash versions (e.g., bash 2.05b).
-# See automake bug#10436.
-
-. ./defs || Exit 1
-
-echo AC_OUTPUT >> configure.ac
-
-cat > Makefile.am <<'END'
-TESTS = foo.test
-EXTRA_DIST = $(TESTS)
-am__backslash = \\ # foo
-.PHONY: bad-recipe
-bad-recipe:
-       @printf '%s\n' $(am__backslash)
-END
-
-cat > foo.test <<'END'
-#!/bin/sh
-exit 0
-END
-chmod +x foo.test
-
-am__SHELL=$SHELL; export am__SHELL
-am__PERL=$PERL; export am__PERL
-
-cat > my-shell <<'END'
-#!/bin/sh -e
-set -u
-tab='  '
-nl='
-'
-am__shell_flags=
-am__shell_command=; unset am__shell_command
-while test $# -gt 0; do
-  case $1 in
-    # If the shell is invoked by make e.g. as "sh -ec" (seen on
-    # GNU make in POSIX mode) or "sh -ce" (seen on Solaris make).
-    -*c*)
-        flg=`echo x"$1" | sed -e 's/^x-//' -e 's/c//g'`
-        if test x"$flg" != x; then
-          am__shell_flags="$am__shell_flags -$flg"
-        fi
-        am__shell_command=$2
-        shift
-        ;;
-    -?*)
-        am__shell_flags="$am__shell_flags $1"
-        ;;
-      *)
-        break
-        ;;
-  esac
-  shift
-done
-if test x${am__shell_command+"set"} != x"set"; then
-  # Some make implementations, like *BSD's, pass the recipes to the shell
-  # through its standard input.  Trying to run our extra checks in this
-  # case would be too tricky, so we just skip them.
-  exec $am__SHELL $am__shell_flags ${1+"$@"}
-else
-  am__tweaked_shell_command=`printf '%s\n' "$am__shell_command" \
-    | tr -d " $tab$nl"`
-  case ${am__tweaked_shell_command-} in
-    *\\)
-      echo "my-shell: recipe ends with backslash character" >&2
-      printf '%s\n' "=== BEGIN recipe" >&2
-      printf '%s\n' "${am__shell_command-}" >&2
-      printf '%s\n' "=== END recipe" >&2
-      exit 99
-      ;;
-  esac
-  exec $am__SHELL $am__shell_flags -c "$am__shell_command" ${1+"$@"}
-fi
-END
-chmod a+x my-shell
-
-cat my-shell
-
-CONFIG_SHELL=`pwd`/my-shell; export CONFIG_SHELL
-
-$ACLOCAL
-$AUTOCONF
-$AUTOMAKE -a
-
-./configure CONFIG_SHELL="$CONFIG_SHELL"
-
-st=0
-$MAKE bad-recipe 2>stderr && st=1
-cat stderr >&2
-$FGREP "my-shell: recipe ends with backslash character" stderr || st=1
-test $st -eq 0 || skip_ "can't catch trailing backslashes in make recipes"
-
-$MAKE check
-
-:
old mode 100755 (executable)
new mode 100644 (file)
similarity index 92%
rename from t/parallel-tests10.sh
rename to t/parallel-tests-trailing-whitespace.sh
index 9746024..9211c56
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2009-2012 Free Software Foundation, Inc.
+# Copyright (C) 2009-2017 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
@@ -18,7 +18,7 @@
 # - trailing whitespace in TESTS
 # GNU make 3.80 may expand trailing white space to '.log'.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_OUTPUT
old mode 100755 (executable)
new mode 100644 (file)
index 98591e6..fec7286
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2011-2012 Free Software Foundation, Inc.
+# Copyright (C) 2011-2017 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
@@ -17,7 +17,7 @@
 # Check that the testsuite driver copes well with unreadable '.log'
 # and '.trs' files.
 
-. ./defs || Exit 1
+. test-init.sh
 
 : > t
 chmod a-r t && test ! -r t || skip_ "you can still read unreadable files"
@@ -60,7 +60,7 @@ for files in \
   $MAKE check
   rm -f test-suite.log
   chmod a-r $files
-  $MAKE test-suite.log || { ls -l; Exit 1; }
+  $MAKE test-suite.log || { ls -l; exit 1; }
   ls -l
   grep '^foofoofoo$' foo.log
   grep '^:test-result: PASS' foo.trs
@@ -68,7 +68,7 @@ for files in \
   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
+  $EGREP ':.*foo|foofoofoo' test-suite.log && exit 1
   : For shells with busted 'set -e'.
 done
 
old mode 100755 (executable)
new mode 100644 (file)
index 20ac2fe..972ff6d
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 1998-2012 Free Software Foundation, Inc.
+# Copyright (C) 1998-2017 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
@@ -16,7 +16,7 @@
 
 # Test to make sure backslash-newline is treated as whitespace.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_CC
@@ -32,5 +32,5 @@ END
 $ACLOCAL
 $AUTOMAKE
 
-$FGREP zar.cdoz Makefile.in && Exit 1
-Exit 0
+$FGREP zar.cdoz Makefile.in && exit 1
+exit 0
diff --git a/t/per-target-flags.sh b/t/per-target-flags.sh
new file mode 100644 (file)
index 0000000..889a326
--- /dev/null
@@ -0,0 +1,92 @@
+#! /bin/sh
+# Copyright (C) 1999-2017 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.
+
+. test-init.sh
+
+makefiles='Makefile libMakefile Makefile2 libMakefile2'
+
+cat > configure.ac << END
+AC_INIT([$me], [1.0])
+AM_INIT_AUTOMAKE([-Wno-extra-portability])
+AC_CONFIG_FILES([$makefiles])
+AC_PROG_CC
+AC_PROG_CXX
+AC_PROG_RANLIB
+AC_OUTPUT
+END
+
+$ACLOCAL
+
+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
+
+makefiles=$(for mkf in $makefiles; do echo $mkf.in; done)
+
+$AUTOMAKE
+
+# Sanity check.
+for mkf in $makefiles; do test -f $mkf || exit 99; done
+
+# Regression test for missing space.
+$FGREP ')-c' $makefiles && exit 1
+
+# Regression test for botchedly transformed object names.
+$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).
+$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 | grep -v ' -c' && 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
+
+:
old mode 100755 (executable)
new mode 100644 (file)
index bdba44e..8776793
@@ -1,5 +1,5 @@
 #!/bin/sh
-# Copyright (C) 2002-2012 Free Software Foundation, Inc.
+# Copyright (C) 2002-2017 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
@@ -17,7 +17,7 @@
 # Test to make sure that -Wportability understands %-style pattern
 # rules.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat >>configure.ac <<EOF
 AC_PROG_CC
old mode 100755 (executable)
new mode 100644 (file)
index 19af61a..eb088ab
@@ -1,5 +1,5 @@
 #!/bin/sh
-# Copyright (C) 2002-2012 Free Software Foundation, Inc.
+# Copyright (C) 2002-2017 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
@@ -19,7 +19,7 @@
 # '${ARCH}/%.$(OBJEXT):'.
 # Report from Ralf Corsepius.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat >>Makefile.am << 'EOF'
 ${ARCH}/%.$(OBJEXT): %.S
index 7c8261e..fef5557 100755 (executable)
@@ -1,5 +1,5 @@
 #!/bin/sh
-# Copyright (C) 2003-2012 Free Software Foundation, Inc.
+# Copyright (C) 2003-2017 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
@@ -17,7 +17,7 @@
 # Check that many conditions do not lead to combinatorial explosion.
 # (This is related to PR/352.)
 
-. ./defs || Exit 1
+. test-init.sh
 
 echo AC_PROG_CC >>configure.ac
 
index 50cc03b..2b5fa19 100755 (executable)
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2012 Free Software Foundation, Inc.
+# Copyright (C) 2012-2017 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
@@ -19,7 +19,7 @@
 # FIXME: performance is too low, and FAIL accordingly; it just offers an
 # FIXME: easy way to verify how effective a performance optimization is.
 
-. ./defs || Exit 1
+. test-init.sh
 
 count=5000
 
@@ -69,7 +69,7 @@ END
 # Temporarily disable shell traces, to avoid bloating the log file.
 set +x
 
-for i in `seq_ 1 $count`; do
+for i in $(seq_ 1 $count); do
   echo dummy $i > $i.log
   echo :global-test-result: PASS > $i.trs
   echo :test-result: PASS >> $i.trs
index a11bb8e..d4a6261 100755 (executable)
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2012 Free Software Foundation, Inc.
+# Copyright (C) 2012-2017 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
@@ -20,7 +20,7 @@
 # FIXME: performance is too low, and FAIL accordingly; it just offers
 # FIXME: an easy way verify how effective a performance optimization is.
 
-. ./defs || Exit 1
+. test-init.sh
 
 count=10000
 
@@ -38,14 +38,14 @@ END
 # Temporarily disable shell traces, to avoid bloating the log file.
 set +x
 
-for i in `seq_ 1 $count`; do
+for i in $(seq_ 1 $count); do
   echo false > $i.t
   echo dummy $i > $i.log
   echo :global-test-result: PASS > $i.trs
   echo :test-result: PASS >> $i.trs
   echo :copy-in-global-log: yes >> $i.trs
   echo TESTS += $i.t
-done >> Makefile.am 
+done >> Makefile.am
 
 # Re-enable shell traces.
 set -x
@@ -63,7 +63,7 @@ $AUTOMAKE -a
 
 ./configure
 
-$MAKE test-suite.log >stdout || { cat stdout; Exit 1; }
+$MAKE test-suite.log >stdout || { cat stdout; exit 1; }
 cat stdout
 
 # Sanity checks.
old mode 100755 (executable)
new mode 100644 (file)
index a818cfb..44e4b30
@@ -1,5 +1,5 @@
 #!/bin/sh
-# Copyright (C) 2002-2012 Free Software Foundation, Inc.
+# Copyright (C) 2002-2017 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
@@ -17,7 +17,7 @@
 # Make sure .PHONY can be given dependencies several times.
 # From Ralf Corsepius.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat >Makefile.am << 'EOF'
 .PHONY: foo
@@ -26,4 +26,7 @@ EOF
 
 $ACLOCAL
 $AUTOMAKE
-test `$FGREP .PHONY: Makefile.in | wc -l` = 3
+$FGREP '.PHONY:' Makefile.in  # For debugging.
+test $($FGREP -c '.PHONY:' Makefile.in) -eq 3
+
+:
diff --git a/t/pkg-config-macros.sh b/t/pkg-config-macros.sh
new file mode 100644 (file)
index 0000000..a69bc8f
--- /dev/null
@@ -0,0 +1,95 @@
+#! /bin/sh
+# Copyright (C) 2012-2017 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/>.
+
+# Try to find the pkg-config '.m4' files and make them easily accessed
+# to the test cases requiring them.
+
+. test-init.sh
+
+echo "# Automatically generated by $me." > get.sh
+echo : >> get.sh
+
+if ver=$(pkg-config --version) && test -n "$ver"; then
+   echo "printf 'pkg-config version: %s\\n' '$ver'" >> get.sh
+else
+   echo "skip_all_ \"'pkg-config' not available\"" >> get.sh
+fi
+
+cat > configure.ac <<'END'
+AC_INIT([pkg], [1.0])
+PKG_CHECK_MODULES([GOBJECT], [gobject-2.0 >= 2.4])
+END
+
+have_pkg_config_macros ()
+{
+  $AUTOCONF && ! $FGREP PKG_CHECK_MODULES configure
+}
+
+if have_pkg_config_macros; then
+  # The pkg-config macros are already available, nothing to do.
+  exit 0
+fi
+
+# Usual locations where pkg.m4 *might* be installed.
+XT_ACLOCAL_PATH=/usr/local/share/aclocal:/usr/share/aclocal
+
+# Find the location of the pkg-config executable.
+oIFS=$IFS dir=
+IFS=:
+for d in $PATH; do
+  IFS=$oIFS
+  if test -f $d/pkg-config || test -f $d/pkg-config.exe; then
+    dir=$d
+    break
+  fi
+done
+IFS=$oIFS
+
+# Now try to use the location of the pkg-config executable to guess
+# where the corresponding pkg.m4 might be installed.
+if test -n "$dir"; then
+  # Only support standard installation layouts.
+  XT_ACLOCAL_PATH=${dir%/bin}/share/aclocal:$XT_ACLOCAL_PATH
+fi
+
+XT_ACLOCAL_PATH=$XT_ACLOCAL_PATH${ACLOCAL_PATH+":$ACLOCAL_PATH"}
+
+# Try once again to fetch the pkg-config macros.
+mkdir m4
+ACLOCAL_PATH=$XT_ACLOCAL_PATH $ACLOCAL -Wno-syntax --install -I m4
+if test -f m4/pkg.m4 && have_pkg_config_macros; then
+   echo "ACLOCAL_PATH='$(pwd)/m4':\$ACLOCAL_PATH" >> get.sh
+   echo "export ACLOCAL_PATH" >> get.sh
+   echo "sed 20q '$(pwd)/m4/pkg.m4' # For debugging." >> get.sh
+else
+   echo "skip_all_ \"pkg-config m4 macros not found\"" >> get.sh
+fi
+
+unset ACLOCAL_PATH
+. ./get.sh
+
+$ACLOCAL --force -I m4 || cat >> get.sh <<'END'
+# We need to use '-Wno-syntax', since we do not want our test suite
+# to fail merely because some third-party '.m4' file is underquoted.
+ACLOCAL="$ACLOCAL -Wno-syntax"
+END
+
+# The pkg-config m4 file(s) we might fetched will be copied in the
+# 'm4' subdirectory of the test directory are going to be needed by
+# other tests, so we must not remove the test directory.
+keep_testdirs=yes
+
+:
old mode 100755 (executable)
new mode 100644 (file)
index 7a8df81..109537e
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 1998-2012 Free Software Foundation, Inc.
+# Copyright (C) 1998-2017 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
@@ -16,7 +16,7 @@
 
 # Test '+=' functionality.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat > Makefile.am << 'END'
 data_DATA = zar
old mode 100755 (executable)
new mode 100644 (file)
index e9ce944..2370982
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2002-2012 Free Software Foundation, Inc.
+# Copyright (C) 2002-2017 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
@@ -17,7 +17,7 @@
 # Test for += and backslashes.
 # Reported by Ralf Corsepius.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat >>configure.ac << 'END'
 AM_CONDITIONAL([A], [true])
@@ -38,9 +38,8 @@ foo += b0.h \
   b1.h
 endif
 
-.PHONY: print
-print:
-       @echo BEG: $(foo) :END
+test:
+       is $(foo) == 0.h a0.h a1.h a2.h a3.h
 END
 
 $ACLOCAL
@@ -48,8 +47,6 @@ $AUTOCONF
 $AUTOMAKE
 
 ./configure
-$MAKE print >stdout || { cat stdout; Exit 1; }
-cat stdout
-$FGREP 'BEG: 0.h a0.h a1.h a2.h a3.h :END' stdout
+$MAKE test
 
 :
old mode 100755 (executable)
new mode 100644 (file)
index 4c0b888..2717c28
@@ -1,5 +1,5 @@
 #!/bin/sh
-# Copyright (C) 2010-2012 Free Software Foundation, Inc.
+# Copyright (C) 2010-2017 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
@@ -16,9 +16,9 @@
 
 # Check for bug in variable concatenation with '+=': an extra backslash
 # is erroneously retained in the final value.
-# See also sister test pluseq11b.test.
+# See also sister test 'pluseq11b.sh'.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat >>configure.ac <<'END'
 AC_OUTPUT
@@ -43,7 +43,7 @@ END
 $ACLOCAL
 $AUTOMAKE
 
-grep '^ *FOO *=.*\\.' Makefile.in && Exit 1
+grep '^ *FOO *=.*\\.' Makefile.in && exit 1
 
 $AUTOCONF
 ./configure
old mode 100755 (executable)
new mode 100644 (file)
index 102076a..b6cc80e
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 1998-2012 Free Software Foundation, Inc.
+# Copyright (C) 1998-2017 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
@@ -16,7 +16,7 @@
 
 # Test '+=' with conditionals.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AM_CONDITIONAL([CHECK], [true])
old mode 100755 (executable)
new mode 100644 (file)
index fc7a496..9e648b7
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 1998-2012 Free Software Foundation, Inc.
+# Copyright (C) 1998-2017 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
@@ -16,7 +16,7 @@
 
 # Another '+=' test with conditionals.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AM_CONDITIONAL([CHECK], [true])
old mode 100755 (executable)
new mode 100644 (file)
index 59c82d8..385e663
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 1998-2012 Free Software Foundation, Inc.
+# Copyright (C) 1998-2017 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
@@ -16,7 +16,7 @@
 
 # Yet another '+=' test.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_CC
old mode 100755 (executable)
new mode 100644 (file)
index 5db9c47..772adc5
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 1999-2012 Free Software Foundation, Inc.
+# Copyright (C) 1999-2017 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
@@ -16,7 +16,7 @@
 
 # Test for another '+=' problem.  Report from Brian Jones.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AM_CONDITIONAL([CHECK], [true])
@@ -43,7 +43,7 @@ AUTOMAKE_fails
 # Is !CHECK mentioned?
 grep ':.*!CHECK$' stderr
 # Is there only one missing condition?
-test `grep ':  ' stderr | wc -l` = 1
+test $(grep -c ':  ' stderr) -eq 1
 
 # By the way, Automake should suggest using AM_CPPFLAGS,
 # because INCLUDES is an obsolete name.
@@ -53,7 +53,7 @@ grep AM_CPPFLAGS stderr
 # -Wno-obsolete:
 echo 'AUTOMAKE_OPTIONS = -Wno-obsolete' >> Makefile.am
 AUTOMAKE_fails
-grep AM_CPPFLAGS stderr && Exit 1
+grep AM_CPPFLAGS stderr && exit 1
 # !CHECK should still be mentioned.
 grep ':.*!CHECK$' stderr
 
old mode 100755 (executable)
new mode 100644 (file)
index 7a8f187..0a473a8
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 1999-2012 Free Software Foundation, Inc.
+# Copyright (C) 1999-2017 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
@@ -16,7 +16,7 @@
 
 # Test that '+=' works with standard header-vars.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_SUBST([ZZZ])
@@ -30,9 +30,9 @@ END
 
 $ACLOCAL
 $AUTOMAKE
-$FGREP '@mandir@ foo' Makefile.in
 
-num=`grep '^mandir =' Makefile.in | wc -l`
-test $num -eq 1
+$FGREP 'mandir' Makefile.in # For debugging.
+$FGREP '@mandir@ foo' Makefile.in
+test $(grep -c '^mandir =' Makefile.in) -eq 1
 
 :
old mode 100755 (executable)
new mode 100644 (file)
index 7f5a32e..fb0f904
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 1999-2012 Free Software Foundation, Inc.
+# Copyright (C) 1999-2017 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
@@ -16,7 +16,7 @@
 
 # Test that '+=' fails when required.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_CC
@@ -32,7 +32,6 @@ END
 
 $ACLOCAL
 AUTOMAKE_fails -Wno-portability
-q="[\`'\"]"
-grep "^Makefile\.am:3:.* AR .* with $q=$q before .*$q+=$q" stderr
+grep "^Makefile\.am:3:.* AR .* with '=' before .*'+='" stderr
 
 :
old mode 100755 (executable)
new mode 100644 (file)
index 724e4d5..8fd868c
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 1999-2012 Free Software Foundation, Inc.
+# Copyright (C) 1999-2017 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
@@ -16,7 +16,7 @@
 
 # Another '+=' test.  From Paul Berrevoets.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat > Makefile.am << 'END'
 VAR = \
old mode 100755 (executable)
new mode 100644 (file)
index f3c8021..d970e39
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2002-2012 Free Software Foundation, Inc.
+# Copyright (C) 2002-2017 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
@@ -16,7 +16,7 @@
 
 # Test the += diagnostics.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat >>configure.ac << 'END'
 AM_CONDITIONAL([COND1], [true])
@@ -66,6 +66,6 @@ AUTOMAKE_fails
 grep '[cC]annot apply.*+=' stderr
 grep ':   !COND1 and !COND3$' stderr
 # Make sure there is exactly one missing condition.
-test `grep ':  ' stderr | wc -l` = 1
+test $(grep -c ':  ' stderr) -eq 1
 
 :
index 2bed028..5ec2d23 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright (C) 2011-2012 Free Software Foundation, Inc.
+# Copyright (C) 2011-2017 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 518eea8..477a02c 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright (C) 2011-2012 Free Software Foundation, Inc.
+# Copyright (C) 2011-2017 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 d29407a..bc78edd 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright (C) 2001-2012 Free Software Foundation, Inc.
+# Copyright (C) 2001-2017 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 5041a84..4d85be4 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright (C) 2001-2012 Free Software Foundation, Inc.
+# Copyright (C) 2001-2017 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 2d28749..80fa637 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright (C) 2011-2012 Free Software Foundation, Inc.
+# Copyright (C) 2011-2017 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 ede5ab7..09ae1f5 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright (C) 2011-2012 Free Software Foundation, Inc.
+# Copyright (C) 2011-2017 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 b49ae2e..7d666bc 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright (C) 2001-2012 Free Software Foundation, Inc.
+# Copyright (C) 2001-2017 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 e7c9775..5abe2c0 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright (C) 2001-2012 Free Software Foundation, Inc.
+# Copyright (C) 2001-2017 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 293badc..26611bb 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright (C) 2002-2012 Free Software Foundation, Inc.
+# Copyright (C) 2002-2017 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 b452e47..c9e4d78 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright (C) 2011-2012 Free Software Foundation, Inc.
+# Copyright (C) 2011-2017 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 2f7d413..1f156e1 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright (C) 2011-2012 Free Software Foundation, Inc.
+# Copyright (C) 2011-2017 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 a929a6a..80c36f1 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright (C) 2003-2012 Free Software Foundation, Inc.
+# Copyright (C) 2003-2017 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
old mode 100755 (executable)
new mode 100644 (file)
index c2c2d7e..2b23511
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2010-2012 Free Software Foundation, Inc.
+# Copyright (C) 2010-2017 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
@@ -17,7 +17,7 @@
 # Test that POSIX variable expansion '$(var:str=rpl)' works
 # in when used with the DATA primary.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_OUTPUT
@@ -62,7 +62,7 @@ $ACLOCAL
 $AUTOCONF
 $AUTOMAKE
 
-cwd=`pwd` || Exit 1
+cwd=$(pwd) || fatal_ "getting current working directory"
 ./configure --prefix="$cwd/_inst"
 $MAKE install
 test -f bar.data
old mode 100755 (executable)
new mode 100644 (file)
index 7e3cf2f..51253d2
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2010-2012 Free Software Foundation, Inc.
+# Copyright (C) 2010-2017 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
@@ -17,7 +17,7 @@
 # Test that POSIX variable expansion '$(var:str=rpl)' works when used
 # in EXTRA_DIST.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_OUTPUT
old mode 100755 (executable)
new mode 100644 (file)
index f1cc55b..b681ee2
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2010-2012 Free Software Foundation, Inc.
+# Copyright (C) 2010-2017 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
@@ -18,7 +18,7 @@
 # when used in LDADD.
 
 required=cc
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_CC
old mode 100755 (executable)
new mode 100644 (file)
index f437571..cd0dd9a
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2010-2012 Free Software Foundation, Inc.
+# Copyright (C) 2010-2017 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
 
 # Test that POSIX variable expansion '$(var:str=rpl)' works when used
 # with the LIBRARIES primary in a "simple" way.
-# Keep this in sync with sister test 'posixsubst-ltlibraries.test'.
+# Keep this in sync with sister test 'posixsubst-ltlibraries.sh'.
 
 required=cc
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_CC
@@ -54,7 +54,7 @@ $ACLOCAL
 $AUTOCONF
 $AUTOMAKE -a
 
-cwd=`pwd` || Exit 1
+cwd=$(pwd) || fatal_ "getting current working directory"
 ./configure --prefix="$cwd/_inst"
 $MAKE
 test -f libfoo2.c
old mode 100755 (executable)
new mode 100644 (file)
index b4b2a92..9d25882
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2010-2012 Free Software Foundation, Inc.
+# Copyright (C) 2010-2017 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
 
 # Test that POSIX variable expansion '$(var:str=rpl)' works when used
 # with the LTLIBRARIES primary in a "simple" way.
-# Keep this in sync with sister test 'posixsubst-libraries.test'.
+# Keep this in sync with sister test 'posixsubst-libraries.sh'.
 
 required='cc libtool libtoolize'
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_CC
@@ -55,7 +55,7 @@ $ACLOCAL
 $AUTOCONF
 $AUTOMAKE -a
 
-cwd=`pwd` || Exit 1
+cwd=$(pwd) || fatal_ "getting current working directory"
 ./configure --prefix="$cwd/_inst"
 $MAKE
 test -f libfoo2.c
old mode 100755 (executable)
new mode 100644 (file)
index a02cb92..b00bfc2
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2010-2012 Free Software Foundation, Inc.
+# Copyright (C) 2010-2017 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
@@ -18,7 +18,7 @@
 # with the PROGRAMS primary.
 
 required=cc
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_CC
@@ -53,7 +53,7 @@ $ACLOCAL
 $AUTOCONF
 $AUTOMAKE
 
-cwd=`pwd` || Exit 1
+cwd=$(pwd) || fatal_ "getting current working directory"
 ./configure --prefix="$cwd/_inst"
 $MAKE
 $MAKE install
old mode 100755 (executable)
new mode 100644 (file)
index cda515f..9289bc4
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2010-2012 Free Software Foundation, Inc.
+# Copyright (C) 2010-2017 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
@@ -17,7 +17,7 @@
 # Test that POSIX variable expansion '$(var:str=rpl)' works when used
 # with the SCRIPTS primary.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_OUTPUT
@@ -88,7 +88,7 @@ $ACLOCAL
 $AUTOCONF
 $AUTOMAKE
 
-cwd=`pwd` || Exit 1
+cwd=$(pwd) || fatal_ "getting current working directory"
 ./configure --prefix="$cwd/_inst"
 $MAKE
 $MAKE test1 test2
old mode 100755 (executable)
new mode 100644 (file)
index ccd61b9..db82025
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2010-2012 Free Software Foundation, Inc.
+# Copyright (C) 2010-2017 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
@@ -18,7 +18,7 @@
 # with the SOURCES primary.
 
 required=cc
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_CC
old mode 100755 (executable)
new mode 100644 (file)
index 312b8ee..632cd0c
@@ -1,14 +1,15 @@
 #! /bin/sh
 # This file has been automatically generated.  DO NOT EDIT BY HAND!
-. ./defs-static || exit '99';
+. test-lib.sh
+
 am_serial_tests=yes
 # 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/t/posixsubst-tests.sh"; then
     echo "$0: will source $dir/t/posixsubst-tests.sh"
-    . "$dir/t/posixsubst-tests.sh"; exit "$?"
+    . "$dir/t/posixsubst-tests.sh"; exit $?
   fi
 done
 echo "$0: cannot find wrapped test 't/posixsubst-tests.sh'" >&2
-exit '99'
+exit 99
old mode 100755 (executable)
new mode 100644 (file)
index a51176b..7d0f990
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2010-2012 Free Software Foundation, Inc.
+# Copyright (C) 2010-2017 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
@@ -18,7 +18,7 @@
 # with the TESTS special variable.
 
 # For gen-testsuite-part: ==> try-with-serial-tests <==
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_OUTPUT
@@ -54,13 +54,12 @@ $AUTOCONF
 $AUTOMAKE -a
 
 ./configure
-$MAKE check >out 2>&1 && { cat out; Exit 1; }
-cat out
+run_make -M -e FAIL check
 ls -l
-grep '^FAIL: foo1\.test *$' out
-grep '^PASS: foo2\.test *$' out
-grep '^FAIL: bary *$' out
-grep '^PASS: barz *$' out
+grep '^FAIL: foo1\.test *$' output
+grep '^PASS: foo2\.test *$' output
+grep '^FAIL: bary *$' output
+grep '^PASS: barz *$' output
 test -f foo1.out
 test -f bary.out
 
old mode 100755 (executable)
new mode 100644 (file)
index 7eaa4f8..2c42176
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2002-2012 Free Software Foundation, Inc.
+# Copyright (C) 2002-2017 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
@@ -18,7 +18,7 @@
 # and renamed.
 
 required=cc
-. ./defs || Exit 1
+. test-init.sh
 
 cat >configure.ac <<END
 AC_INIT([$me], [1.0])
@@ -43,6 +43,6 @@ cat myMakefile.old >> myMakefile.in
 
 ./configure
 
-test -f .deps/fred.Po || test -f _deps/fred.Po || Exit 1
+test -f .deps/fred.Po || test -f _deps/fred.Po || exit 1
 
 :
old mode 100755 (executable)
new mode 100644 (file)
index 70266d6..1c84d24
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 1999-2012 Free Software Foundation, Inc.
+# Copyright (C) 1999-2017 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
@@ -17,7 +17,7 @@
 # Test to make sure preprocessed F77 works.
 # Report from Jochen Kuepper.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_F77
old mode 100755 (executable)
new mode 100644 (file)
index 9aa7bc5..4525bb1
--- a/t/pr2.sh
+++ b/t/pr2.sh
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 1999-2012 Free Software Foundation, Inc.
+# Copyright (C) 1999-2017 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
@@ -27,7 +27,7 @@
 # to the distribution directory before it creates a templ
 # subdirectory in the distribution directory.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_OUTPUT([README.foo:templ/README.foo.in])
old mode 100755 (executable)
new mode 100644 (file)
index 97e28eb..6992696
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2001-2012 Free Software Foundation, Inc.
+# Copyright (C) 2001-2017 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
@@ -28,7 +28,7 @@
 # rename one of the 'foo.o' files.
 
 required=libtoolize
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_CC
old mode 100755 (executable)
new mode 100644 (file)
index 657221d..c9bf9cb
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2001-2012 Free Software Foundation, Inc.
+# Copyright (C) 2001-2017 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
@@ -22,7 +22,7 @@
 # to debug the problem.
 # Note that this should be also in the documentation.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat > Makefile.am << 'EOF'
 if NEVER_TRUE
@@ -51,7 +51,7 @@ $AUTOMAKE -a
 
 cd build
 # configure should fail since we've done something invalid.
-../configure 2>stderr && { cat stderr >&2; Exit 1; }
+../configure 2>stderr && { cat stderr >&2; exit 1; }
 cat stderr >&2
 grep 'conditional.*NEVER_TRUE' stderr
 
old mode 100755 (executable)
new mode 100644 (file)
index 51e3c17..94bce38
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2002-2012 Free Software Foundation, Inc.
+# Copyright (C) 2002-2017 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
@@ -24,7 +24,7 @@
 # should be '$(top_builddir)/bar/.deps'.
 
 required=cc
-. ./defs || Exit 1
+. test-init.sh
 
 mkdir foo
 
@@ -43,7 +43,6 @@ EOF
 
 cat >>configure.ac <<'EOF'
 AC_PROG_CC
-AM_PROG_CC_C_O
 AC_OUTPUT
 EOF
 
@@ -59,6 +58,6 @@ cd build
 $MAKE
 test -d foo/.deps
 $MAKE distclean
-test -d foo/.deps && Exit 1
+test -d foo/.deps && exit 1
 
 :
old mode 100755 (executable)
new mode 100644 (file)
index cacdb82..3d8beb6
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2002-2012 Free Software Foundation, Inc.
+# Copyright (C) 2002-2017 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
@@ -18,7 +18,7 @@
 # Make sure AC_CYGWIN requires config.{sub,guess}.
 # Reported by James Youngman.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac <<EOF
 AC_CYGWIN
old mode 100755 (executable)
new mode 100644 (file)
index 01ba644..aae4d07
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2001-2012 Free Software Foundation, Inc.
+# Copyright (C) 2001-2017 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
@@ -27,7 +27,7 @@
 # the colon in the CONFIG_FILES variable.
 
 required=cc
-. ./defs || Exit 1
+. test-init.sh
 
 cat > configure.ac << END
 AC_INIT([$me], [1.0])
old mode 100755 (executable)
new mode 100644 (file)
index ac56878..b48aa4f
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2001-2012 Free Software Foundation, Inc.
+# Copyright (C) 2001-2017 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
@@ -18,7 +18,7 @@
 # Dependency tracking -vs- nonstandard Makefile names
 
 required=cc
-. ./defs || Exit 1
+. test-init.sh
 
 cat > configure.ac << END
 AC_INIT([$me], [1.0])
old mode 100755 (executable)
new mode 100644 (file)
index 5618d76..e8902ff
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2001-2012 Free Software Foundation, Inc.
+# Copyright (C) 2001-2017 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
@@ -16,7 +16,7 @@
 
 # Another test related to PR 279.
 # Multiple DEPENDENCIES on conditionals.
-# Please keep this in sync with sister test pr279.test.
+# Please keep this in sync with sister test 'pr279.sh'.
 #
 # == Report ==
 # When defining xxx_LDADD and xxx_DEPENDENCIES variables where the
@@ -24,7 +24,7 @@
 # fail with messages like:
 #       foo_DEPENDENCIES was already defined in condition TRUE, ...
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_CC
old mode 100755 (executable)
new mode 100644 (file)
index 3383131..e076a2d
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2001-2012 Free Software Foundation, Inc.
+# Copyright (C) 2001-2017 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
@@ -16,7 +16,7 @@
 
 # Test for PR 279.
 # Multiple DEPENDENCIES on conditionals.
-# Please keep this in sync with sister test pr279-2.test.
+# Please keep this in sync with sister test 'pr279-2.sh'.
 #
 # == Report ==
 # When defining xxx_LDADD and xxx_DEPENDENCIES variables where the
@@ -24,7 +24,7 @@
 # fail with messages like:
 #       foo_DEPENDENCIES was already defined in condition TRUE, ...
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_CC
old mode 100755 (executable)
new mode 100644 (file)
index 681f6d6..4f416e0
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2002-2012 Free Software Foundation, Inc.
+# Copyright (C) 2002-2017 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
@@ -16,7 +16,7 @@
 
 # Test for PR 287: empty SUBDIRS.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_OUTPUT
@@ -31,7 +31,6 @@ cat > foo << 'END'
 #! /bin/sh
 echo Maude
 END
-
 chmod +x foo
 
 mkdir install
@@ -40,7 +39,7 @@ $ACLOCAL
 $AUTOCONF
 $AUTOMAKE -a
 
-./configure "--prefix=`cd install && pwd`"
+./configure "--prefix=$(cd install && pwd)"
 
 $MAKE
 $MAKE distdir
old mode 100755 (executable)
new mode 100644 (file)
index b655cf0..5255ccc
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2002-2012 Free Software Foundation, Inc.
+# Copyright (C) 2002-2017 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
@@ -18,7 +18,7 @@
 # PR/300
 
 required=cc
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_RANLIB
@@ -50,7 +50,7 @@ $AUTOMAKE --copy --add-missing
 # or distributions possibly overriding '${libdir}' in their $CONFIG_SITE
 # file (for example, defining it to '${prefix}/lib64' on 64-bit systems,
 # as is the case with openSUSE 12.1).  See automake bug#10426.
-cwd=`pwd` || Exit 99
+cwd=$(pwd) || fatal_ "getting current working directory"
 ./configure --prefix "$cwd/inst" --libdir "$cwd/inst/lib"
 
 $MAKE
@@ -65,8 +65,8 @@ test -f inst/lib/subdir/libb.a
 
 $MAKE uninstall
 
-test -f inst/lib/liba.a && Exit 1
-test -f inst/lib/subdir/libb.a && Exit 1
+test -f inst/lib/liba.a && exit 1
+test -f inst/lib/subdir/libb.a && exit 1
 
 $MAKE install-strip
 
old mode 100755 (executable)
new mode 100644 (file)
index 8db6b07..48ea3e0
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2002-2012 Free Software Foundation, Inc.
+# Copyright (C) 2002-2017 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
@@ -18,7 +18,7 @@
 # PR/300
 
 required='cc libtoolize'
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_CC
@@ -48,33 +48,31 @@ $AUTOMAKE --copy --add-missing
 # or distributions possibly overriding '${libdir}' in their $CONFIG_SITE
 # file (for example, defining it to '${prefix}/lib64' on 64-bit systems,
 # as is the case with openSUSE 12.1).  See automake bug#10426.
-cwd=`pwd` || Exit 99
+cwd=$(pwd) || fatal_ "getting current working directory"
 ./configure --prefix "$cwd/inst" --libdir "$cwd/inst/lib"
 
 # A rule in the Makefile should create subdir.
-test ! -d subdir
-$MAKE >stdout || { cat stdout; Exit 1; }
-cat stdout
+test ! -e subdir
+run_make -O
 test -d subdir
 
 grep 'liba.la .*-rpath .*lib' stdout
-grep 'liba.la .*-rpath .*lib/subdir' stdout && Exit 1
+grep 'liba.la .*-rpath .*lib/subdir' stdout && exit 1
 grep 'libb.la .*-rpath .*lib/subdir' stdout
 
 test -f subdir/liba.la
 test -f subdir/libb.la
 
-$MAKE install 2>stderr || { cat stderr >&2; Exit 1; }
-cat stderr >&2
-grep 'remember.*--finish' stderr && Exit 1
+run_make -E install
+grep 'remember.*--finish' stderr && exit 1
 
 test -f inst/lib/liba.la
 test -f inst/lib/subdir/libb.la
 
 $MAKE uninstall
 
-test -f inst/lib/liba.la && Exit 1
-test -f inst/lib/subdir/libb.la && Exit 1
+test -f inst/lib/liba.la && exit 1
+test -f inst/lib/subdir/libb.la && exit 1
 
 $MAKE install-strip
 
old mode 100755 (executable)
new mode 100644 (file)
index 6812231..d5cf2cb
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2002-2012 Free Software Foundation, Inc.
+# Copyright (C) 2002-2017 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
@@ -18,7 +18,7 @@
 # PR/300
 
 required=cc
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_CC
@@ -62,7 +62,7 @@ $ACLOCAL
 $AUTOCONF
 $AUTOMAKE --copy --add-missing
 
-./configure --prefix "`pwd`/inst"
+./configure --prefix "$(pwd)/inst"
 
 $MAKE test-all
 $MAKE test-install
old mode 100755 (executable)
new mode 100644 (file)
index abcff80..87f4e05
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2002-2012 Free Software Foundation, Inc.
+# Copyright (C) 2002-2017 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
@@ -33,7 +33,7 @@
 #  compilation.
 
 required='libtoolize gcc'
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_CC
@@ -76,7 +76,7 @@ grep am_cv_CC_dependencies_compiler_type configure
 ./configure am_cv_CC_dependencies_compiler_type=dashmstdout
 
 $MAKE
-test -f librace.la && Exit 1
+test -f librace.la && exit 1
 $MAKE check
 
 # The failure we check usually occurs during the above build,
old mode 100755 (executable)
new mode 100644 (file)
index 849ee5f..4150c2b
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2005-2012 Free Software Foundation, Inc.
+# Copyright (C) 2005-2017 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 # Check support for AC_CONFIG_LIBOBJ_DIR vs LIBOBJS.
-# (pr401b.test and pr401c.test do the same for LTLIBOBJS and ALLOCA)
+# (pr401b.sh and pr401c.sh do the same for LTLIBOBJS and ALLOCA)
 
 required=cc
-. ./defs || Exit 1
+. test-init.sh
 
 mkdir lib src
 
@@ -45,7 +45,6 @@ cat >>configure.ac << 'EOF'
 ## These lines are activated for later tests
 #: AC_CONFIG_LIBOBJ_DIR([lib])
 AC_PROG_CC
-#x AM_PROG_CC_C_O
 AC_LIBOBJ([feep])
 AC_LIBSOURCE([feep.c])
 AM_PROG_AR
@@ -93,14 +92,14 @@ $MAKE distcheck
 # Invocation of AC_CONFIG_LIBOBJ_DIR may be necessary for reasons
 # unrelated to Automake or Makefile.am layout.
 
-sed 's/#: //' configure.ac >configure.int
-mv -f configure.int configure.ac
+sed 's/#: //' configure.ac >configure.tmp
+mv -f configure.tmp configure.ac
 
 $ACLOCAL
 $AUTOCONF
 $AUTOMAKE
 ./configure
-test ! -d lib/lib
+test ! -e lib/lib
 $MAKE distcheck
 
 ## -------------------------------------------- ##
@@ -118,8 +117,8 @@ mv -f src/t src/Makefile.am
 ## Test using LIBOBJS from a sibling directory. ##
 ## -------------------------------------------- ##
 
-sed 's/#x //; s/lib\/Makefile //' configure.ac >configure.int
-mv -f configure.int configure.ac
+sed 's/lib\/Makefile //' configure.ac >configure.tmp
+mv -f configure.tmp configure.ac
 
 cat >Makefile.am <<'EOF'
 SUBDIRS = src
@@ -144,8 +143,8 @@ $ACLOCAL
 $AUTOCONF
 $AUTOMAKE --add-missing
 ./configure
-test ! -d src/lib
-test ! -d 'src/$(top_builddir)'
+test ! -e src/lib
+test ! -e 'src/$(top_builddir)'
 $MAKE
 $MAKE check
 $MAKE distclean
@@ -155,8 +154,8 @@ $MAKE distclean
 ## Test using LIBOBJS from parent directory. ##
 ## ----------------------------------------- ##
 
-sed 's/^.*src\/Makefile.*$//' configure.ac >configure.int
-mv -f configure.int configure.ac
+sed 's/^.*src\/Makefile.*$//' configure.ac >configure.tmp
+mv -f configure.tmp configure.ac
 
 cat >Makefile.am <<'EOF'
 AUTOMAKE_OPTIONS = subdir-objects
old mode 100755 (executable)
new mode 100644 (file)
index 382d118..ebec73e
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2005-2012 Free Software Foundation, Inc.
+# Copyright (C) 2005-2017 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 # Check support for AC_CONFIG_LIBOBJ_DIR vs LTLIBOBJS.
-# (pr401.test and pr401c.test do the same for LIBOBJS and ALLOCA)
+# (pr401.sh and pr401c.sh do the same for LIBOBJS and ALLOCA)
 
 required='cc libtoolize'
-. ./defs || Exit 1
+. test-init.sh
 
 mkdir lib src
 
@@ -45,7 +45,6 @@ cat >>configure.ac << 'EOF'
 ## These lines are activated for later tests
 #: AC_CONFIG_LIBOBJ_DIR([lib])
 AC_PROG_CC
-#x AM_PROG_CC_C_O
 AC_LIBOBJ([feep])
 AC_LIBSOURCE([feep.c])
 AM_PROG_AR
@@ -94,14 +93,14 @@ $MAKE distcheck
 # Invocation of AC_CONFIG_LIBOBJ_DIR may be necessary for reasons
 # unrelated to Automake or Makefile.am layout.
 
-sed 's/#: //' configure.ac >configure.int
-mv -f configure.int configure.ac
+sed 's/#: //' configure.ac >configure.tmp
+mv -f configure.tmp configure.ac
 
 $ACLOCAL
 $AUTOCONF
 $AUTOMAKE -a
 ./configure
-test ! -d lib/lib
+test ! -e lib/lib
 $MAKE distcheck
 
 ## -------------------------------------------- ##
@@ -118,8 +117,8 @@ mv -f src/t src/Makefile.am
 ## Test using LTLIBOBJS from a sibling directory. ##
 ## ---------------------------------------------- ##
 
-sed 's/#x //; s/lib\/Makefile //' configure.ac >configure.int
-mv -f configure.int configure.ac
+sed 's/lib\/Makefile //' configure.ac >configure.tmp
+mv -f configure.tmp configure.ac
 
 cat >Makefile.am <<'EOF'
 SUBDIRS = src
@@ -144,8 +143,8 @@ $ACLOCAL
 $AUTOCONF
 $AUTOMAKE --add-missing
 ./configure
-test ! -d src/lib
-test ! -d 'src/$(top_builddir)'
+test ! -e src/lib
+test ! -e 'src/$(top_builddir)'
 $MAKE
 $MAKE check
 $MAKE distclean
@@ -155,8 +154,8 @@ $MAKE distclean
 ## Test using LTLIBOBJS from parent directory. ##
 ## ------------------------------------------- ##
 
-sed 's/^.*src\/Makefile.*$//' configure.ac >configure.int
-mv -f configure.int configure.ac
+sed 's/^.*src\/Makefile.*$//' configure.ac >configure.tmp
+mv -f configure.tmp configure.ac
 
 cat >Makefile.am <<'EOF'
 AUTOMAKE_OPTIONS = subdir-objects
old mode 100755 (executable)
new mode 100644 (file)
index 12afade..a558d6d
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2005-2012 Free Software Foundation, Inc.
+# Copyright (C) 2005-2017 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 # Check support for AC_CONFIG_LIBOBJ_DIR vs ALLOCA.
-# (pr401.test and pr401b.test do the same for LIBOBJS and LTLIBOBJS)
+# (pr401.sh and pr401b.sh do the same for LIBOBJS and LTLIBOBJS)
 
 required=cc
-. ./defs || Exit 1
+. test-init.sh
 
 mkdir lib src
 
@@ -47,7 +47,6 @@ cat >>configure.ac << 'EOF'
 ## These lines are activated for later tests.
 #: AC_CONFIG_LIBOBJ_DIR([lib])
 AC_PROG_CC
-#x AM_PROG_CC_C_O
 AM_PROG_AR
 AC_PROG_RANLIB
 AC_FUNC_ALLOCA
@@ -95,14 +94,14 @@ $MAKE distcheck
 # Invocation of AC_CONFIG_LIBOBJ_DIR may be necessary for reasons
 # unrelated to Automake or Makefile.am layout.
 
-sed 's/#: //' configure.ac >configure.int
-mv -f configure.int configure.ac
+sed 's/#: //' configure.ac >configure.tmp
+mv -f configure.tmp configure.ac
 
 $ACLOCAL
 $AUTOCONF
 $AUTOMAKE
 ./configure
-test ! -d lib/lib
+test ! -e lib/lib
 $MAKE distcheck
 
 ## -------------------------------------------- ##
@@ -120,8 +119,8 @@ mv -f src/t src/Makefile.am
 ## Test using ALLOCA from a sibling directory. ##
 ## ------------------------------------------- ##
 
-sed 's/#x //; s/lib\/Makefile //' configure.ac >configure.int
-mv -f configure.int configure.ac
+sed 's/lib\/Makefile //' configure.ac >configure.tmp
+mv -f configure.tmp configure.ac
 
 cat >Makefile.am <<'EOF'
 SUBDIRS = src
@@ -147,8 +146,8 @@ $AUTOCONF
 $AUTOMAKE --add-missing
 ./configure
 $MAKE
-test ! -d src/lib
-test ! -d 'src/$(top_builddir)'
+test ! -e src/lib
+test ! -e 'src/$(top_builddir)'
 $MAKE check
 $MAKE distclean
 
@@ -157,8 +156,8 @@ $MAKE distclean
 ## Test using ALLOCA from parent directory. ##
 ## ---------------------------------------- ##
 
-sed 's/^.*src\/Makefile.*$//' configure.ac >configure.int
-mv -f configure.int configure.ac
+sed 's/^.*src\/Makefile.*$//' configure.ac >configure.tmp
+mv -f configure.tmp configure.ac
 
 cat >Makefile.am <<'EOF'
 AUTOMAKE_OPTIONS = subdir-objects
old mode 100755 (executable)
new mode 100644 (file)
index b16e879..f7b77d8
--- a/t/pr72.sh
+++ b/t/pr72.sh
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2000-2012 Free Software Foundation, Inc.
+# Copyright (C) 2000-2017 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
@@ -18,7 +18,7 @@
 # Empty _SOURCES results in $(LINK) undefined.
 
 required=libtool
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_CC
old mode 100755 (executable)
new mode 100644 (file)
index 121328d..26ea30b
--- a/t/pr87.sh
+++ b/t/pr87.sh
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2000-2012 Free Software Foundation, Inc.
+# Copyright (C) 2000-2017 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
@@ -18,7 +18,7 @@
 # "make distcheck" fails when two source dirs exist.
 
 required=cc
-. ./defs || Exit 1
+. test-init.sh
 
 subdirs="foo bar"
 
@@ -45,7 +45,7 @@ AC_CONFIG_AUX_DIR([.])
 AM_INIT_AUTOMAKE
 AC_PROG_CC
 AC_CONFIG_FILES([Makefile])
-AC_CONFIG_FILES([`echo $subdirs | sed 's|\([a-z][a-z]*\)|\1/Makefile|g'`])
+AC_CONFIG_FILES([$(echo $subdirs | sed 's|\([a-z][a-z]*\)|\1/Makefile|g')])
 AC_OUTPUT
 EOF
 
@@ -60,13 +60,13 @@ $AUTOMAKE -a
     if test "$line" = ".c.o:"; then
        read next
        if test -z "$next"; then
-         Exit 1
+         exit 1
        else
           : # For shells with broken 'set -e'.
        fi
        break
     fi
- done) < foo/Makefile.in || Exit 1
+ done) < foo/Makefile.in || exit 1
 
 cd build
 ../configure
old mode 100755 (executable)
new mode 100644 (file)
index 36a9f7e..67eacac
--- a/t/pr9.sh
+++ b/t/pr9.sh
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 1999-2012 Free Software Foundation, Inc.
+# Copyright (C) 1999-2017 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
@@ -23,7 +23,7 @@
 # ltconfig, ltmain.sh, mdate-sh, missing, and mkinstalldirs.  In fact,
 # the entire 'support/' directory is omitted.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat > configure.ac << END
 AC_INIT([$me], [1.0])
old mode 100755 (executable)
new mode 100644 (file)
similarity index 65%
rename from t/autohdr2.sh
rename to t/precious.sh
index 6f5415e..b819249
@@ -1,5 +1,5 @@
 #!/bin/sh
-# Copyright (C) 2002-2012 Free Software Foundation, Inc.
+# Copyright (C) 2013-2017 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/>.
 
-# Check that autoheaders works, despite our AC_CONFIG_HEADERS hack.
+# Make sure .PRECIOUS can be extended by the user, and can be given
+# dependencies several times.
 
-. ./defs || Exit 1
+. test-init.sh
 
-cat >>configure.ac <<EOF
-AM_CONFIG_HEADER([thisfile.h])
+cat >Makefile.am << 'EOF'
+.PRECIOUS: foo
+.PRECIOUS: bar
 EOF
 
-: > Makefile.am
-
 $ACLOCAL
-$AUTOHEADER
+$AUTOMAKE
+$FGREP '.PRECIOUS:' Makefile.in  # For debugging.
+test $($FGREP -c '.PRECIOUS:' Makefile.in) -eq 3
 
-test -f thisfile.h.in
+:
old mode 100755 (executable)
new mode 100644 (file)
index 26c088a..f08c545
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 1996-2012 Free Software Foundation, Inc.
+# Copyright (C) 1996-2017 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
@@ -16,7 +16,7 @@
 
 # Test to make sure range of prefixes can be extended
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_CC
diff --git a/t/preproc-basics.sh b/t/preproc-basics.sh
new file mode 100644 (file)
index 0000000..300199e
--- /dev/null
@@ -0,0 +1,106 @@
+#! /bin/sh
+# Copyright (C) 2013-2017 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/>.
+
+# Basic tests for '%...%' preprocessing in included Makefile fragments:
+#   %reldir%        a.k.a.  %D%
+#   %canon_reldir%  a.k.a.  %C%
+
+. test-init.sh
+
+cat >> configure.ac << 'END'
+AC_CONFIG_FILES([zot/Makefile])
+AC_OUTPUT
+END
+
+mkdir foo foo/bar foo/foobar zot
+
+cat > Makefile.am << 'END'
+include $(top_srcdir)/foo/local.mk
+include $(srcdir)/foo/foobar/local.mk
+include local.mk
+END
+
+cat > zot/Makefile.am << 'END'
+include $(top_srcdir)/zot/local.mk
+
+## Check that '%canon_reldir%' doesn't remain overridden
+## by the previous include.
+%canon_reldir%_zot_whoami:
+       echo "I am %reldir%/Makefile.am" >$@
+
+include $(top_srcdir)/top.mk
+include ../reltop.mk
+END
+
+cat > local.mk << 'END'
+%canon_reldir%_whoami:
+       echo "I am %reldir%/local.mk" >$@
+END
+
+cat > top.mk << 'END'
+%canon_reldir%_top_whoami:
+       echo "I am %reldir%/top.mk" >$@
+END
+
+cat > reltop.mk << 'END'
+%C%_reltop_whoami:
+       echo "I am %D%/reltop.mk" >$@
+END
+
+cp local.mk foo
+cp local.mk foo/bar
+cp local.mk foo/foobar
+cp local.mk zot
+
+cat >> foo/local.mk << 'END'
+include %reldir%/bar/local.mk
+## Check that '%canon_reldir%' doesn't remain overridden by the
+## previous include.  The duplicated checks are done to ensure that
+## Automake substitutes all pre-processing occurrences on a line,
+## not just the first one.
+test-%reldir%:
+       test '%reldir%'       = foo  &&  test '%reldir%' = foo
+       test '%D%'            = foo  &&  test '%D%'      = foo
+       test '%canon_reldir%' = foo  &&  test '%C%'      = foo
+END
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE
+./configure
+
+check ()
+{
+  test $# -eq 2 || fatal_ "made_into(): bad usage"
+  target=$1 contents=$2
+  rm -f "$target" \
+   && $MAKE "$target" \
+   && test x"$(cat "$target")" = x"$contents"
+}
+
+check whoami "I am local.mk"
+check foo_whoami "I am foo/local.mk"
+check foo_bar_whoami "I am foo/bar/local.mk"
+check foo_foobar_whoami "I am foo/foobar/local.mk"
+$MAKE test-foo
+
+cd zot
+check whoami "I am local.mk"
+check ___top_whoami "I am ../top.mk"
+check ___reltop_whoami "I am ../reltop.mk"
+check zot_whoami "I am Makefile.am"
+
+:
diff --git a/t/preproc-c-compile.sh b/t/preproc-c-compile.sh
new file mode 100644 (file)
index 0000000..9df585d
--- /dev/null
@@ -0,0 +1,118 @@
+#! /bin/sh
+# Copyright (C) 2013-2017 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 pre-processing substitutions '%reldir%' and '%canon_reldir%'
+# with C compilation and subdir objects.
+
+require=cc
+. test-init.sh
+
+cat >> configure.ac << 'END'
+AC_PROG_CC
+AM_PROG_CC_C_O
+AC_CONFIG_FILES([zot/Makefile])
+AC_OUTPUT
+END
+
+mkdir foo
+mkdir foo/bar
+mkdir foo/foobar
+mkdir zot
+
+cat > Makefile.am << 'END'
+AUTOMAKE_OPTIONS = subdir-objects
+SUBDIRS = zot
+bin_PROGRAMS =
+
+include $(top_srcdir)/foo/local.mk
+include $(srcdir)/foo/foobar/local.mk
+include local.mk
+
+check-local:
+       is $(bin_PROGRAMS) == \
+         foo/mumble2$(EXEEXT) \
+         foo/bar/mumble$(EXEEXT) \
+         foo/foobar/mumble$(EXEEXT) \
+         mumble$(EXEEXT)
+       test '$(mumble_SOURCES)' = one.c
+       test '$(foo_mumble2_SOURCES)' = foo/one.c
+       test '$(foo_bar_mumble_SOURCES)' = foo/bar/one.c
+       test '$(foo_foobar_mumble_SOURCES)' = foo/foobar/one.c
+       test -f mumble$(EXEEXT)
+       test -f foo/mumble2$(EXEEXT)
+       test -f foo/bar/mumble$(EXEEXT)
+       test -f foo/foobar/mumble$(EXEEXT)
+       test -f zot/mumble$(EXEEXT)
+       : Test some of the object files too.
+       test -f one.$(OBJEXT)
+       test -f foo/foobar/one.$(OBJEXT)
+       test -f zot/one.$(OBJEXT)
+END
+
+cat > zot/Makefile.am << 'END'
+AUTOMAKE_OPTIONS = subdir-objects
+bin_PROGRAMS =
+include $(top_srcdir)/zot/local.mk
+
+test:
+       test '$(bin_PROGRAMS)' = mumble$(EXEEXT)
+       test '$(mumble_SOURCES)' = one.c
+check-local: test
+END
+
+cat > local.mk << 'END'
+bin_PROGRAMS += %reldir%/mumble
+%canon_reldir%_mumble_SOURCES = %reldir%/one.c
+END
+
+echo 'int main (void) { return 0; }' > one.c
+
+sed 's/mumble/mumble2/' local.mk > foo/local.mk
+cp local.mk foo/bar
+cp local.mk foo/foobar
+cp local.mk zot
+echo "include %reldir%/bar/local.mk" >> foo/local.mk
+
+cp one.c foo
+cp one.c foo/bar
+cp one.c foo/foobar
+cp one.c zot
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE
+./configure
+
+$MAKE
+$MAKE check-local
+if ! cross_compiling; then
+  ./mumble
+  ./foo/mumble2
+  ./foo/bar/mumble
+  ./foo/foobar/mumble
+  ./zot/mumble
+fi
+
+(cd zot && $MAKE test)
+
+# GNU install refuses to override a just-installed file; since we
+# have plenty of 'mumble' dummy programs to install in the same
+# location, such "overridden installations" are not a problem for
+# us; so just force the use the 'install-sh' script.
+ac_cv_path_install=$(pwd)/install-sh; export ac_cv_path_install
+$MAKE distcheck
+
+:
diff --git a/t/preproc-demo.sh b/t/preproc-demo.sh
new file mode 100644 (file)
index 0000000..226a6d0
--- /dev/null
@@ -0,0 +1,230 @@
+#! /bin/sh
+# Copyright (C) 2013-2017 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/>.
+
+# Demo of a package using pre-processing substitutions '%reldir%' and
+# '%canon_reldir%', and their respective shorthands '%D%' and '%C%'.
+
+am_create_testdir=empty
+required=cc
+. test-init.sh
+
+if cross_compiling; then
+  WE_ARE_CROSS_COMPILING=yes
+else
+  WE_ARE_CROSS_COMPILING=no
+fi
+export WE_ARE_CROSS_COMPILING
+
+SAFE_PRINT_FAIL=; unset SAFE_PRINT_FAIL
+
+cat > configure.ac << 'END'
+AC_INIT([GNU Demo], [0.7], [bug-automake@gnu.org])
+AC_CONFIG_AUX_DIR([build-aux])
+AM_INIT_AUTOMAKE([1.12.6 foreign subdir-objects -Wall])
+AM_CONDITIONAL([NATIVE_BUILD], [test $WE_ARE_CROSS_COMPILING != yes])
+AC_CONFIG_FILES([Makefile])
+AC_PROG_CC
+AM_PROG_CC_C_O
+AM_PROG_AR
+AC_PROG_RANLIB
+AC_OUTPUT
+END
+
+mkdir build-aux lib lib/tests src tests
+
+## Top level.
+
+cat > Makefile.am << 'END'
+bin_PROGRAMS =
+check_PROGRAMS =
+noinst_LIBRARIES =
+AM_CPPFLAGS =
+AM_TESTS_ENVIRONMENT =
+CLEANFILES =
+EXTRA_DIST =
+LDADD =
+TESTS =
+
+include $(srcdir)/src/progs.am
+include $(srcdir)/lib/gnulib.am
+include $(srcdir)/tests/check.am
+END
+
+## Src subdir.
+
+cat > src/progs.am <<'END'
+bin_PROGRAMS += %reldir%/hello
+
+bin_PROGRAMS += %D%/goodbye
+%canon_reldir%_goodbye_SOURCES = %D%/hello.c
+%C%_goodbye_CPPFLAGS = $(AM_CPPFLAGS) -DGREETINGS='"Goodbye"'
+
+# The testsuite should have access to our built programs.
+AM_TESTS_ENVIRONMENT += \
+  PROGDIR='$(top_builddir)/%reldir%'; \
+  export PROGDIR; \
+  PATH='$(abs_builddir)/%reldir%'$(PATH_SEPARATOR)$$PATH; \
+  export PATH;
+END
+
+cat > src/hello.c <<'END'
+#include "safe-print.h"
+#include <stdlib.h>
+#include <stdio.h>
+
+#ifndef GREETINGS
+#  define GREETINGS "Hello"
+#endif
+
+int
+main (void)
+{
+  safe_print (stdout, GREETINGS ", World!\n");
+  exit (EXIT_SUCCESS);
+}
+END
+
+## Lib subdir.
+
+cat > lib/gnulib.am << 'END'
+noinst_LIBRARIES += %D%/libgnu.a
+
+AM_CPPFLAGS += -I%D% -I$(top_srcdir)/%D%
+LDADD += $(noinst_LIBRARIES)
+
+%C%_libgnu_a_SOURCES = \
+  %D%/safe-print.c \
+  %D%/safe-print.h
+
+if NATIVE_BUILD
+include %D%/tests/gnulib-check.am
+endif
+END
+
+cat > lib/safe-print.c <<'END'
+#include "safe-print.h"
+#include <string.h>
+#include <stdlib.h>
+
+void
+safe_print (FILE *fp, const char * str)
+{
+  if (fprintf (fp, "%s", str) != strlen (str)
+       || fflush (fp) != 0 || ferror (fp))
+    {
+      fprintf (stderr, "I/O error\n");
+      exit (EXIT_FAILURE);
+    }
+}
+
+END
+
+cat > lib/safe-print.h <<'END'
+#include <stdio.h>
+void safe_print (FILE *, const char *);
+END
+
+## Lib/Tests (sub)subdir.
+
+cat > lib/tests/gnulib-check.am <<'END'
+check_PROGRAMS += %D%/safe-print-test
+TESTS += $(check_PROGRAMS)
+END
+
+cat > lib/tests/safe-print-test.c <<'END'
+#include "safe-print.h"
+int
+main (void)
+{
+  safe_print (stdout, "dummy\n");
+  return 0;
+}
+END
+
+## Tests subdir.
+
+cat > tests/check.am <<'END'
+TEST_EXTENSIONS = .sh
+SH_LOG_COMPILER = $(SHELL)
+
+AM_TESTS_ENVIRONMENT += EXEEXT='$(EXEEXT)'; export EXEEXT;
+
+handwritten_TESTS = \
+  %D%/hello.sh \
+  %D%/built.sh
+TESTS += $(handwritten_TESTS)
+EXTRA_DIST += $(handwritten_TESTS)
+
+TESTS += %D%/goodbye.sh
+CLEANFILES += %D%/goodbye.sh
+%D%/goodbye.sh: %D%/hello.sh
+       $(MKDIR_P) %D%
+       rm -f $@ $@-t
+       sed -e 's/hello/goodbye/' \
+           -e 's/Hello/Goodbye/' \
+          < $(srcdir)/%D%/hello.sh >$@-t
+       chmod a-w,a+x $@-t && mv -f $@-t $@
+END
+
+cat > tests/hello.sh <<'END'
+#!/bin/sh
+set -x -e
+if test "$WE_ARE_CROSS_COMPILING" = yes; then
+  echo Skipping: cannot run in cross-compilation mode
+  exit 77
+else
+  hello || exit 1
+  test "`hello`" = 'Hello, World!' || exit 1
+fi
+END
+
+cat > tests/built.sh <<'END'
+#!/bin/sh
+set -x
+test -n "$PROGDIR" || exit 99
+test -f "$PROGDIR/hello$EXEEXT" || exit 1
+test -x "$PROGDIR/hello$EXEEXT" || exit 1
+test -f "$PROGDIR/goodbye$EXEEXT" || exit 1
+test -x "$PROGDIR/goodbye$EXEEXT" || exit 1
+END
+
+
+## Go.
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE --add-missing --copy
+test ! -e compile
+test -f build-aux/compile
+
+./configure
+
+$MAKE
+
+run_make -O check VERBOSE=x
+cat tests/built.log
+cat tests/hello.log
+cat tests/goodbye.log
+if cross_compiling; then
+  test ! -e lib/tests/safe-print-test.log
+  count_test_results total=3 pass=1 fail=0 xpass=0 xfail=0 skip=2 error=0
+else
+  count_test_results total=4 pass=4 fail=0 xpass=0 xfail=0 skip=0 error=0
+fi
+
+$MAKE distcheck
+
+:
diff --git a/t/preproc-errmsg.sh b/t/preproc-errmsg.sh
new file mode 100644 (file)
index 0000000..0a660b6
--- /dev/null
@@ -0,0 +1,78 @@
+#! /bin/sh
+# Copyright (C) 2013-2017 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/>.
+
+# Tests error messages when '%reldir%' and '%canon_reldir%' substitutions
+# (and their shorthands '%D%' and '%C%') are involved.
+
+. test-init.sh
+
+cat >> configure.ac <<'END'
+AC_PROG_CC
+AC_PROG_RANLIB
+AM_PROG_AR
+END
+
+: > ar-lib
+
+mkdir sub sub/sub2
+
+cat > Makefile.am <<'END'
+%canon_reldir%_x1_SOURCES = bar.c
+include sub/local.mk
+END
+
+cat > sub/local.mk <<'END'
+AUTOMAKE_OPTIONS = -Wno-extra-portability
+include %D%/sub2/more.mk
+noinst_LIBRARIES = %reldir%-one.a %D%-two.a
+%C%_x2_SOURCES = foo.c
+END
+
+cat > sub/sub2/more.mk <<'END'
+%C%_UNDEFINED +=
+END
+
+$ACLOCAL
+AUTOMAKE_fails
+
+cat > expected << 'END'
+sub/sub2/more.mk:1: sub_sub2_UNDEFINED must be set with '=' before using '+='
+Makefile.am:2: 'sub/local.mk' included from here
+sub/local.mk:2: 'sub/sub2/more.mk' included from here
+sub/local.mk:3: 'sub-one.a' is not a standard library name
+sub/local.mk:3: did you mean 'libsub-one.a'?
+Makefile.am:2: 'sub/local.mk' included from here
+sub/local.mk:3: 'sub-two.a' is not a standard library name
+sub/local.mk:3: did you mean 'libsub-two.a'?
+Makefile.am:2: 'sub/local.mk' included from here
+sub/local.mk:4: variable 'sub_x2_SOURCES' is defined but no program or
+sub/local.mk:4: library has 'sub_x2' as canonical name (possible typo)
+Makefile.am:2: 'sub/local.mk' included from here
+Makefile.am:1: variable 'x1_SOURCES' is defined but no program or
+Makefile.am:1: library has 'x1' as canonical name (possible typo)
+END
+
+# We need to break these substitutions into multiple sed invocations
+# to avoid spuriously triggering the 'sc_tests_logs_duplicate_prefixes'
+# maintainer check.
+sed -e '/warnings are treated as errors/d' stderr > t1
+sed -e 's/: warning:/:/' t1 > t2
+sed -e 's/: error:/:/' t2 > t3
+sed -e 's/  */ /g' t3 > obtained
+
+diff expected obtained
+
+:
old mode 100755 (executable)
new mode 100644 (file)
index 7b0021a..2e290ba
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2011-2012 Free Software Foundation, Inc.
+# Copyright (C) 2011-2017 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
@@ -18,7 +18,7 @@
 # examples in the Automake manual do not cause obvious errors.
 # Please keep this test in sync with the automake manual.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac <<'END'
 AC_PROG_CC
old mode 100755 (executable)
new mode 100644 (file)
index 064db2b..a7da65d
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2011-2012 Free Software Foundation, Inc.
+# Copyright (C) 2011-2017 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
@@ -24,7 +24,7 @@
 # should work.
 
 required=cc
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac <<'END'
 AC_PROG_CC
@@ -54,7 +54,12 @@ test:
        test -f '$(bindir)/libquux.a'
        ls -l '$(libexecdir)/bar.h'
        test -f '$(libexecdir)/bar.h'
-       test ! -x '$(libexecdir)/bar.h'
+## If this test is run as root, "test -x" could succeed also for
+## non-executable files, so we need to protect the next check.
+## See automake bug#12041.
+       if test -x Makefile; then echo SKIP THIS; else \
+         test ! -x '$(libexecdir)/bar.h'; \
+       fi;
 END
 
 cat > foo.c <<'END'
@@ -77,7 +82,7 @@ $ACLOCAL
 $AUTOMAKE -a
 $AUTOCONF
 
-cwd=`pwd` || fatal_ "cannot get current working directory"
+cwd=$(pwd) || fatal_ "getting current working directory"
 ./configure --prefix="$cwd/_inst"
 
 $MAKE install
old mode 100755 (executable)
new mode 100644 (file)
index 407c873..ff82342
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2011-2012 Free Software Foundation, Inc.
+# Copyright (C) 2011-2017 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
@@ -20,7 +20,7 @@
 # cover more cases.
 # See also test 'primary-prefix-valid-couples.test'.
 
-. ./defs || Exit 1
+. test-init.sh
 
 plan_ "later"
 
@@ -29,7 +29,6 @@ oIFS=$IFS # Saved for later.
 : > ar-lib
 : > ltmain.sh
 : > texinfo.tex
-: > elisp-comp
 : > py-compile
 : > config.guess
 : > config.sub
@@ -182,7 +181,7 @@ while read lineno prefix primary; do
 done <all.list
 
 # Check that automake really failed only for the expected reason(s).
-grep -v 'dir.* not a legitimate directory' stderr && Exit 1
+grep -v 'dir.* not a legitimate directory' stderr && exit 1
 
 # Check that the same failures are present without the '--add-missing'
 # option.
old mode 100755 (executable)
new mode 100644 (file)
index 989ca4b..d8c4512
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2011-2012 Free Software Foundation, Inc.
+# Copyright (C) 2011-2017 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
@@ -15,9 +15,9 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 # Test for valid prefix/primary combinations.
-# See also test 'primary-prefix-invalid-couples.test'.
+# See also test 'primary-prefix-invalid-couples.sh'.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac <<'END'
 AC_PROG_CC
@@ -38,10 +38,9 @@ AC_DEFUN([AC_PROG_LIBTOOL],
 END
 
 # Other required files.
-echo '@setfilename foo' > foo.texi
+echo '@setfilename foo.info' > foo.texi
 : > texinfo.tex
 : > py-compile
-: > elisp-comp
 : > ar-lib
 
 # Setup Makefile.am.
old mode 100755 (executable)
new mode 100644 (file)
index e1a8f44..166a6f1
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 1996-2012 Free Software Foundation, Inc.
+# Copyright (C) 1996-2017 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
@@ -16,7 +16,7 @@
 
 # Test to make sure errors in am_install_var work.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat > Makefile.am << 'END'
 bin_PROGRAMS = @programs@
old mode 100755 (executable)
new mode 100644 (file)
index f9417d8..f23a11b
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 1996-2012 Free Software Foundation, Inc.
+# Copyright (C) 1996-2017 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
@@ -16,7 +16,7 @@
 
 # Test to make sure errors in am_install_var work.
 
-. ./defs || Exit 1
+. test-init.sh
 
 echo AC_PROG_CC >> configure.ac
 
old mode 100755 (executable)
new mode 100644 (file)
index 80dab29..647fbf7
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2004-2012 Free Software Foundation, Inc.
+# Copyright (C) 2004-2017 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
@@ -17,7 +17,7 @@
 # Make sure we can build programs ending in '.la'
 
 required=cc
-. ./defs || Exit 1
+. test-init.sh
 
 cat >>configure.ac <<EOF
 AC_PROG_CC
old mode 100755 (executable)
new mode 100644 (file)
index f5764b3..e8aeb7f
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2011-2012 Free Software Foundation, Inc.
+# Copyright (C) 2011-2017 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
 # Test on automake options '--print-data-dir' and '--print-script-dir'.
 
 am_create_testdir=empty
-. ./defs || Exit 1
+. test-init.sh
 
-libdir=`$AUTOMAKE --print-libdir` || Exit 1
-case $libdir in /*);; *) Exit 1;; esac
+libdir=$($AUTOMAKE --print-libdir) || exit 1
+case $libdir in /*);; *) exit 1;; esac
 test -d "$libdir"
 test "$libdir" = "$am_pkgvdatadir"
 test "$libdir" = "$am_scriptdir"
old mode 100755 (executable)
new mode 100644 (file)
index 4008b47..e3b9db7
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 1996-2012 Free Software Foundation, Inc.
+# Copyright (C) 1996-2017 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
@@ -17,7 +17,7 @@
 # Test for bug where when multiple scripts are installed,
 # the check for AC_PROG_INSTALL fails.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat > Makefile.am << 'END'
 bin_SCRIPTS = zardoz qbert brownie
old mode 100755 (executable)
new mode 100644 (file)
index 7de6d99..208ef11
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2003-2012 Free Software Foundation, Inc.
+# Copyright (C) 2003-2017 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
@@ -18,7 +18,7 @@
 # checks have been introduced in commit 'Release-1-9-254-g9d0eaef' into
 # the former test 'subst2.test'.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_SUBST([FOO], [c])
old mode 100755 (executable)
new mode 100644 (file)
index 1504f55..3b08b5a
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2011-2012 Free Software Foundation, Inc.
+# Copyright (C) 2011-2017 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
@@ -17,7 +17,7 @@
 # Test the '--basedir' option of the 'py-compile' script,
 
 required=python
-. ./defs || Exit 1
+. test-init.sh
 
 # We'll need to create files in '..', so we need one more subdirectory
 # level in order not to clutter up the top-level tests directory.
@@ -28,23 +28,27 @@ cp "$am_scriptdir/py-compile" . \
   || fatal_ "failed to fetch auxiliary script py-compile"
 
 f=__init__
-for d in foo foo/bar "`pwd`/foo" . .. ../foo ''; do
+for d in foo foo/bar "$(pwd)/foo" . .. ../foo ''; do
   if test -z "$d"; then
     d2=.
   else
     d2=$d
   fi
-  ../install-sh -d "$d2" "$d2/sub" || Exit 99
+  ../install-sh -d "$d2" "$d2/sub" || exit 99
   : > "$d2/$f.py"
   : > "$d2/sub/$f.py"
   ./py-compile --basedir "$d" "$f.py" "sub/$f.py"
-  ls -l "$d2" "$d2/sub" # For debugging.
-  test -f "$d2/$f.pyc"
-  test -f "$d2/$f.pyo"
-  test -f "$d2/sub/$f.pyc"
-  test -f "$d2/sub/$f.pyo"
-  rm -f "$d2/$f.pyc" "$d2/$f.pyo" "$d2/sub/$f.pyc" "$d2/sub/$f.pyo"
-  find . | grep '\.py[co]$' && Exit 1
+  find "$d2" # For debugging.
+  py_installed "$d2/$f.pyc"
+  py_installed "$d2/$f.pyo"
+  py_installed "$d2/sub/$f.pyc"
+  py_installed "$d2/sub/$f.pyo"
+  files=$(find "$d2" | grep '\.py[co]$')
+  test $(echo "$files" | wc -l) -eq 4
+  case $d2 in
+    .|..) rm -f $files;;
+       *) rm -rf "$d2";;
+  esac
 done
 
 :
old mode 100755 (executable)
new mode 100644 (file)
index 5fa3bf6..600e08d
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2011-2012 Free Software Foundation, Inc.
+# Copyright (C) 2011-2017 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
 
 # Test more basic functionalities of the 'py-compile' script,
 # with "believable" python sources.  See also related test
-# 'py-compile-basic2.test'.
+# 'py-compile-basic2.sh'.
 
 required=python
-. ./defs || Exit 1
+. test-init.sh
 
 cp "$am_scriptdir/py-compile" . \
   || fatal_ "failed to fetch auxiliary script py-compile"
@@ -46,7 +46,8 @@ class Foo:
 bar = baz = (1, (2,), [3, 4]); zardoz = 0;
 END
 
-cat > bar.py <<'END'
+mkdir sub
+cat > sub/bar.py <<'END'
 # Import of non-existent modules, or assertion of false conditions,
 # shouldn't cause problems, as it should be enough for the code to
 # be syntactically correct.
@@ -54,10 +55,16 @@ import Automake.No.Such.Module
 assert False
 END
 
-./py-compile foo.py bar.py
-test -f foo.pyc
-test -f foo.pyo
-test -f bar.pyc
-test -f bar.pyo
+# An empty file in a more deeply-nested directory should be ok as well.
+mkdir -p 1/_/2/_/3/_
+: > 1/_/2/_/3/_/0.py
+
+./py-compile foo.py sub/bar.py 1/_/2/_/3/_/0.py
+py_installed foo.pyc
+py_installed foo.pyo
+py_installed sub/bar.pyc
+py_installed sub/bar.pyo
+py_installed 1/_/2/_/3/_/0.pyc
+py_installed 1/_/2/_/3/_/0.pyo
 
 :
diff --git a/t/py-compile-basic2.sh b/t/py-compile-basic2.sh
deleted file mode 100755 (executable)
index dfa992c..0000000
+++ /dev/null
@@ -1,70 +0,0 @@
-#! /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/>.
-
-# Test more basic functionalities of the 'py-compile' script, with
-# dummy python sources, but more complex directory layouts.  See also
-# related test 'py-compile-basic.test'.
-
-required=python
-. ./defs || Exit 1
-
-ocwd=`pwd` || Exit 99
-
-pyfiles="
-  foo.py
-  ./foo1.py
-  ../foo2.py
-  ../dir/foo3.py
-  $ocwd/foo4.py
-  sub/bar.py
-  sub/subsub/barbar.py
-  __init__.py
-  sub/__init__.py
-  1.py
-  .././_.py
-"
-
-lst='
-  dir/foo
-  dir/foo1
-  foo2
-  dir/foo3
-  foo4
-  dir/sub/bar
-  dir/sub/subsub/barbar
-  dir/__init__
-  dir/sub/__init__
-  dir/1
-  _
-'
-
-mkdir dir
-cd dir
-cp "$am_scriptdir/py-compile" . \
-  || fatal_ "failed to fetch auxiliary script py-compile"
-mkdir sub sub/subsub
-touch $pyfiles
-./py-compile $pyfiles
-cd "$ocwd"
-
-for x in $lst; do echo $x.pyc; echo $x.pyo; done | sort > exp
-find . -name '*.py[co]' | sed 's|^\./||' | sort > got
-
-cat exp
-cat got
-diff exp got
-
-:
old mode 100755 (executable)
new mode 100644 (file)
index ab3fe77..9b4c22e
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2011-2012 Free Software Foundation, Inc.
+# Copyright (C) 2011-2017 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
@@ -17,7 +17,7 @@
 # Test the '--destdir' option of the 'py-compile' script,
 
 required=python
-. ./defs || Exit 1
+. test-init.sh
 
 cp "$am_scriptdir/py-compile" . \
   || fatal_ "failed to fetch auxiliary script py-compile"
@@ -31,13 +31,17 @@ echo 'def foo (): return "foo"' > $destdir/foo.py
 echo 'def bar (): return "bar"' > $destdir/sub/bar.py
 
 ./py-compile --destdir $destdir foo.py sub/bar.py
-ls -l $destdir $destdir/sub # For debugging.
-ls . sub | grep '\.py[co]$' && Exit 1
-test -f $destdir/foo.pyc
-test -f $destdir/foo.pyo
-test -f $destdir/sub/bar.pyc
-test -f $destdir/sub/bar.pyo
-strings $destdir/*.py[co] $destdir/sub/*.py[co] || : # For debugging.
-$FGREP $destdir $destdir/*.py[co] $destdir/sub/*.py[co] && Exit 1
+
+find $destdir # For debugging.
+st=0
+for x in c o; do
+  for b in foo sub/bar; do
+    f=$(pyc_location -p "$destdir/$b.py$x")
+    test -f "$f"
+    strings "$f" || : # For debugging.
+    $FGREP $destdir $f && { echo BAD: $f; st=1; }
+  done
+done
+exit $st
 
 :
old mode 100755 (executable)
new mode 100644 (file)
index 5dd7e5f..da5e75f
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2011-2012 Free Software Foundation, Inc.
+# Copyright (C) 2011-2017 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
@@ -16,7 +16,7 @@
 
 # Make sure 'py-compile' honours the PYTHON environment variable.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cp "$am_scriptdir/py-compile" . \
   || fatal_ "failed to fetch auxiliary script py-compile"
@@ -31,14 +31,14 @@ mkdir sub1
 cd sub1
 
 PYTHON=: ../py-compile foo.py
-ls | grep . && Exit 1
+ls | grep . && exit 1
 
-PYTHON=false ../py-compile foo.py && Exit 1
-ls | grep . && Exit 1
+PYTHON=false ../py-compile foo.py && exit 1
+ls | grep . && exit 1
 
 PYTHON='echo GrEpMe AndMeToo' ../py-compile foo.py
 PYTHON='echo GrEpMe AndMeToo' ../py-compile foo.py | grep 'GrEpMe AndMeToo'
-ls | grep . && Exit 1
+ls | grep . && exit 1
 
 cd ..
 mkdir sub2
@@ -46,7 +46,7 @@ cd sub2
 
 PYTHON=../my-py ../py-compile foo.py
 test -f my-py.run
-ls | grep -v '^my-py\.run$' | grep . && Exit 1
+ls | grep -v '^my-py\.run$' | grep . && exit 1
 
 cd ..
 mkdir sub3
@@ -54,6 +54,6 @@ cd sub3
 PATH=..$PATH_SEPARATOR$PATH; export PATH
 PYTHON=my-py py-compile foo.py
 test -f my-py.run
-ls | grep -v '^my-py\.run$' | grep . && Exit 1
+ls | grep -v '^my-py\.run$' | grep . && exit 1
 
 :
old mode 100755 (executable)
new mode 100644 (file)
index f54ffc7..502564b
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2011-2012 Free Software Foundation, Inc.
+# Copyright (C) 2011-2017 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
@@ -18,7 +18,7 @@
 # explicitly terminate the option list for 'py-compile'.
 
 required=python
-. ./defs || Exit 1
+. test-init.sh
 
 cp "$am_scriptdir/py-compile" . \
   || fatal_ "failed to fetch auxiliary script py-compile"
@@ -26,18 +26,18 @@ cp "$am_scriptdir/py-compile" . \
 : > ./-o.py
 : > ./--foo.py
 ./py-compile -- -o.py --foo.py
-test -f ./-o.pyc
-test -f ./-o.pyo
-test -f ./--foo.pyc
-test -f ./--foo.pyo
+py_installed ./-o.pyc
+py_installed ./-o.pyo
+py_installed ./--foo.pyc
+py_installed ./--foo.pyo
 rm -f ./-*.py[co]
 : > x.py
 ./py-compile x.py -o.py --foo.py
-test -f ./x.pyc
-test -f ./x.pyo
-test -f ./-o.pyc
-test -f ./-o.pyo
-test -f ./--foo.pyc
-test -f ./--foo.pyo
+py_installed ./x.pyc
+py_installed ./x.pyo
+py_installed ./-o.pyc
+py_installed ./-o.pyo
+py_installed ./--foo.pyc
+py_installed ./--foo.pyo
 
 :
old mode 100755 (executable)
new mode 100644 (file)
index 19883b0..fc5d001
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2011-2012 Free Software Foundation, Inc.
+# Copyright (C) 2011-2017 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
@@ -17,7 +17,7 @@
 # Test 'py-compile --help', 'py-compile --version', and that 'py-compile'
 # correctly complains on wrong usage.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cp "$am_scriptdir/py-compile" . \
   || fatal_ "failed to fetch auxiliary script py-compile"
@@ -25,9 +25,9 @@ cp "$am_scriptdir/py-compile" . \
 # --help
 
 ./py-compile --help >stdout 2>stderr \
-  || { cat stdout; cat stderr >&2; Exit 1; }
+  || { cat stdout; cat stderr >&2; exit 1; }
 cat stdout
-test -s stderr && { cat stderr >&2; Exit 1; }
+test -s stderr && { cat stderr >&2; exit 1; }
 grep '^Usage: py-compile .' stdout
 $FGREP ' [--basedir DIR]' stdout
 $FGREP ' [--destdir DIR]' stdout
@@ -35,41 +35,41 @@ $FGREP ' [--destdir DIR]' stdout
 # --version
 
 ./py-compile --version >stdout 2>stderr \
-  || { cat stdout; cat stderr >&2; Exit 1; }
+  || { cat stdout; cat stderr >&2; exit 1; }
 cat stdout
-test -s stderr && { cat stderr >&2; Exit 1; }
+test -s stderr && { cat stderr >&2; exit 1; }
 year='20[0-9][0-9]' # Hopefully automake will be obsolete in 80 years ;-)
 month='(0[0-9]|1[012])'
 day='([012][0-9]|3[01])'
 hour='([01][0-9]|2[0123])'
 LC_ALL=C $EGREP "^py-compile $year-$month-$day\.$hour" stdout
-test `wc -l <stdout` -eq 1
+test $(wc -l <stdout) -eq 1
 
 # Unknown option.
 
 for opt in -b -d --foo; do
-  ./py-compile $opt 2>stderr && { cat stderr >&2; Exit 1; }
+  ./py-compile $opt 2>stderr && { cat stderr >&2; exit 1; }
   cat stderr >&2
-  grep "^py-compile: unrecognized option ['\`]$opt'" stderr
-  grep "^Try [\`']py-compile --help' for more information" stderr
+  grep "^py-compile: unrecognized option '$opt'" stderr
+  grep "^Try 'py-compile --help' for more information" stderr
 done
 
 # Missing option argument.
 
 for opt in --basedir --destdir; do
-  ./py-compile $opt 2>stderr && { cat stderr >&2; Exit 1; }
+  ./py-compile $opt 2>stderr && { cat stderr >&2; exit 1; }
   cat stderr >&2
-  grep "^py-compile: option ['\`]$opt' requires an argument" stderr
-  grep "^Try [\`']py-compile --help' for more information" stderr
+  grep "^py-compile: option '$opt' requires an argument" stderr
+  grep "^Try 'py-compile --help' for more information" stderr
 done
 
 # Missing files.
 
 for args in '' '--basedir dir' '--destdir dir'; do
-  ./py-compile $args 2>stderr && { cat stderr >&2; Exit 1; }
+  ./py-compile $args 2>stderr && { cat stderr >&2; exit 1; }
   cat stderr >&2
   grep '^py-compile: no files given' stderr
-  grep "^Try [\`']py-compile --help' for more information" stderr
+  grep "^Try 'py-compile --help' for more information" stderr
 done
 
 :
old mode 100755 (executable)
new mode 100644 (file)
similarity index 59%
rename from t/python8.sh
rename to t/python-am-path-iftrue.sh
index f999cb6..cc64438
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2003-2012 Free Software Foundation, Inc.
+# Copyright (C) 2003-2017 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
 
 # Test ACTION-IF-TRUE in AM_PATH_PYTHON.
 
+am_create_testdir=empty
 required=python
-. ./defs || Exit 1
+. test-init.sh
 
-cat >>configure.ac <<'EOF'
-# $PYTHON is supposed to be properly set in ACTION-IF-TRUE.
-AM_PATH_PYTHON(, [$PYTHON -V >py-version 2>&1])
+cat > configure.ac <<END
+AC_INIT([$me], [1.0])
+m4_include([mypy.m4])
 AC_OUTPUT
-EOF
+END
 
-: > Makefile.am
+# $PYTHON is supposed to be properly set in ACTION-IF-TRUE.
+cat > mypy.m4 << 'END'
+AM_PATH_PYTHON(, [$PYTHON -V >py-version 2>&1])
+END
 
 $ACLOCAL
 $AUTOCONF
-$AUTOMAKE --add-missing
-
 ./configure
 grep '^Python [0-9]\.[0-9][0-9]*\.[0-9]' py-version
 
+# The same, but requiring a version.
+
+rm -rf autom4te*.cache
+
+# $PYTHON is supposed to be properly set in ACTION-IF-TRUE.
+cat > mypy.m4 << 'END'
+AM_PATH_PYTHON([0.0], [$PYTHON -c 'print("%u:%u" % (1-1, 2**0))' > py.out])
+END
+
+# The "--force" option here is truly needed to avoid potential timestamp
+# races.  See automake bug#12210.
+$ACLOCAL --force
+$AUTOCONF --force
+./configure
+test x"$(cat py.out)" = x0:1
+
 :
old mode 100755 (executable)
new mode 100644 (file)
index 25dd4fe..856b634
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2011-2012 Free Software Foundation, Inc.
+# Copyright (C) 2011-2017 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
@@ -17,7 +17,7 @@
 # Test distribution of *_PYTHON files.
 
 # This test does not require python.
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AM_PATH_PYTHON([], [:], [:])
@@ -73,6 +73,6 @@ $AUTOMAKE
 
 $MAKE disttest
 # It's not distributed, hence it shouldn't be needlessly generated.
-test ! -f my-nodist.py
+test ! -e my-nodist.py
 
 :
diff --git a/t/python-missing.sh b/t/python-missing.sh
new file mode 100644 (file)
index 0000000..4567ed2
--- /dev/null
@@ -0,0 +1,82 @@
+#! /bin/sh
+# Copyright (C) 2003-2017 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 detection of missing Python.
+# See also related test t/python-am-path-missing-2.sh (which requires
+# an actual python program).
+
+am_create_testdir=empty
+# An actual python is *not* required in this test.
+. test-init.sh
+
+unset PYTHON
+
+cat > configure.ac <<END
+AC_INIT([$me], [1.0])
+m4_include([mypy.m4])
+AC_OUTPUT
+END
+
+echo AM_PATH_PYTHON > mypy.m4
+
+$ACLOCAL
+$AUTOCONF
+
+# Simulate no Python.
+./configure PYTHON=: 2>stderr && { cat stderr >&2; exit 1; }
+cat stderr >&2
+grep 'no suitable Python interpreter found' stderr
+
+# Again, but from the environment this time.
+env PYTHON=: ./configure 2>stderr && { cat stderr >&2; exit 1; }
+cat stderr >&2
+grep 'no suitable Python interpreter found' stderr
+
+# Now try using a custom ACTION-IF-NOT-FOUND.
+
+echo 'AM_PATH_PYTHON(,, [echo "$PYTHON" > py])' > mypy.m4
+$AUTOCONF --force
+./configure PYTHON=:
+test x"$(cat py)" = x:
+
+# Now try requiring a version.
+
+rm -rf autom4te*.cache # Will have to re-run aclocal.
+
+# Hopefully the Python team will never release such a version :-)
+echo 'AM_PATH_PYTHON([9999.9], [])' > mypy.m4
+# The "--force" options (here and below) are truly needed to avoid
+# potential timestamp races.  See automake bug#12210.
+$ACLOCAL --force
+$AUTOCONF --force
+./configure >stdout 2>stderr && {
+  cat stdout
+  cat stderr >&2
+  exit 1
+}
+cat stdout
+cat stderr >&2
+$EGREP 'checking for a Python interpreter with version >= 9999\.9\.\.\. no(ne)? *$' stdout
+grep 'no suitable Python interpreter found' stderr
+
+# Now try requiring a version and using a custom ACTION-IF-NOT-FOUND.
+
+echo 'AM_PATH_PYTHON([9999.9], [], [echo "$PYTHON" > py])' > mypy.m4
+$AUTOCONF --force
+./configure
+test x"$(cat py)" = x:
+
+:
old mode 100755 (executable)
new mode 100644 (file)
index 3efa5d0..ff60755
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2012 Free Software Foundation, Inc.
+# Copyright (C) 2012-2017 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
@@ -19,7 +19,7 @@
 # declaration.
 
 required=python
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac <<'EOF'
 AM_PATH_PYTHON
@@ -44,14 +44,12 @@ $AUTOCONF
 $AUTOMAKE --add-missing
 test -f py-compile
 
-inst=`pwd`/inst
-
-./configure --prefix="$inst"
+./configure --prefix="$(pwd)/inst"
 $MAKE install
-test -f "$inst/py/yes.py"
-test -f "$inst/py/yes.pyc"
-test ! -f "$inst/py/no.py"
-test ! -f "$inst/py/no.pyc"
+test -f            inst/py/yes.py
+test ! -e          inst/py/no.py
+py_installed       inst/py/yes.pyc
+py_installed --not inst/py/no.pyc
 
 $MAKE disttest
 
old mode 100755 (executable)
new mode 100644 (file)
similarity index 58%
rename from t/python5b.sh
rename to t/python-too-old.sh
index b382b38..97e5337
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2003-2012 Free Software Foundation, Inc.
+# Copyright (C) 2003-2017 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 detection of missing Python.
-# Same as python5.test, but with the user forcing the python to use.
+# Test detection of too old Python, also forcing the python to use.
+# See also related test 't/python-am-path-missing.sh'.
 
+am_create_testdir=empty
 required=python
-. ./defs || Exit 1
+. test-init.sh
+
+py_too_old ()
+{
+  ./configure ${1+"PYTHON=$1"} >stdout 2>stderr && {
+    cat stdout
+    cat stderr >&2
+    exit 1
+  }
+  cat stdout
+  cat stderr >&2
+  grep "whether $1 version is >= 9999\\.9\\.\\.\\. no *$" stdout
+  grep '[Pp]ython interpreter is too old' stderr
+}
+
+saved_PYTHON=$PYTHON; export saved_PYTHON
+unset PYTHON
 
-cat >>configure.ac << 'END'
+cat > configure.ac <<END
+AC_INIT([$me], [1.0])
 # Hopefully the Python team will never release such a version.
 AM_PATH_PYTHON([9999.9])
-AC_OUTPUT
 END
 
+$ACLOCAL
+$AUTOCONF
+
+py_too_old python
+
 mkdir bin
 cat > bin/my-python << 'END'
 #! /bin/sh
-exec python ${1+"$@"}
+exec $saved_PYTHON ${1+"$@"}
 END
 chmod a+x bin/my-python
-PATH=`pwd`/bin$PATH_SEPARATOR$PATH
+PATH=$(pwd)/bin$PATH_SEPARATOR$PATH
 
-: > Makefile.am
-
-$ACLOCAL
-$AUTOCONF
-$AUTOMAKE --add-missing
-
-./configure PYTHON=my-python >stdout 2>stderr && {
-  cat stdout
-  cat stderr >&2
-  Exit 1
-}
-cat stdout
-cat stderr >&2
-grep 'whether my-python version is >= 9999\.9\.\.\. no *$' stdout
-grep '[Pp]ython interpreter is too old' stderr
+py_too_old my-python
 
 :
old mode 100755 (executable)
new mode 100644 (file)
index 56c2b61..d2b7b5b
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2011-2012 Free Software Foundation, Inc.
+# Copyright (C) 2011-2017 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
 # advertised in the manual.
 
 required=python
-. ./defs || Exit 1
+. test-init.sh
 
 # In case the user's config.site defines pythondir or pyexecdir.
 CONFIG_SITE=/dev/null; export CONFIG_SITE
 
-PYTHON=python
-
 # Update the definition below if the documentation changes.
 # Note that the value of the 'pythondir' and 'pyexecdir' variables can
 # vary among different python installations, so we need more relaxed
 # and ad-hoc checks for them.  Also, more proper "functional" checks
-# on them should be done in the 'python-virtualenv.test' test.
-PYTHON_VERSION=`$PYTHON -c 'import sys; print(sys.version[:3])'` || Exit 1
-PYTHON_PLATFORM=`$PYTHON -c 'import sys; print(sys.platform)'` || Exit 1
+# on them should be done in the 'python-virtualenv.sh' test.
+PYTHON_VERSION=$($PYTHON -c 'import sys; print(sys.version[:3])') || exit 1
+PYTHON_PLATFORM=$($PYTHON -c 'import sys; print(sys.platform)') || exit 1
 PYTHON_EXEC_PREFIX='${exec_prefix}'
 PYTHON_PREFIX='${prefix}'
 pkgpythondir="\${pythondir}/$me"
old mode 100755 (executable)
new mode 100644 (file)
index c534e8d..0798ce7
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2011-2012 Free Software Foundation, Inc.
+# Copyright (C) 2011-2017 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
 # This test also works as a mild stress-test on the python support.
 
 required='cc python virtualenv'
-. ./defs || Exit 1
+. test-init.sh
 
 # In case the user's config.site defines pythondir or pyexecdir.
 CONFIG_SITE=/dev/null; export CONFIG_SITE
 
+py_version_pre=$($PYTHON -V)
+
 # Skip the test if a proper virtualenv cannot be created.
-virtualenv --verbose virtenv && test -f virtenv/bin/activate \
-  || skip_ "coulnd't create python virtual environment"
+virtualenv -p"$PYTHON" --verbose virtenv && py_installed virtenv/bin/activate \
+  || skip_ "couldn't create python virtual environment"
 
 # Activate the virtualenv.
 . ./virtenv/bin/activate
@@ -34,16 +36,29 @@ if test -z "$VIRTUAL_ENV"; then
   framework_failure_ "can't activate python virtual environment"
 fi
 
-cwd=`pwd`
-py_version=`python -c 'import sys; print("%u.%u" % tuple(sys.version_info[:2]))'`
+py_version_post=$(python -V)
+
+# Sanity check.
+test "$py_version_pre" = "$py_version_post"
+
+cwd=$(pwd) || fatal_ "getting current working directory"
+py_version=$(python -c 'import sys; print("%u.%u" % tuple(sys.version_info[:2]))')
 py_site=$VIRTUAL_ENV/lib/python$py_version/site-packages
 
+# We need to do do this early, just to set some cache variables properly,
+# since because we're going to unset $PYTHON next.
+if python_has_pep3147; then
+  : PEP 3147 will be used in installation of ".pyc" files
+fi
+# We don't want our original python to be picked up by configure
+# invocations.
+unset PYTHON
+
 # We need control over the package name.
 cat > configure.ac << END
 AC_INIT([am_virtenv], [1.0])
 AM_INIT_AUTOMAKE
 AC_CONFIG_FILES([Makefile])
-AC_SUBST([MY_VIRTENV], ['$cwd/virtenv'])
 AC_PROG_CC
 AM_PROG_AR
 AC_PROG_RANLIB
@@ -59,9 +74,7 @@ libquux_a_SOURCES = foo.c
 pkgpyexec_LIBRARIES = libzardoz.a
 libzardoz_a_SOURCES = foo.c
 
-py_site = $(MY_VIRTENV)/lib/python$(PYTHON_VERSION)/site-packages
-
-.PYTHON: debug test-run test-install test-uninstall
+.PYTHON: debug test-run
 debug:
        @echo PYTHON: $(PYTHON)
        @echo PYTHON_VERSION: $(PYTHON_VERSION)
@@ -85,24 +98,6 @@ test-run:
        ## available.
        python -c 'from am_foo import foo_func; assert (foo_func () == 12345)'
        python -c 'from am_virtenv import old_am; assert (old_am () == "AutoMake")'
-test-install:
-       test -f $(py_site)/am_foo.py
-       test -f $(py_site)/am_foo.pyc
-       test -f $(py_site)/am_foo.pyo
-       test -f $(py_site)/am_virtenv/__init__.py
-       test -f $(py_site)/am_virtenv/__init__.pyc
-       test -f $(py_site)/am_virtenv/__init__.pyo
-       test -f $(py_site)/libquux.a
-       test -f $(py_site)/am_virtenv/libzardoz.a
-test-uninstall:
-       test ! -f $(py_site)/am_foo.py
-       test ! -f $(py_site)/am_foo.pyc
-       test ! -f $(py_site)/am_foo.pyo
-       test ! -f $(py_site)/am_virtenv/__init__.py
-       test ! -f $(py_site)/am_virtenv/__init__.pyc
-       test ! -f $(py_site)/am_virtenv/__init__.pyo
-       test ! -f $(py_site)/libquux.a
-       test ! -f $(py_site)/am_virtenv/libzardoz.a
 all-local: debug
 END
 
@@ -123,6 +118,34 @@ int foo (void)
 }
 END
 
+check_install ()
+{
+  $MAKE install ${1+"$@"}
+
+  test -f      "$py_site"/am_foo.py
+  py_installed "$py_site"/am_foo.pyc
+  py_installed "$py_site"/am_foo.pyo
+  py_installed "$py_site"/am_virtenv/__init__.py
+  py_installed "$py_site"/am_virtenv/__init__.pyc
+  py_installed "$py_site"/am_virtenv/__init__.pyo
+  test -f      "$py_site"/libquux.a
+  test -f      "$py_site"/am_virtenv/libzardoz.a
+}
+
+check_uninstall ()
+{
+  $MAKE uninstall ${1+"$@"}
+
+  test ! -e          "$py_site"/am_foo.py
+  py_installed --not "$py_site"/am_foo.pyc
+  py_installed --not "$py_site"/am_foo.pyo
+  test ! -e          "$py_site"/am_virtenv/__init__.py
+  py_installed --not "$py_site"/am_virtenv/__init__.pyc
+  py_installed --not "$py_site"/am_virtenv/__init__.pyo
+  test ! -e          "$py_site"/libquux.a
+  test ! -e          "$py_site"/am_virtenv/libzardoz.a
+}
+
 $ACLOCAL
 $AUTOCONF
 $AUTOMAKE --add-missing
@@ -131,45 +154,36 @@ $AUTOMAKE --add-missing
 mkdir build
 cd build
 ../configure --prefix="$VIRTUAL_ENV"
-$MAKE install
-$MAKE test-install
+check_install
 $MAKE test-run
-$MAKE uninstall
-$MAKE test-uninstall
+check_uninstall
 cd ..
 
 # Try an in-tree build.
 ./configure --prefix="$VIRTUAL_ENV"
-$MAKE install
-$MAKE test-install
+check_install
 $MAKE test-run
-$MAKE uninstall
-$MAKE test-uninstall
+check_uninstall
 
 $MAKE distclean
 
 # Overriding pythondir and pyexecdir with cache variables should work.
 ./configure am_cv_python_pythondir="$py_site" \
             am_cv_python_pyexecdir="$py_site"
-$MAKE install
-$MAKE test-install
+check_install
 $MAKE test-run
-$MAKE uninstall
-$MAKE test-uninstall
+check_uninstall
 
 $MAKE distclean
 
 # Overriding pythondir and pyexecdir at make time should be enough.
 ./configure --prefix="$cwd/bad-prefix"
-pythondir=$py_site pyexecdir=$py_site
-export pythondir pyexecdir
-$MAKE -e install
-test ! -d bad-prefix
-$MAKE -e test-install
+check_install pythondir="$py_site" pyexecdir="$py_site" \
+              AM_MAKEFLAGS="pythondir='$py_site' pyexecdir='$py_site'"
+test ! -e bad-prefix
 $MAKE test-run
-$MAKE -e uninstall
-$MAKE -e test-uninstall
-unset pythondir pyexecdir
+check_uninstall pythondir="$py_site" pyexecdir="$py_site" \
+                AM_MAKEFLAGS="pythondir='$py_site' pyexecdir='$py_site'"
 
 # Also check that the distribution is self-contained, for completeness.
 $MAKE distcheck
@@ -181,7 +195,7 @@ $MAKE install
 python -c 'import am_foo; print(am_foo.__file__)'
 python -c 'import am_virtenv; print(am_virtenv.__file__)'
 deactivate "nondestructive"
-python -c 'import am_foo' && Exit 1
-python -c 'import am_virtenv' && Exit 1
+python -c 'import am_foo' && exit 1
+python -c 'import am_virtenv' && exit 1
 
 :
old mode 100755 (executable)
new mode 100644 (file)
index de8c0bb..be88518
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2001-2012 Free Software Foundation, Inc.
+# Copyright (C) 2001-2017 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
@@ -16,7 +16,7 @@
 
 # Test to make sure py_compile and am__py_compile are correctly defined.
 
-. ./defs || Exit 1
+. test-init.sh
 
 echo 'AM_PATH_PYTHON' >> configure.ac
 
@@ -53,8 +53,8 @@ $AUTOMAKE Makefile3
 grep "py" Makefile.in Makefile2.in Makefile3.in # For debugging.
 
 for f in Makefile.in Makefile2.in Makefile3.in; do
-  test `grep -c '^py_compile =' $f` -eq 1
-  test `grep -c '^am__py_compile =' $f` -eq 1
+  test $(grep -c '^py_compile =' $f) -eq 1
+  test $(grep -c '^am__py_compile =' $f) -eq 1
 done
 
 :
old mode 100755 (executable)
new mode 100644 (file)
index b28c3a4..9074f79
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2004-2012 Free Software Foundation, Inc.
+# Copyright (C) 2004-2017 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
@@ -17,7 +17,7 @@
 # Test _PYTHON with conditionals.
 
 required=python
-. ./defs || Exit 1
+. test-init.sh
 
 cat >>configure.ac <<'EOF'
 AM_PATH_PYTHON
@@ -50,35 +50,37 @@ $ACLOCAL
 $AUTOCONF
 $AUTOMAKE --add-missing
 
-mkdir inst
-inst=`pwd`/inst
-mkdir build
-cd build
-../configure --prefix="$inst"
+inst=inst_
+mkdir inst_ build_
+cd build_
+
+cwd=$(pwd) || fatal_ "getting current working directory"
+
+../configure --prefix="$cwd/$inst" one=0
 $MAKE install
-test -f "$inst/your/two.py"
-test -f "$inst/your/two.pyc"
-test -f "$inst/your/two.pyo"
-test ! -f "$inst/my/one.py"
-test ! -f "$inst/my/one.pyc"
-test ! -f "$inst/my/one.pyo"
+test -f            "$inst/your/two.py"
+py_installed       "$inst/your/two.pyc"
+py_installed       "$inst/your/two.pyo"
+py_installed --not "$inst/my/one.py"
+py_installed --not "$inst/my/one.pyc"
+py_installed --not "$inst/my/one.pyo"
 $MAKE uninstall
-test ! -f "$inst/your/two.py"
-test ! -f "$inst/your/two.pyc"
-test ! -f "$inst/your/two.pyo"
+py_installed --not "$inst/your/two.py"
+py_installed --not "$inst/your/two.pyc"
+py_installed --not "$inst/your/two.pyo"
 
-../configure --prefix="$inst" one=1
+../configure --prefix=$cwd/"$inst" one=1
 $MAKE install
-test ! -f "$inst/your/two.py"
-test ! -f "$inst/your/two.pyc"
-test ! -f "$inst/your/two.pyo"
-test -f "$inst/my/one.py"
-test -f "$inst/my/one.pyc"
-test -f "$inst/my/one.pyo"
+py_installed --not "$inst/your/two.py"
+py_installed --not "$inst/your/two.pyc"
+py_installed --not "$inst/your/two.pyo"
+test -f            "$inst/my/one.py"
+py_installed       "$inst/my/one.pyc"
+py_installed       "$inst/my/one.pyo"
 $MAKE uninstall
-test ! -f "$inst/my/one.py"
-test ! -f "$inst/my/one.pyc"
-test ! -f "$inst/my/one.pyo"
+py_installed --not "$inst/my/one.py"
+py_installed --not "$inst/my/one.pyc"
+py_installed --not "$inst/my/one.pyo"
 
 $MAKE disttest
 
old mode 100755 (executable)
new mode 100644 (file)
index aff3c9c..3496733
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2004-2012 Free Software Foundation, Inc.
+# Copyright (C) 2004-2017 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
 # Test missing python.
 
 # Python is not required for this test.
-. ./defs || Exit 1
+. test-init.sh
+
+# We don't want to allow user overrides in this test.
+unset PYTHON
 
 cat >>configure.ac <<'EOF'
 m4_define([_AM_PYTHON_INTERPRETER_LIST], [IShouldNotExist1 IShouldNotExist2])
@@ -33,22 +36,22 @@ EOF
 $ACLOCAL
 $AUTOCONF
 
-./configure >stdout 2>stderr && { cat stdout; cat stderr >&2; Exit 1; }
+./configure >stdout 2>stderr && { cat stdout; cat stderr >&2; exit 1; }
 cat stdout
 cat stderr >&2
 grep 'checking for IShouldNotExist1' stdout
 grep 'checking for IShouldNotExist2' stdout
 grep 'no suitable Python interpreter found' stderr
 
-sed 's/AM_PATH_PYTHON/AM_PATH_PYTHON(,,:)/' configure.ac >configure.int
-mv -f configure.int configure.ac
+sed 's/AM_PATH_PYTHON/AM_PATH_PYTHON(,,:)/' configure.ac >configure.tmp
+mv -f configure.tmp configure.ac
 $ACLOCAL --force
 $AUTOCONF --force
 # This one should define PYTHON as ":" and exit successfully.
 ./configure
 
 # Any user setting should be used.
-./configure PYTHON=foo >stdout && { cat stdout; Exit 1; }
+./configure PYTHON=foo >stdout && { cat stdout; exit 1; }
 cat stdout
 grep 'PYTHON = foo' stdout
 
old mode 100755 (executable)
new mode 100644 (file)
index 3faeb45..f5153aa
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2004-2012 Free Software Foundation, Inc.
+# Copyright (C) 2004-2017 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
@@ -17,7 +17,7 @@
 # Ensure DESTDIR is not included in byte-compiled files.
 
 required=python
-. ./defs || Exit 1
+. test-init.sh
 
 cat >>configure.ac <<'EOF'
 AM_PATH_PYTHON
@@ -36,21 +36,19 @@ $ACLOCAL
 $AUTOCONF
 $AUTOMAKE --add-missing
 
-rm -rf inst build
-mkdir inst
-instdir=`pwd`/inst
-mkdir build
+destdir=$(pwd)/inst
+mkdir inst build
 cd build
 ../configure --prefix="/usr"
-$MAKE install DESTDIR=$instdir
+$MAKE install DESTDIR=$destdir
 
 # Perfunctory test that the files were created.
-test -f "$instdir/usr/share/my/my.py"
-test -f "$instdir/usr/share/my/my.pyc"
-test -f "$instdir/usr/share/my/my.pyo"
+test -f "$destdir/usr/share/my/my.py"
+pyo=$(pyc_location -p "$destdir/usr/share/my/my.pyo")
+pyc=$(pyc_location -p "$destdir/usr/share/my/my.pyc")
 
 # If DESTDIR has made it into the byte compiled files, fail the test.
-$FGREP "$instdir" "$instdir/usr/share/my/my.pyo" \
-                  "$instdir/usr/share/my/my.pyc" && Exit 1
+st=0; $FGREP "$destdir" "$pyc" "$pyo" || st=$?
+test $st -eq 1
 
 :
old mode 100755 (executable)
new mode 100644 (file)
index 3b13b33..f59e108
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2002-2012 Free Software Foundation, Inc.
+# Copyright (C) 2002-2017 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
@@ -16,7 +16,7 @@
 
 # Make sure that Automake suggests using AM_PATH_PYTHON.
 
-. ./defs || Exit 1
+. test-init.sh
 
 $ACLOCAL
 
old mode 100755 (executable)
new mode 100644 (file)
index 72021cd..b86ed91
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2002-2012 Free Software Foundation, Inc.
+# Copyright (C) 2002-2017 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
@@ -17,7 +17,7 @@
 # Make sure we install built python files.
 
 required=python
-. ./defs || Exit 1
+. test-init.sh
 
 cat >>configure.ac <<EOF
 AM_PATH_PYTHON
@@ -36,14 +36,12 @@ $ACLOCAL
 $AUTOCONF
 $AUTOMAKE --add-missing
 
-mkdir inst
-inst=`pwd`/inst
 mkdir build
 cd build
-../configure --prefix="$inst"
+../configure --prefix="$(pwd)/inst"
 $MAKE install
-test -f "$inst/my/one.py"
-test -f "$inst/my/one.pyc"
-test -f "$inst/my/one.pyo"
+py_installed inst/my/one.py
+py_installed inst/my/one.pyc
+py_installed inst/my/one.pyo
 
 :
diff --git a/t/python4.sh b/t/python4.sh
deleted file mode 100755 (executable)
index 4294bb2..0000000
+++ /dev/null
@@ -1,43 +0,0 @@
-#! /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 detection of missing Python.
-
-# Python is not required for this test.
-. ./defs || Exit 1
-
-cat >>configure.ac <<EOF
-AM_PATH_PYTHON
-AC_OUTPUT
-EOF
-
-: > Makefile.am
-
-$ACLOCAL
-$AUTOCONF
-$AUTOMAKE --add-missing
-
-# Simulate no Python.
-./configure PYTHON=: 2>stderr && { cat stderr >&2; Exit 1; }
-cat stderr >&2
-grep 'no suitable Python interpreter found' stderr
-
-# Again, but from the environment this time.
-env PYTHON=: ./configure 2>stderr && { cat stderr >&2; Exit 1; }
-cat stderr >&2
-grep 'no suitable Python interpreter found' stderr
-
-:
diff --git a/t/python5.sh b/t/python5.sh
deleted file mode 100755 (executable)
index 80429f9..0000000
+++ /dev/null
@@ -1,45 +0,0 @@
-#! /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 detection of missing Python.
-# Same as python4.test, but requiring a version.
-
-# Python is not required for this test.
-. ./defs || Exit 1
-
-cat >>configure.ac <<EOF
-# Hopefully the Python team will never release such a version.
-AM_PATH_PYTHON([9999.9])
-AC_OUTPUT
-EOF
-
-: > Makefile.am
-
-$ACLOCAL
-$AUTOCONF
-$AUTOMAKE --add-missing
-
-./configure >stdout 2>stderr && {
-  cat stdout
-  cat stderr >&2
-  Exit 1
-}
-cat stdout
-cat stderr >&2
-$EGREP 'checking for a Python interpreter with version >= 9999\.9\.\.\. no(ne)? *$' stdout
-grep 'no suitable Python interpreter found' stderr
-
-:
diff --git a/t/python6.sh b/t/python6.sh
deleted file mode 100755 (executable)
index 0e09a43..0000000
+++ /dev/null
@@ -1,38 +0,0 @@
-#! /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 detection of missing Python.
-# Same as python4.test, but using a custom ACTION-IF-NOT-FOUND.
-
-# Python is not required for this test.
-. ./defs || Exit 1
-
-cat >>configure.ac <<\EOF
-AM_PATH_PYTHON(,, [echo "$PYTHON" > py])
-AC_OUTPUT
-EOF
-
-: > Makefile.am
-
-$ACLOCAL
-$AUTOCONF
-$AUTOMAKE --add-missing
-
-# Simulate no Python.
-./configure PYTHON=:
-test x"`cat py`" = x:
-
-:
diff --git a/t/python9.sh b/t/python9.sh
deleted file mode 100755 (executable)
index e567adc..0000000
+++ /dev/null
@@ -1,38 +0,0 @@
-#! /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 ACTION-IF-TRUE in AM_PATH_PYTHON.
-# Similar to python8.test, but requiring a version.
-
-required=python
-. ./defs || Exit 1
-
-cat >>configure.ac <<'EOF'
-# $PYTHON is supposed to be properly set in ACTION-IF-TRUE.
-AM_PATH_PYTHON([0.0], [$PYTHON -c 'print("%u:%u" % (1-1, 2**0))' > py.out])
-AC_OUTPUT
-EOF
-
-: > Makefile.am
-
-$ACLOCAL
-$AUTOCONF
-$AUTOMAKE --add-missing
-
-./configure
-test x"`cat py.out`" = x0:1
-
-:
diff --git a/t/recurs-user-deeply-nested.sh b/t/recurs-user-deeply-nested.sh
new file mode 100644 (file)
index 0000000..401d9e4
--- /dev/null
@@ -0,0 +1,97 @@
+#! /bin/sh
+# Copyright (C) 2012-2017 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 recursion on user-defined targets can be made to work
+# with "deeply" nested uses of $(SUBDIRS).
+
+. test-init.sh
+
+cat >> configure.ac <<'END'
+AC_CONFIG_FILES([
+    sub1/Makefile
+    sub1/sub2/Makefile
+    sub1/sub2/sub3/Makefile
+    sub1/sub2/sub3/sub4/Makefile
+])
+AM_EXTRA_RECURSIVE_TARGETS([foo])
+AC_OUTPUT
+END
+
+dirs='sub1 sub1/sub2 sub1/sub2/sub3 sub1/sub2/sub3/sub4'
+
+mkdir $dirs
+
+cat > Makefile.am <<'END'
+SUBDIRS = sub1
+
+foo-local:
+       cp sub1/foo foo
+MOSTLYCLEANFILES = foo
+
+.PHONY: test
+test:
+       echo 'It works!' > exp
+       diff exp foo
+       diff exp sub1/foo
+       test ! -f sub1/sub2/foo
+       test ! -f sub1/sub2/sub3/foo
+       diff exp sub1/sub2/sub3/sub4/foo
+       rm -f exp
+
+all-local: foo
+check-local: test
+END
+
+cat > sub1/Makefile.am <<'END'
+SUBDIRS = sub2
+foo-local:
+       test ! -f sub2/sub3/foo
+       cp sub2/sub3/sub4/foo foo
+MOSTLYCLEANFILES = foo
+END
+
+# Here we deliberately lack an explicit definition the 'foo-local'
+# target; that shouldn't stop 'foo' recursion into subdirectory
+# 'sub3/sub4'.
+echo SUBDIRS = sub3 > sub1/sub2/Makefile.am
+echo SUBDIRS = sub4 > sub1/sub2/sub3/Makefile.am
+
+cat > sub1/sub2/sub3/sub4/Makefile.am <<'END'
+foo-local:
+       echo 'It works!' > foo
+MOSTLYCLEANFILES = foo
+END
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE
+
+for d in $dirs; do
+  $FGREP foo-am $d/Makefile.in || exit 1
+  case $d in
+    */sub4);;
+    *) $FGREP foo-recursive $d/Makefile.in || exit 1;;
+  esac
+done
+
+./configure
+
+$MAKE foo
+$MAKE test
+
+$MAKE distcheck
+
+:
diff --git a/t/recurs-user-indir.sh b/t/recurs-user-indir.sh
new file mode 100644 (file)
index 0000000..1ae6f71
--- /dev/null
@@ -0,0 +1,99 @@
+#! /bin/sh
+# Copyright (C) 2012-2017 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 user recursion works with various types of indirections
+# *involved in the definition of the '*-local' targets*: make macros,
+# AC_SUBST'd strings, automake-time file inclusions, automake
+# conditionals...
+
+. test-init.sh
+
+cat >> configure.ac <<'END'
+AC_CONFIG_FILES([
+    sub1/Makefile
+    sub1/subsub/Makefile
+    sub2/Makefile
+    sub2/subsub/Makefile
+])
+AM_EXTRA_RECURSIVE_TARGETS([foo])
+AC_SUBST([FOO_LOCAL], [foo-local])
+AM_CONDITIONAL([COND], [:])
+AC_OUTPUT
+END
+
+mkdir sub1 sub1/subsub sub2 sub2/subsub
+
+cat > Makefile.am <<'END'
+SUBDIRS = sub1 sub2
+AM_FOO_LOCAL = foo-local
+
+$(AM_FOO_LOCAL):
+       pwd && : > foo
+CLEANFILES = foo
+
+all-local: foo
+check-local:
+       test -f foo
+       test -f sub1/foo
+       test -f sub1/subsub/foo
+       test -f sub2/foo
+       test -f sub2/subsub/foo
+       test ! -r sub2/subsub/bar
+END
+
+cat > sub1/Makefile.am <<'END'
+SUBDIRS = subsub
+@FOO_LOCAL@:
+       pwd && : > foo
+CLEANFILES = foo
+END
+
+cat > sub1/subsub/Makefile.am <<'END'
+$(FOO_LOCAL):
+       pwd && : > foo
+CLEANFILES = foo
+END
+
+cat > sub2/Makefile.am <<'END'
+include $(srcdir)/bar.am
+include $(srcdir)/baz.am
+CLEANFILES = foo
+END
+
+echo 'SUBDIRS = subsub' > sub2/bar.am
+echo 'foo-local: ; pwd && : > foo' > sub2/baz.am
+
+cat > sub2/subsub/Makefile.am <<'END'
+if COND
+foo-local:
+       pwd && : > foo
+CLEANFILES = foo
+else !COND
+foo-local:
+       pwd && : > bar
+endif !COND
+END
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE
+
+./configure
+
+$MAKE check
+$MAKE distcheck
+
+:
diff --git a/t/recurs-user-keep-going.sh b/t/recurs-user-keep-going.sh
new file mode 100644 (file)
index 0000000..f1b879d
--- /dev/null
@@ -0,0 +1,95 @@
+#! /bin/sh
+# Copyright (C) 2012-2017 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 user recursion works with "make -k".
+
+. test-init.sh
+
+cat >> configure.ac <<'END'
+AM_EXTRA_RECURSIVE_TARGETS([foo])
+AC_CONFIG_FILES([
+    sub1/Makefile
+    sub1/subsub1/Makefile
+    sub2/Makefile
+    sub2/subsub2/Makefile
+    sub3/Makefile
+])
+FAIL='@echo "FAIL $@ in `pwd`"; exit 1'
+PASS='@echo "PASS $@ in `pwd`"; : > foo'
+AC_SUBST([FAIL])
+AC_SUBST([PASS])
+AC_OUTPUT
+END
+
+mkdir sub1 sub1/subsub1 sub2 sub2/subsub2 sub3
+
+cat > Makefile.am <<'END'
+SUBDIRS = sub1 . sub2 sub3
+foo-local:; @FAIL@
+END
+
+cat > sub1/Makefile.am <<'END'
+SUBDIRS = subsub1
+foo-local:; @PASS@
+END
+
+cat > sub2/Makefile.am <<'END'
+SUBDIRS = subsub2
+foo-local:; @FAIL@
+END
+
+echo 'foo-local:; @FAIL@' > sub1/subsub1/Makefile.am
+echo 'foo-local:; @PASS@' > sub2/subsub2/Makefile.am
+echo 'foo-local:; @PASS@' > sub3/Makefile.am
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE
+
+./configure
+
+cat > exp <<END
+./sub1/foo
+./sub2/subsub2/foo
+./sub3/foo
+END
+
+as_expected ()
+{
+  find . -name foo > t || { cat t; exit 1; }
+  LC_ALL=C sort t > got
+  cat exp
+  cat got
+  diff exp got
+}
+
+# Without "-k", we fail in 'sub1/subsub1', and do nothing else.
+# So, no 'foo' file gets created.
+$MAKE foo && exit 1
+find . -name foo | grep . && exit 1
+
+if using_gmake; then
+  $MAKE -k foo && exit 1
+  as_expected
+  $MAKE --keep-going foo && exit 1
+  as_expected
+else
+  # Don't trust the exit status of 'make -k' for non-GNU makes.
+  $MAKE -k foo || :
+  as_expected
+fi
+
+:
diff --git a/t/recurs-user-many.sh b/t/recurs-user-many.sh
new file mode 100644 (file)
index 0000000..989299e
--- /dev/null
@@ -0,0 +1,73 @@
+#! /bin/sh
+# Copyright (C) 2012-2017 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 many user-defined recursive targets can be supported
+# at once, and that calls to 'AM_EXTRA_RECURSIVE_TARGETS' are
+# cumulative.
+
+. test-init.sh
+
+cat >> configure.ac <<'END'
+AC_CONFIG_FILES([sub/Makefile])
+## NOTE: extra white spaces, tabs, newlines and backslashes in the
+## lines below: on purpose.
+AM_EXTRA_RECURSIVE_TARGETS([ foo  \
+       bar  ])
+AC_SUBST([CLEANFILES], ['foo bar baz'])
+AC_OUTPUT
+# Yes, this appears after AC_OUTPUT.  So what?
+AM_EXTRA_RECURSIVE_TARGETS([baz])
+END
+
+mkdir sub
+
+cat > Makefile.am <<'END'
+SUBDIRS = sub
+foo-local:
+       : > foo
+bar-local:
+       echo x > bar
+baz-local: ; touch baz
+check-local: foo bar baz
+       ls -l . sub ;: For debugging.
+       test -f foo
+       test -f bar
+       test -f baz
+       test -f sub/foo
+       test -f sub/bar
+       test -f sub/baz
+END
+
+cat > sub/Makefile.am <<'END'
+foo-local bar-local baz-local:
+       touch `echo $@ | sed 's/-local$$//'`
+END
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE
+
+for t in foo bar baz; do
+  $FGREP "$t-am" Makefile.in
+  $FGREP "$t-am" sub/Makefile.in
+done
+
+./configure
+
+$MAKE check
+$MAKE distcheck
+
+:
diff --git a/t/recurs-user-no-subdirs.sh b/t/recurs-user-no-subdirs.sh
new file mode 100644 (file)
index 0000000..b3398bd
--- /dev/null
@@ -0,0 +1,52 @@
+#! /bin/sh
+# Copyright (C) 2012-2017 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 user recursion can be made to work even when $(SUBDIRS)
+# is empty or undefined.
+
+. test-init.sh
+
+cat >> configure.ac <<'END'
+AM_EXTRA_RECURSIVE_TARGETS([foo])
+AC_OUTPUT
+END
+
+$ACLOCAL
+$AUTOCONF
+
+# First try with undefined $(SUBDIRS).
+cat > Makefile.am <<'END'
+all-local: foo
+foo-local:
+       : > bar
+MOSTLYCLEANFILES = bar
+END
+$AUTOMAKE
+./configure
+$MAKE foo
+test -f bar
+
+$MAKE distclean
+test ! -r bar # Sanity check.
+
+# Now try with empty but defined $(SUBDIRS).
+echo SUBDIRS = >> Makefile.am
+$AUTOMAKE
+./configure
+$MAKE foo
+test -f bar
+
+:
old mode 100755 (executable)
new mode 100644 (file)
similarity index 60%
rename from t/cygnus-check-without-all.sh
rename to t/recurs-user-no-top-level.sh
index 121c657..6975be9
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2010-2012 Free Software Foundation, Inc.
+# Copyright (C) 2012-2017 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/>.
 
-# Check that, in cygnus mode, target "check" does not depend target
-# "all".
+# Check that user recursion works even for targets that don't exist
+# in the top-level Makefile.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac <<'END'
-AM_MAINTAINER_MODE
+AC_CONFIG_FILES([sub/Makefile])
+AM_EXTRA_RECURSIVE_TARGETS([foo-bar])
 AC_OUTPUT
 END
 
+mkdir sub
+
 cat > Makefile.am <<'END'
-all-local:
-       : > all-target-has-failed
-       exit 1
-check-local:
-       touch check-target-has-run
+SUBDIRS = sub
+all-local: foo-bar
 END
 
-$ACLOCAL
-$AUTOMAKE --cygnus -Wno-obsolete
-
-$EGREP '(^| )all.*(:|:.* )check' Makefile.in && Exit 1
+cat > sub/Makefile.am <<'END'
+foo-bar-local:
+       : > foo-bar
+MOSTLYCLEANFILES = foo-bar
+END
 
+$ACLOCAL
 $AUTOCONF
+$AUTOMAKE
+
 ./configure
 
-$MAKE check
-test -f check-target-has-run
-test ! -r all-target-has-failed
-# Sanity checks.
-$MAKE && Exit 1
-test -f all-target-has-failed
+$MAKE foo-bar
+test -f sub/foo-bar
 
 :
diff --git a/t/recurs-user-override.sh b/t/recurs-user-override.sh
new file mode 100644 (file)
index 0000000..b4e98f3
--- /dev/null
@@ -0,0 +1,68 @@
+#! /bin/sh
+# Copyright (C) 2012-2017 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 override of user-defined recursive targets work as
+# expected.
+
+. test-init.sh
+
+cat >> configure.ac <<'END'
+AC_CONFIG_FILES([sub/Makefile])
+AM_EXTRA_RECURSIVE_TARGETS([foobar zardoz])
+AC_OUTPUT
+END
+
+cat > Makefile.am <<'END'
+SUBDIRS = sub
+all-local: foobar zardoz
+foobar:
+       : > foobar.out
+MOSTLYCLEANFILES = foobar.out
+check-local:
+       test -f foobar.out
+       test ! -r sub/foobar.out
+       test -f sub/zardoz.out
+       test ! -r sub/baz.out
+END
+
+mkdir sub
+cat > sub/Makefile.am <<'END'
+foobar foobar-local:
+       : > foobar.out
+zardoz-local:
+       : > baz.out
+zardoz:
+       : > zardoz.out
+MOSTLYCLEANFILES = zardoz.out
+END
+
+$ACLOCAL
+$AUTOCONF
+
+AUTOMAKE_fails
+grep '^Makefile\.am:3:.*user target.*foobar' stderr
+grep '^Makefile\.am:.*foobar-local.*instead of foobar$' stderr
+grep '^sub/Makefile\.am:5:.*user target.*zardoz' stderr
+grep '^sub/Makefile\.am:.*zardoz-local.*instead of zardoz$' stderr
+
+$AUTOMAKE -Wno-override
+
+./configure
+
+$MAKE check
+$MAKE distcheck
+
+:
diff --git a/t/recurs-user-phony.sh b/t/recurs-user-phony.sh
new file mode 100644 (file)
index 0000000..dd4d195
--- /dev/null
@@ -0,0 +1,64 @@
+#! /bin/sh
+# Copyright (C) 2012-2017 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 user-defined recursive targets and their associate
+# '-local', '-am' and '-recursive' targets are declared as phony.
+
+# Require GNU make, because some vendo makes (e.g., Solaris) doesn't
+# truly respect .PHONY.
+required=GNUmake
+. test-init.sh
+
+cat >> configure.ac <<'END'
+AC_CONFIG_FILES([sub/Makefile])
+AM_EXTRA_RECURSIVE_TARGETS([foo])
+AC_OUTPUT
+END
+
+cat > Makefile.am <<'END'
+SUBDIRS = sub
+foo-local:
+       echo 'GOOD!' > foo
+END
+
+mkdir sub
+cat > sub/Makefile.am <<'END'
+foo-local:
+       echo 'GOOD!' > foo
+END
+
+dummy_files='
+  foo
+  foo-local
+  foo-am
+  foo-recursive
+  sub/foo
+  sub/foo-local
+  sub/foo-am
+'
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE
+./configure
+
+touch $dummy_files
+
+$MAKE foo
+grep 'GOOD!' foo
+grep 'GOOD!' sub/foo
+
+:
diff --git a/t/recurs-user-wrap.sh b/t/recurs-user-wrap.sh
new file mode 100644 (file)
index 0000000..70339af
--- /dev/null
@@ -0,0 +1,59 @@
+#! /bin/sh
+# Copyright (C) 2012-2017 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 rules generated by user recursion are apt to be wrapped
+# by other makefiles.
+
+required=GNUmake
+. test-init.sh
+
+cat >> configure.ac << 'END'
+AM_EXTRA_RECURSIVE_TARGETS([extra])
+AC_CONFIG_FILES([src/Makefile])
+AC_OUTPUT
+END
+
+mkdir src
+echo SUBDIRS = src > Makefile.am
+echo 'bar: ; : > $@ ' > src/Makefile.am
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE
+
+./configure
+
+$MAKE extra
+test ! -f extra-local
+test ! -f src/bar
+
+cat > GNUmakefile << 'END'
+.DEFAULT_GOAL = all
+extra-local:
+       : > $@
+include ./Makefile
+END
+
+cat > src/GNUmakefile << 'END'
+include ./Makefile
+extra-local: bar
+END
+
+$MAKE extra
+test -f extra-local
+test -f src/bar
+
+:
diff --git a/t/recurs-user.sh b/t/recurs-user.sh
new file mode 100644 (file)
index 0000000..310fd40
--- /dev/null
@@ -0,0 +1,81 @@
+#! /bin/sh
+# Copyright (C) 2012-2017 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/>.
+
+# Basic checks on user-defined recursive rules.
+# Check that user recursion respect $(SUBDIRS) order,
+# and proceeds in a depth-first fashion.
+
+. test-init.sh
+
+cat >> configure.ac <<'END'
+AM_EXTRA_RECURSIVE_TARGETS([foo])
+AC_CONFIG_FILES([
+    sub1/Makefile
+    sub2/Makefile
+    sub3/Makefile
+    sub3/deeper/Makefile
+])
+AC_OUTPUT
+END
+
+mkdir sub1 sub2 sub3 sub3/deeper
+
+cat > Makefile.am <<'END'
+SUBDIRS = sub1 . sub3 sub2
+foo-local:
+       echo '.' >> $(top_builddir)/got
+.PHONY: test
+test: foo
+       cat $(srcdir)/exp
+       cat ./got
+       diff $(srcdir)/exp ./got
+check-local: test
+MOSTLYCLEANFILES = got
+EXTRA_DIST = exp
+END
+
+for i in 1 2 3; do
+  cat > sub$i/Makefile.am <<END
+foo-local:
+       echo 'sub$i' >> \$(top_builddir)/got
+END
+done
+
+echo SUBDIRS = deeper >> sub3/Makefile.am
+
+cat >> sub3/deeper/Makefile.am <<'END'
+foo-local:
+       echo sub3/deeper >> $(top_builddir)/got
+END
+
+cat >> exp <<'END'
+sub1
+.
+sub3/deeper
+sub3
+sub2
+END
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE
+
+./configure
+
+$MAKE test
+$MAKE distcheck
+
+:
diff --git a/t/recurs-user2.sh b/t/recurs-user2.sh
new file mode 100644 (file)
index 0000000..5090e04
--- /dev/null
@@ -0,0 +1,103 @@
+#! /bin/sh
+# Copyright (C) 2012-2017 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 user recursion can be made to work when $(SUBDIRS) are
+# not "strictly" nested, as in e.g.:
+#    SUBDIRS = src external/lib external/tests
+# with no Makefile in 'external'.
+
+. test-init.sh
+
+cat >> configure.ac <<'END'
+AC_CONFIG_FILES(
+    sub1/Makefile
+    sub2/Makefile
+dnl There's deliberately no 'sub3/Makefile'.
+    sub3/subsub/Makefile
+    sub4/Makefile
+    sub4/subsub/Makefile
+)
+AM_EXTRA_RECURSIVE_TARGETS([foo])
+AC_OUTPUT
+END
+
+mkdir sub1 sub2 sub3 sub4 sub3/subsub sub4/subsub
+
+cat > Makefile.am <<'END'
+SUBDIRS = sub1 sub2 sub3/subsub sub4 sub4/subsub
+
+foo-local:
+       echo _rootdir_ >foo
+MOSTLYCLEANFILES = foo
+
+.PHONY: test
+test: foo
+       grep _rootdir_ foo
+       grep ':sub1:' sub1/foo
+       grep ',sub1,' sub1/bar
+       test ! -r sub2/foo
+       test ! -r sub3/foo
+       grep '%sub3/subsub%' sub3/subsub/quux
+       test ! -r sub3/subsub/foo
+       test ! -r sub4/foo
+       grep '=sub4/subsub=' sub4/subsub/foo
+
+check-local: test
+END
+
+# A 'foo-local' target with dependencies shouldn't cause problems.
+cat > sub1/Makefile.am <<'END'
+foo-local: bar
+       sed 's/,/:/g' bar >foo
+bar:
+       echo ',sub1,' >$@
+MOSTLYCLEANFILES = foo bar
+END
+
+# The lack of a 'foo' target here shouldn't cause any error in
+# automake nor in make.
+: > sub2/Makefile.am
+
+# The lack of file 'sub3/Makefile.am' shouldn't cause any problem either.
+rm -f sub3/Makefile.am
+
+# A 'foo-local' creating a file != 'foo' shouldn't cause any problem.
+cat > sub3/subsub/Makefile.am <<'END'
+foo-local:
+       echo '%sub3/subsub%' >quux
+MOSTLYCLEANFILES = quux
+END
+
+# No 'foo-local' nor 'foo' target here ...
+: > sub4/Makefile.am
+# ... should not cause errors, nor cause the 'foo-local' target
+# here not to be executed.
+cat > sub4/subsub/Makefile.am <<'END'
+foo-local:
+       echo '=sub4/subsub=' >foo
+MOSTLYCLEANFILES = foo
+END
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE
+
+./configure
+
+$MAKE test
+$MAKE distcheck
+
+:
old mode 100755 (executable)
new mode 100644 (file)
index 8f53b6c..b65a1c0
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2012 Free Software Foundation, Inc.
+# Copyright (C) 2012-2017 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
@@ -17,7 +17,7 @@
 # Test Automake-provided internal make macro $(am__relativize).
 
 am_create_testdir=empty
-. ./defs || Exit 1
+. test-init.sh
 
 plan_ later
 
old mode 100755 (executable)
new mode 100644 (file)
similarity index 74%
rename from t/missing4.sh
rename to t/remake-aclocal-version-mismatch.sh
index 01321c3..c8c90c8
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2006-2012 Free Software Foundation, Inc.
+# Copyright (C) 2006-2017 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
@@ -17,7 +17,7 @@
 # See how well the rebuild rule handles an aclocal.m4 that was
 # generated for another version of autoconf.
 
-. ./defs || Exit 1
+. test-init.sh
 
 echo AC_OUTPUT >>configure.ac
 
@@ -30,18 +30,16 @@ $AUTOMAKE
 $MAKE
 
 sed '1,20 s/m4_defn(\[AC_AUTOCONF_VERSION\]),/9999,/' < aclocal.m4 > aclocal.tmp
-cmp aclocal.m4 aclocal.tmp && Exit 1
+cmp aclocal.m4 aclocal.tmp && exit 1
 
 mv aclocal.tmp aclocal.m4
 
-$MAKE 2>stderr || { cat cat stderr >&2; Exit 1; }
-cat stderr >&2
+run_make -E
 grep 'You have another version of autoconf' stderr
 grep 'aclocal.m4:.*this file was generated for' stderr
 
-$MAKE 2>stderr || { cat cat stderr >&2; Exit 1; }
-cat stderr >&2
-grep 'You have another version of autoconf' stderr && Exit 1
-grep 'aclocal.m4:.*this file was generated for' stderr && Exit 1
+run_make -E
+grep 'You have another version of autoconf' stderr && exit 1
+grep 'aclocal.m4:.*this file was generated for' stderr && exit 1
 
 :
old mode 100755 (executable)
new mode 100644 (file)
similarity index 87%
rename from t/remake9c.sh
rename to t/remake-after-acinclude-m4.sh
index efbec30..5795080
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2010-2012 Free Software Foundation, Inc.
+# Copyright (C) 2010-2017 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
@@ -15,9 +15,9 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 # Test remake rules when acinclude.m4 or its prerequisites change.
-# Keep in sync with the other sister tests 'remake9*.test'.
+# Keep in sync with the other sister tests 'remake-after-*.sh'.
 
-. ./defs || Exit 1
+. test-init.sh
 
 magic1=::MagicStringOne::
 magic2=__MagicStringTwo__
@@ -84,24 +84,24 @@ for vpath in : false; do
   remake_
   $FGREP FINGERPRINT Makefile # For debugging.
   $FGREP $magic1 Makefile
-  test x"`./foo.sh`" = x"$magic1"
+  test x"$(./foo.sh)" = x"$magic1"
 
   $sleep
   echo "echo 'AC_DEFUN([my_fingerprint], [$magic2])'" \
     > $srcdir/tweak-acinclude-m4
   remake_
   $FGREP FINGERPRINT Makefile # For debugging.
-  $FGREP $magic1 Makefile && Exit 1
+  $FGREP $magic1 Makefile && exit 1
   $FGREP $magic2 Makefile
-  test x"`./foo.sh`" = x"$magic2"
+  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
 
old mode 100755 (executable)
new mode 100644 (file)
similarity index 87%
rename from t/remake9d.sh
rename to t/remake-after-aclocal-m4.sh
index dddb083..d955a40
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2010-2012 Free Software Foundation, Inc.
+# Copyright (C) 2010-2017 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
@@ -15,9 +15,9 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 # Test remake rules when aclocal.m4 or its prerequisites change.
-# Keep in sync with the other sister tests 'remake9*.test'.
+# Keep in sync with the other sister tests 'remake-after-*.sh'.
 
-. ./defs || Exit 1
+. test-init.sh
 
 magic1=::MagicStringOne::
 magic2=__MagicStringTwo__
@@ -84,24 +84,24 @@ for vpath in : false; do
   remake_
   $FGREP FINGERPRINT Makefile # For debugging.
   $FGREP $magic1 Makefile
-  test x"`./foo.sh`" = x"$magic1"
+  test x"$(./foo.sh)" = x"$magic1"
 
   $sleep
   echo "sed 's/.*dnl *%%%.*/AC_DEFUN([my_fingerprint], [$magic2])/'" \
     > $srcdir/tweak-aclocal-m4
   remake_
   $FGREP FINGERPRINT Makefile # For debugging.
-  $FGREP $magic1 Makefile && Exit 1
+  $FGREP $magic1 Makefile && exit 1
   $FGREP $magic2 Makefile
-  test x"`./foo.sh`" = x"$magic2"
+  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
 
old mode 100755 (executable)
new mode 100644 (file)
similarity index 86%
rename from t/remake9a.sh
rename to t/remake-after-configure-ac.sh
index 7ee3075..d598f22
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2010-2012 Free Software Foundation, Inc.
+# Copyright (C) 2010-2017 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
@@ -15,9 +15,9 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 # Test remake rules when configure.ac or its prerequisites change.
-# Keep in sync with the other sister tests 'remake9*.test'.
+# Keep in sync with the other sister tests 'remake-after-*.sh'.
 
-. ./defs || Exit 1
+. test-init.sh
 
 magic1=::MagicStringOne::
 magic2=__MagicStringTwo__
@@ -80,16 +80,16 @@ for vpath in : false; do
   remake_
   $FGREP FINGERPRINT Makefile # For debugging.
   $FGREP $magic1 Makefile
-  test x"`./foo.sh`" = x"$magic1"
+  test x"$(./foo.sh)" = x"$magic1"
 
   $sleep
   echo 'sed "s/^\\(FINGERPRINT\\)=.*/\\1='$magic2'/"' \
     > $srcdir/tweak-configure-in
   remake_
   $FGREP FINGERPRINT Makefile # For debugging.
-  $FGREP $magic1 Makefile && Exit 1
+  $FGREP $magic1 Makefile && exit 1
   $FGREP $magic2 Makefile
-  test x"`./foo.sh`" = x"$magic2"
+  test x"$(./foo.sh)" = x"$magic2"
 
   $sleep
   echo cat > $srcdir/tweak-configure-in # Make it a no-op again.
@@ -97,8 +97,8 @@ for vpath in : false; do
   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
 
old mode 100755 (executable)
new mode 100644 (file)
similarity index 87%
rename from t/remake9b.sh
rename to t/remake-after-makefile-am.sh
index cab606e..a758277
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2010-2012 Free Software Foundation, Inc.
+# Copyright (C) 2010-2017 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
@@ -15,9 +15,9 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 # Test remake rules when Makefile.am or its prerequisites change.
-# Keep in sync with the other sister tests 'remake9*.test'.
+# Keep in sync with the other sister tests 'remake-after-*.sh'.
 
-. ./defs || Exit 1
+. test-init.sh
 
 if using_gmake; then
   remake_() { $MAKE nil; }
@@ -82,16 +82,16 @@ for vpath in : false; do
   remake_
   $FGREP FINGERPRINT Makefile # For debugging.
   $FGREP $magic1 Makefile
-  test x"`./foo.sh`" = x"$magic1"
+  test x"$(./foo.sh)" = x"$magic1"
 
   $sleep
   echo 'sed "s/^\\(FINGERPRINT\\) *=.*/\\1 = '$magic2'/"' \
     > $srcdir/tweak-makefile-am
   remake_
   $FGREP FINGERPRINT Makefile # For debugging.
-  $FGREP $magic1 Makefile && Exit 1
+  $FGREP $magic1 Makefile && exit 1
   $FGREP $magic2 Makefile
-  test x"`./foo.sh`" = x"$magic2"
+  test x"$(./foo.sh)" = x"$magic2"
 
   $sleep
   echo cat > $srcdir/tweak-makefile-am # Make it a no-op again.
@@ -99,8 +99,8 @@ for vpath in : false; do
   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
 
old mode 100755 (executable)
new mode 100644 (file)
index f1a85bc..b4e4a9a
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2010-2012 Free Software Foundation, Inc.
+# Copyright (C) 2010-2017 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
@@ -15,9 +15,9 @@
 # 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'.
+# See also sister test 'remake-all-2.sh'.
 
-. ./defs || Exit 1
+. test-init.sh
 
 mkfile=Makefile
 
@@ -45,7 +45,7 @@ $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:
 
old mode 100755 (executable)
new mode 100644 (file)
index 9306532..4d94e8e
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2010-2012 Free Software Foundation, Inc.
+# Copyright (C) 2010-2017 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
@@ -16,9 +16,9 @@
 
 # Check that the "all" target triggers rebuilt of outdated makefiles.
 # This handle the case in which the makefiles are not called 'Makefile'.
-# See also sister test 'remake-all-1.test'.
+# See also sister test 'remake-all-1.sh'.
 
-. ./defs || Exit 1
+. test-init.sh
 
 mkfile=foobar
 
@@ -53,7 +53,7 @@ $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:
 
old mode 100755 (executable)
new mode 100644 (file)
index c567608..3a7695e
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2011-2012 Free Software Foundation, Inc.
+# Copyright (C) 2011-2017 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
@@ -22,7 +22,7 @@
 # big deal in practice (in fact, this test *currently fails*).  Still,
 # keeping the limitation exposed is a good idea anyway.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac <<'END'
 AC_OUTPUT
diff --git a/t/remake-config-status-dependencies.sh b/t/remake-config-status-dependencies.sh
new file mode 100644 (file)
index 0000000..7eeaa26
--- /dev/null
@@ -0,0 +1,70 @@
+#! /bin/sh
+# Copyright (C) 2013-2017 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 CONFIG_STATUS_DEPENDENCIES.
+
+. test-init.sh
+
+cat >> configure.ac <<'END'
+. ${srcdir}/version.sh
+AC_SUBST([EXTRA_VERSION])
+AC_SUBST([CONFIG_STATUS_DEPENDENCIES], ['$(top_srcdir)/version.sh'])
+AC_OUTPUT
+END
+
+echo EXTRA_VERSION=1.0 > version.sh
+
+cat > Makefile.am <<'END'
+.PHONY: test-1 test-2 test-3
+check-local: test-3
+test-1:
+       test $(EXTRA_VERSION) = 1.0
+test-2:
+       test $(EXTRA_VERSION) = 2.1
+test-3:
+       test $(EXTRA_VERSION) = 3.14
+END
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE
+
+./configure
+$MAKE test-1
+
+$sleep
+echo EXTRA_VERSION=2.1 > version.sh
+using_gmake || $MAKE Makefile
+$MAKE test-2
+
+$MAKE distclean
+mkdir build
+cd build
+../configure
+$MAKE test-2
+$sleep
+echo EXTRA_VERSION=3.14 > ../version.sh
+using_gmake || $MAKE Makefile
+$MAKE test-3
+
+# Contents of $(CONFIG_STATUS_DEPENDENCIES) are *not* to be
+# automatically distributed; there is no generic good reason
+# for that.
+$MAKE distdir
+test ! -e $distdir/version.sh
+test -f $distdir/configure || exit 99 # Sanity check.
+
+:
diff --git a/t/remake-configure-dependencies.sh b/t/remake-configure-dependencies.sh
new file mode 100644 (file)
index 0000000..abbee9c
--- /dev/null
@@ -0,0 +1,83 @@
+#! /bin/sh
+# Copyright (C) 2013-2017 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 CONFIGURE_DEPENDENCIES.
+
+. test-init.sh
+
+cat > configure.ac <<'END'
+AC_INIT([confdeps], m4_esyscmd([./print-version]))
+AM_INIT_AUTOMAKE([foreign])
+AC_CONFIG_FILES([Makefile])
+AC_OUTPUT
+END
+
+# Needless to say, the autom4te cache happily break this test.
+cat > .autom4te.cfg <<'END'
+begin-language: "Autoconf-without-aclocal-m4"
+args: --no-cache
+end-language: "Autoconf-without-aclocal-m4"
+END
+
+cat > Makefile.am <<'END'
+EXTRA_DIST = .autom4te.cfg
+CONFIGURE_DEPENDENCIES = $(top_srcdir)/print-version
+
+test-1:
+       test $(VERSION) = 1.0
+test-2:
+       test $(VERSION) = 2.1
+test-3:
+       test $(VERSION) = 3.14
+
+.PHONY: test-1 test-2 test-3
+
+# Contents of $(CONFIGURE_DEPENDENCIES) are to be automatically
+# distributed.
+local-check: test-3 distdir
+       test -f $(distdir)/print-version
+END
+
+(echo '#!/bin/sh' && echo 'printf %s 1.0') > print-version
+chmod a+x print-version
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE
+
+./configure
+$MAKE test-1
+
+$sleep
+(echo '#!/bin/sh' && echo 'printf %s 2.1') > print-version
+using_gmake || $MAKE Makefile
+$MAKE test-2
+
+$MAKE distclean
+mkdir build
+cd build
+../configure
+$MAKE test-2
+
+$sleep
+(echo '#!/bin/sh' && echo 'printf %s 3.14') > ../print-version
+using_gmake || $MAKE Makefile
+$MAKE test-3
+
+# Check that $(CONFIGURE_DEPENDENCIES) are automatically distributed.
+$MAKE distcheck
+
+:
old mode 100755 (executable)
new mode 100644 (file)
similarity index 79%
rename from t/remake11.sh
rename to t/remake-deeply-nested.sh
index b88254f..7351a5a
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2010-2012 Free Software Foundation, Inc.
+# Copyright (C) 2010-2017 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
@@ -19,9 +19,9 @@
 # rules don't break in obvious ways in a slightly "heavier than usual"
 # setup.
 
-. ./defs || Exit 1
+. test-init.sh
 
-ocwd=`pwd` || Exit 1
+ocwd=$(pwd) || fatal_ "getting current working directory"
 
 magic1=::MagicStringOne::
 magic2=__MagicStringTwo__
@@ -30,7 +30,7 @@ echo "AC_SUBST([FOO], [$magic1])" >> configure.ac
 
 echo "@FOO@" > bar.in
 echo "AC_CONFIG_FILES([bar])" >> configure.ac
-d=; unset d # Avoid unduly interferences from the environment.
+unset d # Avoid unduly interferences from the environment.
 for i in 0 1 2 3 4 5 6 7 8 9; do
   d=${d+"$d/"}sub$i
   echo "SUBDIRS = sub$i" > Makefile.am
@@ -43,14 +43,15 @@ done
 echo AC_OUTPUT >> "$ocwd"/configure.ac
 : > Makefile.am
 unset d i
-bottom=`pwd`
+
+bottom=$(pwd) || fatal_ "getting current working directory"
 
 cd "$ocwd"
 
-makefiles_am_list=`find . -name Makefile.am | LC_ALL=C sort`
-makefiles_list=`echo "$makefiles_am_list" | sed 's/\.am$//'`
-bar_in_list=`find . -name bar.in | LC_ALL=C sort`
-bar_list=`echo "$bar_in_list" | sed 's/\.in$//'`
+makefiles_am_list=$(find . -name Makefile.am | LC_ALL=C sort)
+makefiles_list=$(echo "$makefiles_am_list" | sed 's/\.am$//')
+bar_in_list=$(find . -name bar.in | LC_ALL=C sort)
+bar_list=$(echo "$bar_in_list" | sed 's/\.in$//')
 
 cat configure.ac # For debugging.
 
@@ -75,7 +76,7 @@ cd "$ocwd"
 for f in configure config.status $makefiles_list $bar_list; do
   $FGREP "$magic2" $f
 done
-$FGREP "$magic1" configure config.status $makefiles_list $bar_list && Exit 1
+$FGREP "$magic1" configure config.status $makefiles_list $bar_list && exit 1
 
 $MAKE distcheck
 
old mode 100755 (executable)
new mode 100644 (file)
index 1d048be..e2ea711
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2011-2012 Free Software Foundation, Inc.
+# Copyright (C) 2011-2017 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
@@ -18,7 +18,7 @@
 # of the "deleted header problem".  This test checks deeper inclusion
 # stacks, and use VPATH builds.
 
-. ./defs || Exit 1
+. test-init.sh
 
 echo AC_OUTPUT >> configure.ac
 
@@ -60,7 +60,7 @@ echo '# this is baz' > $srcdir/baz.am
 rm -f $srcdir/fnord.am
 $MAKE
 # Sanity checks.
-$FGREP 'you are not seeing this' $srcdir/Makefile.in Makefile && Exit 1
+$FGREP 'you are not seeing this' $srcdir/Makefile.in Makefile && exit 1
 $FGREP 'this is baz' $srcdir/Makefile.in
 $FGREP 'this is baz' Makefile
 
@@ -69,7 +69,7 @@ rm -rf $srcdir/sub $srcdir/foo.am $srcdir/baz.am
 echo '# no more inclusions' > $srcdir/Makefile.am
 $MAKE
 # Sanity checks.
-$EGREP 'this is (foo|bar|baz)' Makefile $srcdir/Makefile.in && Exit 1
+$EGREP 'this is (foo|bar|baz)' Makefile $srcdir/Makefile.in && exit 1
 $FGREP 'no more inclusions' Makefile
 
 :
old mode 100755 (executable)
new mode 100644 (file)
index 3ca8507..9f5dda4
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2011-2012 Free Software Foundation, Inc.
+# Copyright (C) 2011-2017 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
@@ -18,7 +18,7 @@
 # of the "deleted header problem".  This test does the check when the
 # SUBDIRS variable is involved.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac <<'END'
 AC_CONFIG_FILES([sub1/Makefile sub2/Makefile])
@@ -56,7 +56,7 @@ echo '# this is sub1/Makefile.am' > sub1/Makefile.am
 rm -f sub1/bar.am
 $MAKE all
 # Sanity checks.
-$FGREP 'this is bar' sub1/Makefile.in sub1/Makefile && Exit 1
+$FGREP 'this is bar' sub1/Makefile.in sub1/Makefile && exit 1
 $FGREP 'this is sub1/Makefile.am' sub1/Makefile.in
 $FGREP 'this is sub1/Makefile.am' sub1/Makefile
 
@@ -68,7 +68,7 @@ done
 rm -f foo.am
 $MAKE all
 # Sanity checks.
-$FGREP 'this is foo' sub*/Makefile* Makefile* && Exit 1
+$FGREP 'this is foo' sub*/Makefile* Makefile* && exit 1
 for d in . sub1 sub2; do
   $FGREP "this is $d/Makefile.am" $d/Makefile.in
   $FGREP "this is $d/Makefile.am" $d/Makefile
old mode 100755 (executable)
new mode 100644 (file)
index 4bd77d6..cc53630
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2011-2012 Free Software Foundation, Inc.
+# Copyright (C) 2011-2017 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
@@ -17,7 +17,7 @@
 # Check that inclusion of '.am' fragments by automake does not suffer
 # of the "deleted header problem".  Basic checks are done here.
 
-. ./defs || Exit 1
+. test-init.sh
 
 echo AC_OUTPUT >> configure.ac
 
@@ -49,7 +49,7 @@ mv -f t Makefile.am
 rm -f foo.am
 $MAKE Makefile
 # Sanity checks.
-$FGREP 'this is foo' Makefile.in Makefile && Exit 1
+$FGREP 'this is foo' Makefile.in Makefile && exit 1
 $FGREP 'this is bar' Makefile.in
 $FGREP 'this is bar' Makefile
 $FGREP 'this is baz' Makefile.in
@@ -62,6 +62,6 @@ $MAKE Makefile
 # Sanity checks.
 $FGREP 'empty empty' Makefile.in
 $FGREP 'empty empty' Makefile
-grep 'this is ba[rz]' Makefile Makefile.in && Exit 1
+grep 'this is ba[rz]' Makefile Makefile.in && exit 1
 
 :
old mode 100755 (executable)
new mode 100644 (file)
index 975d503..9d25473
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2011-2012 Free Software Foundation, Inc.
+# Copyright (C) 2011-2017 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
 # Test remake rules when an m4 file gets removed and the macros it
 # defined get inlined into the caller.  Try with both an indirect
 # call and a direct one.  This can be seen as testing the "deleted
-# header file" issue w.r.t. aclocal.m4 dependencies.  See also related
-# test 'acloca22.test'.
+# header file" issue w.r.t. aclocal.m4 dependencies.  See also
+# related test 'aclocal-deleted-header.sh'.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac <<'END'
 FOO_MACRO
old mode 100755 (executable)
new mode 100644 (file)
similarity index 87%
rename from t/remake7.sh
rename to t/remake-fail.sh
index fbd15e6..ed1b64c
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2008-2012 Free Software Foundation, Inc.
+# Copyright (C) 2008-2017 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
@@ -16,7 +16,7 @@
 
 # Make sure remaking rules fail when they should.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_CONFIG_FILES([sub/Makefile])
@@ -40,30 +40,30 @@ $sleep
 # Fail for broken input files.
 
 echo "if FOO" > sub/Makefile.am
-$MAKE && Exit 1
+$MAKE && exit 1
 
 : >sub/Makefile.am
 $MAKE
 
 mv Makefile.am backup
 echo "if FOO" > Makefile.am
-$MAKE && Exit 1
+$MAKE && exit 1
 
 # Fail for missing input files, with or without missing
 # Makefile.in files.
 
 cp backup Makefile.am
 mv sub/Makefile.am sub/backup
-$MAKE && Exit 1
+$MAKE && exit 1
 
 rm -f sub/Makefile.in
-$MAKE && Exit 1
+$MAKE && exit 1
 
 mv sub/backup sub/Makefile.am
 rm -f Makefile.am
-$MAKE && Exit 1
+$MAKE && exit 1
 
 rm -f Makefile.in
-$MAKE && Exit 1
+$MAKE && exit 1
 
 :
old mode 100755 (executable)
new mode 100644 (file)
index 23a02bc..adb8d25
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2011-2012 Free Software Foundation, Inc.
+# Copyright (C) 2011-2017 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
@@ -22,7 +22,7 @@
 # for more info).
 
 required=cc
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac <<'END'
 AC_PROG_CC
old mode 100755 (executable)
new mode 100644 (file)
index 97f0c03..06fa62a
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2011-2012 Free Software Foundation, Inc.
+# Copyright (C) 2011-2017 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
@@ -22,7 +22,7 @@
 # for more info).
 
 required=cc
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac <<'END'
 AC_CONFIG_HEADERS([config.h])
@@ -89,7 +89,7 @@ $AUTOCONF
 
 $MAKE
 ls -l
-test ! -f stdio.h
+test ! -e stdio.h
 # Also try our build rules in a VPATH build.
 $MAKE distcheck
 
old mode 100755 (executable)
new mode 100644 (file)
index 04f3410..0bf326e
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2011-2012 Free Software Foundation, Inc.
+# Copyright (C) 2011-2017 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
@@ -23,7 +23,7 @@
 # for more info).
 
 required=cc
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac <<'END'
 AC_CONFIG_HEADERS([config.h])
@@ -114,7 +114,7 @@ for vpath in : false; do
   using_gmake || $MAKE Makefile
   $MAKE
   ls -l
-  test ! -f stdio.h
+  test ! -e stdio.h
 
   # And now simulate that we want our custom stdio.h back.
 
old mode 100755 (executable)
new mode 100644 (file)
similarity index 80%
rename from t/remake10c.sh
rename to t/remake-include-aclocal.sh
index dfb43f4..6d476dc
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2010-2012 Free Software Foundation, Inc.
+# Copyright (C) 2010-2017 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 # Test remake rules for m4 files included (also recursively) by
-# aclocal.m4.
-# Keep in sync with sister tests 'remake10a.test' and 'remake10b.test'.
+# aclocal.m4.  Keep in sync with sister tests:
+#   - remake-include-configure.sh
+#   - remake-include-makefile.sh
 
-. ./defs || Exit 1
+. test-init.sh
 
 magic1=::MagicStringOne::
 magic2=__MagicStringTwo__
@@ -31,13 +32,13 @@ else
 fi
 
 cat >> configure.ac <<END
+AC_CONFIG_MACRO_DIR([m4])
 FINGERPRINT='my_fingerprint'
 AC_SUBST([FINGERPRINT])
 AC_OUTPUT
 END
 
 cat > Makefile.am <<'END'
-ACLOCAL_AMFLAGS = -I m4
 .PHONY: nil
 nil:
 ## Used by "make distcheck" later.
@@ -50,7 +51,7 @@ END
 mkdir m4
 echo 'AC_DEFUN([my_fingerprint], [BadBadBad])' > m4/foo.m4
 
-$ACLOCAL -I m4
+$ACLOCAL
 $AUTOCONF
 $AUTOMAKE
 
@@ -77,7 +78,7 @@ for vpath in : false; do
   echo "AC_DEFUN([my_fingerprint], [$magic2])" > $top_srcdir/m4/foo.m4
   $remake
   $FGREP FINGERPRINT Makefile # For debugging.
-  $FGREP $magic1 Makefile && Exit 1
+  $FGREP $magic1 Makefile && exit 1
   $FGREP $magic2 Makefile
 
   $sleep
@@ -85,15 +86,15 @@ for vpath in : false; do
   echo "AC_DEFUN([my_fingerprint], [$magic3])" > $top_srcdir/m4/bar.m4
   $remake
   $FGREP FINGERPRINT Makefile # For debugging.
-  $FGREP $magic1 Makefile && Exit 1
-  $FGREP $magic2 Makefile && Exit 1
+  $FGREP $magic1 Makefile && exit 1
+  $FGREP $magic2 Makefile && exit 1
   $FGREP $magic3 Makefile
 
   $sleep
   echo "AC_DEFUN([my_fingerprint], [$magic1])" > $top_srcdir/m4/bar.m4
   $remake
-  $FGREP $magic2 Makefile && Exit 1
-  $FGREP $magic3 Makefile && Exit 1
+  $FGREP $magic2 Makefile && exit 1
+  $FGREP $magic3 Makefile && exit 1
   $FGREP $magic1 Makefile
 
   $sleep
@@ -101,9 +102,9 @@ for vpath in : false; do
   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
 
old mode 100755 (executable)
new mode 100644 (file)
similarity index 81%
rename from t/remake10a.sh
rename to t/remake-include-configure.sh
index 358554f..58c81de
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2010-2012 Free Software Foundation, Inc.
+# Copyright (C) 2010-2017 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 # Test remake rules for m4 files included (also recursively) by
-# configure.ac.
-# Keep in sync with sister tests 'remake10b.test' and 'remake10c.test'.
+# configure.ac.  Keep in sync with sister tests:
+#   - remake-include-aclocal.sh
+#   - remake-include-makefile.sh
 
-. ./defs || Exit 1
+. test-init.sh
 
 magic1=::MagicStringOne::
 magic2=__MagicStringTwo__
@@ -75,7 +76,7 @@ for vpath in : false; do
   echo "m4_define([my_fingerprint], [$magic2])" > $top_srcdir/foo.m4
   $remake
   $FGREP FINGERPRINT Makefile # For debugging.
-  $FGREP $magic1 Makefile && Exit 1
+  $FGREP $magic1 Makefile && exit 1
   $FGREP $magic2 Makefile
 
   $sleep
@@ -83,24 +84,24 @@ for vpath in : false; do
   echo "m4_define([my_fingerprint], [$magic3])" > $top_srcdir/bar.m4
   $remake
   $FGREP FINGERPRINT Makefile # For debugging.
-  $FGREP $magic1 Makefile && Exit 1
-  $FGREP $magic2 Makefile && Exit 1
+  $FGREP $magic1 Makefile && exit 1
+  $FGREP $magic2 Makefile && exit 1
   $FGREP $magic3 Makefile
 
   $sleep
   echo "m4_define([my_fingerprint], [$magic1])" > $top_srcdir/bar.m4
   $remake
-  $FGREP $magic2 Makefile && Exit 1
-  $FGREP $magic3 Makefile && Exit 1
+  $FGREP $magic2 Makefile && exit 1
+  $FGREP $magic3 Makefile && exit 1
   $FGREP $magic1 Makefile
 
   $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
 
old mode 100755 (executable)
new mode 100644 (file)
similarity index 80%
rename from t/remake10b.sh
rename to t/remake-include-makefile.sh
index 9eeeb9d..c551d72
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2010-2012 Free Software Foundation, Inc.
+# Copyright (C) 2010-2017 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 # Test remake rules for am files included (also recursively) by
-# Makefile.am.
-# Keep in sync with sister tests 'remake10a.test' and 'remake10c.test'.
+# Makefile.am.  Keep in sync with sister tests:
+#   - remake-include-aclocal.sh
+#   - remake-include-configure.sh
 
-. ./defs || Exit 1
+
+. test-init.sh
 
 magic1=::MagicStringOne::
 magic2=__MagicStringTwo__
@@ -74,7 +76,7 @@ for vpath in : false; do
   echo "FINGERPRINT = $magic2" > $top_srcdir/foo.am
   $remake
   $FGREP FINGERPRINT Makefile # For debugging.
-  $FGREP $magic1 Makefile && Exit 1
+  $FGREP $magic1 Makefile && exit 1
   $FGREP $magic2 Makefile
 
   $sleep
@@ -82,24 +84,24 @@ for vpath in : false; do
   echo "FINGERPRINT = $magic3" > $top_srcdir/bar.am
   $remake
   $FGREP FINGERPRINT Makefile # For debugging.
-  $FGREP $magic1 Makefile && Exit 1
-  $FGREP $magic2 Makefile && Exit 1
+  $FGREP $magic1 Makefile && exit 1
+  $FGREP $magic2 Makefile && exit 1
   $FGREP $magic3 Makefile
 
   $sleep
   echo "FINGERPRINT = $magic1" > $top_srcdir/bar.am
   $remake
-  $FGREP $magic2 Makefile && Exit 1
-  $FGREP $magic3 Makefile && Exit 1
+  $FGREP $magic2 Makefile && exit 1
+  $FGREP $magic3 Makefile && exit 1
   $FGREP $magic1 Makefile
 
   $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
 
old mode 100755 (executable)
new mode 100644 (file)
index 09a2a4c..c7fb285
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2011-2012 Free Software Foundation, Inc.
+# Copyright (C) 2011-2017 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
@@ -22,7 +22,7 @@
 # big deal in practice (in fact, this test *currently fails*).  Still,
 # keeping the limitation exposed is a good idea anyway.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac <<'END'
 m4_include([foobar.m4])
diff --git a/t/remake-macrodir.sh b/t/remake-macrodir.sh
new file mode 100644 (file)
index 0000000..2c1f925
--- /dev/null
@@ -0,0 +1,83 @@
+#! /bin/sh
+# Copyright (C) 2012-2017 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 aclocal honouring of AC_CONFIG_MACRO_DIR interacts
+# nicely with automatic rebuild rules.
+
+. test-init.sh
+
+cat >> configure.ac <<'END'
+AC_CONFIG_MACRO_DIR([macro-dir])
+my__FOO || AS_EXIT([1])
+AC_OUTPUT
+END
+
+: > Makefile.am
+
+mkdir macro-dir
+cat > macro-dir/foo.m4 <<'END'
+AC_DEFUN([my__FOO], [: > bar])
+END
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE
+
+$FGREP my__FOO configure && exit 1
+
+./configure
+test -f bar
+rm -f bar
+
+$sleep
+
+cat > macro-dir/foo.m4 <<'END'
+AC_DEFUN([my__FOO], [: > baz])
+END
+
+$MAKE Makefile
+test -f baz
+test ! -r bar
+rm -f baz
+
+$sleep
+
+rm -f macro-dir/foo.m4
+cat > macro-dir/quux.m4 <<'END'
+AC_DEFUN([my__FOO], [: > quux])
+END
+
+$MAKE Makefile
+test -f quux
+test ! -r baz
+rm -f quux
+
+$sleep
+
+sed 's/^AC_CONFIG_MACRO_DIR/&([newdir])/' configure.ac > t
+mv -f t configure.ac
+
+mkdir newdir
+cat > newdir/mu.m4 <<'END'
+AC_DEFUN([my__FOO], [[: my__FOO do nothing]])
+END
+
+$MAKE Makefile
+$FGREP ': my__FOO do nothing' configure
+
+$MAKE distcheck
+
+:
old mode 100755 (executable)
new mode 100644 (file)
similarity index 93%
rename from t/remake5.sh
rename to t/remake-maintainer-mode.sh
index dba802a..afd2c12
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2003-2012 Free Software Foundation, Inc.
+# Copyright (C) 2003-2017 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
@@ -18,7 +18,7 @@
 # but not all.
 # Report from Ralf Corsepius.
 
-. ./defs || Exit 1
+. test-init.sh
 
 if using_gmake; then
   remake="$MAKE"
@@ -65,7 +65,7 @@ grep 'AUTOCONF.*=.*false' Makefile
 : > rebuild_ok
 ./configure --no-create
 $remake
-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
old mode 100755 (executable)
new mode 100644 (file)
similarity index 85%
rename from t/remake8a.sh
rename to t/remake-makefile-intree.sh
index 1b32a5e..990f113
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2010-2012 Free Software Foundation, Inc.
+# Copyright (C) 2010-2017 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
 # This testcase checks dependency of generated Makefile from Makefile.am,
 # configure.ac, acinclude.m4, aclocal.m4, and extra m4 files considered
 # by aclocal.
-# Keep this in sync with sister test 'remake8b.test', which performs the
-# same checks for a VPATH build.
+# Keep this in sync with sister test 'remake-makefile-vpath.sh', which
+# performs the same checks for a VPATH build.
 
-. ./defs || Exit 1
+. test-init.sh
 
 mv -f configure.ac configure.stub
 
@@ -43,7 +43,7 @@ $ACLOCAL
 $AUTOCONF
 $AUTOMAKE
 
-srcdir='.' # To make syncing with remake8b.test easier.
+srcdir='.' # To make syncing with remake-makefile-vpath.sh easier.
 
 $srcdir/configure
 
@@ -74,7 +74,7 @@ using_gmake || $MAKE Makefile
 $MAKE
 cat bar
 grep '!Baz!' bar
-test ! -r foo
+test ! -e foo
 $MAKE distcheck
 
 rm -f bar
@@ -105,34 +105,34 @@ using_gmake || $MAKE Makefile
 $MAKE
 cat quux
 grep '!Zardoz!' quux
-test ! -r bar
+test ! -e bar
 $MAKE distcheck
 
 rm -f quux
 
-# Modify Makefile.am to add a directory of extra m4 files
-# considered by aclocal.
+# Modify configure.ac and aclocal.m4 to add a directory of extra m4
+# files considered by aclocal.  Also update checks in Makefile.am.
+# Note that we won't use this new directory of extra m4 files in the
+# first rebuild below (but we will in the second).
 
 $sleep
 
 mkdir $srcdir/m4
 
 cat > $srcdir/Makefile.am <<'END'
-ACLOCAL_AMFLAGS = -I m4
+all-local: quux
 check-local:
        cat quux
        grep '%Foo%' quux
        test x'$(QUUX)' = x'%Foo%'
 END
 
-$MAKE # This should place aclocal flags in Makefile.
-grep '.*-I m4' Makefile # Sanity check.
-
 # Modify configure.ac and aclocal.m4.
 
 $sleep
 
 cat $srcdir/configure.stub - > $srcdir/configure.ac <<'END'
+AC_CONFIG_MACRO_DIR([m4])
 AC_CONFIG_FILES([quux])
 MY_CUSTOM_MACRO
 AC_OUTPUT
old mode 100755 (executable)
new mode 100644 (file)
similarity index 85%
rename from t/remake8b.sh
rename to t/remake-makefile-vpath.sh
index 5f687ba..5963290
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2010-2012 Free Software Foundation, Inc.
+# Copyright (C) 2010-2017 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
 # This testcase checks dependency of generated Makefile from Makefile.am,
 # configure.ac, acinclude.m4, aclocal.m4, and extra m4 files considered
 # by aclocal.
-# Keep this in sync with sister test 'remake8a.test', which performs the
-# same checks for a in-tree build.
+# Keep this in sync with sister test 'remake-makefile-instree.sh', which
+# performs the same checks for a in-tree build.
 
-. ./defs || Exit 1
+. test-init.sh
 
 mv -f configure.ac configure.stub
 
@@ -45,7 +45,7 @@ $AUTOMAKE
 
 mkdir build
 cd build
-srcdir='..' # To make syncing with remake8a.test easier.
+srcdir='..' # To make syncing with remake-makefile-intree.sh easier.
 
 $srcdir/configure
 
@@ -76,7 +76,7 @@ using_gmake || $MAKE Makefile
 $MAKE
 cat bar
 grep '!Baz!' bar
-test ! -r foo
+test ! -e foo
 $MAKE distcheck
 
 rm -f bar
@@ -107,34 +107,34 @@ using_gmake || $MAKE Makefile
 $MAKE
 cat quux
 grep '!Zardoz!' quux
-test ! -r bar
+test ! -e bar
 $MAKE distcheck
 
 rm -f quux
 
-# Modify Makefile.am to add a directory of extra m4 files
-# considered by aclocal.
+# Modify configure.ac and aclocal.m4 to add a directory of extra m4
+# files considered by aclocal.  Also update checks in Makefile.am.
+# Note that we won't use this new directory of extra m4 files in the
+# first rebuild below (but we will in the second).
 
 $sleep
 
 mkdir $srcdir/m4
 
 cat > $srcdir/Makefile.am <<'END'
-ACLOCAL_AMFLAGS = -I m4
+all-local: quux
 check-local:
        cat quux
        grep '%Foo%' quux
        test x'$(QUUX)' = x'%Foo%'
 END
 
-$MAKE # This should place aclocal flags in Makefile.
-grep '.*-I m4' Makefile # Sanity check.
-
 # Modify configure.ac and aclocal.m4.
 
 $sleep
 
 cat $srcdir/configure.stub - > $srcdir/configure.ac <<'END'
+AC_CONFIG_MACRO_DIR([m4])
 AC_CONFIG_FILES([quux])
 MY_CUSTOM_MACRO
 AC_OUTPUT
old mode 100755 (executable)
new mode 100644 (file)
similarity index 94%
rename from t/remake12.sh
rename to t/remake-mild-stress.sh
index 73d85d5..e5d88a2
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2010-2012 Free Software Foundation, Inc.
+# Copyright (C) 2010-2017 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
@@ -17,7 +17,7 @@
 # Test basic remake rules for Makefiles with non-default names
 # and/or with multiple sources.
 
-. ./defs || Exit 1
+. test-init.sh
 
 magic1=::MagicStringOne::
 magic2=__MagicStringTwo__
@@ -108,7 +108,7 @@ else
   $MAKE zardoz
 fi
 $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
 
@@ -126,10 +126,10 @@ 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.
old mode 100755 (executable)
new mode 100644 (file)
index d5a1263..629efa0
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2011-2012 Free Software Foundation, Inc.
+# Copyright (C) 2011-2017 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
@@ -17,7 +17,7 @@
 # Test remake rules when m4 files get moved among different "include
 # dirs" (i.e. those passed to aclocal with '-I' option).
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac <<'END'
 MY_MACRO
@@ -55,9 +55,9 @@ $MAKE test
 $MAKE distdir
 ls -l $distdir $distdir/*
 test -f $distdir/d2/foo.m4
-test ! -f $distdir/d1/foo.m4
+test ! -e $distdir/d1/foo.m4
 test -f $distdir/d1/macros.m4
-test ! -f $distdir/d2/macros.m4
+test ! -e $distdir/d2/macros.m4
 
 # Move both files at once.
 mv d1/macros.m4 d3/macros.m4
@@ -68,9 +68,9 @@ $MAKE distdir
 ls -l $distdir $distdir/*
 test -f $distdir/d3/foo.m4
 test -f $distdir/d3/macros.m4
-test ! -f $distdir/d1/foo.m4
-test ! -f $distdir/d2/foo.m4
-test ! -f $distdir/d1/macros.m4
-test ! -f $distdir/d2/macros.m4
+test ! -e $distdir/d1/foo.m4
+test ! -e $distdir/d2/foo.m4
+test ! -e $distdir/d1/macros.m4
+test ! -e $distdir/d2/macros.m4
 
 :
old mode 100755 (executable)
new mode 100644 (file)
similarity index 94%
rename from t/remake4.sh
rename to t/remake-not-after-make-dist.sh
index 43f8569..d8a5b5b
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2003-2012 Free Software Foundation, Inc.
+# Copyright (C) 2003-2017 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
@@ -25,7 +25,7 @@
 #
 # Report from Akim Demaille.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat >>configure.ac <<'EOF'
 # Rebuild rule are ok until make dist, but not afterwards.
diff --git a/t/remake-recurs-user.sh b/t/remake-recurs-user.sh
new file mode 100644 (file)
index 0000000..b8b60bb
--- /dev/null
@@ -0,0 +1,89 @@
+#! /bin/sh
+# Copyright (C) 2012-2017 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/>.
+
+# Remake rules and user-defined recursive rules.
+
+. test-init.sh
+
+cat >> configure.ac << 'END'
+m4_include([extra-targets.m4])
+AC_CONFIG_FILES([sub/Makefile])
+AC_OUTPUT
+END
+
+echo 'AM_EXTRA_RECURSIVE_TARGETS([foo])' > extra-targets.m4
+
+cat > Makefile.am << 'END'
+SUBDIRS = sub
+all-local: foo
+foo-local:
+       : > foo
+bar-local:
+       : > bar
+MOSTLYCLEANFILES = foo
+END
+
+mkdir sub
+cat > sub/Makefile.am << 'END'
+foo-local:
+       : > foo2
+MOSTLYCLEANFILES = foo2
+bar-local: later-target
+END
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE
+
+./configure
+
+$MAKE
+test -f foo
+test -f sub/foo2
+test ! -f bar
+test ! -f sub/zardoz
+$MAKE distcheck
+
+$sleep
+
+echo 'AM_EXTRA_RECURSIVE_TARGETS([bar])' >> extra-targets.m4
+
+cat >> Makefile.am <<'END'
+MOSTLYCLEANFILES += bar oof
+all-local: bar
+foo-local: oof
+oof:
+       : > $@
+END
+
+echo 'include $(srcdir)/more.am' >> sub/Makefile.am
+
+cat > sub/more.am << 'END'
+later-target:
+       : > zardoz
+DISTCLEANFILES = zardoz
+END
+
+using_gmake || $MAKE Makefile
+$MAKE
+test -f foo
+test -f oof
+test -f sub/foo2
+test -f bar
+test -f sub/zardoz
+$MAKE distcheck
+
+:
old mode 100755 (executable)
new mode 100644 (file)
index f1106f4..7f0e200
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2011-2012 Free Software Foundation, Inc.
+# Copyright (C) 2011-2017 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
@@ -18,7 +18,7 @@
 # of the "deleted header problem".  This test checks that we can rename
 # an included .am file without confusing the remake rules.
 
-. ./defs || Exit 1
+. test-init.sh
 
 echo AC_OUTPUT >> configure.ac
 
@@ -44,7 +44,7 @@ rm -f has-run-1
 mv -f foo.am bar.am
 echo include bar.am > Makefile.am
 $MAKE Makefile
-$FGREP 'foo.am' Makefile Makefile.in && Exit 1
+$FGREP 'foo.am' Makefile Makefile.in && exit 1
 
 $sleep
 rm -f has-run-1 bar.am
@@ -52,7 +52,7 @@ echo 'all-local:; echo ok > has-run-2' > zardoz.am
 echo 'include $(srcdir)/zardoz.am' > Makefile.am
 using_gmake || $MAKE Makefile
 $MAKE
-test ! -f has-run-1
+test ! -e has-run-1
 test -f has-run-2
 
 :
old mode 100755 (executable)
new mode 100644 (file)
index 87721f5..9adb3ac
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2011-2012 Free Software Foundation, Inc.
+# Copyright (C) 2011-2017 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
@@ -16,7 +16,7 @@
 
 # Test remake rules when m4 files get renamed.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac <<'END'
 MY_MACRO
@@ -55,7 +55,7 @@ $MAKE test
 $MAKE distdir
 ls -l $distdir $distdir/*
 test -f $distdir/m4/bar.m4
-test ! -f $distdir/m4/foo.m4
+test ! -e $distdir/m4/foo.m4
 
 mv m4/macros.m4 m4/defs.m4
 using_gmake || $MAKE Makefile
@@ -63,7 +63,7 @@ $MAKE test
 $MAKE distdir
 ls -l $distdir $distdir/*
 test -f $distdir/m4/defs.m4
-test ! -f $distdir/m4/macros.m4
+test ! -e $distdir/m4/macros.m4
 
 # Rename both files at once.
 
@@ -75,9 +75,9 @@ $MAKE distdir
 ls -l $distdir $distdir/*
 test -f $distdir/m4/quux.m4
 test -f $distdir/acinclude.m4
-test ! -f $distdir/m4/foo.m4
-test ! -f $distdir/m4/bar.m4
-test ! -f $distdir/m4/macros.m4
-test ! -f $distdir/m4/defs.m4
+test ! -e $distdir/m4/foo.m4
+test ! -e $distdir/m4/bar.m4
+test ! -e $distdir/m4/macros.m4
+test ! -e $distdir/m4/defs.m4
 
 :
old mode 100755 (executable)
new mode 100644 (file)
index 9f80b31..d9b3262
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2011-2012 Free Software Foundation, Inc.
+# Copyright (C) 2011-2017 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
@@ -16,9 +16,9 @@
 
 # Test remake rules when an m4 file gets renamed and *simultaneously*
 # an m4 macro in it gets renamed.  Kudos to Bruno Haible for thinking
-# about this situation.  See also related test 'acloca22.test'.
+# about this situation.  See also related test 'aclocal-deleted-header.sh'.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac <<'END'
 MY_MACRO
@@ -62,7 +62,7 @@ $MAKE distdir
 ls -l $distdir $distdir/*
 test -f $distdir/m4/bar.m4
 test -f $distdir/m4/macros.m4
-test ! -f $distdir/m4/foo.m4
+test ! -e $distdir/m4/foo.m4
 
 # Rename both at once.
 
@@ -80,7 +80,7 @@ $MAKE distdir
 ls -l $distdir $distdir/*
 test -f $distdir/m4/quux.m4
 test -f $distdir/m4/defs.m4
-test ! -f $distdir/m4/bar.m4
-test ! -f $distdir/m4/macros.m4
+test ! -e $distdir/m4/bar.m4
+test ! -e $distdir/m4/macros.m4
 
 :
old mode 100755 (executable)
new mode 100644 (file)
index 5ec71d6..189a6fa
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2011-2012 Free Software Foundation, Inc.
+# Copyright (C) 2011-2017 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
@@ -17,7 +17,7 @@
 # Test remake rules when the name of an m4 macro change.  Try both with
 # and without indirection.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac <<'END'
 MY_MACRO
old mode 100755 (executable)
new mode 100644 (file)
index a5053e0..977b66e
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2009-2012 Free Software Foundation, Inc.
+# Copyright (C) 2009-2017 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
 
 # Check that remake rules works for adding a new subdirectory from a
 # pre-existing subdirectory.
-# See also the other similar tests 'remake-subdir*.test', and the
-# related test 'aclocal5.test'.
+# See also the other similar tests 'remake-subdir*.sh', and the
+# related test 'aclocal5.sh'.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac <<'END'
 m4_include([subdirs.m4])
old mode 100755 (executable)
new mode 100644 (file)
index 116790f..19b35a0
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2011-2012 Free Software Foundation, Inc.
+# Copyright (C) 2011-2017 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
 # Check that remake rules works from subdirectories, even using
 # 'GNUmakefile' as makefiles name.  This obviously requires GNU
 # make.
-# See also the other similar tests 'remake-subdir*.test', and the
-# related test 'aclocal5.test'
+# See also the other similar tests 'remake-subdir*.sh', and the
+# related test 'aclocal5.sh'
 
 required=GNUmake
-. ./defs || Exit 1
+. test-init.sh
 
 magic1='::MagicString::One::'
 magic2='__MagicString__Two__'
@@ -74,7 +74,7 @@ cd ..
 debug_info
 $FGREP $magic2 sub/GNUmakefile
 $FGREP $magic2 sub/GNUmakefile.in
-$FGREP $magic1 sub/GNUmakefile sub/GNUmakefile.in && Exit 1
-$FGREP $magic2 GNUmakefile GNUmakefile.in && Exit 1
+$FGREP $magic1 sub/GNUmakefile sub/GNUmakefile.in && exit 1
+$FGREP $magic2 GNUmakefile GNUmakefile.in && exit 1
 
 :
old mode 100755 (executable)
new mode 100644 (file)
similarity index 83%
rename from t/remake.sh
rename to t/remake-subdir-grepping.sh
index 620d5f8..bce74c7
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 1996-2012 Free Software Foundation, Inc.
+# Copyright (C) 1996-2017 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
@@ -16,9 +16,9 @@
 
 # Weak "grepping" test trying to ensure that remaking rules in a subdir
 # are correctly generated.
-# See also sister functional test 'remake1a.test'.
+# See also sister functional test 'remake-subdir-only.sh'.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat > configure.ac <<END
 AC_INIT([$me], [1.0])
@@ -34,5 +34,6 @@ $ACLOCAL
 $AUTOMAKE
 
 grep '^Makefile' sub/Makefile.in
+grep '\$(AUTOMAKE).* sub/Makefile' sub/Makefile.in
 
 :
old mode 100755 (executable)
new mode 100644 (file)
index 8f31740..b6937b0
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2011-2012 Free Software Foundation, Inc.
+# Copyright (C) 2011-2017 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
@@ -21,7 +21,7 @@
 # an explicit delay in the build process.
 # Suggestion by Ralf Wildenhues.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat > configure.ac <<END
 AC_INIT([$me], [1.0])
@@ -38,7 +38,7 @@ mkdir sub
 # Both aclocal and automake are expected to run one and just one time.
 # Create and use wrappers that will verify that.
 
-ocwd=`pwd` || fatal_ "cannot get current working directory"
+ocwd=$(pwd) || fatal_ "cannot get current working directory"
 
 mkdir bin
 
@@ -93,14 +93,14 @@ rm -f automake-has-run aclocal-has-run
 
 ./configure
 # Sanity check: Makefile doesn't get updated uselessly.
-ACLOCAL=false AUTOMAKE=false AUTOCONF=false $MAKE -e
+run_make ACLOCAL=false AUTOMAKE=false AUTOCONF=false
 
 $sleep
 sed "s|magic|magic2|" configure.ac > t
 mv -f t configure.ac
 
 cd sub
-AUTOMAKE="$AUTOMAKE" ACLOCAL="$ACLOCAL" $MAKE -e Makefile
+run_make Makefile AUTOMAKE="$AUTOMAKE" ACLOCAL="$ACLOCAL"
 cd ..
 
 # For debugging.
old mode 100755 (executable)
new mode 100644 (file)
similarity index 92%
rename from t/remake3a.sh
rename to t/remake-subdir-no-makefile.sh
index cac2abc..7ec1902
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2010-2012 Free Software Foundation, Inc.
+# Copyright (C) 2010-2017 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
@@ -16,9 +16,8 @@
 
 # Ensure that remake rules work for files in a subdirectory even when
 # there is no Makefile for that subdirectory.
-# See also sister "grepping" test 'remake3.test'.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_CONFIG_FILES([sub/foo])
old mode 100755 (executable)
new mode 100644 (file)
similarity index 89%
rename from t/remake1a.sh
rename to t/remake-subdir-only.sh
index fede092..ad625d3
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2010-2012 Free Software Foundation, Inc.
+# Copyright (C) 2010-2017 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
@@ -15,9 +15,9 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 # Make sure remaking rules in subdir are correctly generated.
-# See also sister "grepping" test 'remake.test'.
+# See also sister "grepping" test 'remake-subdir-grepping.sh'.
 
-. ./defs || Exit 1
+. test-init.sh
 
 fingerprint='=/FiNgErPrInT/='
 
@@ -47,7 +47,7 @@ $MAKE Makefile
 cd ..
 # Check that no spurious Makefile has been created in the
 # top-level directory.
-test ! -r Makefile
+test ! -e Makefile
 # Check that the Makefile in the subdirectory has been properly
 # updated.
 $FGREP "$fingerprint" sub/Makefile
old mode 100755 (executable)
new mode 100644 (file)
index eb21f38..eb85d9a
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2011-2012 Free Software Foundation, Inc.
+# Copyright (C) 2011-2017 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
 
 # Check that remake rules works from subdirectories, even with non-GNU
 # make implementations.
-# See also the other similar tests 'remake-subdir*.test', and the
-# related test 'aclocal5.test'.
+# See also the other similar tests 'remake-subdir*.sh', and the
+# related test 'aclocal5.sh'.
 
-. ./defs || Exit 1
+. test-init.sh
 
 if using_gmake; then
   remake=$MAKE
@@ -75,7 +75,7 @@ cd ..
 debug_info
 $FGREP $magic2 sub/Makefile
 $FGREP $magic2 sub/Makefile.in
-$FGREP $magic1 sub/Makefile sub/Makefile.in && Exit 1
-$FGREP $magic2 Makefile Makefile.in && Exit 1
+$FGREP $magic1 sub/Makefile sub/Makefile.in && exit 1
+$FGREP $magic2 Makefile Makefile.in && exit 1
 
 :
old mode 100755 (executable)
new mode 100644 (file)
index 0a5665d..d62f225
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2011-2012 Free Software Foundation, Inc.
+# Copyright (C) 2011-2017 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
 
 # Check that remake rules works from subdirectories, even when makefiles
 # are not named "Makefile".
-# See also the other similar tests 'remake-subdir*.test', and the
-# related test 'aclocal5.test'.
+# See also the other similar tests 'remake-subdir*.sh', and the
+# related test 'aclocal5.sh'.
 
-. ./defs || Exit 1
+. test-init.sh
 
 magic1='::MagicString::One::'
 magic2='__MagicString__Two__'
@@ -76,7 +76,7 @@ cd ..
 debug_info
 $FGREP $magic2 sub/build.mk
 $FGREP $magic2 sub/build.in
-$FGREP $magic1 sub/build.in sub/build.mk && Exit 1
-$FGREP $magic2 build.in build.mk && Exit 1
+$FGREP $magic1 sub/build.in sub/build.mk && exit 1
+$FGREP $magic2 build.in build.mk && exit 1
 
 :
old mode 100755 (executable)
new mode 100644 (file)
similarity index 73%
rename from t/remake6.sh
rename to t/remake-subdir3.sh
index c48c1b8..0b51db7
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2008-2012 Free Software Foundation, Inc.
+# Copyright (C) 2008-2017 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
@@ -16,7 +16,7 @@
 
 # Make sure remaking rules work when subdir Makefile.in has been removed.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_CONFIG_FILES([sub/Makefile])
@@ -35,30 +35,28 @@ $AUTOCONF
 ./configure
 $MAKE
 
+do_check ()
+{
+  run_make -O
+  test $(grep -c "/missing " stdout) -eq 1
+}
+
 # Now, we are set up.  Ensure that, for either missing Makefile.in,
 # or updated Makefile.am, rebuild rules are run, and run exactly once
 # only.
 
 rm -f Makefile.in
-$MAKE >stdout || { cat stdout; Exit 1; }
-cat stdout
-test `grep -c " --run " stdout` -eq 1
+do_check
 
 rm -f sub/Makefile.in
-$MAKE >stdout || { cat stdout; Exit 1; }
-cat stdout
-test `grep -c " --run " stdout` -eq 1
+do_check
 
 $sleep  # Let touched files appear newer.
 
 touch Makefile.am
-$MAKE >stdout || { cat stdout; Exit 1; }
-cat stdout
-test `grep -c " --run " stdout` -eq 1
+do_check
 
 touch sub/Makefile.am
-$MAKE >stdout || { cat stdout; Exit 1; }
-cat stdout
-test `grep -c " --run " stdout` -eq 1
+do_check
 
 :
old mode 100755 (executable)
new mode 100644 (file)
similarity index 96%
rename from t/pr8365-remake-timing.sh
rename to t/remake-timing-bug-pr8365.sh
index 2feaf6d..f3fd57d
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2011-2012 Free Software Foundation, Inc.
+# Copyright (C) 2011-2017 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
@@ -22,7 +22,7 @@
 # make by hand.  Thus, fixing it would not be worth the hassle, but
 # we prefer to keep it exposed anyway.
 
-. ./defs || Exit 1
+. test-init.sh
 
 # We'll use calls to stat to get debugging information.
 if stat /dev/null; then stat=stat; else stat=:; fi
@@ -98,9 +98,8 @@ END
 
 chmod a+x aclocal-wrap automake-wrap autoconf-wrap
 
-env \
-  ACLOCAL=./aclocal-wrap AUTOMAKE=./automake-wrap AUTOCONF=./autoconf-wrap \
-  $MAKE -e Makefile
+run_make Makefile \
+  ACLOCAL=./aclocal-wrap AUTOMAKE=./automake-wrap AUTOCONF=./autoconf-wrap
 grep '^FOOBAR =' Makefile.in
 grep '^FOOBAR *= *zardoz *$' Makefile
 
old mode 100755 (executable)
new mode 100644 (file)
index 8ad5765..48fd6d8
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2010-2012 Free Software Foundation, Inc.
+# Copyright (C) 2010-2017 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
 # generate broken or incorrect makefiles.
 
 required='cc bzip2'
-. ./defs || Exit 1
+. test-init.sh
 
 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
 AC_CONFIG_FILES([Makefile])
 AC_OUTPUT
 END
@@ -58,11 +57,11 @@ int main (void)
 }
 END
 
-cp "$am_scriptdir"/compile "$am_scriptdir"/test-driver .
+cp "$am_scriptdir"/test-driver .
 
 $ACLOCAL
-$AUTOMAKE --foreign --foreign -Wall 2>stderr || { cat stderr >&2; Exit 1; }
-test -s stderr && { cat stderr >&2; Exit 1; }
+$AUTOMAKE --foreign --foreign -Wall 2>stderr || { cat stderr >&2; exit 1; }
+test -s stderr && { cat stderr >&2; exit 1; }
 rm -f stderr
 $AUTOCONF
 
@@ -77,6 +76,6 @@ $MAKE clean
 $MAKE distcheck
 ls -l
 test -f $me-1.0.tar.bz2
-test ! -r $me-1.0.tar.gz
+test ! -e $me-1.0.tar.gz
 
 :
old mode 100755 (executable)
new mode 100644 (file)
index a9442a2..600b627
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2002-2012 Free Software Foundation, Inc.
+# Copyright (C) 2002-2017 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
@@ -19,7 +19,7 @@
 # to fix the Makefiles.)
 
 required='libtoolize'
-. ./defs || Exit 1
+. test-init.sh
 
 cat > configure.ac << 'END'
 AC_INIT([req2], [1.0])
diff --git a/t/rm-f-probe.sh b/t/rm-f-probe.sh
new file mode 100644 (file)
index 0000000..81ff7b8
--- /dev/null
@@ -0,0 +1,74 @@
+#! /bin/sh
+# Copyright (C) 2013-2017 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 our probe that checks that "rm -f" doesn't complain if called
+# without file operands works as expected.  See automake bug#10828.
+
+. test-init.sh
+
+echo AC_OUTPUT >> configure.ac
+: > Makefile.am
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE
+
+mkdir bin
+cat > bin/rm <<'END'
+#!/bin/sh
+set -e; set -u;
+PATH=$original_PATH; export PATH
+rm_opts=
+while test $# -gt 0; do
+  case $1 in
+    -*) rm_opts="$rm_opts $1";;
+     *) break;;
+  esac
+  shift
+done
+if test $# -eq 0; then
+  echo "Oops, fake rm called without arguments" >&2
+  exit 1
+else
+  exec rm $rm_opts "$@"
+fi
+END
+chmod a+x bin/rm
+
+original_PATH=$PATH
+PATH=$(pwd)/bin$PATH_SEPARATOR$PATH
+export PATH original_PATH
+
+rm -f && exit 99 # Sanity check.
+
+./configure 2>stderr && { cat stderr >&2; exit 1; }
+cat stderr >&2
+
+grep "'rm' program.* unable to run without file operands" stderr
+$FGREP "tell bug-automake@gnu.org about your system" stderr
+$FGREP "install GNU coreutils" stderr
+$EGREP "(^| |')ACCEPT_INFERIOR_RM_PROGRAM($| |')" stderr
+
+ACCEPT_INFERIOR_RM_PROGRAM=yes; export ACCEPT_INFERIOR_RM_PROGRAM
+
+./configure
+$MAKE
+$MAKE distcheck
+
+# For the sake of our exit trap.
+PATH=$original_PATH; export PATH
+
+:
old mode 100755 (executable)
new mode 100644 (file)
index 5e547a5..030ab14
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 1996-2012 Free Software Foundation, Inc.
+# Copyright (C) 1996-2017 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
@@ -16,7 +16,7 @@
 
 # Test to make sure RULE_PATTERN catches strange targets.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat > Makefile.am << 'END'
 $(srcdir)/Makefile.am:
old mode 100755 (executable)
new mode 100644 (file)
index d4f328c..a2dc219
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2008-2012 Free Software Foundation, Inc.
+# Copyright (C) 2008-2017 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
@@ -16,7 +16,7 @@
 
 # Unsafe absolute directory names should be diagnosed.
 
-. ./defs || Exit 1
+. test-init.sh
 
 mkdir 'unsafe$'
 cd 'unsafe$'
@@ -29,14 +29,14 @@ mv ../install-sh ../missing .
 $ACLOCAL
 $AUTOCONF
 $AUTOMAKE
-./configure 2>stderr && { cat stderr >&2; Exit 1; }
+./configure 2>stderr && { cat stderr >&2; exit 1; }
 cat stderr >&2
 grep 'unsafe absolute working directory' stderr
 
 cd ..
 mkdir build
 cd build
-../unsafe$/configure 2>stderr && { cat stderr >&2; Exit 1; }
+../unsafe$/configure 2>stderr && { cat stderr >&2; exit 1; }
 cat stderr >&2
 grep 'unsafe srcdir' stderr
 
diff --git a/t/scripts.sh b/t/scripts.sh
deleted file mode 100755 (executable)
index 4808358..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-#! /bin/sh
-# Copyright (C) 1996-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 for bug reported by Jim Meyering.
-# AC_PROG_INSTALL was required when only noinst_SCRIPTS was defined.
-
-. ./defs || Exit 1
-
-cat > Makefile.am << 'END'
-noinst_SCRIPTS = foo
-END
-
-$ACLOCAL
-$AUTOMAKE
old mode 100755 (executable)
new mode 100644 (file)
index d1bfa23..c8f85e9
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 1997-2012 Free Software Foundation, Inc.
+# Copyright (C) 1997-2017 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
@@ -16,7 +16,7 @@
 
 # Test to make sure C-but-not-CC error works.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 dnl AC_PROG_CC and AC_PROG_CXX missing on purpose
old mode 100755 (executable)
new mode 100644 (file)
similarity index 54%
rename from t/acloca17.sh
rename to t/self-check-cc-no-c-o.sh
index e6098f0..00ab241
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2004-2012 Free Software Foundation, Inc.
+# Copyright (C) 2012-2017 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 aclocal report unused required macros.
+# Check that our fake "C compiler" that doesn't grasp the '-c' and
+# '-o' command-line options passed together, used to enhance testsuite
+# coverage.
 
+required=gcc # Our fake compiler uses gcc.
 am_create_testdir=empty
-. ./defs || Exit 1
+. test-init.sh
 
-cat > configure.ac << 'END'
-AC_INIT
-SOME_DEFS
-END
+CC=$am_testaux_builddir/cc-no-c-o; export CC
 
-mkdir m4
-cat >m4/somedefs.m4 <<EOF
-AC_DEFUN([SOME_DEFS], [
-  AC_REQUIRE([UNDEFINED_MACRO])
-])
-EOF
-
-# FIXME: We want autom4te's 'undefined required macro' warning to be fatal,
-# but have no means to say so to aclocal.  We use WARNINGS=error instead.
-
-WARNINGS=error $ACLOCAL -I m4 2>stderr && { cat stderr >&2; Exit 1; }
+echo 'int main (void) { return 0; }' > foo.c
+$CC -c foo.c
+test -f foo.o || test -f foo.obj
+$CC -c -o bar.o foo.c 2>stderr && { cat stderr >&2; exit 1; }
 cat stderr >&2
-grep '^configure\.ac:2:.*UNDEFINED_MACRO' stderr
+grep "both '-o' and '-c' seen on the command line" stderr
+test ! -e bar.o && test ! -e bar.obj
 
 :
diff --git a/t/self-check-cleanup.tap b/t/self-check-cleanup.tap
deleted file mode 100755 (executable)
index 21c6388..0000000
+++ /dev/null
@@ -1,191 +0,0 @@
-#! /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/>.
-
-# Sanity check for the automake testsuite.
-# Check creation/removal of temporary test working directory by './defs'.
-
-. ./defs || Exit 1
-
-plan_ 43
-
-# We still need a little hack to make ./defs work outside automake's
-# tree 'tests' subdirectory.  Not a big deal.
-sed "s|^am_top_builddir=.*|am_top_builddir='`pwd`'|" \
-  "$am_top_builddir"/defs-static >defs-static
-diff "$am_top_builddir"/defs-static defs-static \
-  && fatal_ "failed to edit defs-static"
-cp "$am_top_builddir"/defs .
-
-AM_TESTS_REEXEC=no; export AM_TESTS_REEXEC
-keep_testdirs=; unset keep_testdirs
-
-if ln -s defs foo && test -h foo; then
-  have_symlinks=yes
-else
-  have_symlinks=no
-fi
-export have_symlinks # Is used also by spawned shells.
-
-# Don't let a failure poison all subsequent tests.
-do_clean ()
-{
-  # Don't try to be smart and use find here, that has caused issues
-  # and extra ERROR results in the past.  Be dumb and safe.
-  for d in t t/* t/*/* t/*/*/*; do
-    test ! -d $d || chmod u+rwx $d || :
-  done
-  rm -rf t
-}
-
-# Exporting 'keep_testdirs' to "yes" in the environment should cause
-# the cleanup code not to be run, so that the temporary directories
-# are left on disk.
-command_ok_ '"keep_testdirs=yes" causes testdir to be kept around' eval '
-     env keep_testdirs=yes \
-       $AM_TEST_RUNNER_SHELL -c ". ./defs && echo okok >foo" t/dummy.sh \
-     && test -f t/dummy.dir/foo \
-     && test okok = `cat t/dummy.dir/foo`'
-
-do_clean
-
-# Check that pre-test cleanup works also with directories with
-# "null" permissions, and containing broken symlinks.
-mkdir t t/dummy.dir t/dummy.dir/sub
-(
-  cd t/dummy.dir
-  touch file sub/file
-  if test $have_symlinks = yes; then
-    ln -s file symlink
-    ln -s none brokenlink
-  fi
-)
-chmod 000 t/dummy.dir/sub/* t/dummy.dir/file
-test $have_symlinks = yes && chmod 000 t/dummy.dir/symlink
-chmod 500 t/dummy.dir/sub t/dummy.dir
-command_ok_ "pre-cleanup can deal with low-perms testdir" \
-            $AM_TEST_RUNNER_SHELL -c  '. ./defs' t/dummy.sh
-command_ok_ "pre-cleanup removed low-perms testdir" \
-            eval 'test ! -f t/dummy.dir \
-               && test ! -d t/dummy.dir \
-               && test ! -r t/dummy.dir'
-
-do_clean
-
-# Check that post-test cleanup works also with directories with
-# "null" permissions, and containing broken symlinks.
-command_ok_ "post-cleanup can deal with low-perms testdir" \
-            $AM_TEST_RUNNER_SHELL -c  '
-  stderr_fileno_=2
-  . ./defs || Exit 1
-  set -e
-  mkdir dir dir/sub
-  cd dir
-  touch file sub/file
-  if test $have_symlinks = yes; then
-    ln -s file symlink
-    ln -s none brokenlink
-  fi
-  cd ..
-  chmod 000 dir/sub/* dir/file
-  test $have_symlinks = yes && chmod 000 dir/symlink
-  chmod 500 dir/sub dir
-  :
-' t/dummy.sh
-command_ok_ "post-cleanup removed null-perms testdir" \
-            eval 'test ! -f t/dummy.dir \
-               && test ! -d t/dummy.dir \
-               && test ! -r t/dummy.dir'
-
-do_clean
-
-# Check that pre-test cleanup does not unduly change the permissions of
-# files to which symlinks in the temporary test directory point to.
-if test $have_symlinks = yes; then
-
-  mkdir dir
-  chmod 000 dir
-  : > file
-  chmod 000 file
-
-  mkdir t t/dummy.dir
-  (cd t/dummy.dir && ln -s ../../dir ../../file .)
-
-  command_ok_ "pre-cleanup with testdir with zero-perms symlinks" \
-               $AM_TEST_RUNNER_SHELL -c '. ./defs' t/dummy.sh
-  ls -l # For debugging.
-  command_ok_ "pre-cleanup chmod doesn't follow symlinks to files" \
-               eval 'ls -l file | grep "^----------.*file"'
-  command_ok_ "pre-cleanup chmod doesn't follow symlinks to dirs" \
-              eval 'ls -ld dir | grep "^d---------.*dir"'
-
-  command_ok_ "post-cleanup with testdir with zero-perms symlinks" \
-              $AM_TEST_RUNNER_SHELL -c '
-    ocwd=`pwd` || exit 1
-    stderr_fileno_=2
-    . ./defs || Exit 1
-    ln -s "$ocwd/dir" "$ocwd/file" .
-  ' t/dummy.sh
-  ls -l # For debugging.
-  command_ok_ "post-cleanup chmod doesn't follow symlinks to files" \
-               eval 'ls -l file | grep "^----------.*file"'
-  command_ok_ "post-cleanup chmod doesn't follow symlinks to dirs" \
-              eval 'ls -ld dir | grep "^d---------.*dir"'
-
-  chmod u+rwx dir file
-  rmdir dir
-  rm -f file
-
-else # $have_symlinks = no
-  skip_row_ 6 "symlinks not supported"
-fi
-
-do_clean
-
-# Check that the cleanup trap does not remove the temporary
-# test directory in case of test failure, skip, hard-error,
-# or when receiving a signal.
-
-for st in 1 2 3 10 77 99 126 127 130 255; do
-  command_ok_ "exit trap doesn't clobber exit status $st" \
-              not $AM_TEST_RUNNER_SHELL -c "
-    stderr_fileno_=2
-    . ./defs
-    : > foo
-    Exit $st
-  " t/dummy.sh
-  command_ok_ "testdir not removed if exiting with status $st" \
-              test -f t/dummy.dir/foo
-  do_clean
-done
-
-for sig in 1 2 3 9 13 15; do
-  if is_blocked_signal $sig; then
-    skip_row_ 2 -r "signal $sig seems blocked"
-    continue
-  fi
-  command_ok_ "exit trap doesn't clobber signal $sig" \
-              not $AM_TEST_RUNNER_SHELL -c "
-    stderr_fileno_=2
-    . ./defs
-    : > foo
-    kill -$sig \$\$
-  " t/dummy.sh
-  command_ok_ "testdir not removed if getting signal $sig" \
-              test -f t/dummy.dir/foo
-  do_clean
-done
-
-:
old mode 100755 (executable)
new mode 100644 (file)
index 23b9dc7..cabef75
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2011-2012 Free Software Foundation, Inc.
+# Copyright (C) 2011-2017 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
@@ -17,7 +17,7 @@
 # Sanity check on the function used by the automake testsuite to
 # analyze output of "configure --help".
 
-. ./defs || Exit 1
+. test-init.sh
 
 # FIXME: this test is a good candidate for a conversion to TAP.
 
@@ -167,11 +167,11 @@ END
 
 compare_extracted_help ()
 {
-  cat > exp || Exit 99
-  extract_configure_help "$1" help > got || Exit 1
+  cat > exp || exit 99
+  extract_configure_help "$1" help > got || exit 1
   cat exp
   cat got
-  diff exp got || Exit 1
+  diff exp got || exit 1
 }
 
 compare_extracted_help --disable-libcap <<'END'
old mode 100755 (executable)
new mode 100644 (file)
index 424367e..8e34869
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2011-2012 Free Software Foundation, Inc.
+# Copyright (C) 2011-2017 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 # Sanity check for the automake testsuite.
-# Check that tests using './defs' create a proper temporary directory,
-# and run in it.  Also check that we can prevent the pre-population
-# and the creation of such directory if we want.
+# Check that tests using 'test-init.sh' create a proper temporary
+# directory, and run in it.  Also check that we can prevent the
+# pre-population and the creation of such directory if we want.
 
 am_create_testdir=no
-. ./defs || Exit 99
+. test-init.sh
 
 plan_ 5
 
-AM_TESTS_REEXEC=no; export AM_TESTS_REEXEC
-keep_testdirs=; unset keep_testdirs
+unset keep_testdirs
 
 # This needs to be consistent with what $AM_TEST_RUNNER_SHELL
 # deems to be the current working directory.
-cwd=`$AM_TEST_RUNNER_SHELL -c 'pwd'` \
+cwd=$($AM_TEST_RUNNER_SHELL -c 'pwd') \
   || fatal_ "can't get current working directory"
 echo "$cwd"
 
 do_check ()
 {
-  test ! -d _self.dir || rm -rf _self.dir \
-    || framework_failure_ "cleaning up _self.dir"
+  rm -rf _self.dir || framework_failure_ "cleaning up _self.dir"
   command_ok_ "$1 [$2]" $AM_TEST_RUNNER_SHELL -c "
     $2
-    . ./defs || Exit 99
+   . test-init.sh
     # Don't fail if 'ls -l' fails; avoids possible racy spurious failures.
     pwd; ls -l || : # For debugging.
     $3
@@ -48,28 +46,26 @@ do_check ()
 
 do_check 'testdir has the expected path' \
          'unset am_create_testdir' \
-         'case `pwd` in '"$cwd"'/t/_self.dir);; *) Exit 1;; esac'
+         'case $(pwd) in '"$cwd"'/t/_self.dir);; *) exit 1;; esac'
 
 do_check 'fully pre-populated testdir' \
          'unset am_create_testdir' \
-         'test -f install-sh || Exit 1
-          test -f configure.ac || Exit 1
-          case `pwd` in '"$cwd"'/t/_self.dir) : ;; *) Exit 1;; esac'
+         'test -f install-sh || exit 1
+          test -f configure.ac || exit 1
+          case $(pwd) in '"$cwd"'/t/_self.dir) : ;; *) exit 1;; esac'
 
 do_check 'testdir has the expected path' \
          'am_create_testdir=empty' \
-         'case `pwd` in '"$cwd"'/t/_self.dir) : ;; *) Exit 1;; esac'
+         'case $(pwd) in '"$cwd"'/t/_self.dir) : ;; *) exit 1;; esac'
 
 do_check 'do not pre-populate testdir' \
          'am_create_testdir=empty' \
-         'ls -a | grep -v "^\\.\\{1,2\\}$" | grep . && Exit 1; :'
+         'ls -a | grep -v "^\\.\\{1,2\\}$" | grep . && exit 1; :'
 
 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 "self-check-dir\.tap" Makefile || Exit 1
-          case `pwd` in '"$cwd"') : ;; *) Exit 1;; esac'
+         'test ! -e t/_self.dir || exit 1
+          grep "self-check-dir\.tap" Makefile || exit 1
+          case $(pwd) in '"$cwd"') : ;; *) exit 1;; esac'
 
 :
diff --git a/t/self-check-env-sanitize.tap b/t/self-check-env-sanitize.tap
deleted file mode 100755 (executable)
index c6ac980..0000000
+++ /dev/null
@@ -1,57 +0,0 @@
-#! /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/>.
-
-# Sanity check for the automake testsuite.
-# Make sure that the testsuite initialization code complains when
-# some testsuite-influential variables are set in the environment.
-
-am_create_testdir=no
-. ./defs || Exit 1
-
-set -x
-exec 5>&1
-
-plan_ 18 # Two times the number of variable names in $vars.
-
-vars='
-  me
-  required
-  am_serial_tests
-  am_using_tap
-  am_create_testdir
-  am_tap_implementation
-  am_test_prefer_config_shell
-  am_original_AUTOMAKE
-  am_original_ACLOCAL
-'
-
-do_run ()
-{
-  env "$1=foo" $AM_TEST_RUNNER_SHELL -c '. ./defs' foo.test
-}
-
-do_grep ()
-{
-  env "$1=foo" $AM_TEST_RUNNER_SHELL -c '. ./defs' foo.test 2>&1 1>&5 \
-    | grep "foo\.test:.* variable '$1'.* in the environment.*unsafe"
-}
-
-for var in $vars; do
-  command_ok_ "$var [err status]" not do_run $var
-  command_ok_ "$var [err message]" do_grep $var
-done
-
-:
old mode 100755 (executable)
new mode 100644 (file)
index 0ad5651..824badf
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2011-2012 Free Software Foundation, Inc.
+# Copyright (C) 2011-2017 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
 
 # Sanity check for the automake testsuite.
 # Check that, in case of failing commands, the correct exit status is
-# passed to the exit trap installed by the './defs' script.
+# passed to the exit trap installed by the 'test-init.sh' script.
 # Also check that the 'errexit' shell flag is active.
 
 am_create_testdir=no
-. ./defs || Exit 99
+. test-init.sh
 
-plan_ 34
+plan_ 32
 
 # This test becomes more cumbersome if we keep the 'errexit' shell flag
 # set.  And removing it is no big deal, as this test is a TAP-based one,
 # so that false positives remain very unlikely.
 set +e
 
-AM_TESTS_REEXEC=no; export AM_TESTS_REEXEC
-
 # It's especially important that the 'unset' is done before sourcing
-# ./defs, i.e., when 'set -e' is not active yet, for the benefit of shells
-# (like Bash 2.05 and Solaris 10 /bin/ksh) that returns a non-zero status
-# when unsetting an already-unset variable.
-init='stderr_fileno_=2; unset am_explicit_skips; . ./defs'
+# test-init.sh, i.e., when 'set -e' is not active yet, for the benefit
+# of shells (like Bash 2.05 and Solaris 10 /bin/ksh) that returns a
+# non-zero status when unsetting an already-unset variable.
+# Add an extra newline at the end so that the aliases defined by
+# test-init.sh can take effect.  Yes, this is truly required.
+init="stderr_fileno_=2; unset am_explicit_skips;. test-init.sh${nl}"
 
-# Required so that the code in defs doesn't go crazy trying to creating a
+# Required so that the code in test-init.sh doesn't go crazy trying to creating a
 # temporary directory in the absolute dir of $AM_TEST_RUNNER_SHELL.
 dummy_test_script=t/$me.sh
 
 for st in 1 2 3 4 5 77 99 126 127 128 129 130 255; do
-  for exit_cmd in "Exit $st" "sh -c 'exit $st'"; do
-    $AM_TEST_RUNNER_SHELL -c "$init; $exit_cmd; :" "$dummy_test_script"
+  for exit_cmd in "exit $st" "sh -c 'exit $st'"; do
+    $AM_TEST_RUNNER_SHELL -c "$init $exit_cmd; :" "$dummy_test_script"
     command_ok_ "$exit_cmd" test $? -eq $st
   done
 done
@@ -59,7 +59,7 @@ for sig in 1 2 13 15; do
     # <http://lists.gnu.org/archive/html/bug-autoconf/2011-09/msg00004.html>
     trap : 2
   fi
-  $AM_TEST_RUNNER_SHELL -c "$init; kill -$sig \$\$; :" "$dummy_test_script"
+  $AM_TEST_RUNNER_SHELL -c "$init kill -$sig \$\$; :" "$dummy_test_script"
   rc=$?
   if test $sig -eq 2; then
     # Reset default SIGINT handler as portably as possible.
@@ -70,34 +70,13 @@ for sig in 1 2 13 15; do
 done
 
 : Non-existent program.
-# Solaris 10 /bin/sh erroneously exit with success right away when the
-# following three conditions are met at the same time:
-#   1. the 'errexit' flag is active,
-#   2. an exit trap is installed, and
-#   3. a non-existing command is issued.
-# Note that the non-existent command is issued as the last command to
-# the shell in the next line; this is deliberate.
-# FIXME: remove this workaround once we have a better configure-time
-# determination of '$AM_TEST_RUNNER_SHELL'.
-if $AM_TEST_RUNNER_SHELL -c 'set -e; trap "exit \$?" 0; non-existent-program'; then
-  maybe_todo=TODO reason="known Solaris /bin/sh bug"
-else
-  maybe_todo="" reason=""
-fi
-$AM_TEST_RUNNER_SHELL -c "$init; non-existent-prog; :" "$dummy_test_script"
-command_ok_ "command not found" -D "$maybe_todo" -r "$reason" \
-            -- test $? -gt 0
+$AM_TEST_RUNNER_SHELL -c "$init non-existent-prog; :" "$dummy_test_script"
+command_ok_ "command not found" -- test $? -gt 0
 
 : Non-executable command.
 test -f Makefile && test ! -x Makefile || \
   framowork_failure_ "no proper Makefile in the current directory"
-$AM_TEST_RUNNER_SHELL -c "$init; ./Makefile; :" "$dummy_test_script"
+$AM_TEST_RUNNER_SHELL -c "$init ./Makefile; :" "$dummy_test_script"
 command_ok_ "permission denied" test $? -gt 0
 
-: Syntax errors in the test code.
-$AM_TEST_RUNNER_SHELL -c "$init; if :; then" "$dummy_test_script"
-command_ok_ "syntax error 1" test $? -gt 0
-$AM_TEST_RUNNER_SHELL -c "$init; true ( true )" "$dummy_test_script"
-command_ok_ "syntax error 2" test $? -gt 0
-
 :
old mode 100755 (executable)
new mode 100644 (file)
index 7a92671..c769445
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2011-2012 Free Software Foundation, Inc.
+# Copyright (C) 2011-2017 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 # Sanity check for the automake testsuite.
-# Check creation/removal of temporary test working directory by './defs'.
+# Check that our testsuite framework can be instructed not to consider
+# an early exit due to some command exiting unexpectedly with status 77.
 
-am_create_testdir=empty
-. ./defs || Exit 1
-
-# We still need a little hack to make ./defs work outside automake's
-# tree 'tests' subdirectory.  Not a big deal.
-sed "s|^am_top_builddir=.*|am_top_builddir='`pwd`'|" \
-  "$am_top_builddir"/defs-static > defs-static
-diff "$am_top_builddir"/defs-static defs-static \
-  && fatal_ "failed to edit defs-static"
-cp "$am_top_builddir"/defs .
+am_create_testdir=no
+. test-init.sh
 
 set +e
 
 unset am_explicit_skips stderr_fileno_
-AM_TESTS_REEXEC=no; export AM_TESTS_REEXEC
-
-# I'm a lazy typist.
-sh=$AM_TEST_RUNNER_SHELL
 
-$sh -c '. ./defs; (exit 77); exit 77' dummy.test
-test $? -eq 77 || Exit 1
+# FIXME: this can be simplified when we improve our runtime checks on the
+# testsuite shell to ensure it supports "VAR=val shell_func" correctly.
+run_dummy_test ()
+{
+  env $2 $AM_TEST_RUNNER_SHELL -c "
+    am_create_testdir=no
+   . test-init.sh
+    $1
+  " dummy.sh
+}
 
-am_explicit_skips=no $sh -c '. ./defs; sh -c "exit 77"' dummy.test
-test $? -eq 77 || Exit 1
+run_dummy_test 'exit 77'
+test $? -eq 77 || exit 1
 
-am_explicit_skips=yes $sh -c '. ./defs; (exit 77); exit 77' dummy.test
-test $? -eq 78 || Exit 1
+run_dummy_test 'sh -c "exit 77"' am_explicit_skips=no
+test $? -eq 77 || exit 1
 
-am_explicit_skips=y $sh -c '. ./defs; sh -c "exit 77"' dummy.test
-test $? -eq 78 || Exit 1
+run_dummy_test '$PERL -e "exit 77"; true' am_explicit_skips=yes
+test $? -eq 78 || exit 1
 
-am_explicit_skips=yes $sh -c '. ./defs; Exit 77' dummy.test
-test $? -eq 77 || Exit 1
+run_dummy_test 'sh -c "exit 77"; exit 0' am_explicit_skips=y
+test $? -eq 78 || exit 1
 
-am_explicit_skips=y $sh -c '. ./defs; skip_ "foo"' dummy.test
-test $? -eq 77 || Exit 1
+run_dummy_test 'skip_ "foo"; :' am_explicit_skips=y
+test $? -eq 77 || exit 1
 
 :
old mode 100755 (executable)
new mode 100644 (file)
index 5c0dded..0c17759
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2011-2012 Free Software Foundation, Inc.
+# Copyright (C) 2011-2017 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
@@ -18,7 +18,7 @@
 # shell function.
 
 am_create_testdir=no
-. ./defs || Exit 99
+. test-init.sh
 
 plan_ 2
 
old mode 100755 (executable)
new mode 100644 (file)
index 842c411..9505518
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2011-2012 Free Software Foundation, Inc.
+# Copyright (C) 2011-2017 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
@@ -16,7 +16,7 @@
 
 # Sanity check for the automake testsuite: the 'is_newest' subroutine.
 
-. ./defs || Exit 1
+. test-init.sh
 
 plan_ 21
 
old mode 100755 (executable)
new mode 100644 (file)
index cddc9b5..2932837
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2011-2012 Free Software Foundation, Inc.
+# Copyright (C) 2011-2017 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 # Sanity check for the automake testsuite.
-# Make sure that $me gets automatically defined by './defs', and that it
-# can be overridden by the test script.
+# Make sure that $me gets automatically defined by 'test-init.sh'.
 
 am_create_testdir=no
-. ./defs || Exit 1
+. test-init.sh
 
-plan_ 14
-
-AM_TESTS_REEXEC=no; export AM_TESTS_REEXEC
+plan_ 12
 
 # This test becomes cumbersome if we keep the 'errexit' shell flag set.
 # And removing it is no big deal, as this test is a TAP-based one, so
@@ -32,7 +29,11 @@ set +e
 
 do_check ()
 {
-  $AM_TEST_RUNNER_SHELL -c '. ./defs && echo me=$me' "$1" | grep "^me=$2$"
+  $AM_TEST_RUNNER_SHELL -c '
+    am_create_testdir=no # Do not pollute the top-level directory.
+   . test-init.sh
+    echo me=$me
+  ' "$1" | grep "^me=$2$"
   command_ok_ "me=$1" test $? -eq 0
 }
 
@@ -46,28 +47,21 @@ done
 do_check foo.bar 'foo\.bar'
 do_check abc. 'abc\.'
 
-# If we override $me, ./defs should not modify it.
-
-s=`$AM_TEST_RUNNER_SHELL -c 'me=foo.sh && . ./defs && echo me=$me' bad.sh`
-command_ok_ "override of \$me before ./defs causes no error" \
-            test $? -eq 0
-
-r='ok'
-printf '%s\n' "$s" | grep '^me=foo\.sh$' || r='not ok'
-printf '%s\n' "$s" | grep 'me=bad'       && r='not ok'
-result_ "$r" "override of \$me before ./defs is honored"
-unset r
+# A definition of $me in the environment should be ignored.
 
-# Overriding $me after sourcing ./defs-static should work.
-s=`$AM_TEST_RUNNER_SHELL -c '. ./defs-static && me=zardoz &&
-                             . ./defs && echo me=$me' bad.sh`
-command_ok_ "override of \$me after ./defs-static causes no error" \
+s=$(me=bad $AM_TEST_RUNNER_SHELL -c '
+  # Do not pollute the top-level directory.
+  am_create_testdir=no
+ . test-init.sh
+  echo me=$me
+' foo.sh)
+command_ok_ "override of \$me before test-init.sh causes no error" \
             test $? -eq 0
 
 r='ok'
-printf '%s\n' "$s" | grep '^me=zardoz$' || r='not ok'
-printf '%s\n' "$s" | grep 'me=bad'      && r='not ok'
-result_ "$r" "override of \$me after ./defs-static is honored"
+printf '%s\n' "$s" | grep '^me=foo$' || r='not ok'
+printf '%s\n' "$s" | grep 'me=bad'   && r='not ok'
+result_ "$r" "\$me from the environment is ignored"
 unset r
 
 :
diff --git a/t/self-check-reexec.tap b/t/self-check-reexec.tap
deleted file mode 100755 (executable)
index e19a681..0000000
+++ /dev/null
@@ -1,216 +0,0 @@
-#! /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/>.
-
-# Sanity check for the automake testsuite.
-# Check that automatic re-execution of test script with the
-# configure-time $AM_TEST_RUNNER_SHELL.
-
-am_create_testdir=empty
-. ./defs || Exit 1
-
-plan_ 32
-
-unset AM_TESTS_REEXEC BASH_VERSION || :
-
-cwd=`pwd` || fatal_ "cannot get current working directory"
-cp "$am_top_builddir"/defs . || fatal_ "fetching 'defs' from top_builddir"
-
-#
-# Search for required bash and non-bash shells.
-#
-
-for bash_shell in \
-  "$SHELL" "$AM_TEST_RUNNER_SHELL" bash bash3 bash4 :
-do
-  test "$bash_shell" = : && break
-  $bash_shell --version || continue
-  $bash_shell -c 'test -n "$BASH_VERSION"' || continue
-  break
-done
-
-# This might not be optimal, but it's much better than writing wrapper
-# scripts acting as "fake" shells.
-for non_bash_shell in \
-  /bin/sh /bin/ksh sh ksh ash dash pdksh "$SHELL" "$AM_TEST_RUNNER_SHELL" :
-do
-  test "$non_bash_shell" = : && break
-  $non_bash_shell -c 'exit 0' || continue
-  # Be sure to reject also any shell that is Zsh "in disguise" (as can
-  # be found on some Debian systems, where /bin/ksh can be symlinked to
-  # /bin/zsh4).  This is required because our testsuite does not support
-  # older versions of Zsh, and that has caused spurious failures in the
-  # past.
-  $non_bash_shell -c 'test -n "$ZSH_VERSION$BASH_VERSION"' && continue
-  break
-done
-
-echo "bash_shell='$bash_shell'"
-echo "non_bash_shell='$non_bash_shell'"
-
-# This would denote an internal error.
-if test "$bash_shell" = : && test "$non_bash_shell" = :; then
-  fatal_ "we couldn't find a bash shell nor a non-bash one"
-fi
-
-#
-# Functions used throughout the test.
-#
-
-get_ddata ()
-{
-  case $1 in
-    ""|*/) dsep=;;
-        *) dsep=/;;
-  esac
-  case $1 in
-    "") dname="no dir";;
-    /*) dname="absolute dir";;
-     *) dname="dir '$1'";;
-  esac
-}
-
-get_sh ()
-{
-  case $1 in
-    bash) sh=$bash_shell;;
-    non-bash) sh=$non_bash_shell;;
-    *) fatal_ "get_sh: invalid shell type '$1'";;
-  esac
-}
-
-#
-# Check how to default, force or prevent a re-execution.
-#
-
-cat > need-bash.sh <<'END'
-#!/bin/false
-. ./defs
-# Ensure that the script gets re-executed with bash.  Also ensure that
-# non-standard syntax used after the inclusion of './defs' doesn't cause
-# non-bash shells to fail.
-# Subshell required to prevent some shells (e.g., Solaris 10 /bin/sh)
-# from only complaining on stderr but then exiting with exit status 0.
-(foo=abac && test xbxc = ${foo//a/x} && test -n "$BASH_VERSION")
-END
-
-sh_var=AM_TEST_RUNNER_SHELL
-sed -e "s|^am_top_builddir=.*|am_top_builddir='$cwd'|" \
-    -e "s|^$sh_var=.*$|$sh_var=bash; export $sh_var|" \
-    < "$am_top_builddir"/defs-static >defs-static
-
-do_reexec ()
-{
-  command_ok_ "re-exec if AM_TESTS_REEXEC=$1" \
-              env AM_TESTS_REEXEC="$1" $non_bash_shell need-bash.sh
-}
-
-dont_reexec ()
-{
-  command_ok_ "don't re-exec if AM_TESTS_REEXEC=$1" \
-              not env AM_TESTS_REEXEC="$1" $non_bash_shell need-bash.sh
-}
-
-if test "$bash_shell" = :; then
-  skip_row_ 10 -r "no bash shell found" AM_TESTS_REEXEC
-elif test "$non_bash_shell" = :; then
-  skip_row_ 10 -r "no non-bash shell found" AM_TESTS_REEXEC
-else
-  command_ok_ "re-exec if AM_TESTS_REEXEC unset" \
-              $non_bash_shell need-bash.sh
-  do_reexec ''
-  do_reexec yes
-  do_reexec y
-  do_reexec true
-  do_reexec 1
-  dont_reexec no
-  dont_reexec n
-  dont_reexec false
-  dont_reexec 0
-fi
-
-#
-# Check message about the re-execution.  Also check that arguments passed
-# to a test script are preserved by a re-exec, even in "corner" cases.
-#
-
-cat > dummy.sh <<'END'
-#!/bin/sh
-. ./defs
-:
-END
-
-cat > checkargs.sh <<'END'
-. ./defs
-test $# -eq 3 && test x"$1" = x'a' && test x"$2" = x && test x"$3" = x"-e"
-END
-
-chmod a+x dummy.sh checkargs.sh
-
-mkdir sub
-cp dummy.sh checkargs.sh defs sub
-sed -e "s|^am_top_builddir=.*|am_top_builddir='$cwd'|" \
-    <  "$am_top_builddir"/defs-static > defs-static
-sed -e "s|^am_top_builddir=.*|am_top_builddir='$cwd/sub'|" \
-    <  "$am_top_builddir"/defs-static > sub/defs-static
-
-check_preserve_args ()
-{
-  dir=$1; shift
-  get_ddata "$dir"
-  $sh "${dir}${dsep}checkargs.sh" a '' -e && r='ok' || r='not ok'
-  result_ "$r" "$sh re-exec preserving args [$dname]"
-}
-
-check_reexec_message ()
-{
-  dir=$1; shift
-  get_ddata "$dir"
-  $sh "${dir}${dsep}dummy.sh" "$@" \
-    | grep "^dummy: exec $AM_TEST_RUNNER_SHELL ${dir}${dsep}dummy\\.sh $*\$" \
-    && r='ok' || r='not ok'
-  result_ "$r" "$sh display re-exec message [$dname] [args: $*]"
-}
-
-./dummy.sh a b \
-  | grep "^dummy: exec $AM_TEST_RUNNER_SHELL \\./dummy\\.sh a b$" \
-  && r='ok' || r='not ok'
-result_ "$r" "direct run display re-exec message [args: a b]"
-
-./checkargs.sh a '' -e && r='ok' || r='not ok'
-result_ "$r" "direct re-exec preserving args"
-
-for sh_type in non-bash bash; do
-  get_sh $sh_type
-  if test "$sh" = :; then
-    skip_row_ 5 -r "no $sh_type shell available" "re-exec message"
-    skip_row_ 5 -r "no $sh_type shell available" "re-exec preserving args"
-    continue
-  fi
-  check_preserve_args ''
-  check_reexec_message '' a b c
-  check_preserve_args .
-  check_reexec_message .  a b c
-  cd sub
-  check_preserve_args ..
-  check_reexec_message .. a b c
-  cd ..
-  check_preserve_args "$cwd"
-  check_reexec_message "$cwd" a -b c-
-  check_preserve_args sub
-  check_reexec_message sub 1 2 3 4
-done
-
-:
old mode 100755 (executable)
new mode 100644 (file)
index e5998b5..a5cd17e
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2011-2012 Free Software Foundation, Inc.
+# Copyright (C) 2011-2017 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
 # Test subroutines to report warnings, and to signal failures, skips
 # and hard errors.
 
-unset stderr_fileno_ || :
+unset stderr_fileno_
 
 am_create_testdir=empty
-. ./defs || Exit 1
+. test-init.sh
 
 set +e
 
 exec 5>&1
 
-(warn_ foobar) 2>&1 1>&5 | grep '^foobar$'             || Exit 1
-(fail_ foo); test $? -eq 1                             || Exit 1
-(fail_ foo) 2>&1 1>&5 | grep "^$me: failed test: foo"  || Exit 1
-(skip_ foo); test $? -eq 77                            || Exit 1
-(skip_ foo) 2>&1 1>&5 | grep "^$me: skipped test: foo" || Exit 1
-(fatal_ foo); test $? -eq 99                           || Exit 1
-(fatal_ foo) 2>&1 1>&5 | grep "^$me: hard error: foo"  || Exit 1
-(framework_failure_ foo); test $? -eq 99               || Exit 1
+(warn_ foobar) 2>&1 1>&5 | grep '^foobar$'             || exit 1
+(fail_ foo); test $? -eq 1                             || exit 1
+(fail_ foo) 2>&1 1>&5 | grep "^$me: failed test: foo"  || exit 1
+(skip_ foo); test $? -eq 77                            || exit 1
+(skip_ foo) 2>&1 1>&5 | grep "^$me: skipped test: foo" || exit 1
+(fatal_ foo); test $? -eq 99                           || exit 1
+(fatal_ foo) 2>&1 1>&5 | grep "^$me: hard error: foo"  || exit 1
+(framework_failure_ foo); test $? -eq 99               || exit 1
 (framework_failure_ foo) 2>&1 1>&5 \
-  | grep "^$me: set-up failure: foo"                   || Exit 1
+  | grep "^$me: set-up failure: foo"                   || exit 1
 
 stderr_fileno_=6
 
-(warn_ foobar) 6>&1 1>&5 | grep '^foobar$'             || Exit 1
-(fail_ foo); test $? -eq 1                             || Exit 1
-(fail_ foo) 6>&1 1>&5 | grep "^$me: failed test: foo"  || Exit 1
-(skip_ foo); test $? -eq 77                            || Exit 1
-(skip_ foo) 6>&1 1>&5 | grep "^$me: skipped test: foo" || Exit 1
-(fatal_ foo); test $? -eq 99                           || Exit 1
-(fatal_ foo) 6>&1 1>&5 | grep "^$me: hard error: foo"  || Exit 1
-(framework_failure_ foo); test $? -eq 99               || Exit 1
+(warn_ foobar) 6>&1 1>&5 | grep '^foobar$'             || exit 1
+(fail_ foo); test $? -eq 1                             || exit 1
+(fail_ foo) 6>&1 1>&5 | grep "^$me: failed test: foo"  || exit 1
+(skip_ foo); test $? -eq 77                            || exit 1
+(skip_ foo) 6>&1 1>&5 | grep "^$me: skipped test: foo" || exit 1
+(fatal_ foo); test $? -eq 99                           || exit 1
+(fatal_ foo) 6>&1 1>&5 | grep "^$me: hard error: foo"  || exit 1
+(framework_failure_ foo); test $? -eq 99               || exit 1
 (framework_failure_ foo) 6>&1 1>&5 \
-  | grep "^$me: set-up failure: foo"                   || Exit 1
+  | grep "^$me: set-up failure: foo"                   || exit 1
 
 :
diff --git a/t/self-check-sanity.sh b/t/self-check-sanity.sh
deleted file mode 100755 (executable)
index 8e31afa..0000000
+++ /dev/null
@@ -1,77 +0,0 @@
-#! /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/>.
-
-# Sanity check for the automake testsuite.
-# Test the sanity checks performed by the 'defs' script.  Also check
-# that we can use 'defs' elsewhere, when we duplicate some of the
-# infrastructure from the automake/tests subdirectory.
-
-am_create_testdir=empty
-. ./defs || Exit 1
-
-# Avoid to confuse traces from child processed with our own traces.
-show_stderr ()
-{
-  sed 's/^/ | /' stderr >&2
-}
-
-AM_TESTS_REEXEC=no; export AM_TESTS_REEXEC
-
-source_defs=". '$am_top_builddir/defs'"
-
-if $AM_TEST_RUNNER_SHELL -c "$source_defs" dummy.sh 2>stderr; then
-  show_stderr
-  Exit 1
-else
-  show_stderr
-  grep 'defs-static: not found in current directory' stderr
-fi
-
-sed 's|^am_top_srcdir=.*|am_top_srcdir=foo|' \
-  "$am_top_builddir"/defs-static > defs-static
-if $AM_TEST_RUNNER_SHELL -c "$source_defs" t/dummy.sh 2>stderr; then
-  show_stderr
-  Exit 1
-else
-  show_stderr
-  grep 'foo/defs-static\.in not found.*check \$am_top_srcdir' stderr
-fi
-
-sed 's|^am_top_builddir=.*|am_top_builddir=foo|' \
-  "$am_top_builddir"/defs-static > defs-static
-if $AM_TEST_RUNNER_SHELL -c "$source_defs" t/dummy.sh 2>stderr; then
-  show_stderr
-  Exit 1
-else
-  show_stderr
-  grep 'foo/defs-static not found.*check \$am_top_builddir' stderr
-fi
-
-# We still need a little hack to make ./defs work outside automake's
-# tree 'tests' subdirectory.  Not a big deal.
-sed "s|^am_top_builddir=.*|am_top_builddir='`pwd`'|" \
-  "$am_top_builddir"/defs-static > defs-static
-# Redefining *srcdir and *builddir variables in the environment shouldn't
-# cause problems
-env \
-  builddir=bad-dir srcdir=bad-dir \
-  top_builddir=bad-dir top_srcdir=bad-dir \
-  abs_builddir=bad-dir abs_srcdir=bad-dir \
-  abs_top_builddir=bad-dir abs_top_srcdir=bad-dir \
-  $AM_TEST_RUNNER_SHELL -c "$source_defs && echo '!OK!' > ../foo" t/dummy.sh
-$FGREP '!OK!' t/foo
-
-:
old mode 100755 (executable)
new mode 100644 (file)
index a92230e..734ad5d
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2011-2012 Free Software Foundation, Inc.
+# Copyright (C) 2011-2017 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
 # Sanity check for the automake testsuite.
 # Check the 'seq_' subroutine.
 
-. ./defs || Exit 1
+. test-init.sh
 
 plan_ 14
 
-unset stderr_fileno_ || :
+unset stderr_fileno_
 
 check_work ()
 {
   desc=$1 args=$2 exp=$3
-  st=0; got=`seq_ $args` || st=$?
+  st=0; got=$(seq_ $args) || st=$?
   command_ok_ "$desc [exit status = 0]" test $st -eq 0
   command_ok_ "$desc [output]" test x"$exp" = x"$got"
 }
diff --git a/t/self-check-shell-no-trail-bslash.sh b/t/self-check-shell-no-trail-bslash.sh
new file mode 100644 (file)
index 0000000..5003e2e
--- /dev/null
@@ -0,0 +1,81 @@
+#! /bin/sh
+# Copyright (C) 2012-2017 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 our fake "shell" used to guard against use of trailing
+# backslashes in recipes actually complains when those are used.
+
+# Our hack doesn't work with some make implementations (see comments
+# in 't/ax/shell-no-trail-bslash.in' for more details).
+required=GNUmake
+am_create_testdir=empty
+. test-init.sh
+
+cat >> Makefile <<'END'
+am__backslash = \\ # foo
+.PHONY: good bad
+good:
+       @printf '%s\n' OK
+.PHONY: bad
+bad:
+       @echo $(am__backslash)
+END
+
+SHELL=$am_testaux_builddir/shell-no-trail-bslash
+
+$SHELL -c 'exit 0'
+test "$($SHELL -c 'echo is  o\k')" = "is ok"
+
+echo 'echo is  ok\"' > ok.sh
+$SHELL ./ok.sh
+test "$($SHELL ./ok.sh)" = "is ok\""
+
+tab='  '
+nl='
+'
+for sfx in \
+  '\' \
+  '\\' \
+  '\\\\\' \
+  '\ ' \
+  "\\$tab" \
+  "\\ $tab$tab   " \
+  "\\$nl" \
+  "\\ $nl " \
+  "\\$nl$nl$nl" \
+; do
+  for pfx in "" "echo bad" ": a${nl}# multine${nl}: text"; do
+    cmd=${pfx}${sfx}
+    printf '%s' "$cmd" > bad.sh
+    for args in '-c "$cmd"' './bad.sh'; do
+      eval "\$SHELL $args 2>stderr && { cat stderr >&2; exit 1; }; :"
+      cat stderr >&2
+      $FGREP "recipe/script ends with backslash character" stderr
+      cmd="$cmd" $PERL -w -e '
+        undef $/;
+        $_ = <>;
+        index($_, $ENV{cmd}) >= 0 or exit 1;
+      ' <stderr
+      $FGREP "$cmd" stderr
+    done
+  done
+done
+
+$MAKE good
+
+run_make -E -e FAIL bad SHELL="$SHELL"
+$FGREP "recipe/script ends with backslash character" stderr
+
+:
diff --git a/t/self-check-tap.sh b/t/self-check-tap.sh
deleted file mode 100755 (executable)
index d7f788c..0000000
+++ /dev/null
@@ -1,45 +0,0 @@
-#! /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/>.
-
-# Sanity check for the automake testsuite.
-# Make sure that $am_using_tap gets automatically defined by
-# './defs-static', but can be overridden by the individual tests.
-
-. ./defs-static || exit 1
-
-set -ex
-
-$AM_TEST_RUNNER_SHELL -c \
-  '. ./defs-static && test $am_using_tap = yes' foo.tap
-
-for name in foo.test tap tap.test foo-tap; do
-  $AM_TEST_RUNNER_SHELL -c \
-    '. ./defs-static && test $am_using_tap = no' $name
-done
-
-$AM_TEST_RUNNER_SHELL -c '
-  am_using_tap=no
-  . ./defs-static
-  test $am_using_tap = no
-' foo.tap
-
-$AM_TEST_RUNNER_SHELL -c '
-  am_using_tap=yes
-  . ./defs-static
-  test $am_using_tap = yes
-' foo.test
-
-:
old mode 100755 (executable)
new mode 100644 (file)
index 3591656..c8c1880
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2011-2012 Free Software Foundation, Inc.
+# Copyright (C) 2011-2017 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
@@ -17,7 +17,7 @@
 # Sanity check for the automake testsuite.
 # Check the 'unindent' subroutine.
 
-. ./defs || Exit 1
+. test-init.sh
 
 plan_ 22
 
old mode 100755 (executable)
new mode 100644 (file)
index 4ec4710..91aa52e
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2012 Free Software Foundation, Inc.
+# Copyright (C) 2012-2017 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
 # Option 'serial-tests'.
 
 am_create_testdir=empty
-. ./defs || Exit 1
+. test-init.sh
 
 hasnt_parallel_tests ()
 {
-  $EGREP 'TEST_SUITE_LOG|TEST_LOGS|\.log.*:' $1 && Exit 1
-  grep 'recheck.*:' $1 && Exit 1
+  $EGREP 'TEST_SUITE_LOG|TEST_LOGS|\.log.*:' $1 && exit 1
+  grep 'recheck.*:' $1 && exit 1
   grep '^check-TESTS: \$(TESTS)$' $1
 }
 
@@ -62,7 +62,7 @@ $ACLOCAL
 $AUTOMAKE
 grep TEST Makefile.in # For debugging.
 hasnt_parallel_tests Makefile.in
-test ! -r test-driver
+test ! -e test-driver
 cd ..
 
 cd two
@@ -74,7 +74,7 @@ has_parallel_tests aMakefile.in
 hasnt_parallel_tests bMakefile.in
 mv aMakefile.in aMakefile.sav
 mv bMakefile.in bMakefile.sav
-test ! -r test-driver
+test ! -e test-driver
 test -f config/test-driver
 $AUTOMAKE
 diff aMakefile.sav aMakefile.in
diff --git a/t/silent-amopts.sh b/t/silent-amopts.sh
deleted file mode 100755 (executable)
index f71ad13..0000000
+++ /dev/null
@@ -1,28 +0,0 @@
-#!/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 complaints if the 'silent-rules' option is
-# used in AUTOMAKE_OPTIONS.
-
-. ./defs || Exit 1
-
-echo AUTOMAKE_OPTIONS = silent-rules > Makefile.am
-
-$ACLOCAL
-AUTOMAKE_fails
-grep "^Makefile\.am:1:.*'silent-rules'.*AM_INIT_AUTOMAKE" stderr
-
-:
old mode 100755 (executable)
new mode 100644 (file)
similarity index 60%
rename from t/silent.sh
rename to t/silent-c.sh
index f914c44..36e34a2
@@ -1,5 +1,5 @@
 #!/bin/sh
-# Copyright (C) 2009-2012 Free Software Foundation, Inc.
+# Copyright (C) 2009-2017 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/>.
 
-# Check silent-rules mode, without libtool, standard depmode case.
-
-# Please keep this file in sync with silent2.test.
+# Check silent-rules mode for C, without libtool, both with and without
+# automatic dependency tracking.
 
 required=cc
-. ./defs || Exit 1
+. test-init.sh
 
 mkdir sub
 
 cat >>configure.ac <<'EOF'
-AM_SILENT_RULES
 AC_CONFIG_FILES([sub/Makefile])
 AC_PROG_CC
-AM_PROG_CC_C_O
 AC_OUTPUT
 EOF
 
@@ -59,25 +56,33 @@ $ACLOCAL
 $AUTOMAKE --add-missing
 $AUTOCONF
 
-./configure --enable-silent-rules
-$MAKE >stdout || { cat stdout; Exit 1; }
-cat stdout
-$EGREP ' (-c|-o)' stdout && Exit 1
-grep 'mv ' stdout && Exit 1
-grep 'CC    .*foo\.' stdout
-grep 'CC .*bar\.' stdout
-grep 'CC .*baz\.' stdout
-grep 'CC .*bla\.' stdout
-grep 'CCLD .*foo' stdout
-grep 'CCLD .*bar' stdout
-grep 'CCLD .*baz' stdout
-grep 'CCLD .*bla' stdout
+for config_args in \
+  '--enable-dependency-tracking' \
+  '--disable-dependency-tracking' \
+; do
+
+  ./configure --enable-silent-rules $config_args
+
+  run_make -O
+  $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
+
+  $MAKE clean
+  run_make -O V=1
+  grep ' -c' stdout
+  grep ' -o foo' stdout
+  $EGREP '(CC|LD) ' stdout && exit 1
+
+  $MAKE distclean
 
-$MAKE clean
-$MAKE V=1 >stdout || { cat stdout; Exit 1; }
-cat stdout
-grep ' -c' stdout
-grep ' -o foo' stdout
-$EGREP '(CC|LD) ' stdout && Exit 1
+done
 
 :
old mode 100755 (executable)
new mode 100644 (file)
index 813753b..221368f
@@ -1,5 +1,5 @@
 #!/bin/sh
-# Copyright (C) 2010-2012 Free Software Foundation, Inc.
+# Copyright (C) 2010-2017 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
 # from config.site, and that this default can be overridden from
 # either the ./configure or make command line.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac <<'EOF'
-AM_SILENT_RULES
+# This line will be edited later to force silent-rules default.
 AC_OUTPUT
 EOF
 
@@ -33,7 +33,7 @@ test-nosilent:
        test x'$(AM_DEFAULT_VERBOSITY)' = x'1'
 EOF
 
-unset enable_silent_rules || :
+unset enable_silent_rules
 
 : 'No explicit default in configure.ac, enable by default in config.site'
 
@@ -51,8 +51,9 @@ $MAKE distclean
 
 : 'Disable by default in configure.ac, enable by default in config.site'
 
-sed 's/^AM_SILENT_RULES/&([no])/' configure.ac > configure.tmp
-mv -f configure.tmp configure.ac
+sed 's/.*silent-rules default.*/AM_SILENT_RULES([no])/' configure.ac > t
+diff t configure.ac && fatal_ "editing configure.ac"
+mv -f t configure.ac
 $ACLOCAL
 $AUTOCONF
 $AUTOMAKE --add-missing
@@ -67,8 +68,9 @@ $MAKE distclean
 
 : 'Enable by default in configure.ac, disable by default in config.site'
 
-sed 's/^AM_SILENT_RULES/&([yes])/' configure.ac > configure.tmp
-mv -f configure.tmp configure.ac
+sed 's/.*AM_SILENT_RULES.*/AM_SILENT_RULES([yes])/' configure.ac > t
+diff t configure.ac && fatal_ "editing configure.ac"
+mv -f t configure.ac
 $ACLOCAL
 $AUTOCONF
 $AUTOMAKE --add-missing
diff --git a/t/silent-custom.sh b/t/silent-custom.sh
new file mode 100644 (file)
index 0000000..ac2c982
--- /dev/null
@@ -0,0 +1,110 @@
+#!/bin/sh
+# Copyright (C) 2009-2017 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 user extensibility of silent-rules mode.
+
+. test-init.sh
+
+cat >>configure.ac <<'EOF'
+AC_CONFIG_FILES([sub/Makefile])
+AC_OUTPUT
+EOF
+
+# We delegate all the work to the subdir makefile.  This is done
+# to ensure any command-line setting of $(V) gets correctly passed
+# down to recursive make invocations.
+echo SUBDIRS = sub > Makefile.am
+
+mkdir sub
+cat > sub/Makefile.am <<'EOF'
+AUTOMAKE_OPTIONS = -Wno-portability-recursive
+my_verbose = $(my_verbose_$(V))
+my_verbose_ = $(my_verbose_$(AM_DEFAULT_VERBOSITY))
+my_verbose_0 = @echo " XGEN    $@";
+
+all-local: foo gen-headers
+
+list = 0 1 2
+.PHONY: gen-headers
+gen-headers:
+       @headers=`for i in $(list); do echo sub/$$i.h; done`; \
+       if $(AM_V_P); then set -x; else \
+         echo " GEN     [headers]"; \
+       fi; \
+       rm -f $$headers || exit 1; \
+## Only fake header generation.
+       : generate-header --flags $$headers
+
+foo: foo.in
+       $(my_verbose)cp $(srcdir)/foo.in $@
+EXTRA_DIST = foo.in
+CLEANFILES = foo
+EOF
+
+: > sub/foo.in
+
+$ACLOCAL
+$AUTOMAKE --add-missing
+$AUTOCONF
+
+do_check ()
+{
+  case ${1-} in
+    --silent) silent=:;;
+    --verbose) silent=false;;
+    *) fatal_ "do_check(): incorrect usage";;
+  esac
+  shift
+  $MAKE clean
+  run_make -M -- ${1+"$@"}
+  if $silent; then
+    $FGREP 'cp ' output && exit 1
+    $FGREP 'generate-header' output && exit 1
+    $FGREP 'rm -f' output && exit 1
+    grep '[012]\.h' output && exit 1
+    grep '^ XGEN    foo$' output
+    grep '^ GEN     \[headers\]$' output
+  else
+    $FGREP 'GEN ' output && exit 1
+    $FGREP 'cp ./foo.in foo' output
+    # Be prepared to handle "creative quoting" in the shell traces.
+    # See automake bug#14760.
+    ok=false
+    for q in '' \' \"; do
+      files="${q}sub/0.h${q} ${q}sub/1.h${q} ${q}sub/2.h${q}"
+      $FGREP "rm -f $files" output || continue
+      $FGREP "generate-header --flags $files" output || continue
+      ok=:
+      break
+    done
+    $ok || exit 1
+    unset ok
+  fi
+}
+
+./configure --enable-silent-rules
+do_check --silent
+do_check --verbose V=1
+
+$MAKE distclean
+
+./configure --disable-silent-rules
+do_check --verbose
+do_check --silent V=0
+
+$MAKE distclean
+
+:
old mode 100755 (executable)
new mode 100644 (file)
similarity index 81%
rename from t/silentcxx.sh
rename to t/silent-cxx.sh
index a41cc2d..58d32b9
@@ -1,5 +1,5 @@
 #!/bin/sh
-# Copyright (C) 2010-2012 Free Software Foundation, Inc.
+# Copyright (C) 2010-2017 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/>.
 
-# Check silent-rules mode for C++.
-# This test should work with generic C++ compilers; keep it in sync with
-# sister test 'silentcxx-gcc.test', which requires the GNU C++ compiler
-# and forces the use of gcc depmode.
+# Check silent-rules mode for C++, both with and without automatic
+# dependency tracking.
 
 required=c++
-. ./defs || Exit 1
+. test-init.sh
 
 mkdir sub
 
 cat >>configure.ac <<'EOF'
-AM_SILENT_RULES
 AC_PROG_CXX
 AC_CONFIG_FILES([sub/Makefile])
 AC_OUTPUT
@@ -74,12 +71,13 @@ $FGREP am_cv_CXX_dependencies_compiler_type configure
 for config_args in \
   --enable-dependency-tracking --disable-dependency-tracking
 do
+
   ./configure $config_args --enable-silent-rules
-  $MAKE >stdout || { cat stdout; Exit 1; }
-  cat stdout
 
-  $EGREP ' (-c|-o)' stdout && Exit 1
-  grep 'mv ' stdout && Exit 1
+  run_make -O
+
+  $EGREP ' (-c|-o)' stdout && exit 1
+  grep 'mv ' stdout && exit 1
 
   grep 'CXX .*foo\.'  stdout
   grep 'CXX .*baz\.'  stdout
@@ -93,13 +91,12 @@ do
   # Ensure a clean rebuild.
   $MAKE clean
 
-  $MAKE V=1 >stdout || { cat stdout; Exit 1; }
-  cat stdout
+  run_make -O V=1
 
   grep ' -c ' stdout
   grep ' -o ' stdout
 
-  $EGREP '(CXX|LD) ' stdout && Exit 1
+  $EGREP '(CXX|LD) ' stdout && exit 1
 
   # Ensure a clean reconfiguration/rebuild.
   $MAKE clean
old mode 100755 (executable)
new mode 100644 (file)
similarity index 81%
rename from t/silentf77.sh
rename to t/silent-f77.sh
index ce6f6a0..9199ae4
@@ -1,5 +1,5 @@
 #!/bin/sh
-# Copyright (C) 2010-2012 Free Software Foundation, Inc.
+# Copyright (C) 2010-2017 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 # Check silent-rules mode for Fortran 77.
-# Keep this ins sync with the sister test silentf90.test.
+# Keep this ins sync with the sister test 'silent-f90.sh'.
 
 required=fortran77
-. ./defs || Exit 1
+. test-init.sh
 
 mkdir sub
 
 cat >>configure.ac <<'EOF'
-AM_SILENT_RULES
 AC_PROG_F77
 AC_CONFIG_FILES([sub/Makefile])
 AC_OUTPUT
@@ -59,15 +58,14 @@ $AUTOMAKE --add-missing
 $AUTOCONF
 
 ./configure --enable-silent-rules
-$MAKE >stdout || { cat stdout; Exit 1; }
-cat stdout
+run_make -O
 # Avoid spurious failures with SunStudio Fortran compilers.
 sed '/^NOTICE:/d' stdout > t
 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
@@ -76,17 +74,16 @@ grep 'F77LD .*bar1' stdout
 grep 'F77LD .*foo2' stdout
 grep 'F77LD .*bar2' stdout
 
-$EGREP '(FC|FCLD) ' stdout && Exit 1
+$EGREP '(FC|FCLD) ' stdout && exit 1
 
 # Ensure a clean rebuild.
 $MAKE clean
 
-$MAKE V=1 >stdout || { cat stdout; Exit 1; }
-cat stdout
+run_make -O V=1
 
 grep ' -c ' stdout
 grep ' -o ' stdout
 
-$EGREP '(F77|FC|LD) ' stdout && Exit 1
+$EGREP '(F77|FC|LD) ' stdout && exit 1
 
 :
old mode 100755 (executable)
new mode 100644 (file)
similarity index 81%
rename from t/silentf90.sh
rename to t/silent-f90.sh
index 8bb06b2..5fbd897
@@ -1,5 +1,5 @@
 #!/bin/sh
-# Copyright (C) 2010-2012 Free Software Foundation, Inc.
+# Copyright (C) 2010-2017 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 # Check silent-rules mode for Fortran 90.
-# Keep this ins sync with the sister test silentf77.test.
+# Keep this ins sync with the sister test 'silent-f77.sh'.
 
 required=fortran
-. ./defs || Exit 1
+. test-init.sh
 
 mkdir sub
 
 cat >>configure.ac <<'EOF'
-AM_SILENT_RULES
 AC_PROG_FC
 AC_CONFIG_FILES([sub/Makefile])
 AC_OUTPUT
@@ -59,15 +58,14 @@ $AUTOMAKE --add-missing
 $AUTOCONF
 
 ./configure --enable-silent-rules
-$MAKE >stdout || { cat stdout; Exit 1; }
-cat stdout
+run_make -O
 # Avoid spurious failures with SunStudio Fortran compilers.
 sed '/^NOTICE:/d' stdout > t
 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
@@ -76,17 +74,16 @@ grep 'FCLD .*bar1' stdout
 grep 'FCLD .*foo2' stdout
 grep 'FCLD .*bar2' stdout
 
-$EGREP '(F77|F77LD) ' stdout && Exit 1
+$EGREP '(F77|F77LD) ' stdout && exit 1
 
 # Ensure a clean rebuild.
 $MAKE clean
 
-$MAKE V=1 >stdout || { cat stdout; Exit 1; }
-cat stdout
+run_make -O V=1
 
 grep ' -c ' stdout
 grep ' -o ' stdout
 
-$EGREP '(F77|FC|LD) ' stdout && Exit 1
+$EGREP '(F77|FC|LD) ' stdout && exit 1
 
 :
old mode 100755 (executable)
new mode 100644 (file)
similarity index 55%
rename from t/silent7.sh
rename to t/silent-gen.sh
index 02ef287..3de5a3e
@@ -1,5 +1,5 @@
 #!/bin/sh
-# Copyright (C) 2009-2012 Free Software Foundation, Inc.
+# Copyright (C) 2009-2017 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/>.
 
-# Check user extensibility of silent-rules mode.
+# Silent rules: use of pre-defined variables $(AM_V_GEN) and $(AM_V_at).
+# Incidentally, also check that silent rules are disabled by default.
 
-. ./defs || Exit 1
+. test-init.sh
 
-cat >>configure.ac <<'EOF'
-AM_SILENT_RULES
-AC_OUTPUT
-EOF
+echo AC_OUTPUT >> configure.ac
 
 cat > Makefile.am <<'EOF'
 all-local: foo
@@ -41,52 +39,44 @@ $ACLOCAL
 $AUTOMAKE --add-missing
 $AUTOCONF
 
-./configure --disable-silent-rules
-$MAKE >stdout || { cat stdout; Exit 1; }
-cat stdout
-grep 'GEN ' stdout && Exit 1
+# Silent rules are disabled by default, since we haven't called
+# "AM_SILENT_RULES([yes])" explicitly.
+./configure
+run_make -O
+grep 'GEN ' stdout && exit 1
 grep 'cp ' stdout
 grep 'echo ' stdout
 
 $MAKE clean
-$MAKE V=1 >stdout || { cat stdout; Exit 1; }
-cat stdout
-grep 'GEN ' stdout && Exit 1
+run_make -O V=1
+grep 'GEN ' stdout && exit 1
 grep 'cp ' stdout
 grep 'echo ' stdout
 
 $MAKE clean
-$MAKE V=0 >stdout || { cat stdout; Exit 1; }
-cat stdout
+run_make -O V=0
 grep 'GEN .*foo' stdout
-grep 'cp ' stdout && Exit 1
-grep 'echo ' stdout && Exit 1
+grep 'cp ' stdout && exit 1
+grep 'echo ' stdout && exit 1
 
 $MAKE distclean
 
 ./configure --enable-silent-rules
-$MAKE >stdout || { cat stdout; Exit 1; }
-cat stdout
+run_make -O
 grep 'GEN .*foo' stdout
-grep 'cp ' stdout && Exit 1
-grep 'echo ' stdout && Exit 1
+grep 'cp ' stdout && exit 1
+grep 'echo ' stdout && exit 1
 
 $MAKE clean
-$MAKE V=0 >stdout || { cat stdout; Exit 1; }
-cat stdout
+run_make -O V=0
 grep 'GEN .*foo' stdout
-grep 'cp ' stdout && Exit 1
-grep 'echo ' stdout && Exit 1
+grep 'cp ' stdout && exit 1
+grep 'echo ' stdout && exit 1
 
 $MAKE clean
-$MAKE V=1 >stdout || { cat stdout; Exit 1; }
-cat stdout
-grep 'GEN ' stdout && Exit 1
+run_make -O V=1
+grep 'GEN ' stdout && exit 1
 grep 'cp ' stdout
 grep 'echo ' stdout
 
-# Ensure that setting 'silent-rules' in a Makefile.am produces an error.
-echo 'AUTOMAKE_OPTIONS = silent-rules' >> Makefile.am
-AUTOMAKE_fails --force
-
 :
old mode 100755 (executable)
new mode 100644 (file)
index ccc9a8f..9fda9ba
@@ -1,5 +1,5 @@
 #!/bin/sh
-# Copyright (C) 2010-2012 Free Software Foundation, Inc.
+# Copyright (C) 2010-2017 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
 # Check silent-rules mode for Lex.
 
 required='cc lex'
-. ./defs || Exit 1
+. test-init.sh
 
 mkdir sub
 
 cat >>configure.ac <<'EOF'
-AM_SILENT_RULES
-AM_PROG_CC_C_O
 AC_PROG_LEX
 AC_CONFIG_FILES([sub/Makefile])
 AC_OUTPUT
@@ -70,16 +68,15 @@ $AUTOMAKE --add-missing
 $AUTOCONF
 
 # Ensure per-target rules are used, to ensure their coverage below.
-$FGREP 'foo2-foo.c' Makefile.in || Exit 99
-$FGREP 'bar2-bar.c' sub/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; }
-cat stdout
+run_make -O
 
-$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
@@ -95,11 +92,10 @@ grep 'CCLD .*bar2' stdout
 # different set of rules.
 $MAKE clean
 
-$MAKE >stdout || { cat stdout; Exit 1; }
-cat stdout
+run_make -O
 
-$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 LEX, as probably lex hasn't been re-run.
 grep ' CC .*foo\.' stdout
@@ -113,27 +109,25 @@ grep 'CCLD .*bar2' stdout
 $MAKE clean
 rm -f *foo.c sub/*bar.c
 
-$MAKE V=1 >stdout || { cat stdout; Exit 1; }
-cat stdout
+run_make -O V=1
 
 grep ' -c ' stdout
 grep ' -o ' stdout
 grep 'ylwrap ' stdout
 
-$EGREP '(LEX|CC|CCLD) ' stdout && Exit 1
+$EGREP '(LEX|CC|CCLD) ' stdout && exit 1
 
 # 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 V=1 >stdout || { cat stdout; Exit 1; }
-cat stdout
+run_make -O V=1
 
 # Don't look for ylwrap, as probably lex hasn't been re-run.
 grep ' -c ' stdout
 grep ' -o ' stdout
 
-$EGREP '(LEX|CC|CCLD) ' stdout && Exit 1
+$EGREP '(LEX|CC|CCLD) ' stdout && exit 1
 
 :
old mode 100755 (executable)
new mode 100644 (file)
similarity index 60%
rename from t/silent3.sh
rename to t/silent-lt.sh
index 564a490..bd6bf70
@@ -1,5 +1,5 @@
 #!/bin/sh
-# Copyright (C) 2009-2012 Free Software Foundation, Inc.
+# Copyright (C) 2009-2017 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/>.
 
-# Check silent-rules mode, with libtool, standard depmode case.
-
-# Please keep this file in sync with silent4.test and silent9.test.
+# Check silent-rules mode for C, with libtool, both with and without
+# automatic dependency tracking.
 
 required='cc libtoolize'
-. ./defs || Exit 1
+. test-init.sh
 
 mkdir sub
 
 cat >>configure.ac <<'EOF'
-AM_SILENT_RULES
 AC_CONFIG_FILES([sub/Makefile])
 AC_PROG_CC
 AM_PROG_AR
-AM_PROG_CC_C_O
 AC_PROG_LIBTOOL
 AC_OUTPUT
 EOF
@@ -62,26 +59,35 @@ $ACLOCAL
 $AUTOMAKE --add-missing
 $AUTOCONF
 
-./configure --enable-silent-rules
-$MAKE >stdout || { cat stdout; Exit 1; }
-cat stdout
-$EGREP ' (-c|-o)' stdout && Exit 1
-grep 'mv ' stdout && Exit 1
-grep ' CC .*foo\.' stdout
-grep ' CC .*bar\.' stdout
-grep ' CC .*baz\.' stdout
-grep ' CC .*bla\.' stdout
-grep ' CCLD .*foo' stdout
-grep ' CCLD .*bar' stdout
-grep ' CCLD .*baz' stdout
-grep ' CCLD .*bla' stdout
-
-$MAKE clean
-$MAKE V=1 >stdout || { cat stdout; Exit 1; }
-cat stdout
-grep ' -c' stdout
-grep ' -o libfoo' 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
+for config_args in \
+  '--enable-dependency-tracking' \
+  '--disable-dependency-tracking' \
+; do
+
+  ./configure --enable-silent-rules $config_args
+
+  run_make -O
+
+  $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
+
+  $MAKE clean
+  run_make -O V=1
+  grep ' -c' stdout
+  grep ' -o libfoo' stdout
+  # The libtool command line can contain e.g. a '--tag=CC' option.
+  sed 's/--tag=[^ ]*/--tag=x/g' stdout | $EGREP '(CC|LD) ' && exit 1
+
+  $MAKE distclean
+
+done
 
 :
diff --git a/t/silent-many-gcc.sh b/t/silent-many-gcc.sh
deleted file mode 100755 (executable)
index 8b457ca..0000000
+++ /dev/null
@@ -1,241 +0,0 @@
-#!/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 silent-rules mode, with gcc depmode and many languages at once.
-# This test partly overlaps with other silent*.test, but it serves as
-# a stress test by using many different languages at once -- so don't
-# remove this test script.
-# This test requires the GNU compilers; keep it in sync with sister test
-# 'silent-many-generic.test', which should work with generic compilers.
-
-required='gcc g++ gfortran lex yacc'
-. ./defs || Exit 1
-
-# Avoids too much code duplication.
-do_and_check_silent_build ()
-{
-  case $1 in
-    --rebuild) rebuild=true;;
-            *) rebuild=false;;
-  esac
-
-  $MAKE >stdout || { cat stdout; Exit 1; }
-  cat stdout
-  # Avoid spurious failures with SunStudio Fortran compilers.
-  sed '/^NOTICE:/d' stdout > t
-  mv -f t stdout
-  cat stdout
-
-  $EGREP ' (-c|-o)' stdout && Exit 1
-  $EGREP '(mv|ylwrap) ' stdout && Exit 1
-
-  grep 'CXX .*foo1\.' stdout
-  grep 'CXX .*baz1\.' stdout
-  grep 'FC .*foo2\.'  stdout
-  grep 'FC .*baz2\.'  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 'CXXLD .*baz' stdout
-  grep 'CCLD .*bla'  stdout
-
-  if $rebuild; then :; else
-    grep 'YACC .*foo6\.' stdout
-    grep 'YACC .*baz6\.' stdout
-    grep 'LEX .*foo5\.'  stdout
-    grep 'LEX .*baz5\.'  stdout
-  fi
-
-  unset rebuild
-}
-
-# Avoids too much code duplication.
-do_and_check_verbose_build ()
-{
-  case $1 in
-    --rebuild) rebuild=true;;
-            *) rebuild=false;;
-  esac
-
-  $MAKE V=1 >stdout || { cat stdout; Exit 1; }
-  cat stdout
-
-  grep ' -c ' stdout
-  grep ' -o ' stdout
-
-  $EGREP '(CC|CXX|FC|F77|LD) ' stdout && Exit 1
-
-  if $rebuild; then :; else
-    grep 'ylwrap ' stdout
-    $EGREP '(LEX|YACC) ' stdout && Exit 1
-  fi
-
-  unset rebuild
-}
-
-mkdir sub
-
-cat >>configure.ac <<'EOF'
-AM_SILENT_RULES
-AM_PROG_CC_C_O
-AC_PROG_CXX
-AC_PROG_F77
-AC_PROG_FC
-AC_PROG_LEX
-AC_PROG_YACC
-AC_CONFIG_FILES([sub/Makefile])
-AC_OUTPUT
-EOF
-
-cat > Makefile.am <<'EOF'
-# Need generic and non-generic rules.
-bin_PROGRAMS = foo bar fo2
-bar_CFLAGS = $(AM_CFLAGS)
-foo_SOURCES = foo1.cpp foo2.f90 foo3.f foo5.l foo6.y
-fo2_SOURCES = $(foo_SOURCES)
-fo2_CPPFLAGS = $(AM_CPPFLAGS)
-fo2_FFLAGS = $(AM_FFLAGS)
-fo2_FCFLAGS = $(AM_FCFLAGS)
-fo2_YFLAGS = -v
-fo2_LFLAGS = -n
-SUBDIRS = sub
-AM_YFLAGS = -d
-LDADD = $(LEXLIB)
-BUILT_SOURCES = foo6.h
-EOF
-
-cat > sub/Makefile.am <<'EOF'
-AUTOMAKE_OPTIONS = subdir-objects
-# Need generic and non-generic rules.
-bin_PROGRAMS = baz bla ba2
-bla_CFLAGS = $(AM_CFLAGS)
-baz_SOURCES = baz1.cpp baz2.f90 baz3.f baz5.l baz6.y
-ba2_SOURCES = $(baz_SOURCES)
-ba2_CPPFLAGS = $(AM_CPPFLAGS)
-ba2_FFLAGS = $(AM_FFLAGS)
-ba2_FCFLAGS = $(AM_FCFLAGS)
-ba2_YFLAGS = -v
-ba2_LFLAGS = -n
-AM_YFLAGS = -d
-LDADD = $(LEXLIB)
-BUILT_SOURCES = baz6.h
-EOF
-
-cat > foo1.cpp <<'EOF'
-int main ()
-{
-  return 0;
-}
-EOF
-cat > foo2.f90 <<'EOF'
-      subroutine foo2
-      return
-      end
-EOF
-cat > foo3.f <<'EOF'
-      subroutine foo3
-      return
-      end
-EOF
-cat > foo5.l <<'EOF'
-%{
-#define YY_NO_UNISTD_H 1
-%}
-%%
-"END"   return EOF;
-.
-%%
-/* Avoid possible link errors. */
-int yywrap (void)
-{
-  return 1;
-}
-EOF
-cat > foo6.y <<'EOF'
-%{
-void yyerror (char *s) {}
-%}
-%token EOF
-%%
-fubar : 'f' 'o' 'o' 'b' 'a' 'r' EOF {};
-EOF
-cp foo1.cpp bar.c
-cp foo1.cpp sub/baz.c
-cp foo1.cpp sub/bla.c
-cp foo1.cpp sub/baz1.cpp
-cp foo2.f90 sub/baz2.f90
-cp foo3.f sub/baz3.f
-cp foo5.l sub/baz5.l
-cp foo6.y sub/baz6.y
-
-$ACLOCAL
-$AUTOMAKE --add-missing
-$AUTOCONF
-
-# Sanity check: make sure the cache variables we force are really
-# used by configure.
-$FGREP am_cv_CC_dependencies_compiler_type configure
-$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.o' Makefile.in
-$FGREP 'fo2-foo5.c' Makefile.in
-$FGREP 'fo2-foo6.c' Makefile.in
-
-# Force gcc ("fast") depmode.
-depmodes="am_cv_CC_dependencies_compiler_type=gcc \
-          am_cv_CXX_dependencies_compiler_type=gcc"
-# This apparently useless "for" loop is here to simplify the syncing
-# with sister test 'silent-many-generic.test'.
-for config_args in \
-  "$depmodes"
-do
-
-  ./configure $config_args --enable-silent-rules
-
-  do_and_check_silent_build
-  # 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
-  do_and_check_silent_build --rebuild
-
-  # Ensure a clean rebuild.
-  $MAKE clean
-  # This is required, since these files are not removed by 'make clean'
-  # (as dictated by the GNU Coding Standards).
-  rm -f *foo5.c *foo6.[ch] sub/*baz5.c sub/*baz6.[ch]
-
-  do_and_check_verbose_build
-  # 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
-  do_and_check_verbose_build --rebuild
-
-  # Ensure a clean reconfiguration/rebuild.
-  $MAKE clean
-  $MAKE maintainer-clean
-
-done
-
-:
old mode 100755 (executable)
new mode 100644 (file)
similarity index 84%
rename from t/silent-many-generic.sh
rename to t/silent-many-languages.sh
index 3949009..daab9ee
@@ -1,5 +1,5 @@
 #!/bin/sh
-# Copyright (C) 2009-2012 Free Software Foundation, Inc.
+# Copyright (C) 2009-2017 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 # Check silent-rules mode, with many languages at once.
-# This test partly overlaps with other silent*.test, but it serves as
+# This test partly overlaps with other 'silent*.sh', but it serves as
 # a stress test by using many different languages at once -- so don't
 # remove this test script.
-# This test should work with generic compilers; keep it in sync with
-# sister test 'silent-many-gcc.test', which requires the GNU compilers
-# and forces the use of gcc depmode.
 
 required='cc c++ fortran fortran77 lex yacc'
-. ./defs || Exit 1
+. test-init.sh
 
 # Avoids too much code duplication.
 do_and_check_silent_build ()
@@ -33,15 +30,14 @@ do_and_check_silent_build ()
             *) rebuild=false;;
   esac
 
-  $MAKE >stdout || { cat stdout; Exit 1; }
-  cat stdout
+  run_make -O
   # Avoid spurious failures with SunStudio Fortran compilers.
   sed '/^NOTICE:/d' stdout > t
   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 'CXX .*foo1\.' stdout
   grep 'CXX .*baz1\.' stdout
@@ -59,7 +55,7 @@ do_and_check_silent_build ()
   grep 'CXXLD .*baz' stdout
   grep 'CCLD .*bla'  stdout
 
-  if $rebuild; then :; else
+  if ! $rebuild; then
     grep 'YACC .*foo6\.' stdout
     grep 'YACC .*baz6\.' stdout
     grep 'LEX .*foo5\.'  stdout
@@ -77,17 +73,16 @@ do_and_check_verbose_build ()
             *) rebuild=false;;
   esac
 
-  $MAKE V=1 >stdout || { cat stdout; Exit 1; }
-  cat stdout
+  run_make -O V=1
 
   grep ' -c ' stdout
   grep ' -o ' stdout
 
-  $EGREP '(CC|CXX|FC|F77|LD) ' stdout && Exit 1
+  $EGREP '(CC|CXX|FC|F77|LD) ' stdout && exit 1
 
-  if $rebuild; then :; else
+  if ! $rebuild; then
     grep 'ylwrap ' stdout
-    $EGREP '(LEX|YACC) ' stdout && Exit 1
+    $EGREP '(LEX|YACC) ' stdout && exit 1
   fi
 
   unset rebuild
@@ -96,20 +91,12 @@ do_and_check_verbose_build ()
 mkdir sub
 
 cat >>configure.ac <<'EOF'
-AM_SILENT_RULES
-AM_PROG_CC_C_O
 AC_PROG_F77
 AC_PROG_FC
 AC_PROG_LEX
 AC_PROG_YACC
 AC_PROG_CXX
 
-# FIXME: remove this hack once the requirements c++, fortran and fortran77
-# are implemented correctly.
-test -n "`echo $CXX`" || AC_MSG_ERROR([C++ compiler not found], [77])
-test -n "`echo $FC`"  || AC_MSG_ERROR([Fortran compiler not found], [77])
-test -n "`echo $F77`" || AC_MSG_ERROR([Fortran 77 compiler not found], [77])
-
 # The SunStudio C++ compiler is unfortunately named 'sunCC' (or even just
 # 'CC', yuck!); similarly and the Portland group C++ compiler is named
 # 'pgCC'.  This can cause problems with our grepping checks on the output
@@ -216,7 +203,7 @@ cp foo6.y sub/baz6.y
 
 mkdir bin
 saved_PATH=$PATH; export saved_PATH
-PATH=`pwd`/bin$PATH_SEPARATOR$PATH; export PATH
+PATH=$(pwd)/bin$PATH_SEPARATOR$PATH; export PATH
 
 $ACLOCAL
 $AUTOMAKE --add-missing
old mode 100755 (executable)
new mode 100644 (file)
index c579e2c..4d97669
@@ -1,5 +1,5 @@
 #!/bin/sh
-# Copyright (C) 2011-2012 Free Software Foundation, Inc.
+# Copyright (C) 2011-2017 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
 # Check silent-rules mode, on 'make' implementations that do not
 # support nested variables (Bug#9928, Bug#10237).
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat >>configure.ac <<'EOF'
 AM_SILENT_RULES
 AC_PROG_CC
-AM_PROG_CC_C_O
 AC_OUTPUT
 EOF
 
@@ -96,31 +95,30 @@ a = $(b$(c))
 all:
        touch bar
 END
-$MAKE && Exit 99
+$MAKE && exit 99
 mv -f Makefile foo.mk
-$MAKE -f foo.mk && Exit 99
-cat foo.mk | $MAKE -f - && Exit 99
-test -f bar && Exit 99
+$MAKE -f foo.mk && exit 99
+cat foo.mk | $MAKE -f - && exit 99
+test -f bar && exit 99
 sed '/a =/d' foo.mk > Makefile
-$MAKE && test -f bar || Exit 99
+$MAKE && test -f bar || exit 99
 rm -f bar Makefile foo.mk
 
 $ACLOCAL
 $AUTOMAKE --add-missing
 $AUTOCONF
 
-./configure --enable-silent-rules >stdout || { cat stdout; Exit 1; }
+./configure --enable-silent-rules >stdout || { cat stdout; exit 1; }
 cat stdout
 grep '^checking whether \./mymake supports nested variables\.\.\. no *$' \
   stdout
 $EGREP 'CC|AM_V|GEN' Makefile # For debugging.
 grep '^AM_V_CC =  *\$(am__v_CC_0) *$' Makefile
 grep '^AM_V_GEN =  *\$(am__v_GEN_0) *$' Makefile
-$MAKE >stdout || { cat stdout; Exit 1; }
-cat stdout
-$EGREP ' (-c|-o)' stdout && Exit 1
-grep 'mv ' stdout && Exit 1
-grep 'echo .*oop' stdout && Exit 1
+run_make -O
+$EGREP ' (-c|-o)' stdout && exit 1
+grep 'mv ' stdout && exit 1
+grep 'echo .*oop' stdout && exit 1
 grep 'CC .*foo\.' stdout
 grep 'CC .*bar\.' stdout
 grep 'CCLD .*foo' stdout
@@ -128,7 +126,7 @@ grep 'CCLD .*bar' stdout
 grep 'PKG-GEN .*oop' stdout
 $MAKE distclean
 
-./configure --disable-silent-rules > stdout || { cat stdout; Exit 1; }
+./configure --disable-silent-rules > stdout || { cat stdout; exit 1; }
 cat stdout
 grep '^checking whether \./mymake supports nested variables\.\.\. no *$' \
   stdout
@@ -136,12 +134,11 @@ $EGREP 'CC|AM_V|GEN' Makefile # For debugging.
 grep '^AM_V_CC =  *\$(am__v_CC_1) *$' Makefile
 grep '^AM_V_GEN =  *\$(am__v_GEN_1) *$' Makefile
 
-$MAKE >stdout || { cat stdout; Exit 1; }
-cat stdout
+run_make -O
 grep ' -c' stdout
 grep ' -o foo' stdout
 grep ' -o bar' stdout
 grep 'echo .*>oop' stdout
-$EGREP '(CC|LD) ' stdout && Exit 1
+$EGREP '(CC|LD) ' stdout && exit 1
 
 :
diff --git a/t/silent-nowarn.sh b/t/silent-nowarn.sh
deleted file mode 100755 (executable)
index 5a547bc..0000000
+++ /dev/null
@@ -1,44 +0,0 @@
-#!/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/>.
-
-# Check that the 'silent-rules' mode suppresses the warnings for recursive
-# make variable expansions.  This should happen regardless of whether and
-# where these warnings are requested.
-
-. ./defs || Exit 1
-
-cat > configure.ac <<END
-AC_INIT([$me], [1.0])
-# Yes, we repeat the warnings two times, both before and after
-# 'silent-rules'.  This is deliberate.
-AM_INIT_AUTOMAKE([gnu -Wall -Wportability-recursive
-                      silent-rules
-                      -Wall -Wportability-recursive])
-AC_CONFIG_FILES([Makefile])
-END
-
-cat > Makefile.am <<'END'
-AUTOMAKE_OPTIONS = gnu -Wall -Wportability-recursive
-foo = $($(v)) $(x$(v)) $($(v)x) $(y$(v)z)
-END
-
-# Files required bu gnu strictness.
-touch AUTHORS ChangeLog COPYING INSTALL NEWS README THANKS
-
-$ACLOCAL
-$AUTOMAKE --gnu -Wall -Wportability-recursive
-
-:
diff --git a/t/silent-texi.sh b/t/silent-texi.sh
new file mode 100644 (file)
index 0000000..9e6ae39
--- /dev/null
@@ -0,0 +1,82 @@
+#!/bin/sh
+# Copyright (C) 2009-2017 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'
+. test-init.sh
+
+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.
+run_make -O -E -- V=0 dvi html info ps pdf
+grep '^  DVIPS    foo\.ps$'         stdout
+grep '^  MAKEINFO foo\.html$'       stdout
+# NetBSD make will print './foo.info' instead of 'foo.info'.
+$EGREP '^  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
+# NetBSD make will print './sub/zardoz.info' instead of 'zardoz.info'.
+$EGREP '^  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
+# No verbose output from TeX nor dvips.
+$EGREP '(zardoz|foo)\.log|3\.14|Copyright|This is|[Oo]utput ' \
+  stdout stderr && exit 1
+
+# Verbose mode output.
+$MAKE clean || exit 1
+run_make -M V=1 dvi html info ps pdf
+$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
+
+:
old mode 100755 (executable)
new mode 100644 (file)
index 6a738cb..ff3ea36
@@ -1,5 +1,5 @@
 #!/bin/sh
-# Copyright (C) 2011-2012 Free Software Foundation, Inc.
+# Copyright (C) 2011-2017 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
 # involved (i.e., the '-d' option is in *YFLAGS).
 
 required='cc yacc'
-. ./defs || Exit 1
+. test-init.sh
 
 mkdir sub
 
 cat >>configure.ac <<'EOF'
-AM_SILENT_RULES
 AC_PROG_YACC
 AC_PROG_CC
 AC_OUTPUT
@@ -61,11 +60,10 @@ $FGREP '$(bar_YFLAGS)' Makefile.in
 
 ./configure --enable-silent-rules
 
-$MAKE >stdout || { cat stdout; Exit 1; }
-cat stdout
+run_make -O
 
-$EGREP ' (-c|-d|-o)' stdout && Exit 1
-$EGREP '(mv|ylwrap) ' stdout && Exit 1
+$EGREP ' (-c|-d|-o)' stdout && exit 1
+$EGREP '(mv|ylwrap) ' stdout && exit 1
 
 grep 'YACC  *parse\.c' stdout
 grep 'updating  *parse\.h' stdout
@@ -79,11 +77,10 @@ grep 'CCLD  *bar' stdout
 
 # Check recovering from header removal.
 rm -f parse.h bar-parse.h
-$MAKE parse.h bar-parse.h >stdout || { cat stdout; Exit 1; }
-cat stdout
+run_make -O parse.h bar-parse.h
 
-$EGREP ' (-c|-d|-o)' stdout && Exit 1
-$EGREP '(mv|ylwrap) ' stdout && Exit 1
+$EGREP ' (-c|-d|-o)' stdout && exit 1
+$EGREP '(mv|ylwrap) ' stdout && exit 1
 
 grep 'YACC  *parse\.c' stdout
 grep 'updating  *parse\.h' stdout
@@ -95,11 +92,10 @@ grep 'updating  *bar-parse\.h' stdout
 # different set of rules.
 $MAKE clean
 
-$MAKE >stdout || { cat stdout; Exit 1; }
-cat stdout
+run_make -O
 
-$EGREP ' (-c|-d|-o)' stdout && Exit 1
-$EGREP '(mv|ylwrap) ' stdout && Exit 1
+$EGREP ' (-c|-d|-o)' stdout && exit 1
+$EGREP '(mv|ylwrap) ' stdout && exit 1
 
 # Don't look for "YACC *.c" and "updating *.h", as yacc shouldn't
 # have been re-run.
@@ -110,11 +106,10 @@ grep 'CCLD  *bar' stdout
 
 # Check recovering from header removal.
 rm -f parse.h bar-parse.h
-$MAKE parse.h bar-parse.h >stdout || { cat stdout; Exit 1; }
-cat stdout
+run_make -O parse.h bar-parse.h
 
-$EGREP ' (-c|-d|-o)' stdout && Exit 1
-$EGREP '(mv|ylwrap) ' stdout && Exit 1
+$EGREP ' (-c|-d|-o)' stdout && exit 1
+$EGREP '(mv|ylwrap) ' stdout && exit 1
 
 grep 'YACC  *parse\.c' stdout
 grep 'updating  *parse\.h' stdout
@@ -126,48 +121,44 @@ $MAKE maintainer-clean
 
 ./configure --enable-silent-rules
 
-$MAKE V=1 >stdout || { cat stdout; Exit 1; }
-cat stdout
+run_make -O V=1
 
 grep ' -c ' stdout
 grep ' -o ' stdout
 grep ' -d ' stdout
 grep 'ylwrap ' stdout
 
-$EGREP '(YACC|CC|CCLD) ' stdout && Exit 1
+$EGREP '(YACC|CC|CCLD) ' stdout && exit 1
 
 # Check recovering from header removal.
 rm -f parse.h bar-parse.h
-$MAKE V=1 parse.h bar-parse.h >stdout || { cat stdout; Exit 1; }
-cat stdout
+run_make -O V=1 parse.h bar-parse.h
 
 grep ' -d ' stdout
 grep 'ylwrap ' stdout
 
-grep 'YACC' stdout && Exit 1
+grep 'YACC' stdout && exit 1
 
 # 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 V=1 >stdout || { cat stdout; Exit 1; }
-cat stdout
+run_make -O V=1
 
 # Don't look for ylwrap, as probably lex hasn't been re-run.
 grep ' -c ' stdout
 grep ' -o ' stdout
 
-$EGREP '(YACC|CC|CCLD) ' stdout && Exit 1
+$EGREP '(YACC|CC|CCLD) ' stdout && exit 1
 
 # Check recovering from header removal.
 rm -f parse.h bar-parse.h
-$MAKE V=1 parse.h bar-parse.h >stdout || { cat stdout; Exit 1; }
-cat stdout
+run_make -O V=1 parse.h bar-parse.h
 
 grep ' -d ' stdout
 grep 'ylwrap ' stdout
 
-grep 'YACC' stdout && Exit 1
+grep 'YACC' stdout && exit 1
 
 :
old mode 100755 (executable)
new mode 100644 (file)
index 639b678..48a4bd8
@@ -1,5 +1,5 @@
 #!/bin/sh
-# Copyright (C) 2010-2012 Free Software Foundation, Inc.
+# Copyright (C) 2010-2017 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 # Check silent-rules mode for Yacc.
-# Keep this in sync with sister test 'silent-yacc-gcc.test'.
 
 required='cc yacc'
-. ./defs || Exit 1
+. test-init.sh
 
 mkdir sub
 
 cat >>configure.ac <<'EOF'
-AM_SILENT_RULES
-AM_PROG_CC_C_O
+AC_PROG_CC
 AC_PROG_YACC
 AC_CONFIG_FILES([sub/Makefile])
 AC_OUTPUT
@@ -67,16 +65,15 @@ $AUTOMAKE --add-missing
 $AUTOCONF
 
 # Ensure per-target rules are used, to ensure their coverage below.
-$FGREP 'foo2-foo.c' Makefile.in || Exit 99
-$FGREP 'bar2-bar.c' sub/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; }
-cat stdout
+run_make -O
 
-$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
@@ -92,11 +89,10 @@ grep 'CCLD .*bar2' stdout
 # different set of rules.
 $MAKE clean
 
-$MAKE >stdout || { cat stdout; Exit 1; }
-cat stdout
+run_make -O
 
-$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
@@ -110,27 +106,25 @@ grep 'CCLD .*bar2' stdout
 $MAKE clean
 rm -f *foo.[ch] sub/*bar.[ch]
 
-$MAKE V=1 >stdout || { cat stdout; Exit 1; }
-cat stdout
+run_make -O V=1
 
 grep ' -c ' stdout
 grep ' -o ' stdout
 grep 'ylwrap ' stdout
 
-$EGREP '(YACC|CC|CCLD) ' stdout && Exit 1
+$EGREP '(YACC|CC|CCLD) ' stdout && exit 1
 
 # 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 V=1 >stdout || { cat stdout; Exit 1; }
-cat stdout
+run_make -O V=1
 
 # Don't look for ylwrap, as probably lex hasn't been re-run.
 grep ' -c ' stdout
 grep ' -o ' stdout
 
-$EGREP '(YACC|CC|CCLD) ' stdout && Exit 1
+$EGREP '(YACC|CC|CCLD) ' stdout && exit 1
 
 :
diff --git a/t/silent2.sh b/t/silent2.sh
deleted file mode 100755 (executable)
index 6565a27..0000000
+++ /dev/null
@@ -1,84 +0,0 @@
-#!/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 silent-rules mode, without libtool, non-fastdep case
-# (so that, with GCC, we also cover the other code paths in depend2).
-
-# Please keep this file in sync with silent.test.
-
-required=gcc
-. ./defs || Exit 1
-
-mkdir sub
-
-cat >>configure.ac <<'EOF'
-AM_SILENT_RULES
-AC_CONFIG_FILES([sub/Makefile])
-AC_PROG_CC
-AM_PROG_CC_C_O
-AC_OUTPUT
-EOF
-
-cat > Makefile.am <<'EOF'
-# Need generic and non-generic rules.
-bin_PROGRAMS = foo bar
-bar_CFLAGS = $(AM_CFLAGS)
-SUBDIRS = sub
-EOF
-
-cat > sub/Makefile.am <<'EOF'
-AUTOMAKE_OPTIONS = subdir-objects
-# Need generic and non-generic rules.
-bin_PROGRAMS = baz bla
-bla_CFLAGS = $(AM_CFLAGS)
-EOF
-
-cat > foo.c <<'EOF'
-int main ()
-{
-  return 0;
-}
-EOF
-cp foo.c bar.c
-cp foo.c sub/baz.c
-cp foo.c sub/bla.c
-
-$ACLOCAL
-$AUTOMAKE --add-missing
-$AUTOCONF
-
-./configure am_cv_CC_dependencies_compiler_type=gcc --enable-silent-rules
-$MAKE >stdout || { cat stdout; Exit 1; }
-cat stdout
-$EGREP ' (-c|-o)' stdout && Exit 1
-grep 'mv ' stdout && Exit 1
-grep 'CC .*foo\.' stdout
-grep 'CC .*bar\.' stdout
-grep 'CC .*baz\.' stdout
-grep 'CC .*bla\.' stdout
-grep 'CCLD .*foo' stdout
-grep 'CCLD .*bar' stdout
-grep 'CCLD .*baz' stdout
-grep 'CCLD .*bla' stdout
-
-$MAKE clean
-$MAKE V=1 >stdout || { cat stdout; Exit 1; }
-cat stdout
-grep ' -c' stdout
-grep ' -o foo' stdout
-$EGREP '(CC|LD) ' stdout && Exit 1
-
-:
diff --git a/t/silent4.sh b/t/silent4.sh
deleted file mode 100755 (executable)
index 44b7eb3..0000000
+++ /dev/null
@@ -1,88 +0,0 @@
-#!/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 silent-rules mode, with libtool, non-fastdep case
-# (so that, with GCC, we also cover the other code paths in depend2).
-
-# Please keep this file in sync with silent3.test and silent9.test.
-
-required="libtoolize gcc"
-. ./defs || Exit 1
-
-mkdir sub
-
-cat >>configure.ac <<'EOF'
-AM_SILENT_RULES
-AC_CONFIG_FILES([sub/Makefile])
-AC_PROG_CC
-AM_PROG_AR
-AM_PROG_CC_C_O
-AC_PROG_LIBTOOL
-AC_OUTPUT
-EOF
-
-cat > Makefile.am <<'EOF'
-# Need generic and non-generic rules.
-lib_LTLIBRARIES = libfoo.la libbar.la
-libbar_la_CFLAGS = $(AM_CFLAGS)
-SUBDIRS = sub
-EOF
-
-cat > sub/Makefile.am <<'EOF'
-AUTOMAKE_OPTIONS = subdir-objects
-# Need generic and non-generic rules.
-lib_LTLIBRARIES = libbaz.la libbla.la
-libbla_la_CFLAGS = $(AM_CFLAGS)
-EOF
-
-cat > libfoo.c <<'EOF'
-int main ()
-{
-  return 0;
-}
-EOF
-cp libfoo.c libbar.c
-cp libfoo.c sub/libbaz.c
-cp libfoo.c sub/libbla.c
-
-libtoolize
-$ACLOCAL
-$AUTOMAKE --add-missing
-$AUTOCONF
-
-./configure am_cv_CC_dependencies_compiler_type=gcc --enable-silent-rules
-$MAKE >stdout || { cat stdout; Exit 1; }
-cat stdout
-$EGREP ' (-c|-o)' stdout && Exit 1
-grep 'mv ' stdout && Exit 1
-grep ' CC .*foo\.' stdout
-grep ' CC .*bar\.' stdout
-grep ' CC .*baz\.' stdout
-grep ' CC .*bla\.' stdout
-grep ' CCLD .*foo' stdout
-grep ' CCLD .*bar' stdout
-grep ' CCLD .*baz' stdout
-grep ' CCLD .*bla' stdout
-
-$MAKE clean
-$MAKE V=1 >stdout || { cat stdout; Exit 1; }
-cat stdout
-grep ' -c' stdout
-grep ' -o libfoo' 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
-
-:
diff --git a/t/silent6.sh b/t/silent6.sh
deleted file mode 100755 (executable)
index 280d25a..0000000
+++ /dev/null
@@ -1,107 +0,0 @@
-#!/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 user extensibility of silent-rules mode.
-
-. ./defs || Exit 1
-
-cat >>configure.ac <<'EOF'
-AM_SILENT_RULES
-AC_OUTPUT
-EOF
-
-cat > Makefile.am <<'EOF'
-my_verbose = $(my_verbose_$(V))
-my_verbose_ = $(my_verbose_$(AM_DEFAULT_VERBOSITY))
-my_verbose_0 = @echo GEN $@;
-
-all-local: foo
-
-foo: foo.in
-       $(my_verbose)cp $(srcdir)/foo.in $@
-EXTRA_DIST = foo.in
-CLEANFILES = foo
-EOF
-
-: >foo.in
-
-$ACLOCAL
-$AUTOMAKE --add-missing
-$AUTOCONF
-
-./configure --enable-silent-rules
-$MAKE >stdout || { cat stdout; Exit 1; }
-cat stdout
-grep '^ *GEN foo *$' stdout
-grep 'cp ' stdout && Exit 1
-
-$MAKE clean
-$MAKE V=1 >stdout || { cat stdout; Exit 1; }
-cat stdout
-grep 'GEN ' stdout && Exit 1
-grep 'cp \.*/foo\.in foo' stdout
-
-$MAKE distclean
-
-./configure --disable-silent-rules
-$MAKE >stdout || { cat stdout; Exit 1; }
-cat stdout
-grep 'GEN ' stdout && Exit 1
-grep 'cp \.*/foo\.in foo' stdout
-
-$MAKE clean
-$MAKE V=0 >stdout || { cat stdout; Exit 1; }
-cat stdout
-grep '^ *GEN foo *$' stdout
-grep 'cp ' stdout && Exit 1
-
-$MAKE distclean
-
-$sleep
-# Things should also work with -Wall in AM_INIT_AUTOMAKE.
-cat > configure.ac <<'END'
-AC_INIT([silent6], [1.0])
-AM_INIT_AUTOMAKE([-Wall])
-AC_CONFIG_FILES([Makefile])
-END
-
-$ACLOCAL
-AUTOMAKE_fails
-$AUTOMAKE -Wno-error
-
-# AM_SILENT_RULES should turn off the warning.
-$sleep
-echo 'AM_SILENT_RULES' >> configure.ac
-$ACLOCAL
-$AUTOMAKE
-grep 'AM_V_GEN' Makefile.in
-$AUTOMAKE --force -Wno-all -Wportability
-grep 'AM_V_GEN' Makefile.in
-
-# The 'silent-rules' option to AM_INIT_AUTOMAKE should work likewise.
-$sleep
-cat > configure.ac <<'END'
-AC_INIT([silent6], [1.0])
-AM_INIT_AUTOMAKE([silent-rules])
-AC_CONFIG_FILES([Makefile])
-END
-$ACLOCAL
-$AUTOMAKE
-grep 'AM_V_GEN' Makefile.in
-$AUTOMAKE --force -Wno-all -Wportability
-grep 'AM_V_GEN' Makefile.in
-
-:
diff --git a/t/silent8.sh b/t/silent8.sh
deleted file mode 100755 (executable)
index a2fdb44..0000000
+++ /dev/null
@@ -1,66 +0,0 @@
-#!/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-html tex texi2dvi-o dvips'
-. ./defs || Exit 1
-
-cat >>configure.ac <<'EOF'
-AM_SILENT_RULES
-AC_OUTPUT
-EOF
-
-cat > Makefile.am <<'EOF'
-info_TEXINFOS = foo.texi
-EOF
-
-cat > foo.texi <<'EOF'
-\input texinfo
-@c %**start of header
-@setfilename foo.info
-@settitle foo manual
-@c %**end of header
-@bye
-EOF
-
-$ACLOCAL
-$AUTOMAKE --add-missing
-$AUTOCONF
-
-./configure --disable-silent-rules
-
-# Make sure that all labels work in silent-mode.
-$MAKE V=0 dvi html info ps pdf >stdout || { cat stdout; Exit 1; }
-cat stdout
-grep 'DVIPS    foo.ps' stdout || Exit 1
-grep 'MAKEINFO foo.html' stdout || Exit 1
-# NetBSD make will print './foo.info' instead of 'foo.info'.
-grep 'MAKEINFO.*foo.info' stdout || Exit 1
-grep 'TEXI2DVI foo.dvi' stdout || Exit 1
-grep 'TEXI2PDF foo.pdf' stdout || Exit 1
-
-# Now make sure the labels don't appear in verbose mode.
-$MAKE clean || Exit 1
-$MAKE V=1 dvi html info ps pdf >stdout || { cat stdout; Exit 1; }
-cat stdout
-grep 'DVIPS    foo.ps' stdout && Exit 1
-grep 'MAKEINFO foo.html' stdout && Exit 1
-grep 'MAKEINFO.*foo.info' stdout && Exit 1
-grep 'TEXI2DVI foo.dvi' stdout && Exit 1
-grep 'TEXI2PDF foo.pdf' stdout && Exit 1
-
-:
diff --git a/t/silent9.sh b/t/silent9.sh
deleted file mode 100755 (executable)
index 70195a1..0000000
+++ /dev/null
@@ -1,87 +0,0 @@
-#!/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 silent-rules mode, with libtool, nodep case.
-
-# Please keep this file in sync with silent3.test and silent4.test.
-
-required='cc libtoolize'
-. ./defs || Exit 1
-
-mkdir sub
-
-cat >>configure.ac <<'EOF'
-AM_SILENT_RULES
-AC_CONFIG_FILES([sub/Makefile])
-AC_PROG_CC
-AM_PROG_CC_C_O
-AM_PROG_AR
-AC_PROG_LIBTOOL
-AC_OUTPUT
-EOF
-
-cat > Makefile.am <<'EOF'
-# Need generic and non-generic rules.
-lib_LTLIBRARIES = libfoo.la libbar.la
-libbar_la_CFLAGS = $(AM_CFLAGS)
-SUBDIRS = sub
-EOF
-
-cat > sub/Makefile.am <<'EOF'
-AUTOMAKE_OPTIONS = subdir-objects
-# Need generic and non-generic rules.
-lib_LTLIBRARIES = libbaz.la libbla.la
-libbla_la_CFLAGS = $(AM_CFLAGS)
-EOF
-
-cat > libfoo.c <<'EOF'
-int main ()
-{
-  return 0;
-}
-EOF
-cp libfoo.c libbar.c
-cp libfoo.c sub/libbaz.c
-cp libfoo.c sub/libbla.c
-
-libtoolize
-$ACLOCAL
-$AUTOMAKE --add-missing
-$AUTOCONF
-
-./configure --disable-dependency-tracking --enable-silent-rules
-$MAKE >stdout || { cat stdout; Exit 1; }
-cat stdout
-$EGREP ' (-c|-o)' stdout && Exit 1
-grep 'mv ' stdout && Exit 1
-grep ' CC .*foo\.' stdout
-grep ' CC .*bar\.' stdout
-grep ' CC .*baz\.' stdout
-grep ' CC .*bla\.' stdout
-grep ' CCLD .*foo' stdout
-grep ' CCLD .*bar' stdout
-grep ' CCLD .*baz' stdout
-grep ' CCLD .*bla' stdout
-
-$MAKE clean
-$MAKE V=1 >stdout || { cat stdout; Exit 1; }
-cat stdout
-grep ' -c' stdout
-grep ' -o libfoo' 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
-
-:
diff --git a/t/silentcxx-gcc.sh b/t/silentcxx-gcc.sh
deleted file mode 100755 (executable)
index d99f1e9..0000000
+++ /dev/null
@@ -1,109 +0,0 @@
-#!/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/>.
-
-# Check silent-rules mode for C++.
-# This test requires the GNU C++ compiler; keep it in sync with sister
-# test 'silentcxx.test', which should work with generic compilers.
-
-required=g++
-. ./defs || Exit 1
-
-mkdir sub
-
-cat >>configure.ac <<'EOF'
-AM_SILENT_RULES
-AC_PROG_CXX
-AC_CONFIG_FILES([sub/Makefile])
-AC_OUTPUT
-EOF
-
-cat > Makefile.am <<'EOF'
-# Need generic and non-generic rules.
-bin_PROGRAMS = foo1 foo2
-foo1_SOURCES = foo.cpp baz.cxx quux.cc
-foo2_SOURCES = $(foo1_SOURCES)
-foo2_CXXFLAGS = $(AM_CXXFLAGS)
-SUBDIRS = sub
-EOF
-
-cat > sub/Makefile.am <<'EOF'
-AUTOMAKE_OPTIONS = subdir-objects
-# Need generic and non-generic rules.
-bin_PROGRAMS = bar1 bar2
-bar1_SOURCES = bar.cpp
-bar2_SOURCES = $(bar1_SOURCES)
-bar2_CXXFLAGS = $(AM_CXXFLAGS)
-EOF
-
-cat > foo.cpp <<'EOF'
-using namespace std; /* C compilers fail on this. */
-int main() { return 0; }
-EOF
-
-# Let's try out other extensions too.
-echo 'class Baz  { public: int i;  };' > baz.cxx
-echo 'class Quux { public: bool b; };' > quux.cc
-
-cp foo.cpp sub/bar.cpp
-
-$ACLOCAL
-$AUTOMAKE --add-missing
-$AUTOCONF
-
-# Sanity check: make sure the cache variable we force is really used
-# by configure.
-$FGREP am_cv_CXX_dependencies_compiler_type configure
-
-# Force gcc ("fast") depmode.
-# This apparently useless "for" loop is here to simplify the syncing
-# with sister test 'silentcxx.test'.
-for config_args in \
-  am_cv_CXX_dependencies_compiler_type=gcc
-do
-  ./configure $config_args --enable-silent-rules
-  $MAKE >stdout || { cat stdout; Exit 1; }
-  cat stdout
-
-  $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
-
-  # Ensure a clean rebuild.
-  $MAKE clean
-
-  $MAKE V=1 >stdout || { cat stdout; Exit 1; }
-  cat stdout
-
-  grep ' -c ' stdout
-  grep ' -o ' stdout
-
-  $EGREP '(CC|CXX|LD) ' stdout && Exit 1
-
-  # Ensure a clean reconfiguration/rebuild.
-  $MAKE clean
-  $MAKE maintainer-clean
-
-done
-
-:
old mode 100755 (executable)
new mode 100644 (file)
similarity index 90%
rename from t/subdir3.sh
rename to t/sourcefile-in-subdir.sh
index d9b160f..b197463
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 1999-2012 Free Software Foundation, Inc.
+# Copyright (C) 1999-2017 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
@@ -16,7 +16,7 @@
 
 # Test to make sure subdir source file generates explicit dependency.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat > Makefile.am << 'END'
 bin_PROGRAMS = zardoz widdershins
@@ -29,7 +29,7 @@ AC_PROG_CC
 END
 
 $ACLOCAL
-$AUTOMAKE
+$AUTOMAKE -Wno-unsupported
 
 grep '^z\.o: x/z\.c$' Makefile.in
 
old mode 100755 (executable)
new mode 100644 (file)
index c46ade1..43698ff
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2000-2012 Free Software Foundation, Inc.
+# Copyright (C) 2000-2017 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
@@ -16,7 +16,7 @@
 
 # Test leading space on macro assignment.
 
-. ./defs || Exit 1
+. test-init.sh
 
 echo AC_PROG_CC >> configure.ac
 
old mode 100755 (executable)
new mode 100644 (file)
index 1486f4c..f32e9d8
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2011-2012 Free Software Foundation, Inc.
+# Copyright (C) 2011-2017 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
@@ -20,7 +20,7 @@
 # even if AM_CFLAGS is undefined. Similarly for other *FLAGS variables
 # (CXXFLAGS, YFLAGS, LDFLAGS, ...)
 
-. ./defs || Exit 1
+. test-init.sh
 
 # Disable shell globbing if possible.
 (set +f) >/dev/null 2>&1 && set +f
@@ -64,7 +64,6 @@ AC_PROG_RANLIB
 AC_PROG_LIBTOOL
 AM_PROG_UPC
 AC_PROG_OBJC
-AM_PROG_CC_C_O
 END
 
 cat > Makefile.am <<'END'
diff --git a/t/specflg2.sh b/t/specflg2.sh
deleted file mode 100755 (executable)
index 9f9569c..0000000
+++ /dev/null
@@ -1,59 +0,0 @@
-#! /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 library-specific flags.
-
-. ./defs || Exit 1
-
-cat >> configure.ac << 'END'
-AC_PROG_CC
-AM_PROG_CC_C_O
-AC_PROG_CXX
-AM_PROG_AR
-AC_PROG_RANLIB
-END
-
-cat > Makefile.am << 'END'
-AUTOMAKE_OPTIONS = no-dependencies
-lib_LIBRARIES = libfoo.a
-libfoo_a_SOURCES = foo.c bar.cc
-libfoo_a_CFLAGS = -DBAR
-libfoo_a_CXXFLAGS = -DZOT
-END
-
-: > ar-lib
-
-# Make sure 'compile' is required.
-$ACLOCAL
-AUTOMAKE_fails
-grep 'required.*compile' stderr
-
-: > compile
-
-$AUTOMAKE
-
-# Look for $(COMPILE) -c in .c.o rule.
-grep 'COMPILE. [^-]' Makefile.in && Exit 1
-
-# Look for libfoo_a-foo.o.
-grep foo Makefile.in
-grep '[^-]foo\.o' Makefile.in && Exit 1
-
-# Look for libfoo_a-bar.o.
-grep bar Makefile.in
-grep '[^-]bar\.o' Makefile.in && Exit 1
-
-Exit 0
old mode 100755 (executable)
new mode 100644 (file)
index f420cdf..c95322a
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2001-2012 Free Software Foundation, Inc.
+# Copyright (C) 2001-2017 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
 # conditionals are present.
 # From Richard Boulton.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_CC
-AM_PROG_CC_C_O
 AM_CONDITIONAL([BAR], [true])
 END
 
@@ -36,12 +35,10 @@ foo_CFLAGS = -DFOO
 foo_SOURCES = foo.c
 END
 
-: > compile
-
 $ACLOCAL
 $AUTOMAKE
 
-uncondval=`$FGREP 'foo-foo.o: foo.c' Makefile.in`
+uncondval=$($FGREP 'foo-foo.o: foo.c' Makefile.in)
 
 cat >> Makefile.am << 'END'
 foo_SOURCES += $(BAR_SRCS)
@@ -49,7 +46,7 @@ END
 
 $AUTOMAKE
 
-condval=`$FGREP 'foo-foo.o: foo.c' Makefile.in`
+condval=$($FGREP 'foo-foo.o: foo.c' Makefile.in)
 
 test "x$uncondval" = "x$condval"
 
old mode 100755 (executable)
new mode 100644 (file)
index 26ad75c..d226ba8
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2002-2012 Free Software Foundation, Inc.
+# Copyright (C) 2002-2017 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 true/false example from the manual, plus a check for _SHORTNAME.
 
 required='cc native'
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_CC
-AM_PROG_CC_C_O
 AC_OUTPUT
 END
 
@@ -58,7 +57,7 @@ $MAKE
 ./true | grep true
 ./false | grep false
 
-objext=`sed -n -e 's/^OBJEXT = //p' < Makefile`
+objext=$(sed -n -e 's/^OBJEXT = //p' < Makefile)
 test -f ./t-false.$objext
 test -f ./f-false.$objext
 
old mode 100755 (executable)
new mode 100644 (file)
index 435ce16..46d167b
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2002-2012 Free Software Foundation, Inc.
+# Copyright (C) 2002-2017 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
 # use of _CPPFLAGS (PR/337).
 
 required='cc native'
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_CC
-AM_PROG_CC_C_O
 AC_OUTPUT
 END
 
@@ -55,9 +54,9 @@ $AUTOMAKE -a
 $MAKE
 
 ./true
-./false && Exit 1
+./false && exit 1
 
-objext=`sed -n -e 's/^OBJEXT = //p' < Makefile`
+objext=$(sed -n -e 's/^OBJEXT = //p' < Makefile)
 test -f ./true-true.$objext
 test -f ./false-true.$objext
 
old mode 100755 (executable)
new mode 100644 (file)
index 96e7a2e..49218a5
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2002-2012 Free Software Foundation, Inc.
+# Copyright (C) 2002-2017 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
 
 # Another check for per-target flag substitutions.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_CC
-AM_PROG_CC_C_O
 AC_OUTPUT
 END
 
 cat > Makefile.am << 'END'
+AUTOMAKE_OPTIONS = subdir-objects
 bin_PROGRAMS = zzfoo zzbar
 zzfoo_SOURCES = sub/foo.c
 zzbar_SOURCES = bar.c
@@ -36,10 +36,10 @@ $AUTOMAKE --add-missing
 
 $FGREP '$(AM_CFLAGS)' Makefile.in
 
-$FGREP '$(zzfoo_CFLAGS)' Makefile.in && Exit 1
-$FGREP '$(zzfoo_CPPFLAGS)' Makefile.in && Exit 1
+$FGREP '$(zzfoo_CFLAGS)' Makefile.in && exit 1
+$FGREP '$(zzfoo_CPPFLAGS)' Makefile.in && exit 1
 
-$FGREP '$(zzbar_CFLAGS)' Makefile.in && Exit 1
+$FGREP '$(zzbar_CFLAGS)' Makefile.in && exit 1
 $FGREP '$(zzbar_CPPFLAGS)' Makefile.in
 
 :
old mode 100755 (executable)
new mode 100644 (file)
index a2b4752..1d926ab
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 1996-2012 Free Software Foundation, Inc.
+# Copyright (C) 1996-2017 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
@@ -16,7 +16,7 @@
 
 # Test to make sure misspellings in _SOURCES variables cause failure.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat > Makefile.am << 'END'
 bin_PROGRAMS = zardoz foo
old mode 100755 (executable)
new mode 100644 (file)
index a4b0a46..adc1824
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 1996-2012 Free Software Foundation, Inc.
+# Copyright (C) 1996-2017 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
@@ -16,7 +16,7 @@
 
 # Test to make sure misspellings in _SOURCES variables cause failure.
 
-. ./defs || Exit 1
+. test-init.sh
 
 echo AC_PROG_CC >> configure.ac
 
old mode 100755 (executable)
new mode 100644 (file)
index a96fa03..b6f0ef3
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 1996-2012 Free Software Foundation, Inc.
+# Copyright (C) 1996-2017 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
@@ -17,7 +17,7 @@
 # Test to make sure some internal _DEPENDENCIES variables don't cause
 # errors.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat > Makefile.am << 'END'
 TAGS_DEPENDENCIES = joe
old mode 100755 (executable)
new mode 100644 (file)
index fb68f31..e53ab6e
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 1996-2012 Free Software Foundation, Inc.
+# Copyright (C) 1996-2017 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
@@ -16,7 +16,7 @@
 
 # Test to make sure that misspelled prefixes actually cause error.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat > Makefile.am << 'EOF'
 bni_PROGRAMS = zot
old mode 100755 (executable)
new mode 100644 (file)
similarity index 95%
rename from t/spy.sh
rename to t/spy-double-colon.sh
index 0d087a4..f7b46c5
--- a/t/spy.sh
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2003-2012 Free Software Foundation, Inc.
+# Copyright (C) 2003-2017 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
@@ -67,7 +67,7 @@
 # So it seems only non-overlapping ::-rule may be portable.  This is
 # what we check now.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat >Makefile <<\EOF
 a :: b
@@ -80,18 +80,18 @@ touch b c
 $sleep
 : > a
 $MAKE
-test "`cat a`" = ''
+test x"$(cat a)" = x
 $sleep
 touch b
 $MAKE
-test "`cat a`" = rule1
+test "$(cat a)" = "rule1"
 # Ensure a is strictly newer than b, so HP-UX make does not execute rule2.
 $sleep
 : > a
 $sleep
 touch c
 $MAKE
-test "`cat a`" = rule2
+test "$(cat a)" = "rule2"
 
 # Unfortunately, the following is not portable to FreeBSD/NetBSD/OpenBSD
 # make, see explanation above.
old mode 100755 (executable)
new mode 100644 (file)
index af7ba2a..0d9dee9
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2012 Free Software Foundation, Inc.
+# Copyright (C) 2012-2017 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
 # to hold on all non-museum systems, and will soon be mandated
 # by POSIX as well) in future version of automake, to simplify
 # automake-provided cleanup rules.
-# References:
-#  <http://lists.gnu.org/archive/html/bug-autoconf/2012-02/msg00002.html>
-#  <http://debbugs.gnu.org/cgi/bugreport.cgi?bug=10819>
-#  <http://austingroupbugs.net/view.php?id=542>
+# See automake bug#10828.
+# Other references:
+# <http://lists.gnu.org/archive/html/bug-autoconf/2012-02/msg00002.html>
+# <http://austingroupbugs.net/view.php?id=542>
 
 am_create_testdir=empty
-. ./defs || Exit 1
+. test-init.sh
 
 plan_ 10
 
old mode 100755 (executable)
new mode 100644 (file)
similarity index 53%
rename from t/srcsub2.sh
rename to t/src-acsubst.sh
index 2d6da97..c8a7366
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2001-2012 Free Software Foundation, Inc.
+# Copyright (C) 1999-2017 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 to make sure config sub in _SOURCES fails.
+# Test to make sure config substitution in _SOURCES fails.
 
-. ./defs || Exit 1
+. test-init.sh
 
-cat >> configure.ac << 'END'
-AC_PROG_CC
-END
+echo AC_PROG_CC >> configure.ac
 
 cat > Makefile.am << 'END'
-bin_PROGRAMS = x
+bin_PROGRAMS = x y
+x_SOURCES = x.c @FOO@
 bar = @FOO@
 foo = $(bar)
-x_SOURCES = x.c $(foo)
-EXTRA_x_SOURCES = y.c
+EXTRA_y_SOURCES = $(foo) y.c
 END
 
 $ACLOCAL
 AUTOMAKE_fails
-grep 'Makefile.am:2:.*bar.*substitution' stderr
-grep 'Makefile.am:2:.*x_SOURCES' stderr
+
+cat > exp-err << 'END'
+Makefile.am:2: error: 'x_SOURCES' includes configure substitution '@FOO@';
+Makefile.am:2: configure substitutions are not allowed in _SOURCES variables
+Makefile.am:3: error: 'bar' includes configure substitution '@FOO@'
+Makefile.am:3: and is referred to from 'EXTRA_y_SOURCES';
+Makefile.am:3: configure substitutions are not allowed in _SOURCES variables
+END
+
+diff exp-err stderr
+
+:
diff --git a/t/srcsub.sh b/t/srcsub.sh
deleted file mode 100755 (executable)
index 978a105..0000000
+++ /dev/null
@@ -1,33 +0,0 @@
-#! /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 config sub in _SOURCES fails.
-
-. ./defs || Exit 1
-
-cat >> configure.ac << 'END'
-AC_PROG_CC
-END
-
-cat > Makefile.am << 'END'
-bin_PROGRAMS = x
-x_SOURCES = x.c @FOO@
-EXTRA_x_SOURCES = y.c
-END
-
-$ACLOCAL
-AUTOMAKE_fails
-grep 'Makefile.am:2:.*x_SOURCES.*substitution' stderr
old mode 100755 (executable)
new mode 100644 (file)
index 59a373a..734ea00
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2001-2012 Free Software Foundation, Inc.
+# Copyright (C) 2001-2017 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 # Make sure stamp-h* files are created where we expect
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << END
-AM_CONFIG_HEADER([1.h
-                  2.h:config.hin
-                  3.h:sdir1/config1.hin])
-# AM_CONFIG_HEADER and AC_CONFIG_HEADERS should be synonyms.
+AC_CONFIG_HEADERS([1.h
+                   2.h:config.hin
+                   3.h:sdir1/config1.hin])
 AC_CONFIG_HEADERS([sdir1/4.h
                    sdir1/5.h:config.hin
                    sdir1/6.h:sdir1/config1.hin
@@ -58,12 +57,12 @@ rm -f stamp-h*
 rm -f sdir1/stamp-h*
 
 ./config.status sdir1/7.h 2.h sdir1/4.h
-test ! -f stamp-h1
+test ! -e stamp-h1
 test -f stamp-h2
-test ! -f stamp-h3
+test ! -e stamp-h3
 test -f sdir1/stamp-h4
-test ! -f sdir1/stamp-h5
-test ! -f sdir1/stamp-h6
+test ! -e sdir1/stamp-h5
+test ! -e sdir1/stamp-h6
 test -f sdir1/stamp-h7
 
 :
old mode 100755 (executable)
new mode 100644 (file)
index ec99483..0c7e944
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2007-2012 Free Software Foundation, Inc.
+# Copyright (C) 2007-2017 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
@@ -18,7 +18,7 @@
 # Report by Kent Boortz.
 
 required=cc
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_CC
old mode 100755 (executable)
new mode 100644 (file)
index 1594707..6b6dc3b
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 1996-2012 Free Software Foundation, Inc.
+# Copyright (C) 1996-2017 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
@@ -16,7 +16,7 @@
 
 # Test "not a standard library" error.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_CC
@@ -41,12 +41,11 @@ END
 
 $ACLOCAL
 AUTOMAKE_fails
-q="[\`'\"]"
 badname='not a standard library name'
 # We're specifically testing for line-number information.
-grep "^Makefile\\.am:1:.*${q}sub/foo${q}.*$badname" stderr
+grep "^Makefile\\.am:1:.*'sub/foo'.*$badname" stderr
 grep "^Makefile\\.am:1:.*sub/libfoo\\.a" stderr
-grep "^foo\\.mk:5:.*${q}zardoz\\.a${q}.*$badname" stderr
+grep "^foo\\.mk:5:.*'zardoz\\.a'.*$badname" stderr
 grep "^foo\\.mk:5:.*libzardoz\\.a" stderr
 
 :
old mode 100755 (executable)
new mode 100644 (file)
index ce5158f..4e37f8f
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2003-2012 Free Software Foundation, Inc.
+# Copyright (C) 2003-2017 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
@@ -17,7 +17,7 @@
 # Check for AM_LDFLAGS = -module
 # Report from Kevin P. Fleming.
 required=libtool
-. ./defs || Exit 1
+. test-init.sh
 
 : > README
 : > NEWS
old mode 100755 (executable)
new mode 100644 (file)
index 8c365f0..d397978
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2011-2012 Free Software Foundation, Inc.
+# Copyright (C) 2011-2017 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
@@ -21,7 +21,7 @@
 # been in place for quite a long time); see also Automake bug #7673.
 # Update this test if the semantics are changed.
 
-. ./defs || Exit 1
+. test-init.sh
 
 # We want complete control over automake options.
 AUTOMAKE=$am_original_AUTOMAKE
old mode 100755 (executable)
new mode 100644 (file)
index 6f5a143..96ab032
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2011-2012 Free Software Foundation, Inc.
+# Copyright (C) 2011-2017 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
@@ -18,7 +18,7 @@
 # strictness specified later should take precedence over strictness
 # specified earlier.
 
-. ./defs || Exit 1
+. test-init.sh
 
 # We want complete control over automake options.
 AUTOMAKE=$am_original_AUTOMAKE
old mode 100755 (executable)
new mode 100644 (file)
index dfefcd9..214f3df
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2002-2012 Free Software Foundation, Inc.
+# Copyright (C) 2002-2017 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
@@ -17,7 +17,7 @@
 # Test for install-strip.
 
 required=cc
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_CC
@@ -41,7 +41,7 @@ $ACLOCAL
 $AUTOCONF
 $AUTOMAKE -a
 
-prefix=`cd install && pwd` || Exit 1
+prefix=$(cd install && pwd) || exit 99
 ./configure --prefix="$prefix"
 $MAKE
 $MAKE install-strip
old mode 100755 (executable)
new mode 100644 (file)
index 49a5c06..5edb5d8
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2010-2012 Free Software Foundation, Inc.
+# Copyright (C) 2010-2017 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 # Ensure install-strip works when STRIP consists of more than one word.
-# This test needs GNU binutils strip.  See sister test strip3.
+# This test needs GNU binutils strip.  See sister test 'strip3.sh'.
 
 required='cc strip'
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_CC
@@ -32,21 +32,14 @@ bin_PROGRAMS = foo
 lib_LIBRARIES = libfoo.a
 END
 
-cat > foo.c << 'END'
-int main () { return 0; }
-END
-
-cat > libfoo.c << 'END'
-int foo () { return 0; }
-END
-
+echo 'int main (void) { return 0; }' > foo.c
+echo 'int foo (void) { return 0; }' > libfoo.c
 
 $ACLOCAL
 $AUTOCONF
 $AUTOMAKE -a
 
-prefix=`pwd`/inst
-./configure --prefix="$prefix" STRIP='strip --verbose'
+./configure --prefix="$(pwd)/inst" STRIP='strip --verbose'
 $MAKE
 $MAKE install-strip
 
old mode 100755 (executable)
new mode 100644 (file)
index 187e8a5..51656fd
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2010-2012 Free Software Foundation, Inc.
+# Copyright (C) 2010-2017 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 # Ensure install-strip works when STRIP consists of more than one word.
-# This test needs GNU binutils strip.  Libtool variant.
+# This test needs GNU binutils strip.  Libtool variant.  See sister
+# test 'strip2.sh'.
 
 required='cc libtoolize strip'
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_CC
@@ -32,21 +33,15 @@ bin_PROGRAMS = foo
 lib_LTLIBRARIES = libfoo.la
 END
 
-cat > foo.c << 'END'
-int main () { return 0; }
-END
-
-cat > libfoo.c << 'END'
-int foo () { return 0; }
-END
+echo 'int main (void) { return 0; }' > foo.c
+echo 'int foo (void) { return 0; }' > libfoo.c
 
 libtoolize
 $ACLOCAL
 $AUTOCONF
 $AUTOMAKE -a
 
-prefix=`pwd`/inst
-./configure --prefix="$prefix" STRIP='strip --verbose'
+./configure --prefix="$(pwd)/inst" STRIP='strip --verbose'
 $MAKE
 $MAKE install-strip
 
old mode 100755 (executable)
new mode 100644 (file)
similarity index 83%
rename from t/subcond3.sh
rename to t/subdir-ac-subst.sh
index e84aa41..d49bc57
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2002-2012 Free Software Foundation, Inc.
+# Copyright (C) 2002-2017 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 for conditional SUBDIRS.
 # SUBDIRS + AC_SUBST setup from the manual.
-# Lots of lines here are duplicated in subcond2.test.
+# Lots of lines here are duplicated in 'subcond-am-cond.sh'.
 
-. ./defs || Exit 1
+. test-init.sh
 
-cat >>configure.ac <<'END'
+cat >> configure.ac <<'END'
 if test "$want_opt" = yes; then
   MAYBE_OPT=opt
 else
@@ -31,7 +31,7 @@ AC_CONFIG_FILES([src/Makefile opt/Makefile])
 AC_OUTPUT
 END
 
-cat >Makefile.am << 'END'
+cat > Makefile.am <<'END'
 SUBDIRS = src $(MAYBE_OPT)
 DIST_SUBDIRS = src opt
 
@@ -45,14 +45,16 @@ DIST_SUBDIRS = src opt
 # We rely on 'distcheck' to run 'check-local' and use
 # 'sanity1' and 'sanity2' as evidences that test-build was run.
 
+test_rootdir = $(top_builddir)/../../..
+
 test-build: all
        test -f src/result
        if test -n "$(MAYBE_OPT)"; then \
           test -f opt/result || exit 1; \
-          : > $(top_builddir)/../../sanity2 || exit 1; \
+          : > $(test_rootdir)/sanity2 || exit 1; \
        else \
           test ! -f opt/result || exit 1; \
-          : > $(top_builddir)/../../sanity1 || exit 1; \
+          : > $(test_rootdir)/sanity1 || exit 1; \
        fi
 
 test-dist: distdir
@@ -66,7 +68,7 @@ mkdir src opt
 : > src/source
 : > opt/source
 
-cat >src/Makefile.am << 'END'
+cat > src/Makefile.am <<'END'
 EXTRA_DIST = source
 all-local: result
 CLEANFILES = result
@@ -76,7 +78,7 @@ result: source
 END
 
 # We want in opt/ the same Makefile as in src/.  Let's exercise 'include'.
-cat >opt/Makefile.am << 'END'
+cat > opt/Makefile.am <<'END'
 include ../src/Makefile.am
 END
 
@@ -88,3 +90,5 @@ $MAKE distcheck
 test -f sanity1
 DISTCHECK_CONFIGURE_FLAGS=want_opt=yes $MAKE distcheck
 test -f sanity2
+
+:
old mode 100755 (executable)
new mode 100644 (file)
similarity index 86%
rename from t/subdir5.sh
rename to t/subdir-add-pr46.sh
index a74c746..3d37f0d
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2001-2012 Free Software Foundation, Inc.
+# Copyright (C) 2001-2017 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 # Test to make sure that adding a new directory works.
-# This test runs 'make' from the top-level directory, the sister test
-# 'subdir8.test' do it from a subdirectory.
+# This test runs 'make' from the top-level directory, the sister
+# test 'subdir-add2-pr46.sh' do it from a subdirectory.
 # PR automake/46
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_OUTPUT
@@ -36,9 +36,10 @@ $MAKE
 # Now add new directories.
 
 # First we add a new directory by modifying configure.ac directly.
-# We update configure.ac *before* updating sub/Makefile.am; subdir8.test
-# does it in the other way: it updates confiles.m4 (which is m4_included
-# by configure.ac there) after Makefile.am.
+# We update configure.ac *before* updating sub/Makefile.am; the sister
+# test 'subdir-add2-pr46.sh' does it in the other way: it updates
+# confiles.m4 (which is m4_included by configure.ac there) after
+# Makefile.am.
 
 # Modified configure dependencies must be newer than config.status.
 $sleep
old mode 100755 (executable)
new mode 100644 (file)
similarity index 71%
rename from t/subdir8.sh
rename to t/subdir-add2-pr46.sh
index ee9e0b0..c1402bd
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2003-2012 Free Software Foundation, Inc.
+# Copyright (C) 2003-2017 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 # Test to make sure that adding a new directory works, even from
-# subdirectories.  The sister test 'subdir5.test' makes sure it works
-# when make is run from the top-level directory.
+# subdirectories.  The sister test 'subdir-add-pr46.sh' makes sure
+# it works when make is run from the top-level directory.
 # PR automake/46
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
+AC_CONFIG_MACRO_DIR([m4])
 m4_include([confiles.m4])
 MORE_DEFS
 AC_OUTPUT
@@ -31,7 +32,6 @@ echo 'AC_CONFIG_FILES([sub/Makefile])' > confiles.m4
 
 cat > Makefile.am << 'END'
 SUBDIRS = sub
-ACLOCAL_AMFLAGS = -I m4
 END
 
 mkdir sub
@@ -41,7 +41,7 @@ mkdir sub
 mkdir m4
 echo 'AC_DEFUN([MORE_DEFS], [])' > m4/moredefs.m4
 
-$ACLOCAL -I m4
+$ACLOCAL
 $AUTOCONF
 $AUTOMAKE
 ./configure
@@ -49,10 +49,10 @@ $MAKE
 
 # Now add new directories.
 
-# The first step users typically do when adding a new subdir is
-# editing configure.ac.  That is already tested by subdir5.test,
-# though, so here we try to just edit a file that is included by
-# configure.ac, without touching configure.ac itself.
+# The first step users typically do when adding a new subdir is editing
+# configure.ac.  That is already tested by 'subdir-add-pr46.sh' though,
+# so here we try to just edit a file that is included by configure.ac,
+# without touching configure.ac itself.
 
 mkdir sub/maude
 cat > sub/maude/Makefile.am << 'END'
@@ -66,10 +66,10 @@ echo 'SUBDIRS = maude' >> sub/Makefile.am
 mkdir maude
 : > maude/Makefile.am
 
-# Update confiles.m4 *after* updating sub/Makefile.am; subdir5.test do
-# it in the other way: it updates configure.ac before Makefile.am.
-# We sleep here because modified configure dependencies must be newer
-# than config.status.
+# Update confiles.m4 *after* updating sub/Makefile.am; the sister test
+# 'subdir-add-pr46.sh' does it the in other way: it updates configure.ac
+# before Makefile.am.  We sleep here because modified configure
+# dependencies must be newer than config.status.
 $sleep
 echo 'AC_CONFIG_FILES([maude/Makefile sub/maude/Makefile])' >> confiles.m4
 
old mode 100755 (executable)
new mode 100644 (file)
similarity index 84%
rename from t/subcond2.sh
rename to t/subdir-am-cond.sh
index 0e9f451..dc7ceed
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2002-2012 Free Software Foundation, Inc.
+# Copyright (C) 2002-2017 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 for conditional SUBDIRS.
 # SUBDIRS + AM_CONDITIONAL setup from the manual.
-# Lots of lines here are duplicated in subcond3.test.
+# Lots of lines here are duplicated in 'subdir-ac-subst.sh'.
 
-. ./defs || Exit 1
+. test-init.sh
 
-cat >>configure.ac <<'END'
+cat >> configure.ac <<'END'
 AM_CONDITIONAL([COND_OPT], [test "$want_opt" = yes])
 AC_CONFIG_FILES([src/Makefile opt/Makefile])
 AC_OUTPUT
 END
 
-cat >Makefile.am << 'END'
+cat > Makefile.am <<'END'
 if COND_OPT
   MAYBE_OPT = opt
 endif
@@ -42,16 +42,18 @@ SUBDIRS = src $(MAYBE_OPT)
 # We rely on 'distcheck' to run 'check-local' and use
 # 'sanity1' and 'sanity2' as evidences that test-build was run.
 
+test_rootdir = $(top_builddir)/../../..
+
 if COND_OPT
 test-build: all
        test -f src/result
        test -f opt/result
-       : > $(top_builddir)/../../sanity2
+       : > $(test_rootdir)/sanity2
 else
 test-build: all
        test -f src/result
        test ! -f opt/result
-       : > $(top_builddir)/../../sanity1
+       : > $(test_rootdir)/sanity1
 endif
 
 test-dist: distdir
@@ -65,7 +67,7 @@ mkdir src opt
 : > src/source
 : > opt/source
 
-cat >src/Makefile.am << 'END'
+cat > src/Makefile.am <<'END'
 EXTRA_DIST = source
 all-local: result
 CLEANFILES = result
@@ -75,7 +77,7 @@ result: source
 END
 
 # We want in opt/ the same Makefile as in src/.  Let's exercise 'include'.
-cat >opt/Makefile.am << 'END'
+cat > opt/Makefile.am <<'END'
 include ../src/Makefile.am
 END
 
@@ -87,3 +89,5 @@ $MAKE distcheck
 test -f sanity1
 DISTCHECK_CONFIGURE_FLAGS=want_opt=yes $MAKE distcheck
 test -f sanity2
+
+:
old mode 100755 (executable)
new mode 100644 (file)
similarity index 92%
rename from t/cond2.sh
rename to t/subdir-cond-err.sh
index 1b5fcea..358691f
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 1997-2012 Free Software Foundation, Inc.
+# Copyright (C) 1997-2017 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
@@ -16,7 +16,7 @@
 
 # Check SUBDIRS set based on conditionals.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AM_CONDITIONAL([TEST], [true])
old mode 100755 (executable)
new mode 100644 (file)
similarity index 87%
rename from t/subcond.sh
rename to t/subdir-cond-gettext.sh
index c09e5ad..5f29ece
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2001-2012 Free Software Foundation, Inc.
+# Copyright (C) 2001-2017 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
 # It is ok to have a conditional SUBDIRS when using gettext.
 
 required=gettext
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AM_GNU_GETTEXT
-AM_CONDITIONAL(MAUDE, true)
+AM_CONDITIONAL([MAUDE], [true])
 ALL_LINGUAS=
-AC_SUBST(ALL_LINGUAS)
+AC_SUBST([ALL_LINGUAS])
 END
 
 mkdir po intl
@@ -40,3 +40,5 @@ END
 $ACLOCAL
 # Gettext wants config.guess etc.
 $AUTOMAKE --add-missing
+
+:
diff --git a/t/subdir-distclean.sh b/t/subdir-distclean.sh
new file mode 100644 (file)
index 0000000..452d488
--- /dev/null
@@ -0,0 +1,103 @@
+#! /bin/sh
+# Copyright (C) 2012-2017 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 "./configure && make && make distclean" is actually a
+# no-op, even when conditional SUBDIRS are involved.
+
+. test-init.sh
+
+cat >> configure.ac << 'END'
+AC_CONFIG_FILES([sub1/Makefile sub2/Makefile sub1/subsub/Makefile])
+AM_CONDITIONAL([COND], [false])
+AC_SUBST([extra_subdirs], [''])
+AC_OUTPUT
+END
+
+mkdir sub1 sub2 sub1/subsub
+
+cat > Makefile.am << 'END'
+SUBDIRS = sub1
+if COND
+SUBDIRS += sub2
+endif
+END
+
+cat > sub1/Makefile.am << 'END'
+all-local:
+       : > run
+CLEANFILES = run
+SUBDIRS = @extra_subdirs@
+DIST_SUBDIRS = subsub
+END
+
+cat > sub2/Makefile.am << 'END'
+all-local:
+       @echo "Should not run in `pwd`!"
+       exit 1
+DISTCLEANFILES = oops
+END
+cp sub2/Makefile.am sub1/subsub/Makefile.am
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE -c --add-missing
+
+./configure
+
+test -f sub1/Makefile
+test -f sub2/Makefile
+test -f sub1/subsub/Makefile
+
+$MAKE
+test -f sub1/run
+touch sub2/oops sub1/subsub/oops
+
+$MAKE distclean
+test ! -e sub1/run
+test ! -e sub2/oops
+test ! -e sub1/subsub/oops
+test ! -e sub1/Makefile
+test ! -e sub2/Makefile
+test ! -e sub1/subsub/Makefile
+
+mkdir build
+cd build
+
+../configure
+
+$MAKE
+
+test -f sub1/Makefile
+test -f sub2/Makefile
+test -f sub1/subsub/Makefile
+
+test -f sub1/run
+touch sub2/oops sub1/subsub/oops
+
+$MAKE maintainer-clean
+test ! -e sub1/run
+test ! -e sub2/oops
+test ! -e sub1/subsub/oops
+test ! -e sub1/Makefile
+test ! -e sub2/Makefile
+test ! -e sub1/subsub/Makefile
+
+cd ..
+
+./configure
+$MAKE distclean
+
+:
old mode 100755 (executable)
new mode 100644 (file)
similarity index 92%
rename from t/subdir10.sh
rename to t/subdir-env-interference.sh
index 4ba791a..0a75a36
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2009-2012 Free Software Foundation, Inc.
+# Copyright (C) 2009-2017 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
@@ -16,7 +16,7 @@
 
 # SUDBIRS with $fail set in the environment.
 
-. ./defs || Exit 1
+. test-init.sh
 
 mkdir sub
 
diff --git a/t/subdir-keep-going-pr12554.sh b/t/subdir-keep-going-pr12554.sh
new file mode 100644 (file)
index 0000000..7365753
--- /dev/null
@@ -0,0 +1,70 @@
+#! /bin/sh
+# Copyright (C) 2013-2017 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 Automake-generated recursive rules are resilient against
+# false positives in deciding whether make is running with the '-k'
+# option, and thus whether a failure into one of the $(SUBDIRS) should
+# still prevent recursion in the following $(SUBDIRS) entries.  See
+# automake bug#12544.
+
+. test-init.sh
+
+echo nil: | $MAKE -I . -f - || skip_ "$MAKE doesn't support the -I option"
+
+cat >> configure.ac <<'END'
+AC_CONFIG_FILES([sub1/Makefile sub2/Makefile])
+AC_OUTPUT
+END
+
+mkdir k ./--keep-going sub1 sub2
+
+cat > Makefile.am <<'END'
+SUBDIRS = sub1 sub2
+END
+
+cat > sub1/Makefile.am <<'END'
+all-local:
+       touch ko
+       false
+END
+cat > sub2/Makefile.am <<'END'
+all-local:
+       test -f ../sub1/ko
+       touch ok
+END
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE
+./configure
+
+st=0
+$MAKE -I k -I --keep-going \
+  TESTS='k --keep-going -k' AM_MAKEFLAGS="TESTS='k --keep-going -k'" \
+  || st=$?
+# Don't trust the exit status of "make -k" for non-GNU make.
+if using_gmake; then
+  test $st -gt 0 || exit 1
+fi
+test ! -r sub2/ok
+
+# Sanity check.
+st=0; $MAKE -k || st=$?
+if { using_gmake && test $st -eq 0; } || test ! -f sub2/ok; then
+  fatal_ '"make -k" not working as expected'
+fi
+
+:
diff --git a/t/subdir-order.sh b/t/subdir-order.sh
new file mode 100644 (file)
index 0000000..56dd42b
--- /dev/null
@@ -0,0 +1,159 @@
+#! /bin/sh
+# Copyright (C) 2012-2017 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 $(SUDBIRS) entries are processed in the order they are specified.
+
+. test-init.sh
+
+cat >> configure.ac << 'END'
+AC_CONFIG_FILES([
+  sub0/Makefile
+  sub1/Makefile
+  sub2/Makefile
+  sub3/Makefile
+  sub3/a/Makefile
+  sub3/b/Makefile
+])
+AC_OUTPUT
+END
+
+mkdir sub0 sub1 sub2 sub3 sub3/a sub3/b
+
+cat > Makefile.am << 'END'
+SUBDIRS = sub2 sub1 sub3 sub0
+all-local:
+       test -f sub0/run
+       test -f sub1/run
+       test -f sub2/run
+       test -f sub3/run
+       test -f sub3/a/run
+       test -f sub3/b/run
+       test ! -f run
+       : > run
+
+CLEANFILES = \
+  run \
+  sub0/run \
+  sub1/run \
+  sub2/run \
+  sub3/run \
+  sub3/a/run \
+  sub3/b/run
+END
+
+cat > sub0/Makefile.am << 'END'
+all-local:
+       test ! -f $(top_builddir)/run
+       test -f $(top_builddir)/sub1/run
+       test -f $(top_builddir)/sub3/run
+       test -f $(top_builddir)/sub3/a/run
+       test -f $(top_builddir)/sub3/b/run
+       test ! -f run
+       : > run
+END
+
+cat > sub1/Makefile.am << 'END'
+all-local:
+       test ! -f $(top_builddir)/run
+       test ! -f $(top_builddir)/sub0/run
+       test -f $(top_builddir)/sub2/run
+       test ! -f $(top_builddir)/sub3/run
+       test ! -f $(top_builddir)/sub3/a/run
+       test ! -f $(top_builddir)/sub3/b/run
+       test ! -f run
+       : > run
+END
+
+
+cat > sub2/Makefile.am << 'END'
+all-local:
+       test ! -f $(top_builddir)/run
+       test ! -f $(top_builddir)/sub0/run
+       test ! -f $(top_builddir)/sub1/run
+       test ! -f $(top_builddir)/sub3/run
+       test ! -f $(top_builddir)/sub3/a/run
+       test ! -f $(top_builddir)/sub3/b/run
+       test ! -f run
+       : > run
+END
+
+cat > sub3/Makefile.am << 'END'
+SUBDIRS = b . a
+all-local:
+       test ! -f $(top_builddir)/run
+       test ! -f $(top_builddir)/sub0/run
+       test -f $(top_builddir)/sub1/run
+       test ! -f $(top_builddir)/sub3/a/run
+       test -f $(top_builddir)/sub3/b/run
+       test ! -f run
+       : > run
+END
+
+cat > sub3/a/Makefile.am << 'END'
+all-local:
+       test ! -f $(top_builddir)/run
+       test ! -f $(top_builddir)/sub0/run
+       test -f $(top_builddir)/sub1/run
+       test -f $(top_builddir)/sub3/b/run
+       test -f $(top_builddir)/sub3/run
+       test ! -f run
+       : > run
+END
+
+cat > sub3/b/Makefile.am << 'END'
+all-local:
+       test ! -f $(top_builddir)/run
+       test ! -f $(top_builddir)/sub0/run
+       test -f $(top_builddir)/sub1/run
+       test ! -f $(top_builddir)/sub3/b/run
+       test ! -f $(top_builddir)/sub3/run
+       test ! -f run
+       : > run
+END
+
+echo dummy: > Makefile
+if using_gmake; then
+  jobs=-j12
+elif $MAKE -j12; then
+  jobs=-j12
+elif $MAKE -j 12; then
+  jobs="-j 12"
+else
+  jobs=none
+fi
+rm -f Makefile
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE -c --add-missing
+
+./configure
+
+for j in '' "$jobs"; do
+  test x"$j" = x"none" && continue
+  $MAKE $j
+  test -f run
+  test -f sub0/run
+  test -f sub1/run
+  test -f sub3/run
+  test -f sub3/a/run
+  test -f sub3/b/run
+  $MAKE clean
+  find . | grep 'run$' && exit 1
+  : # For shells with busted 'set -e'
+done
+
+:
old mode 100755 (executable)
new mode 100644 (file)
similarity index 86%
rename from t/subdir2.sh
rename to t/subdir-subsub.sh
index 31e3c61..c9560d6
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 1996-2012 Free Software Foundation, Inc.
+# Copyright (C) 1996-2017 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
@@ -16,7 +16,7 @@
 
 # Test to make sure sub-sub-dirs work correctly.
 
-. ./defs || Exit 1
+. test-init.sh
 
 mkdir one
 mkdir one/two
@@ -43,10 +43,17 @@ SUBDIRS = two
 END
 
 cat > one/two/Makefile.am << 'END'
-pkgdata_DATA =
+pkgdata_DATA = data.txt
+data.txt:
+       echo dummy >$@
 END
 
 $ACLOCAL
+$AUTOCONF
 $AUTOMAKE --gnu
 
+./configure
+$MAKE
+test -f one/two/data.txt
+
 :
old mode 100755 (executable)
new mode 100644 (file)
similarity index 89%
rename from t/subdir9.sh
rename to t/subdir-with-slash.sh
index 116e1c3..38fe3db
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2004-2012 Free Software Foundation, Inc.
+# Copyright (C) 2004-2017 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
@@ -14,9 +14,9 @@
 # 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 SUDBIRS with /.
+# Test SUDBIRS with '/' in them.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_CONFIG_FILES([src/subdir/Makefile src/subdir2/Makefile])
@@ -50,6 +50,6 @@ test -f $distdir/src/subdir/foo
 test -f $distdir/src/subdir2/foo
 $MAKE clean
 $MAKE distclean
-test ! -f src/subdir2/Makefile
+test ! -e src/subdir2/Makefile
 
 :
old mode 100755 (executable)
new mode 100644 (file)
index 34b6ece..f8318e5
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 1996-2012 Free Software Foundation, Inc.
+# Copyright (C) 1996-2017 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
@@ -17,7 +17,7 @@
 # Test to make sure install-sh and mkinstalldirs correctly found in
 # subdirs.
 
-. ./defs || Exit 1
+. test-init.sh
 
 mkdir zot
 
diff --git a/t/subobj-clean-lt-pr10697.sh b/t/subobj-clean-lt-pr10697.sh
new file mode 100644 (file)
index 0000000..f911bed
--- /dev/null
@@ -0,0 +1,168 @@
+#! /bin/sh
+# Copyright (C) 1998-2017 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/>.
+
+# Removing subdir objects does not cause too much 'rm' invocations.
+# Also, if we rename a source file in a subdirectory, the stale
+# compiled object corresponding to the old name still gets removed
+# by "make mostlyclean".  See automake bug#10697.
+# This is the libtool case.  Keep this test in sync with sister test
+# 'subobj-clean-pr10697.sh', which deals with the non-libtool case.
+
+required='cc libtoolize'
+. test-init.sh
+
+cat >> configure.ac << 'END'
+AM_PROG_AR
+AC_PROG_LIBTOOL
+AC_PROG_CC
+AC_OUTPUT
+END
+
+oPATH=$PATH
+ocwd=$(pwd) || fatal_ "getting current working directory"
+
+# An rm(1) wrapper that fails when invoked too many times.
+mkdir rm-wrap
+max_rm_invocations=6
+count_file=$ocwd/rm-wrap/count
+cat > rm-wrap/rm <<END
+#!$AM_TEST_RUNNER_SHELL -e
+count=\$((\$(cat '$count_file') + 1))
+if ! test \$count -le $max_rm_invocations; then
+  echo "rm invoked more than $max_rm_invocations times" >&2
+  exit 1
+fi
+echo "\$count" > '$count_file'
+PATH='$oPATH'; export PATH
+exec rm "\$@"
+END
+chmod a+x rm-wrap/rm
+echo "0" > rm-wrap/count
+
+cat > Makefile.am <<'END'
+.PHONY: sanity-check-rm
+sanity-check-rm:
+       rm -f 1
+       rm -f 2
+       rm -f 3
+       rm -f 4
+       rm -f 5
+       rm -f 6
+       rm -f x && exit 1; :
+       echo "0" > rm-wrap/count
+
+AUTOMAKE_OPTIONS = subdir-objects
+lib_LTLIBRARIES = libfoo.la
+libfoo_la_SOURCES = \
+  sub1/a.c \
+  sub1/b.c \
+  sub1/c.c \
+  sub1/d.c \
+  sub1/e.c \
+  sub1/f.c \
+  sub2/a.c \
+  sub2/b.c \
+  sub2/c.c \
+  sub2/d.c \
+  sub2/e.c \
+  sub2/f.c \
+  main.c
+END
+
+mkdir sub1 sub2
+echo 'int libmain (void)' > main.c
+echo '{' >> main.c
+for i in 1 2; do
+  for j in a b c d e f; do
+    echo "void $j$i (void) { }" > sub$i/$j.c
+    echo "  $j$i ();" >> main.c
+  done
+done
+echo '  return 0;' >> main.c
+echo '}' >> main.c
+cat main.c # For debugging.
+
+libtoolize
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE -a
+
+./configure
+
+# The use of this variable is only meant to keep us better in sync
+# with the sister test 'subobj-clean-pr10697.sh'.
+OBJEXT=lo
+
+$MAKE
+
+# This must go after configure, since that will invoke rm many times.
+PATH=$ocwd/rm-wrap$PATH_SEPARATOR$PATH; export PATH
+$MAKE sanity-check-rm || fatal_ "rm wrapper doesn't work as expected"
+
+$MAKE mostlyclean
+ls -l . sub1 sub2
+for i in 1 2; do
+  for j in a b c d e f; do
+    test ! -e sub$i/$j.o
+    test ! -e sub$i/$j.obj
+    test ! -e sub$i/$j.lo
+    test -f sub$i/$j.c || exit 99 # Sanity check
+  done
+done
+
+PATH=$oPATH; export PATH
+rm -rf rm-wrap
+
+$MAKE clean
+$MAKE
+test -f sub1/a.$OBJEXT
+test -f sub2/d.$OBJEXT
+
+$sleep
+
+mv -f sub2/d.c sub2/x.c
+rm -f sub1/a.c
+
+sed -e '/ a1 ()/d' main.c > t
+mv -f t main.c
+
+sed -e '/sub1\/a\.c/d' -e 's|sub2/d\.c|sub2/x.c|' Makefile.am > t
+mv -f t Makefile.am
+
+using_gmake || $MAKE Makefile
+$MAKE
+test -f sub2/x.$OBJEXT
+
+# The stale objects are still there after a mere "make all" ...
+test -f sub1/a.$OBJEXT
+test -f sub2/a.$OBJEXT
+
+# ... but they get removed by "make mostlyclean" ...
+$MAKE mostlyclean
+test ! -e sub1/a.$OBJEXT
+test ! -e sub2/d.$OBJEXT
+
+# ... and do not get rebuilt ...
+$MAKE clean
+$MAKE all
+test ! -e sub1/a.$OBJEXT
+test ! -e sub2/d.$OBJEXT
+
+# ... while the non-stale files do.
+test -f sub1/b.$OBJEXT
+test -f sub2/x.$OBJEXT
+
+:
diff --git a/t/subobj-clean-pr10697.sh b/t/subobj-clean-pr10697.sh
new file mode 100644 (file)
index 0000000..c212633
--- /dev/null
@@ -0,0 +1,163 @@
+#! /bin/sh
+# Copyright (C) 1998-2017 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/>.
+
+# Removing subdir objects does not cause too much 'rm' invocations.
+# Also, if we rename a source file in a subdirectory, the stale
+# compiled object corresponding to the old name still gets removed by
+# "make mostlyclean".  See automake bug#10697.
+# This is the non-libtool case.  Keep this test in sync with sister test
+# 'subobj-clean-lt-pr10697.sh', which deals with the libtool case.
+
+required=cc
+. test-init.sh
+
+cat >> configure.ac << 'END'
+AC_PROG_CC
+AC_CONFIG_FILES([get-objext.sh:get-objext.in])
+AC_OUTPUT
+END
+
+echo "OBJEXT='@OBJEXT@'" > get-objext.in
+
+oPATH=$PATH
+ocwd=$(pwd) || fatal_ "getting current working directory"
+
+# An rm(1) wrapper that fails when invoked too many times.
+mkdir rm-wrap
+max_rm_invocations=3
+count_file=$ocwd/rm-wrap/count
+cat > rm-wrap/rm <<END
+#!$AM_TEST_RUNNER_SHELL -e
+count=\$((\$(cat '$count_file') + 1))
+test \$count -le $max_rm_invocations || {
+  echo "rm invoked more than $max_rm_invocations times" >&2
+  exit 1
+}
+echo "\$count" > '$count_file'
+PATH='$oPATH'; export PATH
+exec rm "\$@"
+END
+chmod a+x rm-wrap/rm
+echo "0" > rm-wrap/count
+
+cat > Makefile.am <<'END'
+.PHONY: sanity-check-rm
+sanity-check-rm:
+       rm -f 1
+       rm -f 2
+       rm -f 3
+       rm -f x && exit 1; :
+       echo "0" > rm-wrap/count
+
+AUTOMAKE_OPTIONS = subdir-objects
+bin_PROGRAMS = foo
+foo_SOURCES = \
+  sub1/a.c \
+  sub1/b.c \
+  sub1/c.c \
+  sub1/d.c \
+  sub1/e.c \
+  sub1/f.c \
+  sub2/a.c \
+  sub2/b.c \
+  sub2/c.c \
+  sub2/d.c \
+  sub2/e.c \
+  sub2/f.c \
+  main.c
+END
+
+mkdir sub1 sub2
+echo 'int main (void)' > main.c
+echo '{' >> main.c
+for i in 1 2; do
+  for j in a b c d e f; do
+    echo "void $j$i (void) { }" > sub$i/$j.c
+    echo "  $j$i ();" >> main.c
+  done
+done
+echo '  return 0;' >> main.c
+echo '}' >> main.c
+cat main.c # For debugging.
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE -a
+
+./configure
+
+test -f get-objext.sh
+. ./get-objext.sh
+
+$MAKE
+
+# This must go after configure, since that will invoke rm many times.
+PATH=$ocwd/rm-wrap$PATH_SEPARATOR$PATH; export PATH
+$MAKE sanity-check-rm || fatal_ "rm wrapper doesn't work as expected"
+
+$MAKE mostlyclean
+ls -l . sub1 sub2
+for i in 1 2; do
+  for j in a b c d e f; do
+    test ! -e sub$i/$j.o
+    test ! -e sub$i/$j.obj
+    test -f sub$i/$j.c || exit 99 # Sanity check
+  done
+done
+
+PATH=$oPATH; export PATH
+rm -rf rm-wrap
+
+$MAKE clean
+$MAKE
+test -f sub1/a.$OBJEXT
+test -f sub2/d.$OBJEXT
+
+$sleep
+
+mv -f sub2/d.c sub2/x.c
+rm -f sub1/a.c
+
+sed -e '/ a1 ()/d' main.c > t
+mv -f t main.c
+
+sed -e '/sub1\/a\.c/d' -e 's|sub2/d\.c|sub2/x.c|' Makefile.am > t
+mv -f t Makefile.am
+
+using_gmake || $MAKE Makefile
+$MAKE
+test -f sub2/x.$OBJEXT
+
+# The stale objects are still there after a mere "make all" ...
+test -f sub1/a.$OBJEXT
+test -f sub2/a.$OBJEXT
+
+# ... but they get removed by "make mostlyclean" ...
+$MAKE mostlyclean
+test ! -e sub1/a.$OBJEXT
+test ! -e sub2/d.$OBJEXT
+
+# ... and do not get rebuilt ...
+$MAKE clean
+$MAKE all
+test ! -e sub1/a.$OBJEXT
+test ! -e sub2/d.$OBJEXT
+
+# ... while the non-stale files do.
+test -f sub1/b.$OBJEXT
+test -f sub2/x.$OBJEXT
+
+:
old mode 100755 (executable)
new mode 100644 (file)
similarity index 52%
rename from t/specflg.sh
rename to t/subobj-indir-pr13928.sh
index 9d5c73c..3fa45d7
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 1999-2012 Free Software Foundation, Inc.
+# Copyright (C) 2013-2017 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 of flags specific to executable.
+# Expose part of Automake bug#13928: config.status generates broken
+# makefiles if the subdir-objects option is used and a _SOURCES
+# variable lists sources whose directory part is specified as a
+# make variable ("foo_SOURCES = $(src)/foo.c").
 
-. ./defs || Exit 1
+required=cc
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_CC
 AM_PROG_CC_C_O
+AC_OUTPUT
 END
 
-cat > Makefile.am << 'END'
-AUTOMAKE_OPTIONS = no-dependencies
+cat > Makefile.am <<'END'
+AUTOMAKE_OPTIONS = subdir-objects
+src = s
 bin_PROGRAMS = foo
-foo_SOURCES = foo.c
-foo_CFLAGS = -DBAR
+foo_SOURCES = $(src)/foo.c
 END
 
-# Make sure 'compile' is required.
-$ACLOCAL
-AUTOMAKE_fails
-grep 'required.*compile' stderr
+mkdir s
+echo 'int main(void) { return 0; }' > s/foo.c
 
-: > compile
+$ACLOCAL && $AUTOCONF && $AUTOMAKE -a || fatal_ "autotools failed"
 
-$AUTOMAKE
+./configure
+$MAKE
+test -f s/.deps/foo.Po
+find . | $FGREP '$(src)' && exit 1
+$MAKE distcheck
 
-# Look for $(COMPILE) -c in .c.o rule.
-grep 'COMPILE. [^-]' Makefile.in && Exit 1
-
-# Look for foo-foo.o.
-grep '[^-]foo\.o' Makefile.in && Exit 1
-
-# Regression test for missing space.
-$FGREP ')-c' Makefile.in && Exit 1
-
-Exit 0
+:
diff --git a/t/subobj-vpath-pr13928.sh b/t/subobj-vpath-pr13928.sh
new file mode 100644 (file)
index 0000000..0d4c243
--- /dev/null
@@ -0,0 +1,60 @@
+#! /bin/sh
+# Copyright (C) 2013-2017 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/>.
+
+# Expose part of automake bug#13928: if the subdir-objects option is
+# in use and a source file is listed in a _SOURCES variable with a
+# leading $(srcdir) component, Automake will generate a Makefile that
+# tries to create the corresponding object file in $(srcdir) as well.
+
+required=cc
+. test-init.sh
+
+cat >> configure.ac << 'END'
+AC_PROG_CC
+AM_PROG_CC_C_O
+AC_OUTPUT
+END
+
+cat > Makefile.am <<'END'
+AUTOMAKE_OPTIONS = subdir-objects
+noinst_PROGRAMS = test
+test_SOURCES = $(srcdir)/test.c
+test-objs:
+       test ! -f $(srcdir)/test.$(OBJEXT)
+       test -f test.$(OBJEXT)
+END
+
+$ACLOCAL && $AUTOCONF && $AUTOMAKE -a || fatal_ "autotools failed"
+
+$EGREP 'test\.|DEPDIR|dirstamp|srcdir' Makefile.in || : # For debugging.
+$EGREP '\$.srcdir./test\.[o$]' Makefile.in && exit 1
+$EGREP '$(srcdir)/$(am__dirstamp)' Makefile.in && exit 1
+$EGREP '$(srcdir)/$(DEPDIR)' && exit 1
+
+cat > test.c << 'END'
+int main (void)
+{
+  return 0;
+}
+END
+
+mkdir build && cd build || fatal "preparation of build directory failed"
+../configure || fatal_ "./configure failed"
+
+$MAKE
+$MAKE test-objs
+
+:
old mode 100755 (executable)
new mode 100644 (file)
index b7f6597..bba4b9c
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 1999-2012 Free Software Foundation, Inc.
+# Copyright (C) 1999-2017 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 of subdir objects with C.
+# Test of subdir objects with C and C++.
 
-. ./defs || Exit 1
+. test-init.sh
 
-cat >> configure.ac << 'END'
+cat >> configure.ac <<'END'
 AC_PROG_CC
-AM_PROG_CC_C_O
+AC_PROG_CXX
+AC_PROG_YACC
+AC_CONFIG_FILES([sub/Makefile])
+AC_OUTPUT
 END
 
+$ACLOCAL
+: > ylwrap
+
 cat > Makefile.am << 'END'
-AUTOMAKE_OPTIONS = subdir-objects
+SUBDIRS = sub
 bin_PROGRAMS = wish
-wish_SOURCES = generic/a.c generic/b.c
+wish_SOURCES = generic/a.c
+wish_SOURCES += another/z.cxx
 END
 
-$ACLOCAL
-$AUTOMAKE --add-missing 2>stderr || { cat stderr >&2; Exit 1; }
+mkdir sub
+cat > sub/Makefile.am << 'END'
+dream_SOURCES = generic/b.c more/r.y
+bin_PROGRAMS = dream
+END
+
+AUTOMAKE_fails
+grep "^Makefile\.am:3:.*'generic/a\.c'.* in a subdirectory" stderr
+grep "^Makefile\.am:[34]:.*'another/z\.cxx'.* in a subdirectory" stderr
+grep "^sub/Makefile\.am:1:.*'generic/b\.c'.* in a subdirectory" stderr
+grep "option 'subdir-objects' is disabled" stderr
+# Verbose tips should be given, but not too many times.
+for msg in \
+  "possible forward-incompatibility" \
+  "advi[sc]e.* 'subdir-objects' option throughout" \
+  "unconditionally.* object file.* same subdirectory" \
+; do
+  test $(grep -c "$msg" stderr) -eq 1
+done
+
+# Guard against stupid typos.
+grep 'subdir-object([^s]|$)' stderr && exit 1
+
+$AUTOMAKE -Wno-unsupported
+
+echo AUTOMAKE_OPTIONS = subdir-objects >> Makefile.am
+AUTOMAKE_fails
+grep "^Makefile\.am" stderr && exit 1
+grep "^sub/Makefile\.am:.*'generic/b\.c'.* in a subdirectory" stderr
+grep "option 'subdir-objects' is disabled" stderr
+
+sed 's/^AM_INIT_AUTOMAKE/&([subdir-objects])/' configure.ac > configure.tmp
+mv -f configure.tmp configure.ac
+$ACLOCAL --force
+$AUTOMAKE
+
+rm -f compile
+$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
+grep '^configure\.ac:[48]:.*install.*compile' stderr
 test -f compile
 
 grep '^generic/a\.\$(OBJEXT):' Makefile.in
-grep '[^/]a\.\$(OBJEXT)' Makefile.in && Exit 1
+grep '^generic/b\.\$(OBJEXT):' sub/Makefile.in
+grep '^another/z\.\$(OBJEXT):' Makefile.in
+$EGREP '(^|[^/])[abz]\.\$(OBJEXT)' Makefile.in sub/Makefile.in && exit 1
 
 # Opportunistically test for a different bug.
-grep '^generic/b\.\$(OBJEXT):.*dirstamp' Makefile.in
+grep '^another/z\.\$(OBJEXT):.*dirstamp' Makefile.in
+grep '^generic/b\.\$(OBJEXT):.*dirstamp' sub/Makefile.in
 
 :
old mode 100755 (executable)
new mode 100644 (file)
index db6bf72..a027ad0
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2006-2012 Free Software Foundation, Inc.
+# Copyright (C) 2006-2017 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
@@ -16,8 +16,8 @@
 
 # PR 492: Test asm subdir-objects.
 
-required=gcc
-. ./defs || Exit 1
+required='gcc -c-o'
+. test-init.sh
 
 cat > configure.ac << END
 AC_INIT([$me], [1.0])
old mode 100755 (executable)
new mode 100644 (file)
index 461325a..a613591
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2010-2012 Free Software Foundation, Inc.
+# Copyright (C) 2010-2017 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
 # (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'.
+# See also sister "grepping" test 'subobj11b.sh', and related test
+# 'subobj11c.sh'.
 
 required=cc
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_CC
-AM_PROG_CC_C_O
 AC_OUTPUT
 END
 
@@ -57,12 +56,12 @@ $AUTOMAKE -a
 
 ./configure --enable-dependency-tracking
 
-depdir=`sed -n 's/^ *DEPDIR *= *//p' Makefile`
+depdir=$(sed -n 's/^ *DEPDIR *= *//p' Makefile)
 if test x"$depdir" != x; then
   depdir=src/$depdir
 else
   echo "$me: cannot extract value of DEPDIR from Makefile" >&2
-  Exit 1
+  exit 1
 fi
 
 ls -l "$depdir"
old mode 100755 (executable)
new mode 100644 (file)
index 129b6ea..1fb280e
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2010-2012 Free Software Foundation, Inc.
+# Copyright (C) 2010-2017 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
 # (even if the file 'foo.mk' exists). The error disappear by collapsing
 # the repeated slash '/' characters into a single one.
 #
-# See also "semantic" sister test 'subobj11a.test', and related test
-# 'subobj11c.test'.
+# See also "semantic" sister test 'subobj11a.sh', and related test
+# 'subobj11c.sh'.
 
-. ./defs || Exit 1
+. test-init.sh
 
-cat >> configure.ac << 'END'
-AC_PROG_CC
-AM_PROG_CC_C_O
-END
+echo AC_PROG_CC >> configure.ac
 
 cat > Makefile.am << 'END'
 AUTOMAKE_OPTIONS = subdir-objects
@@ -61,7 +58,7 @@ $AUTOMAKE -a
 
 # Be lax in the regexp, to account for automake conditionals, the
 # use of @am__include@, and similar stuff.
-grep 'include.*//.*foobar' Makefile.in && Exit 1
+grep 'include.*//.*foobar' Makefile.in && exit 1
 
 # These checks depend on automake internals, but presently this is
 # the only way to test the code path we are interested in.
@@ -69,7 +66,7 @@ grep 'include.*//.*foobar' Makefile.in && Exit 1
 # internals are changed.
 for x in zardoz0 zardoz1 path/to/zardoz2 another/path/to/zardoz3; do
   case $x in
-   */*) d=`echo $x | sed 's,[^/]*$,,'`; b=`echo $x | sed 's,^.*/,,'`;;
+   */*) d=$(echo $x | sed 's,[^/]*$,,'); b=$(echo $x | sed 's,^.*/,,');;
      *) d=''; b=$x;;
   esac
   # Be a little lax in the regexp, to account for automake conditionals,
old mode 100755 (executable)
new mode 100644 (file)
index 9f59c5f..fb60b1f
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2010-2012 Free Software Foundation, Inc.
+# Copyright (C) 2010-2017 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
 # Automatic dependency tracking with subdir-objects option active:
 # check for a pathological case of slash-collapsing in the name of
 # included makefile fragments (containing dependency info).
-# See also related tests 'subobj11a.test' and 'subobj11b.test'.
+# See also related tests 'subobj11a.sh' and 'subobj11b.sh'.
 
-. ./defs || Exit 1
+. test-init.sh
 
-cat >> configure.ac << 'END'
-AC_PROG_CC
-AM_PROG_CC_C_O
-END
+echo AC_PROG_CC >> configure.ac
 
 cat > Makefile.am << 'END'
 AUTOMAKE_OPTIONS = subdir-objects
old mode 100755 (executable)
new mode 100644 (file)
index 3a3f861..4a0bce5
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 1999-2012 Free Software Foundation, Inc.
+# Copyright (C) 1999-2017 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
@@ -16,7 +16,7 @@
 
 # Test of subdir objects with C++.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_CXX
@@ -32,7 +32,7 @@ $ACLOCAL
 $AUTOMAKE
 
 $FGREP 'generic/a.$(OBJEXT)' Makefile.in
-grep '[^/]a\.\$(OBJEXT)' Makefile.in && Exit 1
+grep '[^/]a\.\$(OBJEXT)' Makefile.in && exit 1
 grep '.*-c -o' Makefile.in
 
 :
old mode 100755 (executable)
new mode 100644 (file)
index 975f8fb..3413b6f
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2001-2012 Free Software Foundation, Inc.
+# Copyright (C) 2001-2017 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
 # Make sure '../foo/foo.cpp' generates a rule.
 # Report from Dave Brolley.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_CC
-AM_PROG_CC_C_O
 AC_PROG_CXX
 AC_CONFIG_FILES([d1/Makefile d2/Makefile])
 AC_OUTPUT
@@ -41,11 +40,10 @@ END
 cat > d2/Makefile.am << 'END'
 END
 
-: > compile
 : > d2/z.c
 
 $ACLOCAL
-$AUTOMAKE
+$AUTOMAKE -Wno-unsupported
 
 grep '\$(CC) .*\.\./d2/z\.c' d1/Makefile.in
 
old mode 100755 (executable)
new mode 100644 (file)
index 3b05b6a..46efa0c
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2001-2012 Free Software Foundation, Inc.
+# Copyright (C) 2001-2017 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
 # From Robert Collins.
 
 required=cc
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_CONFIG_FILES([generic/Makefile])
 AC_PROG_CC
-AM_PROG_CC_C_O
 AC_OUTPUT
 END
 
old mode 100755 (executable)
new mode 100644 (file)
index 2f902f2..65976d9
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2001-2012 Free Software Foundation, Inc.
+# Copyright (C) 2001-2017 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
 # From Robert Collins.
 
 required=cc
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
-AM_PROG_CC_C_O
+AC_PROG_CC
 AC_OUTPUT
 END
 
old mode 100755 (executable)
new mode 100644 (file)
index 863cae0..3c67698
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2001-2012 Free Software Foundation, Inc.
+# Copyright (C) 2001-2017 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
 # Test to make sure AM_CFLAGS appears in subdir compilation rule.
 # Report from Steve M. Robbins.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_CC
-AM_PROG_CC_C_O
 AC_OUTPUT
 END
 
 cat > Makefile.am << 'END'
+AUTOMAKE_OPTIONS = subdir-objects
 bin_PROGRAMS = wish
 wish_SOURCES = foo.c generic/a.c
 END
@@ -33,6 +33,6 @@ END
 $ACLOCAL
 $AUTOMAKE --add-missing
 
-grep wish_CFLAGS Makefile.in && Exit 1
+grep wish_CFLAGS Makefile.in && exit 1
 
 :
old mode 100755 (executable)
new mode 100644 (file)
index 35b566f..6720931
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2001-2012 Free Software Foundation, Inc.
+# Copyright (C) 2001-2017 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
 
 # Make sure 'compile' is included when subdir-objects is used in a subdir.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat > configure.ac << END
 AC_INIT([$me], [1.0])
 AC_CONFIG_AUX_DIR([tools])
 AM_INIT_AUTOMAKE
 AC_PROG_CC
-AM_PROG_CC_C_O
 AC_CONFIG_FILES([Makefile foo/Makefile])
 AC_OUTPUT
 END
old mode 100755 (executable)
new mode 100644 (file)
index f706edf..3566b61
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2002-2012 Free Software Foundation, Inc.
+# Copyright (C) 2002-2017 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
@@ -23,7 +23,7 @@
 # forgets '.../<file>.o'.
 
 required='c++ libtoolize'
-. ./defs || Exit 1
+. test-init.sh
 
 cat > configure.ac << END
 AC_INIT([$me], [1.0])
@@ -37,7 +37,7 @@ END
 
 cat > Makefile.am << 'END'
 noinst_LTLIBRARIES = libfoo.la
-libfoo_la_SOURCES = src/foo.cc .//src/bar.cc  # The `.//' is meant.
+libfoo_la_SOURCES = src/foo.cc .//src/bar.cc  # The './/' is meant.
 .PHONY: print
 print:
        @echo BEG1: "$(LTCXXCOMPILE)" :1END
@@ -73,17 +73,15 @@ export AUTOCONF AUTOMAKE
 
 # Opportunistically check that --tag=CXX is used when supported.
 if ./libtool --help | grep tag=TAG; then
-  $MAKE print >stdout || { cat stdout; Exit 1; }
-  cat stdout
+  run_make -O print
   grep 'BEG1: .*--tag=CXX.*--mode=compile.* :1END' stdout
   grep 'BEG2: .*--tag=CXX.*--mode=link.* :2END' stdout
 fi
 
 $MAKE
-$MAKE distcheck >output 2>&1 || { cat output; Exit 1; }
-cat output
+run_make -M distcheck
 # GNU Make used to complain that the Makefile contained two rules
 # for 'src/.dirstamp' and './/src/.dirstamp'.
-grep 'overriding commands' output && Exit 1
+grep 'overriding commands' output && exit 1
 
 :
old mode 100755 (executable)
new mode 100644 (file)
index bef3bf0..17521a4
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2002-2012 Free Software Foundation, Inc.
+# Copyright (C) 2002-2017 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
@@ -18,7 +18,7 @@
 # combinational explosion.  (This test is named after the &subobjname
 # sub in Automake).
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_CC
@@ -59,14 +59,14 @@ grep '^am_c_OBJECTS = ' Makefile.in
 grep '^am_d_OBJECTS = ' Makefile.in
 
 # Now the actual test.  Are both values equal?
-cobj=`sed -n '/^am_c_OBJECTS = / {
-                s/.* = \(.*\)$/\1/
-                p
-              }' Makefile.in`
-dobj=`sed -n '/^am_d_OBJECTS = / {
-                s/^.* = \(.*\)$/\1/
-                p
-              }' Makefile.in`
+cobj=$(sed -n '/^am_c_OBJECTS = / {
+                 s/.* = \(.*\)$/\1/
+                 p
+               }' Makefile.in)
+dobj=$(sed -n '/^am_d_OBJECTS = / {
+                 s/^.* = \(.*\)$/\1/
+                 p
+              }' Makefile.in)
 test "$cobj" = "$dobj"
 
 :
diff --git a/t/subpkg-macrodir.sh b/t/subpkg-macrodir.sh
new file mode 100644 (file)
index 0000000..cb82404
--- /dev/null
@@ -0,0 +1,85 @@
+#! /bin/sh
+# Copyright (C) 2002-2017 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/>.
+
+# Subpackages that want to use m4 macros from their superpackages,
+# with AC_CONFIG_MACRO_DIRS.
+
+. test-init.sh
+
+cat > configure.ac <<'END'
+AC_INIT([super], [1.0])
+AM_INIT_AUTOMAKE
+AC_CONFIG_MACRO_DIR([m4])
+AC_CONFIG_SUBDIRS([pkg])
+AX_BAR
+AX_FOO
+END
+
+mkdir m4
+
+cat > m4/foo.m4 <<'EOF'
+AC_DEFUN([AX_FOO], [
+  AC_CONFIG_FILES([Makefile])
+  AC_OUTPUT
+])
+EOF
+
+cat > m4/bar.m4 <<'EOF'
+AC_DEFUN([AX_BAR], [AC_SUBST([WHOAMI], [SuperPkg])])
+EOF
+
+cat > Makefile.am << 'END'
+test-whoami:
+       test '$(WHOAMI)' = SuperPkg
+check-local: test-whoami
+END
+
+mkdir pkg
+
+cat > pkg/configure.ac <<'END'
+AC_INIT([super], [1.0])
+AM_INIT_AUTOMAKE
+AC_CONFIG_MACRO_DIRS([macros ../m4])
+AX_BAR
+AX_FOO
+END
+
+mkdir pkg/macros
+cat > pkg/macros/zardoz.m4 << 'END'
+AC_DEFUN([AX_BAR], [AC_SUBST([WHOAMI], [sub-pkg])])
+END
+
+cat > pkg/Makefile.am << 'END'
+test-whoami:
+       test '$(WHOAMI)' = sub-pkg
+check-local: test-whomai
+END
+
+AUTOMAKE=$AUTOMAKE ACLOCAL=$ACLOCAL AUTOCONF=$AUTOCONF $AUTORECONF -vi
+
+$FGREP 'm4_include([m4/foo.m4])' aclocal.m4
+$FGREP 'm4_include([m4/bar.m4])' aclocal.m4
+$FGREP 'm4_include([../m4/foo.m4])' pkg/aclocal.m4
+$FGREP 'm4_include([macros/zardoz.m4])' pkg/aclocal.m4
+
+./configure
+
+$MAKE test-whoami
+(cd pkg && $MAKE test-whoami) || exit 1
+
+$MAKE distcheck
+
+:
old mode 100755 (executable)
new mode 100644 (file)
index f1b2ac3..a7c93c6
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2002-2012 Free Software Foundation, Inc.
+# Copyright (C) 2002-2017 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
@@ -18,7 +18,7 @@
 # properly, when a subpackage is involved.
 
 required='cc yacc'
-. ./defs || Exit 1
+. test-init.sh
 
 cat >>configure.ac <<'END'
 AC_PROG_CC
@@ -49,7 +49,7 @@ mkdir lib/src
 
 cat >lib/configure.ac <<'EOF'
 AC_INIT([lib], [2.3])
-AM_INIT_AUTOMAKE
+AM_INIT_AUTOMAKE([subdir-objects])
 AC_PROG_RANLIB
 AC_PROG_YACC
 dnl This comes after YACC and RANLIB checks, deliberately.
@@ -120,7 +120,7 @@ cd ..
 $MAKE dist
 test -f lib-dist-hook-has-run
 test -f subpack-1.tar.gz
-test ! -d subpack-1 # Make sure "dist" cleans up after itself.
+test ! -e subpack-1 # Make sure "dist" cleans up after itself.
 
 rm -f lib-dist-hook-has-run subpack-1.tar.gz
 
old mode 100755 (executable)
new mode 100644 (file)
index 82bf338..1b78c9c
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2002-2012 Free Software Foundation, Inc.
+# Copyright (C) 2002-2017 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
@@ -17,7 +17,7 @@
 # Check subpackage handling.
 
 required=cc
-. ./defs || Exit 1
+. test-init.sh
 
 mkdir m4
 
@@ -29,6 +29,7 @@ AC_DEFUN([FOO],[
 EOF
 
 cat >>configure.ac <<'END'
+AC_CONFIG_MACRO_DIR([m4])
 AC_CONFIG_SUBDIRS([lib])
 FOO
 END
@@ -46,8 +47,6 @@ distdir = subpack-1
 dist-hook:
        test -f $(distdir)/LDADD.c
        test -f $(top_distdir)/LDADD.c
-
-ACLOCAL_AMFLAGS = -I m4
 EOF
 
 cat >LDADD.c <<'EOF'
@@ -63,7 +62,8 @@ mkdir lib/src
 
 cat >lib/configure.ac <<'EOF'
 AC_INIT([lib], [2.3])
-AM_INIT_AUTOMAKE
+AM_INIT_AUTOMAKE([subdir-objects])
+AC_CONFIG_MACRO_DIR([../m4])
 AM_PROG_AR
 AC_PROG_RANLIB
 AC_CONFIG_HEADERS([config.h:config.hin])
@@ -80,8 +80,6 @@ dist-hook:
        test -f $(top_distdir)/LDADD.c
        test -f $(distdir)/src/x.c
        test ! -f $(top_distdir)/src/x.c
-
-ACLOCAL_AMFLAGS = -I ../m4
 EOF
 
 cat >lib/src/x.c <<'EOF'
@@ -92,12 +90,12 @@ int lib (void)
 }
 EOF
 
-$ACLOCAL -I m4
-$AUTOCONF
+$ACLOCAL
+$AUTOCONF -Werror -Wall
 $AUTOMAKE -Wno-override
 
 cd lib
-$ACLOCAL -I ../m4
+$ACLOCAL
 $FGREP 'm4_include([../m4/foo.m4])' aclocal.m4
 $AUTOCONF
 $AUTOHEADER
@@ -107,7 +105,7 @@ cd ..
 ./configure
 $MAKE
 $MAKE distcheck
-test ! -d subpack-1 # Make sure distcheck cleans up after itself.
+test ! -e subpack-1 # Make sure distcheck cleans up after itself.
 test -f subpack-1.tar.gz
 
 :
old mode 100755 (executable)
new mode 100644 (file)
index af89fc1..c3ff9d6
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2003-2012 Free Software Foundation, Inc.
+# Copyright (C) 2003-2017 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
@@ -17,7 +17,7 @@
 # Try a DIST_SUBDIRS subpackage with no SUBDIRS.
 # Report from Gary V. Vaughan.
 
-. ./defs || Exit 1
+. test-init.sh
 
 mkdir m4
 
@@ -28,6 +28,7 @@ AC_DEFUN([FOO],[
 EOF
 
 cat >>configure.ac <<'END'
+AC_CONFIG_MACRO_DIR([m4])
 AC_CONFIG_SUBDIRS([sub])
 AC_OUTPUT
 END
@@ -43,20 +44,21 @@ mkdir sub
 cat >sub/configure.ac <<'EOF'
 AC_INIT([sub], [2.3])
 AM_INIT_AUTOMAKE
+AC_CONFIG_MACRO_DIR([../m4])
 AC_CONFIG_FILES([Makefile])
 AC_CONFIG_FILES([script])
 FOO
 EOF
 
 : >sub/script.in
-echo ACLOCAL_AMFLAGS = -I ../m4 > sub/Makefile.am
+: >sub/Makefile.am
 
-$ACLOCAL -I m4
+$ACLOCAL
 $AUTOCONF
 $AUTOMAKE
 
 cd sub
-$ACLOCAL -I ../m4
+$ACLOCAL
 $FGREP 'm4_include([../m4/foo.m4])' aclocal.m4
 $AUTOCONF
 $AUTOMAKE -Wno-override
@@ -64,3 +66,5 @@ cd ..
 
 ./configure
 $MAKE distcheck
+
+:
old mode 100755 (executable)
new mode 100644 (file)
index 38dc455..3223fa8
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2006-2012 Free Software Foundation, Inc.
+# Copyright (C) 2006-2017 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
@@ -16,7 +16,7 @@
 
 # Make sure different subpackages may share files and directories.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat >Makefile.am <<'END'
 SUBDIRS = subpkg
old mode 100755 (executable)
new mode 100644 (file)
index f8e9a2c..76a4ed0
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2006-2012 Free Software Foundation, Inc.
+# Copyright (C) 2006-2017 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
@@ -17,7 +17,7 @@
 # Test to ensure 'distdir' fixes the mode of files and directories
 # copied into '$(distdir)', even with sub-packages.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat >Makefile.am <<'END'
 SUBDIRS = subpkg
old mode 100755 (executable)
new mode 100644 (file)
index 2069e3a..3f29be3
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2003-2012 Free Software Foundation, Inc.
+# Copyright (C) 2003-2017 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
@@ -21,7 +21,7 @@
 # These checks have been introduced in commit 'Release-1-9-254-g9d0eaef'
 # into the former test 'subst2.test'.
 
-. ./defs || Exit 1
+. test-init.sh
 
 # These are deliberately quite long, so that the xxx_PROGRAMS definition
 # in Makefile.am below will be split on multiple lines, with the last
@@ -58,10 +58,15 @@ check_PROGRAMS = zardoz \$(noinst_PROGRAMS)
 ## PROGRAMS primary, otherwise automake will complain.
 EXTRA_PROGRAMS =
 
-print-programs:
-       @echo BEG1: \$(noinst_PROGRAMS) :END1
-       @echo BEG2: \$(bin_PROGRAMS) :END2
-       @echo BEG3: \$(check_PROGRAMS) :END3
+test-real-empty:
+       is \$(noinst_PROGRAMS) == x
+       is \$(bin_PROGRAMS)    ==
+       is \$(check_PROGRAMS)  == zardoz x
+
+test-fake-empty:
+       is \$(noinst_PROGRAMS) == x X
+       is \$(bin_PROGRAMS)    == X
+       is \$(check_PROGRAMS)  == zardoz x X
 END
 
 $ACLOCAL
@@ -70,7 +75,7 @@ $AUTOMAKE
 # For debugging.
 $EGREP -n 'ABCD|am__empty' Makefile.in
 # Sanity check.
-test `$EGREP -c "^[ $tab]*@$v2@ @$v3@[ $tab]*$bs?$" Makefile.in` -eq 3
+test $($EGREP -c "^[ $tab]*@$v2@ @$v3@[ $tab]*$bs?$" Makefile.in) -eq 3
 
 ./configure
 {
@@ -80,18 +85,9 @@ test `$EGREP -c "^[ $tab]*@$v2@ @$v3@[ $tab]*$bs?$" Makefile.in` -eq 3
   sed -n '/^am__EXEEXT.*=/,/[^\\]$/p' Makefile
 } >t-programs
 cat t-programs
-grep '^ *$' t-programs && Exit 1
-
-$MAKE print-programs >stdout || { cat stdout; Exit 1; }
-cat stdout
-grep '^BEG1: x :END1$' stdout
-grep '^BEG2: :END2$' stdout
-grep '^BEG3: zardoz x :END3$' stdout
+grep '^ *$' t-programs && exit 1
 
-am__empty=X $MAKE -e print-programs >stdout || { cat stdout; Exit 1; }
-cat stdout
-grep '^BEG1: x X :END1$' stdout
-grep '^BEG2: X :END2$' stdout
-grep '^BEG3: zardoz x X :END3$' stdout
+run_make test-real-empty
+run_make test-fake-empty am__empty=X
 
 :
old mode 100755 (executable)
new mode 100644 (file)
index f46f2ed..8cb29f4
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 1996-2012 Free Software Foundation, Inc.
+# Copyright (C) 1996-2017 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
@@ -17,7 +17,7 @@
 # Test that AC_SUBST($1) does something sensible.  From Ulrich
 # Drepper.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 dnl This test used to have the following lines, which cannot have
@@ -34,6 +34,6 @@ END
 
 $ACLOCAL
 $AUTOMAKE
-grep '^\$1' Makefile.in && Exit 1
+grep '^\$1' Makefile.in && exit 1
 
 :
old mode 100755 (executable)
new mode 100644 (file)
index cc81063..9e3d83b
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2001-2012 Free Software Foundation, Inc.
+# Copyright (C) 2001-2017 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 installation with substitutions.  This test is based on nobase.test.
+# Test installation with substitutions.  This test is based on
+# 'nobase.sh'.
 
 required=cc
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac <<'EOF'
 AC_PROG_CC
 AM_PROG_AR
 AC_PROG_RANLIB
-if test -n "$doit"; then
+if test x"$doit" = x"yes"; then
   AC_SUBST([basehdr], [sub/base.h])
   AC_SUBST([nobasehdr], [sub/nobase.h])
   AC_SUBST([basedata], [sub/base.dat])
@@ -139,7 +140,7 @@ rm -f install-sh
 $ACLOCAL
 $AUTOCONF
 $AUTOMAKE -a --copy
-./configure --prefix "`pwd`/inst" --program-prefix=p doit=yes
+./configure --prefix "$(pwd)/inst" --program-prefix=p doit=yes
 
 $MAKE
 $MAKE test-install-data
@@ -147,9 +148,9 @@ $MAKE test-install-exec
 $MAKE uninstall
 $MAKE clean
 
-test `find inst/foo -type f -print | wc -l` = 0
+test $(find inst/foo -type f -print | wc -l) -eq 0
 
-./configure --prefix "`pwd`/inst" --program-prefix=p doit=
+./configure --prefix "$(pwd)/inst" --program-prefix=p doit=no
 
 $MAKE
 $MAKE test-install-nothing-data
@@ -162,14 +163,14 @@ $MAKE uninstall
 $MAKE distclean
 mkdir build
 cd build
-../configure --prefix "`pwd`/inst" --program-prefix=p doit=yes
+../configure --prefix "$(pwd)/inst" --program-prefix=p doit=yes
 $MAKE
 $MAKE test-install-data
 $MAKE test-install-exec
 $MAKE uninstall
-test `find inst/foo -type f -print | wc -l` = 0
+test $(find inst/foo -type f -print | wc -l) -eq 0
 
-../configure --prefix "`pwd`/inst" --program-prefix=p doit=
+../configure --prefix "$(pwd)/inst" --program-prefix=p doit=no
 $MAKE
 $MAKE test-install-nothing-data
 $MAKE test-install-nothing-exec
old mode 100755 (executable)
new mode 100644 (file)
index ab3631e..a0b61a5
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2008-2012 Free Software Foundation, Inc.
+# Copyright (C) 2008-2017 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
@@ -16,7 +16,7 @@
 
 # Test AM_SUBST_NOTMAKE.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac <<'EOF'
 myrule="\
old mode 100755 (executable)
new mode 100644 (file)
index 2fef1b9..b38dfb4
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2009-2012 Free Software Foundation, Inc.
+# Copyright (C) 2009-2017 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
@@ -19,7 +19,7 @@
 # Thus, we allow substitutions in bin_PROGRAMS, but then EXTRA_PROGRAMS
 # needs to list possible values of that substitution, literally.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat >>configure.ac <<'END'
 AC_PROG_CC
@@ -34,7 +34,7 @@ END
 
 $ACLOCAL
 AUTOMAKE_fails
-grep 'bin_PROGRAMS.*contains configure substitution' stderr && Exit 1
+grep 'bin_PROGRAMS.*contains configure substitution' stderr && exit 1
 grep 'EXTRA_PROGRAMS.*contains configure substitution' stderr
 
-Exit 0
+exit 0
old mode 100755 (executable)
new mode 100644 (file)
index a205c08..f7b1edd
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2003-2012 Free Software Foundation, Inc.
+# Copyright (C) 2003-2017 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
@@ -17,7 +17,7 @@
 # Test for bug in variable substitution references, where
 # undefined variables break later substitutions.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_SUBST([CC], [whocares])
old mode 100755 (executable)
new mode 100644 (file)
index 7183a91..5a9f027
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2001-2012 Free Software Foundation, Inc.
+# Copyright (C) 2001-2017 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
@@ -18,7 +18,7 @@
 # pattern is null.
 # Report from Richard Boulton.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_SUBST([CC], [whocares])
@@ -48,7 +48,7 @@ $MAKE test
 # 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).
-grep am__helldl_SOURCES_DIST Makefile && Exit 1
+grep am__helldl_SOURCES_DIST Makefile && exit 1
 grep 'DIST_SOURCES.*\$(helldl_SOURCES)' Makefile
 
 :
old mode 100755 (executable)
new mode 100644 (file)
index 2e695f8..bb5be83
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2001-2012 Free Software Foundation, Inc.
+# Copyright (C) 2001-2017 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
@@ -17,7 +17,7 @@
 # Test that substitutions in variables work.
 # From Lars J. Aas.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_CONFIG_SOURCE([fakelib.c])
@@ -46,5 +46,6 @@ $ACLOCAL
 AUTOMAKE_fails
 grep 'overrid.*libfake@SUBST@.a' stderr
 $AUTOMAKE -Wno-override
-num=`grep '^libfake@SUBST@.a:' Makefile.in | wc -l`
-test $num -eq 1
+test $(grep -c '^libfake@SUBST@.a:' Makefile.in) -eq 1
+
+:
old mode 100755 (executable)
new mode 100644 (file)
index 604e8a9..303f307
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2002-2012 Free Software Foundation, Inc.
+# Copyright (C) 2002-2017 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
@@ -19,7 +19,7 @@
 # See automake bug#7824 and bug#7670.
 
 required=cc
-. ./defs || Exit 1
+. test-init.sh
 
 plan_ 8
 
diff --git a/t/suffix-custom-pr14441.sh b/t/suffix-custom-pr14441.sh
new file mode 100644 (file)
index 0000000..78805e9
--- /dev/null
@@ -0,0 +1,56 @@
+#! /bin/sh
+# Copyright (C) 2002-2017 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 for bug#14441: the same user-defined suffix being transformed into
+# different automake-known suffixes in different Makefiles was confusing
+# Automake.
+
+. test-init.sh
+
+cat >>configure.ac <<EOF
+AC_PROG_CC
+AC_PROG_CXX
+AC_CONFIG_FILES([sub/Makefile])
+EOF
+
+mkdir sub
+
+cat > Makefile.am <<'END'
+SUBDIRS = sub
+bin_PROGRAMS = one
+one_SOURCES = one.ext
+.ext.cc:
+       whatever
+END
+
+cat > sub/Makefile.am <<'END'
+bin_PROGRAMS = two
+two_SOURCES = two.ext
+.ext.c:
+       do something
+END
+
+$ACLOCAL
+$AUTOMAKE -a
+
+$FGREP '.c' Makefile.in sub/Makefile.in # For debugging.
+
+grep '^\.cc\.o:' Makefile.in
+LC_ALL=C $EGREP '\.c[^a-z]' Makefile.in && exit 1
+grep '^\.c\.o:' sub/Makefile.in
+$FGREP '.cc' sub/Makefile.in && exit 1
+
+:
old mode 100755 (executable)
new mode 100644 (file)
similarity index 84%
rename from t/suffix13.sh
rename to t/suffix-custom-subobj-and-specflg.sh
index 6022205..dbb7b6f
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2002-2012 Free Software Foundation, Inc.
+# Copyright (C) 2002-2017 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
 # Reported by Florian Briegel.
 
 required=cc
-. ./defs || Exit 1
+. test-init.sh
 
 cat >>configure.ac <<EOF
 AC_PROG_CC
-AM_PROG_CC_C_O
 AC_OUTPUT
 EOF
 
@@ -54,18 +53,9 @@ END
 $ACLOCAL
 $AUTOCONF
 $AUTOMAKE -a
-./configure
-$MAKE
-
-$MAKE distcheck
-$MAKE distclean
-
-# Should also work without subdir-objects.
 
-sed '/subdir-objects/d' < Makefile.am > t
-mv -f t Makefile.am
-$AUTOMAKE
 ./configure
+
 $MAKE
 $MAKE distcheck
 
old mode 100755 (executable)
new mode 100644 (file)
similarity index 92%
rename from t/suffix12.sh
rename to t/suffix-custom-subobj.sh
index 5882df7..ce44af9
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2002-2012 Free Software Foundation, Inc.
+# Copyright (C) 2002-2017 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
@@ -18,7 +18,7 @@
 # Reported by John Ratliff.
 
 required=cc
-. ./defs || Exit 1
+. test-init.sh
 
 cat >>configure.ac <<EOF
 AC_PROG_CC
@@ -53,7 +53,7 @@ $AUTOMAKE -a
 
 ./configure
 
-OBJEXT=quux $MAKE -e test-fake
+run_make OBJEXT=quux test-fake
 $MAKE test-real
 
 :
old mode 100755 (executable)
new mode 100644 (file)
similarity index 62%
rename from t/yacc.sh
rename to t/suffix-extra-c-stuff-pr14560.sh
index 60b5a4f..b9fd144
--- a/t/yacc.sh
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 1996-2012 Free Software Foundation, Inc.
+# Copyright (C) 2013-2017 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 to make sure intermediate .c file is built from yacc source.
-# Bug from Thomas Morgan.
+# Automake bug#14560: if multiple user-specified suffix rules were
+# present, Automake could generate useless definitions and rules
+# related to C compilation.
 
-. ./defs || Exit 1
-
-cat >> configure.ac << 'END'
-AC_PROG_CC
-AC_PROG_YACC
-END
+. test-init.sh
 
 cat > Makefile.am <<'END'
-bin_PROGRAMS = zardoz
-zardoz_SOURCES = zardoz.y
+.foo.bar:
+       foo2bar -o $@ $<
+.baz.qux:
+       baz2qux -o $@ $<
+bin_SCRIPTS = a.bar b.qux
 END
 
 $ACLOCAL
-$AUTOMAKE -a
+$AUTOCONF
+$AUTOMAKE
 
-$FGREP 'zardoz.c' Makefile.in
+$EGREP '\$\(CC\)|COMPILE|AM_V_CC|-compile|INCLUDES' Makefile.in && exit 1
 
 :
old mode 100755 (executable)
new mode 100644 (file)
index 600aedf..f2196aa
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 1999-2012 Free Software Foundation, Inc.
+# Copyright (C) 1999-2017 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
@@ -16,9 +16,9 @@
 
 # Make sure proper suffix rules for C compilation are produced, and
 # only once.
-# See also related test 'suffix2.test'.
+# See also related test 'suffix2.sh'.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_CC
@@ -46,13 +46,13 @@ for use_arlib in false :; do
 
   $AUTOMAKE $am_warns -i
   grep '^ *\.c' Makefile.in # For debugging.
-  test `grep -c '^\.c\.o:' Makefile.in` -eq 1
-  test `grep -c '^\.c\.obj:' Makefile.in` -eq 1
+  test $(grep -c '^\.c\.o:' Makefile.in) -eq 1
+  test $(grep -c '^\.c\.obj:' Makefile.in) -eq 1
 
   $AUTOMAKE $am_warns
   grep '^ *\.c' Makefile.in # For debugging.
-  test `grep -c '^\.c\.o:' Makefile.in` -eq 1
-  test `grep -c '^\.c\.obj:' Makefile.in` -eq 1
+  test $(grep -c '^\.c\.o:' Makefile.in) -eq 1
+  test $(grep -c '^\.c\.obj:' Makefile.in) -eq 1
 
 done
 
old mode 100755 (executable)
new mode 100644 (file)
index 72d0acc..0b3133d
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2002-2012 Free Software Foundation, Inc.
+# Copyright (C) 2002-2017 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
@@ -18,7 +18,7 @@
 # (related to PR/37)
 
 required='cc libtoolize yacc'
-. ./defs || Exit 1
+. test-init.sh
 
 plan_ 7
 
@@ -57,11 +57,22 @@ cat > foo.x_ << 'END'
 int foo (void) { return yyparse(); }
 END
 
+# We must protect the TAP driver from the output of configure, since
+# that might output a stray "ok" on a line of its own (due to a
+# libtool bug on Mac OS X), thus causing a spurious test result to
+# be seen.  See automake bug#11897.
+run_configure ()
+{
+  st=0; ./configure >output 2>&1 || st=1
+  sed 's/^/  /' output
+  test $st -eq 0
+}
+
 command_ok_ "libtoolize" libtoolize --force
 command_ok_ "aclocal"    $ACLOCAL
 command_ok_ "autoconf"   $AUTOCONF
 command_ok_ "automake"   $AUTOMAKE --add-missing
-command_ok_ "configure"  ./configure
+command_ok_ "configure"  run_configure
 command_ok_ "make test"  $MAKE test
 
 directive=''; make_can_chain_suffix_rules || directive=TODO
old mode 100755 (executable)
new mode 100644 (file)
index d365fbc..02b732f
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2002-2012 Free Software Foundation, Inc.
+# Copyright (C) 2002-2017 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
@@ -19,7 +19,7 @@
 # We also check for suffixes containing '-'.
 
 required=cc
-. ./defs || Exit 1
+. test-init.sh
 
 plan_ 10
 
@@ -68,7 +68,7 @@ command_ok_ "warn about unportable make usage" \
 command_ok_ "automake" $AUTOMAKE -a -Wno-portability
 
 command_ok_ "configure"  ./configure
-command_ok_ "make test-fake" env OBJEXT=foo $MAKE -e test-fake
+command_ok_ "make test-fake" run_make OBJEXT=foo test-fake
 command_ok_ "make test-real" $MAKE test-real
 
 directive=''; make_can_chain_suffix_rules || directive=TODO
old mode 100755 (executable)
new mode 100644 (file)
index 6dd2616..b64ab28
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 1999-2012 Free Software Foundation, Inc.
+# Copyright (C) 1999-2017 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
 
 # Make sure proper suffix rules for C compilation are produced,
 # and only once, even for libtool libraries.
-# See also related test 'suffix.test'.
+# See also related test 'suffix.sh'.
 required=libtoolize
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_CC
@@ -43,12 +43,12 @@ $ACLOCAL
 
 $AUTOMAKE -a
 grep '^ *\.c' Makefile.in # For debugging.
-test `grep -c '^\.c\.o:' Makefile.in` -eq 1
-test `grep -c '^\.c\.obj:' Makefile.in` -eq 1
+test $(grep -c '^\.c\.o:' Makefile.in) -eq 1
+test $(grep -c '^\.c\.obj:' Makefile.in) -eq 1
 
 $AUTOMAKE -i
 grep '^ *\.c' Makefile.in # For debugging.
-test `grep -c '^\.c\.o:' Makefile.in` -eq 1
-test `grep -c '^\.c\.obj:' Makefile.in` -eq 1
+test $(grep -c '^\.c\.o:' Makefile.in) -eq 1
+test $(grep -c '^\.c\.obj:' Makefile.in) -eq 1
 
 :
old mode 100755 (executable)
new mode 100644 (file)
index 168c842..7cbb90f
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 1999-2012 Free Software Foundation, Inc.
+# Copyright (C) 1999-2017 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
@@ -17,7 +17,7 @@
 # Test to make sure that suffix rules chain.
 
 required=c++
-. ./defs || Exit 1
+. test-init.sh
 
 plan_ 10
 
@@ -77,6 +77,6 @@ done
 
 # Intermediate files should not be distributed.
 command_ok_ "make distdir" $MAKE distdir
-command_ok_ "intermediate file not distributed" test ! -r $me-1.0/foo.cc
+command_ok_ "intermediate file not distributed" test ! -e $me-1.0/foo.cc
 
 :
old mode 100755 (executable)
new mode 100644 (file)
index 4523096..11dbb00
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2001-2012 Free Software Foundation, Inc.
+# Copyright (C) 2001-2017 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
@@ -20,7 +20,7 @@
 # Also make sure that .SUFFIXES is automatically adjusted with
 # extensions from implicit rules.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat > Makefile.am << 'END'
 .k.o:
old mode 100755 (executable)
new mode 100644 (file)
index 8608a86..c5168d9
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2001-2012 Free Software Foundation, Inc.
+# Copyright (C) 2001-2017 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
@@ -19,7 +19,7 @@
 # Based on a report from Arkadiusz Miskiewicz <misiek@pld.ORG.PL>.
 
 required='cc libtool'
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_SUBST([LINK], [:])
old mode 100755 (executable)
new mode 100644 (file)
index 29ffc4d..7bdde3d
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2001-2012 Free Software Foundation, Inc.
+# Copyright (C) 2001-2017 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
 
 # Test to make sure Automake supports implicit rules with dot-less
 # extensions.  Also make sure that '.o' and '.obj' are handled like
-# '.$(OBJEXT)'.  See also related "semantic" tests suffix6b.test
-# and suffix6c.test.
+# '.$(OBJEXT)'.  See also related "semantic" tests 'suffix6b.sh'
+# and 'suffix6c.sh'.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat > Makefile.am << 'END'
 SUFFIXES = a b .$(OBJEXT) c .o .obj
old mode 100755 (executable)
new mode 100644 (file)
index 319e021..0fd83c6
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2001-2012 Free Software Foundation, Inc.
+# Copyright (C) 2001-2017 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 # Test to make sure Automake supports implicit rules with dot-less
-# extensions.  Se also related "grepping" test suffix6.test.
+# extensions.  Se also related "grepping" test 'suffix6.sh'.
 
 required=GNUmake # Other makes might not grok dot-less suffix rules.
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 # $(LINK) is not defined automatically by Automake, since the *_SOURCES
old mode 100755 (executable)
new mode 100644 (file)
index 80f3bf0..83dd1b1
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2001-2012 Free Software Foundation, Inc.
+# Copyright (C) 2001-2017 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
@@ -15,9 +15,9 @@
 # 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.
+# See also related "grepping" test 'suffix6.sh'.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 # $(LINK) is not defined automatically by Automake, since the *_SOURCES
@@ -31,7 +31,7 @@ AC_SUBST([OBJEXT])
 AC_OUTPUT
 END
 
-unset OBJEXT || :
+unset OBJEXT
 
 cat > Makefile.am << 'END'
 SUFFIXES = .zoo .o .obj .@OBJEXT@
@@ -70,7 +70,7 @@ cat > foo.exp <<'END'
 %TWO%
 END
 echo %TWO% > foo.zoo
-OBJEXT=o $MAKE -e
+run_make OBJEXT=o
 cat foo.o
 cat foo.XxX
 diff foo.XxX foo.exp
@@ -82,7 +82,7 @@ cat > foo.exp <<'END'
 %THREE%
 END
 echo %THREE% > foo.zoo
-OBJEXT=obj $MAKE -e
+run_make OBJEXT=obj
 cat foo.obj
 cat foo.XxX
 diff foo.XxX foo.exp
old mode 100755 (executable)
new mode 100644 (file)
index bef1031..21c6772
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2001-2012 Free Software Foundation, Inc.
+# Copyright (C) 2001-2017 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
@@ -17,7 +17,7 @@
 # Test to make sure Automake supports implicit rules "confusing"
 # extensions.  Inspired by a mail from Alex Hornby.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat > Makefile.am << 'END'
 SUFFIXES = .idl S.cpp C.h
@@ -31,7 +31,7 @@ $AUTOMAKE
 
 # 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
+grep 'SUFFIXES.* \.cpp' Makefile.in && exit 1
+grep 'SUFFIXES.* \.idlC' Makefile.in && exit 1
 
 :
old mode 100755 (executable)
new mode 100644 (file)
index 288dd99..21e059d
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2002-2012 Free Software Foundation, Inc.
+# Copyright (C) 2002-2017 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
@@ -19,7 +19,7 @@
 # From PR/37.
 
 required='cc libtoolize'
-. ./defs || Exit 1
+. test-init.sh
 
 plan_ 10
 
@@ -75,12 +75,23 @@ END
 echo 'int main (void) { return 0; }' > foo.x_
 echo 'int bar (void) { return 0; }' > bar.x_
 
+# We must protect the TAP driver from the output of configure, since
+# that might output a stray "ok" on a line of its own (due to a
+# libtool bug on Mac OS X), thus causing a spurious test result to
+# be seen.  See automake bug#11897.
+protect_output ()
+{
+  st=0; "$@" >output 2>&1 || st=1
+  sed 's/^/  /' output
+  test $st -eq 0
+}
+
 command_ok_ "libtoolize" libtoolize
 command_ok_ "aclocal"    $ACLOCAL
 command_ok_ "autoconf"   $AUTOCONF
 command_ok_ "automake"   $AUTOMAKE -a
-command_ok_ "configure"  ./configure
-command_ok_ "make test0" env OBJEXT=foo $MAKE -e test0
+command_ok_ "configure"  protect_output ./configure
+command_ok_ "make test0" run_make OBJEXT=foo test0
 command_ok_ "make test1" $MAKE test1
 
 directive=''; make_can_chain_suffix_rules || directive=TODO
@@ -88,7 +99,7 @@ directive=''; make_can_chain_suffix_rules || directive=TODO
 for target in test2 all distcheck; do
   command_ok_ "make $target"  \
               -D "$directive" -r "suffix rules not chained" \
-              $MAKE $target
+              protect_output $MAKE $target
 done
 
 :
old mode 100755 (executable)
new mode 100644 (file)
index 2c1d73d..ab22aa9
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2002-2012 Free Software Foundation, Inc.
+# Copyright (C) 2002-2017 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
@@ -17,7 +17,7 @@
 # Make sure that Automake choose the shorter route between suffixes
 # (related to PR/37)
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat >>configure.ac << 'END'
 AC_PROG_CC
old mode 100755 (executable)
new mode 100644 (file)
index f4b4338..8b88f56
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 1996-2012 Free Software Foundation, Inc.
+# Copyright (C) 1996-2017 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
@@ -18,7 +18,7 @@
 # Reported by Joerg-Martin Schwarz.
 
 am_create_testdir=empty
-. ./defs || Exit 1
+. test-init.sh
 
 : > Makefile.am
 
@@ -35,6 +35,6 @@ AUTOMAKE_fails --add-missing
 grep '^configure\.ac:3: .*missing.*error while making link' stderr
 grep '^configure\.ac:3: .*install-sh.*error while making link' stderr
 
-test `$FGREP -c 'error while making link' stderr` -eq 2
+test $(grep -c 'error while making link' stderr) -eq 2
 
 :
old mode 100755 (executable)
new mode 100644 (file)
index 46e26db..7f05c0e
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2000-2012 Free Software Foundation, Inc.
+# Copyright (C) 2000-2017 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
@@ -16,7 +16,7 @@
 
 # Test to make sure that 'automake -a' redirects dangling symlinks.
 
-. ./defs || Exit 1
+. test-init.sh
 
 rm -f install-sh
 ln -s Zardoz install-sh || skip_ "cannot create broken symlinks"
@@ -27,6 +27,6 @@ $ACLOCAL
 $AUTOMAKE --add-missing
 
 test -f install-sh
-test ! -r Zardoz
+test ! -e Zardoz
 
 :
old mode 100755 (executable)
new mode 100644 (file)
index 5b51a7a..f6887f4
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 1998-2012 Free Software Foundation, Inc.
+# Copyright (C) 1998-2017 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
@@ -16,7 +16,7 @@
 
 # Test for error for bad syntax.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat > Makefile.am << 'END'
 foo = q \
diff --git a/t/tags-pr12372.sh b/t/tags-pr12372.sh
new file mode 100644 (file)
index 0000000..a67bb95
--- /dev/null
@@ -0,0 +1,85 @@
+#! /bin/sh
+# Copyright (C) 2012-2017 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 tags are processed also for files with non-standard
+# extensions.  See automake bug#12372.
+
+required='cc etags'
+. test-init.sh
+
+cat >> configure.ac <<'END'
+AC_PROG_CC
+AC_CONFIG_FILES([sub/Makefile])
+# Fake linking.  Help avoid possible spurious errors from make
+# or from the linker; errors that are irrelevant to this test.
+AC_SUBST([LINK], ['echo $(CCLD) $(CFLAGS) $(LDFLAGS) -o $@'])
+AC_OUTPUT
+END
+
+cat > Makefile.am <<'END'
+all-local: tags
+.pc.o:
+       sed -e 's/\[/{/' -e 's/\]/}/' $(srcdir)/$*.pc >$*.c
+       $(CC) $(DEFS) $(CPPFLAGS) $(CFLAGS) -c $*.c
+       rm -f $*.c
+
+noinst_PROGRAMS = foo
+foo_SOURCES = foo-main.pc barbar.c
+SUBDIRS = sub
+END
+
+mkdir sub
+cat > sub/Makefile.am <<'END'
+all-local: tags
+.pc.o:
+       sed -e 's/@/a/g' $(srcdir)/$*.pc >$*.c
+       $(CC) $(DEFS) $(CPPFLAGS) $(CFLAGS) -c $*.c
+       rm -f $*.c
+
+noinst_PROGRAMS = zap
+zap_SOURCES = zardoz.pc
+END
+
+echo 'int main(void) [ return bar(1); ]' > foo-main.pc
+echo 'int bar(int x) { return !x; }' > barbar.c
+echo 'int m@in(void) { return 0; }' > sub/zardoz.pc
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE
+
+./configure
+
+# Exuberant Ctags (at least version 5.8) doesn't generate any tags
+# for file extensions it doesn't recognize.  This can be fixed by
+# using the '--langmap' option.  But we must be careful, because
+# etags from Emacs (at least version 23.4) doesn't recognize that
+# option.
+if etags --help | grep '.*--langmap'; then
+  run_make ETAGSFLAGS="--langmap=c:+.pc"
+else
+  $MAKE
+fi
+
+cat TAGS
+cat sub/TAGS
+$FGREP foo-main.pc TAGS
+$FGREP barbar.c TAGS
+$FGREP zardoz.pc sub/TAGS
+
+$MAKE distcheck
+
+:
old mode 100755 (executable)
new mode 100644 (file)
index b1b95a2..9cf53df
--- a/t/tags.sh
+++ b/t/tags.sh
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 1996-2012 Free Software Foundation, Inc.
+# Copyright (C) 1996-2017 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
@@ -17,7 +17,7 @@
 # Test for bug reported by Harlan Stenn: the tags target doesn't work
 # when there are only headers in a directory.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat > Makefile.am << 'END'
 noinst_HEADERS = iguana.h
old mode 100755 (executable)
new mode 100644 (file)
index 7d4ee64..7a3811d
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2010-2012 Free Software Foundation, Inc.
+# Copyright (C) 2010-2017 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
@@ -17,7 +17,7 @@
 # TAGS_DEPENDENCIES only make sense if other tag-worthy things (such as
 # sources) exist.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_CC
@@ -37,6 +37,6 @@ bin_PROGRAMS = bar
 END
 
 AUTOMAKE_run
-grep 'define.*TAGS_DEPENDENCIES.*without' stderr && Exit 1
+grep 'define.*TAGS_DEPENDENCIES.*without' stderr && exit 1
 
 :
old mode 100755 (executable)
new mode 100644 (file)
index 5915d46..37f585b
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 1997-2012 Free Software Foundation, Inc.
+# Copyright (C) 1997-2017 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
@@ -18,7 +18,7 @@
 # François Pinard, and later by Akim Demaille.
 
 required=etags
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_CONFIG_FILES([sub/Makefile])
@@ -42,5 +42,7 @@ $FGREP sub/TAGS TAGS
 $FGREP iguana.h sub/TAGS
 
 $MAKE distclean
-test ! -f sub/TAGS
-test ! -f TAGS
+test ! -e sub/TAGS
+test ! -e TAGS
+
+:
diff --git a/t/tap-ambiguous-directive-w.sh b/t/tap-ambiguous-directive-w.sh
deleted file mode 100755 (executable)
index 880254a..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-#! /bin/sh
-# This file has been automatically generated.  DO NOT EDIT BY HAND!
-. ./defs-static || exit '99';
-am_tap_implementation=perl
-# 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/t/tap-ambiguous-directive.sh"; then
-    echo "$0: will source $dir/t/tap-ambiguous-directive.sh"
-    . "$dir/t/tap-ambiguous-directive.sh"; exit "$?"
-  fi
-done
-echo "$0: cannot find wrapped test 't/tap-ambiguous-directive.sh'" >&2
-exit '99'
old mode 100755 (executable)
new mode 100644 (file)
index 75a259c..8f5c827
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2011-2012 Free Software Foundation, Inc.
+# Copyright (C) 2011-2017 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
 
 # TAP support:
 #  - handling of "ambiguous" TODO and SKIP directives
-# See also related test 'tap-todo-skip-together.test'.
+# See also related test 'tap-todo-skip-together.sh'.
 
-. ./defs || Exit 1
+. test-init.sh
 
-. "$am_testauxdir"/tap-setup.sh || fatal_ "sourcing tap-setup.sh"
+. tap-setup.sh
 
 cat > all.test <<END
 1..6
@@ -32,9 +32,7 @@ ok 5 # SKIP SKIP
 not ok 6 # TODO TODO
 END
 
-$MAKE check >stdout && { cat stdout; Exit 1; }
-cat stdout
-
+run_make -O -e FAIL check
 count_test_results total=6 pass=2 fail=2 xpass=0 xfail=1 skip=1 error=0
 
 cat > exp << 'END'
diff --git a/t/tap-autonumber-w.sh b/t/tap-autonumber-w.sh
deleted file mode 100755 (executable)
index 9a5c6b1..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-#! /bin/sh
-# This file has been automatically generated.  DO NOT EDIT BY HAND!
-. ./defs-static || exit '99';
-am_tap_implementation=perl
-# 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/t/tap-autonumber.sh"; then
-    echo "$0: will source $dir/t/tap-autonumber.sh"
-    . "$dir/t/tap-autonumber.sh"; exit "$?"
-  fi
-done
-echo "$0: cannot find wrapped test 't/tap-autonumber.sh'" >&2
-exit '99'
old mode 100755 (executable)
new mode 100644 (file)
index 8771ddf..d5f14d5
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2011-2012 Free Software Foundation, Inc.
+# Copyright (C) 2011-2017 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
@@ -20,9 +20,9 @@
 #  - test results without number get automatically numbered in the
 #    console progress output
 
-. ./defs || Exit 1
+. test-init.sh
 
-. "$am_testauxdir"/tap-setup.sh || fatal_ "sourcing tap-setup.sh"
+. tap-setup.sh
 
 cat > all.test <<'END'
 1..14
@@ -44,8 +44,7 @@ not ok
 ok
 END
 
-TESTS=all.test $MAKE -e check >stdout && { cat stdout; Exit 1; }
-cat stdout
+run_make -O -e FAIL TESTS=all.test check
 count_test_results total=14 pass=6 fail=5 xpass=1 xfail=1 skip=1 error=0
 
 cat > exp <<'END'
diff --git a/t/tap-bad-prog-w.tap b/t/tap-bad-prog-w.tap
deleted file mode 100755 (executable)
index d24e18e..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-#! /bin/sh
-# This file has been automatically generated.  DO NOT EDIT BY HAND!
-. ./defs-static || exit '99';
-am_tap_implementation=perl
-# 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/t/tap-bad-prog.tap"; then
-    echo "$0: will source $dir/t/tap-bad-prog.tap"
-    . "$dir/t/tap-bad-prog.tap"; exit "$?"
-  fi
-done
-echo "$0: cannot find wrapped test 't/tap-bad-prog.tap'" >&2
-exit '99'
old mode 100755 (executable)
new mode 100644 (file)
index 82cf4e4..c00eab7
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2011-2012 Free Software Foundation, Inc.
+# Copyright (C) 2011-2017 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
@@ -18,7 +18,7 @@
 #  - missing, unreadable, or not-executable test scripts cause proper
 #    error reports
 
-. ./defs || Exit 1
+. test-init.sh
 
 fetch_tap_driver
 
@@ -49,13 +49,8 @@ $AUTOMAKE
 
 ./configure
 
-if $MAKE check >stdout; then
-  r='not ok'
-else
-  r='ok'
-fi
-cat stdout
-result_ "$r" '"make check" returns non-zero exit status'
+command_ok_ '"make check" returns non-zero exit status' \
+            run_make -O -e FAIL check
 
 # FIXME: maybe grep for stricter error messages in the next checks?
 
@@ -78,35 +73,13 @@ else
 fi
 
 # Check that no spurious test result is reported.  This is lower-priority
-# (and in fact the check currently fails for our awk-based driver).
-directive=
-if test $am_tap_implementation = shell; then
-  directive=TODO
-else
-  # Older versions of IPC::Open3 (e.g., version 1.05 on perl 5.12.4 or
-  # version 1.0103 on perl 5.6.2) fail to properly trap errors in exec(2)
-  # calls in the child process; hence, the TAP driver cannot be properly
-  # informed of such error.
-  if $PERL -w -e '
-    use IPC::Open3 qw/open3/;
-    $@ = "";
-    eval { open3(*STDIN, *STDOUT, *STDERR, "am--no-such-command") };
-    $@ =~ m/\bopen3:.*am--no-such-command/
-      or die "Bad \$@ value: \"$@\"\n";
-  '; then
-    : # OK. IPC::Open3 should be good enough.
-  else
-    for s in '"missing plan" message' 'results'; do
-      skip_ -r "IPC::Open3 not good enough" "no spurious $s"
-    done
-    Exit 0
-  fi
-fi
+# (and in fact the check currently fails).
 
 command_ok_ 'no spurious "missing plan" message' \
-    -D "$directive" -- not grep 'missing.* plan' stdout
+  -D TODO -- not grep 'missing.* plan' stdout
+
 command_ok_ 'no spurious results' \
-  -D "$directive" -r 'still get "missing plan"' \
+  -D TODO -r 'still get "missing plan"' \
   count_test_results total=3 pass=0 fail=0 xpass=0 xfail=0 skip=0 error=3
 
 :
diff --git a/t/tap-bailout-and-logging-w.sh b/t/tap-bailout-and-logging-w.sh
deleted file mode 100755 (executable)
index 33c9b50..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-#! /bin/sh
-# This file has been automatically generated.  DO NOT EDIT BY HAND!
-. ./defs-static || exit '99';
-am_tap_implementation=perl
-# 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/t/tap-bailout-and-logging.sh"; then
-    echo "$0: will source $dir/t/tap-bailout-and-logging.sh"
-    . "$dir/t/tap-bailout-and-logging.sh"; exit "$?"
-  fi
-done
-echo "$0: cannot find wrapped test 't/tap-bailout-and-logging.sh'" >&2
-exit '99'
old mode 100755 (executable)
new mode 100644 (file)
index e8e3756..683a815
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2011-2012 Free Software Foundation, Inc.
+# Copyright (C) 2011-2017 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
@@ -18,9 +18,9 @@
 #  - even after a "Bail out!" directive, all input is still copied in
 #    the log file
 
-. ./defs || Exit 1
+. test-init.sh
 
-. "$am_testauxdir"/tap-setup.sh || fatal_ "sourcing tap-setup.sh"
+. tap-setup.sh
 
 cat > all.test <<END
 First line
@@ -31,7 +31,7 @@ non-TAP line after bailout
 ok 1 - TAP result after bailout
 END
 
-$MAKE check && { cat all.log; Exit 1; }
+$MAKE check && { cat all.log; exit 1; }
 cat all.log
 
 for rx in \
old mode 100755 (executable)
new mode 100644 (file)
index bd0d1fc..cd08a65
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2011-2012 Free Software Foundation, Inc.
+# Copyright (C) 2011-2017 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/>.
 
-# Older versions of prove and TAP::Harness (e.g., 3.17) didn't recognize
-# a "Bail out!" directive that was preceded by whitespace, but more modern
-# versions (e.g., 3.23) do.  So we leave this behaviour undefined for the
-# perl implementation of the Automake TAP driver, but expect the latter,
-# "more modern" behaviour in our awk TAP driver.
+# A "Bail out!" directive that is preceded by whitespace should still
+# be recognized.
 
-am_tap_implementation=shell
-. ./defs || Exit 1
-
-. "$am_testauxdir"/tap-setup.sh || fatal_ "sourcing tap-setup.sh"
+. test-init.sh
+. tap-setup.sh
 
 cat > a.test <<END
 1..1
@@ -50,10 +45,7 @@ ERROR: b.test - Bail out!
 ERROR: c.test - Bail out! FUBAR!
 END
 
-TESTS='a.test b.test c.test' $MAKE -e check >stdout \
-  && { cat stdout; Exit 1; }
-cat stdout
-
+run_make -O -e FAIL TESTS='a.test b.test c.test' check
 count_test_results total=5 pass=1 fail=0 xpass=0 xfail=0 skip=1 error=3
 
 LC_ALL=C sort exp > t
diff --git a/t/tap-bailout-suppress-badexit-w.sh b/t/tap-bailout-suppress-badexit-w.sh
deleted file mode 100755 (executable)
index d69cb05..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-#! /bin/sh
-# This file has been automatically generated.  DO NOT EDIT BY HAND!
-. ./defs-static || exit '99';
-am_tap_implementation=perl
-# 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/t/tap-bailout-suppress-badexit.sh"; then
-    echo "$0: will source $dir/t/tap-bailout-suppress-badexit.sh"
-    . "$dir/t/tap-bailout-suppress-badexit.sh"; exit "$?"
-  fi
-done
-echo "$0: cannot find wrapped test 't/tap-bailout-suppress-badexit.sh'" >&2
-exit '99'
old mode 100755 (executable)
new mode 100644 (file)
index c7e55db..b08b5ee
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2011-2012 Free Software Foundation, Inc.
+# Copyright (C) 2011-2017 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
@@ -18,7 +18,7 @@
 #  - A "Bail out!" directive causes the driver to ignore the exit
 #    status of the test script.
 
-. ./defs || Exit 1
+. test-init.sh
 
 tests='exit.test exit127.test sighup.test sigterm.test'
 
@@ -26,7 +26,7 @@ cat > Makefile.am <<END
 TESTS = $tests
 END
 
-. "$am_testauxdir"/tap-setup.sh || fatal_ "sourcing tap-setup.sh"
+. tap-setup.sh
 
 cat > exit.test << 'END'
 #!/bin/sh
@@ -54,11 +54,10 @@ END
 
 chmod a+x $tests
 
-$MAKE check >stdout && { cat stdout; Exit 1; }
-cat stdout
-
+run_make -O -e FAIL check
 count_test_results total=4 pass=0 fail=0 xpass=0 xfail=0 skip=0 error=4
+
 for tst in $tests; do grep "^ERROR: $tst - Bail out!" stdout; done
-$EGREP "ERROR: .*(exit.*status|terminat.*signal)" stdout && Exit 1
+$EGREP "ERROR: .*(exit.*status|terminat.*signal)" stdout && exit 1
 
 :
diff --git a/t/tap-bailout-suppress-later-diagnostic-w.sh b/t/tap-bailout-suppress-later-diagnostic-w.sh
deleted file mode 100755 (executable)
index be1baad..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-#! /bin/sh
-# This file has been automatically generated.  DO NOT EDIT BY HAND!
-. ./defs-static || exit '99';
-am_tap_implementation=perl
-# 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/t/tap-bailout-suppress-later-diagnostic.sh"; then
-    echo "$0: will source $dir/t/tap-bailout-suppress-later-diagnostic.sh"
-    . "$dir/t/tap-bailout-suppress-later-diagnostic.sh"; exit "$?"
-  fi
-done
-echo "$0: cannot find wrapped test 't/tap-bailout-suppress-later-diagnostic.sh'" >&2
-exit '99'
old mode 100755 (executable)
new mode 100644 (file)
index bff4d64..19316d9
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2011-2012 Free Software Foundation, Inc.
+# Copyright (C) 2011-2017 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
@@ -18,9 +18,9 @@
 #  - A "Bail out!" directive causes the driver to ignore any TAP
 #    diagnostic message in the rest of the following TAP stream.
 
-. ./defs || Exit 1
+. test-init.sh
 
-. "$am_testauxdir"/tap-setup.sh || fatal_ "sourcing tap-setup.sh"
+. tap-setup.sh
 
 echo AM_TEST_LOG_DRIVER_FLAGS = --comments >> Makefile
 
@@ -32,13 +32,9 @@ Bail out!
 # not seen
 END
 
-# Doing the sums above, we have:
-
-$MAKE check >stdout && { cat stdout; Exit 1; }
-cat stdout
-
+run_make -O -e FAIL check
 count_test_results total=2 pass=1 fail=0 xpass=0 xfail=0 skip=0 error=1
 grep '# all.test: sanity check' stdout
-grep 'not seen' stdout && Exit 1
+grep 'not seen' stdout && exit 1
 
 :
diff --git a/t/tap-bailout-suppress-later-errors-w.sh b/t/tap-bailout-suppress-later-errors-w.sh
deleted file mode 100755 (executable)
index 969ce67..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-#! /bin/sh
-# This file has been automatically generated.  DO NOT EDIT BY HAND!
-. ./defs-static || exit '99';
-am_tap_implementation=perl
-# 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/t/tap-bailout-suppress-later-errors.sh"; then
-    echo "$0: will source $dir/t/tap-bailout-suppress-later-errors.sh"
-    . "$dir/t/tap-bailout-suppress-later-errors.sh"; exit "$?"
-  fi
-done
-echo "$0: cannot find wrapped test 't/tap-bailout-suppress-later-errors.sh'" >&2
-exit '99'
old mode 100755 (executable)
new mode 100644 (file)
index ff83887..d50a26b
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2011-2012 Free Software Foundation, Inc.
+# Copyright (C) 2011-2017 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
@@ -18,9 +18,9 @@
 #  - A "Bail out!" directive causes the driver to ignore any TAP
 #    result or error in the rest of the following TAP stream.
 
-. ./defs || Exit 1
+. test-init.sh
 
-. "$am_testauxdir"/tap-setup.sh || fatal_ "sourcing tap-setup.sh"
+. tap-setup.sh
 
 # Various errors that can all be squashed into a single test script.
 cat > foo.test << 'END'
@@ -52,10 +52,7 @@ ok 2
 ok 3
 END
 
-TESTS='foo.test bar.test baz.test' $MAKE -e check >stdout \
-  && { cat stdout; Exit 1; }
-cat stdout
-
+run_make -e FAIL -O TESTS='foo.test bar.test baz.test' check
 count_test_results total=5 pass=1 fail=0 xpass=0 xfail=0 skip=1 error=3
 
 grep '^ERROR: foo\.test - Bail out!$' stdout
@@ -64,10 +61,10 @@ grep '^SKIP: bar\.test'               stdout
 grep '^ERROR: baz\.test - Bail out!$' stdout
 grep '^PASS: baz\.test 1$'            stdout
 
-$FGREP 'Not seen' stdout && Exit 1
+$FGREP 'Not seen' stdout && exit 1
 
-test `$FGREP -c ': foo.test' stdout` -eq 1
-test `$FGREP -c ': bar.test' stdout` -eq 2
-test `$FGREP -c ': baz.test' stdout` -eq 2
+test $($FGREP -c ': foo.test' stdout) -eq 1
+test $($FGREP -c ': bar.test' stdout) -eq 2
+test $($FGREP -c ': baz.test' stdout) -eq 2
 
 :
diff --git a/t/tap-bailout-w.sh b/t/tap-bailout-w.sh
deleted file mode 100755 (executable)
index dd6e6de..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-#! /bin/sh
-# This file has been automatically generated.  DO NOT EDIT BY HAND!
-. ./defs-static || exit '99';
-am_tap_implementation=perl
-# 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/t/tap-bailout.sh"; then
-    echo "$0: will source $dir/t/tap-bailout.sh"
-    . "$dir/t/tap-bailout.sh"; exit "$?"
-  fi
-done
-echo "$0: cannot find wrapped test 't/tap-bailout.sh'" >&2
-exit '99'
old mode 100755 (executable)
new mode 100644 (file)
index 317eaa2..7623251
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2011-2012 Free Software Foundation, Inc.
+# Copyright (C) 2011-2017 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
@@ -17,9 +17,9 @@
 # Basic TAP test protocol support:
 #  - "Bail out!" magic
 
-. ./defs || Exit 1
+. test-init.sh
 
-. "$am_testauxdir"/tap-setup.sh || fatal_ "sourcing tap-setup.sh"
+. tap-setup.sh
 
 : > exp
 
@@ -118,10 +118,7 @@ echo "ERROR: e.test - Bail out!" >> exp
 # 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 \
-  && { cat stdout; Exit 1; }
-cat stdout
-
+run_make -O -e FAIL TESTS='a.test b.test c.test d.test e.test' check
 count_test_results $test_counts
 
 LC_ALL=C sort exp > t
diff --git a/t/tap-basic-w.sh b/t/tap-basic-w.sh
deleted file mode 100755 (executable)
index 28f4c87..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-#! /bin/sh
-# This file has been automatically generated.  DO NOT EDIT BY HAND!
-. ./defs-static || exit '99';
-am_tap_implementation=perl
-# 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/t/tap-basic.sh"; then
-    echo "$0: will source $dir/t/tap-basic.sh"
-    . "$dir/t/tap-basic.sh"; exit "$?"
-  fi
-done
-echo "$0: cannot find wrapped test 't/tap-basic.sh'" >&2
-exit '99'
old mode 100755 (executable)
new mode 100644 (file)
index c19c326..566e4c8
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2011-2012 Free Software Foundation, Inc.
+# Copyright (C) 2011-2017 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
@@ -24,7 +24,7 @@
 # Note that some of the features checked here are checked in other
 # test cases too, usually in a more thorough and detailed way.
 
-. ./defs || Exit 1
+. test-init.sh
 
 fetch_tap_driver
 
@@ -80,9 +80,7 @@ $AUTOMAKE
 
 # Basilar usage and testsuite progress output.
 
-$MAKE check >stdout && { cat stdout; Exit 1; }
-cat stdout
-
+run_make -O -e FAIL check
 count_test_results total=20 pass=4 fail=4 xpass=4 xfail=4 skip=4 error=0
 
 test -f success.log
@@ -127,37 +125,33 @@ Bail out!
 ok 1
 END
 
-TESTS=bail.test $MAKE -e check >stdout && { cat stdout; Exit 1; }
-cat stdout
-
+run_make -O -e FAIL check TESTS=bail.test
 count_test_results total=1 pass=0 fail=0 xpass=0 xfail=0 skip=0 error=1
 
-test ! -f success.log
+test ! -e success.log
 test -f bail.log
 test -f test-suite.log
 
 grep '^ERROR: bail\.test - Bail out!' stdout
-grep '^PASS:' stdout && Exit 1
-test `$FGREP -c ': bail.test' stdout` -eq 1
-$FGREP 'success.test' stdout && Exit 1
+grep '^PASS:' stdout && exit 1
+test $($FGREP -c ': bail.test' stdout) -eq 1
+$FGREP 'success.test' stdout && exit 1
 
 # Override TEST_LOGS from the command line, making it point to a test
 # (ok.test) that has to be generated at make time.
 
 rm -f *.log *.test
 
-TEST_LOGS=ok.log $MAKE -e check >stdout || { cat stdout; Exit 1; }
-cat stdout
-
+run_make -O check TEST_LOGS=ok.log
 count_test_results total=3 pass=1 fail=0 xpass=0 xfail=1 skip=1 error=0
 
 test -f ok.test
 test -f ok.log
-test ! -f success.log
-test ! -f bail.log
+test ! -e success.log
+test ! -e bail.log
 test -f test-suite.log
 
-$EGREP '(bail|success)\.test' stdout && Exit 1
+$EGREP '(bail|success)\.test' stdout && exit 1
 
 cat > exp << 'END'
 PASS: ok.test 1
diff --git a/t/tap-color-w.sh b/t/tap-color-w.sh
deleted file mode 100755 (executable)
index bc39a7c..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-#! /bin/sh
-# This file has been automatically generated.  DO NOT EDIT BY HAND!
-. ./defs-static || exit '99';
-am_tap_implementation=perl
-# 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/t/tap-color.sh"; then
-    echo "$0: will source $dir/t/tap-color.sh"
-    . "$dir/t/tap-color.sh"; exit "$?"
-  fi
-done
-echo "$0: cannot find wrapped test 't/tap-color.sh'" >&2
-exit '99'
old mode 100755 (executable)
new mode 100644 (file)
index 6a91f06..2ca453f
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2011-2012 Free Software Foundation, Inc.
+# Copyright (C) 2011-2017 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
@@ -17,9 +17,9 @@
 # TAP support:
 #  - colorization of TAP results and diagnostic messages
 
-. ./defs || Exit 1
+required='grep-nonprint'
+. test-init.sh
 
-esc='\e'
 # Escape '[' for grep, below.
 red="$esc\[0;31m"
 grn="$esc\[0;32m"
@@ -28,14 +28,6 @@ blu="$esc\[1;34m"
 mgn="$esc\[0;35m"
 std="$esc\[m"
 
-# Check that grep can parse nonprinting characters.
-# BSD 'grep' works from a pipe, but not a seekable file.
-# GNU or BSD 'grep -a' works on files, but is not portable.
-case `echo "$std" | grep .` in
-  "$std") ;;
-  *) echo "$me: grep can't parse nonprinting characters" >&2; Exit 77;;
-esac
-
 cat > Makefile.am << 'END'
 AUTOMAKE_OPTIONS = color-tests
 AM_TEST_LOG_DRIVER_FLAGS = --comments
@@ -44,7 +36,7 @@ TESTS = all.test skip.test bail.test badplan.test noplan.test \
         few.test many.test order.test afterlate.test
 END
 
-. "$am_testauxdir"/tap-setup.sh || fatal_ "sourcing tap-setup.sh"
+. tap-setup.sh
 
 cat > all.test << 'END'
 1..5
@@ -101,7 +93,8 @@ END
 
 test_color ()
 {
-  # Not a useless use of cat; see above comments about grep.
+  # Not a useless use of cat; see above comments "grep-nonprinting"
+  # requirement in 'test-init.sh'.
   cat stdout | grep "^${grn}PASS${std}: all\.test 1 - foo$"
   cat stdout | grep "^${lgn}XFAIL${std}: all\.test 2 - bar # TODO td$"
   cat stdout | grep "^${blu}SKIP${std}: all\.test 3 - baz # SKIP sk$"
@@ -134,7 +127,8 @@ test_no_color ()
     # colorized.
     (
       set +e # In case some grepped regex below isn't matched.
-      # Not a useless use of cat; see above comments about grep.
+      # 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.*:"
@@ -148,24 +142,22 @@ test_no_color ()
       cat stdout | grep '===='
       cat stdout | grep '[Ss]ee .*test-suite\.log'
       cat stdout | grep '[Tt]estsuite summary'
-    ) | grep "$esc" && Exit 1
+    ) | grep "$esc" && exit 1
     : For shells with broken 'set -e'
   else
-    cat stdout | grep "$esc" && Exit 1
+    cat stdout | grep "$esc" && exit 1
     : For shells with broken 'set -e'
   fi
 }
 
 # 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; }
-cat stdout
+AM_COLOR_TESTS=always; export AM_COLOR_TESTS
+run_make -O -e FAIL TERM=dumb check
 test_color
 
-TERM=ansi $MAKE -e check >stdout \
-  && { cat stdout; Exit 1; }
-cat stdout
+unset AM_COLOR_TESTS
+run_make -O -e FAIL TERM=ansi check
 test_no_color
 
 :
old mode 100755 (executable)
new mode 100644 (file)
index 8400da0..ff4f3ac
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2011-2012 Free Software Foundation, Inc.
+# Copyright (C) 2011-2017 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
@@ -16,7 +16,7 @@
 
 # Auxiliary test to set up common data used by many tests on TAP support.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << END
 AC_OUTPUT
diff --git a/t/tap-deps-w.sh b/t/tap-deps-w.sh
deleted file mode 100755 (executable)
index d5f0fe9..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-#! /bin/sh
-# This file has been automatically generated.  DO NOT EDIT BY HAND!
-. ./defs-static || exit '99';
-am_tap_implementation=perl
-# 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/t/tap-deps.sh"; then
-    echo "$0: will source $dir/t/tap-deps.sh"
-    . "$dir/t/tap-deps.sh"; exit "$?"
-  fi
-done
-echo "$0: cannot find wrapped test 't/tap-deps.sh'" >&2
-exit '99'
old mode 100755 (executable)
new mode 100644 (file)
index 6ebe0f9..cdafec9
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2011-2012 Free Software Foundation, Inc.
+# Copyright (C) 2011-2017 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
@@ -17,7 +17,7 @@
 # Basic TAP test protocol support:
 #  - dependencies between test scripts
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat > Makefile.am << 'END'
 # The tests are *deliberately* listed in inversed order here.
@@ -26,7 +26,7 @@ b.log: a.log
 c.log: b.log
 END
 
-. "$am_testauxdir"/tap-setup.sh || fatal_ "sourcing tap-setup.sh"
+. tap-setup.sh
 
 cat > a.test << 'END'
 #!/bin/sh
@@ -62,9 +62,7 @@ END
 
 chmod a+x *.test
 
-$MAKE check >stdout || { cat stdout; Exit 1; }
-cat stdout
-
+run_make -O check
 count_test_results total=5 pass=5 fail=0 xpass=0 xfail=0 skip=0 error=0
 
 cat > exp << 'END'
diff --git a/t/tap-diagnostic-custom-w.sh b/t/tap-diagnostic-custom-w.sh
deleted file mode 100755 (executable)
index 2a9796f..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-#! /bin/sh
-# This file has been automatically generated.  DO NOT EDIT BY HAND!
-. ./defs-static || exit '99';
-am_tap_implementation=perl
-# 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/t/tap-diagnostic-custom.sh"; then
-    echo "$0: will source $dir/t/tap-diagnostic-custom.sh"
-    . "$dir/t/tap-diagnostic-custom.sh"; exit "$?"
-  fi
-done
-echo "$0: cannot find wrapped test 't/tap-diagnostic-custom.sh'" >&2
-exit '99'
old mode 100755 (executable)
new mode 100644 (file)
index c90f46f..af77987
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2011-2012 Free Software Foundation, Inc.
+# Copyright (C) 2011-2017 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
@@ -18,7 +18,7 @@
 #  - option '--diagnostic-string' to customize the string introducing
 #    TAP diagnostics
 
-. ./defs || Exit 1
+. test-init.sh
 
 fetch_tap_driver
 
@@ -57,7 +57,7 @@ for string in \
 '## leave its behaviour in this context undefined for the moment.'
 do
   case $string in '##'*) continue;; esac
-  i=`expr $i + 1`
+  i=$(($i + 1))
   unindent >> Makefile.am << END
     TEST_EXTENSIONS += .t$i
     TESTS += foo$i.t$i
@@ -81,13 +81,11 @@ $AUTOMAKE
 
 ./configure
 
-$MAKE check >stdout || { cat stdout; Exit 1; }
-cat stdout
+run_make -O check
 count_test_results total=$i pass=$i fail=0 xpass=0 xfail=0 skip=0 error=0
 
 cat later.mk >> Makefile
-$MAKE check >stdout || { cat stdout; Exit 1; }
-cat stdout
-$FGREP 'blah blah' stdout && Exit 1
+run_make -O check
+$FGREP 'blah blah' stdout && exit 1
 
 :
diff --git a/t/tap-diagnostic-w.sh b/t/tap-diagnostic-w.sh
deleted file mode 100755 (executable)
index cab8e0a..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-#! /bin/sh
-# This file has been automatically generated.  DO NOT EDIT BY HAND!
-. ./defs-static || exit '99';
-am_tap_implementation=perl
-# 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/t/tap-diagnostic.sh"; then
-    echo "$0: will source $dir/t/tap-diagnostic.sh"
-    . "$dir/t/tap-diagnostic.sh"; exit "$?"
-  fi
-done
-echo "$0: cannot find wrapped test 't/tap-diagnostic.sh'" >&2
-exit '99'
old mode 100755 (executable)
new mode 100644 (file)
index c849d65..404f7fc
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2011-2012 Free Software Foundation, Inc.
+# Copyright (C) 2011-2017 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
@@ -18,9 +18,9 @@
 #  - diagnostic messages (TAP lines with leading "#")
 #  - flags '--comments' and '--no-comments' of the TAP test driver
 
-. ./defs || Exit 1
+. test-init.sh
 
-. "$am_testauxdir"/tap-setup.sh || fatal_ "sourcing tap-setup.sh"
+. tap-setup.sh
 
 metacharacters=\''"\$!&()[]<>#;^?*'
 
@@ -52,24 +52,20 @@ PASS: all.test 4 - zardoz
 # all.test: Shell metacharacters here: $metacharacters
 END
 
-$MAKE check >stdout || { cat stdout; Exit 1; }
-cat stdout
-$EGREP -i "#.*all\\.test|a comment|(Tests|Shell) " stdout && Exit 1
+run_make -O check
+$EGREP -i "#.*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
-$MAKE check >stdout || { cat stdout; Exit 1; }
-cat stdout
+run_make -O check
 $FGREP ' all.test' stdout > got
 cat exp
 cat got
 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 \
-  || { cat stdout; Exit 1; }
-cat stdout
-$EGREP -i "#.*all\\.test|a comment|(Tests|Shell) " stdout && Exit 1
+run_make -O TEST_LOG_DRIVER_FLAGS="--no-comments" check
+$EGREP -i "#.*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.
@@ -88,8 +84,7 @@ ok
 #TODO
 END
 
-$MAKE check >stdout || { cat stdout; Exit 1; }
-cat stdout
+run_make -O check
 count_test_results total=1 pass=1 fail=0 xpass=0 xfail=0 skip=0 error=0
 
 # Diagnostic without leading whitespace, or with extra leading whitespace,
@@ -109,8 +104,7 @@ ok 1
 #  ${tab} ${tab}${tab}foo  bar${tab}baz  ${tab}
 END
 
-$MAKE check >stdout || { cat stdout; Exit 1; }
-cat stdout
+run_make -O check
 count_test_results total=1 pass=1 fail=0 xpass=0 xfail=0 skip=0 error=0
 
 grep "^# all.test:${ws0p}foo$" stdout
@@ -118,6 +112,6 @@ grep "^# all.test:${ws0p}bar${ws0p}$" stdout
 grep "^# all.test:${ws1p}zardoz${ws0p}$" stdout
 grep "^# all.test:${ws1p}foo  bar${tab}baz${ws0p}$" stdout
 
-test `grep -c '^# all\.test:' stdout` -eq 4
+test $(grep -c '^# all\.test:' stdout) -eq 4
 
 :
diff --git a/t/tap-doc-w.sh b/t/tap-doc-w.sh
deleted file mode 100755 (executable)
index 994a9db..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-#! /bin/sh
-# This file has been automatically generated.  DO NOT EDIT BY HAND!
-. ./defs-static || exit '99';
-am_tap_implementation=perl
-# 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/t/tap-doc.sh"; then
-    echo "$0: will source $dir/t/tap-doc.sh"
-    . "$dir/t/tap-doc.sh"; exit "$?"
-  fi
-done
-echo "$0: cannot find wrapped test 't/tap-doc.sh'" >&2
-exit '99'
old mode 100755 (executable)
new mode 100644 (file)
index 22d542f..1b5b113
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2011-2012 Free Software Foundation, Inc.
+# Copyright (C) 2011-2017 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
@@ -17,7 +17,7 @@
 # Check that an example given in the documentation really works.
 # See section "Simple Tests" subsection "Script-based Testsuites".
 
-. ./defs || Exit 1
+. test-init.sh
 
 fetch_tap_driver
 
@@ -70,8 +70,7 @@ $AUTOMAKE -a
 
 ./configure
 
-$MAKE check >stdout || { cat stdout; Exit 1; }
-cat stdout
+run_make -O check
 
 cat > exp <<'END'
 PASS: foo.sh
old mode 100755 (executable)
new mode 100644 (file)
index 0607112..48bce1e
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2011-2012 Free Software Foundation, Inc.
+# Copyright (C) 2011-2017 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
@@ -19,7 +19,7 @@
 # with the Automake test harness".
 
 am_create_testdir=empty
-. ./defs || Exit 1
+. test-init.sh
 
 cat > Makefile.am <<'END'
 TEST_LOG_DRIVER = env AM_TAP_AWK='$(AWK)' $(SHELL) \
@@ -31,10 +31,9 @@ END
 cat > configure.ac <<'END'
 AC_INIT([GNU Try Tap], [1.0], [bug-automake@gnu.org])
 AC_CONFIG_AUX_DIR([build-aux])
-AM_INIT_AUTOMAKE([foreign parallel-tests -Wall -Werror])
+AM_INIT_AUTOMAKE([foreign -Wall -Werror])
 AC_CONFIG_FILES([Makefile])
 AC_REQUIRE_AUX_FILE([tap-driver.sh])
-AC_PROG_AWK
 AC_OUTPUT
 END
 
@@ -73,7 +72,7 @@ mkdir build-aux
 cp "$am_scriptdir"/tap-driver.sh build-aux \
   || framework_failure_ "fetching the perl TAP driver"
 
-(export AUTOMAKE ACLOCAL AUTOCONF && $AUTORECONF -vi) || Exit 1
+(export AUTOMAKE ACLOCAL AUTOCONF && $AUTORECONF -vi) || exit 1
 
 ./configure --help # Sanity check.
 ./configure || skip_ "configure failed"
@@ -83,8 +82,7 @@ case $MAKE in *\ -j*) skip_ "can't work easily with concurrent make";; esac
 # 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
+run_make -O -e FAIL check
 
 cat > exp <<'END'
 PASS: foo.test 1 - Swallows fly
@@ -106,10 +104,9 @@ diff exp got
 
 grep '^Please report to bug-automake@gnu\.org$' stdout
 
-env \
+run_make -O check \
   TESTS='foo.test baz.test' \
-  TEST_LOG_DRIVER_FLAGS='--comments --ignore-exit' \
-  $MAKE -e check >stdout || { cat stdout; Exit 1; }
+  TEST_LOG_DRIVER_FLAGS='--comments --ignore-exit'
 
 cat > exp <<'END'
 PASS: foo.test 1 - Swallows fly
diff --git a/t/tap-driver-stderr-w.sh b/t/tap-driver-stderr-w.sh
deleted file mode 100755 (executable)
index 93b40c0..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-#! /bin/sh
-# This file has been automatically generated.  DO NOT EDIT BY HAND!
-. ./defs-static || exit '99';
-am_tap_implementation=perl
-# 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/t/tap-driver-stderr.sh"; then
-    echo "$0: will source $dir/t/tap-driver-stderr.sh"
-    . "$dir/t/tap-driver-stderr.sh"; exit "$?"
-  fi
-done
-echo "$0: cannot find wrapped test 't/tap-driver-stderr.sh'" >&2
-exit '99'
old mode 100755 (executable)
new mode 100644 (file)
index bb54ebf..6fa991e
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2011-2012 Free Software Foundation, Inc.
+# Copyright (C) 2011-2017 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
@@ -19,7 +19,7 @@
 
 required=non-root
 am_create_testdir=empty
-. ./defs || Exit 1
+. test-init.sh
 
 fetch_tap_driver
 
@@ -41,7 +41,7 @@ for suf in trs log; do
   cat $tst.trs || :
   test $st -eq 0
 
-  $FGREP 'Hello, World!' stderr stdout && Exit 1
+  $FGREP 'Hello, World!' stderr stdout && exit 1
   $FGREP $tst.$suf stderr
 
 done
diff --git a/t/tap-empty-diagnostic-w.sh b/t/tap-empty-diagnostic-w.sh
deleted file mode 100755 (executable)
index ceb4386..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-#! /bin/sh
-# This file has been automatically generated.  DO NOT EDIT BY HAND!
-. ./defs-static || exit '99';
-am_tap_implementation=perl
-# 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/t/tap-empty-diagnostic.sh"; then
-    echo "$0: will source $dir/t/tap-empty-diagnostic.sh"
-    . "$dir/t/tap-empty-diagnostic.sh"; exit "$?"
-  fi
-done
-echo "$0: cannot find wrapped test 't/tap-empty-diagnostic.sh'" >&2
-exit '99'
old mode 100755 (executable)
new mode 100644 (file)
index e3f1e15..c88a060
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2011-2012 Free Software Foundation, Inc.
+# Copyright (C) 2011-2017 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
@@ -17,9 +17,9 @@
 # TAP support:
 #  - empty diagnostic messages are discarder
 
-. ./defs || Exit 1
+. test-init.sh
 
-. "$am_testauxdir"/tap-setup.sh || fatal_ "sourcing tap-setup.sh"
+. tap-setup.sh
 
 sed 's/\$$//' > all.test <<END
 1..1$
@@ -30,11 +30,10 @@ ok 1$
 #   ${tab} $tab${tab}$
 END
 
-$MAKE check >stdout || { cat stdout; Exit 1; }
-cat stdout
+run_make -O check
 
 grep '^PASS:.*all\.test' stdout # Sanity check.
-grep '#.*all\.test' stdout && Exit 1
-grep "all\.test[ $tab]*:[ $tab]*$" stdout && Exit 1
+grep '#.*all\.test' stdout && exit 1
+grep "all\.test[ $tab]*:[ $tab]*$" stdout && exit 1
 
 :
diff --git a/t/tap-empty-w.sh b/t/tap-empty-w.sh
deleted file mode 100755 (executable)
index 7db01e8..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-#! /bin/sh
-# This file has been automatically generated.  DO NOT EDIT BY HAND!
-. ./defs-static || exit '99';
-am_tap_implementation=perl
-# 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/t/tap-empty.sh"; then
-    echo "$0: will source $dir/t/tap-empty.sh"
-    . "$dir/t/tap-empty.sh"; exit "$?"
-  fi
-done
-echo "$0: cannot find wrapped test 't/tap-empty.sh'" >&2
-exit '99'
old mode 100755 (executable)
new mode 100644 (file)
index bad40ed..56452f1
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2011-2012 Free Software Foundation, Inc.
+# Copyright (C) 2011-2017 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
@@ -18,9 +18,9 @@
 #  - empty TAP input
 #  - blank TAP input
 
-. ./defs || Exit 1
+. test-init.sh
 
-. "$am_testauxdir"/tap-setup.sh || fatal_ "sourcing tap-setup.sh"
+. tap-setup.sh
 
 # Empty TAP input.
 : > empty.test
@@ -45,8 +45,7 @@ END
 
 for input in empty blank white white2; do
   cp $input.test all.test
-  $MAKE check >stdout && { cat stdout; Exit 1; }
-  cat stdout
+  run_make -O -e FAIL check
   count_test_results total=1 pass=0 fail=0 xpass=0 xfail=0 skip=0 error=1
   grep '^ERROR: all\.test - missing test plan$' stdout
 done
diff --git a/t/tap-escape-directive-2-w.sh b/t/tap-escape-directive-2-w.sh
deleted file mode 100755 (executable)
index f679eb9..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-#! /bin/sh
-# This file has been automatically generated.  DO NOT EDIT BY HAND!
-. ./defs-static || exit '99';
-am_tap_implementation=perl
-# 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/t/tap-escape-directive-2.sh"; then
-    echo "$0: will source $dir/t/tap-escape-directive-2.sh"
-    . "$dir/t/tap-escape-directive-2.sh"; exit "$?"
-  fi
-done
-echo "$0: cannot find wrapped test 't/tap-escape-directive-2.sh'" >&2
-exit '99'
old mode 100755 (executable)
new mode 100644 (file)
index 1c72f79..bbe318a
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2011-2012 Free Software Foundation, Inc.
+# Copyright (C) 2011-2017 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
@@ -17,9 +17,9 @@
 # TAP support:
 #  - "escape" TODO and SKIP directives (by escaping the "#" character)
 
-. ./defs || Exit 1
+. test-init.sh
 
-. "$am_testauxdir"/tap-setup.sh || fatal_ "sourcing tap-setup.sh"
+. tap-setup.sh
 
 cat > all.test <<'END'
 1..8
@@ -37,9 +37,7 @@ not ok \\\\\\\\\\# TODO
 ok     \\\\\\\\\\# SKIP
 END
 
-$MAKE check >stdout || { cat stdout; Exit 1; }
-cat stdout
-
+run_make -O check
 count_test_results total=8 pass=2 fail=0 xpass=0 xfail=3 skip=3 error=0
 
 grep '^XFAIL: all\.test 1 .*# TODO' stdout
diff --git a/t/tap-escape-directive-w.sh b/t/tap-escape-directive-w.sh
deleted file mode 100755 (executable)
index 42fbe86..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-#! /bin/sh
-# This file has been automatically generated.  DO NOT EDIT BY HAND!
-. ./defs-static || exit '99';
-am_tap_implementation=perl
-# 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/t/tap-escape-directive.sh"; then
-    echo "$0: will source $dir/t/tap-escape-directive.sh"
-    . "$dir/t/tap-escape-directive.sh"; exit "$?"
-  fi
-done
-echo "$0: cannot find wrapped test 't/tap-escape-directive.sh'" >&2
-exit '99'
old mode 100755 (executable)
new mode 100644 (file)
index 6067af2..2bfcfa4
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2011-2012 Free Software Foundation, Inc.
+# Copyright (C) 2011-2017 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
@@ -17,9 +17,9 @@
 # TAP support:
 #  - "escape" TODO and SKIP directives (by escaping the "#" character)
 
-. ./defs || Exit 1
+. test-init.sh
 
-. "$am_testauxdir"/tap-setup.sh || fatal_ "sourcing tap-setup.sh"
+. tap-setup.sh
 
 cat > all.test <<'END'
 1..2
@@ -27,9 +27,7 @@ ok \# TODO
 ok \# SKIP
 END
 
-$MAKE check >stdout || { cat stdout; Exit 1; }
-cat stdout
-
+run_make -O check
 count_test_results total=2 pass=2 fail=0 xpass=0 xfail=0 skip=0 error=0
 
 grep '^PASS: all\.test 1 .*# TODO' stdout
diff --git a/t/tap-exit-w.sh b/t/tap-exit-w.sh
deleted file mode 100755 (executable)
index b7679f1..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-#! /bin/sh
-# This file has been automatically generated.  DO NOT EDIT BY HAND!
-. ./defs-static || exit '99';
-am_tap_implementation=perl
-# 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/t/tap-exit.sh"; then
-    echo "$0: will source $dir/t/tap-exit.sh"
-    . "$dir/t/tap-exit.sh"; exit "$?"
-  fi
-done
-echo "$0: cannot find wrapped test 't/tap-exit.sh'" >&2
-exit '99'
old mode 100755 (executable)
new mode 100644 (file)
index 2717976..24de743
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2011-2012 Free Software Foundation, Inc.
+# Copyright (C) 2011-2017 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
@@ -19,7 +19,7 @@
 #  - the '--ignore-exit' option causes the TAP test driver to ignore
 #    exit statuses of the test scripts.
 
-. ./defs || Exit 1
+. test-init.sh
 
 echo TESTS = > Makefile.am
 for st in 1 2 77 99; do
@@ -34,10 +34,9 @@ done
 
 chmod a+x *.test
 
-. "$am_testauxdir"/tap-setup.sh || fatal_ "sourcing tap-setup.sh"
+. tap-setup.sh
 
-$MAKE check >stdout && { cat stdout; Exit 1; }
-cat stdout
+run_make -O -e FAIL check
 count_test_results total=8 pass=4 fail=0 xpass=0 xfail=0 skip=0 error=4
 
 grep '^ERROR: exit1\.test - exited with status 1$' stdout
@@ -46,8 +45,7 @@ grep '^ERROR: exit77\.test - exited with status 77$' stdout
 grep '^ERROR: exit99\.test - exited with status 99$' stdout
 
 echo TEST_LOG_DRIVER_FLAGS = --ignore-exit >> Makefile
-$MAKE check >stdout || { cat stdout; Exit 1; }
-cat stdout
+run_make -O check
 count_test_results total=4 pass=4 fail=0 xpass=0 xfail=0 skip=0 error=0
 
 :
diff --git a/t/tap-fancy-w.sh b/t/tap-fancy-w.sh
deleted file mode 100755 (executable)
index 65739f5..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-#! /bin/sh
-# This file has been automatically generated.  DO NOT EDIT BY HAND!
-. ./defs-static || exit '99';
-am_tap_implementation=perl
-# 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/t/tap-fancy.sh"; then
-    echo "$0: will source $dir/t/tap-fancy.sh"
-    . "$dir/t/tap-fancy.sh"; exit "$?"
-  fi
-done
-echo "$0: cannot find wrapped test 't/tap-fancy.sh'" >&2
-exit '99'
old mode 100755 (executable)
new mode 100644 (file)
index 846a9d0..2602b26
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2011-2012 Free Software Foundation, Inc.
+# Copyright (C) 2011-2017 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 # TAP support: some unusual forms for valid TAP input.
-# See also related test 'tap-fancy2.test'.
+# See also related test 'tap-fancy2.sh'.
 
-. ./defs || Exit 1
+. test-init.sh
 
-. "$am_testauxdir"/tap-setup.sh || fatal_ "sourcing tap-setup.sh"
+. tap-setup.sh
 
 #
 # From manpage Test::Harness::TAP(3):
 #
-# ``Lines written to standard output matching /^(not )?ok\b/ must be
+#   Lines written to standard output matching /^(not )?ok\b/ must be
 #   interpreted as test lines. All other lines must not be considered
-#   test output.''
+#   test output.
 #
 # Unfortunately, the exact format of TODO and SKIP directives is not as
 # clearly described in that manpage; but a simple reverse-engineering of
@@ -68,9 +68,7 @@ not ok!#TODO?
 ok~#TODO
 END
 
-$MAKE check >stdout && { cat stdout; Exit 1; }
-cat stdout
-
+run_make -O -e FAIL check
 count_test_results total=21 pass=6 fail=6 xfail=4 xpass=1 skip=4 error=0
 
 #
@@ -91,9 +89,7 @@ ok $weirdchars # SKIP
 Bail out! $weirdchars
 END
 
-$MAKE check >stdout && { cat stdout; Exit 1; }
-cat stdout
-
+run_make -O -e FAIL check
 count_test_results total=6 pass=1 fail=1 xfail=1 xpass=1 skip=1 error=1
 $FGREP "PASS: all.test 1 $weirdchars" stdout
 $FGREP "FAIL: all.test 2 $weirdchars" stdout
@@ -118,10 +114,9 @@ ok # SKIP $bs
 Bail out! $bs
 END
 
-$MAKE check >stdout && { cat stdout; Exit 1; }
-cat stdout
-
+run_make -O -e FAIL check
 count_test_results total=6 pass=1 fail=1 xfail=1 xpass=1 skip=1 error=1
+
 grep '^PASS: all\.test 1 \\$' stdout
 grep '^FAIL: all\.test 2 \\$' stdout
 grep '^XPASS: all\.test 3 # TODO \\$' stdout
diff --git a/t/tap-fancy2-w.sh b/t/tap-fancy2-w.sh
deleted file mode 100755 (executable)
index ab033f6..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-#! /bin/sh
-# This file has been automatically generated.  DO NOT EDIT BY HAND!
-. ./defs-static || exit '99';
-am_tap_implementation=perl
-# 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/t/tap-fancy2.sh"; then
-    echo "$0: will source $dir/t/tap-fancy2.sh"
-    . "$dir/t/tap-fancy2.sh"; exit "$?"
-  fi
-done
-echo "$0: cannot find wrapped test 't/tap-fancy2.sh'" >&2
-exit '99'
old mode 100755 (executable)
new mode 100644 (file)
index 6ab67c9..678f950
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2011-2012 Free Software Foundation, Inc.
+# Copyright (C) 2011-2017 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 # TAP support: more unusual forms for valid TAP input.
-# See also related test 'tap-fancy.test'.
+# See also related test 'tap-fancy.sh'.
 
-. ./defs || Exit 1
+. test-init.sh
 
-. "$am_testauxdir"/tap-setup.sh || fatal_ "sourcing tap-setup.sh"
+. tap-setup.sh
 
 #
 # From manpage Test::Harness::TAP(3):
 #
-# ``Lines written to standard output matching /^(not )?ok\b/ must be
+#   Lines written to standard output matching /^(not )?ok\b/ must be
 #   interpreted as test lines. All other lines must not be considered
-#   test output.''
+#   test output.
 #
 # Unfortunately, the exact format of TODO and SKIP directives is not as
 # clearly described in that manpage; but a simple reverse-engineering of
@@ -108,7 +108,7 @@ xfail=130 # = 4 * 34 - 6
 xpass=130 # = 4 * 34 - 6
 skip=130  # = 4 * 34 - 6
 error=0
-total=`expr $pass + $fail + $xfail + $xpass + $skip`
+total=$(($pass + $fail + $xfail + $xpass + $skip))
 
 # Even nastier!  But accordingly to the specifics, it should still work.
 for result in 'ok' 'not ok'; do
@@ -117,19 +117,18 @@ done
 echo "ok{[(<#${tab}SKIP>)]}" >> all.test
 
 # We have to update some test counts.
-xfail=`expr $xfail + 1`
-xpass=`expr $xpass + 1`
-skip=`expr $skip + 1`
-total=`expr $total + 3`
+xfail=$(($xfail + 1))
+xpass=$(($xpass + 1))
+skip=$(($skip + 1))
+total=$(($total + 3))
 
 # And add the test plan!
 echo 1..$total >> all.test
 
-$MAKE check >stdout && { cat stdout; Exit 1; }
-cat stdout
+run_make -O -e FAIL check
 
-$EGREP '^(PASS|FAIL|SKIP).*#.*TODO' stdout && Exit 1
-$EGREP '^X?(PASS|FAIL).*#.*SKIP' stdout && Exit 1
+$EGREP '^(PASS|FAIL|SKIP).*#.*TODO' stdout && exit 1
+$EGREP '^X?(PASS|FAIL).*#.*SKIP' stdout && exit 1
 
 count_test_results total=$total pass=$pass fail=$fail skip=$skip \
                    xpass=$xpass xfail=$xfail error=$error
diff --git a/t/tap-global-log-w.sh b/t/tap-global-log-w.sh
deleted file mode 100755 (executable)
index 1bc1f0b..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-#! /bin/sh
-# This file has been automatically generated.  DO NOT EDIT BY HAND!
-. ./defs-static || exit '99';
-am_tap_implementation=perl
-# 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/t/tap-global-log.sh"; then
-    echo "$0: will source $dir/t/tap-global-log.sh"
-    . "$dir/t/tap-global-log.sh"; exit "$?"
-  fi
-done
-echo "$0: cannot find wrapped test 't/tap-global-log.sh'" >&2
-exit '99'
old mode 100755 (executable)
new mode 100644 (file)
index 29e582c..05c9e53
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2011-2012 Free Software Foundation, Inc.
+# Copyright (C) 2011-2017 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
@@ -17,9 +17,9 @@
 # TAP support:
 #  - which log files get copied in the global log?
 
-. ./defs || Exit 1
+. test-init.sh
 
-. "$am_testauxdir"/tap-setup.sh || fatal_ "sourcing tap-setup.sh"
+. tap-setup.sh
 
 cat > ok.test << 'END'
 1..5
@@ -101,11 +101,10 @@ cat > skipall.test << 'END'
 1..0 # SKIP all
 END
 
-# We don't care about the exit status of "make check" here.
-TESTS="`echo *.test`" $MAKE -e check || :
+run_make -e IGNORE 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
@@ -113,9 +112,11 @@ done
 
 grep '^1\.\.0 # SKIP all$' test-suite.log
 
-case `cat test-suite.log` in
-  *"`cat hodgepodge`"*) ;;
-  *) Exit 1;;
+test_suite_contents=$(cat test-suite.log)
+hodgepodge_contents=$(cat hodgepodge)
+case $test_suite_contents in
+  *"$hodgepodge_contents"*) ;;
+  *) exit 1;;
 esac
 
 :
diff --git a/t/tap-global-result-w.sh b/t/tap-global-result-w.sh
deleted file mode 100755 (executable)
index 54ffb7f..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-#! /bin/sh
-# This file has been automatically generated.  DO NOT EDIT BY HAND!
-. ./defs-static || exit '99';
-am_tap_implementation=perl
-# 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/t/tap-global-result.sh"; then
-    echo "$0: will source $dir/t/tap-global-result.sh"
-    . "$dir/t/tap-global-result.sh"; exit "$?"
-  fi
-done
-echo "$0: cannot find wrapped test 't/tap-global-result.sh'" >&2
-exit '99'
old mode 100755 (executable)
new mode 100644 (file)
index 30215c7..6fb572b
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2011-2012 Free Software Foundation, Inc.
+# Copyright (C) 2011-2017 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
@@ -18,9 +18,9 @@
 #  - which global test result derives from different test results
 #    mixed in a single script?
 
-. ./defs || Exit 1
+. test-init.sh
 
-. "$am_testauxdir"/tap-setup.sh || fatal_ "sourcing tap-setup.sh"
+. tap-setup.sh
 
 cat > ok.test <<END
 1..3
@@ -138,23 +138,22 @@ ok 4 # TODO
 Bail out!
 END
 
-tests=`echo *.test` # Also required later.
+tests=$(echo *.test) # Also required later.
 
-TESTS="$tests" $MAKE -e check >stdout && { cat stdout; Exit 1; }
-cat stdout
+run_make -O -e FAIL TESTS="$tests" check
 
 # Dirty trick required here.
-for tst in `echo " $tests " | sed 's/.test / /'`; do
+for tst in $(echo " $tests " | sed 's/\.test / /'); do
   echo :copy-in-global-log: yes >> $tst.trs
 done
 
 rm -f test-suite.log
-TESTS="$tests" $MAKE -e test-suite.log && Exit 1
+run_make -e FAIL TESTS="$tests" test-suite.log
 cat test-suite.log
 
 have_rst_section ()
 {
-  eqeq=`echo "$1" | sed 's/./=/g'`
+  eqeq=$(echo "$1" | sed 's/./=/g')
   # Assume $1 contains no RE metacharacters.
   sed -n "/^$1$/,/^$eqeq$/p" test-suite.log > got
   (echo "$1" && echo "$eqeq") > exp
diff --git a/t/tap-log-w.sh b/t/tap-log-w.sh
deleted file mode 100755 (executable)
index 28937a2..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-#! /bin/sh
-# This file has been automatically generated.  DO NOT EDIT BY HAND!
-. ./defs-static || exit '99';
-am_tap_implementation=perl
-# 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/t/tap-log.sh"; then
-    echo "$0: will source $dir/t/tap-log.sh"
-    . "$dir/t/tap-log.sh"; exit "$?"
-  fi
-done
-echo "$0: cannot find wrapped test 't/tap-log.sh'" >&2
-exit '99'
old mode 100755 (executable)
new mode 100644 (file)
index 5faf838..deae5f9
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2011-2012 Free Software Foundation, Inc.
+# Copyright (C) 2011-2017 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
 #  - stdout and stderr of a script go in its log file
 #  - TEST_SUITE_LOG redefinition, at either automake or make time
 #  - VERBOSE environment variable support
-# Keep in sync with 'test-log.test'.
+# Keep in sync with 'test-log.sh'.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat > Makefile.am << 'END'
 TESTS = pass.test skip.test xfail.test fail.test xpass.test error.test
 TEST_SUITE_LOG = global.log
 END
 
-. "$am_testauxdir"/tap-setup.sh || fatal_ "sourcing tap-setup.sh"
+. tap-setup.sh
 
 # Custom markers, for use in grepping checks.
 cmarker=::: # comment marker
@@ -85,10 +85,10 @@ END
 
 chmod a+x *.test
 
-TEST_SUITE_LOG=my.log $MAKE -e check && Exit 1
+run_make -e FAIL TEST_SUITE_LOG=my.log check
 ls -l # For debugging.
-test ! -f test-suite.log
-test ! -f global.log
+test ! -e test-suite.log
+test ! -e global.log
 test -f my.log
 st=0
 for result in pass fail xfail xpass skip error; do
@@ -96,18 +96,18 @@ for result in pass fail xfail xpass skip error; do
   $FGREP "$pmarker $result $pmarker" $result.log || st=1
   $FGREP "$cmarker $result $cmarker" $result.log || st=1
 done
-test $st -eq 0 || Exit 1
+test $st -eq 0 || exit 1
 cat my.log # For debugging.
 for result in xfail fail xpass skip error; do
   cat $result.log # For debugging.
   $FGREP "$pmarker $result $pmarker" my.log || st=1
   $FGREP "$cmarker $result $cmarker" my.log || st=1
 done
-test `$FGREP -c "$pmarker" my.log` -eq 5
-test `$FGREP -c "$cmarker" my.log` -eq 5
+test $($FGREP -c "$pmarker" my.log) -eq 5
+test $($FGREP -c "$cmarker" my.log) -eq 5
 
 # Passed test scripts shouldn't be mentioned in the global log.
-$EGREP '(^pass|[^x]pass)\.test' my.log && Exit 1
+$EGREP '(^pass|[^x]pass)\.test' my.log && exit 1
 # But failing (expectedly or not) and skipped ones should.
 $FGREP 'xfail.test' my.log
 $FGREP 'skip.test' my.log
@@ -116,15 +116,15 @@ $FGREP 'xpass.test' my.log
 $FGREP 'error.test' my.log
 
 touch error2.log test-suite.log global.log
-TEST_SUITE_LOG=my.log $MAKE -e mostlyclean
+run_make TEST_SUITE_LOG=my.log mostlyclean
 ls -l # For debugging.
-test ! -f my.log
-test ! -f pass.log
-test ! -f fail.log
-test ! -f xfail.log
-test ! -f xpass.log
-test ! -f skip.log
-test ! -f error.log
+test ! -e my.log
+test ! -e pass.log
+test ! -e fail.log
+test ! -e xfail.log
+test ! -e xpass.log
+test ! -e skip.log
+test ! -e error.log
 # "make mostlyclean" shouldn't remove unrelated log files.
 test -f error2.log
 test -f test-suite.log
@@ -132,27 +132,26 @@ test -f global.log
 
 rm -f *.log
 
-VERBOSE=yes $MAKE check >stdout && { cat stdout; Exit 1; }
-cat stdout
+run_make -O -e FAIL check VERBOSE=yes
 cat global.log
-test ! -f my.log
-test ! -f test-suite.log
+test ! -e my.log
+test ! -e test-suite.log
 # Check that VERBOSE causes the global testsuite log to be
 # emitted on stdout.
-out=`cat stdout`
-log=`cat global.log`
-case $out in *"$log"*) ;; *) Exit 1;; esac
+out=$(cat stdout)
+log=$(cat global.log)
+case $out in *"$log"*) ;; *) exit 1;; esac
 
 touch error2.log test-suite.log my.log
 $MAKE clean
 ls -l # For debugging.
-test ! -f global.log
-test ! -f pass.log
-test ! -f fail.log
-test ! -f xfail.log
-test ! -f xpass.log
-test ! -f skip.log
-test ! -f error.log
+test ! -e global.log
+test ! -e pass.log
+test ! -e fail.log
+test ! -e xfail.log
+test ! -e xpass.log
+test ! -e skip.log
+test ! -e error.log
 # "make clean" shouldn't remove unrelated log files.
 test -f error2.log
 test -f test-suite.log
diff --git a/t/tap-merge-stdout-stderr-w.sh b/t/tap-merge-stdout-stderr-w.sh
deleted file mode 100755 (executable)
index 7699c3f..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-#! /bin/sh
-# This file has been automatically generated.  DO NOT EDIT BY HAND!
-. ./defs-static || exit '99';
-am_tap_implementation=perl
-# 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/t/tap-merge-stdout-stderr.sh"; then
-    echo "$0: will source $dir/t/tap-merge-stdout-stderr.sh"
-    . "$dir/t/tap-merge-stdout-stderr.sh"; exit "$?"
-  fi
-done
-echo "$0: cannot find wrapped test 't/tap-merge-stdout-stderr.sh'" >&2
-exit '99'
old mode 100755 (executable)
new mode 100644 (file)
index bca96a2..ff03d26
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2011-2012 Free Software Foundation, Inc.
+# Copyright (C) 2011-2017 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
@@ -18,7 +18,7 @@
 #  - The Automake TAP driver has an option that instruct it to read TAP
 #    input also from the stderr of the test command, not only its stdout.
 
-. ./defs || Exit 1
+. test-init.sh
 
 fetch_tap_driver
 
@@ -27,7 +27,7 @@ AM_TEST_LOG_DRIVER_FLAGS = --comments --merge
 TESTS = all.test
 END
 
-. "$am_testauxdir"/tap-setup.sh || fatal_ "sourcing tap-setup.sh"
+. tap-setup.sh
 
 cat > all.test <<END
 #!/bin/sh
@@ -40,10 +40,9 @@ echo "# foo foo foo" >&2
 END
 chmod a+x all.test
 
-$MAKE check >stdout || { cat stdout; Exit 1; }
-cat stdout
-
+run_make -O check
 count_test_results total=4 pass=2 fail=0 xpass=0 xfail=1 skip=1 error=0
+
 grep '^# all\.test: foo foo foo' stdout
 
 cat > all.test <<END
@@ -53,19 +52,12 @@ echo ok 1
 echo 'Bail out!' >&2
 END
 
-$MAKE check >stdout && { cat stdout; Exit 1; }
-cat stdout
-
+run_make -O -e FAIL check
 count_test_results total=2 pass=1 fail=0 xpass=0 xfail=0 skip=0 error=1
 
 # See that the option '--no-merge' can override the effect of '--merge'.
 
-TEST_LOG_DRIVER_FLAGS=--no-merge $MAKE -e check >stdout \
-  || { cat stdout; Exit 1; }
-cat stdout
-
+run_make -O TEST_LOG_DRIVER_FLAGS=--no-merge check
 count_test_results total=1 pass=1 fail=0 xpass=0 xfail=0 skip=0 error=0
 
-
-
 :
diff --git a/t/tap-missing-plan-and-bad-exit-w.sh b/t/tap-missing-plan-and-bad-exit-w.sh
deleted file mode 100755 (executable)
index d562af0..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-#! /bin/sh
-# This file has been automatically generated.  DO NOT EDIT BY HAND!
-. ./defs-static || exit '99';
-am_tap_implementation=perl
-# 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/t/tap-missing-plan-and-bad-exit.sh"; then
-    echo "$0: will source $dir/t/tap-missing-plan-and-bad-exit.sh"
-    . "$dir/t/tap-missing-plan-and-bad-exit.sh"; exit "$?"
-  fi
-done
-echo "$0: cannot find wrapped test 't/tap-missing-plan-and-bad-exit.sh'" >&2
-exit '99'
old mode 100755 (executable)
new mode 100644 (file)
index 31a702c..bc268bf
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2011-2012 Free Software Foundation, Inc.
+# Copyright (C) 2011-2017 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
@@ -19,7 +19,7 @@
 #    plan, then the driver reports both "missing plan" and "exited with
 #    non-zero status" errors.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat > foo.test <<END
 #!/bin/sh
@@ -30,10 +30,9 @@ echo TESTS = foo.test > Makefile.am
 
 chmod a+x foo.test
 
-. "$am_testauxdir"/tap-setup.sh || fatal_ "sourcing tap-setup.sh"
+. tap-setup.sh
 
-$MAKE check >stdout && { cat stdout; Exit 1; }
-cat stdout
+run_make -O -e FAIL check
 count_test_results total=2 pass=0 fail=0 xpass=0 xfail=0 skip=0 error=2
 
 grep '^ERROR: foo\.test - exited with status 123$' stdout
diff --git a/t/tap-more-w.sh b/t/tap-more-w.sh
deleted file mode 100755 (executable)
index 870140e..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-#! /bin/sh
-# This file has been automatically generated.  DO NOT EDIT BY HAND!
-. ./defs-static || exit '99';
-am_tap_implementation=perl
-# 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/t/tap-more.sh"; then
-    echo "$0: will source $dir/t/tap-more.sh"
-    . "$dir/t/tap-more.sh"; exit "$?"
-  fi
-done
-echo "$0: cannot find wrapped test 't/tap-more.sh'" >&2
-exit '99'
old mode 100755 (executable)
new mode 100644 (file)
index 7970d7f..64a9a49
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2011-2012 Free Software Foundation, Inc.
+# Copyright (C) 2011-2017 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
@@ -24,7 +24,7 @@
 #    correct test script(s)
 #  - "make distcheck" works
 
-. ./defs || Exit 1
+. test-init.sh
 
 fetch_tap_driver
 
@@ -85,7 +85,7 @@ for try in 0 1; do
     mkdir build
     cd build
     srcdir=..
-    run_make=$MAKE
+    am_make=$MAKE
   elif test $try -eq 1; then
     # In-tree parallel build.
     srcdir=.
@@ -93,7 +93,7 @@ for try in 0 1; do
       *\ -j*)
         # Degree of parallelism already specified by the user: do
         # not override it.
-        run_make=$MAKE
+        :
         ;;
       *)
         # Some make implementations (e.g., HP-UX) don't grok '-j',
@@ -102,10 +102,12 @@ for try in 0 1; do
         # space between '-j' and the number of jobs (e.g., Solaris
         # dmake).  We need a runtime test to see what works.
         echo 'all:' > Makefile
-        for run_make in "$MAKE -j3" "$MAKE -j 3" "$MAKE"; do
-          $run_make && break
+        for am_make in "$MAKE -j3" "$MAKE -j 3" "$MAKE"; do
+          $am_make && break
         done
         rm -f Makefile
+        MAKE=$am_make
+        unset am_make
         ;;
     esac
   else
@@ -117,50 +119,36 @@ for try in 0 1; do
 
   # Success.
 
-  # 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
-  $run_make check >>stdout || { cat stdout; Exit 1; }
-  cat stdout
+  run_make -O check
   count_test_results total=6 pass=4 fail=0 xpass=0 xfail=1 skip=1 error=0
   grep '^PASS: 1\.test 1 - mu$' stdout
   grep '^SKIP: 1\.test 2 zardoz # SKIP$' stdout
-  test `$FGREP -c '1.test' stdout` -eq 2
+  test $(grep -c '1\.test' stdout) -eq 2
   grep '^PASS: 2\.test 1$' stdout
   grep '^XFAIL: 2\.test 2 # TODO not implemented$' stdout
   grep '^PASS: 2\.test 3$' stdout
-  test `$FGREP -c '2.test' stdout` -eq 3
+  test $(grep -c '2\.test' stdout) -eq 3
   grep '^PASS: 3\.test 1 - blah blah blah$' stdout
   grep '^# 3\.test: Some diagnostic$' stdout
-  test `$FGREP -c '3.test' stdout` -eq 2
+  test $(grep -c '3\.test' stdout) -eq 2
 
   # Failure.
 
-  # 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 > not-skip
-  echo dummy > bail-out
-  # 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
-  $run_make check >>stdout && { cat stdout; Exit 1; }
-  cat stdout
+  : > not-skip
+  : > bail-out
+  run_make -e FAIL -O check
   count_test_results total=7 pass=4 fail=1 xpass=0 xfail=1 skip=0 error=1
   grep '^PASS: 1\.test 1 - mu$' stdout
   grep '^FAIL: 1\.test 2 zardoz$' stdout
-  test `$FGREP -c '1.test' stdout` -eq 2
+  test $(grep -c '1\.test' stdout) -eq 2
   grep '^PASS: 2\.test 1$' stdout
   grep '^XFAIL: 2\.test 2 # TODO not implemented$' stdout
   grep '^PASS: 2\.test 3$' stdout
-  test `$FGREP -c '2.test' stdout` -eq 3
+  test $(grep -c '2\.test' stdout) -eq 3
   grep '^PASS: 3\.test 1 - blah blah blah$' stdout
   grep '^# 3\.test: Some diagnostic$' stdout
   grep '^ERROR: 3\.test - Bail out! Kernel Panic$' stdout
-  test `$FGREP -c '3.test' stdout` -eq 3
+  test $(grep -c '3\.test' stdout) -eq 3
 
   cd $srcdir
 
diff --git a/t/tap-more2-w.sh b/t/tap-more2-w.sh
deleted file mode 100755 (executable)
index ce39283..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-#! /bin/sh
-# This file has been automatically generated.  DO NOT EDIT BY HAND!
-. ./defs-static || exit '99';
-am_tap_implementation=perl
-# 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/t/tap-more2.sh"; then
-    echo "$0: will source $dir/t/tap-more2.sh"
-    . "$dir/t/tap-more2.sh"; exit "$?"
-  fi
-done
-echo "$0: cannot find wrapped test 't/tap-more2.sh'" >&2
-exit '99'
old mode 100755 (executable)
new mode 100644 (file)
index b34e3c1..fe94520
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2011-2012 Free Software Foundation, Inc.
+# Copyright (C) 2011-2017 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
@@ -20,7 +20,7 @@
 #  - interactions with 'check_*' variables
 
 required='cc native'
-. ./defs || Exit 1
+. test-init.sh
 
 fetch_tap_driver
 
@@ -82,8 +82,7 @@ $AUTOMAKE
 ./configure
 
 for target in check distcheck; do
-  $MAKE $target >stdout || { cat stdout; Exit 1; }
-  cat stdout
+  run_make -O $target
   count_test_results total=3 pass=1 fail=0 xpass=0 xfail=1 skip=1 error=0
 done
 
diff --git a/t/tap-msg0-bailout-w.sh b/t/tap-msg0-bailout-w.sh
deleted file mode 100755 (executable)
index 63247d5..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-#! /bin/sh
-# This file has been automatically generated.  DO NOT EDIT BY HAND!
-. ./defs-static || exit '99';
-am_tap_implementation=perl
-# 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/t/tap-msg0-bailout.sh"; then
-    echo "$0: will source $dir/t/tap-msg0-bailout.sh"
-    . "$dir/t/tap-msg0-bailout.sh"; exit "$?"
-  fi
-done
-echo "$0: cannot find wrapped test 't/tap-msg0-bailout.sh'" >&2
-exit '99'
old mode 100755 (executable)
new mode 100644 (file)
index b9ef141..11632ad
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2011-2012 Free Software Foundation, Inc.
+# Copyright (C) 2011-2017 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
 #    of a "plan with skip" TAP plan
 # generally true!
 
-. ./defs || Exit 1
+. test-init.sh
 
-. "$am_testauxdir"/tap-setup.sh || fatal_ "sourcing tap-setup.sh"
+. tap-setup.sh
 
 echo 'Bail out! 0' > a.test
 echo 'Bail out! 0.0' > b.test
 
-TESTS='a.test b.test' $MAKE -e check >stdout && { cat stdout; Exit 1; }
-cat stdout
-
+run_make -O -e FAIL TESTS='a.test b.test' check
 count_test_results total=2 pass=0 fail=0 xpass=0 xfail=0 skip=0 error=2
 
 grep '^ERROR: a.test - Bail out! 0$' stdout
diff --git a/t/tap-msg0-directive-w.sh b/t/tap-msg0-directive-w.sh
deleted file mode 100755 (executable)
index 7a353f9..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-#! /bin/sh
-# This file has been automatically generated.  DO NOT EDIT BY HAND!
-. ./defs-static || exit '99';
-am_tap_implementation=perl
-# 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/t/tap-msg0-directive.sh"; then
-    echo "$0: will source $dir/t/tap-msg0-directive.sh"
-    . "$dir/t/tap-msg0-directive.sh"; exit "$?"
-  fi
-done
-echo "$0: cannot find wrapped test 't/tap-msg0-directive.sh'" >&2
-exit '99'
old mode 100755 (executable)
new mode 100644 (file)
index cbd2fce..27196d5
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2011-2012 Free Software Foundation, Inc.
+# Copyright (C) 2011-2017 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
@@ -17,9 +17,9 @@
 # TAP support:
 #  - literal string "0" as a TODO or SKIP message
 
-. ./defs || Exit 1
+. test-init.sh
 
-. "$am_testauxdir"/tap-setup.sh || fatal_ "sourcing tap-setup.sh"
+. tap-setup.sh
 
 cat > all.test << 'END'
 1..3
@@ -28,9 +28,7 @@ not ok 2 # TODO 0
 ok 3 # SKIP 0
 END
 
-$MAKE check >stdout && { cat stdout; Exit 1; }
-cat stdout
-
+run_make -O -e FAIL check
 count_test_results total=3 pass=0 fail=0 xpass=1 xfail=1 skip=1 error=0
 
 grep '^XPASS: all\.test 1 # TODO 0$' stdout
diff --git a/t/tap-msg0-misc-w.sh b/t/tap-msg0-misc-w.sh
deleted file mode 100755 (executable)
index 6321bac..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-#! /bin/sh
-# This file has been automatically generated.  DO NOT EDIT BY HAND!
-. ./defs-static || exit '99';
-am_tap_implementation=perl
-# 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/t/tap-msg0-misc.sh"; then
-    echo "$0: will source $dir/t/tap-msg0-misc.sh"
-    . "$dir/t/tap-msg0-misc.sh"; exit "$?"
-  fi
-done
-echo "$0: cannot find wrapped test 't/tap-msg0-misc.sh'" >&2
-exit '99'
old mode 100755 (executable)
new mode 100644 (file)
index 06f400b..b3d4da4
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2011-2012 Free Software Foundation, Inc.
+# Copyright (C) 2011-2017 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
@@ -18,9 +18,9 @@
 #  - literal "0" and "0.0" in a test description and a TODO/SKIP message
 #    at the same time
 
-. ./defs || Exit 1
+. test-init.sh
 
-. "$am_testauxdir"/tap-setup.sh || fatal_ "sourcing tap-setup.sh"
+. tap-setup.sh
 
 cat > all.test << 'END'
 1..14
@@ -45,9 +45,7 @@ ok 14 0.0 # SKIP 0.0
 
 END
 
-$MAKE check >stdout && { cat stdout; Exit 1; }
-cat stdout
-
+run_make -O -e FAIL check
 count_test_results total=14 pass=2 fail=0 xpass=4 xfail=4 skip=4 error=0
 
 sed '/^ *$/d' > exp << 'END'
diff --git a/t/tap-msg0-planskip-w.sh b/t/tap-msg0-planskip-w.sh
deleted file mode 100755 (executable)
index 6069c65..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-#! /bin/sh
-# This file has been automatically generated.  DO NOT EDIT BY HAND!
-. ./defs-static || exit '99';
-am_tap_implementation=perl
-# 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/t/tap-msg0-planskip.sh"; then
-    echo "$0: will source $dir/t/tap-msg0-planskip.sh"
-    . "$dir/t/tap-msg0-planskip.sh"; exit "$?"
-  fi
-done
-echo "$0: cannot find wrapped test 't/tap-msg0-planskip.sh'" >&2
-exit '99'
old mode 100755 (executable)
new mode 100644 (file)
index 7f435e9..21c4db4
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2011-2012 Free Software Foundation, Inc.
+# Copyright (C) 2011-2017 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
 #  - literal strings "0" and "0.0" as the reason of the skip in a "TAP
 #    plan with skip" (i.e., "1..0 # SKIP ...").
 
-. ./defs || Exit 1
+. test-init.sh
 
-. "$am_testauxdir"/tap-setup.sh || fatal_ "sourcing tap-setup.sh"
+. tap-setup.sh
 
 echo '1..0 # SKIP 0' > a.test
 echo '1..0 # SKIP 0.0' > b.test
 
-TESTS='a.test b.test' $MAKE -e check >stdout || { cat stdout; Exit 1; }
-cat stdout
-
+run_make -O TESTS='a.test b.test' check
 count_test_results total=2 pass=0 fail=0 xpass=0 xfail=0 skip=2 error=0
 
 grep '^SKIP: a.test - 0$' stdout
diff --git a/t/tap-msg0-result-w.sh b/t/tap-msg0-result-w.sh
deleted file mode 100755 (executable)
index b23d99d..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-#! /bin/sh
-# This file has been automatically generated.  DO NOT EDIT BY HAND!
-. ./defs-static || exit '99';
-am_tap_implementation=perl
-# 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/t/tap-msg0-result.sh"; then
-    echo "$0: will source $dir/t/tap-msg0-result.sh"
-    . "$dir/t/tap-msg0-result.sh"; exit "$?"
-  fi
-done
-echo "$0: cannot find wrapped test 't/tap-msg0-result.sh'" >&2
-exit '99'
old mode 100755 (executable)
new mode 100644 (file)
index a2cc0a5..36b5d15
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2011-2012 Free Software Foundation, Inc.
+# Copyright (C) 2011-2017 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
@@ -17,9 +17,9 @@
 # TAP support:
 #  - the string "0" as a test description
 
-. ./defs || Exit 1
+. test-init.sh
 
-. "$am_testauxdir"/tap-setup.sh || fatal_ "sourcing tap-setup.sh"
+. tap-setup.sh
 
 cat > all.test << 'END'
 1..10
@@ -35,9 +35,7 @@ ok 9 0 # SKIP
 ok - 0 # SKIP
 END
 
-$MAKE check >stdout && { cat stdout; Exit 1; }
-cat stdout
-
+run_make -O -e FAIL check
 count_test_results total=10 pass=2 fail=2 xpass=2 xfail=2 skip=2 error=0
 
 cat > exp << 'END'
diff --git a/t/tap-negative-numbers-w.sh b/t/tap-negative-numbers-w.sh
deleted file mode 100755 (executable)
index e59d8b5..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-#! /bin/sh
-# This file has been automatically generated.  DO NOT EDIT BY HAND!
-. ./defs-static || exit '99';
-am_tap_implementation=perl
-# 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/t/tap-negative-numbers.sh"; then
-    echo "$0: will source $dir/t/tap-negative-numbers.sh"
-    . "$dir/t/tap-negative-numbers.sh"; exit "$?"
-  fi
-done
-echo "$0: cannot find wrapped test 't/tap-negative-numbers.sh'" >&2
-exit '99'
old mode 100755 (executable)
new mode 100644 (file)
index 11661a1..a436b18
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2011-2012 Free Software Foundation, Inc.
+# Copyright (C) 2011-2017 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
@@ -18,9 +18,9 @@
 #  - don't spuriously recognize negative TAP result numbers, but correctly
 #    interpret them as test descriptions instead
 
-. ./defs || Exit 1
+. test-init.sh
 
-. "$am_testauxdir"/tap-setup.sh || fatal_ "sourcing tap-setup.sh"
+. tap-setup.sh
 
 cat > all.test <<'END'
 1..7
@@ -33,9 +33,7 @@ ok -121
 not ok -50000
 END
 
-$MAKE check >stdout && { cat stdout; Exit 1; }
-cat stdout
-
+run_make -O -e FAIL check
 count_test_results total=7 pass=2 fail=2 xpass=1 xfail=1 skip=1 error=0
 
 cat > exp <<'END'
diff --git a/t/tap-no-disable-hard-error-w.sh b/t/tap-no-disable-hard-error-w.sh
deleted file mode 100755 (executable)
index b67ccd6..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-#! /bin/sh
-# This file has been automatically generated.  DO NOT EDIT BY HAND!
-. ./defs-static || exit '99';
-am_tap_implementation=perl
-# 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/t/tap-no-disable-hard-error.sh"; then
-    echo "$0: will source $dir/t/tap-no-disable-hard-error.sh"
-    . "$dir/t/tap-no-disable-hard-error.sh"; exit "$?"
-  fi
-done
-echo "$0: cannot find wrapped test 't/tap-no-disable-hard-error.sh'" >&2
-exit '99'
old mode 100755 (executable)
new mode 100644 (file)
index 5fa587d..e85c450
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2011-2012 Free Software Foundation, Inc.
+# Copyright (C) 2011-2017 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
@@ -18,7 +18,7 @@
 #  - "Bail out!" magic and TAP parse errors are not disabled nor turned
 #    into simple failures by the definition DISABLE_HARD_ERRORS.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat > Makefile.am << 'END'
 DISABLE_HARD_ERRORS = yes
@@ -26,7 +26,7 @@ TEST_LOG_COMPILER = cat
 TESTS = bail.test few.test noplan.test
 END
 
-. "$am_testauxdir"/tap-setup.sh || fatal_ "sourcing tap-setup.sh"
+. tap-setup.sh
 
 cat > bail.test <<END
 1..1
@@ -41,9 +41,7 @@ cat > noplan.test <<END
 # nothing here
 END
 
-$MAKE check >stdout && { cat stdout; Exit 1; }
-cat stdout
-
+run_make -O -e FAIL check
 count_test_results total=3 pass=0 fail=0 xpass=0 xfail=0 skip=0 error=3
 
 :
diff --git a/t/tap-no-merge-stdout-stderr-w.sh b/t/tap-no-merge-stdout-stderr-w.sh
deleted file mode 100755 (executable)
index 1f39e5c..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-#! /bin/sh
-# This file has been automatically generated.  DO NOT EDIT BY HAND!
-. ./defs-static || exit '99';
-am_tap_implementation=perl
-# 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/t/tap-no-merge-stdout-stderr.sh"; then
-    echo "$0: will source $dir/t/tap-no-merge-stdout-stderr.sh"
-    . "$dir/t/tap-no-merge-stdout-stderr.sh"; exit "$?"
-  fi
-done
-echo "$0: cannot find wrapped test 't/tap-no-merge-stdout-stderr.sh'" >&2
-exit '99'
old mode 100755 (executable)
new mode 100644 (file)
index eb6b080..a75f54d
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2011-2012 Free Software Foundation, Inc.
+# Copyright (C) 2011-2017 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
 #  - By default, TAP input is only from the stdout (and not the stderr)
 #    of the test command.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat > Makefile.am << 'END'
 TEST_LOG_DRIVER_FLAGS = --comments
 TESTS = all.test
 END
 
-. "$am_testauxdir"/tap-setup.sh || fatal_ "sourcing tap-setup.sh"
+. tap-setup.sh
 
 cat > all.test <<END
 #!/bin/sh
@@ -42,11 +42,10 @@ END
 
 chmod a+x all.test
 
-$MAKE check >stdout || { cat stdout; Exit 1; }
-cat stdout
-
+run_make -O check
 count_test_results total=2 pass=1 fail=0 xpass=0 xfail=0 skip=1 error=0
+
 $FGREP 'foo foo foo' stdout
-$FGREP 'bar bar bar' stdout && Exit 1
+$FGREP 'bar bar bar' stdout && exit 1
 
 :
diff --git a/t/tap-no-spurious-numbers-w.sh b/t/tap-no-spurious-numbers-w.sh
deleted file mode 100755 (executable)
index d3d15cf..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-#! /bin/sh
-# This file has been automatically generated.  DO NOT EDIT BY HAND!
-. ./defs-static || exit '99';
-am_tap_implementation=perl
-# 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/t/tap-no-spurious-numbers.sh"; then
-    echo "$0: will source $dir/t/tap-no-spurious-numbers.sh"
-    . "$dir/t/tap-no-spurious-numbers.sh"; exit "$?"
-  fi
-done
-echo "$0: cannot find wrapped test 't/tap-no-spurious-numbers.sh'" >&2
-exit '99'
old mode 100755 (executable)
new mode 100644 (file)
index 4cdace0..d4a4c25
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2011-2012 Free Software Foundation, Inc.
+# Copyright (C) 2011-2017 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
@@ -18,9 +18,9 @@
 #  - we shouldn't spuriously recognize as TAP result numbers what it
 #    not, even if it seems pretty close
 
-. ./defs || Exit 1
+. test-init.sh
 
-. "$am_testauxdir"/tap-setup.sh || fatal_ "sourcing tap-setup.sh"
+. tap-setup.sh
 
 cat > prefixes <<'END'
 A
@@ -57,16 +57,16 @@ $
 >
 END
 
-n=`wc -l <prefixes`
+n=$(wc -l <prefixes)
 
 # See the loop below to understand this initialization.
-pass=`expr $n '*' 3`
+pass=$(($n * 3))
 fail=$pass
-skip=`expr $pass - 3`
+skip=$(($pass - 3))
 xfail=$skip
 xpass=$xfail
 error=0
-total=`expr $pass + $fail + $skip + $xfail + $xpass`
+total=$(($pass + $fail + $skip + $xfail + $xpass))
 
 echo 1..$total > all.test
 
@@ -86,12 +86,12 @@ done >> all.test
 cat all.test # For debugging.
 
 # Sanity checks.
-grep '#.*#' all.test && framework_failure_ "creating all.test"
-test `wc -l <all.test` -lt $highno || framework_failure_ "creating all.test"
-
-$MAKE check >stdout || :
-cat stdout
+grep '#.*#' all.test \
+  && framework_failure_ "creating all.test"
+test $(wc -l <all.test) -lt $highno \
+  || framework_failure_ "creating all.test"
 
+run_make -O -e IGNORE check
 count_test_results total=$total pass=$pass fail=$fail skip=$skip \
                    xpass=$xpass xfail=$xfail error=$error
 
diff --git a/t/tap-no-spurious-summary-w.sh b/t/tap-no-spurious-summary-w.sh
deleted file mode 100755 (executable)
index 5df8cf3..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-#! /bin/sh
-# This file has been automatically generated.  DO NOT EDIT BY HAND!
-. ./defs-static || exit '99';
-am_tap_implementation=perl
-# 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/t/tap-no-spurious-summary.sh"; then
-    echo "$0: will source $dir/t/tap-no-spurious-summary.sh"
-    . "$dir/t/tap-no-spurious-summary.sh"; exit "$?"
-  fi
-done
-echo "$0: cannot find wrapped test 't/tap-no-spurious-summary.sh'" >&2
-exit '99'
old mode 100755 (executable)
new mode 100644 (file)
index a6437d8..2b97fe9
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2011-2012 Free Software Foundation, Inc.
+# Copyright (C) 2011-2017 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
@@ -18,9 +18,9 @@
 #  - ':test-results:' directives in test scripts' output doesn't
 #    originate spurious results in the testsuite summary
 
-. ./defs || Exit 1
+. test-init.sh
 
-. "$am_testauxdir"/tap-setup.sh || fatal_ "sourcing tap-setup.sh"
+. tap-setup.sh
 
 cat > all.test <<'END'
 1..1
@@ -34,9 +34,7 @@ cat > all.test <<'END'
 ok 1
 END
 
-$MAKE check >stdout || { cat stdout; Exit 1; }
-cat stdout
-
+run_make -O check
 count_test_results total=1 pass=1 fail=0 xpass=0 xfail=0 skip=0 error=0
 
 for result in PASS FAIL XPASS XFAIL SKIP ERROR UNKNOWN; do
diff --git a/t/tap-no-spurious-w.sh b/t/tap-no-spurious-w.sh
deleted file mode 100755 (executable)
index 51c7c8e..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-#! /bin/sh
-# This file has been automatically generated.  DO NOT EDIT BY HAND!
-. ./defs-static || exit '99';
-am_tap_implementation=perl
-# 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/t/tap-no-spurious.sh"; then
-    echo "$0: will source $dir/t/tap-no-spurious.sh"
-    . "$dir/t/tap-no-spurious.sh"; exit "$?"
-  fi
-done
-echo "$0: cannot find wrapped test 't/tap-no-spurious.sh'" >&2
-exit '99'
old mode 100755 (executable)
new mode 100644 (file)
index b9bca21..04394ff
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2011-2012 Free Software Foundation, Inc.
+# Copyright (C) 2011-2017 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
@@ -18,9 +18,9 @@
 #  - don't spuriously recognize lines that are "almost" TAP lines as
 #    real TAP lines
 
-. ./defs || Exit 1
+. test-init.sh
 
-. "$am_testauxdir"/tap-setup.sh || fatal_ "sourcing tap-setup.sh"
+. tap-setup.sh
 
 echo 1..5 > all.test
 
@@ -36,9 +36,9 @@ END
 
 # According to documentation of Test::Harness::TAP(3):
 #
-#  ``Lines written to standard output matching /^(not )?ok\b/
+#    Lines written to standard output matching /^(not )?ok\b/
 #    must be interpreted as test lines. All other lines must
-#    not be considered test output.''
+#    not be considered test output.
 
 cat >> all.test <<END
  ok
@@ -83,7 +83,7 @@ set -x # Reset shell xtraces.
 
 # The prove(1) utility doesn't bail out on these, so our driver
 # shouldn't either.
-# See comments in 'tap-bailout-leading-space.test' for an explanation
+# See comments in 'tap-bailout-leading-space.sh' for an explanation
 # of why we don't have a whitespace-prepended "Bail out!" line here.
 cat >> all.test <<'END'
 bailout
@@ -98,16 +98,14 @@ Bail out
 # Bail out!
 END
 
-cat all.test # For debugging.
 
-# Minor sanity check.
-test `grep -c '^ok1$' all.test` -eq 1 \
-  && test `grep -c '^not ok1$' all.test` -eq 1 \
+# Debugging info and minor sanity check.
+cat all.test \
+  && test $(grep -c '^ok1$' all.test) -eq 1 \
+  && test $(grep -c '^not ok1$' all.test) -eq 1 \
   || framework_failure_ "creating all.test"
 
-$MAKE check >stdout || { cat stdout; Exit 1; }
-cat stdout
-
+run_make -O check
 count_test_results total=5 pass=5 fail=0 xpass=0 xfail=0 skip=0 error=0
 
 :
diff --git a/t/tap-not-ok-skip-w.sh b/t/tap-not-ok-skip-w.sh
deleted file mode 100755 (executable)
index 4c0e5f5..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-#! /bin/sh
-# This file has been automatically generated.  DO NOT EDIT BY HAND!
-. ./defs-static || exit '99';
-am_tap_implementation=perl
-# 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/t/tap-not-ok-skip.sh"; then
-    echo "$0: will source $dir/t/tap-not-ok-skip.sh"
-    . "$dir/t/tap-not-ok-skip.sh"; exit "$?"
-  fi
-done
-echo "$0: cannot find wrapped test 't/tap-not-ok-skip.sh'" >&2
-exit '99'
old mode 100755 (executable)
new mode 100644 (file)
index f52127c..1a9ad11
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2011-2012 Free Software Foundation, Inc.
+# Copyright (C) 2011-2017 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
@@ -18,9 +18,9 @@
 #  - a "not ok # SKIP" line should count as a failure, for consistency
 #    with the prove(1) utility.
 
-. ./defs || Exit 1
+. test-init.sh
 
-. "$am_testauxdir"/tap-setup.sh || fatal_ "sourcing tap-setup.sh"
+. tap-setup.sh
 
 cat > all.test <<'END'
 1..4
@@ -30,9 +30,7 @@ not ok - foo # SKIP
 not ok 4 - bar # SKIP
 END
 
-$MAKE check >stdout && { cat stdout; Exit 1; }
-cat stdout
-
+run_make -O -e FAIL check
 count_test_results total=4 pass=0 fail=4 skip=0 xpass=0 xfail=0 error=0
 
 :
diff --git a/t/tap-number-wordboundary-w.sh b/t/tap-number-wordboundary-w.sh
deleted file mode 100755 (executable)
index 48e917e..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-#! /bin/sh
-# This file has been automatically generated.  DO NOT EDIT BY HAND!
-. ./defs-static || exit '99';
-am_tap_implementation=perl
-# 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/t/tap-number-wordboundary.sh"; then
-    echo "$0: will source $dir/t/tap-number-wordboundary.sh"
-    . "$dir/t/tap-number-wordboundary.sh"; exit "$?"
-  fi
-done
-echo "$0: cannot find wrapped test 't/tap-number-wordboundary.sh'" >&2
-exit '99'
old mode 100755 (executable)
new mode 100644 (file)
index 324adb6..5c2e7d4
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2011-2012 Free Software Foundation, Inc.
+# Copyright (C) 2011-2017 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
@@ -18,9 +18,9 @@
 #  - TAP result numbers terminated by a non-whitespace "word boundary"
 #    character are recognized
 
-. ./defs || Exit 1
+. test-init.sh
 
-. "$am_testauxdir"/tap-setup.sh || fatal_ "sourcing tap-setup.sh"
+. tap-setup.sh
 
 cat > all.test <<'END'
 1..5
@@ -31,9 +31,7 @@ not ok 4?&%$ foo4 # TODO
 ok 5"`!! foo5 # TODO
 END
 
-$MAKE check >stdout && { cat stdout; Exit 1; }
-cat stdout
-
+run_make -O -e FAIL check
 count_test_results total=5 pass=1 fail=1 skip=1 xpass=1 xfail=1 error=0
 
 $EGREP '^PASS: all\.test 1 ?: foo1$' stdout
@@ -49,9 +47,7 @@ not ok 1!
 ok 476$ # SKIP
 END
 
-$MAKE check >stdout && { cat stdout; Exit 1; }
-cat stdout
-
+run_make -O -e FAIL check
 count_test_results total=3 pass=0 fail=0 skip=0 xpass=0 xfail=0 error=3
 
 $EGREP '^ERROR: all\.test 2 ?: quux # OUT-OF-ORDER \(expecting 1\)$' stdout
@@ -93,7 +89,7 @@ $
 END
 
 # Strip any extra whitespace, for Solaris' wc.
-planned=`wc -l <punctuation | tr -d " $tab"`
+planned=$(wc -l <punctuation | tr -d " $tab")
 
 echo 1..$planned > all.test
 awk '{print "ok " NR $0 }' punctuation >> all.test
@@ -102,9 +98,7 @@ cat all.test
 # Sanity check.
 grep "^ok 1'$" all.test || framework_failure_ "creating all.test"
 
-$MAKE check >stdout || { cat stdout; Exit 1; }
-cat stdout
-
+run_make -O check
 count_test_results total=$planned pass=$planned \
                    fail=0 skip=0 xpass=0 xfail=0 error=0
 
diff --git a/t/tap-numbers-leading-zero-w.sh b/t/tap-numbers-leading-zero-w.sh
deleted file mode 100755 (executable)
index 51a5144..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-#! /bin/sh
-# This file has been automatically generated.  DO NOT EDIT BY HAND!
-. ./defs-static || exit '99';
-am_tap_implementation=perl
-# 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/t/tap-numbers-leading-zero.sh"; then
-    echo "$0: will source $dir/t/tap-numbers-leading-zero.sh"
-    . "$dir/t/tap-numbers-leading-zero.sh"; exit "$?"
-  fi
-done
-echo "$0: cannot find wrapped test 't/tap-numbers-leading-zero.sh'" >&2
-exit '99'
old mode 100755 (executable)
new mode 100644 (file)
index bbd0d0e..b6f32b8
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2011-2012 Free Software Foundation, Inc.
+# Copyright (C) 2011-2017 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
 # TAP support:
 #  - how does TAP result numbers with leading zero fares?
 
-. ./defs || Exit 1
+. test-init.sh
 
-. "$am_testauxdir"/tap-setup.sh || fatal_ "sourcing tap-setup.sh"
+. tap-setup.sh
 
 do_checks ()
 {
-  $MAKE check >stdout && { cat stdout; Exit 1; }
-  cat stdout
+  run_make -O -e FAIL check
   count_test_results "$@"
   # Allow some normalization of leading zeros, without forcing it.
   LC_ALL=C sed -n 's/: all\.test 0*\([0-9]\)/: all.test \1/p' stdout > got
diff --git a/t/tap-numeric-description-w.sh b/t/tap-numeric-description-w.sh
deleted file mode 100755 (executable)
index cad02f0..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-#! /bin/sh
-# This file has been automatically generated.  DO NOT EDIT BY HAND!
-. ./defs-static || exit '99';
-am_tap_implementation=perl
-# 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/t/tap-numeric-description.sh"; then
-    echo "$0: will source $dir/t/tap-numeric-description.sh"
-    . "$dir/t/tap-numeric-description.sh"; exit "$?"
-  fi
-done
-echo "$0: cannot find wrapped test 't/tap-numeric-description.sh'" >&2
-exit '99'
old mode 100755 (executable)
new mode 100644 (file)
index cd220a7..5ad7b85
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2011-2012 Free Software Foundation, Inc.
+# Copyright (C) 2011-2017 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
@@ -16,9 +16,9 @@
 
 # TAP result lines whose description is a number.
 
-. ./defs || Exit 1
+. test-init.sh
 
-. "$am_testauxdir"/tap-setup.sh || fatal_ "sourcing tap-setup.sh"
+. tap-setup.sh
 
 # Some random numbers to be used as test names.  The definitions below are
 # selected so that $x<n> != <n> for every n >= 1.  We can't use positional
@@ -53,9 +53,7 @@ XPASS: all.test 9 ${x9} # TODO
 XPASS: all.test 10 - ${x10} # TODO
 END
 
-$MAKE check >stdout && { cat stdout; Exit 1; }
-cat stdout
-
+run_make -O -e FAIL check
 count_test_results total=10 pass=2 fail=2 xpass=2 xfail=2 skip=2 error=0
 
 $FGREP ': all.test' stdout > got
diff --git a/t/tap-out-of-order-w.sh b/t/tap-out-of-order-w.sh
deleted file mode 100755 (executable)
index d20cb98..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-#! /bin/sh
-# This file has been automatically generated.  DO NOT EDIT BY HAND!
-. ./defs-static || exit '99';
-am_tap_implementation=perl
-# 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/t/tap-out-of-order.sh"; then
-    echo "$0: will source $dir/t/tap-out-of-order.sh"
-    . "$dir/t/tap-out-of-order.sh"; exit "$?"
-  fi
-done
-echo "$0: cannot find wrapped test 't/tap-out-of-order.sh'" >&2
-exit '99'
old mode 100755 (executable)
new mode 100644 (file)
index 9e3d755..8741c88
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2011-2012 Free Software Foundation, Inc.
+# Copyright (C) 2011-2017 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
@@ -17,9 +17,9 @@
 # TAP support:
 #  - out-of-order test results
 
-. ./defs || Exit 1
+. test-init.sh
 
-. "$am_testauxdir"/tap-setup.sh || fatal_ "sourcing tap-setup.sh"
+. tap-setup.sh
 
 cat > a.test <<END
 1..3
@@ -57,16 +57,13 @@ ok 16
 ok 17
 END
 
-TESTS='a.test b.test c.test d.test' $MAKE -e check >stdout \
-  && { cat stdout; Exit 1; }
-cat stdout
-
+run_make -O -e FAIL TESTS='a.test b.test c.test d.test' check
 count_test_results total=17 pass=8 fail=0 xpass=0 xfail=1 skip=0 error=8
 
-test `$FGREP -c ': a.test' stdout` -eq 3
-test `$FGREP -c ': b.test' stdout` -eq 5
-test `$FGREP -c ': c.test' stdout` -eq 4
-test `$FGREP -c ': d.test' stdout` -eq 5
+test $($FGREP -c ': a.test' stdout) -eq 3
+test $($FGREP -c ': b.test' stdout) -eq 5
+test $($FGREP -c ': c.test' stdout) -eq 4
+test $($FGREP -c ': d.test' stdout) -eq 5
 
 grep '^ERROR: a\.test 71 # OUT-OF-ORDER (expecting 3)$' stdout
 grep '^ERROR: b\.test 4 foo # OUT-OF-ORDER (expecting 3)$' stdout
diff --git a/t/tap-passthrough-exit-w.sh b/t/tap-passthrough-exit-w.sh
deleted file mode 100755 (executable)
index 9a12cb8..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-#! /bin/sh
-# This file has been automatically generated.  DO NOT EDIT BY HAND!
-. ./defs-static || exit '99';
-am_tap_implementation=perl
-# 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/t/tap-passthrough-exit.sh"; then
-    echo "$0: will source $dir/t/tap-passthrough-exit.sh"
-    . "$dir/t/tap-passthrough-exit.sh"; exit "$?"
-  fi
-done
-echo "$0: cannot find wrapped test 't/tap-passthrough-exit.sh'" >&2
-exit '99'
old mode 100755 (executable)
new mode 100644 (file)
index 6014cc5..6a8c0d4
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2011-2012 Free Software Foundation, Inc.
+# Copyright (C) 2011-2017 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
@@ -17,9 +17,9 @@
 # TAP support:
 #  - non-success exit status of a test script is reported in the
 #    log file
-# See also related test 'tap-passthrough.test'.
+# See also related test 'tap-passthrough.sh'.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat > Makefile.am << 'END'
 TEST_LOG_COMPILER = $(SHELL)
@@ -38,13 +38,13 @@ END
   echo TESTS += exit-$e.test >> Makefile.am
 done
 
-. "$am_testauxdir"/tap-setup.sh || fatal_ "sourcing tap-setup.sh"
+. tap-setup.sh
 
 st=0
 $MAKE check || st=$?
 for e in $exit_statuses; do cat exit-$e.log; done
 cat test-suite.log
-test $st -gt 0 || Exit 1
+test $st -gt 0 || exit 1
 
 for e in $exit_statuses; do
   for log in exit-$e.log test-suite.log; do
@@ -52,7 +52,7 @@ for e in $exit_statuses; do
   done
 done
 
-env TEST_LOG_DRIVER_FLAGS='--ignore-exit' $MAKE -e check
-$FGREP ".test - exited with status" *.log && Exit 1
+run_make check TEST_LOG_DRIVER_FLAGS='--ignore-exit'
+$FGREP ".test - exited with status" *.log && exit 1
 
 :
diff --git a/t/tap-passthrough-w.sh b/t/tap-passthrough-w.sh
deleted file mode 100755 (executable)
index 3f5ccd0..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-#! /bin/sh
-# This file has been automatically generated.  DO NOT EDIT BY HAND!
-. ./defs-static || exit '99';
-am_tap_implementation=perl
-# 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/t/tap-passthrough.sh"; then
-    echo "$0: will source $dir/t/tap-passthrough.sh"
-    . "$dir/t/tap-passthrough.sh"; exit "$?"
-  fi
-done
-echo "$0: cannot find wrapped test 't/tap-passthrough.sh'" >&2
-exit '99'
old mode 100755 (executable)
new mode 100644 (file)
index aa9fe53..59976c2
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2011-2012 Free Software Foundation, Inc.
+# Copyright (C) 2011-2017 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
 #  - all input (valid TAP lines, invalid TAP lines, non-TAP lines)
 #    are passed through in the log file
 #  - TAP errors are reported in the log file too
-# See also related test 'tap-passthrough-exit.test'.
+# See also related test 'tap-passthrough-exit.sh'.
 
-. ./defs || Exit 1
+. test-init.sh
 
 weirdchars=\''"\$@!&()[]<>#;,:.^?*/'
 
-. "$am_testauxdir"/tap-setup.sh || fatal_ "sourcing tap-setup.sh"
+. tap-setup.sh
 
 #
 # Only successful tests.
@@ -46,7 +46,7 @@ ok # SKIP who cares?
 $weirdchars
 END
 
-TESTS=ok.test $MAKE -e check || { cat ok.log; Exit 1; }
+run_make TESTS=ok.test check || { cat ok.log; exit 1; }
 cat ok.log
 
 for rx in \
@@ -115,15 +115,15 @@ Last line
 END
 
 st=0
-env TESTS='tiny.test ok.test ko.test bail.test skip.test err.test' \
-  $MAKE -e check || st=$?
+run_make check \
+  TESTS='tiny.test ok.test ko.test bail.test skip.test err.test' || st=$?
 cat tiny.log
 cat ok.log
 cat ko.log
 cat bail.log
 cat skip.log
 cat err.log
-test $st -gt 0 || Exit 1
+test $st -gt 0 || exit 1
 
 grep '^1\.\.1$' tiny.log
 grep '^ok$' tiny.log
diff --git a/t/tap-plan-corner-w.sh b/t/tap-plan-corner-w.sh
deleted file mode 100755 (executable)
index ae25c91..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-#! /bin/sh
-# This file has been automatically generated.  DO NOT EDIT BY HAND!
-. ./defs-static || exit '99';
-am_tap_implementation=perl
-# 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/t/tap-plan-corner.sh"; then
-    echo "$0: will source $dir/t/tap-plan-corner.sh"
-    . "$dir/t/tap-plan-corner.sh"; exit "$?"
-  fi
-done
-echo "$0: cannot find wrapped test 't/tap-plan-corner.sh'" >&2
-exit '99'
old mode 100755 (executable)
new mode 100644 (file)
index 601d5b7..da21754
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2011-2012 Free Software Foundation, Inc.
+# Copyright (C) 2011-2017 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
@@ -17,9 +17,9 @@
 # TAP support:
 #  - some corner cases for TAP plan
 
-. ./defs || Exit 1
+. test-init.sh
 
-. "$am_testauxdir"/tap-setup.sh || fatal_ "sourcing tap-setup.sh"
+. tap-setup.sh
 
 # -------------------------------------------------------------------------
 
@@ -36,9 +36,7 @@ ok 1
 END
 
 for pos in leading trailing; do
-  TESTS="$pos-repeated.test" $MAKE -e check >stdout \
-    && { cat stdout; Exit 1; }
-  cat stdout
+  run_make -O -e FAIL TESTS="$pos-repeated.test" check
   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
 done
@@ -59,14 +57,13 @@ ok 2
 1..2
 END
 
-env TESTS="leading-repeated.test trailing-repeated.test" \
-  $MAKE -e check >stdout && { cat stdout; Exit 1; }
-cat stdout
+run_make -O -e FAIL check \
+  TESTS='leading-repeated.test trailing-repeated.test'
 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
 grep "^ERROR: trailing-repeated\\.test - multiple test plans$" stdout
 grep "^ERROR: trailing-repeated\\.test 2 # AFTER LATE PLAN$" stdout
-grep "leading .*AFTER LATE PLAN" stdout && Exit 1
+grep "leading .*AFTER LATE PLAN" stdout && exit 1
 
 # -------------------------------------------------------------------------
 
@@ -90,9 +87,7 @@ cat > 4.test <<END
 1..0 # SKIP
 END
 
-env TESTS="1.test 2.test 3.test 4.test" \
-  $MAKE -e check >stdout && { cat stdout; Exit 1; }
-cat stdout
+run_make -O -e FAIL check TESTS='1.test 2.test 3.test 4.test'
 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
   grep "^ERROR: $i\\.test - multiple test plans$" stdout
@@ -112,8 +107,7 @@ ok 4
 ok 5
 END
 
-$MAKE -e check >stdout && { cat stdout; Exit 1; }
-cat stdout
+run_make -O -e FAIL check
 count_test_results total=8 pass=5 fail=0 xpass=0 xfail=0 skip=0 error=3
 
 cat > exp <<'END'
@@ -143,8 +137,7 @@ ok 2
 ok 3
 END
 
-$MAKE -e check >stdout && { cat stdout; Exit 1; }
-cat stdout
+run_make -O -e FAIL check
 count_test_results total=5 pass=2 fail=0 xpass=0 xfail=0 skip=0 error=3
 
 cat > exp <<'END'
@@ -174,8 +167,7 @@ ok 4
 ok 5
 END
 
-$MAKE -e check >stdout && { cat stdout; Exit 1; }
-cat stdout
+run_make -O -e FAIL check
 count_test_results total=7 pass=3 fail=0 xpass=0 xfail=0 skip=0 error=4
 
 cat > exp <<'END'
diff --git a/t/tap-plan-errors-w.sh b/t/tap-plan-errors-w.sh
deleted file mode 100755 (executable)
index 2d141b5..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-#! /bin/sh
-# This file has been automatically generated.  DO NOT EDIT BY HAND!
-. ./defs-static || exit '99';
-am_tap_implementation=perl
-# 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/t/tap-plan-errors.sh"; then
-    echo "$0: will source $dir/t/tap-plan-errors.sh"
-    . "$dir/t/tap-plan-errors.sh"; exit "$?"
-  fi
-done
-echo "$0: cannot find wrapped test 't/tap-plan-errors.sh'" >&2
-exit '99'
old mode 100755 (executable)
new mode 100644 (file)
index e0f6272..46832c5
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2011-2012 Free Software Foundation, Inc.
+# Copyright (C) 2011-2017 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
 #  - multiple test plans
 #  - missing test plan
 #  - misplaced test plan (tests run after a late plan)
-# Checks about unplanned tests are performed in 'tap-unplanned.test'
-# and 'tap-skip-whole-badcount.test'.  More checks about corner-cases
-# in TAP plans are performed in 'tap-plan-corner.test'.
+# Checks about unplanned tests are performed in 'tap-unplanned.sh'
+# and 'tap-skip-whole-badcount.sh'.  More checks about corner-cases
+# in TAP plans are performed in 'tap-plan-corner.sh'.
 
-. ./defs || Exit 1
+. test-init.sh
 
-. "$am_testauxdir"/tap-setup.sh || fatal_ "sourcing tap-setup.sh"
+. tap-setup.sh
 
 my_check ()
 {
   cat > all.test
   test -n "$err" || fatal_ "\$err not set before calling my_check"
   cat all.test # For debugging.
-  $MAKE check >stdout && { cat stdout; Exit 1; }
-  cat stdout
+  run_make -O -e FAIL check
   count_test_results "$@"
   grep "^ERROR: all\\.test $err$" stdout
   unset err
diff --git a/t/tap-plan-leading-zero-w.sh b/t/tap-plan-leading-zero-w.sh
deleted file mode 100755 (executable)
index e969b87..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-#! /bin/sh
-# This file has been automatically generated.  DO NOT EDIT BY HAND!
-. ./defs-static || exit '99';
-am_tap_implementation=perl
-# 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/t/tap-plan-leading-zero.sh"; then
-    echo "$0: will source $dir/t/tap-plan-leading-zero.sh"
-    . "$dir/t/tap-plan-leading-zero.sh"; exit "$?"
-  fi
-done
-echo "$0: cannot find wrapped test 't/tap-plan-leading-zero.sh'" >&2
-exit '99'
old mode 100755 (executable)
new mode 100644 (file)
index 949c251..f3e9d89
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2011-2012 Free Software Foundation, Inc.
+# Copyright (C) 2011-2017 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
@@ -19,9 +19,9 @@
 #  - TAP "SKIP" plans with multiple zeroes, as in "1..00 # SKIP"
 # This is consistent with the behaviour of the 'prove' utility.
 
-. ./defs || Exit 1
+. test-init.sh
 
-. "$am_testauxdir"/tap-setup.sh || fatal_ "sourcing tap-setup.sh"
+. tap-setup.sh
 
 cat > a.test <<END
 1..01
@@ -47,10 +47,7 @@ done >> d.test
 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; }
-cat stdout
-
+run_make -O TESTS='a.test b.test c.test d.test e.test f.test' check
 count_test_results total=115 pass=113 xfail=0 skip=2 fail=0 xpass=0 error=0
 
 :
diff --git a/t/tap-plan-malformed-w.sh b/t/tap-plan-malformed-w.sh
deleted file mode 100755 (executable)
index 273492a..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-#! /bin/sh
-# This file has been automatically generated.  DO NOT EDIT BY HAND!
-. ./defs-static || exit '99';
-am_tap_implementation=perl
-# 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/t/tap-plan-malformed.sh"; then
-    echo "$0: will source $dir/t/tap-plan-malformed.sh"
-    . "$dir/t/tap-plan-malformed.sh"; exit "$?"
-  fi
-done
-echo "$0: cannot find wrapped test 't/tap-plan-malformed.sh'" >&2
-exit '99'
old mode 100755 (executable)
new mode 100644 (file)
index 8aca466..9800c07
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2011-2012 Free Software Foundation, Inc.
+# Copyright (C) 2011-2017 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
@@ -17,9 +17,9 @@
 # TAP support: a malformed TAP plan is not recognized.  The checks in
 # here should be consistent with the behaviour of the 'prove' utility.
 
-. ./defs || Exit 1
+. test-init.sh
 
-. "$am_testauxdir"/tap-setup.sh || fatal_ "sourcing tap-setup.sh"
+. tap-setup.sh
 
 cat > a.test <<END
 1..1 foo
@@ -45,11 +45,9 @@ cat > e.test <<END
 0..0
 END
 
-tests_list=`echo *.test`
-
-TESTS="$tests_list" $MAKE -e check >stdout && { cat stdout; Exit 1; }
-cat stdout
+tests_list=$(echo *.test)
 
+run_make -O -e FAIL TESTS="$tests_list" check
 count_test_results total=9 pass=2 fail=0 xpass=0 xfail=2 skip=0 error=5
 
 for tst in $tests_list; do
diff --git a/t/tap-plan-middle-w.sh b/t/tap-plan-middle-w.sh
deleted file mode 100755 (executable)
index a1ef869..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-#! /bin/sh
-# This file has been automatically generated.  DO NOT EDIT BY HAND!
-. ./defs-static || exit '99';
-am_tap_implementation=perl
-# 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/t/tap-plan-middle.sh"; then
-    echo "$0: will source $dir/t/tap-plan-middle.sh"
-    . "$dir/t/tap-plan-middle.sh"; exit "$?"
-  fi
-done
-echo "$0: cannot find wrapped test 't/tap-plan-middle.sh'" >&2
-exit '99'
old mode 100755 (executable)
new mode 100644 (file)
index 1c752fc..6474f15
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2011-2012 Free Software Foundation, Inc.
+# Copyright (C) 2011-2017 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
@@ -17,9 +17,9 @@
 # TAP support:
 #  - test plan preceding and/or following non-result TAP lines
 
-. ./defs || Exit 1
+. test-init.sh
 
-. "$am_testauxdir"/tap-setup.sh || fatal_ "sourcing tap-setup.sh"
+. tap-setup.sh
 
 cat > top1.test <<END
 non-TAP line, ignored
@@ -70,12 +70,10 @@ ok 4 # SKIP
 
 END
 
-tests=`echo *.test`
+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; }
-  cat stdout
+  run_make -O TEST_LOG_DRIVER_FLAGS="$tap_flags" TESTS="$tests" check
   count_test_results total=12 pass=7 xfail=2 skip=3 fail=0 xpass=0 error=0
 done
 
diff --git a/t/tap-plan-w.sh b/t/tap-plan-w.sh
deleted file mode 100755 (executable)
index 5203a49..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-#! /bin/sh
-# This file has been automatically generated.  DO NOT EDIT BY HAND!
-. ./defs-static || exit '99';
-am_tap_implementation=perl
-# 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/t/tap-plan.sh"; then
-    echo "$0: will source $dir/t/tap-plan.sh"
-    . "$dir/t/tap-plan.sh"; exit "$?"
-  fi
-done
-echo "$0: cannot find wrapped test 't/tap-plan.sh'" >&2
-exit '99'
diff --git a/t/tap-plan-whitespace-w.sh b/t/tap-plan-whitespace-w.sh
deleted file mode 100755 (executable)
index 3dcc0dc..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-#! /bin/sh
-# This file has been automatically generated.  DO NOT EDIT BY HAND!
-. ./defs-static || exit '99';
-am_tap_implementation=perl
-# 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/t/tap-plan-whitespace.sh"; then
-    echo "$0: will source $dir/t/tap-plan-whitespace.sh"
-    . "$dir/t/tap-plan-whitespace.sh"; exit "$?"
-  fi
-done
-echo "$0: cannot find wrapped test 't/tap-plan-whitespace.sh'" >&2
-exit '99'
old mode 100755 (executable)
new mode 100644 (file)
index a117fe0..4d5ce61
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2011-2012 Free Software Foundation, Inc.
+# Copyright (C) 2011-2017 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
@@ -17,9 +17,9 @@
 # TAP support:
 #  - plan line with trailing whitespace is recognized and handled correctly
 
-. ./defs || Exit 1
+. test-init.sh
 
-. "$am_testauxdir"/tap-setup.sh || fatal_ "sourcing tap-setup.sh"
+. tap-setup.sh
 
 sed 's/\$$//' > foo.test <<END
 1..2 $
@@ -32,9 +32,7 @@ cat > bar.test <<END
 ok 1
 END
 
-TESTS='foo.test bar.test' $MAKE -e check >stdout || { cat stdout; Exit 1; }
-cat stdout
-
+run_make -O TESTS='foo.test bar.test' check
 count_test_results total=3 pass=3 fail=0 error=0 xpass=0 xfail=0 skip=0
 
 :
old mode 100755 (executable)
new mode 100644 (file)
index 185658d..5585e1b
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2011-2012 Free Software Foundation, Inc.
+# Copyright (C) 2011-2017 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
@@ -18,9 +18,9 @@
 #  - test scripts with the test plan at the beginning
 #  - test scripts with the test plan at the end
 
-. ./defs || Exit 1
+. test-init.sh
 
-. "$am_testauxdir"/tap-setup.sh || fatal_ "sourcing tap-setup.sh"
+. tap-setup.sh
 
 cat > top.test <<END
 1..3
@@ -41,9 +41,9 @@ ok
 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; }
-  cat stdout
+  run_make -O check \
+    TESTS='top.test bot.test' \
+    TEST_LOG_DRIVER_FLAGS="$tap_flags"
   count_test_results total=7 pass=5 xfail=1 skip=1 fail=0 xpass=0 error=0
 done
 
diff --git a/t/tap-planskip-and-logging-w.sh b/t/tap-planskip-and-logging-w.sh
deleted file mode 100755 (executable)
index aeeaa20..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-#! /bin/sh
-# This file has been automatically generated.  DO NOT EDIT BY HAND!
-. ./defs-static || exit '99';
-am_tap_implementation=perl
-# 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/t/tap-planskip-and-logging.sh"; then
-    echo "$0: will source $dir/t/tap-planskip-and-logging.sh"
-    . "$dir/t/tap-planskip-and-logging.sh"; exit "$?"
-  fi
-done
-echo "$0: cannot find wrapped test 't/tap-planskip-and-logging.sh'" >&2
-exit '99'
old mode 100755 (executable)
new mode 100644 (file)
index cd64623..934e524
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2011-2012 Free Software Foundation, Inc.
+# Copyright (C) 2011-2017 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
@@ -18,9 +18,9 @@
 #  - interactions between "TAP plan with SKIP" and logging of earlier or
 #    later TAP or non-TAP text
 
-. ./defs || Exit 1
+. test-init.sh
 
-. "$am_testauxdir"/tap-setup.sh || fatal_ "sourcing tap-setup.sh"
+. tap-setup.sh
 
 echo TEST_LOG_DRIVER_FLAGS = --comments >> Makefile
 
@@ -45,10 +45,7 @@ an early non-TAP line
 a later non-TAP line
 END
 
-TESTS='foo.test foo2.test bar.test' $MAKE -e check >stdout \
-  || { cat stdout; Exit 1; }
-cat stdout
-
+run_make -O TESTS='foo.test foo2.test bar.test' check
 count_test_results total=3 pass=0 fail=0 xpass=0 xfail=0 skip=3 error=0
 
 grep '^# foo\.test: a comment$' stdout
diff --git a/t/tap-planskip-badexit-w.sh b/t/tap-planskip-badexit-w.sh
deleted file mode 100755 (executable)
index fa86966..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-#! /bin/sh
-# This file has been automatically generated.  DO NOT EDIT BY HAND!
-. ./defs-static || exit '99';
-am_tap_implementation=perl
-# 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/t/tap-planskip-badexit.sh"; then
-    echo "$0: will source $dir/t/tap-planskip-badexit.sh"
-    . "$dir/t/tap-planskip-badexit.sh"; exit "$?"
-  fi
-done
-echo "$0: cannot find wrapped test 't/tap-planskip-badexit.sh'" >&2
-exit '99'
old mode 100755 (executable)
new mode 100644 (file)
index 58ce0e7..c917b19
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2011-2012 Free Software Foundation, Inc.
+# Copyright (C) 2011-2017 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
 #  - an exit status != 0 of a test script causes an hard error, even if
 #    the last line of output is a "SKIP plan" (e.g., "1..0 # SKIP").
 
-. ./defs || Exit 1
+. test-init.sh
 
 echo TESTS = one.test two.test > Makefile.am
 
-. "$am_testauxdir"/tap-setup.sh || fatal_ "sourcing tap-setup.sh"
+. tap-setup.sh
 
 cat > one.test <<'END'
 #!/bin/sh
@@ -38,8 +38,7 @@ END
 
 chmod a+x one.test two.test
 
-$MAKE check >stdout && { cat stdout; Exit 1; }
-cat stdout
+run_make -O -e FAIL check
 
 # The 'prove' utility reports both the skip and the non-zero exit status,
 # so we do the same.
diff --git a/t/tap-planskip-bailout-w.sh b/t/tap-planskip-bailout-w.sh
deleted file mode 100755 (executable)
index a7c0383..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-#! /bin/sh
-# This file has been automatically generated.  DO NOT EDIT BY HAND!
-. ./defs-static || exit '99';
-am_tap_implementation=perl
-# 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/t/tap-planskip-bailout.sh"; then
-    echo "$0: will source $dir/t/tap-planskip-bailout.sh"
-    . "$dir/t/tap-planskip-bailout.sh"; exit "$?"
-  fi
-done
-echo "$0: cannot find wrapped test 't/tap-planskip-bailout.sh'" >&2
-exit '99'
old mode 100755 (executable)
new mode 100644 (file)
index 351aaba..93392e6
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2011-2012 Free Software Foundation, Inc.
+# Copyright (C) 2011-2017 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
 #  - a "Bail out!" directive causes an hard error, even if coming after
 #    a "SKIP plan" (e.g., "1..0 # SKIP").
 
-. ./defs || Exit 1
+. test-init.sh
 
-. "$am_testauxdir"/tap-setup.sh || fatal_ "sourcing tap-setup.sh"
+. tap-setup.sh
 
 cat > all.test <<END
 1..0 # SKIP
 Bail out!
 END
 
-$MAKE check >stdout && { cat stdout; Exit 1; }
-cat stdout
+run_make -O -e FAIL check
 count_test_results total=2 pass=0 fail=0 xpass=0 xfail=0 skip=1 error=1
 grep '^ERROR: all\.test - Bail out!' stdout
 
diff --git a/t/tap-planskip-case-insensitive-w.sh b/t/tap-planskip-case-insensitive-w.sh
deleted file mode 100755 (executable)
index e2e1741..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-#! /bin/sh
-# This file has been automatically generated.  DO NOT EDIT BY HAND!
-. ./defs-static || exit '99';
-am_tap_implementation=perl
-# 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/t/tap-planskip-case-insensitive.sh"; then
-    echo "$0: will source $dir/t/tap-planskip-case-insensitive.sh"
-    . "$dir/t/tap-planskip-case-insensitive.sh"; exit "$?"
-  fi
-done
-echo "$0: cannot find wrapped test 't/tap-planskip-case-insensitive.sh'" >&2
-exit '99'
old mode 100755 (executable)
new mode 100644 (file)
index 9de6bc5..2a83089
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2011-2012 Free Software Foundation, Inc.
+# Copyright (C) 2011-2017 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
 # TAP support:
 #  - "SKIP" keyword in a TAP plan is case-insensitive
 
-. ./defs || Exit 1
+. test-init.sh
 
-. "$am_testauxdir"/tap-setup.sh || fatal_ "sourcing tap-setup.sh"
-
-# These nested loops are clearer without indentation.
+. tap-setup.sh
 
+# These nested loops below are clearer without indentation.
 i=0
 for c1 in s S; do
 for c2 in k K; do
 for c3 in i I; do
 for c4 in p P; do
-  i=`expr $i + 1`
-  case $i in ?) i=0$i; esac
-  echo "1..0 # $c1$c2$c3$c4 foobar" > $i.test
+  i=$(($i + 1))
+  case $i in ?) j=0$i;; *) j=$i;; esac
+  echo "1..0 # $c1$c2$c3$c4 foobar" > $j.test
 done; done; done; done
 
-TESTS="`echo *.test`" $MAKE -e check >stdout || { cat stdout; Exit 1; }
-cat stdout
-
+run_make -O TESTS="$(echo *.test)" check
 count_test_results total=16 pass=0 fail=0 xpass=0 xfail=0 skip=16 error=0
 
 for tst in *.test; do
diff --git a/t/tap-planskip-late-w.sh b/t/tap-planskip-late-w.sh
deleted file mode 100755 (executable)
index 5510bf2..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-#! /bin/sh
-# This file has been automatically generated.  DO NOT EDIT BY HAND!
-. ./defs-static || exit '99';
-am_tap_implementation=perl
-# 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/t/tap-planskip-late.sh"; then
-    echo "$0: will source $dir/t/tap-planskip-late.sh"
-    . "$dir/t/tap-planskip-late.sh"; exit "$?"
-  fi
-done
-echo "$0: cannot find wrapped test 't/tap-planskip-late.sh'" >&2
-exit '99'
old mode 100755 (executable)
new mode 100644 (file)
index e0d3513..befb2a1
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2011-2012 Free Software Foundation, Inc.
+# Copyright (C) 2011-2017 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
@@ -18,9 +18,9 @@
 #  - the special "plan with SKIP" can also be used "late" in the TAP
 #    stream, i.e., preceded by non-TAP output or TAP diagnostic.
 
-. ./defs || Exit 1
+. test-init.sh
 
-. "$am_testauxdir"/tap-setup.sh || fatal_ "sourcing tap-setup.sh"
+. tap-setup.sh
 
 cat > foo.test <<END
 some non-TAP text, will be copied in the global log
@@ -32,12 +32,11 @@ cat > bar.test <<END
 1..0
 END
 
-TESTS='foo.test bar.test' $MAKE -e check >stdout || { cat stdout; Exit 1; }
-cat stdout
+run_make -O TESTS='foo.test bar.test' check
 
 grep '^SKIP: foo\.test .* from the last line$' stdout
 grep '^SKIP: bar\.test$' stdout
-test `grep -c ': .*\.test' stdout` -eq 2
+test $(grep -c ': .*\.test' stdout) -eq 2
 count_test_results total=2 pass=0 fail=0 xpass=0 xfail=0 skip=2 error=0
 
 :
diff --git a/t/tap-planskip-later-errors-w.sh b/t/tap-planskip-later-errors-w.sh
deleted file mode 100755 (executable)
index c3a04c8..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-#! /bin/sh
-# This file has been automatically generated.  DO NOT EDIT BY HAND!
-. ./defs-static || exit '99';
-am_tap_implementation=perl
-# 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/t/tap-planskip-later-errors.sh"; then
-    echo "$0: will source $dir/t/tap-planskip-later-errors.sh"
-    . "$dir/t/tap-planskip-later-errors.sh"; exit "$?"
-  fi
-done
-echo "$0: cannot find wrapped test 't/tap-planskip-later-errors.sh'" >&2
-exit '99'
old mode 100755 (executable)
new mode 100644 (file)
index 7bf3cb1..9898572
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2011-2012 Free Software Foundation, Inc.
+# Copyright (C) 2011-2017 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
@@ -17,9 +17,9 @@
 # TAP support:
 #  - TAP errors following a "TAP plan with SKIP" are still diagnosed.
 
-. ./defs || Exit 1
+. test-init.sh
 
-. "$am_testauxdir"/tap-setup.sh || fatal_ "sourcing tap-setup.sh"
+. tap-setup.sh
 
 cat > all.test <<END
 1..0
@@ -30,10 +30,8 @@ a non-TAP line
 1..1
 END
 
-$MAKE check >stdout && { cat stdout; Exit 1; }
-cat stdout
-
+run_make -O -e FAIL check
 count_test_results total=4 pass=0 fail=0 xpass=0 xfail=0 skip=1 error=3
-test `grep -c '^ERROR: all\.test - multiple test plans' stdout` -eq 3
+test $(grep -c '^ERROR: all\.test - multiple test plans' stdout) -eq 3
 
 :
diff --git a/t/tap-planskip-unplanned-corner-w.sh b/t/tap-planskip-unplanned-corner-w.sh
deleted file mode 100755 (executable)
index 71a0a3a..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-#! /bin/sh
-# This file has been automatically generated.  DO NOT EDIT BY HAND!
-. ./defs-static || exit '99';
-am_tap_implementation=perl
-# 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/t/tap-planskip-unplanned-corner.sh"; then
-    echo "$0: will source $dir/t/tap-planskip-unplanned-corner.sh"
-    . "$dir/t/tap-planskip-unplanned-corner.sh"; exit "$?"
-  fi
-done
-echo "$0: cannot find wrapped test 't/tap-planskip-unplanned-corner.sh'" >&2
-exit '99'
old mode 100755 (executable)
new mode 100644 (file)
index ead8613..382b26c
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2011-2012 Free Software Foundation, Inc.
+# Copyright (C) 2011-2017 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
@@ -18,9 +18,9 @@
 #  - test results seen in a TAP stream that has a "plan with SKIP" are
 #    flagged as errors, even if all of them are "SKIP" results.
 
-. ./defs || Exit 1
+. test-init.sh
 
-. "$am_testauxdir"/tap-setup.sh || fatal_ "sourcing tap-setup.sh"
+. tap-setup.sh
 
 cat > foo.test <<END
 1..0 # SKIP
@@ -32,9 +32,7 @@ ok 1 # SKIP
 1..0 # SKIP
 END
 
-TESTS='foo.test bar.test' $MAKE -e check >stdout && { cat stdout; Exit 1; }
-cat stdout
-
+run_make -O -e FAIL TESTS='foo.test bar.test' check
 count_test_results total=5 pass=0 fail=0 xpass=0 xfail=0 skip=2 error=3
 
 # Don't be too strict w.r.t. the format of the "skip whole test" message.
diff --git a/t/tap-planskip-unplanned-w.sh b/t/tap-planskip-unplanned-w.sh
deleted file mode 100755 (executable)
index 25d4c4d..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-#! /bin/sh
-# This file has been automatically generated.  DO NOT EDIT BY HAND!
-. ./defs-static || exit '99';
-am_tap_implementation=perl
-# 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/t/tap-planskip-unplanned.sh"; then
-    echo "$0: will source $dir/t/tap-planskip-unplanned.sh"
-    . "$dir/t/tap-planskip-unplanned.sh"; exit "$?"
-  fi
-done
-echo "$0: cannot find wrapped test 't/tap-planskip-unplanned.sh'" >&2
-exit '99'
old mode 100755 (executable)
new mode 100644 (file)
index cfb1c60..948a518
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2011-2012 Free Software Foundation, Inc.
+# Copyright (C) 2011-2017 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
 #    been seen is an error
 #  - any test result following a "plan with skip" is an error.
 
-. ./defs || Exit 1
+. test-init.sh
 
-. "$am_testauxdir"/tap-setup.sh || fatal_ "sourcing tap-setup.sh"
+. tap-setup.sh
 
 cat > all.test <<END
 ok 1
 1..0 # SKIP too late
 END
-$MAKE check >stdout && { cat stdout; Exit 1; }
-cat stdout
+run_make -O -e FAIL check
 count_test_results total=2 pass=1 fail=0 xpass=0 xfail=0 skip=0 error=1
 grep '^ERROR: all\.test - too many tests run (expected 0, got 1)$' stdout
 
@@ -38,8 +37,7 @@ ok 2 # SKIP
 not ok 3 # TODO
 1..0 # SKIP too late
 END
-$MAKE check >stdout && { cat stdout; Exit 1; }
-cat stdout
+run_make -O -e FAIL check
 count_test_results total=4 pass=1 fail=0 xpass=0 xfail=1 skip=1 error=1
 grep '^ERROR: all\.test - too many tests run (expected 0, got 3)$' stdout
 
@@ -47,8 +45,7 @@ cat > all.test <<END
 1..0 # SKIP falsified later
 ok 1
 END
-$MAKE check >stdout && { cat stdout; Exit 1; }
-cat stdout
+run_make -O -e FAIL check
 count_test_results total=3 pass=0 fail=0 xpass=0 xfail=0 skip=1 error=2
 grep '^ERROR: all\.test 1 # UNPLANNED$' stdout
 grep '^ERROR: all\.test - too many tests run (expected 0, got 1)$' stdout
@@ -60,8 +57,7 @@ ok 2 # SKIP
 not ok 3
 not ok 4 # TODO
 END
-$MAKE check >stdout && { cat stdout; Exit 1; }
-cat stdout
+run_make -O -e FAIL check
 count_test_results total=6 pass=0 fail=0 xpass=0 xfail=0 skip=1 error=5
 grep '^ERROR: all\.test 1 # UNPLANNED$' stdout
 grep '^ERROR: all\.test 2 # UNPLANNED$' stdout
diff --git a/t/tap-planskip-w.sh b/t/tap-planskip-w.sh
deleted file mode 100755 (executable)
index 5b5697d..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-#! /bin/sh
-# This file has been automatically generated.  DO NOT EDIT BY HAND!
-. ./defs-static || exit '99';
-am_tap_implementation=perl
-# 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/t/tap-planskip.sh"; then
-    echo "$0: will source $dir/t/tap-planskip.sh"
-    . "$dir/t/tap-planskip.sh"; exit "$?"
-  fi
-done
-echo "$0: cannot find wrapped test 't/tap-planskip.sh'" >&2
-exit '99'
diff --git a/t/tap-planskip-whitespace-w.sh b/t/tap-planskip-whitespace-w.sh
deleted file mode 100755 (executable)
index 727cf32..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-#! /bin/sh
-# This file has been automatically generated.  DO NOT EDIT BY HAND!
-. ./defs-static || exit '99';
-am_tap_implementation=perl
-# 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/t/tap-planskip-whitespace.sh"; then
-    echo "$0: will source $dir/t/tap-planskip-whitespace.sh"
-    . "$dir/t/tap-planskip-whitespace.sh"; exit "$?"
-  fi
-done
-echo "$0: cannot find wrapped test 't/tap-planskip-whitespace.sh'" >&2
-exit '99'
old mode 100755 (executable)
new mode 100644 (file)
index 4640ee5..a90a1f9
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2011-2012 Free Software Foundation, Inc.
+# Copyright (C) 2011-2017 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
@@ -18,9 +18,9 @@
 #  - normalization of whitespace in console testsuite progress associated
 #    with a SKIP directive in the TAP plan
 
-. ./defs || Exit 1
+. test-init.sh
 
-. "$am_testauxdir"/tap-setup.sh || fatal_ "sourcing tap-setup.sh"
+. tap-setup.sh
 
 cat > foo.test <<END
 1..0${tab}${tab}   #${tab}SKIP  ${tab}Strip leading & trailing ${tab}${tab}
@@ -34,10 +34,7 @@ cat > baz.test <<END
 1..0 #  SKIP${tab}  Strip${tab}external  preserve ${tab}middle  ${tab}${sp}
 END
 
-TESTS='foo.test bar.test baz.test' $MAKE -e check > stdout \
-  || { cat stdout; Exit 1; }
-cat stdout
-
+run_make -O TESTS='foo.test bar.test baz.test' check
 count_test_results total=3 pass=0 fail=0 error=0 xpass=0 xfail=0 skip=3
 
 grep "SKIP: foo\\.test - Strip leading & trailing$" stdout
old mode 100755 (executable)
new mode 100644 (file)
index 142afd7..547edb6
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2011-2012 Free Software Foundation, Inc.
+# Copyright (C) 2011-2017 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
@@ -17,9 +17,9 @@
 # Basic TAP test protocol support:
 #  - special plan format to skip all the tests in a script
 
-. ./defs || Exit 1
+. test-init.sh
 
-. "$am_testauxdir"/tap-setup.sh || fatal_ "sourcing tap-setup.sh"
+. tap-setup.sh
 
 weirdchars=\''"$!&()[]<>#;^?*/@%=,.:'
 
@@ -56,15 +56,13 @@ cat > mu.test <<END
 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; }
-cat stdout
-
+run_make -O check \
+  TESTS='foo.test bar.test baz.test wget.test curl.test mu.test'
 count_test_results total=6 pass=0 fail=0 xpass=0 xfail=0 skip=6 error=0
 
 # Look for a regression where the "1..0" wasn't being stripped from the
 # SKIP message.
-$FGREP '1..0' stdout && Exit 1
+$FGREP '1..0' stdout && exit 1
 
 grep '^SKIP: foo\.test$' stdout
 grep '^SKIP: bar\.test$' stdout
@@ -72,6 +70,6 @@ grep '^SKIP: baz\.test' stdout # Deliberately laxer, see above for why.
 grep '^SKIP: wget\.test .* wget(1) not installed$' stdout
 grep '^SKIP: curl\.test .* Can'\''t connect to gnu\.org!$' stdout
 grep '^SKIP: mu\.test' stdout | $FGREP "$weirdchars" stdout
-test `grep -c ': .*\.test' stdout` -eq 6
+test $(grep -c ': .*\.test' stdout) -eq 6
 
 :
diff --git a/t/tap-realtime-w.sh b/t/tap-realtime-w.sh
deleted file mode 100755 (executable)
index f1ea9fd..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-#! /bin/sh
-# This file has been automatically generated.  DO NOT EDIT BY HAND!
-. ./defs-static || exit '99';
-am_tap_implementation=perl
-# 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/t/tap-realtime.sh"; then
-    echo "$0: will source $dir/t/tap-realtime.sh"
-    . "$dir/t/tap-realtime.sh"; exit "$?"
-  fi
-done
-echo "$0: cannot find wrapped test 't/tap-realtime.sh'" >&2
-exit '99'
diff --git a/t/tap-realtime.sh b/t/tap-realtime.sh
deleted file mode 100755 (executable)
index d874b0c..0000000
+++ /dev/null
@@ -1,125 +0,0 @@
-#! /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/>.
-
-# TAP support:
-#  - testsuite progress on console should happen mostly "in real time";
-#    i.e., it's not acceptable for the driver to wait the end of the
-#    script to start displaying results from it.
-# FIXME: this test uses expect(1) to ensure line buffering from make and
-# children, and is pretty hacky and complex; is there a better way to
-# accomplish the checks done here?
-
-. ./defs || Exit 1
-
-cat >expect-check <<'END'
-eval spawn $env(SHELL) -c ":"
-expect eof
-END
-expect -f expect-check || {
-    echo "$me: failed to find a working expect program" >&2
-    Exit 77
-}
-rm -f expect-check
-
-# Unfortunately, some make implementations (among them, FreeBSD make,
-# NetBSD make, and Solaris Distributed make), when run in parallel mode,
-# serialize the output from their targets' recipes unconditionally.  In
-# such a situation, there's no way the partial results of a TAP test can
-# be displayed until the test has terminated.  And this is not something
-# our TAP driver script can work around; in fact, the driver *is* sending
-# out its output progressively and "in sync" with test execution -- it is
-# make that is stowing such output away instead of presenting it to the
-# user as soon as it gets it.
-if using_gmake; then :; else
-  case $MAKE in
-    *\ -j*) skip_ "doesn't with non-GNU concurrent make";;
-  esac
-  # Prevent Sun Distributed Make from trying to run in parallel.
-  DMAKE_MODE=serial; export DMAKE_MODE
-fi
-
-cat > Makefile.am << 'END'
-TESTS = all.test
-END
-. "$am_testauxdir"/tap-setup.sh || fatal_ "sourcing tap-setup.sh"
-
-cat > all.test <<'END'
-#! /bin/sh
-echo 1..3
-
-# Creative quoting to placate maintainer-check.
-sleep="sleep "3
-
-# The awk+shell implementation of the TAP driver must "read ahead" of one
-# line in order to catch the exit status of the test script it runs.  So
-# be sure to echo one "dummy" line after each result line in order not to
-# cause false positives.
-
-echo ok 1 - foo
-echo DUMMY
-$sleep
-test -f ok-1 || { echo 'Bail out!'; exit 1; }
-
-echo ok 2 - bar
-echo DUMMY
-$sleep
-test -f ok-2 || { echo 'Bail out!'; exit 1; }
-
-echo ok 3 - baz
-echo DUMMY
-$sleep
-test -f ok-3 || { echo 'Bail out!'; exit 1; }
-
-: > all-is-well
-END
-
-chmod a+x all.test
-
-cat > expect-make <<'END'
-eval spawn $env(MAKE) check
-expect {
-  "PASS: all.test 1 - foo" {
-    open "ok-1" "w"
-    exp_continue
-  }
-  "PASS: all.test 2 - bar" {
-    open "ok-2" "w"
-    exp_continue
-  }
-  "PASS: all.test 3 - baz" {
-    open "ok-3" "w"
-    exp_continue
-  }
-  "Testsuite summary" {
-    exit 0
-  }
-  timeout {
-    puts "expect timed out"
-    exit 1
-  }
-  default {
-    puts "expect error"
-    exit 1
-  }
-}
-END
-
-# Expect should simulate a tty as stdout, which should ensure a
-# line-buffered output.
-MAKE=$MAKE expect -f expect-make
-test -f all-is-well
-
-:
diff --git a/t/tap-recheck-logs-w.sh b/t/tap-recheck-logs-w.sh
deleted file mode 100755 (executable)
index bac080c..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-#! /bin/sh
-# This file has been automatically generated.  DO NOT EDIT BY HAND!
-. ./defs-static || exit '99';
-am_tap_implementation=perl
-# 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/t/tap-recheck-logs.sh"; then
-    echo "$0: will source $dir/t/tap-recheck-logs.sh"
-    . "$dir/t/tap-recheck-logs.sh"; exit "$?"
-  fi
-done
-echo "$0: cannot find wrapped test 't/tap-recheck-logs.sh'" >&2
-exit '99'
old mode 100755 (executable)
new mode 100644 (file)
index 7fb2b80..c1a3a3c
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2011-2012 Free Software Foundation, Inc.
+# Copyright (C) 2011-2017 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
@@ -17,7 +17,7 @@
 # TAP support:
 # - RECHECK_LOGS
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat > Makefile.am << 'END'
 TEST_LOG_COMPILER = cat
@@ -25,7 +25,7 @@ TESTS = foo.test bar.test baz.test
 baz.log: zardoz
 END
 
-. "$am_testauxdir"/tap-setup.sh || fatal_ "sourcing tap-setup.sh"
+. tap-setup.sh
 
 : > zardoz
 
@@ -58,21 +58,20 @@ grep_summary ()
   grep '^# ERROR: *1$' stdout
 }
 
-$MAKE -e check && Exit 1
+run_make -e FAIL check
 test -f foo.log
 test -f bar.log
 test -f baz.log
 
 rm -f foo.log bar.log
 
-env RECHECK_LOGS= $MAKE -e check > stdout && { cat stdout; Exit 1; }
-cat stdout
+run_make -O -e FAIL check RECHECK_LOGS=
 test -f foo.log
 test -f bar.log
 grep '^PASS: foo\.test 1$' stdout
 grep '^PASS: foo\.test 2$' stdout
 grep '^FAIL: bar\.test 1$' stdout
-grep 'baz\.test' stdout && Exit 1
+grep 'baz\.test' stdout && exit 1
 grep_summary
 
 $sleep
@@ -80,38 +79,34 @@ touch foo.test
 # 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.
-env RECHECK_LOGS= $MAKE -e check > stdout && { cat stdout; Exit 1; }
-cat stdout
+run_make -O -e FAIL check RECHECK_LOGS=
 grep '^PASS: foo\.test 1$' stdout
 grep '^PASS: foo\.test 2$' stdout
-grep 'ba[rz]\.test' stdout && Exit 1
+grep 'ba[rz]\.test' stdout && exit 1
 is_newest foo.log foo.test
 grep_summary
 
 $sleep
 touch zardoz
-env RECHECK_LOGS= $MAKE -e check > stdout && { cat stdout; Exit 1; }
-cat stdout
+run_make -O -e FAIL check RECHECK_LOGS=
 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.
-env RECHECK_LOGS= $MAKE -e check > stdout && { cat stdout; Exit 1; }
-cat stdout
-$EGREP '(foo|bar|baz)\.test' stdout && Exit 1
+run_make -O -e FAIL check RECHECK_LOGS=
+$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
+run_make -O -e FAIL check RECHECK_LOGS=foo.log
 grep '^PASS: foo\.test 1$' stdout
 grep '^PASS: foo\.test 2$' stdout
-grep 'ba[rz]\.test' stdout && Exit 1
+grep 'ba[rz]\.test' stdout && exit 1
 is_newest foo.log older
 grep_summary
 
diff --git a/t/tap-recheck-w.sh b/t/tap-recheck-w.sh
deleted file mode 100755 (executable)
index 4bbcf79..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-#! /bin/sh
-# This file has been automatically generated.  DO NOT EDIT BY HAND!
-. ./defs-static || exit '99';
-am_tap_implementation=perl
-# 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/t/tap-recheck.sh"; then
-    echo "$0: will source $dir/t/tap-recheck.sh"
-    . "$dir/t/tap-recheck.sh"; exit "$?"
-  fi
-done
-echo "$0: cannot find wrapped test 't/tap-recheck.sh'" >&2
-exit '99'
old mode 100755 (executable)
new mode 100644 (file)
index 98a960e..8e500b2
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2011-2012 Free Software Foundation, Inc.
+# Copyright (C) 2011-2017 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
@@ -15,9 +15,9 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 # Test the 'recheck' target for TAP test protocol.
-# Keep in sync with 'test-driver-custom-multitest-recheck.test'.
+# Keep in sync with 'test-driver-custom-multitest-recheck.sh'.
 
-. ./defs || Exit 1
+. test-init.sh
 
 fetch_tap_driver
 
@@ -85,13 +85,13 @@ $AUTOMAKE
 do_recheck ()
 {
   case $* in
-    --fail) on_bad_rc='&&';;
-    --pass) on_bad_rc='||';;
+    --fail) status=FAIL;;
+    --pass) status=0;;
          *) fatal_ "invalid usage of function 'do_recheck'";;
   esac
   rm -f *.run
-  eval "\$MAKE recheck >stdout $on_bad_rc { cat stdout; ls -l; Exit 1; }; :"
-  cat stdout; ls -l
+  run_make -O -e $status recheck || { ls -l; exit 1; }
+  ls -l
 }
 
 for vpath in : false; do
@@ -108,19 +108,18 @@ for vpath in : false; do
   : A "make recheck" in a clean tree should run no tests.
   do_recheck --pass
   cat test-suite.log
-  test ! -r a.run
-  test ! -r a.log
-  test ! -r b.run
-  test ! -r b.log
-  test ! -r c.run
-  test ! -r c.log
-  test ! -r d.run
-  test ! -r d.log
+  test ! -e a.run
+  test ! -e a.log
+  test ! -e b.run
+  test ! -e b.log
+  test ! -e c.run
+  test ! -e c.log
+  test ! -e d.run
+  test ! -e d.log
   count_test_results total=0 pass=0 fail=0 xpass=0 xfail=0 skip=0 error=0
 
   : Run the tests for the first time.
-  $MAKE check >stdout && { cat stdout; Exit 1; }
-  cat stdout
+  run_make -O -e FAIL check
   ls -l
   # All the test scripts should have run.
   test -f a.run
@@ -130,45 +129,50 @@ for vpath in : false; do
   count_test_results total=9 pass=3 fail=2 xpass=1 xfail=1 skip=1 error=1
 
   : Let us make b.test pass.
+  using_gmake || $sleep # Required by BSD make.
   echo OK > b.ok
   do_recheck --fail
   # a.test has been successful the first time, so no need to re-run it.
   # Similar considerations apply to similar checks, below.
-  test ! -r a.run
+  test ! -e a.run
   test -f b.run
   test -f c.run
   test -f d.run
   count_test_results total=7 pass=2 fail=2 xpass=1 xfail=1 skip=1 error=0
 
   : Let us make the first part of c.test pass.
+  using_gmake || $sleep # Required by BSD make.
   echo OK > c.pass
   do_recheck --fail
-  test ! -r a.run
-  test ! -r b.run
+  test ! -e a.run
+  test ! -e b.run
   test -f c.run
   test -f d.run
   count_test_results total=5 pass=1 fail=1 xpass=1 xfail=1 skip=1 error=0
 
   : Let us make also the second part of c.test pass.
+  using_gmake || $sleep # Required by BSD make.
   echo KO > c.xfail
   do_recheck --fail
-  test ! -r a.run
-  test ! -r b.run
+  test ! -e a.run
+  test ! -e b.run
   test -f c.run
   test -f d.run
   count_test_results total=5 pass=1 fail=1 xpass=0 xfail=2 skip=1 error=0
 
   : Nothing changed, so only d.test should be run.
   for i in 1 2; do
+    using_gmake || $sleep # Required by BSD make.
     do_recheck --fail
-    test ! -r a.run
-    test ! -r b.run
-    test ! -r c.run
+    test ! -e a.run
+    test ! -e b.run
+    test ! -e c.run
     test -f d.run
     count_test_results total=2 pass=0 fail=1 xpass=0 xfail=0 skip=1 error=0
   done
 
   : Let us make d.test run more testcases, and experience _more_ failures.
+  using_gmake || $sleep # Required by BSD make.
   echo 'test_count=9' > d.count
   unindent > d.extra <<'END'
     echo 'ok # SKIP s'
@@ -183,28 +187,30 @@ for vpath in : false; do
     echo 'Bail out!'
 END
   do_recheck --fail
-  test ! -r a.run
-  test ! -r b.run
-  test ! -r c.run
+  test ! -e a.run
+  test ! -e b.run
+  test ! -e c.run
   test -f d.run
   count_test_results total=11 pass=2 fail=4 xpass=1 xfail=0 skip=2 error=2
 
   : Let us finally make d.test pass.
+  using_gmake || $sleep # Required by BSD make.
   echo 'test_count=1' > d.count
   echo : > d.extra
   do_recheck --pass
-  test ! -r a.run
-  test ! -r b.run
-  test ! -r c.run
+  test ! -e a.run
+  test ! -e b.run
+  test ! -e c.run
   test -f d.run
   count_test_results total=1 pass=0 fail=0 xpass=0 xfail=0 skip=1 error=0
 
   : All tests have been successful or skipped, nothing should be re-run.
+  using_gmake || $sleep # Required by BSD make.
   do_recheck --pass
-  test ! -r a.run
-  test ! -r b.run
-  test ! -r c.run
-  test ! -r d.run
+  test ! -e a.run
+  test ! -e b.run
+  test ! -e c.run
+  test ! -e d.run
   count_test_results total=0 pass=0 fail=0 xpass=0 xfail=0 skip=0 error=0
 
   cd $srcdir
diff --git a/t/tap-result-comment-w.sh b/t/tap-result-comment-w.sh
deleted file mode 100755 (executable)
index 9f03fc2..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-#! /bin/sh
-# This file has been automatically generated.  DO NOT EDIT BY HAND!
-. ./defs-static || exit '99';
-am_tap_implementation=perl
-# 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/t/tap-result-comment.sh"; then
-    echo "$0: will source $dir/t/tap-result-comment.sh"
-    . "$dir/t/tap-result-comment.sh"; exit "$?"
-  fi
-done
-echo "$0: cannot find wrapped test 't/tap-result-comment.sh'" >&2
-exit '99'
old mode 100755 (executable)
new mode 100644 (file)
index 21bc810..f5d46ff
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2011-2012 Free Software Foundation, Inc.
+# Copyright (C) 2011-2017 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
@@ -17,9 +17,9 @@
 # TAP support:
 #  - non-directive comments in TAP results are kept verbatim
 
-. ./defs || Exit 1
+. test-init.sh
 
-. "$am_testauxdir"/tap-setup.sh || fatal_ "sourcing tap-setup.sh"
+. tap-setup.sh
 
 cat > all.test <<END
 1..5
@@ -30,9 +30,7 @@ not ok #    TOD${tab}
 ok 5 # ${tab}${tab}TOOD${tab}${sp}${sp}
 END
 
-$MAKE check >stdout && { cat stdout; Exit 1; }
-cat stdout
-
+run_make -O -e FAIL check
 count_test_results total=5 pass=3 fail=2 xpass=0 xfail=0 skip=0 error=0
 
 # Don't be too strict about trailing white space.
diff --git a/t/tap-signal-w.tap b/t/tap-signal-w.tap
deleted file mode 100755 (executable)
index 8bac5e6..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-#! /bin/sh
-# This file has been automatically generated.  DO NOT EDIT BY HAND!
-. ./defs-static || exit '99';
-am_tap_implementation=perl
-# 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/t/tap-signal.tap"; then
-    echo "$0: will source $dir/t/tap-signal.tap"
-    . "$dir/t/tap-signal.tap"; exit "$?"
-  fi
-done
-echo "$0: cannot find wrapped test 't/tap-signal.tap'" >&2
-exit '99'
old mode 100755 (executable)
new mode 100644 (file)
index e23deea..c586e0b
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2011-2012 Free Software Foundation, Inc.
+# Copyright (C) 2011-2017 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
@@ -17,7 +17,7 @@
 # TAP support:
 #  - a test script terminated by a signal causes an hard error
 
-. ./defs || Exit 1
+. test-init.sh
 
 fetch_tap_driver
 
@@ -60,7 +60,7 @@ for sig in $all_signals; do
 END
   echo TESTS += signal-$sig.test >> Makefile.am
 done
-results_count=`ls *.test | wc -l | tr -d "$tab$sp"`
+results_count=$(ls *.test | wc -l | tr -d "$tab$sp")
 
 chmod a+x *.test
 
@@ -70,7 +70,7 @@ $AUTOMAKE
 
 ./configure
 
-system=`uname -s -r || echo unknown` # Needed later.
+system=$(uname -s -r || echo unknown) # Needed later.
 
 signal_caught ()
 {
@@ -93,13 +93,8 @@ signal_caught ()
   esac
   wbound_re="($|[^a-zA-Z0-9_-])"
   pfx_re="^ERROR: signal-$numeric\\.test"
-  case $am_tap_implementation in
-    # Dummy escape to please maintainer-check.
-    per\l) rx="$pfx_re - terminated by signal $sig_re$";;
-    shell) rx="$pfx_re .*terminated by signal $sig_re$wbound_re";;
-    *) fatal_ "invalid \$am_tap_implementation '$am_tap_implementation'";;
-  esac
-  desc="TAP driver catch test termination by signal SIG$symbolic"
+  rx="${pfx_re} .*terminated by signal ${sig_re}${wbound_re}"
+  desc="TAP driver catch test termination by signal SIG${symbolic}"
   case " $blocked_signals " in
     *" $numeric "*) skip_ -r "SIG$symbolic is blocked" "$desc" ;;
     *) command_ok_ "$desc" env LC_ALL=C $EGREP "$rx" stdout ;;
@@ -108,19 +103,18 @@ signal_caught ()
 
 command_ok_ '"make check" fails' eval '
   (
-    st=0; $MAKE check >stdout || st=$?
-    cat stdout
+    run_make -e IGNORE -O check
     # Extra "echo" and silencing of xtraces required to avoid possible
     # garbled output with NetBSD make, which would miss some final
     # newlines in the expected places and thus mess up our TAP output.
     set +x; echo
-    test $st -gt 0
+    test $am_make_rc -gt 0
   )
 '
 cat stdout # For debugging.
 
 command_ok_ "count of test results" count_test_results \
-  total=`expr $results_count '*' 2` \
+  total=$(($results_count * 2)) \
   pass=$results_count error=$results_count \
   fail=0 xpass=0 xfail=0 skip=0
 
@@ -130,8 +124,7 @@ done
 
 echo 'TEST_LOG_DRIVER_FLAGS = --ignore-exit' >> Makefile
 
-command_ok_ '"make check" passes [--ignore-exit]' eval '$MAKE check >stdout'
-cat stdout # For debugging.
+command_ok_ '"make check" passes [--ignore-exit]' run_make -O check
 
 command_ok_ "count of test results [--ignore-exit]" count_test_results \
   total=$results_count pass=$results_count \
old mode 100755 (executable)
new mode 100644 (file)
index a28512b..a424968
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2011-2012 Free Software Foundation, Inc.
+# Copyright (C) 2011-2017 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
@@ -17,7 +17,7 @@
 # TAP support:
 #  - colorized testsuite summary
 
-. ./defs-static
+. test-lib.sh
 
 use_colors=yes
-. "$am_testauxdir"/tap-summary-aux.sh
+. tap-summary-aux.sh
old mode 100755 (executable)
new mode 100644 (file)
index deee099..5501119
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2011-2012 Free Software Foundation, Inc.
+# Copyright (C) 2011-2017 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
@@ -17,7 +17,7 @@
 # TAP support:
 #  - colorized testsuite summary
 
-. ./defs-static
+. test-lib.sh
 
 use_colors=no
-. "$am_testauxdir"/tap-summary-aux.sh
+. tap-summary-aux.sh
diff --git a/t/tap-test-number-0-w.sh b/t/tap-test-number-0-w.sh
deleted file mode 100755 (executable)
index 0a34ee4..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-#! /bin/sh
-# This file has been automatically generated.  DO NOT EDIT BY HAND!
-. ./defs-static || exit '99';
-am_tap_implementation=perl
-# 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/t/tap-test-number-0.sh"; then
-    echo "$0: will source $dir/t/tap-test-number-0.sh"
-    . "$dir/t/tap-test-number-0.sh"; exit "$?"
-  fi
-done
-echo "$0: cannot find wrapped test 't/tap-test-number-0.sh'" >&2
-exit '99'
old mode 100755 (executable)
new mode 100644 (file)
index 8faa9c0..a52c417
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2011-2012 Free Software Foundation, Inc.
+# Copyright (C) 2011-2017 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
 #  - a test result numbered as 0 is to be considered out-of-order
 # This is consistent with the behaviour of the 'prove' utility.
 
-. ./defs || Exit 1
-
-if test $am_tap_implementation = perl; then
-  $PERL -MTAP::Parser -e 1 \
-    || skip_ "cannot import TAP::Parser perl module"
-  if $PERL -w -e '
-    use warnings FATAL => "all"; use strict;
-    use TAP::Parser;
-    my $parser = TAP::Parser->new({tap => "1..1\n" . "ok 0\n"});
-    my $result = $parser->next;
-    $result->is_plan or die "first line is not TAP plan";
-    $result = $parser->next;
-    $result->is_test or die "second line is not TAP test result";
-    my $testno = $result->number;
-    $parser->next and die "unexpected further TAP stream";
-    exit ($testno == 0 ? 0 : 77);
-  '; then
-    : # Nothing to do.
-  elif test $? -eq 77; then
-    skip_ 'TAP::Parser bug: test number 0 gets relabelled as 1'
-  else
-    fatal_ "error analyzing TAP::Parser module for bugs"
-  fi
-fi
-
-. "$am_testauxdir"/tap-setup.sh || fatal_ "sourcing tap-setup.sh"
+. test-init.sh
+. tap-setup.sh
 
 cat > a.test <<END
 1..1
@@ -70,10 +46,7 @@ cat > e.test <<END
 ok 0 # TODO
 END
 
-TESTS='a.test b.test c.test d.test e.test' $MAKE -e check >stdout \
-  && { cat stdout; Exit 1; }
-cat stdout
-
+run_make -O -e FAIL TESTS='a.test b.test c.test d.test e.test' check
 count_test_results total=5 pass=0 fail=0 xpass=0 xfail=0 skip=0 error=5
 
 grep '^ERROR: a\.test 0 # OUT-OF-ORDER (expecting 1)$' stdout
diff --git a/t/tap-todo-skip-together-w.sh b/t/tap-todo-skip-together-w.sh
deleted file mode 100755 (executable)
index 0521fd5..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-#! /bin/sh
-# This file has been automatically generated.  DO NOT EDIT BY HAND!
-. ./defs-static || exit '99';
-am_tap_implementation=perl
-# 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/t/tap-todo-skip-together.sh"; then
-    echo "$0: will source $dir/t/tap-todo-skip-together.sh"
-    . "$dir/t/tap-todo-skip-together.sh"; exit "$?"
-  fi
-done
-echo "$0: cannot find wrapped test 't/tap-todo-skip-together.sh'" >&2
-exit '99'
old mode 100755 (executable)
new mode 100644 (file)
index 31580ca..9bbf56e
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2011-2012 Free Software Foundation, Inc.
+# Copyright (C) 2011-2017 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
 
 # TAP support:
 #  - TODO and SKIP directives on the same line: the first one wins
-# See also related test 'tap-ambiguous-directive.test'.
+# See also related test 'tap-ambiguous-directive.sh'.
 
-. ./defs || Exit 1
+. test-init.sh
 
-. "$am_testauxdir"/tap-setup.sh || fatal_ "sourcing tap-setup.sh"
+. tap-setup.sh
 
 cat > all.test <<END
 1..2
@@ -28,9 +28,7 @@ ok 1 # SKIP TODO
 not ok 2 # TODO SKIP
 END
 
-$MAKE check >stdout || { cat stdout; Exit 1; }
-cat stdout
-
+run_make -O check
 count_test_results total=2 pass=0 fail=0 xpass=0 xfail=1 skip=1 error=0
 
 grep '^SKIP: all\.test 1 ' stdout
diff --git a/t/tap-todo-skip-w.sh b/t/tap-todo-skip-w.sh
deleted file mode 100755 (executable)
index 4260325..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-#! /bin/sh
-# This file has been automatically generated.  DO NOT EDIT BY HAND!
-. ./defs-static || exit '99';
-am_tap_implementation=perl
-# 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/t/tap-todo-skip.sh"; then
-    echo "$0: will source $dir/t/tap-todo-skip.sh"
-    . "$dir/t/tap-todo-skip.sh"; exit "$?"
-  fi
-done
-echo "$0: cannot find wrapped test 't/tap-todo-skip.sh'" >&2
-exit '99'
diff --git a/t/tap-todo-skip-whitespace-w.sh b/t/tap-todo-skip-whitespace-w.sh
deleted file mode 100755 (executable)
index b0695e3..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-#! /bin/sh
-# This file has been automatically generated.  DO NOT EDIT BY HAND!
-. ./defs-static || exit '99';
-am_tap_implementation=perl
-# 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/t/tap-todo-skip-whitespace.sh"; then
-    echo "$0: will source $dir/t/tap-todo-skip-whitespace.sh"
-    . "$dir/t/tap-todo-skip-whitespace.sh"; exit "$?"
-  fi
-done
-echo "$0: cannot find wrapped test 't/tap-todo-skip-whitespace.sh'" >&2
-exit '99'
old mode 100755 (executable)
new mode 100644 (file)
index d36aa13..73fe504
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2011-2012 Free Software Foundation, Inc.
+# Copyright (C) 2011-2017 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
@@ -18,9 +18,9 @@
 #  - normalization of whitespace in console testsuite progress associated
 #    with TODO and SKIP directives
 
-. ./defs || Exit 1
+. test-init.sh
 
-. "$am_testauxdir"/tap-setup.sh || fatal_ "sourcing tap-setup.sh"
+. tap-setup.sh
 
 cat > stub.tap <<END
 1 # TODO
@@ -68,8 +68,8 @@ my_make_check ()
     *) fatal_ "bad argument '$1' for my_make_check";;
   esac
   cat all.test
-  $MAKE check >stdout || : # Don't care about the exit status in this test.
-  cat stdout
+  # We don't care about the exit status in this test.
+  run_make -O -e IGNORE check
   count_test_results total=15 pass=0 fail=0 error=0 \
                      xpass=$xpass xfail=$xfail skip=$skip
   # Don't be too strict w.r.t. possible normalization of "TODO: foo" into
old mode 100755 (executable)
new mode 100644 (file)
index 62206ab..e5e5c3e
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2011-2012 Free Software Foundation, Inc.
+# Copyright (C) 2011-2017 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
@@ -23,9 +23,9 @@
 #  - the reasons for TODO and SKIP, if present, are nicely printed in
 #    the testsuite progress output
 
-. ./defs || Exit 1
+. test-init.sh
 
-. "$am_testauxdir"/tap-setup.sh || fatal_ "sourcing tap-setup.sh"
+. tap-setup.sh
 
 # ----------------------------------------------------- #
 #  Check all possible combinations of:                  #
@@ -60,9 +60,7 @@ done; done; done; done; done >> all.test
 
 cat all.test # For debugging.
 
-$MAKE check >stdout || { cat stdout; Exit 1; }
-cat stdout
-
+run_make -O check
 count_test_results total=256 pass=0 fail=0 xpass=0 xfail=128 skip=128 error=0
 
 # -------------------------------------------------------- #
@@ -82,9 +80,7 @@ ok 8 - SKIP
 ok 9
 END
 
-$MAKE check >stdout || { cat stdout; Exit 1; }
-cat stdout
-
+run_make -O check
 count_test_results total=9 pass=9 fail=0 xpass=0 xfail=0 skip=0 error=0
 
 :
diff --git a/t/tap-unplanned-w.sh b/t/tap-unplanned-w.sh
deleted file mode 100755 (executable)
index ab6aa08..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-#! /bin/sh
-# This file has been automatically generated.  DO NOT EDIT BY HAND!
-. ./defs-static || exit '99';
-am_tap_implementation=perl
-# 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/t/tap-unplanned.sh"; then
-    echo "$0: will source $dir/t/tap-unplanned.sh"
-    . "$dir/t/tap-unplanned.sh"; exit "$?"
-  fi
-done
-echo "$0: cannot find wrapped test 't/tap-unplanned.sh'" >&2
-exit '99'
old mode 100755 (executable)
new mode 100644 (file)
index e8d9dad..ea2a31b
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2011-2012 Free Software Foundation, Inc.
+# Copyright (C) 2011-2017 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
 # TAP support:
 #  - unplanned tests are properly reported as errors
 
-. ./defs || Exit 1
+. test-init.sh
 
-. "$am_testauxdir"/tap-setup.sh || fatal_ "sourcing tap-setup.sh"
+. tap-setup.sh
 
 cat > all.test <<END
 1..1
 ok 1
 ok 2
 END
-$MAKE check >stdout && { cat stdout; Exit 1; }
-cat stdout
+run_make -O -e FAIL check
 count_test_results total=3 pass=1 fail=0 xpass=0 xfail=0 skip=0 error=2
 grep '^ERROR: all\.test - too many tests run (expected 1, got 2)$' stdout
 grep '^ERROR: all\.test 2 # UNPLANNED$' stdout
@@ -38,8 +37,7 @@ ok 1
 ok 2
 ok 3
 END
-$MAKE check >stdout && { cat stdout; Exit 1; }
-cat stdout
+run_make -O -e FAIL check
 count_test_results total=4 pass=2 fail=0 xpass=0 xfail=0 skip=0 error=2
 grep '^ERROR: all\.test - too many tests run (expected 2, got 3)$' stdout
 grep '^ERROR: all\.test 3 # UNPLANNED$' stdout
@@ -53,8 +51,7 @@ ok 3
 not ok 4
 ok 5 # SKIP
 END
-XFAIL_TESTS=all.test $MAKE -e check >stdout && { cat stdout; Exit 1; }
-cat stdout
+run_make -O -e FAIL XFAIL_TESTS=all.test check
 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
 grep '^ERROR: all\.test 3 # UNPLANNED$' stdout
@@ -120,8 +117,7 @@ cat > t <<END
 
 END
 
-$MAKE check >stdout && { cat stdout; Exit 1; }
-cat stdout
+run_make -O -e FAIL check
 count_test_results total=22 pass=1 fail=0 xpass=0 xfail=0 skip=0 error=21
 
 echo 'PASS: all.test 1' > exp
@@ -146,9 +142,8 @@ for x in 'ok' 'ok 3' 'not ok' 'not ok # TODO' 'ok # TODO' 'ok # SKIP'; do
     $x
     1..2
 END
-  $MAKE check >stdout && { cat stdout; Exit 1; }
-  cat stdout
-  test `$FGREP -c ': all.test' stdout` -eq 4
+  run_make -O -e FAIL check
+  test $($FGREP -c ': all.test' stdout) -eq 4
   $EGREP '^PASS: all\.test 1($| )' stdout
   $EGREP '^SKIP: all\.test 2($| )' stdout
   $EGREP ': all\.test 3($| )' stdout
diff --git a/t/tap-whitespace-normalization-w.sh b/t/tap-whitespace-normalization-w.sh
deleted file mode 100755 (executable)
index f911e9d..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-#! /bin/sh
-# This file has been automatically generated.  DO NOT EDIT BY HAND!
-. ./defs-static || exit '99';
-am_tap_implementation=perl
-# 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/t/tap-whitespace-normalization.sh"; then
-    echo "$0: will source $dir/t/tap-whitespace-normalization.sh"
-    . "$dir/t/tap-whitespace-normalization.sh"; exit "$?"
-  fi
-done
-echo "$0: cannot find wrapped test 't/tap-whitespace-normalization.sh'" >&2
-exit '99'
old mode 100755 (executable)
new mode 100644 (file)
index a43d29a..d9da56c
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2011-2012 Free Software Foundation, Inc.
+# Copyright (C) 2011-2017 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 # TAP support: whitespace normalization (or lack thereof) in the testsuite
-# progress output on console.  We keep all these checks here in a single
+# progress output on console.  We keep all of these checks here in a single
 # script so that a potential cosmetic change in the output format won't
 # force us to tweak dozens of other tests (hopefully).
-# See also related test 'tap-todo-skip-whitespace.test'.
+# See also related test 'tap-todo-skip-whitespace.sh'.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat > Makefile.am << 'END'
 TEST_LOG_COMPILER = cat
@@ -144,12 +144,11 @@ END
 
 chmod a+x *.test
 
-. "$am_testauxdir"/tap-setup.sh || fatal_ "sourcing tap-setup.sh"
+. tap-setup.sh
 
-# Don't care about exit status or number of test results, they should be
-# checked for in many other tests.
-$MAKE check >stdout || :
-cat stdout
+# We don't care about exit status or number of test results, they
+# should be checked for in many other tests.
+run_make -O -e FAIL check
 
 LC_ALL=C sort exp > t
 mv -f t exp
diff --git a/t/tap-with-and-without-number-w.sh b/t/tap-with-and-without-number-w.sh
deleted file mode 100755 (executable)
index 5f324ee..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-#! /bin/sh
-# This file has been automatically generated.  DO NOT EDIT BY HAND!
-. ./defs-static || exit '99';
-am_tap_implementation=perl
-# 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/t/tap-with-and-without-number.sh"; then
-    echo "$0: will source $dir/t/tap-with-and-without-number.sh"
-    . "$dir/t/tap-with-and-without-number.sh"; exit "$?"
-  fi
-done
-echo "$0: cannot find wrapped test 't/tap-with-and-without-number.sh'" >&2
-exit '99'
old mode 100755 (executable)
new mode 100644 (file)
index 82889c2..cc00d51
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2011-2012 Free Software Foundation, Inc.
+# Copyright (C) 2011-2017 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
@@ -19,9 +19,9 @@
 #  - tests without explicit number get automatically numbered in the
 #    testsuite progress output on console
 
-. ./defs || Exit 1
+. test-init.sh
 
-. "$am_testauxdir"/tap-setup.sh || fatal_ "sourcing tap-setup.sh"
+. tap-setup.sh
 
 cat > all.test <<'END'
 1..7
@@ -34,8 +34,7 @@ ok 6 # SKIP
 ok zardoz
 END
 
-$MAKE check >stdout || { cat stdout; Exit 1; }
-cat stdout
+run_make -O check
 count_test_results total=7 pass=4 fail=0 xpass=0 xfail=2 skip=1 error=0
 
 grep '^PASS: all\.test 1 foo$' stdout
diff --git a/t/tap-xfail-tests-w.sh b/t/tap-xfail-tests-w.sh
deleted file mode 100755 (executable)
index 4b1bbf8..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-#! /bin/sh
-# This file has been automatically generated.  DO NOT EDIT BY HAND!
-. ./defs-static || exit '99';
-am_tap_implementation=perl
-# 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/t/tap-xfail-tests.sh"; then
-    echo "$0: will source $dir/t/tap-xfail-tests.sh"
-    . "$dir/t/tap-xfail-tests.sh"; exit "$?"
-  fi
-done
-echo "$0: cannot find wrapped test 't/tap-xfail-tests.sh'" >&2
-exit '99'
old mode 100755 (executable)
new mode 100644 (file)
index 27c1804..9e9f5ce
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2011-2012 Free Software Foundation, Inc.
+# Copyright (C) 2011-2017 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
@@ -17,9 +17,9 @@
 # TAP and $(XFAIL_TESTS): test results without directives are turned from
 # PASS to XPASS and from FAIL to XFAIL; other results are unchanged.
 
-. ./defs || Exit 1
+. test-init.sh
 
-. "$am_testauxdir"/tap-setup.sh || fatal_ "sourcing tap-setup.sh"
+. tap-setup.sh
 
 echo 'XFAIL_TESTS = $(TESTS)' >> Makefile
 
@@ -36,9 +36,7 @@ not ok 6 # SKIP
 Bail out!
 END
 
-$MAKE check >stdout && { cat stdout; Exit 1; }
-cat stdout
-
+run_make -O -e FAIL check
 count_test_results total=7 pass=0 fail=0 xpass=2 xfail=3 skip=1 error=1
 
 grep '^XPASS: all\.test 1$' stdout
@@ -59,9 +57,7 @@ ok 2 # SKIP
 not ok 3 # TODO
 END
 
-$MAKE check >stdout || { cat stdout; Exit 1; }
-cat stdout
-
+run_make -O check
 count_test_results total=3 pass=0 fail=0 xpass=0 xfail=2 skip=1 error=0
 
 :
old mode 100755 (executable)
new mode 100644 (file)
similarity index 80%
rename from t/tar3.sh
rename to t/tar-opts-errors.sh
index 403ce99..1217080
--- a/t/tar3.sh
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2004-2012 Free Software Foundation, Inc.
+# Copyright (C) 2004-2017 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
 
 # Check the tar options diagnostics.
 
-. ./defs || Exit 1
+. test-init.sh
 
-cat > configure.ac << 'END'
-AC_INIT([tar2], [1.0])
+cat > configure.ac <<END
+AC_INIT([$me], [1.0])
 AM_INIT_AUTOMAKE([tar-pax tar-v7])
 AC_CONFIG_FILES([Makefile])
 AC_OUTPUT
@@ -31,14 +31,14 @@ $ACLOCAL
 AUTOMAKE_fails
 grep "^configure\.ac:2:.*mutually exclusive" stderr > tar-err
 cat tar-err
-test 1 = `wc -l < tar-err`
+test 1 -eq $(wc -l < tar-err)
 grep "'tar-pax'" tar-err
 grep "'tar-v7'"  tar-err
 
 rm -rf autom4te.cache
 
-cat > configure.ac << 'END'
-AC_INIT([tar2], [1.0])
+cat > configure.ac <<END
+AC_INIT([$me], [1.0])
 AM_INIT_AUTOMAKE
 AC_CONFIG_FILES([Makefile])
 AC_OUTPUT
@@ -47,6 +47,6 @@ END
 echo 'AUTOMAKE_OPTIONS = tar-pax' > Makefile.am
 
 AUTOMAKE_fails
-grep '^Makefile\.am:1:.*tar-pax.*AM_INIT_AUTOMAKE' stderr
+grep "^Makefile\.am:1:.*'tar-pax'.*AM_INIT_AUTOMAKE" stderr
 
 :
old mode 100755 (executable)
new mode 100644 (file)
index 641ce86..4c38f16
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2011-2012 Free Software Foundation, Inc.
+# Copyright (C) 2011-2017 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
 
 # Check that the user can override the tar program used by "make dist"
 # at runtime, by redefining the 'TAR' environment variable.
-# FIXME: currently this works only when the tar format used is 'v7'
-# FIXME: (which is the default one).
+# NOTE: currently this works only when the tar format used is 'v7'
+#       (which is the default one).
 
-. ./defs || Exit 1
+. test-init.sh
 
-cwd=`pwd` || fatal_ "couldn't get current working directory"
+cwd=$(pwd) || fatal_ "getting current working directory"
 
 echo AC_OUTPUT >> configure.ac
 
@@ -35,6 +35,7 @@ chmod a+x am--tar
 
 cat > Makefile.am <<'END'
 check-local: dist
+       ls -l ;: For debugging.
        test -f am--tar-has-run
 CLEANFILES = am--tar-has-run
 END
@@ -44,22 +45,24 @@ $AUTOCONF
 $AUTOMAKE
 ./configure
 
+clean_temp () { rm -f *.tar.* *has-run*; }
+
 $MAKE dist
-test -f $me-1.0.tar.gz
-ls | grep has-run && Exit 1
+test -f $distdir.tar.gz
+ls | grep has-run && exit 1
 
-rm -f *.tar.* *has-run*
+clean_temp
 
 TAR="$cwd/am--tar foo" $MAKE distcheck
-test -f $me-1.0.tar.gz
-test "`cat am--tar-has-run`" = foo
+test -f $distdir.tar.gz
+test "$(cat am--tar-has-run)" = foo
 
-rm -f *.tar.* *has-run*
+clean_temp
 
-TAR=; unset TAR
+unset TAR
 # Creative use of eval to pacify maintainer checks.
 eval \$'MAKE dist "TAR=./am--tar mu"'
-test -f $me-1.0.tar.gz
-test "`cat am--tar-has-run`" = mu
+test -f $distdir.tar.gz
+test "$(cat am--tar-has-run)" = mu
 
 :
old mode 100755 (executable)
new mode 100644 (file)
similarity index 78%
rename from t/tar2.sh
rename to t/tar-pax.sh
index f9cc000..480e23d
--- a/t/tar2.sh
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2004-2012 Free Software Foundation, Inc.
+# Copyright (C) 2004-2017 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
 
 # Check the tar-pax option.
 
-. ./defs || Exit 1
+. test-init.sh
 
-cat > configure.ac << 'END'
-AC_INIT([tar2], [1.0])
+cat > configure.ac <<END
+AC_INIT([$me], [1.0])
 AM_INIT_AUTOMAKE([tar-pax])
 AC_CONFIG_FILES([Makefile])
 AC_OUTPUT
@@ -32,9 +32,12 @@ $AUTOCONF
 $AUTOMAKE
 ./configure
 
-if grep 'am__tar.*false' Makefile; then
+grep 'am__tar' Makefile # For debugging.
+if grep '^am__tar = false' Makefile; then
   skip_ "cannot find proper archiver program"
 fi
 
 $MAKE distcheck
-test -f tar2-1.0.tar.gz
+test -f "$distdir.tar.gz"
+
+:
diff --git a/t/tar-ustar-id-too-high.sh b/t/tar-ustar-id-too-high.sh
new file mode 100644 (file)
index 0000000..fdb4d72
--- /dev/null
@@ -0,0 +1,88 @@
+#! /bin/sh
+# Copyright (C) 2013-2017 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 UID or GID too high for the ustar format are correctly
+# rwcognized and diagnosed by configure.  See bug#8343 and bug#13588.
+
+. test-init.sh
+
+cat > configure.ac <<END
+AC_INIT([$me], [1.0])
+AM_INIT_AUTOMAKE([tar-ustar])
+AC_CONFIG_FILES([Makefile])
+AC_OUTPUT
+END
+
+: > Makefile.am
+
+run_configure()
+{
+  st=0; ./configure ${1+"$@"}  >stdout || st=$?
+  cat stdout || exit 1
+  test $st -eq 0 || exit 1
+}
+
+checked ()
+{
+  grep "^checking $1\.\.\. $2$" stdout
+}
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE
+
+mkdir bin
+cat > bin/id <<'END'
+#!/bin/sh -e
+case "$*" in
+  -u) echo "${am_uid-1000}";;
+  -g) echo "${am_gid-1000}";;
+   *) echo "id: bad/unexpected usage" >&2; exit 1;;
+esac
+END
+chmod a+x bin/id
+
+PATH=$(pwd)/bin$PATH_SEPARATOR$PATH
+
+# Problematic ID reported in
+# <https://bugzilla.redhat.com/show_bug.cgi?id=843376>.
+am_uid=16777216; export am_uid
+am_gid=1000;     export am_gid
+run_configure
+checked "whether UID '$am_uid' is supported by ustar format" "no"
+checked "whether GID '1000' is supported by ustar format" "yes"
+checked "how to create a ustar tar archive" "none"
+
+# Another problematic ID reported in
+# <https://bugzilla.redhat.com/show_bug.cgi?id=843376>.
+am_uid=1000;     export am_uid
+am_gid=17000000; export am_gid
+run_configure
+checked "whether UID '1000' is supported by ustar format" "yes"
+checked "whether GID '$am_gid' is supported by ustar format" "no"
+checked "how to create a ustar tar archive" "none"
+
+# The minimal ID that is too big.
+two_to_twentyone=$((32 * 32 * 32 * 32 * 2))
+# <https://bugzilla.redhat.com/show_bug.cgi?id=843376>.
+am_uid=$two_to_twentyone; export am_uid
+am_gid=$two_to_twentyone; export am_gid
+run_configure
+checked "whether UID '$two_to_twentyone' is supported by ustar format" "no"
+checked "whether GID '$two_to_twentyone' is supported by ustar format" "no"
+checked "how to create a ustar tar archive" "none"
+
+:
old mode 100755 (executable)
new mode 100644 (file)
similarity index 78%
rename from t/tar.sh
rename to t/tar-ustar.sh
index 263049a..a907422
--- a/t/tar.sh
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2004-2012 Free Software Foundation, Inc.
+# Copyright (C) 2004-2017 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
 
 # Check the tar-ustar option.
 
-. ./defs || Exit 1
+. test-init.sh
 
-cat > configure.ac << 'END'
-AC_INIT([tar], [1.0])
+cat > configure.ac <<END
+AC_INIT([$me], [1.0])
 AM_INIT_AUTOMAKE([tar-ustar])
 AC_CONFIG_FILES([Makefile])
 AC_OUTPUT
@@ -32,9 +32,12 @@ $AUTOCONF
 $AUTOMAKE
 ./configure
 
-if grep 'am__tar.*false' Makefile; then
+grep 'am__tar' Makefile # For debugging.
+if grep '^am__tar = false' Makefile; then
   skip_ "cannot find proper archiver program"
 fi
 
 $MAKE distcheck
-test -f tar-1.0.tar.gz
+test -f "$distdir.tar.gz"
+
+:
old mode 100755 (executable)
new mode 100644 (file)
index ad0e94d..30435bd
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2000-2012 Free Software Foundation, Inc.
+# Copyright (C) 2000-2017 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
 # Assar Westerlund <assar@sics.se>
 
 required=cc
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_CC
-AM_PROG_CC_C_O
 AC_OUTPUT
 END
 
@@ -60,7 +59,7 @@ mkdir build
 cd build
 ../configure
 $MAKE
-if cross_compiling; then :; else
+if ! cross_compiling; then
   ./foo
   ./bar
 fi
@@ -68,7 +67,7 @@ cd ..
 
 ./configure
 $MAKE
-if cross_compiling; then :; else
+if ! cross_compiling; then
   ./foo
   ./bar
 fi
old mode 100755 (executable)
new mode 100644 (file)
index 43e227d..dea1956
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2002-2012 Free Software Foundation, Inc.
+# Copyright (C) 2002-2017 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
@@ -16,7 +16,7 @@
 
 # Check that target clashes are diagnosed.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_CC
old mode 100755 (executable)
new mode 100644 (file)
index e384ac7..ccc07ad
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2011-2012 Free Software Foundation, Inc.
+# Copyright (C) 2011-2017 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
 # parallel-tests:
 #  - LOG_DRIVER variables can be AC_SUBST'd
 
-. ./defs || Exit 1
+. test-init.sh
 
 mkdir test-drivers
 
-cp "$am_testauxdir"/trivial-test-driver test-drivers/triv \
+cp "$am_testaux_srcdir"/trivial-test-driver test-drivers/triv \
   || fatal_ "failed to fetch auxiliary script trivial-test-driver"
 cp "$am_scriptdir"/test-driver test-drivers/dflt \
   || fatal_ "failed to fetch auxiliary script test-driver"
@@ -59,7 +59,7 @@ $AUTOCONF
 cat > foo <<'END'
 #!/bin/sh
 echo "PASS: from $0"
-exit 1 # Exit status should be ignored by the trivial-test-driver.
+exit 1 # exit status should be ignored by the trivial-test-driver.
 END
 
 cat > bar.test <<'END'
@@ -75,13 +75,12 @@ END
 chmod a+x foo bar.test baz.sh
 
 $MAKE check-autodefs
-st=0; $MAKE check >stdout || st=$?
-cat stdout
+run_make -O -e IGNORE check
 cat test-suite.log
 cat foo.log
 cat bar.log
 cat baz.log
-test $st -eq 0 || Exit 1
+test $am_make_rc -eq 0
 count_test_results total=3 pass=1 fail=0 skip=1 xfail=1 xpass=0 error=0
 
 :
old mode 100755 (executable)
new mode 100644 (file)
index 5538105..35cefba
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2011-2012 Free Software Foundation, Inc.
+# Copyright (C) 2011-2017 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
 #   - Automake can correctly handle conditionals contents for the
 #     LOG_DRIVER variables.
 
-. ./defs || Exit 1
+. test-init.sh
 
-cp "$am_testauxdir"/trivial-test-driver . \
+cp "$am_testaux_srcdir"/trivial-test-driver . \
   || fatal_ "failed to fetch auxiliary script trivial-test-driver"
-cp "$am_scriptdir"/tap-driver.pl . \
-  || fatal_ "failed to fetch auxiliary script tap-driver.pl"
+cp "$am_scriptdir"/tap-driver.sh . \
+  || fatal_ "failed to fetch auxiliary script tap-driver.sh"
 
 cat >> configure.ac << END
 AM_CONDITIONAL([COND1], [:])
@@ -40,7 +40,7 @@ $AUTOCONF
 
 cat > Makefile.am << 'END'
 TESTS = foo bar.test baz.sh
-EXTRA_DIST = $(TESTS) tap-driver.pl trivial-test-driver
+EXTRA_DIST = $(TESTS) tap-driver.sh trivial-test-driver
 TEST_EXTENSIONS = .test .sh
 LOG_DRIVER =
 SH_LOG_DRIVER = $(tap_rulez)
@@ -49,7 +49,7 @@ LOG_DRIVER += @my_LOG_DRIVER@
 if COND2
 tap_rulez = false
 else !COND2
-tap_rulez = $(PERL) $(srcdir)/tap-driver.pl
+tap_rulez = $(PERL) $(srcdir)/tap-driver.sh
 endif !COND2
 endif COND1
 END
@@ -58,7 +58,7 @@ cat > foo <<'END'
 #!/bin/sh
 echo "PASS: from $0"
 echo "SKIP: from $0"
-exit 1 # Exit status should be ignored by the trivial-test-driver.
+exit 1 # exit status should be ignored by the trivial-test-driver.
 END
 
 cat > bar.test <<'END'
@@ -79,7 +79,7 @@ chmod a+x foo bar.test baz.sh
 $AUTOMAKE -a
 test -f test-driver
 
-grep DRIVER Makefile.in || Exit 99 # For debugging.
+grep DRIVER Makefile.in || exit 99 # For debugging.
 
 grep '^my_LOG_DRIVER *=' Makefile.in \
   && fatal_ 'unexpected $(my_LOG_DRIVER) in Makefile.in'
@@ -102,17 +102,15 @@ do_count ()
   $EGREP 'XFAIL: baz\.sh 3( |$)' stdout
 }
 
-st=0; $MAKE check >stdout || st=$?
-cat stdout
+run_make -O -e IGNORE check
 cat test-suite.log
 cat foo.log
 cat bar.log
 cat baz.log
-test $st -eq 0 || Exit 1
+test $am_make_rc -eq 0 || exit 1
 do_count
 
-$MAKE distcheck >stdout || { cat stdout; Exit 1; }
-cat stdout
+run_make -O distcheck
 do_count
 
 :
old mode 100755 (executable)
new mode 100644 (file)
index dc8e681..882ad27
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2011-2012 Free Software Foundation, Inc.
+# Copyright (C) 2011-2017 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
@@ -18,7 +18,7 @@
 # e.g., 'sub/foo.log'), the Automake test harness must ensure that
 # directory exists before calling any custom test driver.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_OUTPUT
@@ -44,8 +44,8 @@ check-local: $(TEST_SUITE_LOG)
        test -f sub1/baz.trs
 END
 
-cat > checkdir-driver <<'END'
-#! /bin/sh
+echo "#!$AM_TEST_RUNNER_SHELL" > checkdir-driver
+cat >> checkdir-driver <<'END'
 set -e; set -u
 while test $# -gt 0; do
   case $1 in
@@ -60,8 +60,8 @@ done
 echo "log: $log_file" # For debugging.
 echo "trs: $trs_file" # Ditto.
 case $log_file in */*);; *) exit 1;; esac
-dir_log=`expr "$log_file" : '\(.*\)/[^/]*'`
-dir_trs=`expr "$trs_file" : '\(.*\)/[^/]*'`
+dir_log=${log_file%/*}
+dir_trs=${trs_file%/*}
 echo "dir_log: $dir_log" # For debugging.
 echo "dir_trs: $dir_trs" # Likewise.
 test x"$dir_trs" = x"$dir_log" || exit 1
old mode 100755 (executable)
new mode 100644 (file)
index a42e0d0..aa7abed
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2011-2012 Free Software Foundation, Inc.
+# Copyright (C) 2011-2017 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
 # that allow multiple testcases in a single test script.  This test not
 # only checks implementation details in Automake's custom test drivers
 # support, but also serves as a "usability test" for our APIs.
-# See also related tests 'test-driver-custom-multitest-recheck2.test'
-# and 'parallel-tests-recheck-override.test'.
-# Keep in sync with 'tap-recheck.test'.
+# See also related tests 'test-driver-custom-multitest-recheck2.sh'
+# and 'parallel-tests-recheck-override.sh'.
+# Keep in sync with 'tap-recheck.sh'.
 
-. ./defs || Exit 1
+. test-init.sh
 
-cp "$am_testauxdir"/trivial-test-driver . \
+cp "$am_testaux_srcdir"/trivial-test-driver . \
   || fatal_ "failed to fetch auxiliary script trivial-test-driver"
 
 cat >> configure.ac << 'END'
@@ -86,13 +86,13 @@ $AUTOMAKE
 do_recheck ()
 {
   case $* in
-    --fail) on_bad_rc='&&';;
-    --pass) on_bad_rc='||';;
+    --fail) status=FAIL;;
+    --pass) status=0;;
          *) fatal_ "invalid usage of function 'do_recheck'";;
   esac
   rm -f *.run
-  eval "\$MAKE recheck >stdout $on_bad_rc { cat stdout; ls -l; Exit 1; }; :"
-  cat stdout; ls -l
+  run_make -O -e $status recheck || { ls -l; exit 1; }
+  ls -l
 }
 
 for vpath in : false; do
@@ -107,21 +107,21 @@ for vpath in : false; do
   $srcdir/configure
 
   : A "make recheck" in a clean tree should run no tests.
+  using_gmake || $sleep # Required by BSD make.
   do_recheck --pass
   cat test-suite.log
-  test ! -r a.run
-  test ! -r a.log
-  test ! -r b.run
-  test ! -r b.log
-  test ! -r c.run
-  test ! -r c.log
-  test ! -r d.run
-  test ! -r d.log
+  test ! -e a.run
+  test ! -e a.log
+  test ! -e b.run
+  test ! -e b.log
+  test ! -e c.run
+  test ! -e c.log
+  test ! -e d.run
+  test ! -e d.log
   count_test_results total=0 pass=0 fail=0 xpass=0 xfail=0 skip=0 error=0
 
   : Run the tests for the first time.
-  $MAKE check >stdout && { cat stdout; Exit 1; }
-  cat stdout
+  run_make -O -e FAIL check
   ls -l
   # All the test scripts should have run.
   test -f a.run
@@ -131,45 +131,50 @@ for vpath in : false; do
   count_test_results total=9 pass=3 fail=2 xpass=1 xfail=1 skip=1 error=1
 
   : Let us make b.test pass.
+  using_gmake || $sleep # Required by BSD make.
   echo OK > b.ok
   do_recheck --fail
   # a.test has been successful the first time, so no need to re-run it.
   # Similar considerations apply to similar checks, below.
-  test ! -r a.run
+  test ! -e a.run
   test -f b.run
   test -f c.run
   test -f d.run
   count_test_results total=7 pass=2 fail=2 xpass=1 xfail=1 skip=1 error=0
 
   : Let us make the first part of c.test pass.
+  using_gmake || $sleep # Required by BSD make.
   echo OK > c.pass
   do_recheck --fail
-  test ! -r a.run
-  test ! -r b.run
+  test ! -e a.run
+  test ! -e b.run
   test -f c.run
   test -f d.run
   count_test_results total=5 pass=1 fail=1 xpass=1 xfail=1 skip=1 error=0
 
   : Let us make also the second part of c.test pass.
+  using_gmake || $sleep # Required by BSD make.
   echo KO > c.xfail
   do_recheck --fail
-  test ! -r a.run
-  test ! -r b.run
+  test ! -e a.run
+  test ! -e b.run
   test -f c.run
   test -f d.run
   count_test_results total=5 pass=1 fail=1 xpass=0 xfail=2 skip=1 error=0
 
   : Nothing changed, so only d.test should be run.
   for i in 1 2; do
+    using_gmake || $sleep # Required by BSD make.
     do_recheck --fail
-    test ! -r a.run
-    test ! -r b.run
-    test ! -r c.run
+    test ! -e a.run
+    test ! -e b.run
+    test ! -e c.run
     test -f d.run
     count_test_results total=2 pass=0 fail=1 xpass=0 xfail=0 skip=1 error=0
   done
 
   : Let us make d.test run more testcases, and experience _more_ failures.
+  using_gmake || $sleep # Required by BSD make.
   unindent > d.extra <<'END'
     echo SKIP: s
     echo FAIL: f 1
@@ -183,27 +188,29 @@ for vpath in : false; do
     echo ERROR: e 2
 END
   do_recheck --fail
-  test ! -r a.run
-  test ! -r b.run
-  test ! -r c.run
+  test ! -e a.run
+  test ! -e b.run
+  test ! -e c.run
   test -f d.run
   count_test_results total=11 pass=2 fail=4 xpass=1 xfail=0 skip=2 error=2
 
   : Let us finally make d.test pass.
+  using_gmake || $sleep # Required by BSD make.
   echo : > d.extra
   do_recheck --pass
-  test ! -r a.run
-  test ! -r b.run
-  test ! -r c.run
+  test ! -e a.run
+  test ! -e b.run
+  test ! -e c.run
   test -f d.run
   count_test_results total=1 pass=0 fail=0 xpass=0 xfail=0 skip=1 error=0
 
   : All tests have been successful or skipped, nothing should be re-run.
+  using_gmake || $sleep # Required by BSD make.
   do_recheck --pass
-  test ! -r a.run
-  test ! -r b.run
-  test ! -r c.run
-  test ! -r d.run
+  test ! -e a.run
+  test ! -e b.run
+  test ! -e c.run
+  test ! -e d.run
   count_test_results total=0 pass=0 fail=0 xpass=0 xfail=0 skip=0 error=0
 
   cd $srcdir
old mode 100755 (executable)
new mode 100644 (file)
index 5ceb339..e94d96a
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2011-2012 Free Software Foundation, Inc.
+# Copyright (C) 2011-2017 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
 # 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'.
+# See also related tests 'test-driver-custom-multitest-recheck.sh' and
+# 'parallel-tests-recheck-override.sh'.
 
-. ./defs || Exit 1
+. test-init.sh
 
-cp "$am_testauxdir"/trivial-test-driver . \
+cp "$am_testaux_srcdir"/trivial-test-driver . \
   || fatal_ "failed to fetch auxiliary script trivial-test-driver"
 
 cat >> configure.ac << 'END'
@@ -83,8 +83,7 @@ for vpath in : false; do
   $srcdir/configure
 
   : Run the tests for the first time.
-  $MAKE check >stdout && { cat stdout; Exit 1; }
-  cat stdout
+  run_make -O -e FAIL check
   # All the test scripts should have run.
   test -f a.run
   test -f b.run
@@ -95,64 +94,55 @@ for vpath in : false; do
 
   : 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
+    run_make -O "$var=" recheck
     count_test_results total=0 pass=0 fail=0 xpass=0 xfail=0 skip=0 error=0
-    test ! -r a.run
-    test ! -r b.run
-    test ! -r c.run
+    test ! -e a.run
+    test ! -e b.run
+    test ! -e c.run
   done
   unset var
 
   : a.test was successful the first time, no need to re-run it.
-  env TESTS=a.test $MAKE -e recheck >stdout \
-    || { cat stdout; Exit 1; }
-  cat stdout
+  using_gmake || $sleep # Required by BSD make.
+  run_make -O TESTS=a.test recheck
   count_test_results total=0 pass=0 fail=0 xpass=0 xfail=0 skip=0 error=0
-  test ! -r a.run
-  test ! -r b.run
-  test ! -r c.run
+  test ! -e a.run
+  test ! -e b.run
+  test ! -e c.run
 
   : b.test failed, it should be re-run.  And make it pass this time.
+  using_gmake || $sleep # Required by BSD make.
   echo OK > b.ok
-  TEST_LOGS=b.log $MAKE -e recheck >stdout \
-    || { cat stdout; Exit 1; }
-  cat stdout
-  test ! -r a.run
+  run_make -O TEST_LOGS=b.log recheck
+  test ! -e a.run
   test -f b.run
-  test ! -r c.run
+  test ! -e c.run
   count_test_results total=2 pass=0 fail=0 xpass=0 xfail=1 skip=1 error=0
 
   rm -f *.run
 
   : No need to re-run a.test or b.test anymore.
-  TEST_LOGS=b.log $MAKE -e recheck >stdout \
-    || { cat stdout; Exit 1; }
-  cat stdout
+  using_gmake || $sleep # Required by BSD make.
+  run_make -O TEST_LOGS=b.log recheck
   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
-  TESTS='a.test b.test' $MAKE -e recheck >stdout \
-    || { cat stdout; Exit 1; }
-  cat stdout
+  test ! -e a.run
+  test ! -e b.run
+  test ! -e c.run
+  using_gmake || $sleep # Required by BSD make.
+  run_make -O TESTS='a.test b.test' recheck
   count_test_results total=0 pass=0 fail=0 xpass=0 xfail=0 skip=0 error=0
-  test ! -r a.run
-  test ! -r b.run
-  test ! -r c.run
+  test ! -e a.run
+  test ! -e b.run
+  test ! -e c.run
 
   : No need to re-run a.test anymore, but c.test should be rerun,
   : as it contained an XPASS.  And this time, make it fail with
   : an hard error.
-  # Use 'echo' here, since Solaris 10 /bin/sh would try to optimize
-  # a ':' away after the first iteration, even if it is redirected.
   echo dummy > c.err
-  env TEST_LOGS='a.log c.log' $MAKE -e recheck >stdout \
-    && { cat stdout; Exit 1; }
-  cat stdout
+  run_make -e FAIL -O TEST_LOGS='a.log c.log' recheck
   count_test_results total=1 pass=0 fail=0 xpass=0 xfail=0 skip=0 error=1
-  test ! -r a.run
-  test ! -r b.run
+  test ! -e a.run
+  test ! -e b.run
   test -f c.run
 
   rm -f *.run *.err
@@ -160,25 +150,24 @@ for vpath in : false; do
   : c.test contained and hard error the last time, so it should be re-run.
   : This time, make it pass
   # Use 'echo', not ':'; see comments above for why.
+  using_gmake || $sleep # Required by BSD make.
   echo dummy > c.ok
-  env TESTS='c.test a.test' $MAKE -e recheck >stdout \
-    || { cat stdout; Exit 1; }
-  cat stdout
+  run_make -O TESTS='c.test a.test' recheck
   count_test_results total=1 pass=1 fail=0 xpass=0 xfail=0 skip=0 error=0
-  test ! -r a.run
-  test ! -r b.run
+  test ! -e a.run
+  test ! -e b.run
   test -f c.run
 
   rm -f *.run *.err *.ok
 
   : Nothing should be rerun anymore, as all tests have been eventually
   : successful.
-  $MAKE recheck >stdout || { cat stdout; Exit 1; }
-  cat stdout
+  using_gmake || $sleep # Required by BSD make.
+  run_make -O recheck
   count_test_results total=0 pass=0 fail=0 xpass=0 xfail=0 skip=0 error=0
-  test ! -r a.run
-  test ! -r b.run
-  test ! -r c.run
+  test ! -e a.run
+  test ! -e b.run
+  test ! -e c.run
 
   cd $srcdir
 
old mode 100755 (executable)
new mode 100644 (file)
index c660ec2..7e20175
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2011-2012 Free Software Foundation, Inc.
+# Copyright (C) 2011-2017 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
@@ -19,9 +19,9 @@
 # only checks implementation details in Automake's custom test drivers
 # support, but also serves as a "usability test" for our APIs.
 
-. ./defs || Exit 1
+. test-init.sh
 
-cp "$am_testauxdir"/trivial-test-driver . \
+cp "$am_testaux_srcdir"/trivial-test-driver . \
   || fatal_ "failed to fetch auxiliary script trivial-test-driver"
 
 cat >> configure.ac << 'END'
@@ -119,14 +119,13 @@ for vpath in : false; do
 
   $srcdir/configure
 
-  $MAKE check >stdout && { cat stdout; cat test-suite.log; Exit 1; }
-  cat stdout
+  run_make -O -e FAIL check || { cat test-suite.log; exit 1; }
   cat test-suite.log
   # Couple of sanity checks.  These might need to be updated if the
   # 'trivial-test-driver' script is changed.
-  $FGREP INVALID.NAME stdout test-suite.log && Exit 1
-  test -f BAD.LOG && Exit 1
-  test -f BAD.TRS && Exit 1
+  $FGREP INVALID.NAME stdout test-suite.log && exit 1
+  test -f BAD.LOG && exit 1
+  test -f BAD.TRS && exit 1
   # These log files must all have been created by the testsuite.
   cat pass.log
   cat fail.log
@@ -156,12 +155,10 @@ for vpath in : false; do
   grep '%% fail2 %%' test-suite.log
   grep '%% pass-fail %%' test-suite.log
   grep '%% pass-xpass-fail-xfail-skip-error %%' test-suite.log
-  test `grep -c '%% ' test-suite.log` -eq 4
+  test $(grep -c '%% ' test-suite.log) -eq 4
 
-  TESTS='pass.t pass3-skip2-xfail.t' $MAKE -e check >stdout \
-    || { cat stdout; cat test-suite.log; Exit 1; }
+  run_make -O TESTS='pass.t pass3-skip2-xfail.t' check
   cat test-suite.log
-  cat stdout
   count_test_results total=7 pass=4 fail=0 skip=2 xfail=1 xpass=0 error=0
 
   cd $srcdir
old mode 100755 (executable)
new mode 100644 (file)
index 4d7367d..3212d4b
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2011-2012 Free Software Foundation, Inc.
+# Copyright (C) 2011-2017 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
@@ -18,7 +18,7 @@
 # installed or referenced if it's not used, i.e., if the user has
 # defined his own '*LOG_DRIVER' variables.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac <<'END'
 AC_PROG_CC
@@ -55,8 +55,8 @@ $ACLOCAL
 
 for opts in '' '--add-missing' '-a -c'; do
   $AUTOMAKE $opts
-  $FGREP test-driver Makefile.in sub[12]/Makefile.in && Exit 1
-  find . | $FGREP test-driver && Exit 1
+  $FGREP test-driver Makefile.in sub[12]/Makefile.in && exit 1
+  find . | $FGREP test-driver && exit 1
   : For shells with busted 'set -e'.
 done
 
old mode 100755 (executable)
new mode 100644 (file)
index 14568c0..22d9809
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2011-2012 Free Software Foundation, Inc.
+# Copyright (C) 2011-2017 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
@@ -16,7 +16,7 @@
 
 # Custom test drivers: "abstract" XFAIL_TESTS support.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac <<'END'
 AC_SUBST([nihil], [])
@@ -141,20 +141,18 @@ $AUTOMAKE
 
 ./configure
 
-$MAKE check >stdout || { cat stdout; Exit 1; }
-cat stdout
-test `grep -c '^PASS:'  stdout` -eq 3
-test `grep -c '^XFAIL:' stdout` -eq 13
+run_make -O check
+test $(grep -c '^PASS:'  stdout) -eq 3
+test $(grep -c '^XFAIL:' stdout) -eq 13
 
 for dir in sub1 sub2; do
   cd $dir
   cp pass.test x1.test
   cp x2.test pass.test
-  $MAKE check >stdout && { cat stdout; Exit 1; }
-  cat stdout
-  test "`cat pass.trs`" = ":test-result: FAIL"
-  test "`cat x1.trs`"   = ":test-result: XPASS"
-  test "`cat x2.trs`"   = ":test-result: XFAIL"
+  run_make -O -e FAIL check
+  test "$(cat pass.trs)" = ":test-result: FAIL"
+  test "$(cat x1.trs)"   = ":test-result: XPASS"
+  test "$(cat x2.trs)"   = ":test-result: XFAIL"
   grep '^FAIL: pass\.test$' stdout
   grep '^XPASS: x1\.test$'  stdout
   grep '^XFAIL: x2\.test$'  stdout
old mode 100755 (executable)
new mode 100644 (file)
index ce4a7fc..84f65d1
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2011-2012 Free Software Foundation, Inc.
+# Copyright (C) 2011-2017 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
@@ -16,7 +16,7 @@
 
 # Custom test drivers: per-extension test drivers.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_OUTPUT
@@ -41,7 +41,7 @@ LOG_DRIVER_FLAGS = _
 END
 
 mkdir sub bin
-PATH=`pwd`/bin$PATH_SEPARATOR$PATH; export PATH
+PATH=$(pwd)/bin$PATH_SEPARATOR$PATH; export PATH
 
 cat > wrapper.skel <<'END'
 #! /bin/sh
@@ -124,8 +124,8 @@ $MAKE
 VERBOSE=yes $MAKE check
 ls -l . sub
 
-test ! -r BAD.log
-test ! -r BAD.trs
+test ! -e BAD.log
+test ! -e BAD.trs
 
 echo 'chk-wrapper 1.chk --am-chk --chk' > 1.exp
 echo 'test-wrapper 2.test -am-test -test' > 2.exp
@@ -140,4 +140,4 @@ for x in 1 2 3 4.c 5.suf sub/test; do
   diff $x.exp $x.log || st=1
 done
 
-Exit $st
+exit $st
old mode 100755 (executable)
new mode 100644 (file)
index 75f6a87..db34f50
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2011-2012 Free Software Foundation, Inc.
+# Copyright (C) 2011-2017 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
@@ -22,7 +22,7 @@
 # (like our dummy one in this test) might leave around a test log even
 # in case of internal failures.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac <<'END'
 AC_OUTPUT
@@ -45,8 +45,8 @@ $AUTOMAKE
 ./configure
 
 # The testsuite driver does not exist.
-$MAKE check && Exit 1
-test ! -f test-suite.log
+$MAKE check && exit 1
+test ! -e test-suite.log
 
 # The testsuite driver exists and create the test log files, but fails.
 
@@ -58,7 +58,7 @@ exit 1
 END
 chmod a+x oops
 
-$MAKE check && Exit 1
-test ! -f test-suite.log
+$MAKE check && exit 1
+test ! -e test-suite.log
 
 :
old mode 100755 (executable)
new mode 100644 (file)
index 9b2f08b..c6817dd
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2011-2012 Free Software Foundation, Inc.
+# Copyright (C) 2011-2017 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
 #    defined in a subdir Makefile
 
 am_create_testdir=empty
-. ./defs || Exit 1
+. test-init.sh
 
-ocwd=`pwd` || fatal_ "getting current working directory"
+ocwd=$(pwd) || fatal_ "getting current working directory"
 
-do_check ()
-{
-  whereopts=$1 auxdir=$2
-  case $#,$whereopts in
-    2,ac) ac_opts=parallel-tests am_code= ;;
-    2,am) am_opts=parallel-tests ac_code= ;;
-       *) fatal_ "do_check: bad usage";;
-  esac
-  mkdir $whereopts
-  cd $whereopts
+for i in 1 2; do
+  mkdir D$i
+  cd D$i
+  if test $i -eq 1; then
+    auxdir=.
+    test_driver=test-driver
+  else
+    auxdir=build-aux
+    test_driver=$auxdir/test-driver
+    mkdir $auxdir
+  fi
   mkdir tests
   unindent > configure.ac << END
     AC_INIT([$me], [1.0])
     AC_CONFIG_AUX_DIR([$auxdir])
-    AM_INIT_AUTOMAKE([$ac_opts])
+    AM_INIT_AUTOMAKE
     AC_CONFIG_FILES([Makefile tests/Makefile])
     AC_OUTPUT
 END
-  if test $auxdir = .; then
-    test_driver=test-driver
-  else
-    mkdir $auxdir
-    test_driver=$auxdir/test-driver
-  fi
-  # No 'AUTOMAKE_OPTIONS' in here -- purposely.
   unindent > Makefile.am << END
     SUBDIRS = tests
     check-local: test-top
@@ -57,7 +51,6 @@ END
     .PHONY: test-top
 END
   unindent > tests/Makefile.am << END
-    AUTOMAKE_OPTIONS = $am_opts
     check-local: test-sub
     test-sub:
        echo ' ' \$(DIST_COMMON) ' ' | grep '[ /]$test_driver '
@@ -84,10 +77,7 @@ END
   $AUTOMAKE
   diff Makefile.in Makefile.sav
   diff tests/Makefile.in tests/Makefile.sav
-  :
-}
-
-do_check ac .
-do_check am build-aux
+  cd "$ocwd" || fatal_ "cannot chdir back to '$ocwd'"
+done
 
 :
old mode 100755 (executable)
new mode 100644 (file)
index 0f51c3e..27d2e13
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2011-2012 Free Software Foundation, Inc.
+# Copyright (C) 2011-2017 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
@@ -17,9 +17,9 @@
 # Custom test drivers: check that the test name passed to the test
 # driver has any VPATH prefix stripped.
 
-. ./defs || Exit 1
+. test-init.sh
 
-ocwd=`pwd` || fatal_ "cannot get current working directory"
+ocwd=$(pwd) || fatal_ "cannot get current working directory"
 
 mkdir src build
 mv install-sh missing configure.ac src
old mode 100755 (executable)
new mode 100644 (file)
index 801300b..ad190d2
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2011-2012 Free Software Foundation, Inc.
+# Copyright (C) 2011-2017 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
@@ -20,7 +20,7 @@
 #  - .test if $(TEST_EXTENSIONS) is not defined
 #  - stuff in $(TEST_EXTENSIONS) otherwise
 
-. ./defs || Exit 1
+. test-init.sh
 
 : > Makefile.am
 
old mode 100755 (executable)
new mode 100644 (file)
index e081d79..b64a98a
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2011-2012 Free Software Foundation, Inc.
+# Copyright (C) 2011-2017 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
@@ -16,7 +16,7 @@
 
 # Expose bug in conditional definition of TEST_EXTENSIONS.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AM_CONDITIONAL([COND], [:])
@@ -60,9 +60,9 @@ END
 
 for i in 1 2 3; do
   AUTOMAKE_fails $i
-  lineno=`sed -n 's/^## lineno //p' $i.am` \
+  lineno=$(sed -n 's/^## lineno //p' $i.am) \
     && test 0 -lt "$lineno" \
-    || Exit 99
+    || exit 99
   grep "^$i\\.am:$lineno:.*TEST_EXTENSIONS.*conditional content" stderr
 done
 
old mode 100755 (executable)
new mode 100644 (file)
index fa23481..2f058e7
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2011-2012 Free Software Foundation, Inc.
+# Copyright (C) 2011-2017 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
@@ -18,7 +18,7 @@
 # and do not diagnose valid (albeit more unusual) ones.
 # See automake bug#9400.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac <<'END'
 AC_OUTPUT
@@ -39,7 +39,7 @@ $AUTOMAKE -a
 grep -i 'log' Makefile.in # For debugging.
 
 for lc in $valid_extensions; do
-  uc=`echo $lc | tr '[a-z]' '[A-Z]'`
+  uc=$(echo $lc | tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ)
   $FGREP "\$(${uc}_LOG_COMPILER)" Makefile.in
   grep "^${uc}_LOG_COMPILE =" Makefile.in
   grep "^\.${lc}\.log:" Makefile.in
@@ -57,15 +57,15 @@ END
 
 AUTOMAKE_fails
 for suf in mu .x-y a-b .t.1 .6c .0 .11  @suf@ .@ext@ '.=' '_&_'; do
-  suf2=`printf '%s\n' "$suf" | sed -e 's/\./\\./'`
+  suf2=$(printf '%s\n' "$suf" | sed -e 's/\./\\./')
   $EGREP "^Makefile\.am:2:.*invalid test extension.* $suf2( |$)" stderr
 done
 
 # Verify that we accept valid suffixes, even if intermixed with
 # invalid ones.
-$EGREP '\.(sh|test|t33)' stderr && Exit 1
+$EGREP '\.(sh|test|t33)' stderr && exit 1
 
 # Verify that we don't try to handle invalid suffixes.
-$EGREP '(LOG_COMPILER|non-POSIX var|bad character)' stderr && Exit 1
+$EGREP '(LOG_COMPILER|non-POSIX var|bad character)' stderr && exit 1
 
 :
old mode 100755 (executable)
new mode 100644 (file)
index 0058b6d..82086ac
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2010-2012 Free Software Foundation, Inc.
+# Copyright (C) 2010-2017 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
@@ -17,7 +17,7 @@
 # Check that our concurrent test harness is not subject to spurious VPATH
 # rewrites.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_OUTPUT
@@ -51,7 +51,7 @@ test -f bar.trs
 test -f baz.log
 test -f baz.trs
 # We don't want VPATH rewrites, really.
-$MAKE check -n | $EGREP '\.\./(foo|bar|baz)( |$)' && Exit 1
+$MAKE check -n | $EGREP '\.\./(foo|bar|baz)( |$)' && exit 1
 $MAKE distcheck
 
 :
old mode 100755 (executable)
new mode 100644 (file)
index 0e6065d..aa9a449
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2011-2012 Free Software Foundation, Inc.
+# Copyright (C) 2011-2017 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
@@ -20,9 +20,9 @@
 #  - stdout and stderr of a test script go in its log file
 #  - TEST_SUITE_LOG redefinition, at either automake or make time
 #  - VERBOSE environment variable support
-# Keep in sync with 'tap-log.test'.
+# Keep in sync with 'tap-log.sh'.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac <<END
 AC_OUTPUT
@@ -88,10 +88,10 @@ $AUTOMAKE -a
 
 ./configure
 
-TEST_SUITE_LOG=my.log $MAKE -e check && Exit 1
+run_make -e FAIL TEST_SUITE_LOG=my.log check
 ls -l # For debugging.
-test ! -f test-suite.log
-test ! -f global.log
+test ! -e test-suite.log
+test ! -e global.log
 test -f my.log
 st=0
 for result in pass fail xfail xpass skip error; do
@@ -99,19 +99,19 @@ for result in pass fail xfail xpass skip error; do
   $FGREP "$pmarker $result $pmarker" $result.log || st=1
   $FGREP "$cmarker $result $cmarker" $result.log || st=1
 done
-test $st -eq 0 || Exit 1
+test $st -eq 0 || exit 1
 cat my.log # For debugging.
 for result in xfail fail xpass skip error; do
   cat $result.log # For debugging.
   $FGREP "$pmarker $result $pmarker" my.log || st=1
   $FGREP "$cmarker $result $cmarker" my.log || st=1
 done
-test `$FGREP -c "$pmarker" my.log` -eq 5
-test `$FGREP -c "$cmarker" my.log` -eq 5
+test $($FGREP -c "$pmarker" my.log) -eq 5
+test $($FGREP -c "$cmarker" my.log) -eq 5
 
 have_rst_section ()
 {
-  eqeq=`echo "$1" | sed 's/./=/g'`
+  eqeq=$(echo "$1" | sed 's/./=/g')
   # Assume $1 contains no RE metacharacters.
   sed -n "/^$1$/,/^$eqeq$/p" $2 > got
   (echo "$1" && echo "$eqeq") > exp
@@ -121,7 +121,7 @@ have_rst_section ()
 }
 
 # Passed test scripts shouldn't be mentioned in the global log.
-$EGREP ':.*[^x]pass' my.log && Exit 1
+$EGREP ':.*[^x]pass' my.log && exit 1
 # But failing (expectedly or not) and skipped ones should.
 have_rst_section 'SKIP: skip'   my.log
 have_rst_section 'FAIL: fail'   my.log
@@ -130,15 +130,15 @@ have_rst_section 'XPASS: xpass' my.log
 have_rst_section 'ERROR: error' my.log
 
 touch error2.log test-suite.log global.log
-TEST_SUITE_LOG=my.log $MAKE -e mostlyclean
+run_make TEST_SUITE_LOG=my.log mostlyclean
 ls -l # For debugging.
-test ! -f my.log
-test ! -f pass.log
-test ! -f fail.log
-test ! -f xfail.log
-test ! -f xpass.log
-test ! -f skip.log
-test ! -f error.log
+test ! -e my.log
+test ! -e pass.log
+test ! -e fail.log
+test ! -e xfail.log
+test ! -e xpass.log
+test ! -e skip.log
+test ! -e error.log
 # "make mostlyclean" shouldn't remove unrelated log files.
 test -f error2.log
 test -f test-suite.log
@@ -146,27 +146,26 @@ test -f global.log
 
 rm -f *.log
 
-VERBOSE=yes $MAKE check >stdout && { cat stdout; Exit 1; }
-cat stdout
+run_make -O -e FAIL check VERBOSE=yes
 cat global.log
-test ! -f my.log
-test ! -f test-suite.log
+test ! -e my.log
+test ! -e test-suite.log
 # Check that VERBOSE causes the global testsuite log to be
 # emitted on stdout.
-out=`cat stdout`
-log=`cat global.log`
-case $out in *"$log"*) ;; *) Exit 1;; esac
+out=$(cat stdout)
+log=$(cat global.log)
+case $out in *"$log"*) ;; *) exit 1;; esac
 
 touch error2.log test-suite.log my.log
 $MAKE clean
 ls -l # For debugging.
-test ! -f global.log
-test ! -f pass.log
-test ! -f fail.log
-test ! -f xfail.log
-test ! -f xpass.log
-test ! -f skip.log
-test ! -f error.log
+test ! -e global.log
+test ! -e pass.log
+test ! -e fail.log
+test ! -e xfail.log
+test ! -e xpass.log
+test ! -e skip.log
+test ! -e error.log
 # "make clean" shouldn't remove unrelated log files.
 test -f error2.log
 test -f test-suite.log
old mode 100755 (executable)
new mode 100644 (file)
index 30aefca..50e86fd
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2011-2012 Free Software Foundation, Inc.
+# Copyright (C) 2011-2017 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
@@ -20,7 +20,7 @@
 # different test scripts don't end up sharing the same log file.
 # (Automake itself is such a project, BTW ;-)
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac <<END
 AC_OUTPUT
old mode 100755 (executable)
new mode 100644 (file)
index af435ae..1e56cc3
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2011-2012 Free Software Foundation, Inc.
+# Copyright (C) 2011-2017 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/>.
 
-# Custom test drivers and parallel-tests harness: check the documented
+# Custom test drivers and parallel test harness: check the documented
 # semantics for deciding when the content of a test log file should be
 # copied in the global test-suite.log file.  Currently, this is done
 # with the use of the reStructuredText field ':copy-in-global-log:' in
 # the associated '.trs' files.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_OUTPUT
@@ -141,6 +141,6 @@ grep '^seen corn 1$' test-suite.log
 grep '^seen corn 2$' test-suite.log
 grep '^seen corn 31$' test-suite.log
 grep '^seen corn 32$' test-suite.log
-$FGREP 'not seen' test-suite.log && Exit 1
+$FGREP 'not seen' test-suite.log && exit 1
 
 :
old mode 100755 (executable)
new mode 100644 (file)
index 4aa633f..8e04a43
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2011-2012 Free Software Foundation, Inc.
+# Copyright (C) 2011-2017 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
@@ -18,7 +18,7 @@
 # "global test result" in '*.trs' files, as documented in the automake
 # manual.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_OUTPUT
@@ -60,7 +60,7 @@ get_escaped_line()
 have_result ()
 {
    cat > exp; echo >> exp; echo logloglog >> exp
-   eline=`get_escaped_line exp`
+   eline=$(get_escaped_line exp)
    sed -n -e "/^$eline$/,/^logloglog$/p" test-suite.log > got
    cat exp; cat got
    diff exp got
@@ -122,7 +122,7 @@ cat > zar-doz.x << 'END'
 :test-result: XFAIL
 END
 
-$MAKE check && Exit 1
+$MAKE check && exit 1
 cat test-suite.log
 
 have_result <<END
@@ -143,7 +143,7 @@ cat > foo.test << 'END'
 END
 : > zar-doz.x
 
-$MAKE check && Exit 1
+$MAKE check && exit 1
 cat test-suite.log
 
 have_result <<END
old mode 100755 (executable)
new mode 100644 (file)
index 8874745..6156d86
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2011-2012 Free Software Foundation, Inc.
+# Copyright (C) 2011-2017 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
@@ -17,7 +17,7 @@
 # Test the "make recheck" semantics for custom test drivers, as documented
 # in the Automake manual.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_OUTPUT
@@ -109,7 +109,7 @@ cat > n-100 <<END
 :recheck: no
 END
 
-rechecked=`echo y-[0-9]*`
+rechecked=$(echo y-[0-9]*)
 
 for t in [yn]-[0-9]*; do echo $t; done \
   | sed 's/.*/TESTS += &/' >> Makefile.am
@@ -144,7 +144,7 @@ $AUTOMAKE
 
 # The ':test-result:' fields should be ignored by "make recheck",
 # but should cause the testsuite report to detect errors.
-$MAKE check && Exit 1
+$MAKE check && exit 1
 ls -l
 for t in $tests; do test -f $t.run; done
 rm -f *.run
@@ -153,10 +153,11 @@ rm -f *.run
 # fields indicating success, so "make recheck" must pass.  Still, the
 # next "make recheck" call should still re-run the same set of tests.
 for iteration in 1 2; do
+  using_gmake || $sleep # Required by BSD make.
   $MAKE recheck
   ls -l
   for t in $rechecked; do test -f $t.run; done
-  find . -name 'n-*.run' | grep . && Exit 1
+  find . -name 'n-*.run' | grep . && exit 1
   : For shells with busted 'set -e'.
 done
 
old mode 100755 (executable)
new mode 100644 (file)
index 03f93d7..a8cdee4
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2011-2012 Free Software Foundation, Inc.
+# Copyright (C) 2011-2017 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
@@ -17,7 +17,7 @@
 # Parallel testsuite harness: check APIs for the registering of test
 # results in '*.trs' files, as documented in the automake manual.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_OUTPUT
@@ -49,15 +49,17 @@ chmod a+x dummy-driver
 
 mk_check ()
 {
-  st=0
-  $MAKE check >stdout || st=$?
-  cat stdout
+  stat=0
+  case $1 in
+    -e) stat=$2; shift 2;;
+  esac
+  run_make -O -e $stat -- check
   # Our dummy driver make no testsuite progress report.
-  grep ': .*\.test' stdout && Exit 1
+  grep ': .*\.test' stdout && exit 1
   # Nor it writes to the log files.
-  test -s foo.log && Exit 1
-  test -s bar.log && Exit 1
-  return $st
+  test -s foo.log && exit 1
+  test -s bar.log && exit 1
+  : For 'set -e'.
 }
 
 # This must be different from the one defined in 'test/defs', as that
@@ -74,7 +76,7 @@ count_test_results ()
   grep "^# FAIL:  *$fail$"   stdout || rc=1
   grep "^# XPASS:  *$xpass$" stdout || rc=1
   grep "^# ERROR:  *$error$" stdout || rc=1
-  test $st -eq 0 || Exit 1
+  test $st -eq 0 || exit 1
 }
 
 $ACLOCAL
@@ -99,7 +101,7 @@ cat > bar.test <<END
 :test-result: SKIP
 :test-global-result: ERROR
 END
-mk_check && Exit 1
+mk_check -e FAIL
 count_test_results total=2 pass=0 fail=1 xpass=0 xfail=0 skip=1 error=0
 
 cat > foo.test <<END
@@ -118,7 +120,7 @@ END
 cat > bar.test <<END
 :test-global-result: PASS
 END
-mk_check && Exit 1
+mk_check -e FAIL
 count_test_results total=1 pass=0 fail=1 xpass=0 xfail=0 skip=0 error=0
 
 cat > foo.test <<END
@@ -147,11 +149,11 @@ cat > foo.test <<END
 :test-result: ERROR
 END
 : > bar.test
-mk_check && Exit 1
+mk_check -e FAIL
 count_test_results total=6 pass=1 fail=1 xpass=1 xfail=1 skip=1 error=1
 
 cp foo.test bar.test
-mk_check && Exit 1
+mk_check -e FAIL
 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.
@@ -169,7 +171,7 @@ END
 done
 cat foo.test # For debugging.
 cat bar.test # Likewise.
-mk_check && Exit 1
+mk_check -e FAIL
 count_test_results total=30 pass=5 fail=5 xpass=5 xfail=5 skip=5 error=5
 
 :
old mode 100755 (executable)
new mode 100644 (file)
index 2491da5..3b4a35c
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2011-2012 Free Software Foundation, Inc.
+# Copyright (C) 2011-2017 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
@@ -16,9 +16,9 @@
 
 # parallel-tests:
 #  - non-existent scripts listed in TESTS get diagnosed
-# See also related test 'test-missing2.test'.
+# See also related test 'test-missing2.sh'.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_OUTPUT
@@ -37,24 +37,19 @@ $AUTOMAKE -a
 
 ./configure
 
-$MAKE check >output 2>&1 && { cat output; Exit 1; }
-cat output
+run_make -e FAIL -M check
 test -f ok.log
 grep '^PASS: ok\.test' output
 $FGREP 'zardoz.log' output
-test ! -f test-suite.log
+test ! -e test-suite.log
 
-TESTS='zardoz2.test' $MAKE -e check >output 2>&1 \
-  && { cat output; Exit 1; }
-cat output
+run_make -M -e FAIL TESTS='zardoz2.test' check
 $FGREP 'zardoz2.log' output
-test ! -f test-suite.log
+test ! -e test-suite.log
 
-TEST_LOGS='zardoz3.log' $MAKE -e check >output 2>&1 \
-  && { cat output; Exit 1; }
-cat output
+run_make -M -e FAIL TEST_LOGS='zardoz3.log' check
 $FGREP 'zardoz3.log' output
-test ! -f test-suite.log
+test ! -e test-suite.log
 
 # The errors should persist even after 'test-suite.log'
 # has been created.
@@ -63,9 +58,8 @@ test ! -f test-suite.log
 $MAKE check
 rm -f zardoz.test
 
-$MAKE check >output 2>&1 && { cat output; Exit 1; }
-cat output
+run_make -M -e FAIL check
 $FGREP 'zardoz.log' output
-test ! -f test-suite.log
+test ! -e test-suite.log
 
 :
old mode 100755 (executable)
new mode 100644 (file)
index 6dd4b9d..eee2eb7
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2011-2012 Free Software Foundation, Inc.
+# Copyright (C) 2011-2017 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
@@ -17,9 +17,9 @@
 # parallel-tests:
 #  - non-existent scripts listed in TESTS get diagnosed, even when
 #    all the $(TEST_LOGS) have a dummy dependency.
-# See also related test 'test-missing.test'.
+# See also related test 'test-missing.sh'.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_OUTPUT
@@ -36,18 +36,17 @@ $AUTOMAKE -a
 
 ./configure
 
-$MAKE foobar1.log foobar2.log || Exit 99
-test ! -f foobar1.log || Exit 99
-test ! -f foobar1.trs || Exit 99
-test ! -f foobar2.log || Exit 99
-test ! -f foobar2.trs || Exit 99
+$MAKE foobar1.log foobar2.log || exit 99
+test ! -e foobar1.log || exit 99
+test ! -e foobar1.trs || exit 99
+test ! -e foobar2.log || exit 99
+test ! -e foobar2.trs || exit 99
 
-$MAKE check >output 2>&1 && { cat output; Exit 1; }
-cat output
+run_make -e FAIL -M check
 grep 'test-suite\.log.*foobar1\.log' output
 grep 'test-suite\.log.*foobar1\.trs' output
 grep 'test-suite\.log.*foobar2\.log' output
 grep 'test-suite\.log.*foobar2\.trs' output
-test ! -f test-suite.log
+test ! -e test-suite.log
 
 :
old mode 100755 (executable)
new mode 100644 (file)
index 42456b4..9febf1d
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2011-2012 Free Software Foundation, Inc.
+# Copyright (C) 2011-2017 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
@@ -18,7 +18,7 @@
 #  - creation and removal of '.trs' auxiliary files
 #  - check some internals regarding the use of '.trs' files.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac <<END
 AC_OUTPUT
@@ -68,11 +68,11 @@ for vpath in : false; do
   $srcdir/configure
 
   $MAKE tb
-  test x"`cat tb`" = x"foo bar sub/zardoz"
+  test x"$(cat tb)" = x"foo bar sub/zardoz"
   rm -f tb
   # Please don't change the order of the stuff in TESTS, below.
-  TESTS='foo.test foo2.sh foo-log foolog.test a.log.b.sh 0.exe' $MAKE -e tb
-  test x"`cat tb`" = x"foo foo2 foo-log foolog a.log.b 0.exe"
+  run_make TESTS='foo.test foo2.sh foo-log foolog.test a.log.b.sh 0.exe' tb
+  test x"$(cat tb)" = x"foo foo2 foo-log foolog a.log.b 0.exe"
   rm -f tb
 
   cd $srcdir
@@ -92,22 +92,22 @@ test -f foo.trs
 test -f bar.trs
 test -f sub/zardoz.trs
 $MAKE clean
-test ! -f foo.trs
-test ! -f bar.trs
-test ! -f sub/zardoz.trs
+test ! -e foo.trs
+test ! -e bar.trs
+test ! -e sub/zardoz.trs
 # Unrelated '.trs' files shouldn't be removed.
 test -f unrelated.trs
 test -f sub/foo.trs
 
 # The files should be properly created in case of testsuite failure too.
-FOO_STATUS=1 $MAKE check && Exit 1
+FOO_STATUS=1 $MAKE check && exit 1
 test -f foo.trs
 test -f bar.trs
 test -f sub/zardoz.trs
 $MAKE mostlyclean
-test ! -f foo.trs
-test ! -f bar.trs
-test ! -f sub/zardoz.trs
+test ! -e foo.trs
+test ! -e bar.trs
+test ! -e sub/zardoz.trs
 # Unrelated '.trs' files shouldn't be removed.
 test -f unrelated.trs
 test -f sub/foo.trs
@@ -116,20 +116,20 @@ test -f sub/foo.trs
 # Try with a subset of TESTS.
 #
 
-TESTS=foo.test $MAKE -e check
+run_make TESTS=foo.test check
 test -f foo.trs
-test ! -f bar.trs
-test ! -f sub/zardoz.trs
+test ! -e bar.trs
+test ! -e sub/zardoz.trs
 $MAKE clean
-test ! -f foo.trs
-TESTS='foo.test bar.sh' $MAKE -e check
+test ! -e foo.trs
+run_make TESTS='foo.test bar.sh' check
 test -f foo.trs
 test -f bar.trs
-test ! -f sub/zardoz.trs
+test ! -e sub/zardoz.trs
 # "make clean" shouldn't remove '.trs' files for tests not in $(TESTS).
-TESTS=bar.sh $MAKE -e clean
+run_make TESTS=bar.sh clean
 test -f foo.trs
-test ! -f bar.trs
+test ! -e bar.trs
 
 $MAKE clean
 
@@ -137,21 +137,21 @@ $MAKE clean
 # Try with a subset of TEST_LOGS.
 #
 
-TEST_LOGS=sub/zardoz.log $MAKE -e check
-test ! -f foo.trs
-test ! -f bar.trs
+run_make TEST_LOGS=sub/zardoz.log check
+test ! -e foo.trs
+test ! -e bar.trs
 test -f sub/zardoz.trs
 $MAKE clean
-test ! -f sub/zardoz.trs
-TEST_LOGS='foo.log bar.log' $MAKE -e check
+test ! -e sub/zardoz.trs
+run_make TEST_LOGS='foo.log bar.log' check
 test -f foo.trs
 test -f bar.trs
-test ! -f sub/zardoz.trs
+test ! -e sub/zardoz.trs
 # "make clean" shouldn't remove '.trs' files for tests whose log
 # is not in $(TEST_LOGS).
-TEST_LOGS=foo.log $MAKE -e clean
-test ! -f foo.trs
+run_make TEST_LOGS=foo.log clean
+test ! -e foo.trs
 test -f bar.trs
-test ! -f sub/zardoz.trs
+test ! -e sub/zardoz.trs
 
 :
old mode 100755 (executable)
new mode 100644 (file)
index a132194..182433a
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2011-2012 Free Software Foundation, Inc.
+# Copyright (C) 2011-2017 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
@@ -19,7 +19,7 @@
 # This test is complex and tricky, but that's acceptable since we are
 # testing semantics that are potentially complex and tricky.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac <<END
 AC_OUTPUT
@@ -30,9 +30,8 @@ TESTS = foo.test bar.test baz.test
 TEST_LOG_COMPILER = $(SHELL)
 END
 
-# Creative quoting below to please maintainer-check.
-echo exit '$TEST_STATUS' > foo.test
-echo exit '$TEST_STATUS' > bar.test
+echo 'exit $TEST_STATUS' > foo.test
+echo 'exit $TEST_STATUS' > bar.test
 : > baz.test
 
 TEST_STATUS=0; export TEST_STATUS
@@ -54,25 +53,24 @@ $MAKE check
 rm -f foo.trs bar.trs baz.trs
 $MAKE foo.trs
 test -f foo.trs
-test ! -f bar.trs
-test ! -f baz.trs
+test ! -e bar.trs
+test ! -e baz.trs
 
 : Recreate by hand, several at the same time.
 rm -f foo.trs bar.trs baz.trs
 $MAKE foo.trs bar.trs
 test -f foo.trs
 test -f bar.trs
-test ! -f baz.trs
+test ! -e baz.trs
 
 : Recreate by hand, with a failing test.
 rm -f foo.trs bar.trs
-TEST_STATUS=1 $MAKE bar.trs baz.trs >stdout || { cat stdout; Exit 1; }
-cat stdout
-test ! -f foo.trs
+run_make -O TEST_STATUS=1 bar.trs baz.trs
+test ! -e foo.trs
 test -f bar.trs
 test -f baz.trs
 grep '^FAIL: bar\.test' stdout
-$EGREP '^(baz|foo)\.test' stdout && Exit 1
+$EGREP '^(baz|foo)\.test' stdout && exit 1
 
 : Recreate with a sweeping "make check", and ensure that also up-to-date
 : '.trs' files are remade.
@@ -87,7 +85,7 @@ is_newest baz.trs stamp
 : ensure that also up-to-date '.trs' files are remade -- this time we
 : grep the "make check" output verify that.
 rm -f foo.trs bar.trs
-TEST_STATUS=1 $MAKE check >stdout && { cat stdout; Exit 1; }
+run_make -O -e FAIL TEST_STATUS=1 check
 test -f foo.trs
 test -f bar.trs
 grep '^FAIL: foo\.test' stdout
@@ -96,29 +94,28 @@ grep '^PASS: baz\.test' stdout
 
 : Recreate with a "make check" with redefined TESTS.
 rm -f foo.trs bar.trs baz.trs
-TESTS=foo.test $MAKE -e check
+run_make TESTS=foo.test check
 test -f foo.trs
-test ! -f bar.trs
-test ! -f baz.trs
+test ! -e bar.trs
+test ! -e baz.trs
 
 : Recreate with a "make check" with redefined TEST_LOGS.
 rm -f foo.trs bar.trs baz.trs
-TEST_LOGS=bar.log $MAKE -e check
-test ! -f foo.trs
+run_make TEST_LOGS=bar.log check
+test ! -e foo.trs
 test -f bar.trs
-test ! -f baz.trs
+test ! -e baz.trs
 
 : Interactions with "make recheck" are OK.
 rm -f foo.trs bar.trs baz.log baz.trs
-$MAKE recheck >stdout || { cat stdout; Exit 1; }
-cat stdout
+run_make -O recheck
 test -f foo.trs
 test -f bar.trs
-test ! -f baz.trs
-test ! -f baz.log
+test ! -e baz.trs
+test ! -e baz.log
 grep '^PASS: foo\.test' stdout
 grep '^PASS: bar\.test' stdout
-grep 'baz\.test' stdout && Exit 1
+grep 'baz\.test' stdout && exit 1
 count_test_results total=2 pass=2 fail=0 xpass=0 xfail=0 skip=0 error=0
 
 : Setup for the next check.
@@ -131,11 +128,10 @@ test -f baz.trs
 : '.trs' files are *not* remade.
 update_stamp
 rm -f foo.trs bar.trs test-suite.log
-$MAKE test-suite.log >stdout || { cat stdout; Exit 1; }
-cat stdout
+run_make -O test-suite.log
 grep '^PASS: foo\.test' stdout
 grep '^PASS: bar\.test' stdout
-grep 'baz\.test' stdout && Exit 1
+grep 'baz\.test' stdout && exit 1
 stat *.trs *.log stamp || : # For debugging.
 # Check that make has updated what it needed to, but no more.
 test -f foo.trs
@@ -153,14 +149,13 @@ test -f baz.trs
 rm -f foo.trs
 update_stamp
 touch bar.test
-RECHECK_LOGS= $MAKE -e check >stdout || { cat stdout; Exit 1; }
-cat stdout
+run_make -O RECHECK_LOGS= check
 # Check that make has updated what it needed to, but no more.
 test -f foo.trs
 is_newest bar.trs bar.test
 is_newest stamp baz.trs
 grep '^PASS: foo\.test' stdout
 grep '^PASS: bar\.test' stdout
-grep 'baz\.test' stdout && Exit 1
+grep 'baz\.test' stdout && exit 1
 
 :
old mode 100755 (executable)
new mode 100644 (file)
index 3cbbbf6..acd5a9c
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2011-2012 Free Software Foundation, Inc.
+# Copyright (C) 2011-2017 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
@@ -17,7 +17,7 @@
 # Check parallel harness features:
 #  - recovery from unreadable '.trs' files, in various scenarios
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac <<END
 AC_OUTPUT
@@ -40,8 +40,7 @@ $AUTOMAKE -a
 ./configure
 
 : > t
-chmod a-r t
-test ! -r t || Exit 77
+chmod a-r t && test ! -r t || skip_ "you can still read unreadable files"
 rm -f t
 
 : Create the required log files.
@@ -70,8 +69,7 @@ test -r bar.trs
 : Again, but using "make recheck" this time.
 rm -f foo.trs
 chmod a-r bar.trs
-$MAKE recheck >stdout || { cat stdout; Exit 1; }
-cat stdout
+run_make -O recheck
 test -f foo.trs
 test -r foo.trs
 test -f bar.trs
@@ -82,12 +80,11 @@ grep '^PASS: bar\.test' stdout
 : Recreate by remaking the global test log.
 chmod a-r foo.trs
 rm -f test-suite.log
-$MAKE test-suite.log >stdout || { cat stdout; Exit 1; }
-cat stdout
+run_make -O test-suite.log
 test -f foo.trs
 test -r foo.trs
 grep '^PASS: foo\.test' stdout
-grep 'bar\.test' stdout && Exit 1
+grep 'bar\.test' stdout && exit 1
 # Also test that have only run before should be counted in the final
 # testsuite summary.
 grep '^# TOTAL:  *2$' stdout
@@ -95,7 +92,7 @@ grep '^# TOTAL:  *2$' stdout
 : Setup for the next check.
 : > baz.test
 sed 's/^TESTS =.*/& baz.test/' Makefile > t
-diff t Makefile && Exit 99
+diff t Makefile && exit 99
 mv -f t Makefile
 $MAKE check
 test -f foo.trs
@@ -108,13 +105,12 @@ $sleep
 touch stamp
 $sleep
 touch bar.test
-RECHECK_LOGS= $MAKE -e check >stdout || { cat stdout; Exit 1; }
-cat stdout
+run_make -O RECHECK_LOGS= check
 test -r foo.trs
 is_newest bar.trs bar.test
 grep '^PASS: foo\.test' stdout
 grep '^PASS: bar\.test' stdout
-grep 'baz\.test' stdout && Exit 1
+grep 'baz\.test' stdout && exit 1
 # Also test that have only run before should be counted in the final
 # testsuite summary.
 grep '^# TOTAL:  *3$' stdout
old mode 100755 (executable)
new mode 100644 (file)
index 65855ce..ad328eb
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2011-2012 Free Software Foundation, Inc.
+# Copyright (C) 2011-2017 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
 # by TESTS_ENVIRONMENT and AM_TESTS_ENVIRONMENT in LOG_COMPILER and
 # LOG_FLAGS (for tests both with and without registered extensions).
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_OUTPUT
 END
 
-unset v0 v1 v2 v3 v4 || :
+unset v0 v1 v2 v3 v4
 
 cat > Makefile.am << 'END'
 TESTS_ENVIRONMENT = am__f3 () { echo 3; }; v0='$(srcdir)' v1=1; :;
old mode 100755 (executable)
new mode 100644 (file)
index 93643d1..a8494d4
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2011-2012 Free Software Foundation, Inc.
+# Copyright (C) 2011-2017 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
 
 # With old serial testsuite driver, TESTS_ENVIRONMENT can be used to
 # define the "test runner", i.e. the program that the test scripts must
-# be run by (with the parallel-tests driver one should use LOG_COMPILER
+# be run by (with the parallel test harness one should use LOG_COMPILER
 # for this).  The behaviour tested here is also documented in the manual.
 
 am_serial_tests=yes
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac <<END
 AC_SUBST([PERL], ['$PERL'])
old mode 100755 (executable)
new mode 100644 (file)
index 6c42fd4..b8f6511
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2011-2012 Free Software Foundation, Inc.
+# Copyright (C) 2011-2017 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
@@ -26,7 +26,7 @@
 # and the following CC:ed thread on bug-autoconf list:
 #   <http://lists.gnu.org/archive/html/bug-autoconf/2011-06/msg00002.html>
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_OUTPUT
@@ -79,13 +79,12 @@ for sh in "$SHELL" "$bin_ksh"; do
 END
     $AUTOMAKE -a
     CONFIG_SHELL="$sh" $sh ./configure CONFIG_SHELL="$sh"
-    VERBOSE=y $MAKE check >stdout || { cat stdout; Exit 1; }
-    cat stdout
+    run_make -O VERBOSE=y check
     grep '[ /]foo\.test: foofoofoo$' stdout
     grep '[ /]foo\.test: barbarbar$' stdout
     grep '[ /]bar\.test: 8888$' stdout
     grep '[ /]bar\.test: 9999$' stdout
-    $EGREP '(foofoofoo|barbarbar|8888|9999)' foo.log && Exit 1
+    $EGREP '(foofoofoo|barbarbar|8888|9999)' foo.log && exit 1
     : # For shells with buggy 'set -e'.
   done
 done
old mode 100755 (executable)
new mode 100644 (file)
index 62ca4ee..7ae17e9
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2011-2012 Free Software Foundation, Inc.
+# Copyright (C) 2011-2017 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
@@ -17,7 +17,7 @@
 # "Simple Tests" testsuite driver: check TESTS_ENVIRONMENT support.
 
 am_serial_tests=yes
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_OUTPUT
@@ -41,6 +41,6 @@ $AUTOMAKE -a
 ./configure
 
 FOO=bad TESTS_ENVIRONMENT='FOO=ok'  $MAKE check
-FOO=ok  TESTS_ENVIRONMENT='FOO=bad' $MAKE check && Exit 1
+FOO=ok  TESTS_ENVIRONMENT='FOO=bad' $MAKE check && exit 1
 
 :
index 97935c2..340b211 100644 (file)
@@ -8,6 +8,40 @@
 
 t/ar-lib-w.log: t/ar-lib.sh
 t/ar-lib-w.log: t/ar-lib.log
+t/built-sources-check-w.log: t/built-sources-check.sh
+t/built-sources-check-w.log: t/built-sources-check.log
+t/check-exported-srcdir-w.log: t/check-exported-srcdir.sh
+t/check-exported-srcdir-w.log: t/check-exported-srcdir.log
+t/check-fd-redirect-w.log: t/check-fd-redirect.sh
+t/check-fd-redirect-w.log: t/check-fd-redirect.log
+t/check-subst-prog-w.log: t/check-subst-prog.sh
+t/check-subst-prog-w.log: t/check-subst-prog.log
+t/check-subst-w.log: t/check-subst.sh
+t/check-subst-w.log: t/check-subst.log
+t/check-tests-in-builddir-w.log: t/check-tests-in-builddir.sh
+t/check-tests-in-builddir-w.log: t/check-tests-in-builddir.log
+t/check-w.log: t/check.sh
+t/check-w.log: t/check.log
+t/check11-w.log: t/check11.sh
+t/check11-w.log: t/check11.log
+t/check12-w.log: t/check12.sh
+t/check12-w.log: t/check12.log
+t/check2-w.log: t/check2.sh
+t/check2-w.log: t/check2.log
+t/check4-w.log: t/check4.sh
+t/check4-w.log: t/check4.log
+t/check5-w.log: t/check5.sh
+t/check5-w.log: t/check5.log
+t/check6-w.log: t/check6.sh
+t/check6-w.log: t/check6.log
+t/check7-w.log: t/check7.sh
+t/check7-w.log: t/check7.log
+t/check8-w.log: t/check8.sh
+t/check8-w.log: t/check8.log
+t/color-tests-w.log: t/color-tests.sh
+t/color-tests-w.log: t/color-tests.log
+t/color-tests2-w.log: t/color-tests2.sh
+t/color-tests2-w.log: t/color-tests2.log
 t/compile-w.log: t/compile.sh
 t/compile-w.log: t/compile.log
 t/compile2-w.log: t/compile2.sh
@@ -20,218 +54,28 @@ t/compile5-w.log: t/compile5.sh
 t/compile5-w.log: t/compile5.log
 t/compile6-w.log: t/compile6.sh
 t/compile6-w.log: t/compile6.log
-t/instsh2-w.log: t/instsh2.sh
-t/instsh2-w.log: t/instsh2.log
-t/instsh3-w.log: t/instsh3.sh
-t/instsh3-w.log: t/instsh3.log
+t/compile7-w.log: t/compile7.sh
+t/compile7-w.log: t/compile7.log
+t/exeext4-w.log: t/exeext4.sh
+t/exeext4-w.log: t/exeext4.log
+t/install-sh-option-C-w.log: t/install-sh-option-C.sh
+t/install-sh-option-C-w.log: t/install-sh-option-C.log
+t/install-sh-unittests-w.log: t/install-sh-unittests.sh
+t/install-sh-unittests-w.log: t/install-sh-unittests.log
+t/maken3-w.log: t/maken3.sh
+t/maken3-w.log: t/maken3.log
 t/mdate5-w.log: t/mdate5.sh
 t/mdate5-w.log: t/mdate5.log
 t/mdate6-w.log: t/mdate6.sh
 t/mdate6-w.log: t/mdate6.log
-t/missing-w.log: t/missing.sh
-t/missing-w.log: t/missing.log
-t/missing2-w.log: t/missing2.sh
-t/missing2-w.log: t/missing2.log
+t/missing-version-mismatch-w.log: t/missing-version-mismatch.sh
+t/missing-version-mismatch-w.log: t/missing-version-mismatch.log
 t/missing3-w.log: t/missing3.sh
 t/missing3-w.log: t/missing3.log
-t/missing5-w.log: t/missing5.sh
-t/missing5-w.log: t/missing5.log
 t/mkinst3-w.log: t/mkinst3.sh
 t/mkinst3-w.log: t/mkinst3.log
-t/check-w.log: t/check.sh
-t/check-w.log: t/check.log
-t/check2-w.log: t/check2.sh
-t/check2-w.log: t/check2.log
-t/check3-w.log: t/check3.sh
-t/check3-w.log: t/check3.log
-t/check4-w.log: t/check4.sh
-t/check4-w.log: t/check4.log
-t/check5-w.log: t/check5.sh
-t/check5-w.log: t/check5.log
-t/check6-w.log: t/check6.sh
-t/check6-w.log: t/check6.log
-t/check7-w.log: t/check7.sh
-t/check7-w.log: t/check7.log
-t/check8-w.log: t/check8.sh
-t/check8-w.log: t/check8.log
-t/check11-w.log: t/check11.sh
-t/check11-w.log: t/check11.log
-t/check12-w.log: t/check12.sh
-t/check12-w.log: t/check12.log
-t/check-subst-w.log: t/check-subst.sh
-t/check-subst-w.log: t/check-subst.log
-t/check-subst-prog-w.log: t/check-subst-prog.sh
-t/check-subst-prog-w.log: t/check-subst-prog.log
-t/check-exported-srcdir-w.log: t/check-exported-srcdir.sh
-t/check-exported-srcdir-w.log: t/check-exported-srcdir.log
-t/check-fd-redirect-w.log: t/check-fd-redirect.sh
-t/check-fd-redirect-w.log: t/check-fd-redirect.log
-t/check-tests-in-builddir-w.log: t/check-tests-in-builddir.sh
-t/check-tests-in-builddir-w.log: t/check-tests-in-builddir.log
-t/color-w.log: t/color.sh
-t/color-w.log: t/color.log
-t/color2-w.log: t/color2.sh
-t/color2-w.log: t/color2.log
-t/exeext4-w.log: t/exeext4.sh
-t/exeext4-w.log: t/exeext4.log
-t/maken3-w.log: t/maken3.sh
-t/maken3-w.log: t/maken3.log
 t/posixsubst-tests-w.log: t/posixsubst-tests.sh
 t/posixsubst-tests-w.log: t/posixsubst-tests.log
-t/tap-ambiguous-directive-w.log: t/tap-ambiguous-directive.sh
-t/tap-ambiguous-directive-w.log: t/tap-ambiguous-directive.log
-t/tap-autonumber-w.log: t/tap-autonumber.sh
-t/tap-autonumber-w.log: t/tap-autonumber.log
-t/tap-bailout-w.log: t/tap-bailout.sh
-t/tap-bailout-w.log: t/tap-bailout.log
-t/tap-bailout-and-logging-w.log: t/tap-bailout-and-logging.sh
-t/tap-bailout-and-logging-w.log: t/tap-bailout-and-logging.log
-t/tap-bailout-suppress-badexit-w.log: t/tap-bailout-suppress-badexit.sh
-t/tap-bailout-suppress-badexit-w.log: t/tap-bailout-suppress-badexit.log
-t/tap-bailout-suppress-later-diagnostic-w.log: t/tap-bailout-suppress-later-diagnostic.sh
-t/tap-bailout-suppress-later-diagnostic-w.log: t/tap-bailout-suppress-later-diagnostic.log
-t/tap-bailout-suppress-later-errors-w.log: t/tap-bailout-suppress-later-errors.sh
-t/tap-bailout-suppress-later-errors-w.log: t/tap-bailout-suppress-later-errors.log
-t/tap-color-w.log: t/tap-color.sh
-t/tap-color-w.log: t/tap-color.log
-t/tap-deps-w.log: t/tap-deps.sh
-t/tap-deps-w.log: t/tap-deps.log
-t/tap-diagnostic-w.log: t/tap-diagnostic.sh
-t/tap-diagnostic-w.log: t/tap-diagnostic.log
-t/tap-empty-diagnostic-w.log: t/tap-empty-diagnostic.sh
-t/tap-empty-diagnostic-w.log: t/tap-empty-diagnostic.log
-t/tap-empty-w.log: t/tap-empty.sh
-t/tap-empty-w.log: t/tap-empty.log
-t/tap-escape-directive-w.log: t/tap-escape-directive.sh
-t/tap-escape-directive-w.log: t/tap-escape-directive.log
-t/tap-escape-directive-2-w.log: t/tap-escape-directive-2.sh
-t/tap-escape-directive-2-w.log: t/tap-escape-directive-2.log
-t/tap-exit-w.log: t/tap-exit.sh
-t/tap-exit-w.log: t/tap-exit.log
-t/tap-signal-w.log: t/tap-signal.tap
-t/tap-signal-w.log: t/tap-signal.log
-t/tap-fancy-w.log: t/tap-fancy.sh
-t/tap-fancy-w.log: t/tap-fancy.log
-t/tap-fancy2-w.log: t/tap-fancy2.sh
-t/tap-fancy2-w.log: t/tap-fancy2.log
-t/tap-global-log-w.log: t/tap-global-log.sh
-t/tap-global-log-w.log: t/tap-global-log.log
-t/tap-global-result-w.log: t/tap-global-result.sh
-t/tap-global-result-w.log: t/tap-global-result.log
-t/tap-log-w.log: t/tap-log.sh
-t/tap-log-w.log: t/tap-log.log
-t/tap-msg0-result-w.log: t/tap-msg0-result.sh
-t/tap-msg0-result-w.log: t/tap-msg0-result.log
-t/tap-msg0-directive-w.log: t/tap-msg0-directive.sh
-t/tap-msg0-directive-w.log: t/tap-msg0-directive.log
-t/tap-msg0-planskip-w.log: t/tap-msg0-planskip.sh
-t/tap-msg0-planskip-w.log: t/tap-msg0-planskip.log
-t/tap-msg0-bailout-w.log: t/tap-msg0-bailout.sh
-t/tap-msg0-bailout-w.log: t/tap-msg0-bailout.log
-t/tap-msg0-misc-w.log: t/tap-msg0-misc.sh
-t/tap-msg0-misc-w.log: t/tap-msg0-misc.log
-t/tap-merge-stdout-stderr-w.log: t/tap-merge-stdout-stderr.sh
-t/tap-merge-stdout-stderr-w.log: t/tap-merge-stdout-stderr.log
-t/tap-no-merge-stdout-stderr-w.log: t/tap-no-merge-stdout-stderr.sh
-t/tap-no-merge-stdout-stderr-w.log: t/tap-no-merge-stdout-stderr.log
-t/tap-no-disable-hard-error-w.log: t/tap-no-disable-hard-error.sh
-t/tap-no-disable-hard-error-w.log: t/tap-no-disable-hard-error.log
-t/tap-no-spurious-summary-w.log: t/tap-no-spurious-summary.sh
-t/tap-no-spurious-summary-w.log: t/tap-no-spurious-summary.log
-t/tap-no-spurious-numbers-w.log: t/tap-no-spurious-numbers.sh
-t/tap-no-spurious-numbers-w.log: t/tap-no-spurious-numbers.log
-t/tap-no-spurious-w.log: t/tap-no-spurious.sh
-t/tap-no-spurious-w.log: t/tap-no-spurious.log
-t/tap-not-ok-skip-w.log: t/tap-not-ok-skip.sh
-t/tap-not-ok-skip-w.log: t/tap-not-ok-skip.log
-t/tap-number-wordboundary-w.log: t/tap-number-wordboundary.sh
-t/tap-number-wordboundary-w.log: t/tap-number-wordboundary.log
-t/tap-numeric-description-w.log: t/tap-numeric-description.sh
-t/tap-numeric-description-w.log: t/tap-numeric-description.log
-t/tap-negative-numbers-w.log: t/tap-negative-numbers.sh
-t/tap-negative-numbers-w.log: t/tap-negative-numbers.log
-t/tap-numbers-leading-zero-w.log: t/tap-numbers-leading-zero.sh
-t/tap-numbers-leading-zero-w.log: t/tap-numbers-leading-zero.log
-t/tap-out-of-order-w.log: t/tap-out-of-order.sh
-t/tap-out-of-order-w.log: t/tap-out-of-order.log
-t/tap-passthrough-w.log: t/tap-passthrough.sh
-t/tap-passthrough-w.log: t/tap-passthrough.log
-t/tap-passthrough-exit-w.log: t/tap-passthrough-exit.sh
-t/tap-passthrough-exit-w.log: t/tap-passthrough-exit.log
-t/tap-plan-w.log: t/tap-plan.sh
-t/tap-plan-w.log: t/tap-plan.log
-t/tap-plan-corner-w.log: t/tap-plan-corner.sh
-t/tap-plan-corner-w.log: t/tap-plan-corner.log
-t/tap-plan-errors-w.log: t/tap-plan-errors.sh
-t/tap-plan-errors-w.log: t/tap-plan-errors.log
-t/tap-plan-middle-w.log: t/tap-plan-middle.sh
-t/tap-plan-middle-w.log: t/tap-plan-middle.log
-t/tap-plan-whitespace-w.log: t/tap-plan-whitespace.sh
-t/tap-plan-whitespace-w.log: t/tap-plan-whitespace.log
-t/tap-plan-leading-zero-w.log: t/tap-plan-leading-zero.sh
-t/tap-plan-leading-zero-w.log: t/tap-plan-leading-zero.log
-t/tap-plan-malformed-w.log: t/tap-plan-malformed.sh
-t/tap-plan-malformed-w.log: t/tap-plan-malformed.log
-t/tap-missing-plan-and-bad-exit-w.log: t/tap-missing-plan-and-bad-exit.sh
-t/tap-missing-plan-and-bad-exit-w.log: t/tap-missing-plan-and-bad-exit.log
-t/tap-planskip-w.log: t/tap-planskip.sh
-t/tap-planskip-w.log: t/tap-planskip.log
-t/tap-planskip-late-w.log: t/tap-planskip-late.sh
-t/tap-planskip-late-w.log: t/tap-planskip-late.log
-t/tap-planskip-and-logging-w.log: t/tap-planskip-and-logging.sh
-t/tap-planskip-and-logging-w.log: t/tap-planskip-and-logging.log
-t/tap-planskip-unplanned-w.log: t/tap-planskip-unplanned.sh
-t/tap-planskip-unplanned-w.log: t/tap-planskip-unplanned.log
-t/tap-planskip-unplanned-corner-w.log: t/tap-planskip-unplanned-corner.sh
-t/tap-planskip-unplanned-corner-w.log: t/tap-planskip-unplanned-corner.log
-t/tap-planskip-case-insensitive-w.log: t/tap-planskip-case-insensitive.sh
-t/tap-planskip-case-insensitive-w.log: t/tap-planskip-case-insensitive.log
-t/tap-planskip-whitespace-w.log: t/tap-planskip-whitespace.sh
-t/tap-planskip-whitespace-w.log: t/tap-planskip-whitespace.log
-t/tap-planskip-badexit-w.log: t/tap-planskip-badexit.sh
-t/tap-planskip-badexit-w.log: t/tap-planskip-badexit.log
-t/tap-planskip-bailout-w.log: t/tap-planskip-bailout.sh
-t/tap-planskip-bailout-w.log: t/tap-planskip-bailout.log
-t/tap-planskip-later-errors-w.log: t/tap-planskip-later-errors.sh
-t/tap-planskip-later-errors-w.log: t/tap-planskip-later-errors.log
-t/tap-realtime-w.log: t/tap-realtime.sh
-t/tap-realtime-w.log: t/tap-realtime.log
-t/tap-test-number-0-w.log: t/tap-test-number-0.sh
-t/tap-test-number-0-w.log: t/tap-test-number-0.log
-t/tap-recheck-logs-w.log: t/tap-recheck-logs.sh
-t/tap-recheck-logs-w.log: t/tap-recheck-logs.log
-t/tap-result-comment-w.log: t/tap-result-comment.sh
-t/tap-result-comment-w.log: t/tap-result-comment.log
-t/tap-todo-skip-together-w.log: t/tap-todo-skip-together.sh
-t/tap-todo-skip-together-w.log: t/tap-todo-skip-together.log
-t/tap-todo-skip-whitespace-w.log: t/tap-todo-skip-whitespace.sh
-t/tap-todo-skip-whitespace-w.log: t/tap-todo-skip-whitespace.log
-t/tap-todo-skip-w.log: t/tap-todo-skip.sh
-t/tap-todo-skip-w.log: t/tap-todo-skip.log
-t/tap-unplanned-w.log: t/tap-unplanned.sh
-t/tap-unplanned-w.log: t/tap-unplanned.log
-t/tap-whitespace-normalization-w.log: t/tap-whitespace-normalization.sh
-t/tap-whitespace-normalization-w.log: t/tap-whitespace-normalization.log
-t/tap-with-and-without-number-w.log: t/tap-with-and-without-number.sh
-t/tap-with-and-without-number-w.log: t/tap-with-and-without-number.log
-t/tap-xfail-tests-w.log: t/tap-xfail-tests.sh
-t/tap-xfail-tests-w.log: t/tap-xfail-tests.log
-t/tap-bad-prog-w.log: t/tap-bad-prog.tap
-t/tap-bad-prog-w.log: t/tap-bad-prog.log
-t/tap-basic-w.log: t/tap-basic.sh
-t/tap-basic-w.log: t/tap-basic.log
-t/tap-diagnostic-custom-w.log: t/tap-diagnostic-custom.sh
-t/tap-diagnostic-custom-w.log: t/tap-diagnostic-custom.log
-t/tap-driver-stderr-w.log: t/tap-driver-stderr.sh
-t/tap-driver-stderr-w.log: t/tap-driver-stderr.log
-t/tap-doc-w.log: t/tap-doc.sh
-t/tap-doc-w.log: t/tap-doc.log
-t/tap-more-w.log: t/tap-more.sh
-t/tap-more-w.log: t/tap-more.log
-t/tap-more2-w.log: t/tap-more2.sh
-t/tap-more2-w.log: t/tap-more2.log
-t/tap-recheck-w.log: t/tap-recheck.sh
-t/tap-recheck-w.log: t/tap-recheck.log
 
 ## ---------------------------------------------------- ##
 ##  Ad-hoc autogenerated tests and their dependencies.  ##
@@ -240,139 +84,135 @@ t/tap-recheck-w.log: t/tap-recheck.log
 ## Tests on automatic dependency tracking (see 'depcomp.sh').
 generated_TESTS =
 generated_TESTS += t/ar-lib-w.sh
+generated_TESTS += t/built-sources-check-w.sh
+generated_TESTS += t/check-exported-srcdir-w.sh
+generated_TESTS += t/check-fd-redirect-w.sh
+generated_TESTS += t/check-subst-prog-w.sh
+generated_TESTS += t/check-subst-w.sh
+generated_TESTS += t/check-tests-in-builddir-w.sh
+generated_TESTS += t/check-w.sh
+generated_TESTS += t/check11-w.sh
+generated_TESTS += t/check12-w.sh
+generated_TESTS += t/check2-w.sh
+generated_TESTS += t/check4-w.sh
+generated_TESTS += t/check5-w.sh
+generated_TESTS += t/check6-w.sh
+generated_TESTS += t/check7-w.sh
+generated_TESTS += t/check8-w.sh
+generated_TESTS += t/color-tests-w.sh
+generated_TESTS += t/color-tests2-w.sh
 generated_TESTS += t/compile-w.sh
 generated_TESTS += t/compile2-w.sh
 generated_TESTS += t/compile3-w.sh
 generated_TESTS += t/compile4-w.sh
 generated_TESTS += t/compile5-w.sh
 generated_TESTS += t/compile6-w.sh
-generated_TESTS += t/instsh2-w.sh
-generated_TESTS += t/instsh3-w.sh
+generated_TESTS += t/compile7-w.sh
+generated_TESTS += t/exeext4-w.sh
+generated_TESTS += t/install-sh-option-C-w.sh
+generated_TESTS += t/install-sh-unittests-w.sh
+generated_TESTS += t/maken3-w.sh
 generated_TESTS += t/mdate5-w.sh
 generated_TESTS += t/mdate6-w.sh
-generated_TESTS += t/missing-w.sh
-generated_TESTS += t/missing2-w.sh
+generated_TESTS += t/missing-version-mismatch-w.sh
 generated_TESTS += t/missing3-w.sh
-generated_TESTS += t/missing5-w.sh
 generated_TESTS += t/mkinst3-w.sh
-generated_TESTS += t/check-w.sh
-generated_TESTS += t/check2-w.sh
-generated_TESTS += t/check3-w.sh
-generated_TESTS += t/check4-w.sh
-generated_TESTS += t/check5-w.sh
-generated_TESTS += t/check6-w.sh
-generated_TESTS += t/check7-w.sh
-generated_TESTS += t/check8-w.sh
-generated_TESTS += t/check11-w.sh
-generated_TESTS += t/check12-w.sh
-generated_TESTS += t/check-subst-w.sh
-generated_TESTS += t/check-subst-prog-w.sh
-generated_TESTS += t/check-exported-srcdir-w.sh
-generated_TESTS += t/check-fd-redirect-w.sh
-generated_TESTS += t/check-tests-in-builddir-w.sh
-generated_TESTS += t/color-w.sh
-generated_TESTS += t/color2-w.sh
-generated_TESTS += t/exeext4-w.sh
-generated_TESTS += t/maken3-w.sh
 generated_TESTS += t/posixsubst-tests-w.sh
-generated_TESTS += t/tap-ambiguous-directive-w.sh
-generated_TESTS += t/tap-autonumber-w.sh
-generated_TESTS += t/tap-bailout-w.sh
-generated_TESTS += t/tap-bailout-and-logging-w.sh
-generated_TESTS += t/tap-bailout-suppress-badexit-w.sh
-generated_TESTS += t/tap-bailout-suppress-later-diagnostic-w.sh
-generated_TESTS += t/tap-bailout-suppress-later-errors-w.sh
-generated_TESTS += t/tap-color-w.sh
-generated_TESTS += t/tap-deps-w.sh
-generated_TESTS += t/tap-diagnostic-w.sh
-generated_TESTS += t/tap-empty-diagnostic-w.sh
-generated_TESTS += t/tap-empty-w.sh
-generated_TESTS += t/tap-escape-directive-w.sh
-generated_TESTS += t/tap-escape-directive-2-w.sh
-generated_TESTS += t/tap-exit-w.sh
-generated_TESTS += t/tap-signal-w.tap
-generated_TESTS += t/tap-fancy-w.sh
-generated_TESTS += t/tap-fancy2-w.sh
-generated_TESTS += t/tap-global-log-w.sh
-generated_TESTS += t/tap-global-result-w.sh
-generated_TESTS += t/tap-log-w.sh
-generated_TESTS += t/tap-msg0-result-w.sh
-generated_TESTS += t/tap-msg0-directive-w.sh
-generated_TESTS += t/tap-msg0-planskip-w.sh
-generated_TESTS += t/tap-msg0-bailout-w.sh
-generated_TESTS += t/tap-msg0-misc-w.sh
-generated_TESTS += t/tap-merge-stdout-stderr-w.sh
-generated_TESTS += t/tap-no-merge-stdout-stderr-w.sh
-generated_TESTS += t/tap-no-disable-hard-error-w.sh
-generated_TESTS += t/tap-no-spurious-summary-w.sh
-generated_TESTS += t/tap-no-spurious-numbers-w.sh
-generated_TESTS += t/tap-no-spurious-w.sh
-generated_TESTS += t/tap-not-ok-skip-w.sh
-generated_TESTS += t/tap-number-wordboundary-w.sh
-generated_TESTS += t/tap-numeric-description-w.sh
-generated_TESTS += t/tap-negative-numbers-w.sh
-generated_TESTS += t/tap-numbers-leading-zero-w.sh
-generated_TESTS += t/tap-out-of-order-w.sh
-generated_TESTS += t/tap-passthrough-w.sh
-generated_TESTS += t/tap-passthrough-exit-w.sh
-generated_TESTS += t/tap-plan-w.sh
-generated_TESTS += t/tap-plan-corner-w.sh
-generated_TESTS += t/tap-plan-errors-w.sh
-generated_TESTS += t/tap-plan-middle-w.sh
-generated_TESTS += t/tap-plan-whitespace-w.sh
-generated_TESTS += t/tap-plan-leading-zero-w.sh
-generated_TESTS += t/tap-plan-malformed-w.sh
-generated_TESTS += t/tap-missing-plan-and-bad-exit-w.sh
-generated_TESTS += t/tap-planskip-w.sh
-generated_TESTS += t/tap-planskip-late-w.sh
-generated_TESTS += t/tap-planskip-and-logging-w.sh
-generated_TESTS += t/tap-planskip-unplanned-w.sh
-generated_TESTS += t/tap-planskip-unplanned-corner-w.sh
-generated_TESTS += t/tap-planskip-case-insensitive-w.sh
-generated_TESTS += t/tap-planskip-whitespace-w.sh
-generated_TESTS += t/tap-planskip-badexit-w.sh
-generated_TESTS += t/tap-planskip-bailout-w.sh
-generated_TESTS += t/tap-planskip-later-errors-w.sh
-generated_TESTS += t/tap-realtime-w.sh
-generated_TESTS += t/tap-test-number-0-w.sh
-generated_TESTS += t/tap-recheck-logs-w.sh
-generated_TESTS += t/tap-result-comment-w.sh
-generated_TESTS += t/tap-todo-skip-together-w.sh
-generated_TESTS += t/tap-todo-skip-whitespace-w.sh
-generated_TESTS += t/tap-todo-skip-w.sh
-generated_TESTS += t/tap-unplanned-w.sh
-generated_TESTS += t/tap-whitespace-normalization-w.sh
-generated_TESTS += t/tap-with-and-without-number-w.sh
-generated_TESTS += t/tap-xfail-tests-w.sh
-generated_TESTS += t/tap-bad-prog-w.tap
-generated_TESTS += t/tap-basic-w.sh
-generated_TESTS += t/tap-diagnostic-custom-w.sh
-generated_TESTS += t/tap-driver-stderr-w.sh
-generated_TESTS += t/tap-doc-w.sh
-generated_TESTS += t/tap-more-w.sh
-generated_TESTS += t/tap-more2-w.sh
-generated_TESTS += t/tap-recheck-w.sh
-generated_TESTS += t/depcomp-lt-msvcmsys.tap
-generated_TESTS += t/depcomp-lt-disabled.tap
-generated_TESTS += t/depcomp-lt-msvisualcpp.tap
-generated_TESTS += t/depcomp-lt-makedepend.tap
 generated_TESTS += t/depcomp-lt-auto.tap
 generated_TESTS += t/depcomp-lt-cpp.tap
-generated_TESTS += t/depcomp-lt-gcc.tap
 generated_TESTS += t/depcomp-lt-dashmstdout.tap
-generated_TESTS += t/depcomp-msvcmsys.tap
-generated_TESTS += t/depcomp-disabled.tap
-generated_TESTS += t/depcomp-msvisualcpp.tap
-generated_TESTS += t/depcomp-makedepend.tap
+generated_TESTS += t/depcomp-lt-disabled.tap
+generated_TESTS += t/depcomp-lt-gcc.tap
+generated_TESTS += t/depcomp-lt-makedepend.tap
+generated_TESTS += t/depcomp-lt-msvcmsys.tap
+generated_TESTS += t/depcomp-lt-msvisualcpp.tap
 generated_TESTS += t/depcomp-auto.tap
 generated_TESTS += t/depcomp-cpp.tap
-generated_TESTS += t/depcomp-gcc.tap
 generated_TESTS += t/depcomp-dashmstdout.tap
+generated_TESTS += t/depcomp-disabled.tap
+generated_TESTS += t/depcomp-gcc.tap
+generated_TESTS += t/depcomp-makedepend.tap
+generated_TESTS += t/depcomp-msvcmsys.tap
+generated_TESTS += t/depcomp-msvisualcpp.tap
 
 ## ----------------------------- ##
 ##  Autogenerated dependencies.  ##
 ## ----------------------------- ##
 
+## Added by deps-extracting key 'check_tap_testsuite_summary'.
+check_tap_testsuite_summary_TESTS = \
+  t/tap-summary.sh \
+  t/tap-summary-color.sh
+EXTRA_DIST += t/ax/tap-summary-aux.sh
+t/tap-summary.log: t/ax/tap-summary-aux.sh 
+t/tap-summary-color.log: t/ax/tap-summary-aux.sh 
+
+## Added by deps-extracting key 'check_testsuite_summary'.
+check_testsuite_summary_TESTS = \
+  t/testsuite-summary-color.sh \
+  t/testsuite-summary-count.sh
+EXTRA_DIST += t/ax/testsuite-summary-checks.sh
+t/testsuite-summary-color.log: t/ax/testsuite-summary-checks.sh 
+t/testsuite-summary-count.log: t/ax/testsuite-summary-checks.sh 
+
+## Added by deps-extracting key 'depcomp'.
+depcomp_TESTS = \
+  t/depcomp-lt-auto.tap \
+  t/depcomp-lt-cpp.tap \
+  t/depcomp-lt-dashmstdout.tap \
+  t/depcomp-lt-disabled.tap \
+  t/depcomp-lt-gcc.tap \
+  t/depcomp-lt-makedepend.tap \
+  t/depcomp-lt-msvcmsys.tap \
+  t/depcomp-lt-msvisualcpp.tap \
+  t/depcomp-auto.tap \
+  t/depcomp-cpp.tap \
+  t/depcomp-dashmstdout.tap \
+  t/depcomp-disabled.tap \
+  t/depcomp-gcc.tap \
+  t/depcomp-makedepend.tap \
+  t/depcomp-msvcmsys.tap \
+  t/depcomp-msvisualcpp.tap
+EXTRA_DIST += t/ax/depcomp.sh
+t/depcomp-lt-auto.log: t/ax/depcomp.sh 
+t/depcomp-lt-cpp.log: t/ax/depcomp.sh 
+t/depcomp-lt-dashmstdout.log: t/ax/depcomp.sh 
+t/depcomp-lt-disabled.log: t/ax/depcomp.sh 
+t/depcomp-lt-gcc.log: t/ax/depcomp.sh 
+t/depcomp-lt-makedepend.log: t/ax/depcomp.sh 
+t/depcomp-lt-msvcmsys.log: t/ax/depcomp.sh 
+t/depcomp-lt-msvisualcpp.log: t/ax/depcomp.sh 
+t/depcomp-auto.log: t/ax/depcomp.sh 
+t/depcomp-cpp.log: t/ax/depcomp.sh 
+t/depcomp-dashmstdout.log: t/ax/depcomp.sh 
+t/depcomp-disabled.log: t/ax/depcomp.sh 
+t/depcomp-gcc.log: t/ax/depcomp.sh 
+t/depcomp-makedepend.log: t/ax/depcomp.sh 
+t/depcomp-msvcmsys.log: t/ax/depcomp.sh 
+t/depcomp-msvisualcpp.log: t/ax/depcomp.sh 
+
+## Added by deps-extracting key 'extract_testsuite_summary'.
+extract_testsuite_summary_TESTS = \
+  t/testsuite-summary-count-many.sh
+EXTRA_DIST += t/ax/extract-testsuite-summary.pl
+t/testsuite-summary-count-many.log: t/ax/extract-testsuite-summary.pl 
+
+## Added by deps-extracting key 'gettext_macros'.
+gettext_macros_TESTS = \
+  t/gettext-basics.sh \
+  t/gettext-config-rpath.sh \
+  t/gettext-external-pr338.sh \
+  t/gettext-intl-subdir.sh \
+  t/gettext-pr381.sh \
+  t/subdir-cond-gettext.sh
+EXTRA_DIST += 
+t/gettext-basics.log:  t/gettext-macros.log
+t/gettext-config-rpath.log:  t/gettext-macros.log
+t/gettext-external-pr338.log:  t/gettext-macros.log
+t/gettext-intl-subdir.log:  t/gettext-macros.log
+t/gettext-pr381.log:  t/gettext-macros.log
+t/subdir-cond-gettext.log:  t/gettext-macros.log
+
 ## Added by deps-extracting key 'libtool_macros'.
 libtool_macros_TESTS = \
   t/ar-lib4.sh \
@@ -380,8 +220,10 @@ libtool_macros_TESTS = \
   t/ar-lib6b.sh \
   t/canon6.sh \
   t/canon7.sh \
+  t/ccnoco-lt.sh \
+  t/cxx-lt-demo.sh \
   t/depcomp8b.sh \
-  t/extradep2.sh \
+  t/extra-deps-lt.sh \
   t/fort5.sh \
   t/instdir-ltlib.sh \
   t/instfail-libtool.sh \
@@ -417,34 +259,35 @@ libtool_macros_TESTS = \
   t/pr307.sh \
   t/pr401b.sh \
   t/reqd2.sh \
-  t/silent3.sh \
-  t/silent4.sh \
-  t/silent9.sh \
+  t/silent-lt.sh \
   t/stdlib2.sh \
   t/strip3.sh \
   t/subobj9.sh \
+  t/subobj-clean-lt-pr10697.sh \
   t/suffix2.sh \
   t/suffix5.sh \
   t/suffix8.tap \
   t/suffix10.tap \
   t/vala-libs.sh \
   t/vartypo2.sh \
-  t/depcomp-lt-msvcmsys.tap \
-  t/depcomp-lt-disabled.tap \
-  t/depcomp-lt-msvisualcpp.tap \
-  t/depcomp-lt-makedepend.tap \
   t/depcomp-lt-auto.tap \
   t/depcomp-lt-cpp.tap \
+  t/depcomp-lt-dashmstdout.tap \
+  t/depcomp-lt-disabled.tap \
   t/depcomp-lt-gcc.tap \
-  t/depcomp-lt-dashmstdout.tap
+  t/depcomp-lt-makedepend.tap \
+  t/depcomp-lt-msvcmsys.tap \
+  t/depcomp-lt-msvisualcpp.tap
 EXTRA_DIST += 
 t/ar-lib4.log:  t/libtool-macros.log
 t/ar-lib6a.log:  t/libtool-macros.log
 t/ar-lib6b.log:  t/libtool-macros.log
 t/canon6.log:  t/libtool-macros.log
 t/canon7.log:  t/libtool-macros.log
+t/ccnoco-lt.log:  t/libtool-macros.log
+t/cxx-lt-demo.log:  t/libtool-macros.log
 t/depcomp8b.log:  t/libtool-macros.log
-t/extradep2.log:  t/libtool-macros.log
+t/extra-deps-lt.log:  t/libtool-macros.log
 t/fort5.log:  t/libtool-macros.log
 t/instdir-ltlib.log:  t/libtool-macros.log
 t/instfail-libtool.log:  t/libtool-macros.log
@@ -480,34 +323,25 @@ t/pr300-ltlib.log:  t/libtool-macros.log
 t/pr307.log:  t/libtool-macros.log
 t/pr401b.log:  t/libtool-macros.log
 t/reqd2.log:  t/libtool-macros.log
-t/silent3.log:  t/libtool-macros.log
-t/silent4.log:  t/libtool-macros.log
-t/silent9.log:  t/libtool-macros.log
+t/silent-lt.log:  t/libtool-macros.log
 t/stdlib2.log:  t/libtool-macros.log
 t/strip3.log:  t/libtool-macros.log
 t/subobj9.log:  t/libtool-macros.log
+t/subobj-clean-lt-pr10697.log:  t/libtool-macros.log
 t/suffix2.log:  t/libtool-macros.log
 t/suffix5.log:  t/libtool-macros.log
 t/suffix8.log:  t/libtool-macros.log
 t/suffix10.log:  t/libtool-macros.log
 t/vala-libs.log:  t/libtool-macros.log
 t/vartypo2.log:  t/libtool-macros.log
-t/depcomp-lt-msvcmsys.log:  t/libtool-macros.log
-t/depcomp-lt-disabled.log:  t/libtool-macros.log
-t/depcomp-lt-msvisualcpp.log:  t/libtool-macros.log
-t/depcomp-lt-makedepend.log:  t/libtool-macros.log
 t/depcomp-lt-auto.log:  t/libtool-macros.log
 t/depcomp-lt-cpp.log:  t/libtool-macros.log
-t/depcomp-lt-gcc.log:  t/libtool-macros.log
 t/depcomp-lt-dashmstdout.log:  t/libtool-macros.log
-
-## Added by deps-extracting key 'check_testsuite_summary'.
-check_testsuite_summary_TESTS = \
-  t/testsuite-summary-color.sh \
-  t/testsuite-summary-count.sh
-EXTRA_DIST += t/ax/testsuite-summary-checks.sh
-t/testsuite-summary-color.log: t/ax/testsuite-summary-checks.sh 
-t/testsuite-summary-count.log: t/ax/testsuite-summary-checks.sh 
+t/depcomp-lt-disabled.log:  t/libtool-macros.log
+t/depcomp-lt-gcc.log:  t/libtool-macros.log
+t/depcomp-lt-makedepend.log:  t/libtool-macros.log
+t/depcomp-lt-msvcmsys.log:  t/libtool-macros.log
+t/depcomp-lt-msvisualcpp.log:  t/libtool-macros.log
 
 ## Added by deps-extracting key 'on_tap_with_common_setup'.
 on_tap_with_common_setup_TESTS = \
@@ -569,7 +403,6 @@ on_tap_with_common_setup_TESTS = \
   t/tap-planskip-badexit.sh \
   t/tap-planskip-bailout.sh \
   t/tap-planskip-later-errors.sh \
-  t/tap-realtime.sh \
   t/tap-test-number-0.sh \
   t/tap-recheck-logs.sh \
   t/tap-result-comment.sh \
@@ -639,7 +472,6 @@ t/tap-planskip-whitespace.log: t/ax/tap-setup.sh t/tap-common-setup.log
 t/tap-planskip-badexit.log: t/ax/tap-setup.sh t/tap-common-setup.log
 t/tap-planskip-bailout.log: t/ax/tap-setup.sh t/tap-common-setup.log
 t/tap-planskip-later-errors.log: t/ax/tap-setup.sh t/tap-common-setup.log
-t/tap-realtime.log: t/ax/tap-setup.sh t/tap-common-setup.log
 t/tap-test-number-0.log: t/ax/tap-setup.sh t/tap-common-setup.log
 t/tap-recheck-logs.log: t/ax/tap-setup.sh t/tap-common-setup.log
 t/tap-result-comment.log: t/ax/tap-setup.sh t/tap-common-setup.log
@@ -651,67 +483,29 @@ t/tap-whitespace-normalization.log: t/ax/tap-setup.sh t/tap-common-setup.log
 t/tap-with-and-without-number.log: t/ax/tap-setup.sh t/tap-common-setup.log
 t/tap-xfail-tests.log: t/ax/tap-setup.sh t/tap-common-setup.log
 
-## Added by deps-extracting key 'check_tap_testsuite_summary'.
-check_tap_testsuite_summary_TESTS = \
-  t/tap-summary.sh \
-  t/tap-summary-color.sh
-EXTRA_DIST += t/ax/tap-summary-aux.sh
-t/tap-summary.log: t/ax/tap-summary-aux.sh 
-t/tap-summary-color.log: t/ax/tap-summary-aux.sh 
-
-## Added by deps-extracting key 'depcomp'.
-depcomp_TESTS = \
-  t/depcomp-lt-msvcmsys.tap \
-  t/depcomp-lt-disabled.tap \
-  t/depcomp-lt-msvisualcpp.tap \
-  t/depcomp-lt-makedepend.tap \
-  t/depcomp-lt-auto.tap \
-  t/depcomp-lt-cpp.tap \
-  t/depcomp-lt-gcc.tap \
-  t/depcomp-lt-dashmstdout.tap \
-  t/depcomp-msvcmsys.tap \
-  t/depcomp-disabled.tap \
-  t/depcomp-msvisualcpp.tap \
-  t/depcomp-makedepend.tap \
-  t/depcomp-auto.tap \
-  t/depcomp-cpp.tap \
-  t/depcomp-gcc.tap \
-  t/depcomp-dashmstdout.tap
-EXTRA_DIST += t/ax/depcomp.sh
-t/depcomp-lt-msvcmsys.log: t/ax/depcomp.sh 
-t/depcomp-lt-disabled.log: t/ax/depcomp.sh 
-t/depcomp-lt-msvisualcpp.log: t/ax/depcomp.sh 
-t/depcomp-lt-makedepend.log: t/ax/depcomp.sh 
-t/depcomp-lt-auto.log: t/ax/depcomp.sh 
-t/depcomp-lt-cpp.log: t/ax/depcomp.sh 
-t/depcomp-lt-gcc.log: t/ax/depcomp.sh 
-t/depcomp-lt-dashmstdout.log: t/ax/depcomp.sh 
-t/depcomp-msvcmsys.log: t/ax/depcomp.sh 
-t/depcomp-disabled.log: t/ax/depcomp.sh 
-t/depcomp-msvisualcpp.log: t/ax/depcomp.sh 
-t/depcomp-makedepend.log: t/ax/depcomp.sh 
-t/depcomp-auto.log: t/ax/depcomp.sh 
-t/depcomp-cpp.log: t/ax/depcomp.sh 
-t/depcomp-gcc.log: t/ax/depcomp.sh 
-t/depcomp-dashmstdout.log: t/ax/depcomp.sh 
-
-## Added by deps-extracting key 'extract_testsuite_summary'.
-extract_testsuite_summary_TESTS = \
-  t/testsuite-summary-count-many.sh
-EXTRA_DIST += t/ax/extract-testsuite-summary.pl
-t/testsuite-summary-count-many.log: t/ax/extract-testsuite-summary.pl 
-
-## Added by deps-extracting key 'gettext_macros'.
-gettext_macros_TESTS = \
-  t/gettext.sh \
-  t/gettext2.sh \
-  t/gettext3.sh \
-  t/subcond.sh
+## Added by deps-extracting key 'pkgconfig_macros'.
+pkgconfig_macros_TESTS = \
+  t/vala-headers.sh \
+  t/vala-libs.sh \
+  t/vala-mix.sh \
+  t/vala-mix2.sh \
+  t/vala-non-recursive-setup.sh \
+  t/vala-parallel.sh \
+  t/vala-per-target-flags.sh \
+  t/vala-recursive-setup.sh \
+  t/vala-vapi.sh \
+  t/vala-vpath.sh
 EXTRA_DIST += 
-t/gettext.log:  t/gettext-macros.log
-t/gettext2.log:  t/gettext-macros.log
-t/gettext3.log:  t/gettext-macros.log
-t/subcond.log:  t/gettext-macros.log
+t/vala-headers.log:  t/pkg-config-macros.log
+t/vala-libs.log:  t/pkg-config-macros.log
+t/vala-mix.log:  t/pkg-config-macros.log
+t/vala-mix2.log:  t/pkg-config-macros.log
+t/vala-non-recursive-setup.log:  t/pkg-config-macros.log
+t/vala-parallel.log:  t/pkg-config-macros.log
+t/vala-per-target-flags.log:  t/pkg-config-macros.log
+t/vala-recursive-setup.log:  t/pkg-config-macros.log
+t/vala-vapi.log:  t/pkg-config-macros.log
+t/vala-vpath.log:  t/pkg-config-macros.log
 
 ## Added by deps-extracting key 'use_trivial_test_driver'.
 use_trivial_test_driver_TESTS = \
old mode 100755 (executable)
new mode 100644 (file)
index 0f00708..04106ce
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2011-2012 Free Software Foundation, Inc.
+# Copyright (C) 2011-2017 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
 
 # Check coloring of the testsuite summary.
 
-. ./defs-static || Exit 1
+. test-lib.sh
 
-use_colors=yes
-use_vpath=no
-
-. "$am_testauxdir"/testsuite-summary-checks.sh || Exit 99
+use_colors=yes; use_vpath=no
+. testsuite-summary-checks.sh
 
 ./configure
 
old mode 100755 (executable)
new mode 100644 (file)
index b101206..9026a12
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2011-2012 Free Software Foundation, Inc.
+# Copyright (C) 2011-2017 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
 # Incidentally, this test also checks that the testsuite summary doesn't
 # give any bug-report address if it's not defined.
 
-. ./defs || Exit 1
+. test-init.sh
 
 for s in trivial-test-driver extract-testsuite-summary.pl; do
-  cp "$am_testauxdir/$s" . || fatal_ "failed to fetch auxiliary script $s"
+  cp "$am_testaux_srcdir/$s" . || fatal_ "failed to fetch auxiliary script $s"
 done
 
 br='============================================================================'
@@ -91,12 +91,12 @@ $AUTOCONF
 
 ./configure
 
-($MAKE check || : > make.fail) | tee stdout
+($MAKE check || touch make.fail) | tee stdout
 test -f make.fail
 
 $PERL extract-testsuite-summary.pl stdout > summary.got
 cat summary.exp
 cat summary.got
-diff summary.exp summary.got || Exit 1
+diff summary.exp summary.got || exit 1
 
 :
old mode 100755 (executable)
new mode 100644 (file)
index 1d13e7e..1836244
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2011-2012 Free Software Foundation, Inc.
+# Copyright (C) 2011-2017 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
 
 # Check test counts in the testsuite summary.
 
-. ./defs-static || Exit 1
+. test-lib.sh
 
-use_colors=no
-use_vpath=no
-
-. "$am_testauxdir"/testsuite-summary-checks.sh || Exit 99
+use_colors=no; use_vpath=no
+. testsuite-summary-checks.sh
 
 ./configure
 
@@ -110,12 +108,12 @@ xpass_count=23
 error_count=17
 tests_count=120
 
-pass=` seq_ 1 $pass_count  | sed 's/.*/pass-&.t/'`
-skip=` seq_ 1 $skip_count  | sed 's/.*/skip-&.t/'`
-xfail=`seq_ 1 $xfail_count | sed 's/.*/xfail-&.t/'`
-fail=` seq_ 1 $fail_count  | sed 's/.*/fail-&.t/'`
-xpass=`seq_ 1 $xpass_count | sed 's/.*/xpass-&.t/'`
-error=`seq_ 1 $error_count | sed 's/.*/error-&.t/'`
+ pass=$(seq_ 1 $pass_count  | sed 's/.*/pass-&.t/')
+ skip=$(seq_ 1 $skip_count  | sed 's/.*/skip-&.t/')
+xfail=$(seq_ 1 $xfail_count | sed 's/.*/xfail-&.t/')
+ fail=$(seq_ 1 $fail_count  | sed 's/.*/fail-&.t/')
+xpass=$(seq_ 1 $xpass_count | sed 's/.*/xpass-&.t/')
+error=$(seq_ 1 $error_count | sed 's/.*/error-&.t/')
 
 do_check $pass $skip $xfail $fail $xpass $error <<END
 $header
@@ -139,12 +137,12 @@ fail_count=126
 xpass_count=17
 error_count=9
 
-pass=` seq_ 1 $pass_count  | sed 's/.*/pass-&.t/'`
-skip=` seq_ 1 $skip_count  | sed 's/.*/skip-&.t/'`
-xfail=`seq_ 1 $xfail_count | sed 's/.*/xfail-&.t/'`
-fail=` seq_ 1 $fail_count  | sed 's/.*/fail-&.t/'`
-xpass=`seq_ 1 $xpass_count | sed 's/.*/xpass-&.t/'`
-error=`seq_ 1 $error_count | sed 's/.*/error-&.t/'`
+ pass=$(seq_ 1 $pass_count  | sed 's/.*/pass-&.t/')
+ skip=$(seq_ 1 $skip_count  | sed 's/.*/skip-&.t/')
+xfail=$(seq_ 1 $xfail_count | sed 's/.*/xfail-&.t/')
+ fail=$(seq_ 1 $fail_count  | sed 's/.*/fail-&.t/')
+xpass=$(seq_ 1 $xpass_count | sed 's/.*/xpass-&.t/')
+error=$(seq_ 1 $error_count | sed 's/.*/error-&.t/')
 
 do_check $pass $skip $xfail $fail $xpass $error <<END
 $header
old mode 100755 (executable)
new mode 100644 (file)
index 1958dd4..d9e9a8d
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2011-2012 Free Software Foundation, Inc.
+# Copyright (C) 2011-2017 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
@@ -17,7 +17,7 @@
 # Check that the global testsuite log file referenced in the testsuite
 # summary and in the global testsuite log itself is correct.
 
-. ./defs || Exit 1
+. test-init.sh
 
 mv configure.ac configure.stub
 
@@ -45,13 +45,11 @@ cd build
 
 ../configure
 
-$MAKE check >stdout && { cat stdout; Exit 1; }
-cat stdout
+run_make -O -e FAIL check
 grep '^See \./my_test_suite\.log$' stdout
 
 mkdir bar
-TEST_SUITE_LOG=bar/bar.log $MAKE -e check >stdout && { cat stdout; Exit 1; }
-cat stdout
+run_make -O -e FAIL TEST_SUITE_LOG=bar/bar.log check
 grep '^See \./bar/bar\.log$' stdout
 
 cd ..
@@ -71,17 +69,14 @@ $AUTOCONF --force
 $AUTOMAKE
 
 ./configure
-$MAKE check >stdout && { cat stdout; Exit 1; }
-cat stdout
+run_make -O -e FAIL check
 grep '^See sub/test-suite\.log$' stdout
 cd sub
-$MAKE check >stdout && { cat stdout; Exit 1; }
-cat stdout
+run_make -O -e FAIL check
 grep '^See sub/test-suite\.log$' stdout
 cd ..
 
-TEST_SUITE_LOG=foo.log $MAKE -e check >stdout && { cat stdout; Exit 1; }
-cat stdout
+run_make -O -e FAIL TEST_SUITE_LOG=foo.log check
 grep '^See sub/foo\.log$' stdout
 
 :
old mode 100755 (executable)
new mode 100644 (file)
index 7aa958e..c67011b
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2002-2012 Free Software Foundation, Inc.
+# Copyright (C) 2002-2017 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
@@ -17,7 +17,7 @@
 # Make sure that --program-transform works.
 
 required=cc
-. ./defs || Exit 1
+. test-init.sh
 
 cat >>configure.ac <<'END'
 AC_PROG_CC
@@ -50,11 +50,14 @@ $ACLOCAL
 $AUTOCONF
 $AUTOMAKE
 
-./configure --program-prefix=gnu- --prefix "`pwd`/inst" --mandir "`pwd`/inst/man"
+cwd=$(pwd) || fatal_ "getting current working directory"
+
+./configure --program-prefix=gnu- --prefix "$cwd/inst" \
+                                  --mandir "$cwd/inst/man"
 $MAKE
 $MAKE test-install
 $MAKE uninstall
-test `find inst -type f -print | wc -l` = 0
+test $(find inst -type f -print | wc -l) -eq 0
 
 # Opportunistically test for installdirs.
 rm -rf inst
old mode 100755 (executable)
new mode 100644 (file)
index a4a94f7..d258736
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2002-2012 Free Software Foundation, Inc.
+# Copyright (C) 2002-2017 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
@@ -18,7 +18,7 @@
 # collapsed.
 
 required=cc
-. ./defs || Exit 1
+. test-init.sh
 
 cat >>configure.ac <<'END'
 AC_PROG_CC
@@ -66,17 +66,20 @@ $ACLOCAL
 $AUTOCONF
 $AUTOMAKE
 
-./configure --program-transform-name='s/[12]//' --prefix "`pwd`/inst" --mandir "`pwd`/inst/man"
+cwd=$(pwd) || fatal_ "getting current working directory"
+
+./configure --program-transform-name='s/[12]//' --prefix "$cwd/inst" \
+                                                --mandir "$cwd/inst/man"
 $MAKE
 $MAKE test-install
 $MAKE uninstall
-test `find inst -type f -print | wc -l` = 0
+test $(find inst -type f -print | wc -l) -eq 0
 
 # Also squash all file types in question.
 
 # On newer Cygwin versions, that won't work, likely due to overly
 # aggressive appending of '.exe' suffix when copying/renaming Windows
-# executables).  So let's skip this part of the test if we detect the
+# executables.  So let's skip this part of the test if we detect the
 # faulty heuristic is present.  See also:
 # <http://lists.gnu.org/archive/html/automake-patches/2010-08/msg00153.html>
 # <http://thread.gmane.org/gmane.os.cygwin/119380>
@@ -86,10 +89,11 @@ chmod a+x foo bar.exe
 cp foo bar && cmp foo bar \
   || skip_ "your Cygwin is too aggressive in tweaking '.exe' suffixes"
 
-./configure --program-transform-name='s/.*/foo/' --prefix "`pwd`/inst" --mandir "`pwd`/inst/man"
+./configure --program-transform-name='s/.*/foo/' --prefix "$cwd/inst" \
+                                                 --mandir "$cwd/inst/man"
 $MAKE
 $MAKE test-install-foo
 $MAKE uninstall
-test `find inst -type f -print | wc -l` = 0
+test $(find inst -type f -print | wc -l) -eq 0
 
 :
old mode 100755 (executable)
new mode 100644 (file)
index 6f1b811..d03d644
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2012 Free Software Foundation, Inc.
+# Copyright (C) 2012-2017 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
@@ -18,7 +18,7 @@
 # stuff (in particular, pgklibdir, pkgdatadir and pkglibexecdir).
 
 required=cc
-. ./defs || Exit 1
+. test-init.sh
 
 cat > configure.ac <<'END'
 AC_INIT([foo], [1.0])
@@ -78,12 +78,12 @@ $ACLOCAL
 $AUTOCONF
 $AUTOMAKE -a
 
-./configure --program-prefix=gnu- --prefix "`pwd`/inst"
+./configure --program-prefix=gnu- --prefix "$(pwd)/inst"
 
 $MAKE test-install
 
 $MAKE uninstall
-test `find inst -type f -print | wc -l` = 0
+test $(find inst -type f -print | wc -l) -eq 0
 
 # Opportunistically test for installdirs.
 rm -rf inst
old mode 100755 (executable)
new mode 100644 (file)
similarity index 79%
rename from t/txinfo26.sh
rename to t/txinfo-absolute-srcdir-pr408.sh
index e336bba..5a99523
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2003-2012 Free Software Foundation, Inc.
+# Copyright (C) 2003-2017 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
@@ -18,7 +18,7 @@
 # PR/408
 
 required='makeinfo'
-. ./defs || Exit 1
+. test-init.sh
 
 echo AC_OUTPUT >> configure.ac
 
@@ -46,22 +46,25 @@ $AUTOCONF
 $MAKE
 $MAKE distclean
 
-case `pwd` in
-  *\ * | *\    *)
-    skip_ "this test might fail in a directory containing white spaces";;
-esac
+abscwd=$(pwd) || fatal_ "getting current working directory"
 
 mkdir build
 cd build
-../configure "--srcdir=`pwd`/.." "--prefix=`pwd`/_inst" "--infodir=`pwd`/_inst/info"
+../configure --srcdir="$abscwd" \
+             --prefix="$abscwd/build/_inst" \
+            --infodir="$abscwd/build/_inst/info"
+
 $MAKE install
+
 test -f ../main.info
-test ! -f ./main.info
+test ! -e ./main.info
 test -f _inst/info/main.info
 
 $MAKE uninstall
-test ! -f _inst/info/main.info
+test ! -e _inst/info/main.info
 test -f ../main.info
 
 # Multiple uninstall should not fail.
 $MAKE uninstall
+
+:
old mode 100755 (executable)
new mode 100644 (file)
similarity index 95%
rename from t/txinfo8.sh
rename to t/txinfo-add-missing-and-dist.sh
index 4b186bc..c1a7202
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 1999-2012 Free Software Foundation, Inc.
+# Copyright (C) 1999-2017 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
@@ -18,7 +18,7 @@
 # -a when we're using AC_CONFIG_AUX_DIR.  Bug report by by Per
 # Cederqvist.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat > configure.ac << END
 AC_INIT([$me], [1.0])
old mode 100755 (executable)
new mode 100644 (file)
similarity index 90%
rename from t/txinfo32.sh
rename to t/txinfo-bsd-make-recurs.sh
index 7fa7938..6d8e079
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2009-2012 Free Software Foundation, Inc.
+# Copyright (C) 2009-2017 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
@@ -17,7 +17,7 @@
 # Make sure the documentation targets work as required with BSD make,
 # even in the presence of subdirs (requires presence of default *-am rules).
 
-. ./defs || Exit 1
+. test-init.sh
 
 mkdir sub
 cat >>configure.ac <<'END'
@@ -32,9 +32,9 @@ END
 $ACLOCAL
 $AUTOCONF
 $AUTOMAKE
-./configure "--prefix=`pwd`/inst"
+./configure --prefix="$(pwd)/inst"
 $MAKE html dvi ps pdf info \
       install-html install-dvi install-ps install-pdf install-info \
       install-man install-data install-exec install uninstall
 
-Exit 0
+:
diff --git a/t/txinfo-builddir.sh b/t/txinfo-builddir.sh
new file mode 100644 (file)
index 0000000..5e4baaf
--- /dev/null
@@ -0,0 +1,131 @@
+#! /bin/sh
+# Copyright (C) 2012-2017 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 info files are built in builddir when needed.
+# This test that this can be done through the so far undocumented
+# option 'info-in-builddir', as requested by at least GCC, GDB,
+# GNU binutils and the GNU bfd library.  See automake bug#11034.
+
+required='makeinfo tex texi2dvi'
+. test-init.sh
+
+if useless_vpath_rebuild; then
+  skip_ "$MAKE has brittle VPATH support"
+fi
+
+echo AC_OUTPUT >> configure.ac
+
+cat > Makefile.am << 'END'
+AUTOMAKE_OPTIONS = info-in-builddir
+info_TEXINFOS = foo.texi subdir/bar.texi mu.texi
+subdir_bar_TEXINFOS = subdir/inc.texi
+CLEANFILES = mu.info
+
+# mu.info should not be rebuilt in the current directory, since
+# it's up-to-date in $(srcdir).
+# This can be caused by a subtle issue related to VPATH handling
+# of version.texi (see also the comment in texi-vers.am): because
+# stamp-vti is newer than version.texi, the 'version.texi: stamp-vti'
+# rule is always triggered.  Still that's not a reason for 'make'
+# to think 'version.texi' has been created...
+check-local:
+       test ! -e mu.info
+       test -f $(srcdir)/mu.info
+END
+
+mkdir subdir
+
+cat > foo.texi << 'END'
+\input texinfo
+@setfilename foo.info
+@settitle foo
+@node Top
+Hello walls.
+@include version.texi
+@bye
+END
+
+cat > mu.texi << 'END'
+\input texinfo
+@setfilename mu.info
+@settitle mu
+@node Top
+Mu mu mu.
+@bye
+END
+
+cat > subdir/bar.texi << 'END'
+\input texinfo
+@setfilename bar.info
+@settitle bar
+@node Top
+Hello walls.
+@include inc.texi
+@bye
+END
+
+echo "I'm included." > subdir/inc.texi
+
+$ACLOCAL
+$AUTOMAKE --add-missing
+$AUTOCONF
+
+mkdir build
+cd build
+../configure
+$MAKE info
+test -f foo.info
+test -f subdir/bar.info
+test -f mu.info
+test -f ../stamp-vti
+test -f ../version.texi
+test ! -e ../foo.info
+test ! -e ../subdir/bar.info
+test ! -e ../mu.info
+$MAKE clean
+test -f foo.info
+test -f subdir/bar.info
+test ! -e mu.info
+test -f ../stamp-vti
+test -f ../version.texi
+
+# Make sure stamp-vti is older that version.texi.
+# (A common situation in a real tree).
+$sleep
+touch ../stamp-vti
+
+$MAKE distcheck
+# Being distributed, this file should have been rebuilt.
+test -f mu.info
+
+$MAKE distclean
+test -f ../stamp-vti
+test -f ../version.texi
+test -f foo.info
+test -f subdir/bar.info
+test ! -e mu.info
+
+../configure
+$MAKE maintainer-clean
+test ! -e ../stamp-vti
+test ! -e ../version.texi
+test ! -e stamp-vti
+test ! -e version.texi
+test ! -e foo.info
+test ! -e subdir/bar.info
+test ! -e mu.info
+
+:
old mode 100755 (executable)
new mode 100644 (file)
similarity index 78%
rename from t/txinfo33.sh
rename to t/txinfo-clean.sh
index 4bdd767..d8e4e79
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2003-2012 Free Software Foundation, Inc.
+# Copyright (C) 2003-2017 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 # DVIS, PDFS, PSS, HTMLS should not be cleaned upon 'mostlyclean'.
-# Similar to txinfo25.test.
+# Similar to txinfo25.sh.
 
-required='makeinfo tex texi2dvi-o dvips'
-. ./defs || Exit 1
+required='makeinfo tex texi2dvi dvips'
+. test-init.sh
 
 mkdir sub
 
@@ -84,8 +84,8 @@ test -f sub/another.ps
 
 $MAKE mostlyclean
 
-ls *.aux && Exit 1
-ls sub/*.aux && Exit 1
+ls *.aux && exit 1
+ls sub/*.aux && exit 1
 
 test -f main.dvi
 test -f main.ps
@@ -103,20 +103,20 @@ test -f sub/another.ps
 
 $MAKE clean
 
-test ! -f main.dvi
-test ! -f main.ps
-test ! -f main.html && test ! -d main.html
-test ! -f main.pdf
-test ! -f other.pdf
-test ! -f sub/another.pdf
-test ! -f sub/yetanother.pdf
-
-test ! -f other.dvi
-test ! -f other.html && test ! -d other.html
-test ! -f other.ps
-test ! -f sub/another.dvi
-test ! -f sub/another.html && test ! -d sub/another.html
-test ! -f sub/another.ps
+test ! -e main.dvi
+test ! -e main.ps
+test ! -e main.html
+test ! -e main.pdf
+test ! -e other.pdf
+test ! -e sub/another.pdf
+test ! -e sub/yetanother.pdf
+
+test ! -e other.dvi
+test ! -e other.html
+test ! -e other.ps
+test ! -e sub/another.dvi
+test ! -e sub/another.html
+test ! -e sub/another.ps
 
 ./configure
 $MAKE
old mode 100755 (executable)
new mode 100644 (file)
similarity index 93%
rename from t/txinfo10.sh
rename to t/txinfo-dvi-recurs.sh
index 6908ab8..af01731
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2001-2012 Free Software Foundation, Inc.
+# Copyright (C) 2001-2017 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
@@ -17,7 +17,7 @@
 # Make sure dvi target recurses into subdir.
 # Reported by Pavel Roskin.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat > Makefile.am << 'END'
 SUBDIRS = sub
diff --git a/t/txinfo-include.sh b/t/txinfo-include.sh
new file mode 100644 (file)
index 0000000..0efda43
--- /dev/null
@@ -0,0 +1,164 @@
+#! /bin/sh
+# Copyright (C) 2012-2017 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'
+. test-init.sh
+
+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/desc.texi sub/hist.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 desc.texi
+@include hist.texi
+@bye
+END
+
+cat > sub/desc.texi << 'END'
+@node desc
+@chapter Description of this program
+It does something, really.
+END
+
+cat > sub/hist.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
+
+:
old mode 100755 (executable)
new mode 100644 (file)
similarity index 92%
rename from t/txinfo16.sh
rename to t/txinfo-info-in-srcdir.sh
index 173a87a..4798fb2
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2002-2012 Free Software Foundation, Inc.
+# Copyright (C) 2002-2017 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
@@ -18,7 +18,7 @@
 # not in $(builddir).
 
 required='makeinfo tex texi2dvi'
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_OUTPUT
@@ -47,11 +47,11 @@ cd build
 ../configure
 $MAKE
 test -f ../main.info
-test ! -f main.info
+test ! -e main.info
 test -f ../stamp-vti
-test ! -f stamp-vti
+test ! -e stamp-vti
 test -f ../version.texi
-test ! -f version.texi
+test ! -e version.texi
 
 cd ..
 rm -rf build make.info* stamp-vti version.texi
@@ -82,7 +82,7 @@ $MAKE
 # stamp-vti is newer than version.texi, the 'version.texi: stamp-vti'
 # rule is always triggered.  Still that's not a reason for 'make'
 # to think 'version.texi' has been created...
-test ! -f main.info
+test ! -e main.info
 $MAKE dvi
 test -f main.dvi
 
old mode 100755 (executable)
new mode 100644 (file)
similarity index 81%
rename from t/txinfo20.sh
rename to t/txinfo-makeinfo-error-no-clobber.sh
index 5c07880..81d3556
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2003-2012 Free Software Foundation, Inc.
+# Copyright (C) 2003-2017 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
@@ -17,7 +17,7 @@
 # Make sure info files survive makeinfo errors.
 
 required=makeinfo
-. ./defs || Exit 1
+. test-init.sh
 
 echo AC_OUTPUT >> configure.ac
 
@@ -29,7 +29,7 @@ mkdir sub
 
 cat > main.texi << 'END'
 \input texinfo
-@setfilename main
+@setfilename main.info
 @settitle main
 @node Top
 Hello walls.
@@ -46,15 +46,15 @@ $AUTOCONF
 $MAKE
 
 # Feign more info files.
-: > main-1
-: > sub/main-1
+: > main.info-1
+: > sub/main.info-1
 
 # Break main.texi.
 $sleep
 cp main.texi main.old
 cat > main.texi << 'END'
 \input texinfo
-@setfilename main
+@setfilename main.info
 @settitle main
 @node Top
 @unknown_macro{Hello walls.}
@@ -62,15 +62,17 @@ cat > main.texi << 'END'
 END
 
 # makeinfo will bail out, but we should conserve the old info files.
-$MAKE && Exit 1
-test -f main
-test -f main-1
+$MAKE && exit 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
-test -f main
-test ! -f main-1
-test -f sub/main
-test -f sub/main-1
+$MAKE && exit 1
+test -f main.info
+test ! -e main.info-1
+test -f sub/main.info
+test -f sub/main.info-1
+
+:
diff --git a/t/txinfo-many-output-formats-vpath.sh b/t/txinfo-many-output-formats-vpath.sh
new file mode 100644 (file)
index 0000000..b82cd6e
--- /dev/null
@@ -0,0 +1,206 @@
+#! /bin/sh
+# Copyright (C) 2003-2017 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 'txinfo-many-output-formats.sh'.
+# FIXME: in the long term, the best thing to do is probably to convert
+# FIXME: this test and that sister test to TAP, and merge them.
+
+required='makeinfo tex texi2dvi'
+. test-init.sh
+
+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"
+
+check-local: ps pdf dvi html # For "make distcheck".
+END
+
+$ACLOCAL
+$AUTOMAKE --add-missing
+$AUTOCONF
+
+# To simplify syncing with sister test 'txinfo-many-output-formats.sh'
+srcdir=..
+
+if test $srcdir = ..; then
+  mkdir build
+  cd build
+fi
+
+$srcdir/configure --prefix="$(pwd)"
+
+$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 $srcdir/main.texi
+$sleep
+touch $srcdir/main.texi
+$MAKE html
+is_newest main.html $srcdir/main.texi
+
+$MAKE clean
+test ! -e main.html
+test ! -e sub/main2.html
+test ! -e rec/main3.html
+
+# Test production of a single HTML file.
+run_make MAKEINFOFLAGS=--no-split html
+test -f main.html
+test -f sub/main2.html
+test -f rec/main3.html
+$MAKE clean
+test ! -e main.html
+test ! -e sub/main2.html
+test ! -e rec/main3.html
+
+# Make sure AM_MAKEINFOHTMLFLAGS is supported, and override AM_MAKEINFO.
+
+cp $srcdir/Makefile.am $srcdir/Makefile.sav
+cat >> $srcdir/Makefile.am <<'EOF'
+AM_MAKEINFOHTMLFLAGS = --no-headers --no-split
+AM_MAKEINFOFLAGS = --unsupported-option
+EOF
+(cd $srcdir && $AUTOMAKE)
+./config.status Makefile
+
+$MAKE html
+test -f main.html
+test -f sub/main2.html
+test -d rec/main3.html
+$MAKE clean
+test ! -e main.html
+test ! -e sub/main2.html
+test ! -e 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 ! -e share/$me/html/main.html
+test ! -e share/$me/html/main2.html
+test ! -e share/$me/html/main3.html
+
+$MAKE dvi
+test -f main.dvi
+test -f sub/main2.dvi
+test -f rec/main3.dvi
+$MAKE clean
+test ! -e main.dvi
+test ! -e sub/main2.dvi
+test ! -e rec/main3.dvi
+
+$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 ! -e share/$me/dvi/main.dvi
+test ! -e share/$me/dvi/main2.dvi
+test ! -e 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 ! -e share/$me/ps/main.ps
+test ! -e share/$me/ps/main2.ps
+test ! -e 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 ! -e share/$me/pdf/main.pdf
+test ! -e share/$me/pdf/main2.pdf
+test ! -e share/$me/pdf/main3.pdf
+test ! -e share/$me/pdf/hello
+
+# Restore the makefile without a broken AM_MAKEINFOFLAGS definition.
+cp -f $srcdir/Makefile.sav $srcdir/Makefile.am
+using_gmake || $MAKE Makefile
+$MAKE distcheck
+
+:
old mode 100755 (executable)
new mode 100644 (file)
similarity index 63%
rename from t/txinfo21.sh
rename to t/txinfo-many-output-formats.sh
index 93543a7..36e6e08
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2003-2012 Free Software Foundation, Inc.
+# Copyright (C) 2003-2017 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
 
 # Test support for building HTML documentation, and the many
 # install-DOC flavors.
+# Keep in sync with sister test 'txinfo-many-output-formats-vpath.sh'.
+# FIXME: in the long term, the best thing to do is probably to convert
+# FIXME: this test and that sister test to TAP, and merge them.
 
-required='makeinfo-html tex texi2dvi'
-. ./defs || Exit 1
+required='makeinfo tex texi2dvi'
+. test-init.sh
 
 cat >>configure.ac <<\EOF
 AC_CONFIG_FILES([rec/Makefile])
@@ -72,16 +75,26 @@ info_TEXINFOS = main3.texi
 
 install-pdf-local:
        @$(MKDIR_P) "$(pdfdir)"
-       :> "$(pdfdir)/hello"
+       : > "$(pdfdir)/hello"
 uninstall-local:
        rm -f "$(pdfdir)/hello"
+
+check-local: ps pdf dvi html # For "make distcheck".
 END
 
 $ACLOCAL
 $AUTOMAKE --add-missing
 $AUTOCONF
 
-./configure
+# To simplify syncing with sister test 'txinfo-many-output-formats.sh'
+srcdir=.
+
+if test $srcdir = ..; then
+  mkdir build
+  cd build
+fi
+
+$srcdir/configure --prefix="$(pwd)"
 
 $MAKE
 
@@ -93,60 +106,72 @@ 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
+is_newest main.html $srcdir/main.texi
 $sleep
-touch main.texi
+touch $srcdir/main.texi
 $MAKE html
-is_newest main.html main.texi
+is_newest main.html $srcdir/main.texi
 
 $MAKE clean
-test ! -d main.html
-test ! -d sub/main2.html
-test ! -d rec/main3.html
+test ! -e main.html
+test ! -e sub/main2.html
+test ! -e rec/main3.html
 
 # Test production of a single HTML file.
-MAKEINFOFLAGS=--no-split $MAKE -e html
+run_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
+test ! -e main.html
+test ! -e sub/main2.html
+test ! -e rec/main3.html
 
 # Make sure AM_MAKEINFOHTMLFLAGS is supported, and override AM_MAKEINFO.
-cat >>Makefile.am <<\EOF
+
+cp $srcdir/Makefile.am $srcdir/Makefile.sav
+cat >> $srcdir/Makefile.am <<'EOF'
 AM_MAKEINFOHTMLFLAGS = --no-headers --no-split
 AM_MAKEINFOFLAGS = --unsupported-option
 EOF
-$AUTOMAKE
-./configure --prefix "`pwd`"
+(cd $srcdir && $AUTOMAKE)
+./config.status Makefile
+
 $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
+test ! -e main.html
+test ! -e sub/main2.html
+test ! -e 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
+test ! -e share/$me/html/main.html
+test ! -e share/$me/html/main2.html
+test ! -e share/$me/html/main3.html
+
+$MAKE dvi
+test -f main.dvi
+test -f sub/main2.dvi
+test -f rec/main3.dvi
+$MAKE clean
+test ! -e main.dvi
+test ! -e sub/main2.dvi
+test ! -e rec/main3.dvi
 
 $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
+test ! -e share/$me/dvi/main.dvi
+test ! -e share/$me/dvi/main2.dvi
+test ! -e share/$me/dvi/main3.dvi
 
 dvips --help || skip_ "dvips is missing"
 
@@ -155,9 +180,9 @@ 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
+test ! -e share/$me/ps/main.ps
+test ! -e share/$me/ps/main2.ps
+test ! -e share/$me/ps/main3.ps
 
 pdfetex --help || pdftex --help \
   || skip_ "pdftex and pdfetex are both missing"
@@ -168,9 +193,14 @@ 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
+test ! -e share/$me/pdf/main.pdf
+test ! -e share/$me/pdf/main2.pdf
+test ! -e share/$me/pdf/main3.pdf
+test ! -e share/$me/pdf/hello
+
+# Restore the makefile without a broken AM_MAKEINFOFLAGS definition.
+cp -f $srcdir/Makefile.sav $srcdir/Makefile.am
+using_gmake || $MAKE Makefile
+$MAKE distcheck
 
 :
old mode 100755 (executable)
new mode 100644 (file)
index ae5e9f2..4497161
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2012 Free Software Foundation, Inc.
+# Copyright (C) 2012-2017 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/>.
 
-# The pdf, ps and dvi targets shouldn't let clutter in the build directory.
-# Related to automake bug#11146.
+# The info, html, pdf, ps and dvi targets shouldn't let clutter in the
+# build directory.  Related to automake bug#11146.
 
-required='makeinfo tex texi2dvi-o dvips'
-. ./defs || Exit 1
+required='makeinfo tex texi2dvi dvips'
+. test-init.sh
 
-mkdir sub
-
-echo AC_OUTPUT >> configure.ac
+cat >> configure.ac <<'END'
+AC_CONFIG_FILES([sub/Makefile])
+AC_OUTPUT
+END
 
 cat > Makefile.am << 'END'
-all-local: ps pdf dvi html
-info_TEXINFOS = foo.texi sub/bar.texi
+all-local: ps pdf dvi html # For "make distcheck".
+info_TEXINFOS = foo.texi doc/bar.texi baz.texi
+SUBDIRS = sub
+END
+
+mkdir sub doc
+
+cat > sub/Makefile.am << 'END'
+all-local: ps pdf dvi html # For "make distcheck".
+info_TEXINFOS = baz.texi
 END
 
 cat > foo.texi << 'END'
@@ -39,7 +48,7 @@ Hello walls.
 @bye
 END
 
-cat > sub/bar.texi << 'END'
+cat > doc/bar.texi << 'END'
 \input texinfo
 @setfilename bar.info
 @settitle bar
@@ -53,19 +62,9 @@ cat > baz.texi << 'END'
 \input texinfo
 @setfilename baz.info
 @settitle baz
-@node Top
-Hello walls.
-@bye
-END
-
-cat > baz.texi << 'END'
-\input texinfo
-@setfilename baz.info
-@settitle baz
 @defindex au
 @defindex sa
 @defindex sb
-@synindex sa sb
 @node Top
 Hello walls.
 @cindex foo
@@ -81,6 +80,8 @@ sb
 @bye
 END
 
+cp baz.texi sub
+
 $ACLOCAL
 $AUTOMAKE --add-missing
 $AUTOCONF
@@ -91,10 +92,53 @@ $AUTOCONF
 # clean up potential cruft left by earlier ones.
 for fmt in info pdf ps dvi html all; do
   $MAKE $fmt
-  ls -l . sub # For debugging.
-  ls -d foo* baz* sub/bar* > lst
-  $EGREP -v '^(foo|sub/bar|baz)\.(texi|dvi|ps|pdf|html|info)$' lst && Exit 1
-  $MAKE clean
+  # For debugging.
+  ls -l . doc sub
+  # Sanity check.
+  case $fmt in
+    html)
+      test -e foo.html
+      test -e doc/bar.html
+      test -e baz.html
+      test -e sub/baz.html
+      ;;
+    all)
+      for x in info pdf ps dvi; do
+        test -f foo.$x
+        test -f doc/bar.$x
+        test -f baz.$x
+        test -f sub/baz.$x
+      done
+      test -e foo.html
+      test -e doc/bar.html
+      test -e baz.html
+      test -e sub/baz.html
+      ;;
+    *)
+      test -f foo.$fmt
+      test -f doc/bar.$fmt
+      test -f baz.$fmt
+      test -f sub/baz.$fmt
+      ;;
+  esac
+  # Real test.
+  ls -d foo* baz* sub/baz* doc/bar* > lst
+  basename_rx='(foo|doc/bar|baz|sub/baz)'
+  case $fmt in
+    pdf) extension_rx="(texi|pdf|t2p)";;
+    dvi) extension_rx="(texi|dvi|t2d)";;
+     ps) extension_rx="(texi|ps|dvi|t2d)";;
+   info) extension_rx="(texi|info)";;
+   html) extension_rx="(texi|html)";;
+    all) extension_rx="(texi|html|info|pdf|ps|dvi|t2[pd])";;
+      *) fatal_ "unreachable code reached";;
+  esac
+  $EGREP -v "^$basename_rx\.$extension_rx$" lst && exit 1
+  # Cleanup for checks on the next format.
+  case $fmt in
+    info) rm -f *.info doc/*.info sub/*.info;;
+       *) $MAKE clean;;
+  esac
 done
 
 $MAKE distcheck
old mode 100755 (executable)
new mode 100644 (file)
similarity index 56%
rename from t/txinfo2.sh
rename to t/txinfo-no-extra-dist.sh
index 0daebd9..4bc9119
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 1996-2012 Free Software Foundation, Inc.
+# Copyright (C) 1996-2017 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 to ensure that a ".info~" file doesn't end up in the
-# distribution.  Bug report from Greg McGary.
+# Test to ensure that a ".info~" or ".info.bak" file doesn't end up
+# in the distribution.  Bug report from Greg McGary.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_OUTPUT
 END
 
 cat > Makefile.am << 'END'
-info_TEXINFOS = textutils.texi
-.PHONY: test
-test:
+info_TEXINFOS = textutils.texi subdir/main.texi
+test: distdir
        @echo DISTFILES = $(DISTFILES)
-       case '$(DISTFILES)' in *'~'*) exit 1;; *) exit 0;; esac
+       @case '$(DISTFILES)' in *'~'*|*'.bak'*) exit 1;; *) exit 0;; esac
+       st=0; \
+        find $(distdir) | grep '~' && st=1; \
+        find $(distdir) | grep '\.bak' && st=1; \
+        exit $$st
+PHONY: test
 END
 
 : > texinfo.tex
+mkdir subdir
 echo '@setfilename textutils.info' > textutils.texi
-: > textutils.info~
+echo '@setfilename main.info' > subdir/main.texi
 
 $ACLOCAL
 $AUTOCONF
 $AUTOMAKE
 
 ./configure
+: > textutils.info
+: > subdir/main.info
+: > textutils.info~
+: > textutils.info.bak
+: > subdir/main.info~
+: > subdir/main.info.bak
 $MAKE test
+$MAKE maintainer-clean
+test -f subdir/main.info~
+test -f subdir/main.info.bak
 
 :
old mode 100755 (executable)
new mode 100644 (file)
similarity index 88%
rename from t/txinfo27.sh
rename to t/txinfo-no-installinfo.sh
index 131300a..d1d79dd
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2003-2012 Free Software Foundation, Inc.
+# Copyright (C) 2003-2017 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
@@ -17,7 +17,7 @@
 # Make sure install-info works even if no-installinfo is given.
 
 required='makeinfo'
-. ./defs || Exit 1
+. test-init.sh
 
 echo AC_OUTPUT >> configure.ac
 
@@ -41,6 +41,8 @@ $ACLOCAL
 $AUTOMAKE --add-missing
 $AUTOCONF
 
-./configure "--prefix=`pwd`/inst" "--infodir=`pwd`/inst/info"
+./configure --prefix="$(pwd)/inst" --infodir="$(pwd)/inst/info"
 $MAKE install-info
 test -f inst/info/main.info
+
+:
old mode 100755 (executable)
new mode 100644 (file)
similarity index 79%
rename from t/txinfo9.sh
rename to t/txinfo-no-repeated-targets.sh
index eb2cbdc..45006cf
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2001-2012 Free Software Foundation, Inc.
+# Copyright (C) 2001-2017 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
 
 # Make sure we only create texinfo-related targets once.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat > Makefile.am << 'END'
-info_TEXINFOS = maude.texi liver.txi heart.texinfo
+info_TEXINFOS = maude.texi liver.texi heart.texi
 END
 
 echo '@setfilename maude.info' > maude.texi
-echo '@setfilename liver.info' > liver.txi
-echo '@setfilename heart.info' > heart.texinfo
+echo '@setfilename liver.info' > liver.texi
+echo '@setfilename heart.info' > heart.texi
 : > texinfo.tex
 
 $ACLOCAL
@@ -35,7 +35,7 @@ $AUTOMAKE
 # 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
+  test $($EGREP -c "(^| )$t(:| *.:)" Makefile.in) -eq 1
 done
 
 :
diff --git a/t/txinfo-nodist-info.sh b/t/txinfo-nodist-info.sh
new file mode 100644 (file)
index 0000000..da3bc26
--- /dev/null
@@ -0,0 +1,66 @@
+#! /bin/sh
+# Copyright (C) 2013-2017 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 we can force generated '.info' info files not to be
+# distributed.
+
+required=makeinfo
+. test-init.sh
+
+echo AC_OUTPUT >> configure.ac
+
+cat > Makefile.am << 'END'
+AUTOMAKE_OPTIONS = info-in-builddir
+info_TEXINFOS = foo.texi
+CLEANFILES = foo.info
+
+# To make distcheck work without requiring TeX and texi2dvi.
+dvi:
+
+# Do not distribute generated '.info' files.
+dist-info:
+       @:
+END
+
+mkdir subdir
+
+cat > foo.texi << 'END'
+\input texinfo
+@setfilename foo.info
+@settitle foo
+@node Top
+Hello walls.
+@include version.texi
+@bye
+END
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE -a -Wno-override
+
+./configure
+$MAKE distdir
+ls -l . $distdir # For debugging.
+test ! -e foo.info
+test ! -e $distdir/foo.info
+$MAKE
+test -f foo.info
+$MAKE distdir
+ls -l $distdir # For debugging.
+test ! -f $distdir/foo.info
+$MAKE distcheck
+
+:
diff --git a/t/txinfo-other-suffixes.sh b/t/txinfo-other-suffixes.sh
new file mode 100644 (file)
index 0000000..b2d9eb3
--- /dev/null
@@ -0,0 +1,41 @@
+#! /bin/sh
+# Copyright (C) 1998-2017 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 '.txi' and '.texinfo' extensions are deprecated,
+# but still work.
+
+. test-init.sh
+
+cat > Makefile.am << 'END'
+info_TEXINFOS = foo.txi bar.texinfo
+END
+
+echo '@setfilename foo.info' > foo.txi
+echo '@setfilename bar.info' > bar.texinfo
+: > texinfo.tex
+
+$ACLOCAL
+AUTOMAKE_fails
+grep "^Makefile\.am:.*suffix '.txi'.*Texinfo file.*discouraged" stderr
+grep "^Makefile\.am:.*suffix '.texinfo'.*Texinfo file.*discouraged" stderr
+grep "^Makefile\.am:.* use '.texi' instead" stderr
+
+$AUTOMAKE -Wno-obsolete
+
+grep '^\.txi\.info: *$' Makefile.in
+grep '^\.texinfo\.info: *$' Makefile.in
+
+:
old mode 100755 (executable)
new mode 100644 (file)
similarity index 90%
rename from t/txinfo29.sh
rename to t/txinfo-override-infodeps.sh
index a0013d2..a3abb01
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2004-2012 Free Software Foundation, Inc.
+# Copyright (C) 2004-2017 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
@@ -17,7 +17,7 @@
 # Make sure that INFO_DEPS can be overridden.
 # Report from Bruce Korb.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat > Makefile.am << 'END'
 INFO_DEPS = foo.info
@@ -34,7 +34,7 @@ grep 'overrides Automake variable.*INFO_DEPS' stderr
 $AUTOMAKE -Wno-override
 
 # There is only one definition of INFO_DEPS ...
-test 1 = `grep '^INFO_DEPS.*=' Makefile.in | wc -l`
+test 1 -eq $(grep -c '^INFO_DEPS.*=' Makefile.in)
 # ... and it is the right one.
 grep '^INFO_DEPS *= *foo.info *$' Makefile.in
 
@@ -55,7 +55,7 @@ grep 'overrides Automake variable.*INFO_DEPS' stderr
 $AUTOMAKE -Wno-override
 
 # There is only one definition of INFO_DEPS ...
-test 1 = `grep '^INFO_DEPS.*=' Makefile.in | wc -l`
+test 1 -eq $(grep -c '^INFO_DEPS.*=' Makefile.in)
 # ... and it is the right one.
 grep '^INFO_DEPS *= *@INFO_DEPS@ *$' Makefile.in
 
old mode 100755 (executable)
new mode 100644 (file)
similarity index 86%
rename from t/txinfo22.sh
rename to t/txinfo-override-texinfo-tex.sh
index c33898b..b6243eb
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2003-2012 Free Software Foundation, Inc.
+# Copyright (C) 2003-2017 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
@@ -19,7 +19,7 @@
 # Report from Tom Tromey.
 
 required='makeinfo tex texi2dvi'
-. ./defs || Exit 1
+. test-init.sh
 
 cat > configure.ac << END
 AC_INIT([$me], [1.0])
@@ -30,12 +30,13 @@ AC_OUTPUT
 END
 
 cat > Makefile.am << 'END'
-TEXINFO_TEX = $(srcdir)/tex/texinfo.tex
+TEXINFO_TEX = ../tex/texinfo.tex
 info_TEXINFOS = main.texi
 sure_it_exists:
-       test -f $(TEXINFO_TEX)
+       test -f $(srcdir)/$(TEXINFO_TEX)
 sure_it_is_not_distributed: distdir
        test ! -f $(distdir)/tex/texinfo.tex
+check-local: sure_it_exists
 END
 
 cat > main.texi << 'END'
@@ -55,13 +56,12 @@ $ACLOCAL
 $AUTOMAKE --add-missing
 $AUTOCONF
 
-test ! -f texinfo.tex
-test ! -f aux1/texinfo.tex
+test ! -e texinfo.tex
+test ! -e aux1/texinfo.tex
 test -f tex/texinfo.tex
 
 ./configure
 
-$MAKE sure_it_exists
 $MAKE distcheck
 $MAKE sure_it_is_not_distributed
 
old mode 100755 (executable)
new mode 100644 (file)
similarity index 84%
rename from t/txinfo17.sh
rename to t/txinfo-setfilename-repeated.sh
index 1de7e9a..5f991c2
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2002-2012 Free Software Foundation, Inc.
+# Copyright (C) 2002-2017 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
 # Make sure Automake uses the _first_ @setfilname it sees.
 # Report from Karl Berry.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat > Makefile.am << 'END'
 info_TEXINFOS = texinfo.texi
 END
 
 cat > texinfo.texi << 'END'
-@setfilename texinfo
+@setfilename texinfo.info
 ...
 @verbatim
 @setfilename example.info
@@ -35,5 +35,7 @@ END
 $ACLOCAL
 $AUTOMAKE --add-missing
 
-grep 'example' Makefile.in && Exit 1
-grep 'texinfo:' Makefile.in
+grep 'example' Makefile.in && exit 1
+grep 'texinfo\.info:' Makefile.in
+
+:
old mode 100755 (executable)
new mode 100644 (file)
similarity index 77%
rename from t/txinfo31.sh
rename to t/txinfo-setfilename-suffix-strip.sh
index 191bca4..e84c221
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2006-2012 Free Software Foundation, Inc.
+# Copyright (C) 2006-2017 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 file extensions are matched correctly.
+# Make sure file extensions are matched correctly in the code
+# parsing texi files for @setfilename declarations.
 # Report from Eric Dorland.
 
-. ./defs || Exit 1
+. test-init.sh
 
 echo info_TEXINFOS = bar.texi >Makefile.am
 cat >bar.texi <<EOF
@@ -25,5 +26,8 @@ cat >bar.texi <<EOF
 EOF
 
 $ACLOCAL
-$AUTOCONF
 $AUTOMAKE --add-missing
+
+$EGREP '[ /]bar-1\.9\.info( |$)' Makefile.in
+
+:
old mode 100755 (executable)
new mode 100644 (file)
similarity index 77%
rename from t/txinfo13.sh
rename to t/txinfo-subdir-pr343.sh
index 77f9af7..094c044
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2002-2012 Free Software Foundation, Inc.
+# Copyright (C) 2002-2017 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 # Check for subdir Texinfo (PR/343).
-# Also make sure we do not distribute too much foo.info* files (Report
-# from Vincent Lefevre).
 
-required='makeinfo tex texi2dvi-o'
-. ./defs || Exit 1
+required='makeinfo tex texi2dvi'
+. test-init.sh
 
 echo AC_OUTPUT >> configure.ac
 
@@ -29,8 +27,6 @@ subdir_main_TEXINFOS = subdir/inc.texi
 
 installcheck-local:
        test -f "$(infodir)/main.info"
-check-local:
-       test ! -f $(srcdir)/subdir/main.info.bak
 END
 
 mkdir subdir
@@ -50,8 +46,6 @@ cat > subdir/inc.texi << 'END'
 I'm included.
 END
 
-touch subdir/main.info.bak
-
 $ACLOCAL
 $AUTOMAKE --add-missing
 $AUTOCONF
@@ -61,5 +55,6 @@ cd build
 ../configure
 $MAKE distcheck
 test -f ../subdir/main.info
-test ! -f subdir/main.info
-test -f ../subdir/main.info.bak
+test ! -e subdir/main.info
+
+:
old mode 100755 (executable)
new mode 100644 (file)
similarity index 93%
rename from t/txinfo.sh
rename to t/txinfo-tex-dist.sh
index e6667cb..ba29153
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 1996-2012 Free Software Foundation, Inc.
+# Copyright (C) 1996-2017 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
@@ -18,7 +18,7 @@
 # Jim Meyering.
 
 required=makeinfo
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac <<'END'
 AC_OUTPUT
old mode 100755 (executable)
new mode 100644 (file)
index 2516580..602db1a
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2011-2012 Free Software Foundation, Inc.
+# Copyright (C) 2011-2017 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
@@ -17,7 +17,7 @@
 # Test that automake complains properly when the files with unrecognized
 # extensions are passed to the TEXINFOS primary.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat > Makefile.am << 'END'
 info_TEXINFOS = foobar.foo bazquux.tex zardoz.c
old mode 100755 (executable)
new mode 100644 (file)
similarity index 92%
rename from t/txinfo4.sh
rename to t/txinfo-unrecognized-info-suffix.sh
index f92f9c1..d9895e7
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 1997-2012 Free Software Foundation, Inc.
+# Copyright (C) 1997-2017 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
@@ -16,7 +16,7 @@
 
 # Make sure non-empty, non-info suffixes are diagnosed.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat > Makefile.am << 'END'
 info_TEXINFOS = textutils.texi
old mode 100755 (executable)
new mode 100644 (file)
similarity index 95%
rename from t/vtexi.sh
rename to t/txinfo-vtexi.sh
index 9d1bc24..a4953dc
@@ -1,5 +1,5 @@
 #!/bin/sh
-# Copyright (C) 1996-2012 Free Software Foundation, Inc.
+# Copyright (C) 1996-2017 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
@@ -17,7 +17,7 @@
 # Basic checks and some regressions testing on 'version.texi'
 # support for texinfo files.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat > Makefile.am << 'END'
 info_TEXINFOS = textutils.texi
@@ -57,6 +57,6 @@ $EGREP 'stamp-vti:.*\$\(top_srcdir\)/configure( .*)?$' Makefile.in
 # etc. once led to '\$\(srcdir\)/mdate-sh'.
 # Filter out '$(srcdir)/mdate-sh'; there should be no occurrences
 # of '.../mdate-sh' left then.
-sed 's,\$(srcdir)/mdate-sh,,g' Makefile.in | grep '/mdate-sh' && Exit 1
+sed 's,\$(srcdir)/mdate-sh,,g' Makefile.in | grep '/mdate-sh' && exit 1
 
 :
old mode 100755 (executable)
new mode 100644 (file)
similarity index 91%
rename from t/vtexi2.sh
rename to t/txinfo-vtexi2.sh
index 18f1e9e..520bd72
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 1996-2012 Free Software Foundation, Inc.
+# Copyright (C) 1996-2017 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
 #   version.texi gets listed as a dependency for the .info file but
 #   not the .dvi file.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat > Makefile.am << 'END'
 info_TEXINFOS = zardoz.texi
 END
 
 cat > zardoz.texi << 'END'
-@setfilename zardoz
+@setfilename zardoz.info
 @include version.texi
 END
 
old mode 100755 (executable)
new mode 100644 (file)
similarity index 91%
rename from t/vtexi3.sh
rename to t/txinfo-vtexi3.sh
index 9dd3e67..10598f8
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2011-2012 Free Software Foundation, Inc.
+# Copyright (C) 2011-2017 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
 # Check that vers*.texi files are automatically created and distributed
 # if @included into a texi source.  Also check that they correctly contain
 # the @values definitions they are advertised to.
-# See also the related test 'vtexi4.test', which does similar checks, but
-# for version.texi only, and requires makeinfo, tex and texi2dvi.
+# See also the related test 'txinfo-vtexi4.sh', which does similar checks,
+# but for version.texi only, and requires makeinfo, tex and texi2dvi.
 
-. ./defs || Exit 1
+. test-init.sh
 
 # We are going to override package version in AC_INIT, so we need
 # to redefine the name of the distdir as well.
@@ -91,7 +91,7 @@ do_check ()
   # Check that UPDATED seems right, and that UPDATED and UPDATED-MONTH
   # are consistent.
   $EGREP "^@set UPDATED $date$" $srcdir/$vfile.texi
-  vmonth=`grep '^@set UPDATED ' $srcdir/$vfile.texi | awk '{print $4, $5}'`
+  vmonth=$(grep '^@set UPDATED ' $srcdir/$vfile.texi | awk '{print $4, $5}')
   grep "^@set UPDATED-MONTH $vmonth$" $srcdir/$vfile.texi
   # Check that the vers*.texi file is distributed according
   # to $(DISTFILES).
old mode 100755 (executable)
new mode 100644 (file)
similarity index 76%
rename from t/vtexi4.sh
rename to t/txinfo-vtexi4.sh
index 6038444..9ab8f36
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2011-2012 Free Software Foundation, Inc.
+# Copyright (C) 2011-2017 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
 # Check that the version.texi file is automatically created and distributed
 # if @included into a texi source.  Also check that is correctly defined
 # @values definitions it is advertised to.
-# See also the related test 'vtexi3.test', which does similar checks, but
-# for more vers*.texi files, and does not require makeinfo, tex and
+# See also the related test 'txinfo-vtexi4.sh', which does similar checks,
+# but for more vers*.texi files, and does not require makeinfo, tex and
 # texi2dvi.
 
-required='makeinfo tex texi2dvi-o'
-. ./defs || Exit 1
-
-case `LC_ALL=C date '+%u'` in
-  [1-7]) date_is_posix=:;;
-      *) date_is_posx=false;;
-esac
-$date_is_posix \
-  && day=`LC_ALL=C date '+%d'` && test -n "$day" \
-  && month=`LC_ALL=C date '+%B'` && test -n "$month" \
-  && year=`LC_ALL=C date '+%Y'`&& test -n "$year" \
-  || skip_ "'date' is not POSIX-compliant enough"
-day=`echo "$day" | sed 's/^0//'`
+required='makeinfo tex texi2dvi grep-nonprint'
+. test-init.sh
 
-(echo '\ex\a' | grep x) \
-  || skip_ "grep doesn't work on input that is not pure text"
+test $(LC_ALL=C date '+%u') -gt 0 && test $(LC_ALL=C date '+%u') -lt 8 \
+  && day=$(LC_ALL=C date '+%d')   && test -n "$day" \
+  && month=$(LC_ALL=C date '+%B') && test -n "$month" \
+  && year=$(LC_ALL=C date '+%Y')  && test -n "$year" \
+  || skip_ "'date' is not POSIX-compliant enough"
+day=$(echo "$day" | sed 's/^0//')
 
 cat > configure.ac << END
 AC_INIT([$me], [123.456])
@@ -55,7 +48,7 @@ cat > Makefile.am << 'END'
 include defs.am
 info_TEXINFOS = foo.texi
 test-grepinfo:
-## Not useless uses of cat: we only tested that grep worked on
+## Not useless uses of cat: we only tested that grep works on
 ## non-text input when that's given from a pipe.
        cat $(srcdir)/foo.info | grep 'GREPVERSION=$(my_version_rx)='
        cat $(srcdir)/foo.info | grep 'GREPEDITION=$(my_version_rx)='
old mode 100755 (executable)
new mode 100644 (file)
similarity index 83%
rename from t/txinfo3.sh
rename to t/txinfo-without-info-suffix.sh
index 88e1bac..708c535
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 1997-2012 Free Software Foundation, Inc.
+# Copyright (C) 1997-2017 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
@@ -17,7 +17,7 @@
 # Test to make sure .info-less @setfilename works.
 
 required='makeinfo tex texi2dvi'
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_OUTPUT
@@ -29,6 +29,7 @@ END
 
 cat > textutils.texi <<EOF
 \input texinfo
+@c dummy comment
 @setfilename textutils
 @settitle main
 @node Top
@@ -38,13 +39,16 @@ EOF
 
 $ACLOCAL
 $AUTOCONF
-$AUTOMAKE --add-missing
+AUTOMAKE_fails -a
+$EGREP '^(\./)?textutils\.texi:3:.*suffix-less info file' stderr
+
+$AUTOMAKE -a -Wno-obsolete
 
 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 '^\.texi:$' Makefile.in && exit 1
 grep 'textutils: *textutils\.texi' Makefile.in
 
 ./configure
old mode 100755 (executable)
new mode 100644 (file)
index 63417f8..bc4d916
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2003-2012 Free Software Foundation, Inc.
+# Copyright (C) 2003-2017 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
@@ -17,7 +17,7 @@
 # Test support for DJGPP's .iNN info files.
 
 required=makeinfo
-. ./defs || Exit 1
+. test-init.sh
 
 echo AC_OUTPUT >> configure.ac
 
@@ -38,7 +38,7 @@ $ACLOCAL
 $AUTOMAKE --add-missing
 $AUTOCONF
 
-./configure "--infodir=`pwd`/_inst"
+./configure "--infodir=$(pwd)/_inst"
 $MAKE
 
 # Make sure .iNN files are installed.
@@ -50,8 +50,8 @@ test -f _inst/main.i21
 
 # They should be uninstalled too.
 $MAKE uninstall
-test ! -f _inst/main.i1
-test ! -f _inst/main.i21
+test ! -e _inst/main.i1
+test ! -e _inst/main.i21
 
 # Make sure rebuild rules erase old .iNN files when they run makeinfo.
 $sleep
@@ -59,14 +59,14 @@ touch main.texi
 test -f main.i1
 test -f main.i21
 $MAKE
-test ! -f main.i1
-test ! -f main.i21
+test ! -e main.i1
+test ! -e main.i21
 
 # Finally, we also want them erased by maintainer-clean.
 : > main.i7
 : > main.i39
 $MAKE maintainer-clean
-test ! -f main.i7
-test ! -f main.i39
+test ! -e main.i7
+test ! -e main.i39
 
 :
old mode 100755 (executable)
new mode 100644 (file)
index e5c1761..0e61cda
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2002-2012 Free Software Foundation, Inc.
+# Copyright (C) 2002-2017 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
 
 # Check that info files are built in builddir when needed.
 # Test with subdir Texinfo.
-# (Similar to txinfo13.test, plus DISTCLEANFILES).
-# (See also txinfo24.test and txinfo25.test).
+# (Similar to txinfo13.sh, plus DISTCLEANFILES).
+# (See also txinfo24.sh and txinfo25.sh).
 
-required='makeinfo tex texi2dvi-o'
-. ./defs || Exit 1
+required='makeinfo tex texi2dvi'
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_OUTPUT
@@ -53,14 +53,17 @@ I'm included.
 END
 
 $ACLOCAL
-$AUTOMAKE --add-missing
 $AUTOCONF
 
+AUTOMAKE_run --add-missing -Wno-error
+grep "Makefile\.am:.*undocumented.* automake hack" stderr
+grep "Makefile\.am:.*'info-in-builddir' automake option" stderr
+
 mkdir build
 cd build
 ../configure
 $MAKE distcheck
 test -f subdir/main.info
-test ! -f ../subdir/main.info
+test ! -e ../subdir/main.info
 
 :
old mode 100755 (executable)
new mode 100644 (file)
index 709cee7..bc248d1
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2002-2012 Free Software Foundation, Inc.
+# Copyright (C) 2002-2017 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 # Check that info files are built in builddir when needed.
-# (Similar to txinfo16.test, plus CLEANFILES).
-# (See also txinfo23.test and txinfo25.test).
+# (Similar to txinfo16.sh, plus CLEANFILES).
+# (See also txinfo23.sh and txinfo25.sh).
 
-required='makeinfo tex texi2dvi-o'
-. ./defs || Exit 1
+required='makeinfo tex texi2dvi'
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_OUTPUT
@@ -41,14 +41,14 @@ Hello walls.
 END
 
 $ACLOCAL
-$AUTOMAKE --add-missing
+$AUTOMAKE --add-missing -Wno-obsolete
 $AUTOCONF
 
 mkdir build
 cd build
 ../configure
 $MAKE
-test ! -f ../main.info
+test ! -e ../main.info
 test -f main.info
 
 cd ..
@@ -74,7 +74,7 @@ cd build
 $MAKE
 # main.info should be rebuilt in the current directory.
 test -f main.info
-test ! -f ../main.info
+test ! -e ../main.info
 $MAKE dvi
 test -f main.dvi
 
old mode 100755 (executable)
new mode 100644 (file)
index 7aa66ae..681a567
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2003-2012 Free Software Foundation, Inc.
+# Copyright (C) 2003-2017 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
 # Check that info files are built in builddir and in srcdir can safely
 # co-exist.  This setup is obtained by having two info files, only one
 # of which being cleaned.
-# (Similar to txinfo16.test, plus CLEANFILES).
-# (See also txinfo23.test and txinfo24.test).
+# (Similar to txinfo16.sh, plus CLEANFILES).
+# (See also txinfo23.sh and txinfo24.sh).
 
-required='makeinfo tex texi2dvi-o'
-. ./defs || Exit 1
+required='makeinfo tex texi2dvi'
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_OUTPUT
@@ -53,16 +53,21 @@ Hello walls.
 END
 
 $ACLOCAL
-$AUTOMAKE --add-missing
 $AUTOCONF
 
+AUTOMAKE_fails --add-missing
+grep "Makefile\.am:.*undocumented.* automake hack" stderr
+grep "Makefile\.am:.*'info-in-builddir' automake option" stderr
+
+$AUTOMAKE --add-missing -Wno-obsolete
+
 mkdir build
 cd build
 ../configure
 $MAKE
 test -f main.info
-test ! -f ../main.info
-test ! -f other.info
+test ! -e ../main.info
+test ! -e other.info
 test -f ../other.info
 
 cd ..
@@ -101,7 +106,7 @@ $MAKE
 # rule is always triggered.  Still that's not a reason for 'make'
 # to think 'version.texi' has been created...
 test -f main.info
-test ! -f other.info
+test ! -e other.info
 $MAKE dvi
 test -f main.dvi
 test -f other.dvi
old mode 100755 (executable)
new mode 100644 (file)
index 97b36d5..37a571c
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2002-2012 Free Software Foundation, Inc.
+# Copyright (C) 2002-2017 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 # Check that info files are built in builddir when needed.
-# Similar to txinfo24.test, but obfuscating filenames with variable
+# Similar to txinfo24.sh, but obfuscating filenames with variable
 # references.
 # Report from Ralf Corsepius.
 
-required='makeinfo tex texi2dvi-o'
-. ./defs || Exit 1
+required='makeinfo tex texi2dvi'
+. test-init.sh
 
 # This setting, when honored by GNU ls, used to cause an infinite loop
 # in mdate-sh.
@@ -50,7 +50,7 @@ Hello walls.
 END
 
 $ACLOCAL
-$AUTOMAKE --add-missing
+$AUTOMAKE --add-missing -Wno-error
 $AUTOCONF
 
 mkdir build
@@ -82,7 +82,7 @@ cd build
 $MAKE
 # main.info should be rebuilt in the current directory.
 test -f main.info
-test ! -f ../main.info
+test ! -e ../main.info
 $MAKE dvi
 test -f main.dvi
 
diff --git a/t/txinfo30.sh b/t/txinfo30.sh
deleted file mode 100755 (executable)
index 09ebd5e..0000000
+++ /dev/null
@@ -1,63 +0,0 @@
-#! /bin/sh
-# Copyright (C) 2005-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 'missing texinfo' does not create empty files.
-# Report from Bob Proulx.
-
-. ./defs || Exit 1
-
-echo info_TEXINFOS = bar.texi >Makefile.am
-echo grepme >bar.info
-$sleep
-cat >bar.texi <<EOF
-@setfilename bar.info
-EOF
-
-echo AC_OUTPUT >>configure.ac
-
-cat >makeinfo <<\EOF
-#!/bin/sh
-# This script
-# 1. fails so 'missing' can take over
-# 2. does not understand '--version' so 'missing' thinks 'makeinfo' isn't
-#    installed
-exec false
-EOF
-
-chmod +x makeinfo
-
-PATH=`pwd`$PATH_SEPARATOR$PATH
-export PATH
-
-# Otherwise configure might pick up a working makeinfo from the
-# environment.  Seen in automake bug#10866.
-unset MAKEINFO || :
-
-$ACLOCAL
-$AUTOCONF
-$AUTOMAKE --add-missing
-
-./configure
-$MAKE
-grep grepme bar.info
-test -f bar.info
-
-# We should not create a missing bar.info.
-rm -f bar.info
-$MAKE && Exit 1
-test ! -f bar.info
-
-:
diff --git a/t/txinfo5.sh b/t/txinfo5.sh
deleted file mode 100755 (executable)
index d515617..0000000
+++ /dev/null
@@ -1,38 +0,0 @@
-#! /bin/sh
-# Copyright (C) 1998-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 texinfo.tex is not required by --cygnus.
-# Also check that TEXINFOS + cygnus work without requiring the
-# '-Wno-override' option.
-# See also sister test txinfo5b.test.
-# Report from Ian Taylor.
-
-. ./defs || Exit 1
-
-cat >> configure.ac << 'END'
-AM_MAINTAINER_MODE
-END
-
-cat > Makefile.am << 'END'
-info_TEXINFOS = ian.texi
-END
-
-echo '@setfilename ian.info' > ian.texi
-
-$ACLOCAL
-$AUTOMAKE --cygnus -Wno-obsolete
-
-:
diff --git a/t/txinfo5b.sh b/t/txinfo5b.sh
deleted file mode 100755 (executable)
index a99f607..0000000
+++ /dev/null
@@ -1,42 +0,0 @@
-#! /bin/sh
-# Copyright (C) 1998-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 texinfo.tex is not required by --cygnus.
-# See also sister test txinfo5.test.
-# Report from Ian Taylor.
-
-. ./defs || Exit 1
-
-cat >> configure.ac << 'END'
-AM_MAINTAINER_MODE
-END
-
-cat > Makefile.am << 'END'
-# Disable 'override' warnings to work around an unrelated
-# texi+cygnus bug.
-# Disable obsolete warnings because the 'cygnus' mode is now deprecated.
-AUTOMAKE_OPTIONS = -Wno-override -Wno-obsolete
-info_TEXINFOS = ian.texi
-END
-
-echo '@setfilename ian.info' > ian.texi
-
-$ACLOCAL
-$AUTOMAKE --cygnus
-$AUTOMAKE -a --cygnus
-test ! -f texinfo.tex
-
-:
diff --git a/t/txinfo7.sh b/t/txinfo7.sh
deleted file mode 100755 (executable)
index 2a5dc9d..0000000
+++ /dev/null
@@ -1,33 +0,0 @@
-#! /bin/sh
-# Copyright (C) 1998-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 texinfo.tex correctly installed by -a.  Bug report
-# by Per Cederqvist.
-
-. ./defs || Exit 1
-
-cat > Makefile.am << 'END'
-info_TEXINFOS = textutils.texi
-END
-
-echo '@setfilename textutils.info' > textutils.texi
-
-$ACLOCAL
-$AUTOMAKE -a
-
-test -f texinfo.tex
-
-:
old mode 100755 (executable)
new mode 100644 (file)
index aee1fb5..33c74c4
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2011-2012 Free Software Foundation, Inc.
+# Copyright (C) 2011-2017 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
@@ -20,7 +20,7 @@
 # tests for other primaries too?  E.g., SCRIPTS, PROGRAMS, LISP, PYTHON,
 # etc...
 
-. ./defs || Exit 1
+. test-init.sh
 
 mkdir d
 : > d/f
@@ -28,9 +28,14 @@ chmod a-w d || skip "cannot make directories unwritable"
 
 # On Solaris 10, if '/bin/rm' is run with the '-f' option, it doesn't
 # print any error message when failing to remove a file (due to e.g.,
-# "Permission denied").  Yikes.  We'll cater to this incompatibility
-# by relaxing a test below if a faulty 'rm' is detected.
-st=0; rm -f d/f 2>stderr || st=$?
+# "Permission denied").  And it gets weirder.  On OpenIndiana 11, the
+# /bin/sh shell (in many respects a decent POSIX shell) seems to somehow
+# "eat" the error message from 'rm' in some situation, although the 'rm'
+# utility itself correctly prints it when invoked from (say) 'env' or
+# 'bash'.  Yikes.
+# We'll cater to these incompatibilities by relaxing a test below if
+# a faulty shell or 'rm' program is detected.
+st=0; $SHELL -c 'rm -f d/f' 2>stderr || st=$?
 cat stderr >&2
 test $st -gt 0 || skip_ "can delete files from unwritable directories"
 if grep 'rm:' stderr; then
@@ -53,16 +58,17 @@ $ACLOCAL
 $AUTOMAKE
 $AUTOCONF
 
+# Weird name, to make it harder to experience false positives when
+# grepping error messages.
 inst=__inst-dir__
 
-./configure --prefix="`pwd`/$inst"
+./configure --prefix="$(pwd)/$inst"
 
 mkdir $inst $inst/share
 : > $inst/share/foobar.txt
 
 chmod a-w $inst/share
-$MAKE uninstall >output 2>&1 && { cat output; Exit 1; }
-cat output
+run_make -M -e FAIL uninstall
 if test $rm_f_is_silent_on_error = yes; then
   : "rm -f" is silent on errors, skip the grepping of make output
 else
@@ -72,25 +78,24 @@ fi
 chmod a-rwx $inst/share
 (cd $inst/share) && skip_ "cannot make directories fully unreadable"
 
-$MAKE uninstall >output 2>&1 && { cat output; Exit 1; }
-cat output
-#
-# Some shells, like Solaris 10 /bin/sh and /bin/ksh, do not report
-# the name of the 'cd' builtin upon a chdir error:
+run_make -M -e FAIL uninstall
+
+# Some shells, like Solaris 10 /bin/ksh and /usr/xpg4/bin/sh, do not
+# report the name of the 'cd' builtin upon a chdir error:
 #
-#   $ /bin/sh -c 'cd /none'
-#   /bin/sh: /none: does not exist
+#   $ /bin/ksh -c 'cd /none'
+#   /bin/ksh: /none: not found
 #
-# In addition, some shells, like Solaris 10 /usr/xpg4/bin/sh, also print
-# a line number in the error message *if the command contains newlines*:
+# and also print a line number in the error message *if the command
+# contains newlines*:
 #
-#   $ /usr/xpg4/bin/sh -c 'cd unreadable'
-#   /usr/xpg4/bin/sh: unreadable: permission denied
-#   $ /usr/xpg4/bin/sh -c '\
+#   $ /bin/ksh -c 'cd unreadable'
+#   /bin/ksh: unreadable: permission denied
+#   $ /bin/ksh -c '\
 #   > \
 #   > cd unreadable'
-#   /usr/xpg4/bin/sh[3]: unreadable: permission denied
-#
+#   /bin/ksh[3]: unreadable: permission denied
+
 $EGREP "(cd|sh)(\[[0-9]*[0-9]\])?: .*$inst/share" output
 
 :
old mode 100755 (executable)
new mode 100644 (file)
index 1ba6ac7..3f0c788
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2011-2012 Free Software Foundation, Inc.
+# Copyright (C) 2011-2017 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
@@ -22,7 +22,7 @@
 # need sister tests for other primaries too?  E.g., PROGRAMS, LISP,
 # PYTHON, etc...
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_OUTPUT
@@ -40,28 +40,28 @@ $ACLOCAL
 $AUTOMAKE
 $AUTOCONF
 
-./configure --prefix="`pwd`/inst"
+./configure --prefix="$(pwd)/inst"
 
 $MAKE uninstall
-test ! -d inst
+test ! -e inst
 
 rm -rf inst
 
 $MAKE install-exec
-test -f inst/bin/foo || Exit 99 # Sanity check.
+test -f inst/bin/foo || exit 99 # Sanity check.
 $MAKE uninstall
-test ! -f inst/bin/foo
+test ! -e inst/bin/foo
 
 $MAKE install-data
-test -f inst/share/bar || Exit 99 # Sanity check.
+test -f inst/share/bar || exit 99 # Sanity check.
 $MAKE uninstall
-test ! -f inst/share/bar
+test ! -e inst/share/bar
 
 rm -rf inst
 
 $MAKE install-exec
-test -f inst/bin/foo || Exit 99 # Sanity check.
+test -f inst/bin/foo || exit 99 # Sanity check.
 $MAKE uninstall
-test ! -f inst/bin/foo
+test ! -e inst/bin/foo
 
 :
old mode 100755 (executable)
new mode 100644 (file)
index 271273f..be3fb9a
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 1998-2012 Free Software Foundation, Inc.
+# Copyright (C) 1998-2017 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
@@ -16,7 +16,7 @@
 
 # Test for failing check for unused macros.  From Johan Danielsson.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 MACRO_1
@@ -30,6 +30,6 @@ AC_DEFUN([MACRO_1_2], echo 12)
 AC_DEFUN([MACRO_1_2_3], echo 123)
 END
 
-$ACLOCAL 2>stderr || { cat stderr >&2; Exit 1; }
+$ACLOCAL 2>stderr || { cat stderr >&2; exit 1; }
 cat stderr >&2
 test ! -s stderr
old mode 100755 (executable)
new mode 100644 (file)
index 320e02f..5d93556
--- a/t/upc.sh
+++ b/t/upc.sh
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2006-2012 Free Software Foundation, Inc.
+# Copyright (C) 2006-2017 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
@@ -16,7 +16,7 @@
 
 # A simple Hello World for UPC.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AM_PROG_UPC
@@ -44,7 +44,7 @@ $ACLOCAL
 $AUTOMAKE
 $AUTOCONF
 
-./configure || Exit $?
+./configure || exit $?
 $MAKE distcheck
 
 :
old mode 100755 (executable)
new mode 100644 (file)
index 43575d8..c6f303b
--- a/t/upc2.sh
+++ b/t/upc2.sh
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2006-2012 Free Software Foundation, Inc.
+# Copyright (C) 2006-2017 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
@@ -17,7 +17,7 @@
 # Test that Automake suggests using AM_PROG_UPC if Unified Parallel C
 # sources are used.
 
-. ./defs || Exit 1
+. test-init.sh
 
 echo AC_PROG_CC >>configure.ac
 
old mode 100755 (executable)
new mode 100644 (file)
index eb02679..ff25ca0
--- a/t/upc3.sh
+++ b/t/upc3.sh
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2006-2012 Free Software Foundation, Inc.
+# Copyright (C) 2006-2017 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
@@ -16,7 +16,7 @@
 
 # Test that C and Unified Parallel C link safely.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_CC
@@ -59,7 +59,7 @@ $ACLOCAL
 $AUTOMAKE
 $AUTOCONF
 
-./configure || Exit $?
+./configure || exit $?
 $MAKE distcheck
 
 :
diff --git a/t/vala-configure.sh b/t/vala-configure.sh
new file mode 100644 (file)
index 0000000..aa264b1
--- /dev/null
@@ -0,0 +1,118 @@
+#! /bin/sh
+# Copyright (C) 2008-2017 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 AM_PROG_VALAC.
+
+. test-init.sh
+
+cat >> configure.ac << 'END'
+AC_PROG_CC
+AM_PROG_VALAC([1.2.3])
+AC_OUTPUT
+END
+
+cat > Makefile.am << 'END'
+has-valac:
+       case '$(VALAC)' in */bin/valac) exit 0;; *) exit 1;; esac
+no-valac:
+       test x'$(VALAC)' = x'valac'
+END
+
+mkdir bin
+cat > bin/valac << 'END'
+#! /bin/sh
+if test "x$1" = x--version; then
+  echo "${vala_version-1.2.3}"
+fi
+exit 0
+END
+chmod +x bin/valac
+
+cat > bin/valac.old << 'END'
+#! /bin/sh
+if test "x$1" = x--version; then
+  echo 0.1
+fi
+exit 0
+END
+chmod +x bin/valac.old
+
+PATH=$(pwd)/bin$PATH_SEPARATOR$PATH; export PATH
+
+# Avoid interferences from the environment.
+unset VALAC vala_version
+
+$ACLOCAL
+$AUTOMAKE -a
+$AUTOCONF
+
+st=0; ./configure 2>stderr || st=$?
+cat stderr >&2
+grep 'WARNING.*vala' stderr && exit 1
+test $st -eq 0
+$MAKE has-valac
+
+st=0; vala_version=99.9 ./configure 2>stderr || st=$?
+cat stderr >&2
+grep 'WARNING.*vala' stderr && exit 1
+test $st -eq 0
+$MAKE has-valac
+
+st=0; vala_version=0.1.2 ./configure 2>stderr || st=$?
+cat stderr >&2
+test $st -eq 0
+grep '^configure: WARNING: no proper vala compiler found' stderr
+$MAKE no-valac
+
+st=0; ./configure VALAC="$(pwd)/bin/valac.old" 2>stderr || st=$?
+cat stderr >&2
+test $st -eq 0 || exit 1
+grep '^configure: WARNING: no proper vala compiler found' stderr
+$MAKE no-valac
+
+sed 's/^\(AM_PROG_VALAC\).*/\1([1], [: > ok], [: > ko])/' <configure.ac >t
+mv -f t configure.ac
+rm -rf autom4te*.cache
+$ACLOCAL
+$AUTOCONF
+
+st=0; ./configure 2>stderr || st=$?
+cat stderr >&2
+grep 'WARNING.*vala' stderr && exit 1
+test -f ok
+test ! -e ko
+$MAKE has-valac
+rm -f ok ko
+
+st=0; vala_version=0.1.2 ./configure 2>stderr || st=$?
+cat stderr >&2
+grep 'WARNING.*vala' stderr && exit 1
+test $st -eq 0
+test ! -e ok
+test -f ko
+$MAKE no-valac
+rm -f ok ko
+
+st=0; ./configure VALAC="$(pwd)/bin/valac.old" 2>stderr || st=$?
+cat stderr >&2
+grep 'WARNING.*vala' stderr && exit 1
+test $st -eq 0
+test ! -e ok
+test -f ko
+$MAKE no-valac
+rm -f ok ko
+
+:
old mode 100755 (executable)
new mode 100644 (file)
similarity index 88%
rename from t/vala.sh
rename to t/vala-grepping.sh
index 71c2ee6..3b205e8
--- a/t/vala.sh
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 1996-2012 Free Software Foundation, Inc.
+# Copyright (C) 1996-2017 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
@@ -16,7 +16,7 @@
 
 # Basic "grepping" test on vala support.
 
-. ./defs || Exit 1
+. test-init.sh
 
 # So that we won't require libtool macros.
 cat > acinclude.m4 <<'END'
@@ -65,22 +65,22 @@ $FGREP 'am_zardoz_OBJECTS' Makefile.in
 $FGREP 'am_libzardoz_la_OBJECTS' Makefile.in
 $FGREP 'zardoz_vala.stamp:' Makefile.in
 $FGREP 'libzardoz_la_vala.stamp:' Makefile.in
-test `$FGREP -c '.stamp:' Makefile.in` -eq 2
+test $($FGREP -c '.stamp:' Makefile.in) -eq 2
 $FGREP 'zardoz.c' Makefile.in
 $FGREP 'zardoz-foo.c' Makefile.in
 $FGREP 'zardoz-bar.c' Makefile.in
 
 grep '\$(VALAC).* \$(AM_VALAFLAGS) \$(VALAFLAGS) ' sub/Makefile.in
-$FGREP 'foo_VALAFLAGS' sub/Makefile.in && Exit 1
+$FGREP 'foo_VALAFLAGS' sub/Makefile.in && exit 1
 $FGREP 'am_foo_OBJECTS' sub/Makefile.in
 $FGREP 'bar.c' sub/Makefile.in
 $FGREP 'baz.c' sub/Makefile.in
 $FGREP 'foo_vala.stamp:' sub/Makefile.in
-test `$FGREP -c '.stamp:' sub/Makefile.in` -eq 1
+test $($FGREP -c '.stamp:' sub/Makefile.in) -eq 1
 
 # Check against regression for weird bug due to unescaped '@'
 # characters used in a "..." perl string when writing the vala
 # rules from automake.in.
-grep '\$[0-9][0-9]*t' Makefile.in sub/Makefile.in && Exit 1
+grep '\$[0-9][0-9]*t' Makefile.in sub/Makefile.in && exit 1
 
 :
old mode 100755 (executable)
new mode 100644 (file)
index a091c4c..1b41f50
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 1996-2012 Free Software Foundation, Inc.
+# Copyright (C) 1996-2017 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
@@ -17,7 +17,7 @@
 # Test to make sure compiling Vala code really works with recursive make.
 
 required="pkg-config valac gcc GNUmake"
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_CC
@@ -62,8 +62,6 @@ $ACLOCAL
 $AUTOCONF
 $AUTOMAKE -a
 
-grep PKG_CHECK_MODULES configure && skip_ "pkg-config m4 macros not found"
-
 ./configure
 $MAKE
 
@@ -82,6 +80,6 @@ for h in $headers; do test -f $h; done
 $MAKE distcheck
 
 $MAKE maintainer-clean
-for h in $headers; do test ! -f $h; done
+for h in $headers; do test ! -e $h; done
 
 :
old mode 100755 (executable)
new mode 100644 (file)
index 00befdd..5231597
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2012 Free Software Foundation, Inc.
+# Copyright (C) 2012-2017 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
 # And use of vapi files to call C code from Vala.
 
 required="valac cc pkg-config libtoolize GNUmake"
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_CC
-AM_PROG_CC_C_O
 AM_PROG_AR
 AC_PROG_RANLIB
 AC_PROG_LIBTOOL
@@ -32,11 +31,12 @@ AC_OUTPUT
 END
 
 cat > Makefile.am << 'END'
+AUTOMAKE_OPTIONS = subdir-objects
 lib_LIBRARIES = libmu.a
 lib_LTLIBRARIES = src/libzardoz.la
 libmu_a_SOURCES = mu.vala mu2.c mu.vapi mu2.h
 libmu_a_CPPFLAGS = -DOKOKIMDEFINED=1
-libmu_a_VALAFLAGS = --profile=posix --vapidir=$(srcdir)
+libmu_a_VALAFLAGS = --vapidir=$(srcdir)
 AM_CFLAGS = $(GOBJECT_CFLAGS)
 src_libzardoz_la_LIBADD = $(GOBJECT_LIBS)
 src_libzardoz_la_SOURCES = src/zardoz-foo.vala src/zardoz-bar.vala
@@ -49,8 +49,6 @@ $ACLOCAL
 $AUTOCONF
 $AUTOMAKE -a
 
-grep PKG_CHECK_MODULES configure && skip_ "pkg-config m4 macros not found"
-
 ./configure
 
 cat > mu2.c << 'END'
@@ -78,7 +76,7 @@ int main ()
 }
 END
 
-mkdir src
+mkdir -p src
 cat > src/zardoz-foo.vala << 'END'
 using GLib;
 public class Foo {
old mode 100755 (executable)
new mode 100644 (file)
index 7e04b60..4c6f70f
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2012 Free Software Foundation, Inc.
+# Copyright (C) 2012-2017 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
 
 # Vala sources and C sources in the same program.  Functional test.
 
-required='valac cc GNUmake'
-. ./defs || Exit 1
+required='valac cc pkg-config GNUmake'
+. test-init.sh
 
 cat >> configure.ac <<'END'
 AC_PROG_CC
-AM_PROG_CC_C_O
 AM_PROG_VALAC([0.7.3])
+PKG_CHECK_MODULES([GOBJECT], [gobject-2.0 >= 2.4])
 AC_OUTPUT
 END
 
 cat > Makefile.am <<'END'
 bin_PROGRAMS = zardoz mu baz
-AM_VALAFLAGS = --profile=posix
+AM_CFLAGS = $(GOBJECT_CFLAGS)
+LDADD = $(GOBJECT_LIBS)
 zardoz_SOURCES = foo.vala bar.c
 mu_SOURCES = 1.vala 2.c
-mu_VALAFLAGS = $(AM_VALAFLAGS) --main=run
-mu_CFLAGS = -DHAVE_MU
+mu_VALAFLAGS = --main=run
+mu_CFLAGS = -DHAVE_MU $(AM_CFLAGS)
 baz_SOURCES = baz.c
 END
 
-if cross_compiling; then :; else
+if ! cross_compiling; then
   unindent >> Makefile.am <<'END'
     check-local:
        ./zardoz
@@ -105,7 +106,7 @@ have_generated_files
 
 # Remake rules are not uselessly triggered.
 $MAKE -q
-$MAKE -n | $FGREP vala.stamp && Exit 1
+$MAKE -n | $FGREP vala.stamp && exit 1
 
 # Check the distribution.
 $MAKE distcheck
@@ -119,6 +120,6 @@ have_generated_files
 # behaviour w.r.t. intermediate C files is still unclear, and
 # better left undefined for the moment).
 $MAKE maintainer-clean
-ls *vala*.stamp | grep . && Exit 1
+ls *vala*.stamp | grep . && exit 1
 
 :
old mode 100755 (executable)
new mode 100644 (file)
index 992c41f..ac5aae2
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2012 Free Software Foundation, Inc.
+# Copyright (C) 2012-2017 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
 # 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'
-. ./defs || Exit 1
+required='valac cc c++ pkg-config GNUmake'
+. test-init.sh
 
 cat >> configure.ac <<'END'
 AC_PROG_CC
 AC_PROG_CXX
 AM_PROG_VALAC([0.7.3])
+PKG_CHECK_MODULES([GOBJECT], [gobject-2.0 >= 2.4])
 AC_OUTPUT
 END
 
 cat > Makefile.am <<'END'
 bin_PROGRAMS = zardoz
-AM_VALAFLAGS = --profile=posix
+AM_CFLAGS = $(GOBJECT_CFLAGS)
+zardoz_LDADD = $(GOBJECT_LIBS)
 zardoz_SOURCES = zardoz.vala foo.h bar.c baz.c zen.hh master.cxx
 END
 
@@ -89,13 +91,13 @@ have_generated_files
 
 # Remake rules are not uselessly triggered.
 $MAKE -q
-$MAKE -n | $FGREP vala.stamp && Exit 1
+$MAKE -n | $FGREP vala.stamp && exit 1
 
 # But are triggered when they should.
 for file in zardoz.vala foo.h bar.c baz.c zen.hh master.cxx; do
   $sleep
   echo '& choke me !' >> $file
-  $MAKE && Exit 1
+  $MAKE && exit 1
   $sleep
   sed '$d' $file > t
   mv -f t $file
@@ -115,6 +117,6 @@ have_generated_files
 # behaviour w.r.t. intermediate C files is still unclear, and
 # better left undefined for the moment).
 $MAKE maintainer-clean
-ls *vala*.stamp | grep . && Exit 1
+ls *vala*.stamp | grep . && exit 1
 
 :
old mode 100755 (executable)
new mode 100644 (file)
similarity index 89%
rename from t/vala3.sh
rename to t/vala-non-recursive-setup.sh
index 220c76b..2f783b2
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 1996-2012 Free Software Foundation, Inc.
+# Copyright (C) 1996-2017 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
 # Test to make sure compiling Vala code really works with non-recursive make.
 
 required="pkg-config valac gcc GNUmake"
-. ./defs || Exit 1
+. test-init.sh
 
 mkdir src
 
 cat >> 'configure.ac' << 'END'
 AC_PROG_CC
-AM_PROG_CC_C_O
 AM_PROG_VALAC([0.7.0])
 PKG_CHECK_MODULES([GOBJECT], [gobject-2.0 >= 2.4])
 AC_OUTPUT
@@ -40,6 +39,7 @@ public class Zardoz {
 END
 
 cat > 'Makefile.am' <<'END'
+AUTOMAKE_OPTIONS = subdir-objects
 bin_PROGRAMS = src/zardoz
 src_zardoz_CFLAGS = $(GOBJECT_CFLAGS)
 src_zardoz_LDADD = $(GOBJECT_LIBS)
@@ -50,16 +50,14 @@ $ACLOCAL
 $AUTOCONF
 $AUTOMAKE -a
 
-grep PKG_CHECK_MODULES configure && skip_ "pkg-config m4 macros not found"
-
 ./configure
 $MAKE
 test -f src/zardoz.c
 test -f src_zardoz_vala.stamp
 $MAKE distcheck
 $MAKE maintainer-clean
-test ! -f src/zardoz.c
-test ! -f src_zardoz_vala.stamp
+test ! -e src/zardoz.c
+test ! -e src_zardoz_vala.stamp
 
 mkdir build
 cd build
old mode 100755 (executable)
new mode 100644 (file)
index 8b6aff5..d850704
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2012 Free Software Foundation, Inc.
+# Copyright (C) 2012-2017 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
 
 # Vala support with parallel make.
 
-required='valac cc GNUmake'
-. ./defs || Exit 1
+required='valac cc pkg-config GNUmake'
+. test-init.sh
 
 cat >> configure.ac <<'END'
 AC_PROG_CC
 AC_PROG_CXX
+PKG_CHECK_MODULES([GOBJECT], [gobject-2.0 >= 2.4])
 AM_PROG_VALAC([0.7.3])
 AC_OUTPUT
 END
 
 cat > Makefile.am <<'END'
 bin_PROGRAMS = zardoz
-AM_VALAFLAGS = --profile=posix
+AM_CFLAGS = $(GOBJECT_CFLAGS)
+LDADD = $(GOBJECT_LIBS)
 zardoz_SOURCES = main.vala 1.vala 2.vala 3.vala 4.vala 5.vala 6.vala
 END
 
@@ -54,8 +56,8 @@ test -f  zardoz_vala.stamp
 
 $MAKE maintainer-clean -j4
 ls -l # For debugging.
-for x in main 1 2 3 4 5 6; do test ! -f $x.c; done
-test ! -f zardoz_vala.stamp
+for x in main 1 2 3 4 5 6; do test ! -e $x.c; done
+test ! -e zardoz_vala.stamp
 
 mkdir build
 cd build
@@ -68,7 +70,7 @@ test -f ../zardoz_vala.stamp
 $MAKE distcheck -j4
 
 $MAKE maintainer-clean -j2
-for x in main 1 2 3 4 5 6; do test ! -f ../$x.c; done
-test ! -f ../zardoz_vala.stamp
+for x in main 1 2 3 4 5 6; do test ! -e ../$x.c; done
+test ! -e ../zardoz_vala.stamp
 
 :
old mode 100755 (executable)
new mode 100644 (file)
similarity index 84%
rename from t/vala5.sh
rename to t/vala-per-target-flags.sh
index 6ea2738..bf5b431
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 1996-2012 Free Software Foundation, Inc.
+# Copyright (C) 1996-2017 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 per-target flags.
+# Test per-target flags in vala support.
 
 required="pkg-config valac gcc GNUmake"
-. ./defs || Exit 1
+. test-init.sh
 
 mkdir src
 
 cat >> configure.ac <<'END'
 AC_PROG_CC
-AM_PROG_CC_C_O
 AM_PROG_VALAC([0.7.0])
 PKG_CHECK_MODULES([GOBJECT], [gobject-2.0 >= 2.4])
 AC_CONFIG_FILES([src/Makefile])
@@ -68,16 +67,14 @@ $ACLOCAL
 $AUTOCONF
 $AUTOMAKE -a
 
-grep PKG_CHECK_MODULES configure && skip_ "pkg-config m4 macros not found"
-
 ./configure
 $MAKE
 
-if cross_compiling; then :; else
+if ! cross_compiling; then
   ./src/foo
   ./src/bar
-  test `./src/foo` = foo
-  test `./src/bar` = bar
+  test "$(./src/foo)" = foo
+  test "$(./src/bar)" = bar
 fi
 
 # Test clean rules.
@@ -97,7 +94,7 @@ mv config.sav config.status
 ./config.status
 
 $MAKE maintainer-clean
-test ! -f src/xfoo.c
-test ! -f src/xbar.c
+test ! -e src/xfoo.c
+test ! -e src/xbar.c
 
 :
old mode 100755 (executable)
new mode 100644 (file)
similarity index 88%
rename from t/vala2.sh
rename to t/vala-recursive-setup.sh
index cf52c50..13faec9
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 1996-2012 Free Software Foundation, Inc.
+# Copyright (C) 1996-2017 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
 # Test to make sure compiling Vala code really works with recursive make.
 
 required="pkg-config valac gcc GNUmake"
-. ./defs || Exit 1
+. test-init.sh
 
 mkdir src
 
 cat >> 'configure.ac' << 'END'
 AC_PROG_CC
-AM_PROG_CC_C_O
 AM_PROG_VALAC([0.7.0])
 PKG_CHECK_MODULES([GOBJECT], [gobject-2.0 >= 2.4])
 AC_CONFIG_FILES([src/Makefile])
@@ -56,8 +55,6 @@ $ACLOCAL
 $AUTOCONF
 $AUTOMAKE -a
 
-grep PKG_CHECK_MODULES configure && skip_ "pkg-config m4 macros not found"
-
 ./configure
 $MAKE
 
@@ -75,7 +72,7 @@ echo am--error > src/zardoz.c
 $sleep
 touch src/zardoz.vala
 $MAKE
-grep 'am--error' src/zardoz.[ch] && Exit 1
+grep 'am--error' src/zardoz.[ch] && exit 1
 
 # Check the distribution.
 
@@ -105,6 +102,6 @@ sed 's/Zardoz!/FooBar!/' ../src/zardoz.vala > t
 mv -f t ../src/zardoz.vala
 $MAKE
 grep 'FooBar!' ../src/zardoz.c
-grep 'Zardoz!' ../src/zardoz.c && Exit 1
+grep 'Zardoz!' ../src/zardoz.c && exit 1
 
 :
old mode 100755 (executable)
new mode 100644 (file)
index 3a92716..7f5ae01
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2012 Free Software Foundation, Inc.
+# Copyright (C) 2012-2017 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
 
 # Test and that vapi files are correctly handled by Vala support.
 
-required='valac cc GNUmake'
-. ./defs || Exit 1
+required='pkg-config valac cc GNUmake'
+. test-init.sh
 
 cat >> configure.ac <<'END'
 AC_PROG_CC
-AM_PROG_CC_C_O
 AM_PROG_VALAC([0.7.3])
+PKG_CHECK_MODULES([GOBJECT], [gobject-2.0 >= 2.4])
 AC_OUTPUT
 END
 
 cat > Makefile.am <<'END'
 bin_PROGRAMS = zardoz
-AM_VALAFLAGS = --profile=posix
+AM_CFLAGS = $(GOBJECT_CFLAGS)
+LDADD = $(GOBJECT_LIBS)
 zardoz_SOURCES = zardoz.vala foo.vapi foo.h
 END
 
 cat > zardoz.vala <<'END'
-int main ()
-{
+using GLib;
+public class Zardoz {
+  public static void main () {
     stdout.printf (BARBAR);
-    return 0;
+  }
 }
 END
 
-echo '#define BARBAR "Zardoz!\n"' > foo.h
+# Use printf, not echo, to avoid '\n' being considered and escape
+# sequence and printed as a newline in 'foo.h'.
+printf '%s\n' '#define BARBAR "Zardoz!\n"' > foo.h
 
 cat > foo.vapi <<'END'
 [CCode (cprefix="", lower_case_cprefix="", cheader_filename="foo.h")]
 public const string BARBAR;
 END
 
-if cross_compiling; then :; else
+if ! cross_compiling; then
   unindent >> Makefile.am <<'END'
     check-local: test2
     .PHONY: test1 test2
@@ -70,18 +74,20 @@ $MAKE
 ls -l        # For debugging.
 cat zardoz.c # Likewise.
 grep 'BARBAR' zardoz.c
-cross_compiling || $MAKE test1 || Exit 1
+cross_compiling || $MAKE test1 || exit 1
 
 # Simple check on remake rules.
 $sleep
-echo '#define BAZBAZ "Quux!\n"' > foo.h
-sed 's/BARBAR/BAZBAZ/' zardoz.vala > t && mv -f t zardoz.vala || Exit 99
-$MAKE && Exit 1
-sed 's/BARBAR/BAZBAZ/' foo.vapi > t && mv -f t foo.vapi || Exit 99
+# Use printf, not echo, to avoid '\n' being considered and escape
+# sequence and printed as a newline in 'foo.h'.
+printf '%s\n' '#define BAZBAZ "Quux!\n"' > foo.h
+sed 's/BARBAR/BAZBAZ/' zardoz.vala > t && mv -f t zardoz.vala || exit 99
+$MAKE && exit 1
+sed 's/BARBAR/BAZBAZ/' foo.vapi > t && mv -f t foo.vapi || exit 99
 $MAKE
 cat zardoz.c # For debugging.
 grep 'BAZBAZ' zardoz.c
-cross_compiling || $MAKE test2 || Exit 1
+cross_compiling || $MAKE test2 || exit 1
 
 # Check the distribution.
 $MAKE distcheck
old mode 100755 (executable)
new mode 100644 (file)
index f2da4af..523f828
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2011-2012 Free Software Foundation, Inc.
+# Copyright (C) 2011-2017 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
 # Test to make sure vala support handles from-scratch VPATH builds.
 # See automake bug#8753.
 
-required="cc valac GNUmake"
-. ./defs || Exit 1
+required="cc valac pkg-config GNUmake"
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_CONFIG_SRCDIR([hello.vala])
 AC_PROG_CC
 AM_PROG_VALAC([0.7.3])
+PKG_CHECK_MODULES([GOBJECT], [gobject-2.0 >= 2.4])
 AC_OUTPUT
 END
 
 cat > Makefile.am <<'END'
 bin_PROGRAMS = foo bar
-AM_VALAFLAGS = --profile=posix
+AM_CFLAGS = $(GOBJECT_CFLAGS)
+LDADD = $(GOBJECT_LIBS)
 foo_SOURCES = hello.vala
-bar_VALAFLAGS = $(AM_VALAFLAGS) -H zardoz.h
+bar_VALAFLAGS = -H zardoz.h
 bar_SOURCES = goodbye.vala
 END
 
@@ -74,7 +76,7 @@ grep barbarbar ../hello.c
 
 # Rebuild rules are not uselessly triggered.
 $MAKE -q
-$MAKE -n | grep '\.stamp' && Exit 1
+$MAKE -n | grep '\.stamp' && exit 1
 
 # Cleanup rules work also in VPATH builds.
 $MAKE clean
@@ -83,9 +85,9 @@ test -f ../bar_vala.stamp
 test -f ../zardoz.h
 test -f ../hello.c
 $MAKE maintainer-clean
-test ! -f ../zardoz.h
-test ! -f ../hello.c
-test ! -f ../foo_vala.stamp
-test ! -f ../bar_vala.stamp
+test ! -e ../zardoz.h
+test ! -e ../hello.c
+test ! -e ../foo_vala.stamp
+test ! -e ../bar_vala.stamp
 
 :
diff --git a/t/vala4.sh b/t/vala4.sh
deleted file mode 100755 (executable)
index 879803f..0000000
+++ /dev/null
@@ -1,64 +0,0 @@
-#! /bin/sh
-# Copyright (C) 2008-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 AM_PROG_VALAC.
-
-. ./defs || Exit 1
-
-cat >> configure.ac << 'END'
-AC_PROG_CC
-AM_PROG_VALAC([0.0.1])
-AC_OUTPUT
-END
-
-: > Makefile.am
-
-cat > valac << 'END'
-#! /bin/sh
-if test "x$1" = x--version; then
-  echo 1.2.3
-fi
-exit 0
-END
-chmod +x valac
-
-cwd=`pwd`
-
-# Use $cwd instead of `pwd` in the && list below to avoid a bug in
-# the way Solaris/Heirloom Sh handles 'set -e'.
-
-$ACLOCAL
-$AUTOMAKE -a
-$AUTOCONF
-
-# The "|| Exit 1" is required here even if 'set -e' is active,
-# because ./configure migt exit with status 77, and in that case
-# we want to FAIL, not to SKIP.
-./configure "VALAC=$cwd/valac" || Exit 1
-
-sed 's/AM_PROG_VALAC.*/AM_PROG_VALAC([9999.9])/' < configure.ac >t
-mv -f t configure.ac
-$AUTOCONF --force
-st=0; ./configure "VALAC=$cwd/valac" || st=$?
-test $st -eq 77 || Exit 1
-
-sed 's/AM_PROG_VALAC.*/AM_PROG_VALAC([1.2.3])/' < configure.ac >t
-mv -f t configure.ac
-$AUTOCONF --force
-# See comments above for why "|| Exit 1" is needed.
-./configure "VALAC=$cwd/valac" || Exit 1
-
-:
old mode 100755 (executable)
new mode 100644 (file)
similarity index 87%
rename from t/recurs.sh
rename to t/var-recurs.sh
index 5a9c165..acbaa90
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 1998-2012 Free Software Foundation, Inc.
+# Copyright (C) 1998-2017 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
 
 # Test to make sure recursive variable definitions die.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_CC
-AM_CONDITIONAL(ONE, true)
-AM_CONDITIONAL(TWO, false)
 END
 
 cat > Makefile.am << 'END'
old mode 100755 (executable)
new mode 100644 (file)
similarity index 91%
rename from t/recurs2.sh
rename to t/var-recurs2.sh
index e2c5213..e9d351f
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 1998-2012 Free Software Foundation, Inc.
+# Copyright (C) 1998-2017 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
@@ -17,7 +17,7 @@
 # Test to make sure recursive variable definitions die.
 # From Jim Meyering.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat > Makefile.am << 'END'
 man_MANS = chgrp.1
@@ -27,3 +27,5 @@ END
 
 $ACLOCAL
 $AUTOMAKE
+
+:
old mode 100755 (executable)
new mode 100644 (file)
index 1e3e91e..53442eb
--- a/t/vars.sh
+++ b/t/vars.sh
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2001-2012 Free Software Foundation, Inc.
+# Copyright (C) 2001-2017 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
@@ -17,7 +17,7 @@
 # Test various variable definitions that include an '=' sign.
 # From Raja R Harinath.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat > Makefile.am << 'END'
 MY_FLAGS_1=-DABC=345
old mode 100755 (executable)
new mode 100644 (file)
index 246ea70..d22261b
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2002-2012 Free Software Foundation, Inc.
+# Copyright (C) 2002-2017 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
@@ -17,7 +17,7 @@
 # Check that Automake warns about variables containing spaces
 # and other non-POSIX characters.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat >Makefile.am <<'EOF'
 L01 = $(shell echo *)
@@ -37,18 +37,18 @@ EOF
 $ACLOCAL
 # Make sure this warning is print in the 'portability' category.
 $AUTOMAKE --warnings=no-error,none,portability 2>stderr \
-  || { cat stderr >&2; Exit 1; }
+  || { cat stderr >&2; exit 1; }
 cat stderr >&2
 
 # Lines number are printed in error message.
 # Use them to make sure errors are diagnosed against the right lines.
 
 # No error expected apart from those on these lines.
-grep -v '^Makefile\.am:[145789]:' stderr | grep . && Exit 1
+grep -v '^Makefile\.am:[145789]:' stderr | grep . && exit 1
 
 # Now check some individual values.
 grep ':1:.*shell echo' stderr
-grep 'nextvariableisbad' stderr && Exit 1
+grep 'nextvariableisbad' stderr && exit 1
 grep ':4:.*addsuffix' stderr
 grep ':5:.*bad boy' stderr
 grep ':7:.*three errors' stderr
@@ -58,7 +58,7 @@ grep ':8:.*o u c h' stderr
 grep ':8:.*wildcard' stderr
 grep ':9:.*another Error' stderr
 
-$EGREP 'ok|thisis|here' stderr && Exit 1
+$EGREP 'ok|thisis|here' stderr && exit 1
 
 # None of these errors be diagnosed with '-Wno-portability'.
 $AUTOMAKE -Wno-portability
old mode 100755 (executable)
new mode 100644 (file)
index ebac14b..ab822f2
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2001-2012 Free Software Foundation, Inc.
+# Copyright (C) 2001-2017 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
@@ -16,7 +16,7 @@
 
 # Targets and macros are two different name spaces.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat > Makefile.am << 'END'
 install = install
old mode 100755 (executable)
new mode 100644 (file)
index 9b52df6..7267d32
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2010-2012 Free Software Foundation, Inc.
+# Copyright (C) 2010-2017 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
@@ -18,7 +18,7 @@
 # Libtool variant.
 
 required=libtoolize
-. ./defs || Exit 1
+. test-init.sh
 
 cat >>configure.ac <<'END'
 AM_PROG_AR
@@ -40,22 +40,21 @@ $ACLOCAL
 AUTOMAKE_fails --add-missing
 # The expected diagnostic is:
 # automake: warnings are treated as errors
-# Makefile.am:3: warning: variable `EXTRA_libfoo_la_SOURCES' is defined but no program or
-# Makefile.am:3: library has `libfoo_la' as canonical name (possible typo)
-# Makefile.am:1: warning: variable `libfoo_la_SOURCES' is defined but no program or
-# Makefile.am:1: library has `libfoo_la' as canonical name (possible typo)
-# Makefile.am:2: warning: variable `nodist_libfoo_la_SOURCES' is defined but no program or
-# Makefile.am:2: library has `libfoo_la' as canonical name (possible typo)
-# Makefile.am:4: warning: variable `libfoo_la_LIBADD' is defined but no program or
-# Makefile.am:4: library has `libfoo_la' as canonical name (possible typo)
-# Makefile.am:6: warning: variable `EXTRA_libfoo_la_DEPENDENCIES' is defined but no program or
-# Makefile.am:6: library has `libfoo_la' as canonical name (possible typo)
-# Makefile.am:5: warning: variable `libfoo_la_DEPENDENCIES' is defined but no program or
-# Makefile.am:5: library has `libfoo_la' as canonical name (possible typo)
+# Makefile.am:3: warning: variable 'EXTRA_libfoo_la_SOURCES' is defined but no program or
+# Makefile.am:3: library has 'libfoo_la' as canonical name (possible typo)
+# Makefile.am:1: warning: variable 'libfoo_la_SOURCES' is defined but no program or
+# Makefile.am:1: library has 'libfoo_la' as canonical name (possible typo)
+# Makefile.am:2: warning: variable 'nodist_libfoo_la_SOURCES' is defined but no program or
+# Makefile.am:2: library has 'libfoo_la' as canonical name (possible typo)
+# Makefile.am:4: warning: variable 'libfoo_la_LIBADD' is defined but no program or
+# Makefile.am:4: library has 'libfoo_la' as canonical name (possible typo)
+# Makefile.am:6: warning: variable 'EXTRA_libfoo_la_DEPENDENCIES' is defined but no program or
+# Makefile.am:6: library has 'libfoo_la' as canonical name (possible typo)
+# Makefile.am:5: warning: variable 'libfoo_la_DEPENDENCIES' is defined but no program or
+# Makefile.am:5: library has 'libfoo_la' as canonical name (possible typo)
 
-
-grep 'as canonical' stderr | grep -v ' .libfoo_la. ' && Exit 1
-test `grep 'variable.*is defined but' stderr | wc -l` = 6
+grep 'as canonical' stderr | grep -v ' .libfoo_la. ' && exit 1
+test $(grep -c 'variable.*is defined but' stderr) -eq 6
 
 # If we add a global -Wnone, all warnings should disappear.
 $AUTOMAKE -Wnone
old mode 100755 (executable)
new mode 100644 (file)
index eb924cc..fd5a41a
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2010-2012 Free Software Foundation, Inc.
+# Copyright (C) 2010-2017 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
@@ -16,7 +16,7 @@
 
 # Make sure we warn about possible variable typos when we should.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat >>configure.ac <<'END'
 AC_PROG_RANLIB
@@ -72,8 +72,8 @@ AUTOMAKE_fails -Wno-extra-portability
 # 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 'variable.*is defined but' stderr | wc -l` = 13
+  && exit 1
+test $(grep -c 'variable.*is defined but' stderr) -eq 13
 
 # If we add a global -Wnone, all warnings should disappear.
 $AUTOMAKE -Wnone
diff --git a/t/version2.sh b/t/version2.sh
deleted file mode 100755 (executable)
index 273bd36..0000000
+++ /dev/null
@@ -1,41 +0,0 @@
-#! /bin/sh
-# Copyright (C) 1997-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 3rd arg to AM_INIT_AUTOMAKE not picked up in
-# version.  From Joel Weber.
-
-. ./defs || Exit 1
-
-cat > configure.ac << 'END'
-AC_INIT
-AM_INIT_AUTOMAKE([sh-utils], [1.12o], [no])
-AC_CONFIG_FILES([Makefile])
-AC_OUTPUT
-END
-
-: > Makefile.am
-
-# Files required by Gnits.
-: > INSTALL
-: > NEWS
-: > README
-: > COPYING
-: > AUTHORS
-: > ChangeLog
-: > THANKS
-
-$ACLOCAL
-$AUTOMAKE --gnits -Wno-obsolete
old mode 100755 (executable)
new mode 100644 (file)
index 2839467..94a0416
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 1998-2012 Free Software Foundation, Inc.
+# Copyright (C) 1998-2017 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
@@ -16,7 +16,7 @@
 
 # Test to make sure version in AUTOMAKE_OPTIONS works.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat > Makefile.am << 'END'
 AUTOMAKE_OPTIONS = 9.9x
old mode 100755 (executable)
new mode 100644 (file)
index 7fa429e..563b7fb
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2001-2012 Free Software Foundation, Inc.
+# Copyright (C) 2001-2017 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
@@ -16,7 +16,7 @@
 
 # Test to make sure we are compatible with the 1.4-p1 series.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat > Makefile.am << 'END'
 AUTOMAKE_OPTIONS = 1.4-p3
old mode 100755 (executable)
new mode 100644 (file)
index 1c04ab4..68191b6
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2002-2012 Free Software Foundation, Inc.
+# Copyright (C) 2002-2017 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
@@ -16,9 +16,9 @@
 
 # Make sure the current version can be required.
 
-. ./defs || Exit 1
+. test-init.sh
 
-amver=`$AUTOMAKE --version | sed -e 's/.* //;1q'`
+amver=$($AUTOMAKE --version | sed -e 's/.* //;1q')
 
 # Does the extracted version number seems legit?
 case $amver in
old mode 100755 (executable)
new mode 100644 (file)
index 2892920..dd89588
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2002-2012 Free Software Foundation, Inc.
+# Copyright (C) 2002-2017 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
@@ -20,7 +20,7 @@
 # changes -- we don't support this feature on non-GNU Makes).
 
 required='makeinfo tex texi2dvi'
-. ./defs || Exit 1
+. test-init.sh
 
 cat >configure.ac <<END
 m4_include([version.m4])
old mode 100755 (executable)
new mode 100644 (file)
index 1e66280..9f12471
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2005-2012 Free Software Foundation, Inc.
+# Copyright (C) 2005-2017 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
@@ -16,9 +16,9 @@
 
 # Calling AM_AUTOMAKE_VERSION by hand is a bug.
 
-. ./defs || Exit 1
+. test-init.sh
 
 echo 'AM_AUTOMAKE_VERSION([1.9])' >>configure.ac
-$ACLOCAL 2>stderr && { cat stderr >&2; Exit 0; }
+$ACLOCAL 2>stderr && { cat stderr >&2; exit 0; }
 cat stderr >&2
 $FGREP 'AM_INIT_AUTOMAKE([1.9])' stderr
old mode 100755 (executable)
new mode 100644 (file)
index 4bfc9be..5d21327
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 1996-2012 Free Software Foundation, Inc.
+# Copyright (C) 1996-2017 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
@@ -17,7 +17,7 @@
 # Test to make sure VPATH can be overridden.
 # Report from Anthony Green.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat > Makefile.am << 'END'
 VPATH = zardoz
@@ -28,6 +28,6 @@ $AUTOMAKE
 
 grep VPATH Makefile.in # For debugging.
 grep '^VPATH = zardoz$' Makefile.in
-grep 'VPATH.*@srcdir@' Makefile.in && Exit 1
+grep 'VPATH.*@srcdir@' Makefile.in && exit 1
 
 :
old mode 100755 (executable)
new mode 100644 (file)
index 3d3885d..94a89a7
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2011-2012 Free Software Foundation, Inc.
+# Copyright (C) 2011-2017 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
@@ -19,7 +19,7 @@
 # levels are "catch-all warnings" (such as '-Wall' and '-Wnone').
 # Since we are at it, also throw in *.am and *.m4 file inclusions.
 
-. ./defs || Exit 1
+. test-init.sh
 
 # We want complete control over automake options.
 AUTOMAKE=$am_original_AUTOMAKE
diff --git a/t/warnings-obsolete-default.sh b/t/warnings-obsolete-default.sh
new file mode 100644 (file)
index 0000000..8c4a364
--- /dev/null
@@ -0,0 +1,39 @@
+#! /bin/sh
+# Copyright (C) 2011-2017 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 warnings in the 'obsolete' category are enabled
+# by default.
+
+. test-init.sh
+
+# We want (almost) complete control over automake options.
+AUTOMAKE="$am_original_AUTOMAKE --foreign -Werror"
+
+echo AC_PROG_CC >> configure.ac
+
+cat > Makefile.am <<'END'
+bin_PROGRAMS = foo
+INCLUDES = -Ibar
+END
+
+$ACLOCAL
+AUTOMAKE_fails
+grep '^Makefile\.am:2:.*INCLUDES.*AM_CPPFLAGS' stderr
+
+# Check that we can override warnings about obsolete stuff.
+$AUTOMAKE -Wno-obsolete
+
+:
old mode 100755 (executable)
new mode 100644 (file)
index 9f973c6..0f257ca
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2011-2012 Free Software Foundation, Inc.
+# Copyright (C) 2011-2017 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
@@ -21,7 +21,7 @@
 # been in place for quite a long time); see also Automake bug #7673.
 # Update this test if the semantics are changed.
 
-. ./defs || Exit 1
+. test-init.sh
 
 # We want (almost) complete control over automake options.
 AUTOMAKE="$am_original_AUTOMAKE -Werror"
old mode 100755 (executable)
new mode 100644 (file)
index a588670..3fd2e9b
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2011-2012 Free Software Foundation, Inc.
+# Copyright (C) 2011-2017 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
@@ -18,7 +18,7 @@
 # warnings specified later should take precedence over those specified
 # earlier.
 
-. ./defs || Exit 1
+. test-init.sh
 
 # We want (almost) complete control over automake options.
 AUTOMAKE="$am_original_AUTOMAKE -Werror"
old mode 100755 (executable)
new mode 100644 (file)
index 774fd3a..914c00f
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2011-2012 Free Software Foundation, Inc.
+# Copyright (C) 2011-2017 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
@@ -18,7 +18,7 @@
 # in AUTOMAKE_OPTIONS take precedence over explicit warnings given in
 # AM_INIT_AUTOMAKE.
 
-. ./defs || Exit 1
+. test-init.sh
 
 # We want (almost) complete control over automake options.
 AUTOMAKE="$am_original_AUTOMAKE -Werror"
old mode 100755 (executable)
new mode 100644 (file)
index 4d64059..f696f0b
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2011-2012 Free Software Foundation, Inc.
+# Copyright (C) 2011-2017 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
@@ -16,7 +16,7 @@
 
 # Check that automake complains about unknown warnings.
 
-. ./defs || Exit 1
+. test-init.sh
 
 # We want (almost) complete control over automake options.
 AUTOMAKE="$am_original_AUTOMAKE --foreign -Werror"
@@ -34,10 +34,6 @@ END
 $ACLOCAL
 
 AUTOMAKE_fails -Wbazquux
-# FIXME: we could get rid of this once we improve our wrapper scripts.
-sed "s/^automake:/automake-$APIVERSION:/" stderr > t
-mv -f t stderr
-cat stderr >&2
 grep '^configure\.ac:2:.* unknown warning category.*zardoz' stderr
 grep '^Makefile\.am:1:.* unknown warning category.*foobar' stderr
 grep "^automake-$APIVERSION:.* unknown warning category.*bazquux" stderr
old mode 100755 (executable)
new mode 100644 (file)
index 5d47f50..b30c6b8
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2011-2012 Free Software Foundation, Inc.
+# Copyright (C) 2011-2017 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
@@ -17,7 +17,7 @@
 # Check that, on the command line, explicitly-defined warnings take
 # precedence over implicit strictness-implied warnings.
 
-. ./defs || Exit 1
+. test-init.sh
 
 # We want complete control over automake options.
 AUTOMAKE=$am_original_AUTOMAKE
@@ -32,7 +32,7 @@ ko ()
 {
   AUTOMAKE_run $*
   grep '^Makefile\.am:.*:=.*not portable' stderr
-  test `wc -l <stderr` -eq 1
+  test $(wc -l <stderr) -eq 1
 }
 
 set_am_opts()
old mode 100755 (executable)
new mode 100644 (file)
index 1662d91..469d708
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2002-2012 Free Software Foundation, Inc.
+# Copyright (C) 2002-2017 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
@@ -16,7 +16,7 @@
 
 # Make sure that we can enable or disable warnings on a per-file basis.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat >>configure.ac <<END
 AC_CONFIG_FILES([sub/Makefile])
@@ -49,10 +49,10 @@ AUTOMAKE_fails
 #   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
+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` = 3
+test $(grep -v 'warnings are treated as errors' stderr | wc -l) -eq 3
 
 # 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
@@ -71,3 +71,5 @@ AC_OUTPUT
 END
 $ACLOCAL
 $AUTOMAKE
+
+:
old mode 100755 (executable)
new mode 100644 (file)
index 606fed6..84fece9
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2001-2012 Free Software Foundation, Inc.
+# Copyright (C) 2001-2017 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
@@ -16,7 +16,7 @@
 
 # Test to make sure -Werror and --add-missing work together.
 
-. ./defs || Exit 1
+. test-init.sh
 
 : > Makefile.am
 
old mode 100755 (executable)
new mode 100644 (file)
index 67e0e01..83658a8
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2004-2012 Free Software Foundation, Inc.
+# Copyright (C) 2004-2017 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
@@ -19,7 +19,7 @@
 # succeed if make is run a second time immediately afterwards.
 # Report from Harlan Stenn.
 
-. ./defs || Exit 1
+. test-init.sh
 
 echo AC_OUTPUT>>configure.ac
 
@@ -42,7 +42,7 @@ foo_SOURCES = unused
 END
 
 # This repetition is deliberate; see heading comments.
-$MAKE && Exit 1
-$MAKE && Exit 1
+$MAKE && exit 1
+$MAKE && exit 1
 
 :
old mode 100755 (executable)
new mode 100644 (file)
index b5e35e3..d130911
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2010-2012 Free Software Foundation, Inc.
+# Copyright (C) 2010-2017 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
@@ -17,7 +17,7 @@
 # Make sure a per-Makefile.am -Werror setting is not carried over
 # to another Makefile.am.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat >>configure.ac <<\END
 AC_CONFIG_FILES([sub/Makefile])
@@ -36,7 +36,7 @@ END
 $ACLOCAL
 
 # The issue would not manifest with threaded execution.
-unset AUTOMAKE_JOBS || :
+unset AUTOMAKE_JOBS
 AUTOMAKE_run -Wno-error
 grep 'VAR multiply defined' stderr
 
old mode 100755 (executable)
new mode 100644 (file)
index b2f3f6a..3787a82
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2010-2012 Free Software Foundation, Inc.
+# Copyright (C) 2010-2017 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
@@ -16,7 +16,7 @@
 
 # -Werror and local -Werror settings should be flagged for the user.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat >>configure.ac <<\END
 AC_CONFIG_FILES([sub/Makefile])
@@ -40,7 +40,7 @@ $ACLOCAL
 AUTOMAKE_fails -Wno-error
 grep 'VAR multiply defined' stderr
 grep 'SUB multiply defined' stderr
-test `grep -c 'warnings are treated as errors' stderr` -eq 1
+test $(grep -c 'warnings are treated as errors' stderr) -eq 1
 
 sed '/AUTOMAKE_OPTIONS/d' sub/Makefile.am > t
 mv -f t sub/Makefile.am
@@ -48,7 +48,7 @@ mv -f t sub/Makefile.am
 AUTOMAKE_fails -Wno-error
 grep 'VAR multiply defined' stderr
 grep 'SUB multiply defined' stderr
-test `grep -c 'warnings are treated as errors' stderr` -eq 1
+test $(grep -c 'warnings are treated as errors' stderr) -eq 1
 
 sed '/AUTOMAKE_OPTIONS/d' Makefile.am > t
 mv -f t Makefile.am
@@ -56,11 +56,11 @@ mv -f t Makefile.am
 AUTOMAKE_fails -Werror
 grep 'VAR multiply defined' stderr
 grep 'SUB multiply defined' stderr
-test `grep -c 'warnings are treated as errors' stderr` -eq 1
+test $(grep -c 'warnings are treated as errors' stderr) -eq 1
 
 AUTOMAKE_run -Wno-error
 grep 'VAR multiply defined' stderr
 grep 'SUB multiply defined' stderr
-grep 'warnings are treated as errors' stderr && Exit 1
+grep 'warnings are treated as errors' stderr && exit 1
 
 :
old mode 100755 (executable)
new mode 100644 (file)
index 72153ca..4b45269
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 1998-2012 Free Software Foundation, Inc.
+# Copyright (C) 1998-2017 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
@@ -18,7 +18,7 @@
 # from Johan Danielsson (and a very nice bug report, too, I might
 # add).
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 WHO_AM_I=17
index 18ee13a..a624bcb 100644 (file)
@@ -1,7 +1,7 @@
-#!/bin/sh
+#!@PERL@ -w
 # @configure_input@
 
-# Copyright (C) 2012 Free Software Foundation, Inc.
+# Copyright (C) 2012-2017 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/>.
 
-# Be Bourne compatible
-if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
-  emulate sh
-  NULLCMD=:
-  # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
-  # is contrary to our usage.  Disable this feature.
-  alias -g '${1+"$@"}'='"$@"'
-fi
-
-perllibdir="@abs_top_builddir@/lib@PATH_SEPARATOR@@abs_top_srcdir@/lib"
-export perllibdir
-
-exec "@abs_top_builddir@/aclocal" "--automake-acdir=@abs_top_srcdir@/m4" \
-     "--system-acdir=@abs_top_srcdir@/m4/acdir" ${1+"$@"}
+BEGIN
+{
+  use strict;
+  @Aclocal::perl_libdirs = ('@abs_top_srcdir@/lib');
+  unshift @Aclocal::perl_libdirs, '@abs_top_builddir@/lib'
+    if '@srcdir@' ne '.';
+  unshift @ARGV,
+    '--automake-acdir=@abs_top_srcdir@/m4',
+    '--system-acdir=@abs_top_srcdir@/m4/acdir';
+}
+require '@abs_top_builddir@/bin/aclocal';
index 14f437f..1075346 100644 (file)
@@ -1,7 +1,7 @@
-#!/bin/sh
+#!@PERL@ -w
 # @configure_input@
 
-# Copyright (C) 2012 Free Software Foundation, Inc.
+# Copyright (C) 2012-2017 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/>.
 
-# Be Bourne compatible
-if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
-  emulate sh
-  NULLCMD=:
-  # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
-  # is contrary to our usage.  Disable this feature.
-  alias -g '${1+"$@"}'='"$@"'
-fi
-
-perllibdir="@abs_top_builddir@/lib@PATH_SEPARATOR@@abs_top_srcdir@/lib"
-export perllibdir
-exec "@abs_top_builddir@/automake" "--libdir=@abs_top_srcdir@/lib" ${1+"$@"}
+BEGIN
+{
+  use strict;
+  @Automake::perl_libdirs = ('@abs_top_srcdir@/lib');
+  unshift @Automake::perl_libdirs, '@abs_top_builddir@/lib'
+    if '@srcdir@' ne '.';
+  unshift @ARGV, '--libdir=@abs_top_srcdir@/lib';
+}
+require '@abs_top_builddir@/bin/automake';
old mode 100755 (executable)
new mode 100644 (file)
index 5f89dc9..aff7ea7
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 1997-2012 Free Software Foundation, Inc.
+# Copyright (C) 1997-2017 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
@@ -17,7 +17,7 @@
 # Test to make sure multiple source files with the same object
 # file causes error.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat > Makefile.am << 'END'
 bin_PROGRAMS = zardoz
old mode 100755 (executable)
new mode 100644 (file)
index 1b494e8..3bb3a3a
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2001-2012 Free Software Foundation, Inc.
+# Copyright (C) 2001-2017 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
@@ -17,7 +17,7 @@
 # Test to make sure ylwrap is put in right location.
 # Report from Tim Van Holder.
 
-. ./defs || Exit 1
+. test-init.sh
 
 mkdir aux1 sub
 
@@ -47,8 +47,8 @@ END
 $ACLOCAL
 $AUTOMAKE -a
 test -f aux1/ylwrap
-test ! -f ylwrap
-test ! -f sub/ylwrap
+test ! -e ylwrap
+test ! -e sub/ylwrap
 grep -i 'ylwrap' Makefile.in sub/Makefile.in # For debugging.
 $FGREP '$(top_srcdir)/aux1/ylwrap' Makefile.in
 $FGREP '$(top_srcdir)/aux1/ylwrap' sub/Makefile.in
old mode 100755 (executable)
new mode 100644 (file)
index d2fd490..d419fc5
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2010-2012 Free Software Foundation, Inc.
+# Copyright (C) 2010-2017 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 # Basic semantic checks on Yacc support (without yacc-generated headers).
-# Keep in sync with sister test 'yacc-cxx.test'.
+# Keep in sync with sister test 'yacc-cxx.sh'.
 
 required='cc yacc'
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_CC
@@ -67,11 +67,11 @@ test -f bar-parse.c
 # Check that per-object flags are honored.
 test -f bar-parse.output
 
-if cross_compiling; then :; else
+if ! cross_compiling; then
   echo a | ./foo
-  echo b | ./foo && Exit 1
+  echo b | ./foo && exit 1
   echo a | ./bar
-  echo b | ./bar && Exit 1
+  echo b | ./bar && exit 1
   : For shells with busted 'set -e'.
 fi
 
@@ -102,7 +102,7 @@ test -f bar-parse.c
 ./configure # We must re-create 'Makefile'.
 $MAKE maintainer-clean
 ls -l
-test ! -f parse.c
-test ! -f bar-parse.c
+test ! -e parse.c
+test ! -e bar-parse.c
 
 :
old mode 100755 (executable)
new mode 100644 (file)
index f5d8545..95c0dae
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2011-2012 Free Software Foundation, Inc.
+# Copyright (C) 2011-2017 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
@@ -18,7 +18,7 @@
 # For Automake bug#7648 and PR automake/491.
 
 required='c++ bison'
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_CXX
@@ -40,10 +40,15 @@ END
 cat > zardoz.yy << 'END'
 %skeleton "lalr1.cc"
 %defines
+%locations
 
+%union
+{
+  int ival;
+};
 %{
-#define YYSTYPE int
-int yylex(YYSTYPE* yylval_param);
+int yylex (yy::parser::semantic_type *yylval,
+           yy::parser::location_type *yylloc);
 %}
 
 %%
@@ -51,23 +56,22 @@ start :        /* empty */
 %%
 
 int
-yylex(YYSTYPE*)
+yylex (yy::parser::semantic_type *yylval,
+       yy::parser::location_type *yylloc)
 {
-    return 0;
+  return 0;
 }
 
 void
-yy::parser::error(const yy::parser::location_type&, const std::string& m)
+yy::parser::error(const yy::parser::location_type&, const std::string&)
 {
-    return;
+  return;
 }
 END
 
 cat > foo.cc << 'END'
 #include "zardoz.hh"
 
-using namespace std;
-
 int
 main(int argc, char** argv)
 {
@@ -93,6 +97,6 @@ $MAKE
 
 # Check that distribution is self-contained, and do not require
 # bison to be built.
-env YACC=false DISTCHECK_CONFIGURE_FLAGS='YACC=false' $MAKE -e distcheck
+yl_distcheck YACC=false DISTCHECK_CONFIGURE_FLAGS='YACC=false'
 
 :
old mode 100755 (executable)
new mode 100644 (file)
index 8cf957b..6d577f7
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2011-2012 Free Software Foundation, Inc.
+# Copyright (C) 2011-2017 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
 # For Automake bug#7648 and PR automake/491.
 
 required='cc bison'
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_CC
+AC_C_INLINE    dnl Required by some pre-C99 compilers such as MSVC.
 AC_PROG_YACC
 AC_OUTPUT
 END
@@ -30,16 +31,20 @@ cat > Makefile.am << 'END'
 bin_PROGRAMS = zardoz
 zardoz_SOURCES = zardoz.y foo.c
 AM_YFLAGS = -d --skeleton glr.c
+BUILT_SOURCES = zardoz.h
 END
 
 # Parser.
 cat > zardoz.y << 'END'
 %{
-int yylex () { return 0; }
-void yyerror (const char *s) { return; }
+int yylex ();
+void yyerror (const char *s);
 %}
 %%
 foobar : 'f' 'o' 'o' 'b' 'a' 'r' {};
+%%
+int yylex () { return 0; }
+void yyerror (const char *s) { return; }
 END
 
 cat > foo.c << 'END'
@@ -67,6 +72,6 @@ $MAKE
 
 # Check that distribution is self-contained, and do not require
 # bison to be built.
-env YACC=false DISTCHECK_CONFIGURE_FLAGS='YACC=false' $MAKE -e distcheck
+yl_distcheck YACC=false DISTCHECK_CONFIGURE_FLAGS='YACC=false'
 
 :
old mode 100755 (executable)
new mode 100644 (file)
index 399f026..28b7172
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2011-2012 Free Software Foundation, Inc.
+# Copyright (C) 2011-2017 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
 # Yacc sources are cleaned by "make clean", while C++ source and
 # header files derived from distributed Yacc sources are cleaned by
 # "make maintainer-clean".
-# See also sister test 'yacc-clean.test'.
+# See also sister test 'yacc-clean.sh'.
 
 required='c++ yacc'
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_CXX
@@ -126,20 +126,20 @@ for target in clean distclean; do
   ls -l . sub1 sub2
   test -f sub1/parsefoo.cxx
   test -f sub1/bar-parsebar.cc
-  test ! -r sub1/parsebaz.y++
-  test ! -r sub1/parsebaz.c++
-  test ! -r sub1/parsequx.ypp
-  test ! -r sub1/qux-parsequx.cpp
+  test ! -e sub1/parsebaz.y++
+  test ! -e sub1/parsebaz.c++
+  test ! -e sub1/parsequx.ypp
+  test ! -e sub1/qux-parsequx.cpp
   test -f sub2/parsefoo.cxx
   test -f sub2/parsefoo.hxx
   test -f sub2/bar-parsebar.cc
   test -f sub2/bar-parsebar.hh
-  test ! -r sub2/parsebaz.y++
-  test ! -r sub2/parsebaz.c++
-  test ! -r sub2/parsebaz.h++
-  test ! -r sub2/parsequx.ypp
-  test ! -r sub2/qux-parsequx.cpp
-  test ! -r sub2/qux-parsequx.hpp
+  test ! -e sub2/parsebaz.y++
+  test ! -e sub2/parsebaz.c++
+  test ! -e sub2/parsebaz.h++
+  test ! -e sub2/parsequx.ypp
+  test ! -e sub2/qux-parsequx.cpp
+  test ! -e sub2/qux-parsequx.hpp
 done
 
 cp config.sav config.status
@@ -149,16 +149,13 @@ $MAKE maintainer-clean
 ls -l . sub1 sub2
 test -f sub1/parsefoo.yxx
 test -f sub1/parsebar.yy
-test ! -r sub1/parsefoo.cxx
-test ! -r sub1/bar-parsebar.cc
+test ! -e sub1/parsefoo.cxx
+test ! -e sub1/bar-parsebar.cc
 test -f sub2/parsefoo.yxx
 test -f sub2/parsebar.yy
-test ! -r sub2/parsefoo.cxx
-test ! -r sub2/parsefoo.hxx
-test ! -r sub2/bar-parsebar.cc
-test ! -r sub2/bar-parsebar.hh
-
-cp config.sav config.status
-./config.status # re-create Makefile
+test ! -e sub2/parsefoo.cxx
+test ! -e sub2/parsefoo.hxx
+test ! -e sub2/bar-parsebar.cc
+test ! -e sub2/bar-parsebar.hh
 
 :
old mode 100755 (executable)
new mode 100644 (file)
index 530f87f..a83ba7d
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2011-2012 Free Software Foundation, Inc.
+# Copyright (C) 2011-2017 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
 # Check that .c and .h files derived from non-distributed .y sources
 # are cleaned by "make clean", while .c and .h files derived from
 # distributed .y sources are cleaned by "make maintainer-clean".
-# See also sister test 'yacc-cxx-clean.test'.
+# See also sister test 'yacc-cxx-clean.sh'.
 
 required='cc yacc'
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_CC
@@ -115,19 +115,19 @@ for target in clean distclean; do
   test -f sub1/parse.y
   test -f sub1/parse.c
   test -f sub1/bar-parse.c
-  test ! -r sub1/baz.y
-  test ! -r sub1/baz.c
-  test ! -r sub1/qux-baz.c
+  test ! -e sub1/baz.y
+  test ! -e sub1/baz.c
+  test ! -e sub1/qux-baz.c
   test -f sub2/parse.y
   test -f sub2/parse.c
   test -f sub2/parse.h
   test -f sub2/bar-parse.c
   test -f sub2/bar-parse.h
-  test ! -r sub2/baz.y
-  test ! -r sub2/baz.c
-  test ! -r sub2/baz.h
-  test ! -r sub2/qux-baz.c
-  test ! -r sub2/qux-baz.h
+  test ! -e sub2/baz.y
+  test ! -e sub2/baz.c
+  test ! -e sub2/baz.h
+  test ! -e sub2/qux-baz.c
+  test ! -e sub2/qux-baz.h
 done
 
 cp config.sav config.status
@@ -136,12 +136,12 @@ cp config.sav config.status
 $MAKE maintainer-clean
 ls -l . sub1 sub2
 test -f sub1/parse.y
-test ! -r sub1/parse.c
-test ! -r sub1/bar-parse.c
+test ! -e sub1/parse.c
+test ! -e sub1/bar-parse.c
 test -f sub2/parse.y
-test ! -r sub2/parse.c
-test ! -r sub2/parse.h
-test ! -r sub2/bar-parse.c
-test ! -r sub2/bar-parse.h
+test ! -e sub2/parse.c
+test ! -e sub2/parse.h
+test ! -e sub2/bar-parse.c
+test ! -e sub2/bar-parse.h
 
 :
old mode 100755 (executable)
new mode 100644 (file)
similarity index 84%
rename from t/yaccpp.sh
rename to t/yacc-cxx-grepping.sh
index c065a50..3b330c4
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 1997-2012 Free Software Foundation, Inc.
+# Copyright (C) 1997-2017 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 # Test to make sure Yacc + C++ is not obviously broken.
-# See also related tests 'yacc-cxx.test' and 'yacc-d-cxx.test',
+# See also related tests 'yacc-cxx.sh' and 'yacc-d-cxx.sh',
 # which does much more in-depth checks (but requires an actual
 # Yacc program and a working C++ compiler).
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_CXX
@@ -39,7 +39,7 @@ $AUTOMAKE -a
 
 $EGREP '(\.[ch]|foo|bar|baz|qux)' Makefile.in # For debugging.
 
-$EGREP '(foo|bar|baz|qux)\.h' Makefile.in && Exit 1
+$EGREP '(foo|bar|baz|qux)\.h' Makefile.in && exit 1
 
 sed -e 's/^/ /' -e 's/$/ /' Makefile.in >mk
 
@@ -70,12 +70,12 @@ $EGREP '(^| )foo\.h\+\+(:| .*:)' Makefile.in
 $EGREP '(^| )bar\.hpp(:| .*:)'   Makefile.in
 $EGREP '(^| )baz\.hh(:| .*:)'    Makefile.in
 
-grep ' foo\.h[ :]' mk && Exit 1
-grep ' bar\.h[ :]' mk && Exit 1
-grep ' baz\.h[ :]' mk && Exit 1
+grep ' foo\.h[ :]' mk && exit 1
+grep ' bar\.h[ :]' mk && exit 1
+grep ' baz\.h[ :]' mk && exit 1
 
 $FGREP ' qux-qux.cxx ' mk
 $EGREP '(^| )qux-qux\.cxx(:| .*:)' Makefile.in
-grep 'qux\.h.*:' Makefile.in && Exit 1
+grep 'qux\.h.*:' Makefile.in && exit 1
 
 :
old mode 100755 (executable)
new mode 100644 (file)
index 41a25ec..b69f523
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2011-2012 Free Software Foundation, Inc.
+# Copyright (C) 2011-2017 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
 
 # Basic semantic checks on Yacc + C++ support (when yacc-generated
 # headers are not involved).
-# Keep in sync with sister test 'yacc-basic.test'.
+# Keep in sync with sister test 'yacc-basic.sh'.
 
 required='c++ yacc'
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_CXX
@@ -89,10 +89,10 @@ test -f foo4-parse4.cpp
 test -f foo3-parse3.output
 test -f foo4-parse4.output
 
-if cross_compiling; then :; else
+if ! cross_compiling; then
   for i in 1 2 3 4; do
     echo a | ./foo$i
-    echo b | ./foo$i && Exit 1
+    echo b | ./foo$i && exit 1
     : For shells with busted 'set -e'.
   done
 fi
@@ -132,9 +132,9 @@ test -f foo4-parse4.cpp
 ./configure # Re-create 'Makefile'.
 $MAKE maintainer-clean
 ls -l
-test ! -f parse1.cc
-test ! -f parse2.c++
-test ! -f foo3-parse3.cxx
-test ! -f foo4-parse4.cpp
+test ! -e parse1.cc
+test ! -e parse2.c++
+test ! -e foo3-parse3.cxx
+test ! -e foo4-parse4.cpp
 
 :
old mode 100755 (executable)
new mode 100644 (file)
index a633f41..c9ac930
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2011-2012 Free Software Foundation, Inc.
+# Copyright (C) 2011-2017 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
 
 # Tests Yacc support with yacc-generated headers
 # (i.e., '-d' in *YFLAGS).
-# Keep in sync with sister test 'yacc-d-cxx.test'.
+# Keep in sync with sister test 'yacc-d-cxx.sh'.
 
 required='cc yacc'
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_CC
@@ -54,7 +54,16 @@ void yyerror (char *s) {}
 x : 'x' {};
 %%
 END
-cp foo/parse.y bar/parse.y
+# Using ylwrap, we actually generate y.tab.[ch].  Unfortunately, we
+# forgot to rename #include "y.tab.h" into #include "parse.h" during
+# the conversion from y.tab.c to parse.c.  This was OK when Bison was
+# not issuing such an #include (up to 2.6).
+#
+# To make sure that we perform this conversion even with version of
+# Bison that do not generate this include, in bar/parse.y, use y.tab.h
+# instead of parse.h, and check the ylwrap does replace "y.tab.h" with
+# "parse.h".
+sed -e 's/parse\.h/y.tab.h/' <foo/parse.y >bar/parse.y
 
 cat > foo/main.c << 'END'
 #include "parse.h"
@@ -75,7 +84,7 @@ $ACLOCAL
 $AUTOCONF
 
 $AUTOMAKE -a
-$FGREP parse.h foo/Makefile.in bar/Makefile.in baz/Makefile.in && Exit 1
+$FGREP parse.h foo/Makefile.in bar/Makefile.in baz/Makefile.in && exit 1
 
 cat >> foo/Makefile.am <<END
 BUILT_SOURCES = parse.h
@@ -100,12 +109,21 @@ $AUTOMAKE baz/Makefile
 
 $MAKE
 
-test -f foo/parse.c
-test -f foo/parse.h
-test -f bar/parse.c
-test -f bar/parse.h
-test -f baz/zardoz-parse.c
-test -f baz/zardoz-parse.h
+generated="
+  foo/parse.c
+  foo/parse.h
+  bar/parse.c
+  bar/parse.h
+  baz/zardoz-parse.c
+  baz/zardoz-parse.h
+"
+
+for i in $generated; do
+  test -f $i
+done
+
+# There must remain no obsolete header guard.
+grep Y_TAB_H $generated && exit 1
 
 # The generated C source and header files must be shipped.
 for dir in foo bar; do
@@ -123,12 +141,9 @@ cd ..
 
 $MAKE distdir
 ls -l $distdir
-test -f $distdir/foo/parse.c
-test -f $distdir/foo/parse.h
-test -f $distdir/bar/parse.c
-test -f $distdir/bar/parse.h
-test -f $distdir/baz/zardoz-parse.c
-test -f $distdir/baz/zardoz-parse.h
+for i in $generated; do
+  test -f $distdir/$i
+done
 
 # Sanity check the distribution.
 yl_distcheck
@@ -136,19 +151,13 @@ yl_distcheck
 # While we are at it, make sure that 'parse.c' and 'parse.h' are erased
 # by maintainer-clean, and not by distclean.
 $MAKE distclean
-test -f foo/parse.c
-test -f foo/parse.h
-test -f bar/parse.c
-test -f bar/parse.h
-test -f baz/zardoz-parse.c
-test -f baz/zardoz-parse.h
+for i in $generated; do
+  test -f $i
+done
 ./configure # Re-create 'Makefile'.
 $MAKE maintainer-clean
-test ! -f foo/parse.c
-test ! -f foo/parse.h
-test ! -f bar/parse.c
-test ! -f bar/parse.h
-test ! -f baz/zardoz-parse.c
-test ! -f baz/zardoz-parse.h
+for i in $generated; do
+  test ! -e $i
+done
 
 :
old mode 100755 (executable)
new mode 100644 (file)
index 1f667c8..98a8725
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2011-2012 Free Software Foundation, Inc.
+# Copyright (C) 2011-2017 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
 
 # Various tests on Yacc/C++ support with yacc-generated headers
 # (i.e., '-d' in *YFLAGS).
-# Keep in sync with sister test 'yacc-d-basic.test'.
+# Keep in sync with sister test 'yacc-d-basic.sh'.
 
 required='c++ yacc'
-. ./defs || Exit 1
+. test-init.sh
 
 write_parse ()
 {
@@ -220,13 +220,13 @@ test -f qux/maude-parse.cxx
 test -f qux/maude-parse.hxx
 ./configure # Re-create 'Makefile'.
 $MAKE maintainer-clean
-test ! -f foo/parse.cc
-test ! -f foo/parse.hh
-test ! -f bar/parse.cpp
-test ! -f bar/parse.hpp
-test ! -f baz/sub/parse.c++
-test ! -f baz/sub/parse.h++
-test ! -f qux/maude-parse.cxx
-test ! -f qux/maude-parse.hxx
+test ! -e foo/parse.cc
+test ! -e foo/parse.hh
+test ! -e bar/parse.cpp
+test ! -e bar/parse.hpp
+test ! -e baz/sub/parse.c++
+test ! -e baz/sub/parse.h++
+test ! -e qux/maude-parse.cxx
+test ! -e qux/maude-parse.hxx
 
 :
old mode 100755 (executable)
new mode 100644 (file)
index 78a486a..c55e0b1
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2011-2012 Free Software Foundation, Inc.
+# Copyright (C) 2011-2017 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
 # 'make' and 'make distdir' and check whether the version of 'parse.c'
 # to be distributed is up to date.
 
-# Please keep this in sync with sister test 'yaccvpath.test'.
+# Please keep this in sync with sister test 'yaccvpath.sh'.
 
 required='cc yacc'
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_CC
old mode 100755 (executable)
new mode 100644 (file)
index 3ac0254..e718fa1
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2011-2012 Free Software Foundation, Inc.
+# Copyright (C) 2011-2017 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
@@ -17,7 +17,7 @@
 # Tests that we can recover from deleted headers generated by 'yacc -d'.
 
 required='cc yacc'
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_CC
@@ -44,7 +44,7 @@ BUILT_SOURCES = parse1.h p2-parse2.h
 # should be able to just declare dependencies directly instead
 # of relying on the BUILT_SOURCES hack, and things should still
 # work correctly.
-main3.@OBJEXT@: parse3.h
+main3.@OBJEXT@ parse3.@OBJEXT@: parse3.h
 
 .PHONY: clean-p3 build-p3
 build-p3: p3$(EXEEXT)
@@ -106,28 +106,28 @@ headers='parse1.h p2-parse2.h parse3.h parse4.h'
 rm -f $headers
 $MAKE parse1.h
 test -f parse1.h
-test ! -r p2-parse2.h
-test ! -r parse3.h
-test ! -r parse4.h
+test ! -e p2-parse2.h
+test ! -e parse3.h
+test ! -e parse4.h
 
 rm -f $headers
 $MAKE p2-parse2.h
-test ! -r parse1.h
+test ! -e parse1.h
 test -f p2-parse2.h
-test ! -r parse3.h
-test ! -r parse4.h
+test ! -e parse3.h
+test ! -e parse4.h
 
 rm -f $headers
 $MAKE parse3.h
-test ! -r parse1.h
-test ! -r p2-parse2.h
+test ! -e parse1.h
+test ! -e p2-parse2.h
 test -f parse3.h
-test ! -r parse4.h
+test ! -e parse4.h
 # Since we declared parse3.h into $(p3_SOURCES), make should be
 # able to rebuild it automatically before remaking 'p3'.
 rm -f $headers
 $MAKE clean-p3
-test ! -f parse3.h # Sanity check.
+test ! -e parse3.h # Sanity check.
 $MAKE build-p3
 test -f parse3.h
 
@@ -135,9 +135,9 @@ $MAKE
 
 rm -f $headers
 $MAKE parse4.h
-test ! -r parse1.h
-test ! -r p2-parse2.h
-test ! -r parse3.h
+test ! -e parse1.h
+test ! -e p2-parse2.h
+test ! -e parse3.h
 test -f parse4.h
 
 # Now remake all the headers together.
@@ -158,6 +158,6 @@ test -f p2-parse2.h
 test -f parse3.h
 # parse4.h is not declared in any *_SOURCES variable, nor #included
 # by any C source file, so it shouldn't be rebuilt by "make all".
-test ! -r parse4.h
+test ! -e parse4.h
 
 :
old mode 100755 (executable)
new mode 100644 (file)
index 04ddb52..b9c52dd
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2001-2012 Free Software Foundation, Inc.
+# Copyright (C) 2001-2017 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
@@ -18,7 +18,7 @@
 # Report from Paolo Bonzini.
 
 required='cc yacc'
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_CC
old mode 100755 (executable)
new mode 100644 (file)
index df48a0b..2002919
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2001-2012 Free Software Foundation, Inc.
+# Copyright (C) 2001-2017 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
@@ -19,7 +19,7 @@
 # with NetBSD make).
 
 required='cc yacc'
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_CC
@@ -32,14 +32,11 @@ bin_PROGRAMS = foo
 AM_YFLAGS = -d
 foo_SOURCES = foo.y main.c
 BUILT_SOURCES = foo.h
-.PHONY: debug-info test-time-unchanged test-time-changed
-debug-info:
-       ls -l
-       stat *.[ch] *.$(OBJEXT) my-timestamp || :
-test-time-unchanged: debug-info
-       test `ls -1t main.$(OBJEXT) my-timestamp | sed 1q` = my-timestamp
-test-time-changed: debug-info
-       test `ls -1t main.$(OBJEXT) my-timestamp | sed 1q` = main.$(OBJEXT)
+.PHONY: test-time-unchanged test-time-changed
+test-time-unchanged:
+       is_newest foo.y foo.h main.$(OBJEXT)
+test-time-changed:
+       is_newest main.$(OBJEXT) foo.y foo.h
 END
 
 cat > foo.y << 'END'
@@ -72,8 +69,6 @@ $MAKE
 ls -l # For debugging.
 
 $sleep
-: > my-timestamp
-$sleep
 touch foo.y
 $MAKE
 $MAKE test-time-unchanged
old mode 100755 (executable)
new mode 100644 (file)
index 6cb11ee..34fed1b
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2011-2012 Free Software Foundation, Inc.
+# Copyright (C) 2011-2017 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
@@ -19,7 +19,7 @@
 # Exposes automake bug#8485.
 
 required='cc yacc'
-. ./defs || Exit 1
+. test-init.sh
 
 # This test is bounded to fail for any implementation that
 # triggers automake bug#7884.
@@ -27,7 +27,6 @@ useless_vpath_rebuild && skip_ "would trip on automake bug#7884"
 
 cat >> configure.ac << 'END'
 AC_PROG_CC
-AM_PROG_CC_C_O
 AC_PROG_YACC
 AC_OUTPUT
 END
@@ -69,12 +68,12 @@ $MAKE distdir
 test   -f sub/parse.c
 test   -f sub/parse.h
 test   -f sub/bar-parse.c
-test ! -r sub/bar-parse.h
+test ! -e sub/bar-parse.h
 
 test   -f $distdir/sub/parse.c
 test   -f $distdir/sub/parse.h
 test   -f $distdir/sub/bar-parse.c
-test ! -r $distdir/sub/bar-parse.h
+test ! -e $distdir/sub/bar-parse.h
 
 # But they shouldn't be rebuilt in VPATH builds.
 
@@ -86,7 +85,7 @@ chmod u+w .
 # extractors, to improve coverage.
 ../configure --enable-dependency-tracking YACC=false
 $MAKE
-ls -l sub/*.[ch] && Exit 1
+ls -l sub/*.[ch] && exit 1
 
 env DISTCHECK_CONFIGURE_FLAGS='YACC=false' $MAKE distcheck
 
old mode 100755 (executable)
new mode 100644 (file)
index 6f02f11..2bccd01
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2011-2012 Free Software Foundation, Inc.
+# Copyright (C) 2011-2017 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
@@ -19,7 +19,7 @@
 # See automake bug#7884.
 
 required='cc yacc'
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_CC
@@ -65,7 +65,7 @@ exit 1
 END
 cp bin/yacc bin/bison
 chmod a+x bin/yacc bin/bison
-PATH=`pwd`/bin$PATH_SEPARATOR$PATH
+PATH=$(pwd)/bin$PATH_SEPARATOR$PATH
 
 YACC=yacc BISON=bison
 export YACC BISON
@@ -83,8 +83,7 @@ chmod a-w $distdir
 mkdir build2
 cd build2
 ../$distdir/configure
-$MAKE >out 2>&1 && { cat out; Exit 1; }
-cat out
-$FGREP parse.c out
+run_make -e FAIL -M
+$FGREP parse.c output
 
 :
old mode 100755 (executable)
new mode 100644 (file)
similarity index 92%
rename from t/yaccdry.sh
rename to t/yacc-dry.sh
index 3100ce3..9c34bff
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2010-2012 Free Software Foundation, Inc.
+# Copyright (C) 2010-2017 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
@@ -17,7 +17,7 @@
 # Removal recovery rules for headers should not remove files with 'make -n'.
 
 required='cc yacc'
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_CC
@@ -53,6 +53,6 @@ $MAKE
 rm -f parse.h
 $MAKE -n parse.h
 test -f parse.c
-test ! -f parse.h
+test ! -e parse.h
 
 :
old mode 100755 (executable)
new mode 100644 (file)
similarity index 74%
rename from t/yacc2.sh
rename to t/yacc-grepping.sh
index bfab752..c7597e5
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 1999-2012 Free Software Foundation, Inc.
+# Copyright (C) 1996-2017 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 to make sure intermediate .h file is not generated nor removed
-# if (AM_)?YFLAGS do not contain -d.  Requested by Jim Meyering.
-# See also the related semantic test 'yacc-d-basic.test'.
+# Some grep-based checks on yacc support:
+#
+#  - Make sure intermediate .c file is built from yacc source.
+#    Report from Thomas Morgan.
+#
+#  - Make sure intermediate .h file is not generated nor removed
+#    if (AM_)?YFLAGS do not contain '-d'.
+#    Requested by Jim Meyering.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_CC
@@ -38,20 +43,23 @@ END
 cp Makefile.am Makefile.src
 
 $AUTOMAKE -a
+$FGREP 'zardoz.c' Makefile.in
 # If zardoz.h IS mentioned, fail.
-$FGREP 'zardoz.h' Makefile.in && Exit 1
+$FGREP 'zardoz.h' Makefile.in && exit 1
 
 cp Makefile.src Makefile.am
 echo 'AM_YFLAGS = -d' >> Makefile.am
 $AUTOMAKE
+$FGREP 'zardoz.c' Makefile.in
 # If zardoz.h is NOT mentioned, fail.
 $FGREP 'zardoz.h' Makefile.in
 
 cp Makefile.src Makefile.am
 echo 'AM_YFLAGS = ' >> Makefile.am
 $AUTOMAKE
+$FGREP 'zardoz.c' Makefile.in
 # If zardoz.h IS mentioned, fail.
-$FGREP 'zardoz.h' Makefile.in && Exit 1
+$FGREP 'zardoz.h' Makefile.in && exit 1
 
 cp Makefile.src Makefile.am
 echo 'YFLAGS = -d' >> Makefile.am
@@ -67,6 +75,6 @@ cp Makefile.src Makefile.am
 echo 'YFLAGS = ' >> Makefile.am
 $AUTOMAKE -Wno-gnu
 # If zardoz.h IS mentioned, fail.
-$FGREP 'zardoz.h' Makefile.in && Exit 1
+$FGREP 'zardoz.h' Makefile.in && exit 1
 
 :
old mode 100755 (executable)
new mode 100644 (file)
similarity index 74%
rename from t/yacc5.sh
rename to t/yacc-grepping2.sh
index ab24b56..c5766a8
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2001-2012 Free Software Foundation, Inc.
+# Copyright (C) 2001-2017 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
 # Test of yacc functionality, derived from GNU binutils
 # by Tim Van Holder.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_CC
-AM_PROG_CC_C_O
 AC_PROG_YACC
 END
 
@@ -35,7 +34,9 @@ mkdir sub
 : > sub/maude.y
 
 $ACLOCAL
-$AUTOMAKE -a
+# FIXME: stop disabling the warnings in the 'unsupported' category
+# FIXME: once the 'subdir-objects' option has been mandatory.
+$AUTOMAKE -a -Wno-unsupported
 
 grep '^maude\.c:.*maude\.y' Makefile.in
 
@@ -48,12 +49,11 @@ 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.
@@ -65,14 +65,15 @@ maude_SOURCES = sub/maude.y
 maude_YFLAGS = -d
 END
 
-$ACLOCAL
-$AUTOMAKE -a
+# FIXME: stop disabling the warnings in the 'unsupported' category
+# FIXME: once the 'subdir-objects' option has been mandatory.
+$AUTOMAKE -a -Wno-unsupported
 
 # 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
old mode 100755 (executable)
new mode 100644 (file)
similarity index 92%
rename from t/yacc7.sh
rename to t/yacc-headers-and-dist-pr47.sh
index a3602e9..5e9d2f4
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2001-2012 Free Software Foundation, Inc.
+# Copyright (C) 2001-2017 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
@@ -21,7 +21,7 @@
 # PR/47.
 
 required='cc yacc'
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_CC
@@ -71,7 +71,7 @@ $MAKE foo.h
 test -f foo.h
 
 # Make sure '#line ... y.tab.h' gets replaced.
-$FGREP 'y.tab.h' foo.h && Exit 1
+$FGREP 'y.tab.h' foo.h && exit 1
 
 # Make distclean must not erase foo.c nor foo.h (by GNU standards) ...
 $MAKE foo.c
@@ -83,7 +83,7 @@ test -f foo.c
 # ... but maintainer-clean should.
 ./configure # Re-create 'Makefile'.
 $MAKE maintainer-clean
-test ! -f foo.h
-test ! -f foo.c
+test ! -e foo.h
+test ! -e foo.c
 
 :
old mode 100755 (executable)
new mode 100644 (file)
index d122157..453a84d
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2001-2012 Free Software Foundation, Inc.
+# Copyright (C) 2001-2017 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
 # Check that automake yacc support ensures that yacc-generated C
 # files use correct "#line" directives.  Try also with the
 # 'subdir-object' option enabled.
-# See also sister test 'lex-line.test'.
+# See also sister test 'lex-line.sh'.
 
 required='cc yacc'
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_CONFIG_FILES([sub/Makefile])
 AC_PROG_CC
-AM_PROG_CC_C_O
 AC_PROG_YACC
 AC_OUTPUT
 END
@@ -77,7 +76,9 @@ c_outputs='zardoz.c bar-quux.c sub/foo-zardoz.c sub/dir/quux.c'
 
 $ACLOCAL
 $AUTOCONF
-$AUTOMAKE -a
+# FIXME: stop disabling the warnings in the 'unsupported' category
+# FIXME: once the 'subdir-objects' option has been mandatory.
+$AUTOMAKE -a -Wno-unsupported
 
 for vpath in : false; do
 
@@ -97,15 +98,15 @@ for vpath in : false; do
   $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
old mode 100755 (executable)
new mode 100644 (file)
similarity index 88%
rename from t/yacc4.sh
rename to t/yacc-misc.sh
index 3f9a204..d54060b
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2001-2012 Free Software Foundation, Inc.
+# Copyright (C) 2001-2017 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
@@ -17,7 +17,7 @@
 # Some simple tests of ylwrap functionality.
 
 required='cc yacc'
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_CC
@@ -70,8 +70,8 @@ cd sub
 ../configure
 $MAKE
 
-grep '^#.*/sub/\.\./' bar.c && Exit 1
-grep '^#.*/sub/\.\./' parse.c && Exit 1
+grep '^#.*/sub/\.\./' bar.c && exit 1
+grep '^#.*/sub/\.\./' parse.c && exit 1
 
 # Make distclean must not erase bar.c nor parse.c (by GNU standards) ...
 $MAKE distclean
@@ -80,7 +80,7 @@ test -f parse.c
 # ... but maintainer-clean should.
 ../configure
 $MAKE maintainer-clean
-test ! -f bar.c
-test ! -f parse.c
+test ! -e bar.c
+test ! -e parse.c
 
 :
old mode 100755 (executable)
new mode 100644 (file)
index d122942..61ed664
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2011-2012 Free Software Foundation, Inc.
+# Copyright (C) 2011-2017 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
@@ -18,7 +18,7 @@
 # in the same directory.
 
 required='cc c++ yacc'
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_CC
@@ -166,7 +166,7 @@ for try in 0 1; do
     esac
   else
     echo "$me: invalid value of \$try '$try'" >&2
-    Exit 99
+    exit 99
   fi
 
   $srcdir/configure
@@ -177,7 +177,7 @@ for try in 0 1; do
   test -f p.c
   test -f p.h
   test -f c2-p.c
-  test ! -r c2-p.h
+  test ! -e c2-p.h
 
   test -f parse.cc
   test -f parse.hh
@@ -185,8 +185,8 @@ for try in 0 1; do
   test -f parse3.hxx
 
   test -f cxx2-parse2.c++
-  test ! -r parse2.h++
-  test ! -r cxx2-parse2.h++
+  test ! -e parse2.h++
+  test ! -e cxx2-parse2.h++
 
   # Minimal checks about recovering from header removal.
   rm -f p.h parse.hh parse3.hxx
@@ -194,7 +194,7 @@ for try in 0 1; do
   $debug_info
   test -f p.h
   test -f parse.hh
-  test ! -r parse3.hxx
+  test ! -e parse3.hxx
   $run_make
   $debug_info
   test -f parse3.hxx
old mode 100755 (executable)
new mode 100644 (file)
index 2124357..bbfb9d9
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2011-2012 Free Software Foundation, Inc.
+# Copyright (C) 2011-2017 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 # Checks for .c and .h files derived from non-distributed yacc sources.
-# The test 'yacc-pr204.test' does similar check with AM_MAINTAINER_MODE
+# The test 'yacc-pr204.sh' does similar check with AM_MAINTAINER_MODE
 # enabled.
-# The tests 'lex-nodist.test' and 'lex-pr204.test' does similar checks
+# The tests 'lex-nodist.sh' and 'lex-pr204.sh' does similar checks
 # for lex-generated .c files.
 
 required='cc yacc'
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_CC
@@ -96,9 +96,6 @@ $MAKE
 $MAKE test-build
 $MAKE test-dist
 
-# But the distribution must work correctly, assuming the user has
-# the proper tools to process yacc files.  Do this check only with
-# GNU make, to avoid tripping on automake bug#7884.
-if using_gmake; then $MAKE distcheck; fi
+yl_distcheck
 
 :
old mode 100755 (executable)
new mode 100644 (file)
index 6507b51..fb067f0
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2002-2012 Free Software Foundation, Inc.
+# Copyright (C) 2002-2017 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
 
 # For PR 204.
 # C sources derived from nodist_ yacc sources should not be distributed.
-# See also related test 'yacc-nodist.test'.
-# The tests 'lex-nodist.test' and 'lex-pr204.test' does similar checks
+# See also related test 'yacc-nodist.sh'.
+# The tests 'lex-nodist.sh' and 'lex-pr204.sh' does similar checks
 # for lex-generated C files.
 
 required='cc yacc'
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac <<'EOF'
 AM_MAINTAINER_MODE
@@ -77,8 +77,7 @@ $sleep
 touch parse.y parse2.y
 $sleep
 $MAKE parse.c parse2.c
-stat parse.c parse.y parse2.c parse2.y || : # For debugging.
-test `ls -t parse.c parse.y | sed 1q` = parse.c
-test `ls -t parse2.c parse2.y | sed 1q` = parse2.c
+is_newest parse.c parse.y
+is_newest parse2.c parse2.y
 
 :
old mode 100755 (executable)
new mode 100644 (file)
similarity index 91%
rename from t/yacc8.sh
rename to t/yacc-subdir.sh
index bab627d..be5f4a7
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2002-2012 Free Software Foundation, Inc.
+# Copyright (C) 2002-2017 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
 
 required='cc yacc'
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_CC
-AM_PROG_CC_C_O
 AC_PROG_YACC
 AC_OUTPUT
 END
@@ -75,16 +74,14 @@ test -f foo/parse.h
 
 # Make sure foo/parse.h is not updated, unless when needed.
 $sleep
-: > z
-$sleep
 touch ../foo/parse.y
 $MAKE obj
-test `ls -1t foo/parse.h z | sed 1q` = z
+is_newest ../foo/parse.y foo/parse.h
 $sleep
 sed 's/%%/%token TOKEN\n%%/g' ../foo/parse.y >../foo/parse.yt
 mv -f ../foo/parse.yt ../foo/parse.y
 $MAKE obj
-test `ls -1t foo/parse.h z | sed 1q` = foo/parse.h
+is_newest foo/parse.h ../foo/parse.y
 
 # Now, adds another parser to test ylwrap.
 
old mode 100755 (executable)
new mode 100644 (file)
similarity index 93%
rename from t/yaccvpath.sh
rename to t/yacc-vpath.sh
index 65ab53b..c8810ba
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2001-2012 Free Software Foundation, Inc.
+# Copyright (C) 2001-2017 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
 # 'make' and 'make distdir' and check whether the version of 'parse.c'
 # to be distributed is up to date.
 
-# Please keep this in sync with sister test 'yacc-d-vpath.test'.
+# Please keep this in sync with sister test 'yacc-d-vpath.sh'.
 
 required='cc yacc'
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_CC
old mode 100755 (executable)
new mode 100644 (file)
index 82270fe..f36d8c8
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2011-2012 Free Software Foundation, Inc.
+# Copyright (C) 2011-2017 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
@@ -17,7 +17,7 @@
 # Check that yacc sources with many dots in their name are handled
 # correctly.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_CC
old mode 100755 (executable)
new mode 100644 (file)
index fb27c0b..4018567
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2011-2012 Free Software Foundation, Inc.
+# Copyright (C) 2011-2017 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
@@ -18,9 +18,7 @@
 # at configure time and/or at make time.
 
 required='cc yacc'
-. ./defs || Exit 1
-
-unset YFLAGS || :
+. test-init.sh
 
 cat >> configure.ac <<'END'
 AC_PROG_CC
@@ -36,8 +34,9 @@ foo_SOURCES = foo.y
 # would be useful in general, so it's probably better to be
 # conservative).
 CLEANFILES = foo.output
-# Another automake wart: '-d' flag won't be given at automake time,
-# so automake won't be able to generate code to clean 'foo.h' :-(
+# As the '-d' flag won't be given at automake time, automake won't
+# be able to generate code to clean 'foo.h'.  We can't really blame
+# automake for that.
 MAINTAINERCLEANFILES = foo.h
 END
 
@@ -69,18 +68,18 @@ ls -l
 $MAKE
 ls -l
 test -f foo.c
-test ! -r foo.h
+test ! -e foo.h
 test -f foo.output
 
 $MAKE maintainer-clean
 ls -l
 
 ./configure YFLAGS='-v'
-YFLAGS=-d $MAKE -e
+run_make YFLAGS=-d
 ls -l
 test -f foo.c
 test -f foo.h
-test ! -r foo.output
+test ! -e foo.output
 
 $MAKE maintainer-clean
 ls -l
old mode 100755 (executable)
new mode 100644 (file)
index 0cd09d2..e3a2b54
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2011-2012 Free Software Foundation, Inc.
+# Copyright (C) 2011-2017 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
@@ -17,7 +17,7 @@
 # Check that automake complains about *_YFLAGS variables which have
 # conditional content.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac <<'END'
 AC_PROG_CC
@@ -135,7 +135,7 @@ grep '^Makefile4\.am:8:.*zardoz_YFLAGS.* conditional contents' stderr
 AUTOMAKE_fails -Wno-gnu Makefile5
 grep -v '^Makefile5\.am:.*zardoz_YFLAGS' stderr \
  | grep -v ': warnings are treated as errors' \
- | grep . && Exit 1
+ | grep . && exit 1
 
 # Disable 'gnu' warnings because we override the user variable 'YFLAGS'.
 $AUTOMAKE -Wno-gnu Makefile6
old mode 100755 (executable)
new mode 100644 (file)
similarity index 75%
rename from t/yflags2.sh
rename to t/yflags-cxx.sh
index a933447..d5922d0
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2010-2012 Free Software Foundation, Inc.
+# Copyright (C) 2010-2017 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 # Check that $(YFLAGS) takes precedence over both $(AM_YFLAGS) and
-# $(foo_YFLAGS).
-# Please keep this in sync with the sister tests yflags.test, lflags.test
-# and lflags2.test.
+# $(foo_YFLAGS).  This is the C++ case.
+# Please keep this in sync with the sister tests:
+#  - yflags.sh
+#  - lflags.sh
+#  - lflags-cxx.sh
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat >fake-yacc <<'END'
 #!/bin/sh
@@ -28,10 +30,6 @@ echo 'extern int dummy;' >> y.tab.c
 END
 chmod a+x fake-yacc
 
-# Remove Yacc from the environment, so that it won't interfere
-# with 'make -e' below.
-unset YACC || :
-
 cat >> configure.ac <<'END'
 AC_SUBST([CXX], [false])
 # Simulate presence of Yacc using our fake-yacc script.
@@ -51,15 +49,15 @@ END
 $ACLOCAL
 $AUTOMAKE -a
 
-grep '\$(YFLAGS).*\$(bar_YFLAGS)' Makefile.in && Exit 1
-grep '\$(YFLAGS).*\$(AM_YFLAGS)' Makefile.in && Exit 1
+grep '\$(YFLAGS).*\$(bar_YFLAGS)' Makefile.in && exit 1
+grep '\$(YFLAGS).*\$(AM_YFLAGS)' Makefile.in && exit 1
 
 : > foo.yy
 : > bar.y++
 
 $AUTOCONF
 ./configure
-env YFLAGS=__user_flags__ $MAKE -e foo.cc bar-bar.c++
+run_make YFLAGS=__user_flags__ foo.cc bar-bar.c++
 
 cat foo.cc
 cat bar-bar.c++
old mode 100755 (executable)
new mode 100644 (file)
index 78820ca..f7c745b
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2011-2012 Free Software Foundation, Inc.
+# Copyright (C) 2011-2017 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
@@ -16,7 +16,7 @@
 
 # Check for false positives in automake recognition of '-d' in YFLAGS.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac <<'END'
 AC_PROG_CC
@@ -35,7 +35,7 @@ foobar_YFLAGS = - d $(foovar)-d -dd
 END
 
 $AUTOMAKE -a
-$EGREP '(foobar|zardoz)\.h.*:' Makefile.in && Exit 1
-$EGREP '(foobar|zardoz)\.h' Makefile.in | $FGREP -v '$(YLWRAP) ' && Exit 1
+$EGREP '(foobar|zardoz)\.h.*:' Makefile.in && exit 1
+$EGREP '(foobar|zardoz)\.h' Makefile.in | $FGREP -v '$(YLWRAP) ' && exit 1
 
 :
old mode 100755 (executable)
new mode 100644 (file)
index 53038a8..8cb16db
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2011-2012 Free Software Foundation, Inc.
+# Copyright (C) 2011-2017 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
@@ -17,7 +17,7 @@
 # Check that the user can force automake to use *_YFLAGS variables
 # which have conditional content.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac <<'END'
 AC_SUBST([CC], [false])
@@ -33,7 +33,7 @@ echo "/* $* */" > y.tab.c
 echo 'extern int dummy;' >> y.tab.c
 END
 chmod a+x bin/fake-yacc
-PATH=`pwd`/bin$PATH_SEPARATOR$PATH; export PATH
+PATH=$(pwd)/bin$PATH_SEPARATOR$PATH; export PATH
 YACC=fake-yacc; export YACC
 
 cat > Makefile.am <<'END'
@@ -67,7 +67,7 @@ cat bar-foo.c
 
 $FGREP ' __am_cond_yes__ ' foo.c
 $FGREP ' __bar_cond_yes__ ' bar-foo.c
-$FGREP 'cond_no' foo.c bar-foo.c && Exit 1
+$FGREP 'cond_no' foo.c bar-foo.c && exit 1
 
 $MAKE maintainer-clean
 ls -l
@@ -80,6 +80,6 @@ cat bar-foo.c
 
 $FGREP ' __am_cond_no__ ' foo.c
 $FGREP ' __bar_cond_no__ ' bar-foo.c
-$FGREP 'cond_yes' foo.c bar-foo.c && Exit 1
+$FGREP 'cond_yes' foo.c bar-foo.c && exit 1
 
 :
old mode 100755 (executable)
new mode 100644 (file)
index 3f4755e..d6348ad
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2011-2012 Free Software Foundation, Inc.
+# Copyright (C) 2011-2017 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
@@ -19,7 +19,7 @@
 # variable is user-reserved).
 
 required='cc yacc'
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac <<'END'
 AC_PROG_CC
@@ -48,7 +48,7 @@ $ACLOCAL
 $AUTOMAKE -a -Wno-gnu
 
 $EGREP '(foo|YFLAGS)' Makefile.in # For debugging.
-grep '^foo.h *:' Makefile.in
+grep '^foo\.h *:' Makefile.in
 
 $AUTOCONF
 ./configure
old mode 100755 (executable)
new mode 100644 (file)
index d3bd0d4..dc7f53d
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2011-2012 Free Software Foundation, Inc.
+# Copyright (C) 2011-2017 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
@@ -19,7 +19,7 @@
 #  foo_flags = -d
 #  AM_YFLAGS = $(foo_flags)
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac <<'END'
 AC_PROG_CC
old mode 100755 (executable)
new mode 100644 (file)
index fbc39f5..13c7146
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2010-2012 Free Software Foundation, Inc.
+# Copyright (C) 2010-2017 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
 
 # Check that $(YFLAGS) takes precedence over both $(AM_YFLAGS) and
 # $(foo_YFLAGS).
-# Please keep this in sync with the sister tests yflags2.test, lflags.test
-# and lflags2.test.
+# Please keep this in sync with the sister tests:
+#  - yflags-cxx.sh
+#  - lflags.sh
+#  - lflags-cxx.sh
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat >fake-yacc <<'END'
 #!/bin/sh
@@ -28,10 +30,6 @@ echo 'extern int dummy;' >> y.tab.c
 END
 chmod a+x fake-yacc
 
-# Remove Yacc from the environment, so that it won't interfere
-# with 'make -e' below.
-unset YACC || :
-
 cat >> configure.ac <<'END'
 AC_SUBST([CC], [false])
 # Simulate presence of Yacc using our fake-yacc script.
@@ -51,15 +49,15 @@ END
 $ACLOCAL
 $AUTOMAKE -a
 
-grep '\$(YFLAGS).*\$(bar_YFLAGS)' Makefile.in && Exit 1
-grep '\$(YFLAGS).*\$(AM_YFLAGS)' Makefile.in && Exit 1
+grep '\$(YFLAGS).*\$(bar_YFLAGS)' Makefile.in && exit 1
+grep '\$(YFLAGS).*\$(AM_YFLAGS)' Makefile.in && exit 1
 
 : > foo.y
 : > bar.y
 
 $AUTOCONF
 ./configure
-env YFLAGS=__user_flags__ $MAKE -e foo.c bar-bar.c
+run_make YFLAGS=__user_flags__ foo.c bar-bar.c
 
 cat foo.c
 cat bar-bar.c