Merge branch 'lflags-test-fixes' into maint
authorStefano Lattarini <stefano.lattarini@gmail.com>
Sat, 29 Jan 2011 17:47:39 +0000 (18:47 +0100)
committerStefano Lattarini <stefano.lattarini@gmail.com>
Sat, 29 Jan 2011 17:47:39 +0000 (18:47 +0100)
322 files changed:
.cvsignore [deleted file]
ChangeLog
ChangeLog.03
HACKING
Makefile.am
Makefile.in
NEWS
README
THANKS
aclocal.in
aclocal.m4
automake.in
bootstrap
configure
configure.ac
doc/.cvsignore [deleted file]
doc/Makefile.in
doc/automake.texi
lib/.cvsignore [deleted file]
lib/Automake/.cvsignore [deleted file]
lib/Automake/ChannelDefs.pm
lib/Automake/Channels.pm
lib/Automake/Config.in
lib/Automake/Configure_ac.pm
lib/Automake/FileUtils.pm
lib/Automake/Makefile.am
lib/Automake/Makefile.in
lib/Automake/Rule.pm
lib/Automake/Struct.pm
lib/Automake/VarDef.pm
lib/Automake/Variable.pm
lib/Automake/Version.pm
lib/Automake/XFile.pm
lib/Automake/tests/.cvsignore [deleted file]
lib/Automake/tests/Makefile.in
lib/Makefile.in
lib/am/.cvsignore [deleted file]
lib/am/Makefile.in
lib/am/check.am
lib/am/distdir.am
lib/am/install.am
lib/am/lisp.am
lib/am/remake-hdr.am
lib/config-ml.in
lib/config.guess
lib/config.sub
lib/install-sh
lib/mdate-sh
lib/texinfo.tex
m4/.cvsignore [deleted file]
m4/Makefile.in
m4/cond-if.m4
m4/depend.m4
m4/dmalloc.m4
m4/python.m4
tests/.cvsignore [deleted file]
tests/Makefile.am
tests/Makefile.in
tests/README
tests/acloca14.test
tests/acloca18.test
tests/acloca19.test
tests/aclocal.test
tests/aclocal5.test
tests/aclocal6.test
tests/aclocal8.test
tests/all.test
tests/all2.test [new file with mode: 0755]
tests/ansi.test
tests/ar.test
tests/ar2.test
tests/asm.test
tests/asm2.test
tests/asm3.test
tests/autodist-acconfig-no-subdir.test [new file with mode: 0755]
tests/autodist-acconfig.test [new file with mode: 0755]
tests/autodist-aclocal-m4.test [new file with mode: 0755]
tests/autodist-config-headers.test [new file with mode: 0755]
tests/autodist-configure-no-subdir.test [new file with mode: 0755]
tests/autodist-stamp-vti.test [new file with mode: 0755]
tests/autodist-subdir.test [new file with mode: 0755]
tests/autodist.test [new file with mode: 0755]
tests/autohdr.test
tests/autohdr2.test
tests/autohdr3.test
tests/autohdr4.test
tests/autohdrdry.test [new file with mode: 0755]
tests/colon.test
tests/colon2.test
tests/colon3.test
tests/colon4.test
tests/colon5.test
tests/colon6.test
tests/colon7.test
tests/color.test
tests/color2.test
tests/comments-in-var-defn.test [new file with mode: 0755]
tests/compile2.test
tests/compile_f_c_cxx.test
tests/cond13.test
tests/cond14.test
tests/cond23.test
tests/cond24.test
tests/cond25.test
tests/cond26.test
tests/cond27.test
tests/cond28.test
tests/cond29.test
tests/cond30.test
tests/cond31.test
tests/cond32.test
tests/cond33.test
tests/cond34.test
tests/cond35.test
tests/cond36.test
tests/cond37.test
tests/cond38.test
tests/cond39.test
tests/cond40.test
tests/cond41.test
tests/cond42.test
tests/cond43.test
tests/cond44.test
tests/cond45.test
tests/cond5.test
tests/condd.test
tests/condhook.test
tests/condhook2.test [new file with mode: 0755]
tests/condinc2.test
tests/condman.test
tests/condman2.test
tests/condman3.test [new file with mode: 0755]
tests/confdeps.test
tests/conff.test
tests/conff2.test
tests/confh.test
tests/confh4.test
tests/confh5.test
tests/confh6.test [moved from tests/config.test with 84% similarity]
tests/confh7.test [moved from tests/conf2.test with 80% similarity]
tests/confh8.test [new file with mode: 0755]
tests/configure.test
tests/confincl.test
tests/conflnk.test
tests/conflnk2.test
tests/conflnk3.test
tests/conflnk4.test
tests/confsub.test
tests/confvar.test
tests/confvar2.test
tests/defs.in
tests/depcomp.test
tests/depcomp2.test
tests/depcomp3.test
tests/depcomp4.test
tests/depcomp5.test
tests/depcomp6.test
tests/depcomp7.test
tests/depcomp8a.test [new file with mode: 0755]
tests/depcomp8b.test [new file with mode: 0755]
tests/distcleancheck.test
tests/distcom2.test
tests/distcom3.test
tests/distcom4.test
tests/distcom5.test
tests/distcom6.test
tests/distcom7.test
tests/distdir.test
tests/distlinks.test
tests/distlinksbrk.test [new file with mode: 0755]
tests/distname.test
tests/dmalloc.test [new file with mode: 0755]
tests/dollarvar.test
tests/dollarvar2.test
tests/flibs.test
tests/fn99.test
tests/fn99subdir.test
tests/fort4.test
tests/fort5.test
tests/help-depend.test [new file with mode: 0755]
tests/help-depend2.test [new file with mode: 0755]
tests/help-dmalloc.test [new file with mode: 0755]
tests/help-init.test [new file with mode: 0755]
tests/help-lispdir.test [new file with mode: 0755]
tests/help-maintainer.test [new file with mode: 0755]
tests/help-multilib.test [new file with mode: 0755]
tests/help-regex.test [moved from tests/fpinst2.test with 63% similarity]
tests/help-silent.test [new file with mode: 0755]
tests/help-upc.test [new file with mode: 0755]
tests/help.test
tests/help2.test [new file with mode: 0755]
tests/help3.test [new file with mode: 0755]
tests/help4.test [new file with mode: 0755]
tests/hfs.test
tests/init2.test [new file with mode: 0755]
tests/install2.test
tests/instdir-texi.test
tests/insthook.test
tests/instmany-mans.test
tests/instmany-python.test
tests/instmany.test
tests/instsh2.test
tests/instspc.test
tests/lex3.test
tests/lex5.test
tests/libobj14.test
tests/lispdry.test [new file with mode: 0755]
tests/man4.test
tests/mdate6.test [moved from tests/fpinstall.test with 62% similarity]
tests/missing6.test
tests/mkinst3.test
tests/mmode.test
tests/mmodely.test
tests/multlib.test
tests/parallel-tests-unreadable-log.test [new file with mode: 0755]
tests/parallel-tests.test
tests/parallel-tests8.test
tests/percent.test
tests/percent2.test
tests/phony.test
tests/pluseq11.test [new file with mode: 0755]
tests/pr2.test
tests/pr204.test
tests/pr211.test
tests/pr220.test
tests/pr224.test
tests/pr229.test
tests/pr243.test
tests/pr266.test
tests/pr279-2.test
tests/pr279.test
tests/pr287.test
tests/pr300-lib.test
tests/pr300-ltlib.test
tests/pr300-prog.test
tests/pr307.test
tests/pr401.test
tests/pr401b.test
tests/pr401c.test
tests/pr72.test
tests/pr87.test
tests/pr9.test
tests/prefix.test
tests/primary.test
tests/primary2.test
tests/primary3.test
tests/proginst.test
tests/silent-lex-gcc.test [new file with mode: 0755]
tests/silent-lex-generic.test [moved from tests/silentlex.test with 91% similarity]
tests/silent-many-gcc.test [new file with mode: 0755]
tests/silent-many-generic.test [moved from tests/silent5.test with 86% similarity]
tests/silent-yacc-gcc.test [new file with mode: 0755]
tests/silent-yacc-generic.test [moved from tests/silentyacc.test with 91% similarity]
tests/silent.test
tests/silent2.test
tests/silent3.test
tests/silent4.test
tests/silent6.test
tests/silent7.test
tests/silent9.test
tests/silentcxx.test
tests/silentf77.test
tests/silentf90.test
tests/specflg-dummy.test [new file with mode: 0755]
tests/specflg3.test
tests/spy.test
tests/strip2.test [new file with mode: 0755]
tests/strip3.test [new file with mode: 0755]
tests/subdir.test
tests/subdir10.test
tests/subdir2.test
tests/subdir3.test
tests/subdir4.test
tests/subdir5.test
tests/subdir6.test
tests/subdir7.test
tests/subdir8.test
tests/subdir9.test
tests/subdirbuiltsources.test
tests/subobj.test
tests/subobj10.test
tests/subobj11a.test [new file with mode: 0755]
tests/subobj11b.test [new file with mode: 0755]
tests/subobj11c.test [new file with mode: 0755]
tests/subobj2.test
tests/subobj3.test
tests/subobj4.test
tests/subobj5.test
tests/subobj6.test
tests/subobj7.test
tests/subobj8.test
tests/subobj9.test
tests/subobjname.test
tests/substref.test
tests/suffix13.test
tests/suffix7.test
tests/target-cflags.test
tests/txinfo.test
tests/txinfo16.test
tests/txinfo18.test
tests/txinfo2.test
tests/txinfo22.test
tests/txinfo23.test
tests/txinfo24.test
tests/txinfo25.test
tests/txinfo29.test
tests/txinfo3.test
tests/txinfo30.test
tests/txinfo4.test
tests/txinfo5.test
tests/txinfo5b.test [new file with mode: 0755]
tests/txinfo6.test
tests/txinfo7.test
tests/txinfo8.test
tests/txinfo9.test
tests/vtexi.test
tests/vtexi2.test
tests/vtexi3.test [new file with mode: 0755]
tests/vtexi4.test [new file with mode: 0755]
tests/yaccdry.test [new file with mode: 0755]
tests/yflags.test
tests/yflags2.test

diff --git a/.cvsignore b/.cvsignore
deleted file mode 100644 (file)
index 0151972..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-Makefile
-aclocal
-automake
-config.cache
-config.log
-config.status
-configure.scan
-*.log
-log
-diffs
-*.patch
-*.tar.*
-autom4te.cache
-Fetchdir
index b0c6f16..dd96e23 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
        that it won't be erroneously picked up by `make -e'.
        * tests/lflags2.test: Likewise.
 
+2011-01-24  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       docs: color-tests issues with parallel make
+       * doc/automake.texi (Simple Tests): Document that automatic
+       recognition of a capable terminal attached to stdout can fail
+       with some make implementation when running in parallel mode,
+       thus causing colored test output not to be automatically
+       activated when it should.
+
+2011-01-23  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
+
+       tests: avoid instspc.test failures due to make's whitespace trimming
+       * tests/instspc.test: Prepend './' when passing the test
+       characters, to avoid leading whitespace characters to be trimmed
+       from macros set from environment variables.  Fixes testsuite
+       failures with HP-UX, IRIX, and Tru64/OSF make.
+
+2011-01-23  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       coverage: test semantics of "dummy" per-target flags
+       * tests/specflg-dummy.test: New test, ensuring that even "dummy"
+       per-target flags triggers the use of renamed objects.
+       * tests/Makefile.am (TESTS): Update.
+       Suggestion by Ralf Wildenhues.
+
+2011-01-23  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       tests defs: sanitize IFS
+       * tests/defs.in ($IFS): Define to <space>, <tab>, <newline>.
+       ($sp): New variable, holding a single whitespace character.
+       ($tab): New variable, holding a tabulation character.
+       ($nl): New variable, holding a newline character.
+
+2011-01-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
+
+       tests: fix VPATH auto-expansion workarounds.
+       * tests/parallel-tests8.test, tests/suffix13.test:
+       Ensure $< is not surrounded by white space, to prevent Solaris
+       make from applying automatic VPATH text expansion.
+
+2011-01-22  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       tests: fix spurious failures in yflags*.test
+       * tests/yflags.test: Remove 'YACC' from the environment, so
+       that it won't be erroneously picked up by `make -e'.
+       * tests/yflags2.test: Likewise.
+
+2011-01-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
+
+       tests: avoid fn99*.test failures due to buggy AIX 5.3 cp -R.
+       * tests/fn99.test, tests/fn99subdir.test: Skip if an initial
+       `cp -R' of the subdir tree already fails; AIX 5.3 cp messes
+       up its internal memory when copying this tree.
+
+2011-01-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
+           Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       Add comment to check-TESTS rule working around make 3.80 bug.
+       * lib/am/check.am (check-TESTS): Update comment.
+
+2011-01-20  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
+
+       tests: less strict double-colon spy.test again.
+       * tests/spy.test: We know BSD make doesn't invoke more than one
+       double-colon rule, so no need to expose that failure.
+
+2011-01-19  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
+
+       install-sh: avoid Tru64 sh `test' operator precedence issues.
+       * lib/install-sh: Protect file names and directory components
+       that consist of `=', `(', `)', or `!'.  Move protection as early
+       as possible, to avoid errors such as with Tru64 sh `test -z ='.
+       * tests/instsh2.test: Extend test to cover more possibilities.
+       Fixes 1.12 instspc-equal-install.test failure on Tru64/OSF 5.1.
+
+2011-01-19  Stefano Lattarini  <stefano.lattarini@gmail.com>
+           Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
+
+       docs: automake testsuite doesn't use TESTS_ENVIRONMENT anymore
+       * doc/automake.texi (Simple Tests): Do not claim Automake uses
+       TESTS_ENVIRONMENT for the perl driver.  Instead, point to the
+       parallel-tests driver.
+
+2011-01-19  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
+
+       Allow _AM_DEPENDENCIES to be used later in configure.
+       * m4/depend.m4 (_AM_DEPENDENCIES): Remove a previously existing
+       conftest.dir before recreating it.
+       Fixes bug#7864.
+       Report by Eric Blake, from report by Scott McCreary against M4.
+
+2011-01-18  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
+
+       tests: avoid failure on w32 file systems.
+       * tests/parallel-tests-unreadable-log.test: SKIP if file cannot
+       be turned unreadable.
+
+2011-01-17  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
+
+       tests: allow double-colon spy.test to work with HP-UX make.
+       * tests/spy.test: Fix comment typos.  Ensure prerequisites we
+       do not want to depend on are strictly older than the target.
+       Also test with a target out of date wrt. more than one rule.
+
+2011-01-16  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       tests: remove useless requirements from cond36.test
+       * tests/cond36.test ($required): Remove.
+       Since we are at it, add a trailing `:' command.
+
+2011-01-16  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
+           Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       parallel-tests: work around Tru64/OSF 5.1 sh read bugs.
+       * lib/am/check.am ($(TEST_SUITE_LOG), recheck, recheck-html):
+       Test file readability before redirecting input from it, to avoid
+       exiting Tru64/OSF 5.1 sh which treats read as special builtin.
+       * tests/parallel-tests-unreadable-log.test: New test.
+       * tests/Makefile.am (TESTS): Update.
+       * NEWS: Update.
+
+2011-01-16  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
+
+       * NEWS, README: Update copyright years.
+
+       Fix parallel-tests.test failure with HP-UX make.
+       * tests/parallel-tests.test: Sleep inside inner tests, so logs
+       are newer than logs of tests they depend on, for HP-UX make.
+
+2011-01-15  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
+
+       docs: ensure example are separated with empty lines in the input
+       * doc/automake.texi (Extending aclocal, Emacs Lisp, Rebuilding)
+       (API Versioning, Renamed Objects, Multiple Outputs): Add empty
+       lines before `@example' and after `@end example' lines, so info
+       output is rendered correctly, and a following @noindent honored.
+       Report by Stefano Lattarini.
+
+2011-01-15  Jim Meyering <meyering@redhat.com>
+
+       tests: fix comment typo
+       * tests/substref.test: Fix grammar in a comment.
+
+2011-01-13  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       tests: fix spurious failures in two texinfo tests
+       * tests/txinfo.test ($required): Add 'makeinfo'.
+       * tests/txinfo8.test: Create a dummy 'textutils.info' file, so
+       that make won't try to run makeinfo (which could be unavailable)
+       to build it.
+       Found by NixOS Hydra, reported by Ralf Wildenhues.
+
+2011-01-13  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
+
+       Avoid testsuite failures due to Autoconf Fortran change.
+       Autoconf v2.68-21-g727ce95 causes AC_F77_LIBRARY_LDFLAGS to
+       require computing the canonical host name.  Ensure config.guess
+       and config.sub files are present for respective checks.
+       * tests/compile_f_c_cxx.test: Add stub files.
+       * tests/flibs.test: Likewise.
+       * tests/fort4.test: Use $AUTOMAKE -a for installing files.
+
+2011-01-12   Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       docs: clustered '-d' not recognized in YFLAGS
+       This change fixes automake bug#7828.
+       * doc/automake.texi (Yacc and Lex): Document that automake
+       recognizes '-d' in AM_YFLAGS only if it's not clustered with
+       other options.
+       From a report by Юрий Пухальский.
+
+2011-01-10   Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       tests: add checks on automatically-distributed files
+       Related to automake bug#7819.
+       * tests/autodist.test: New test.
+       * tests/autodist-subdir.test: Likewise.
+       * tests/autodist-acconfig.test: Likewise.
+       * tests/autodist-acconfig-no-subdir.test: Likewise.
+       * tests/autodist-aclocal-m4.test: Likewise.
+       * tests/autodist-config-headers.test: Likewise.
+       * tests/autodist-configure-no-subdir.test: Likewise.
+       * tests/autodist-stamp-vti.test: Likewise.
+       * tests/Makefile.am (TESTS): Update.
+
+2011-01-11  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       tests: work around a texi+cygnus bug causing a spurious XFAIL
+       * tests/txinfo5b.test: New test, like txinfo5.test but calling
+       automake with the `-Wno-override' option to work around a bug
+       in the texinfo + cygnus interaction.
+       * tests/txinfo5.test: Update heading comments.
+       * tests/Makefile.am (TEST): Updated.
+
+2011-01-09  Dave Hart  <davehart@gmail.com>  (tiny change)
+
+       Fix another typo in Rule.pm comment.
+       * lib/Automake/Rule.pm: Fix typo.
+
+2011-01-11  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       Improve, extend and tweak tests on Texinfo support.
+       * tests/instdir-texi.test: Add a call to `ls -l' after that to
+       `make', for debugging.  When looking for required tools, do not
+       redirect the output of "$tool --help" to /dev/null, and do not
+       uselessly run it in a subshell.
+       * tests/txinfo.test: Rewritten to run autoconf, ./configure and
+       make.  All checks moved into Makefile.am.
+       * tests/txinfo8.test: Likewise, and modernize the generated
+       configure.in.
+       * tests/txinfo2.test: Moved checks into Makefile.am, and other
+       minor improvements.
+       * tests/txinfo5.test: Enable `errexit' shell flag, and related
+       changes.  Add trailing `:' command.
+       * tests/txinfo6.test: Likewise, and make grepping of generated
+       Makefile.in stricter.
+       * tests/txinfo7.test: Enable `errexit' shell flag, and related
+       changes.  Add trailing `:' command.  Do not add unnecessary stuff
+       to Makefile.am.
+       * tests/txinfo9.test: Verify that more targets which are expected
+       to be generated only once really are.  Make grepping less strict,
+       to avoid exposing too much internal details.  More minor changes.
+       * tests/txinfo16.test: Add trailing `:'.  Prefer cat over echo
+       for appending to configure.in.  Updated/fixed heading comments.
+       * tests/txinfo23.test: Likewise, and extended a little by making
+       it check that no info file is created in the $(srcdir).
+       * tests/txinfo24.test: Likewise.
+       * tests/txinfo25.test: Likewise.
+       * tests/txinfo18.test: Add trailing `:'.  Prefer cat over echo
+       for appending to configure.in.  Also, check that index files are
+       cleaned also by "make clean", not only by "make distclean".
+       * tests/txinfo22.test: Prefer `$me' over hard-coded test name,
+       and added trailing `:' command.  This testcase also used to check
+       that automake ignores in-line comments when using variables, but
+       preserves them in the output; these checks (added in commit
+       "Release-1-7f-4-g9177ef8") do not really pertain to this test,
+       so they have been moved ...
+       * tests/comments-in-var-defn.test: ... into this new test.
+       * tests/txinfo4.test: Escape literal dots in grep regexps.  Add
+       trailing `:' command.
+       * tests/txinfo29.test: Likewise.  Relax grepping of generated
+       Makefile.in w.r.t. whitespaces.  Prefer `cat' over `echo' to
+       append to configure.in.
+       * tests/txinfo3.test: Likewise.
+       * tests/vtexi.test: Improve grepping of Makefile.in (sometimes
+       make it stricter, sometimes laxer).  Move `set -e' setting just
+       after the inclusion of ./defs.  De-uglify a sed command.  Other
+       minor cosmetic improvements.
+       * tests/vtexi2.test: Make grepping of Makefile.in stricter.  Add
+       trailing `:' command.
+       * tests/vtexi3.test: New test on version.texi support.
+       * tests/vtexi4.test: Likewise.
+       * tests/Makefile.am (TESTS): Updated.
+
+2011-01-09  Peter Rosin  <peda@lysator.liu.se>
+
+       Fix another typo in Rule.pm comment.
+       * lib/Automake/Rule.pm: Fix typo.
+
+2011-01-09   Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       cosmetics: remove trailing whitespaces
+       * doc/automake.texi: Remove trailing whitespaces.
+       * tests/cond13.test: Likewise.
+       * tests/cond14.test: Likewise.
+       * tests/fort4.test: Likewise.
+       * tests/fort5.test: Likewise.
+       * tests/suffix7.test: Likewise.
+       * tests/vtexi2.test: Likewise.
+
+       automake: minor fixes in comments
+       * automake.in: Some minor fixes and enhancements in comments.
+
+2011-01-09  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
+
+       Add test coverage for deleted header files.
+       * tests/depcomp6.test, tests/depcomp7.test: Update tests to
+       also check for the deleted header bug.  If no dependency
+       tracking mechanism could be found, SKIP rather than exit
+       successfully.  Use GNU style spacing and ANSI C prototypes.
+
+       Fix typos in Rule.pm comments.
+       * lib/Automake/Rule.pm: Fix typos in comments.
+
+       docs: split 'amhello Explained' node.
+       * doc/automake.texi (amhello Explained): Split node ...
+       (amhello's configure.ac Setup Explained)
+       (amhello's Makefile.am Setup Explained) : ... into these two.
+       (Top, Hello World): Adjust, and add @anchor for stable URL links.
+       Suggestion by Karl Berry in automake bug#7766.
+
+2011-01-08  Karl Berry  <karl@freefriends.org>
+           Eric Blake  <eblake@redhat.com>
+
+       docs: reference defining directories in amhello node.
+       * doc/automake.texi (amhello Explained): Point to Autoconf
+       manual for how to convert directory values into macros.
+       (Optional): Fix grammar nit.
+
+2011-01-02   Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       * NEWS: Fix typo (forgotten word).
+
+2011-01-02   Stefano Lattarini  <stefano.lattarini@gmail.com>
+            Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
+
+       docs: how to work around checks on invalid primary/directory couples
+       * doc/automake.texi (Uniform): Document the blessed idiom which can
+       be used to work around automake checks on invalid primary/directory
+       couples (such as `lib_PROGRAMS' or `doc_LIBRARIES').
+
+2011-01-02  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
+
+       Sync auxiliary files from upstream.
+       * lib/config.guess, lib/config.sub, lib/texinfo.tex:
+       Sync from upstream.
+
+       Fix maintainer-check regression.
+       * tests/subobj11a.test: Pass DISTCHECK_CONFIGURE_FLAGS in the
+       environment.
+
+       Bump copyright years.
+       * aclocal.in (write_aclocal, version): Bump copyright years.
+       * automake.in (gen_copyright, version): Likewise.
+       * doc/automake.texi: Likewise.
+
+2010-12-23  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
+           Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       Work around a bug in file-inclusion mechanism of Solaris make.
+       * automake.in (handle_single_transform): In the name of the
+       dependency file: collapse multiple slash characters into a single
+       one.
+       * tests/subobj11a.test: New test.
+       * tests/subobj11b.test: Likewise.
+       * tests/subobj11c.test: Likewise.
+       * tests/depcomp8a.test: Likewise.
+       * tests/depcomp8b.test: Likewise.
+       * tests/Makefile.am (TESTS): Updated.
+       * NEWS: Updated.
+       Report by Stefano Lattarini, quick fix by Ralf Wildenhues, final
+       patch and tests by Stefano Lattarini.
+
+2010-12-22  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       Fix two spurious testsuite failures on IRIX 6.5.
+       * tests/suffix13.test (Makefile.am): Account for VPATH issues on
+       weaker make implementations (e.g. IRIX 6.5).
+       * tests/parallel-tests8.test: Likewise, plus a required related
+       change.
+       Reported by Ralf Wildenhues.  The bugs have been there from the
+       first versions of the affected test scripts.
+
+2010-12-22  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       docs: cygnus mode doesn't require AM_CYGWIN32 macro.
+       * doc/automake.texi (Cygnus): Mode 'cygnus' does not require
+       the AM_CYGWIN32 macro (and indeed hasn't required it since at
+       least commit Release-1-2-31-g3038064 "merged changes from
+       Cygnus" of 1997-08-25).
+
+2010-12-22  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       distlinksbrk.test: Work around botched "make -k".
+       * tests/distlinksbrk.test: Run "make" multiple times and grep
+       its output each time for a single error message, rather than
+       running "make -k" one single time and grepping its output for
+       all the expected error messages.  This should work around make
+       implementations with limited (broken?) `-k' support; for more
+       information, see these subthreads on the automake-patches list:
+         - 2010-11-15, "Testsuite failures on HP-UX 11.23",
+           <http://lists.gnu.org/archive/html/automake-patches/2010-11/msg00162.html>
+         - 2010-11-15, "Testsuite failures on IRIX 6.5",
+           <http://lists.gnu.org/archive/html/automake-patches/2010-11/msg00166.html>
+
+2010-12-21  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       Fix sed-related buglet in test "subdir5.test"
+       * tests/subdir5.test: Always terminate text passed to the
+       `i' sed command with a newline, to work around limitations
+       in e.g. older OpenBSD sed.
+
+2010-12-18  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       docs: fix blunder in example about python extension modules
+       * doc/automake.texi (Python): Use `quaternion_la_SOURCES',
+       not `quaternion_SOURCES', to declare the sources of python
+       extension module `quaternion.la'.
+
+2010-12-16  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       docs: list LTLIBRARIES among Automake primaries
+       * doc/automake.texi (Uniform): List `LTLIBRARIES' among
+       the Automake primaries.
+
+2010-12-14  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       Improve tests on generated portions of configure help screen.
+       * tests/help-depend.test: Grepping of configure help screen
+       relaxed to cater for possible line wrapping, and tightened in
+       other respects.
+       * tests/help-depend2.test: Likewise.
+       * tests/help-dmalloc.test: Likewise.
+       * tests/help-lispdir.test: Likewise.
+       * tests/help-maintainer.test: Likewise.
+       * tests/help-multilib.test: Likewise.
+       * tests/help-silent.test: Likewise.
+       * tests/help-upc.test: Likewise.
+       * tests/help-init.test: Grepping of configure help screen
+       tightened.
+
+2010-12-10  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
+
+       Avoid running installed automake from 'libtool --help'.
+       * tests/subobj9.test: Export AUTOCONF and AUTOMAKE.
+       Together with fixed Libtool, this fixes check-coverage to not
+       invoke installed automake.
+
+2010-11-25  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       Fix spurious failures in `silent*.test' for $CC != gcc
+       In some tests on automake-produced silent rules, we forced the
+       use of gcc depmode to improve testsuite coverage; but this has
+       unsurprisingly led to spurious failures when some non-GNU C
+       compilers were used.  So we are now careful to require GCC in
+       tests that force gcc depmode.
+       From reports by Ralf Wildenhues.
+       * silent5.test: Test removed, its content split into ...
+       * silent-many-generic.test, silent-many-gcc.test: ... these new
+       sister tests, the latter of which forces gcc depmode and lists
+       "gcc" in $required.
+       * silentlex.test: Test removed, its content split into ...
+       * silent-lex-generic.test, silent-lex-gcc.test: ... these new
+       sister tests, the latter of which forces gcc depmode and lists
+       "gcc" in $required.
+       * silentyacc.test: Test removed, its content split into ...
+       * silent-yacc-generic.test, silent-yacc-gcc.test: ... these new
+       sister tests, the latter of which forces gcc depmode and lists
+       "gcc" in $required.
+       * tests/Makefile.am (TESTS): Updated.
+
+2010-11-21  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       Tests: consistently use "|| Exit 1" after ". ./defs".
+       * tests/autohdr.test: Use `. ./defs || Exit 1', not bare
+       `. ./defs', for consistency with other tests.
+       * tests/autohdr2.test: Likewise.
+       * tests/autohdr3.test: Likewise.
+       * tests/autohdr4.test: Likewise.
+       * tests/cond23.test: Likewise.
+       * tests/cond24.test: Likewise.
+       * tests/cond25.test: Likewise.
+       * tests/cond26.test: Likewise.
+       * tests/cond27.test: Likewise.
+       * tests/cond28.test: Likewise.
+       * tests/cond29.test: Likewise.
+       * tests/cond30.test: Likewise.
+       * tests/cond31.test: Likewise.
+       * tests/cond32.test: Likewise.
+       * tests/cond33.test: Likewise.
+       * tests/cond34.test: Likewise.
+       * tests/cond35.test: Likewise.
+       * tests/cond36.test: Likewise.
+       * tests/cond37.test: Likewise.
+       * tests/cond38.test: Likewise.
+       * tests/cond39.test: Likewise.
+       * tests/cond40.test: Likewise.
+       * tests/cond41.test: Likewise.
+       * tests/cond42.test: Likewise.
+       * tests/cond43.test: Likewise.
+       * tests/cond44.test: Likewise.
+       * tests/cond45.test: Likewise.
+       * tests/dollarvar.test: Likewise.
+       * tests/dollarvar2.test: Likewise.
+       * tests/hfs.test: Likewise.
+       * tests/libobj14.test: Likewise.
+       * tests/percent.test: Likewise.
+       * tests/percent2.test: Likewise.
+       * tests/phony.test: Likewise.
+       * tests/silent.test: Likewise.
+       * tests/silent2.test: Likewise.
+       * tests/silent3.test: Likewise.
+       * tests/silent4.test: Likewise.
+       * tests/silent5.test: Likewise.
+       * tests/silent6.test: Likewise.
+       * tests/silent7.test: Likewise.
+       * tests/silent9.test: Likewise.
+       * tests/silentcxx.test: Likewise.
+       * tests/silentf77.test: Likewise.
+       * tests/silentf90.test: Likewise.
+       * tests/silentlex.test: Likewise.
+       * tests/silentyacc.test: Likewise.
+
+       Avoid useless cleaning in some `silent*.test' tests.
+       * tests/silentf77.test: Removed useless calls to "make clean"
+       and "make maintainer-clean".
+       * tests/silentf90.test: Likewise.
+       * tests/silent3.test: Removed useless call to "make distclean".
+       * tests/silent4.test: Likewise.
+       * tests/silent9.test: Likewise.
+
+2010-11-19  Ian Lance Taylor  <iant@google.com>
+
+       Sync config-ml.in from GCC.
+       * config-ml.in: Add Go support: treat GOC and GOCFLAGS like other
+       compiler/flag environment variables.
+
+2010-11-19  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       Automake::Config: remove extra trailing semicolon.
+       * lib/Automake/Config.in: Remove extra trailing semicolon.
+
+       help4.test: fix botched heading comment.
+       * tests/help4.test: Fixed the heading comment, since it
+       didn't correctly describe what checks the testcase was
+       supposed to perform.
+
+       help2.test: add checks on aclocal too.
+       * tests/help2.test: Check that also `aclocal --version' and
+       `aclocal --help' work with configure.in and acinclude.m4 both
+       broken.
+
+2010-11-17  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       Fix spurious failures of silent-rules tests with Sun Fortran.
+       * tests/silentf77.test: Strip from the make output some verbose
+       messages possibly printed by the SunStudio fortran compilers, to
+       avoid spurious failures.  Add a trailing `:' command.
+       * tests/silentf90.test: Likewise.
+
+2010-11-17  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       Fix spurious failures of silent5.test with Sun Fortran.
+       * tests/silent5.test: Strip from the make output some verbose
+       messages possibly printed by the SunStudio fortran compilers,
+       to avoid spurious failures.  This bug has been there from the
+       very first version of this test script.
+
+2010-11-16  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       Fix regression in colon{5,6}.test (failures on AIX 5.3).
+       * tests/colon5.test: Also substitute `@SHELL@' with `$SHELL' when
+       post-processing the generated Makefile.in, to work around a bug
+       of AIX 5.3 make which doesn't allow setting the `$(SHELL)' macro
+       on the commend line.  Calls to `$MAKE' adjusted accordingly.
+       * tests/colon6.test: Likewise.
+       Regression introduced in commit v1.11-175-gf9fe878 "Modernize,
+       improve and/or extend tests `colon*.test", and reported by Ralf
+       Wildenhues.
+
+2010-11-16  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       Fix regression in ansi.test (failure on AIX 5.3).
+       * tests/ansi.test: Remove redundant hackish check done using a
+       hand-postprocessed Makefile.in.  This check worked by setting
+       the `$(SHELL)' macro on the command line of make, but this is
+       not supported by the AIX 5.3 make implementation.
+       This bug has been lurking for a long time, and was activated by
+       commit v1.11-125-gc1f6cdb "Enable `errexit' shell flag in various
+       tests".  Report by Ralf Wildenhues.
+
+2010-11-16  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
+
+       tests: avoid '##'-style comments inside recipe commands.
+       * tests/confh.test, tests/confh8.test: Remove
+       double-hash comments from makefile rule commands, they
+       are not part of the Automake API.
+
+2010-11-14  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
+
+       tests: work around dash quoting issue in case statements.
+       * tests/color.test, tests/color2.test: Quote variable in case
+       pattern, to avoid skipping tests with dash 0.5.5.1.
+
+2010-11-14  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
+
+       Rebuild menus in the manual.
+       * doc/automake.texi: Rebuild menus (using ^C ^U ^A in emacs).
+       Thanks to Ian Lance Taylor for the suggestion.
+
+       Fix install-strip when $(STRIP) contains several words.
+       * lib/am/install.am (install-strip): Update comment.  Use
+       separate sub-make invocations for empty and nonempty $(STRIP),
+       to fix quoting issues.
+       * tests/strip2.test, tests/strip3.test: New tests.
+       * tests/Makefile.am (TESTS): Adjust.
+
+2010-11-10  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
+
+       Fix yaccdry.test failure: require bison.
+       * tests/yaccdry.test: Require bison.
+       Found by NixOS Hydra.
+
+2010-11-07  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       Fix a bug in variable concatenation with `+='.
+       * lib/Automake/VarDef.pm (append): Since the content of the
+       "appended-to" variable is going to be unconditionally normalized
+       later, simply separate the appended value with a single whitespace
+       character, instead of trying to be uselessly smarter by using
+       escaped newlines.  This fixes a bug in which extra backslashes
+       where erroneously inserted in the variable's final value.
+       * tests/pluseq11.test: New test, exposing the bug.
+       * tests/Makefile.am (TESTS): Update.
+       Reported by Andy Wingo.
+
+2010-11-06  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       Fix bug in rules for creating vala vapi/header files.
+       * automake.in (lang_vala_finish_target): Add forgotten "fi" in an
+       if control structure in a generated make rules.  Bug introduced
+       by previous commit `v1.11-221-gd7c1679', and revealed by failure
+       of test `vala2.test'.
+
+2010-11-01  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
+
+       Fix and document rules to not touch the tree with `make -n'.
+       * doc/automake.texi (Multiple Outputs): Document the problem of
+       modifications during dry-run execution, propose solution.
+       * NEWS: Update.
+       * automake.in (lang_vala_finish_target): Split recipe so the
+       stamp file is not removed with GNU `make -n'.
+       (lang_yacc_target_hook): Separate removal of parser output file
+       and header remaking.
+       * lib/am/lisp.am ($(am__ELCFILES)): Determine whether -n was
+       passed to make, take care not to remove any files in that case.
+       * lib/am/remake-hdr.am (%CONFIG_H%): Separate removal of
+       %STAMP% file from induced remaking of config header.
+       * tests/autohdrdry.test, tests/lispdry.test, tests/yaccdry.test:
+       New tests.
+       * tests/Makefile.am (TESTS): Update.
+
+2010-11-01  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
+
+       Add FAQ entry for bug reporting instructions.
+       * doc/automake.texi (Reporting Bugs): New section.
+       (Introduction): Refer to it.
+
+2010-10-04  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       Add support for newer python versions.
+       * m4/python.m4 (AM_PATH_PYTHON): Add python2.7 and python3.2 to
+       _AM_PYTHON_INTERPRETER_LIST.  Since we are at it, break a long
+       line and fix indentation.
+       * THANKS: Updated.
+       From a report by Thomas Klausner.
+
+       Add test for `AM_WITH_DMALLOC' macro.
+       * tests/dmalloc.test: New test.
+       * tests/Makefile.am (TESTS): Update.
+
+       Fix nits and bugs in tests `help*.test'.
+       * tests/help4.test: Fix broken sed commands used to strip `-W...'
+       flags away from "$AUTOMAKE" and "$ACLOCAL".
+       * tests/help3.test: Likewise, and fix a botched comment.
+       * tests/help.test: Likewise.  Also, use "AUTOMAKE_fails ..."
+       instead of "$AUTOMAKE ... && Exit 1", for consistency and to
+       please maintainer-check.
+       * tests/help2.test: Likewise.
+
+2010-10-03  Stefano Lattarini  <stefano.lattarini@gmail.com>
+           Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
+
+       Improve tests `help*.test' (also fixes maintcheck failures).
+       * tests/help.test: To run automake, use `$AUTOMAKE' with all `-W'
+       flags stripped away rather than hard-coded `automake-$APIVERSION',
+       to better honour user-overrides.  Similarly for aclocal.
+       * tests/help2.test: Likewise.
+       * tests/help3.test: Likewise.
+       * tests/help4.test: Likewise.
+
+2010-10-03  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
+
+       Document and fix expansion of variables before rules.
+       * doc/automake.texi (General Operation): Document that variables
+       are expanded before rules.
+       * lib/am/check.am (am__check_post): Reword a bit so it does not
+       get matched as a rule.
+       Suggestion by Ben Pfaff.
+
+2010-10-02  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
+
+       Revert "parallel-tests: avoid command-line length limit issue."
+       This reverts commit 24e3b4ee2f8cb9f72dd94a05a893f3d4e88b7835,
+       because it re-opened the bug fixed by v1.11-10-g218e678.
+
+       2010-09-07  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
+
+       parallel-tests: avoid command-line length limit issue.
+       * automake.in (handle_tests): New argument $makefile, new
+       substitution %MAKEFILE%.
+       (generate_makefile): Adjust.
+       * lib/am/check.am [%?PARALLEL_TESTS%] (check-TESTS): Pass
+       sanitized TEST_LOGS value as makefile snippet on standard
+       input to $(MAKE), to avoid exceeding the command line limit on
+       w32 (MSYS).
+       * NEWS: Update.
+       Report by Bob Friesenhahn.
+
+2010-09-26  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       Extend tests on `--help' and `--version' options.
+       * tests/help.test: Create a new empty directory and chdir into
+       it, rather than removing already present files.  Run the aclocal
+       and automake wrapper scripts directly, instead of relying on
+       $AUTOMAKE and $ACLOCAL.  Be sure to correctly match literal dots
+       in aclocal's and automake's stderr.  Add a trailing `:' command.
+       * tests/help2.test: New test, checking that options `--help' and
+       `--version' works in directories with broken `configure.in'.
+       * tests/help3.test: New test, checking that options `--help' and
+       `--version' take precedence on the other options.
+       * tests/help4.test: New test, checking that the first among the
+       `--help' and `--version' options to be specified on the command
+       line wins.
+       * tests/Makefile.am (TESTS): Updated.
+
+2010-09-25  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       Testsuite: Use `$PATH_SEPARATOR', not `:', when extending PATH.
+       * tests/compile2.test: Do no uselessly (implicitly) repeat the
+       computation of PATH_SEPARATOR again.
+       * tests/instmany-mans.test: Use `$PATH_SEPARATOR', not `:', when
+       extending/redefining PATH.
+       * tests/instmany-python.test: Likewise.
+       * tests/instmany.test: Likewise.
+       * tests/man4.test: Likewise.
+       * tests/mkinst3.test: Likewise.
+       * tests/mmodely.test: Likewise.
+       * tests/multlib.test: Likewise.
+       * tests/txinfo30.test: Likewise.
+       * tests/README (Section "Writing test cases" subsection "Do"):
+       Updated.
+       * Makefile.am (sc_tests_PATH_SEPARATOR): New maintainer check.
+       (syntax_check_rules): Updated.
+
+       Testsuite: new variables `$PATH_SEPARATOR' and `$APIVERSION'.
+       * tests/defs.in ($APIVERSION):  New AC_SUBST'd variable.
+       ($ACLOCAL, $AUTOMAKE): Use it.
+       ($PATH_SEPARATOR):  New AC_SUBST'd variables.
+       ($PATH): Use it.
+
+2010-09-22  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       Manual: be more agnostic w.r.t. version control system used.
+       * doc/automake.texi (Basics of Distribution): Also refer to `.svn'
+       directories as a type of probably-unwanted files that are copied
+       regardless when adding directories to EXTRA_DIST.
+       (The dist Hook): Show a dist-hook example which removes Subversion
+       `.svn' private directories from distdir, rather than CVS private
+       directories.
+       (missing and AM_MAINTAINER_MODE): Try to be more agnostic w.r.t.
+       the version control system used.
+
+       Manual: index refer to target "git-dist", not "cvs-dist".
+       * doc/automake.texi (General Operation): Index the non-standard
+       example about "git-dist" under the "git-dist" label, not under
+       the "cvs-dist" one.
+
+       Perl modules: remove references to "Automake CVS repository".
+       * lib/Automake/Channels.pm: Update comments to refer to "Automke's
+       git repository" rather than to "Automake's CVS repository".
+       * lib/Automake/Configure_ac.pm: Likewise.
+       * lib/Automake/FileUtils.pm: Likewise.
+       * lib/Automake/Struct.pm: Likewise.
+       * lib/Automake/XFile.pm: Likewise.
+       * lib/Automake/Version.pm (=head1 DESCRIPTION): Refer to "git
+       branches" rather than "CVS branches".
+
+       Remove obsolete .cvsignore files.
+       * .cvsignore, doc/.cvsignore, lib/.cvsignore, lib/am/.cvsignore,
+       lib/Automake/.cvsignore, lib/Automake/tests/.cvsignore,
+       m4/.cvsignore, tests/.cvsignore: Files deleted.  Even when using
+       savannah's CVS readonly mirror there's no way to commit back to
+       the real repository, so this files are not worth maintaining or
+       keeping around.
+
+2010-09-21  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       * m4/dmalloc.m4: Bump serial number and copyright years.
+
+2010-09-20  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       Fix broken link in `AM_WITH_DMALLOC' help screen.
+       * m4/dmalloc.m4 (AM_WITH_DMALLOC): Refer only to the dmalloc site
+       `http://www.dmalloc.com', not to the dmalloc tarball there (which
+       seems to have been removed, substituted by multiple release
+       tarballs now).
+
+2010-09-17  Eric Blake  <eblake@redhat.com>
+
+       Avoid triple-space after period.
+       * automake.in (handle_single_transform): Avoid 3 spaces at
+       sentence end.
+       * ChangeLog.03: Likewise.
+       * lib/Automake/ChannelDefs.pm: Likewise.
+       * lib/Automake/Channels.pm (_print_message): Likewise.
+       * lib/Automake/Rule.pm (rule): Likewise.
+       * lib/Automake/Variable.pm (var): Likewise.
+       * lib/am/distdir.am: Likewise.
+       * tests/insthook.test: Likewise.
+
+2010-09-15  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       Test automake-generated portions of configure help screen.
+       * tests/help-depend.test: New test.
+       * tests/help-depend2.test: Likewise.
+       * tests/help-dmalloc.test: Likewise.
+       * tests/help-init.test: Likewise.
+       * tests/help-lispdir.test: Likewise.
+       * tests/help-maintainer.test: Likewise.
+       * tests/help-multilib.test: Likewise.
+       * tests/help-regex.test: Likewise.
+       * tests/help-silent.test: Likewise.
+       * tests/help-upc.test: Likewise.
+       * tests/mmode.test: Remove tests on `configure --help' output,
+       they are superseded by tests in `help-maintainer.test'.
+       * tests/Makefile.am (TESTS): Update.
+
+2010-09-14  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       * tests/README: Don't put GCS mandated tools in $required.
+
+2010-09-13  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
+
+       * HACKING: Hint at old commits with `git describe' output.
+
+2010-09-12  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       Fix regression in test `colon4.test'.
+       * tests/colon4.test: Fix botched editing to `configure.in'
+       that made the test useless.  Since we are at it, improve
+       comments and make grepping of generated Makefile.in slightly
+       stricter.
+       Regression introduced by change "Modernize, improve and/or
+       extend tests `colon*.test" (Stefano Lattarini, 2010-08-08).
+
+2010-09-08  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       Do not require "gzip" explicitly in tests.
+       The gzip utility is simply expected to be present on any decent
+       target system for Automake.  So it's pointless to put it in
+       $required.
+       * tests/install2.test ($required): Do not require "gzip".
+       * tests/lex3.test: Likewise.
+       * tests/pr9.test: Likewise.
+       From a suggestion by Ralf Wildenhues.
+
+       Make some `confh*.test' tests more "semantic" (plus tweakings).
+       * tests/confh.test: Run "autoconf", "configure" and "make check",
+       instead of munging/grepping the generated `Makefile.in'.
+       * tests/confh4.test: Relax the grepping of Makefile.in w.r.t.
+       white spaces.  Do not create useless dummy source file `foo.c'
+       and useless dummy header file `acconfig.h'.
+       (configure.in): Remove superfluous call to `AC_OUTPUT'.
+       * tests/confh6.test: Add trailing `:' command.
+       * tests/confh7.test: In comments, add reference to ...
+       * tests/confh8.test: ... this new test, "semantic" sister
+       of `confh7.test'.
+       * tests/Makefile.am (TESTS): Updated.
+       Prompted by a report from Ralf Wildenhues.
+
+       Remove useless whitespace padding in XFAIL_TESTS definition.
+       * tests/Makefile.am (XFAIL_TESTS): Remove whitespace padding.
+
+2010-09-07  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
+
+       parallel-tests: avoid command-line length limit issue.
+       * automake.in (handle_tests): New argument $makefile, new
+       substitution %MAKEFILE%.
+       (generate_makefile): Adjust.
+       * lib/am/check.am [%?PARALLEL_TESTS%] (check-TESTS): Pass
+       sanitized TEST_LOGS value as makefile snippet on standard
+       input to $(MAKE), to avoid exceeding the command line limit on
+       w32 (MSYS).
+       * NEWS: Update.
+       Report by Bob Friesenhahn.
+
+       Posix 2008 requires make to set errexit.
+       * lib/am/check.am: Update comment.
+
+2010-08-27  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       Fix bug in test missing6.test.
+       * tests/missing6.test: Fix the hack used to edit `configure.in',
+       to avoid producing a configure script that breaks with shells
+       that do not support $LINENO.  Also throw in a couple of cosmetic
+       changes.
+
+2010-08-21  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
+
+       Improve robustness of mdate-sh script.
+       * lib/mdate-sh: Sanitize zsh behavior on startup, to ensure
+       $ls_command is word-split properly upon invocation.
+       (error): New function.
+       (main): Use it.  Improve error checking to avoid endless loop
+       in case $ls_command gave bogus output.  Fix eval quotation.
+       * tests/mdate6.test: New test, to expose eval quotation error.
+       * tests/Makefile.am: Update.
+
+2010-08-18  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       Fix potential regressions in depcomp{3,5}.test.
+       * tests/depcomp3.test: Do not uselessly escape the character `$'
+       in makefile rules, when it's used to expand a make macro.
+       * tests/depcomp5.test: Likewise.
+
+2010-08-17  Stefano Lattarini  <stefano.lattarini@gmail.com>
+           Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
+
+       Docs: clarify how to avoid automatic dependencies tracking.
+       * doc/automake.texi (Automatic dependency tracking): Mention that
+       automatic dependencies tracking is enabled by default, but that
+       the package developer can disable it altogether.  Add a reference
+       to the proper section for a more in-depth explanation.
+
+       Fix typo in manual (`Makefile.in' instead of `Makefile.am').
+       * doc/automake.texi (Automatic dependency tracking): Fix typo.
+
+2010-08-16  Bruno Haible  <bruno@clisp.org>
+
+       Don't hide the table of contents.
+       * doc/automake.texi: Move the table of contents to the beginning.
+
+2010-08-10  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       Tweak and/or extend some `acloca*.test' tests.
+       * tests/aclocal8.test:  Ensure verbose printing of captured
+       output.
+       * tests/aclocal.test: Likewise.  Also, add trailing `:'
+       command.
+       * tests/acloca19.test: Likewise.
+       * tests/aclocal5.test: Add trailing `:' command, and prefer
+       `$me' over hard-coded test name.
+       * tests/aclocal6.test: Likewise.
+       * tests/aclocal18.test: Add trailing `:' command, and make
+       some grepping slightly stricter.
+       * tests/acloca14.test: Likewise.  Also, prefer `diff' over
+       `cmp', and add some "cosmetic" blank lines.
+
+2010-08-09  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       Tweak and extend tests `pr[!0-9]*.test'.
+       * tests/primary3.test: Add trailing `:' command.
+       * tests/primary.test: Make grepping of Automake's stderr stricter.
+       Also, add trailing `:' command, and cosmetic changes in spacing.
+       * tests/primary2.test: Likewise.
+       * tests/prefix.test: Enable `errexit' shell flags, and related
+       changes.  Add a trailing `:' command.
+       * tests/proginst.test: Likewise.
+
+       Modernize, improve and extend tests for PR (`pr[0-9]*.test').
+       * tests/pr2.test: Add trailing `:' command.
+       * tests/pr229.test: Likewise.
+       * tests/pr401.test: Likewise.
+       * tests/pr401b.test: Likewise.
+       * tests/pr401c.test: Likewise.
+       * tests/pr300-prog.test: Likewise, plus cosmetic changes in
+       spacing.
+       * tests/pr300-lib.test: Likewise.
+       * tests/pr300-ltlib.test: Likewise, and ensure verbose printing
+       of captured make stdout.
+       * tests/pr211.test: Add trailing `:' command.  Also, use the
+       `configure.in' stub created by ./defs, rather than writing it
+       from scratch.
+       * tests/pr204.test: Likewise, plus cosmetic spacing changes.
+       * tests/pr287.test: Likewise, and move setting of `errexit' shell
+       flag earlier in the script (just after inclusion of ./defs).
+       * tests/pr220.test: Make grepping of Automake's stderr stricter.
+       Also, add trailing `:' command, and cosmetic changes in spacing.
+       * tests/pr224.test: Move setting of `errexit' shell flag earlier
+       in the script (just after inclusion of ./defs).  Do not export
+       `CC=gcc' to configure explicitly (it's already exported globally
+       in ./defs, since we have "gcc" in $required).  Use the stub for
+       `configure.in' created by ./defs, rather than writing it from
+       scratch.  Do not create dummy files required by "gnu" mode (e.g.
+       README, NEWS), since we run automake in foreign mode anyway.
+       * tests/pr72.test: Enable `errexit' shell flags, and related
+       changes.  Extend existing checks a bit.
+       * tests/pr9.test: Likewise.  Also, avoid obsolescent constructs in
+       the generated `configure.in', and extend existing checks over the
+       generated tarball a bit.
+       * tests/pr87.test: Enable `errexit' shell flags, and related
+       changes.  Add a trailing `:' command.  Also, do not create dummy
+       files required by "gnu" mode (e.g. README, NEWS), since we run
+       automake in foreign mode anyway.
+       * tests/pr243.test: Avoid obsolescent constructs in the generated
+       `configure.in'.  Enable the `errexit' shell flag, and related
+       changes.  Cosmetic changes to spacing, add trailing `:' command,
+       and add a "FIXME" comment.
+       * tests/pr266.test: Likewise, and add explicit command line switch
+       `--enable-dependecy-tracking' to the ./configure call.
+       * tests/pr279.test: Avoid obsolescent constructs in the generated
+       `configure.in'; also, use the `configure.in' stub created by
+       ./defs, rather than writing it from scratch.  Enable `errexit'
+       shell flag, and related changes.  Add trailing `:' command.
+       * tests/pr279-2.test: Likewise, and make grepping of Makefile.in
+       stricter.
+       * tests/pr307.test: Move setting of `errexit' shell flag earlier
+       in the script (just after inclusion of ./defs).  Escape literal
+       dots in grep regular expressions.  Also, add a trailing `:'
+       command, and cosmetic changes to spacing.
+
+       Tests for PR: add excerpts from original bug report, for clarity.
+       * tests/pr2.test: Ditto.
+       * tests/pr9.test: Likewise.
+       * tests/pr72.test: Likewise.
+       * tests/pr87.test: Likewise.
+       * tests/pr211.test: Likewise.
+       * tests/pr220.test: Likewise.
+       * tests/pr224.test: Likewise.
+       * tests/pr229.test: Likewise.
+       * tests/pr243.test: Likewise.
+       * tests/pr266.test: Likewise.
+       * tests/pr279.test: Likewise, and tell to keep it in sync
+       with its sister test.
+       * tests/pr279-2.test: Likewise.
+
+2010-08-08  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       Tweak, extend and improve tests `cond[a-z]*.test'.
+       * tests/condd.test: Add trailing `:' command.  Typofix in
+       comment.
+       * tests/condhook.test: Make sure target `install-data-hook' is
+       not called by `make install', but that data files are installed.
+       Use proper m4 quoting in configure.in. Add trailing `:' command.
+       * tests/condhook2.test: New test, sister test of condhook, with
+       inverted semantic.
+       * tests/condinc2.test: Use proper m4 quoting in configure.in.
+       Prefer trailing `:' command over trailing `Exit 0'.
+       * tests/condman2.test: Enable errexit shell flag, and related
+       changes.  Add trailing `:' command.
+       * tests/condman.test: Likewise.  Also, do not create useless
+       dummy manpages, and use proper m4 quoting in configure.in.
+       * tests/condman3.test: New test, similar to condman.test, but
+       it also runs ./configure and "make install", and check the
+       installed files.
+       * tests/Makefile.am (TESTS): Updated.
+
+       Modernize, improve and/or extend tests `colon*.test.
+       * tests/colon.test: Rely on the `configure.in' stub created by
+       `./defs', rather than writing one from scratch.  Do not create
+       a useless dummy file.  Add trailing `:' command.
+       * tests/colon4.test: Enable the `errexit' shell flag, and
+       related changes.  Rely on the `configure.in' stub created by
+       `./defs', rather than writing one from scratch.
+       * tests/colon7.test: Enable `errexit' shell flag, and related
+       changes.  Improve the generated `configure.in' file.  Add
+       trailing `:' command.
+       * tests/colon2.test: Likewise.  Also, add some new checks.
+       * tests/colon5.test: Improve the generated `configure.in' file.
+       Add new, much deeper checks.  Add trailing `:' command.
+       * tests/colon6.test: Likewise.
+       * tests/colon3.test: Add trailing `:' command.  Remove useless
+       comments and echos.  Improve the generated `configure.in' file.
+       make some grepping tests stricter.  Add a "FIXME" comments about
+       planned improvements.
+
+       Improve and extend tests `asm*.test'.
+       * tests/asm.test: Use configure.in stub generated by ./defs,
+       and avoid obsoleted autoconf constructs.  Make grepping of
+       Automake stderr stricter.  Do not create useless source file.
+       Improve verbose messages.  Minor cosmetic changes.  Tell to
+       keep it in sync with other sister tests asm*.test.
+       * tests/asm2.test: Likewise.
+       * tests/asm3.test: Likewise.
+
+       Modernize, improve and/or extend test scripts `conf*.test'.
+       * tests/confh5.test: Cosmetic changes.
+       * tests/conff.test: Likewise.
+       * tests/confdeps.test: Likewise.
+       * tests/conflnk.test: Likewise.
+       * tests/conflnk2.test: Likewise.
+       * tests/confsub.test: Likewise.
+       * tests/confvar.test: Likewise, and make grepping of Makefile.in
+       stricter.
+       * tests/confvar2.test: Likewise.
+       * tests/conflnk3.test: Cosmetic changes.  Re-enable a temporarily
+       disabled test (which didn't work with autoconf <= 2.59, but now we
+       are requiring autoconf 2.62, so...)
+       * tests/conflnk4.test: Cosmetic changes, and extend existing tests
+       accordingly to "TODO" comments.
+       * tests/conff2.test: Make grepping of Automake's stderr stricter.
+       Add some comments explaining why we don't use the `configure.in'
+       stub preset be ./defs.
+       * tests/confh.test: Use the `configure.in' stub created by ./defs,
+       rather than writing one from scratch, and do not call AC_OUTPUT.
+       Enable `errexit' shell flag, and related changes.  Prefer diff over
+       cmp to compare text files. Prefer perl over sed to fetch the value
+       of $(DIST_COMMON) from Makefile.in.  Make grepping of the contents
+       of $(DIST_COMMON) stricter.
+       * tests/confh4.test: Use the `configure.in' stub created by ./defs,
+       rather than writing one from scratch.  Make grepping of Makefile.in
+       stricter.
+       * tests/confh5.test: Make grepping of `config.h' stricter.  Add a
+       comment.
+       * tests/configure.test: Avoid obsolescent constructs in generated
+       `configure.ac'.  Do not write `configure.in' two times.  Escape
+       literal dots in grep regular expressions.
+       * tests/confincl.test:  Enable `errexit' shell flag, and related
+       changes.  Prefer fgrep over grep.  Other cosmetic changes.
+       * tests/config.test: Renamed to ...
+       * tests/confh6.test: ... this.  Fix m4 quoting in `configure.in',
+       and make grepping of `config.h' and `config.h.in' stricter.
+       * tests/conf2.test: Renamed ...
+       * tests/confh7.test: ... to this.  Use the `configure.in' stub
+       created by ./defs, rather than writing one from scratch.  Try to
+       run the checks both with and without AC_PROG_CC and AC_OUTPUT in
+       `configure.in'.
+       * tests/Makefile.am (TESTS): Updated.
+
+       Minor improvements and fixes in tests `depcomp*.test'.
+       * tests/depcomp.test: Do not create useless dummy source files.
+       Add a trailing `:' command.
+       * tests/depcomp2.test: Use `unset' on the CFLAG variable to ensure
+       it's not in in the environment, rather than exporting it with an
+       empty value.  Do not pass CC=gcc to configure, as that's already
+       done in ./defs since we have gcc in $required.  Ensure verbose
+       printing of captured stderr, and normalize its checking.  Add a
+       trailing `:' command.
+       * tests/depcomp3.test: Quote literal dots and dollar characters in
+       grep regexps.  Always use `: >' rather than `touch' to create empty
+       files.  Explicitly declare phony targets as such in the created
+       Makefile.am.  Add a trailing `:' command.
+       * tests/depcomp4.test: Quote literal dots and dollar characters in
+       grep regexp.  Explicitly declare phony targets as such in the
+       created Makefile.am.  Ensure verbose printing of captured makes'
+       stoud/stderr.  Add a trailing `:' command.
+       * tests/depcomp5.test: Move setting of `errexit' shell flag earlier
+       in the script (just after inclusion of ./defs).  Quote literal dots
+       and dollar characters in grep regexps.  Explicitly declare phony
+       targets as such in the created Makefile.am.  Add a trailing `:'
+       command.
+       * tests/depcomp6.test: Consistently use m4 quoting in the generated
+       configure.in.  Cosmetic fixes to spacing.  Make the "dummy" `if'
+       statement required by OpenBSD's sh `set -e' more robust, and add
+       explanatory comments to it.
+       * tests/depcomp7.test: Likewise, and add  a trailing `:' command.
+
+       Separate failing part of test `all.test'.
+       * tests/all.test: Keep only (x)failing part of the test.  Working
+       checks moved out to ...
+       * tests/all2.test: ... this new test.
+       * tests/Makefile.am (TESTS): Updated.
+
+       Modernize, improve and extend tests `subobj*.test'.
+       * tests/subobjname.test:  Add trailing `:' command.
+       * tests/subobj.test: Make grepping of `Makefile.in' stricter.
+       Escape literal dots in grep regexps.
+       * tests/subobj2.test:  Add trailing `:' command.  Do not use the
+       unportable fgrep option `-e'.
+       * tests/subobj3.test: Add trailing `:' command.
+       (configure.in): Use proper m4 quoting, and avoid obsolescent
+       constructs.
+       * tests/subobj8.test: Likewise.  Also, enable `errexit' shell
+       flag, with related changes
+       * tests/subobj4.test: Likewise.  Also, make grepping of
+       `Makefile.in' stricter.
+       * tests/subobj5.test: Add trailing `:' command.  Move setting of
+       `errexit' shell flag earlier in the script (just after inclusion
+       of ./defs).
+       (configure.in): Use the stub created by `./defs', rather than
+       writing it from scratch, and avoid obsolescent constructs.
+       * tests/subobj6.test: Add trailing `:' command.  Move setting of
+       `errexit' shell flag earlier in the script (just after inclusion
+       of ./defs).  Do not create useless dummy ac-init file `f'.
+       * tests/subobj7.test: Do not create useless dummy ac-init file
+       `f'.
+       (configure.in): Use the stub created by `./defs', rather than
+       writing it from scratch, and avoid obsolescent constructs.
+       * tests/subobj9.test: Move setting of `errexit' shell flag earlier
+       in the script (just after inclusion of ./defs).  Fail the test if
+       `make distcheck' fails.  Ensure verbose printing of captured make
+       stdout.  Avoid useless fork by doing simple grep instead of using
+       test -n "`COMMAND | grep ...`".
+       (configure.in): Normalize the call to AC_INIT w.r.t. other tests.
+       (Makefile.am): Explicitly mark target "print" as phony.
+       * tests/subobj10.test: Removed duplicated call to `set -e'.  Add
+       trailing `:' command.
+       (configure.in): Normalize the call to AC_INIT w.r.t. other tests.
+
+       Remove a couple of obsoleted tests.
+       * tests/fpinstall.test: Removed.
+       * tests/fpinst2.test: Likewise.
+       * tests/Makefile.am (TESTS): Updated.
+
+       Bootstrap: updated HACKING entry.
+       * HACKING ("Working with git"): Explain how to override the
+       autoconf and autom4te programs used by the bootstrap process.
+
+       Bootstrap: fixlet.
+       * bootstrap: Do not remove `lib/Automake/Config.pm' anymore,
+       since we don't generate it.  Correctly quote arguments of
+       `eval' builtin.  Fixed a botched error message.  Removed an
+       extra blank line.
+
+       Bootstrap: don't search perl in $PATH.
+       * bootstrap: Do not explicitly search perl in $PATH anymore.
+       ($PATH_SEPARATOR): Removed, it's no more needed.
+
+       Bootstrap: let the user choose which autoconf to use.
+       * bootstrap ($AUTOCONF): New variable, from the environment.
+       ($AUTOM4TE): Likewise, for clarity.
+       Use "$AUTOCONF" instead of calling "autoconf" directly.
+
+       Minor improvements to tests ar*.test.
+       * tests/ar.test: Add trailing `:' command.
+       * tests/ar2.test: Likewise, and make grepping of generated
+       Makefile.in stricter.
+
+2010-08-08  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
+
+       Fix maintainer-check failure.
+       * tests/cond5.test: Quote sleep argument, this isn't about
+       time stamp differences.
+
+       Sync auxiliary files from upstream.
+       * lib/config.guess, lib/config.sub, lib/texinfo.tex:
+       Sync from upstream.
+
+2010-08-06  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       Work around a nasty bug (segfault) of Solaris make.
+       * lib/am/check.am (recheck, recheck-html): Trim trailing spaces
+       from $list, to avoid triggering a nasty bug (potential segfault)
+       on Solaris make.
+
+2010-08-06  Peter Rosin  <peda@lysator.liu.se>
+
+       Make cond5.test more robust on MSYS.
+       * tests/cond5.test: Add delay before the first kill attempt to
+       cater for problems with MSYS bash.
+
+2010-07-31  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
+
+       Add example git work flow; discuss merge --log in HACKING.
+       * HACKING: Update.
+       Suggestion by Stefano Lattarini.
+
+       Add more hints for debugging make rules.
+       * doc/automake.texi (Debugging Make Rules): Show command to find
+       out expanded values of variables; point to makefile debugger.
+       * THANKS: Update.
+       Prompted by suggestion from Ludovic Courtès and Andy Wingo.
+
+2010-07-27  Patrick Welche  <prlw1@cam.ac.uk>  (tiny change)
+
+       Fix typo in the manual.
+       * doc/automake.texi (Scripts): Fix typo.
+
+2010-07-27  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
+
+       Document current policy for development with git.
+       * HACKING (Working with git): Overhaul.
+       Prompted by suggestion from Stefano Lattarini.
+
+       Fix AM_COND_IF for gone-invalid condition shell expression.
+       * m4/cond-if.m4 (AM_COND_IF): test contents of $COND_TRUE
+       variable, rather than re-evaluating the shell expression for
+       the condition.
+       * tests/cond40.test: Extend test.
+       * NEWS: Update.
+
+       Avoid syntax error if IF-TRUE part of AM_COND_IF expands empty.
+       * m4/cond-if.m4 (AM_COND_IF): Ensure IF-TRUE part is never empty
+       to avoid shell syntax error if the m4 expansion is empty.
+       * tests/cond40.test: Enhance test.
+
+       Coverage: bogus option to AM_INIT_AUTOMAKE.
+       * tests/init2.test: New test.
+       * tests/Makefile.am: Update.
+
+2010-07-21  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       Modernize and improve test scripts `subdir*.test'.
+       * tests/subdir.test: Enable `errexit' shell flag, and related
+       changes.  Use the `configure.in' stub created by `./defs',
+       rather than writing one from scratch.
+       * tests/subdir2.test: Likewise.
+       * tests/subdir4.test: Likewise.
+       * tests/subdir3.test: Enable `errexit' shell flag, and related
+       changes.  Do not create useless dummy source files.
+       * tests/subdir5.test: Make grepping of Makefile.in (in topdir
+       and in subdirs) stricter.  Some minor changes to keep it more
+       in sync with the related test `subdir8.test'.
+       * tests/subdir8.test: Likewise (but with the related test being
+       `subdir5.test' here).
+       * tests/subdir6.test: Cosmetic change in spacing.
+       * tests/subdir9.test: Define and use new variable `$distdir'.  Add
+       trailing `:' command.
+       * tests/subdir10.test: Cosmetic consistency-related change.
+       * tests/subdirbuiltsources.test: Cosmetic changes in spacings.
+       (configure.in): Use stub created by `./defs', rather than writing
+       it from scratch.  Do not use obsoleted and/or deprecated forms of
+       autoconf/automake macros.
+
+       Modernize and improve test scripts `dist*.test'.
+       * tests/distcleancheck.test: Do not add useless `-e' option to
+       a $MAKE call.  Extend test by grepping stderr of make.
+       * tests/distcom2.test: Do not run the same test script on the
+       Makefile.in twice, but save its output in an intermediate file
+       instead.  Make grepping of DIST_COMMON definition stricter.
+       Display the content of more files, to ease debugging.  Add a
+       trailing `:' command.  Improved heading comments w.r.t. sister
+       test(s).
+       * tests/distcom6.test: Likewise, and avoid to uselessly run
+       autoconf.
+       * tests/distcom3.test: Ensure verbose printing of captured stdout
+       and stderr.  Make grepping of captured stderr stricter.  Also,
+       add trailing `:' command.
+       * tests/distcom4.test: Declare the target `test' in the generated
+       Makefile.am as `.PHONY'.  Display content of more files, to ease
+       debugging.  Add trailing `:' command.
+       * tests/distcom5.test: Likewise.  Also, factor out common sed
+       script in subroutine `extract_distcommon'.
+       * tests/distcom7.test: Prefer cat + here-doc over echo to write
+       test Makefile.am files.  Add a trailing `:' command.
+       * tests/distname.test: Prefer `gzip -d' over `gunzip'.  Move the
+       call to `set -e' earlier.  Be stricter and more verbose in the
+       checking of the generated tarball.
+       (configure.in): Use the stub provided by ./defs, instead of
+       writing it from scratch.  Avoid obsoleted constructs.  Remove
+       useless call to `AM_PROG_CC_C_O'.
+       * tests/distdir.test: Various minor improvements/normalizations.
+       * tests/distlinks.test: Likewise.
+
+2010-07-18  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       Improve and extend test cond5.test.
+       * tests/cond5.test: Do not blindly sleep 60 seconds before polling
+       the background automake process, but poll it every 10 seconds for
+       at most 30 times (this makes the test both faster on good machines,
+       and more resilient to spurious timeout-due failures when in low
+       priority or on heavily-loaded systems).
+       Check also that automake writes the expected error messages on the
+       standard error.
+       Enable `errexit' flag, and related changes.
+       Rely on the `configure.in' stub created by `./defs', rather than
+       writing one from scratch.
+
+2010-06-26  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
+
+       Update program --help output to match current GCS.
+       * configure.ac: Set and substitute PACKAGE_URL if AC_PACKAGE_URL
+       is not defined, for compatibility to Autoconf < 2.64.
+       * Makefile.am (do_subst): Substitute PACKAGE_BUGREPORT and
+       PACKAGE_URL.
+       (sc_diff_automake_in_automake): Update number of diff lines for
+       additional substitutions.
+       * aclocal.in (usage): Use PACKAGE_BUGREPORT.  Point to Automake
+       home page and GNU general help page.
+       * automake.in (usage): Likewise.
+       * doc/automake.texi: New flag PACKAGE_BUGREPORT, to factor email
+       address.
+       (Introduction, Creating amhello, amhello Explained, Options):
+       Use it throughout.
+       * lib/Automake/Makefile.am (do_subst): Substitute
+       PACKAGE_BUGREPORT.
+       * lib/Automake/Config.in ($PACKAGE_BUGREPORT): New global.
+       * lib/Automake/ChannelDefs.pm: Use it for footer of fatal
+       messages.
+
+       Clean up @var handling in the manual.
+       * doc/automake.texi: Throughout the manual, lower-case @var
+       names, replace a few one-character names.
+
+2010-06-26  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       Fix typo-related bug in test script silent5.test.
+       * tests/silent5.test: Use $EGREP, not $GREP (which is not even
+       defined).
+
+       Tests: remove useless repetitions of `foreign' automake option.
+       * tests/multlib.test (configure.in): Remove useless use of
+       `foreign' option in AM_INIT_AUTOMAKE (the `--foreign' option is
+       already in $AUTOMAKE by default, so no point in repeating it).
+       * tests/subobj10.test: Likewise.
+       * tests/subobj9.test: Likewise.
+       * tests/lex3.test (Makefile.am): Similarly, remove useless use
+       of `foreign' option in AUTOMAKE_OPTIONS.
+       * tests/lex5.test: Likewise.
+       * tests/pr279.test: Likewise.
+       * tests/pr279-2.test: Likewise.
+       * tests/specflg3.test: Likewise.
+       * tests/target-cflags.test: Likewise.
+
+       Drop useless requirement "gzip" in lex5.test.
+       * tests/lex5.test ($required): Do not list "gzip", as it's
+       never used.
+
+2010-06-24  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       Fix bugs in test script silent5.test.
+       * tests/silent5.test: Fixed a nasty bug (due to the use of grep
+       instead of egrep) that could have led to false negatives.
+
+2010-06-21  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       Add a test checking that distributed broken symlinks cause
+       `make dist' to fail.
+       * tests/distlinksbrk.test: New test.
+       * tests/Makefile.am (TESTS): Updated.
+
 2010-06-21  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
 
        Fix minor testsuite issues, update docs, for Yacc/Lex changes.
        source file.
        * tests/suffix7.test: Likewise.
        * tests/suffix5.test: Enable `errexit' shell flag, and related
-       changes.  Make grepping of Makefile.in slighty stricter.
+       changes.  Make grepping of Makefile.in slightly stricter.
        * tests/suffix.test: Enable `errexit' shell flag, and related
        changes.  Also, do not redirect grep output to /dev/null, as this
        might unmotivatedly hide useful information.
        $FGREP rather than plain grep.
        * tests/suffix11.test: Likewise.
        * tests/suffix12.test: Likewise.
-       * tests/suffix9.test: Prefet cat + here-doc over echo to append to
+       * tests/suffix9.test: Prefer cat + here-doc over echo to append to
        the `configure.in' stub.  Cosmetic changes.
        * tests/suffix13.test: Cosmetic spacing change.
 
        useless `if' statement is indeed required.
 
        Add useful comment in test script obsolete.test.
-       * tests/obsolte.test: Add a comment explaining why we need
+       * tests/obsolete.test: Add a comment explaining why we need
        an indirection in adding $AUTOUPDATE to $required.
 
        Normalize whitespaces in 'tests/Makefile.am'.
        changes, and a couple of unrelated cosmetic changes.
        * tests/recurs.test: Use the `configure.in' stub created by
        `./defs', rather than writing one from scratch.  Make grepping
-       of Automake stderr slighty stricter.
+       of Automake stderr slightly stricter.
        * tests/substtarg.test: Likewise.
        * tests/strip.test: Likewise, and move the call to `set -e'
        earlier (just after the inclusion of `./defs'). Also, make sure
        in ./defs).  Avoid potential problems with unpredictable make
        output.  Finally, make grepping of Makefile.in stricter.
        * tests/substre2.test: Ensure verbose printing of the captured
-       make's output, and make its grepping slighty stricter.
+       make's output, and make its grepping slightly stricter.
        * tests/cygwin32.test: Enable `errexit' shell flag, and related
        changes.  Also, do not create useless dummy source/data files.
        * tests/scripts.test: Likewise.
        here-doc, not using echo.
        * tests/pluseq10.test: Make sure that the captured output of
        `make' command is always displayed. Where possible, use $FGREP
-       instead of grep (this change makes some checks slighty stricter).
+       instead of grep (this change makes some checks slightly stricter).
        * tests/pluseq8.test: Enable `errexit' shell flag, with related
        changes.
        * tests/pluseq.test: Likewise.  Also, do not create useless dummy
        * tests/pluseq4.test: Likewise.
        * tests/pluseq6.test: Likewise.
        * tests/pluseq7.test: Do not create useless dummy source file.
-       * tests/pluseq9.test: Slighty extended w.r.t. the grepping of
+       * tests/pluseq9.test: Slightly extended w.r.t. the grepping of
        Automake stderr.  Some unrelated cosmetic changes.
 
        Testsuite: ensure verbose printing of captured stderr.
 2010-06-11  Stefano Lattarini  <stefano.lattarini@gmail.com>
 
        Improve determination of PATH separator in bootstrap script.
-       * bootstrap: Detemine what the PATH separator is the same way
+       * bootstrap: Determine what the PATH separator is the same way
        autoconf does.
 
        Minor improvements in bootstrap script.
        $AUTOMAKE, and improve the positioning of an $ACLOCAL call.
        * tests/exeext4.test: Use $FGREP instead of grep, where possible.
        Make auxiliary rules in the generated Makefile more silent.
-       These changes make some checks slighty stricter.
+       These changes make some checks slightly stricter.
        * tests/ext2.test: Call `Exit 1' if inclusion of `./defs' fails.
        * tests/gettext2.test: Place final `:' at the end of the script,
        rather than in the middle.
        * tests/python2.test: Improved verbose messages.
 
        Make test `ammissing.test' stricter.
-       * tests/ammissing.test: Fail if $ACLOCAL succeds unexpectedly.
+       * tests/ammissing.test: Fail if $ACLOCAL succeeds unexpectedly.
        Enable `errexit' shell flag.
 
 2010-06-08  Stefano Lattarini  <stefano.lattarini@gmail.com>
        * tests/nodep.test: Likewise.
        * tests/nodepcomp.test: Likewise.
        * tests/f90only.test: Likewise, and remove botched/obsoleted
-       comments and unecessary commands.
-       * tests/fonly.test: Likewise, and removed botched/obsolted
-       comments and unecessary commands.
+       comments and unnecessary commands.
+       * tests/fonly.test: Likewise, and remove botched/obsoleted
+       comments and unnecessary commands.
        * tests/discover.test: Likewise, and made stricter.
 
        Enable `errexit' shell flag in all tests cxx*.test.
        Extend test on `nostdinc' automake option.
        * tests/nostdinc.test: Enable `errexit' shell flag.  Related and
        unrelated minor changes.  Make the grepping of the generated
-       Makefile.in slighty stricter.  Generate and run configure, so that
+       Makefile.in slightly stricter.  Generate and run configure, so that
        the generated Makefile can be grepped too.
 
 2010-05-23  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
index aa31380..eb5b251 100644 (file)
        Makefile.am into DIST_COMMON here.
        * lib/am/configure.am (DIST_COMMON): Do it here, and use
        %MAKEFILE-AM% and %MAKEFILE-IN% so that items in DIST_COMMON
-       actually match the targets.   Prefix `configure' with `$(srcdir)/'
+       actually match the targets.  Prefix `configure' with `$(srcdir)/'
        to match the target.
        * tests/remake4.test: New file.
        * tests/Makefile.am (TESTS): Add remake4.test.
diff --git a/HACKING b/HACKING
index ee85917..a3e37f0 100644 (file)
--- a/HACKING
+++ b/HACKING
@@ -7,7 +7,6 @@
 * Don't put this file into the distribution.  Don't mention it in the
   ChangeLog.
 
-
 ================================================================
 = Administrivia
 
       texinfo.tex (bug-texinfo@gnu.org),
   Most of them are updated before release with `make fetch'.
 
-* Changes other than bug fixes must be mentioned in NEWS
-
+* Changes other than bug fixes must be mentioned in NEWS.  Important
+  bug fixes should be mentioned in NEWS, too.
 
 ================================================================
 = 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 is very new
-  (as of Feb 7 2001) and so it isn't yet universally used.  But all
-  new code should use it.
+  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.
   However, it turns out that NEWS-OS 4.2R complains if a Makefile
@@ -60,7 +59,7 @@
 * 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.
@@ -73,7 +72,6 @@
   "important" command it runs.  The printed commands should be preceded
   by a single space.
 
-
 ================================================================
 = Editing automake.in and aclocal.in
 
   &, just convert the old code as you work on it, and write new
   code without.
 
-* Perl 5 is now OK.
-
-
 ================================================================
-= Working with git/CVS
+= Working with git
 
 * To regenerate dependent files created by aclocal and automake,
   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.
+  automake and use it to generate those files.  Be sure to have the
+  latest stable version of Autoconf installed.  If such version is
+  not installed as "autoconf", pass it explicitly (along with the
+  accompanying "autom4te") when calling `bootstrap' and `configure'.
+  For example:
+    $ AUTOCONF=autoconf2.67 AUTOM4TE=autom4te2.67 ./bootstrap
+    $ ./configure AUTOCONF=autoconf2.67 AUTOM4TE=autom4te2.67
 
 * Dependent files aclocal.m4, configure and Makefile.in in all
   directories should be up to date in the git repository, so that
   the changes in them can be easily noticed and analyzed.
 
-* Avoid merge commits on the master branch of the public git repository.
-  For unpublished changes in your development tree, it's easiest to
-  rebase against the current master before applying them, this preserves
-  a linear history.
-
-* For changes to appear in more than one branch, apply them to the
-  master branch and then cherry-pick them to the stable branch from
-  master if possible.  This keeps the master uncluttered and preserves
-  meta-data on the stable branches.
-
+* The git tree currently carries a number of branches: master for the
+  current development, and release branches named branch-X.Y.  The maint
+  branch serves as common ground for both master and the active release
+  branches.  Changes intended for both should be applied to maint, which
+  should then be merged to release branches and master, of course after
+  suitable testing.  It is advisable to merge only after a set of related
+  commits have been applied.
+
+* Example work flow for patches to maint:
+
+  # 1. Checkout the "maint" branch:
+  git checkout maint
+
+  # 2. Apply the patch(es) with "git am" (or create them with $EDITOR):
+  git am -3 0*.patch
+  # 2a. Run required tests, if any ...
+
+  # 3. Merge maint into branch-1.11:
+  git checkout branch-1.11
+  git merge maint
+  # 3a. Run required tests, if any ...
+
+  # 4. Redo steps 3 and 3a for master:
+  git checkout master
+  git merge maint
+  # testing ...
+
+  # 5. Push the maint and master branches:
+  git push --dry-run origin maint branch-1.11 master
+  # if all seems ok, then actually push:
+  git push origin maint branch-1.11 master
+
+* 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
+  introduced the bug.  Then this "bugfix branch" can be merged into all
+  the active branches descending from the buggy commit.  This offers a
+  simple way to fix the bug consistently and effectively.
+
+* When referring to older commits, use 'git describe' output as pointer.
+
+* 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 be merged later.  The next branch may serve as
+  common ground for feature merging and testing, should they not be ready
+  for master yet.
+
+* 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.
+
+* 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.
+
+* In order for rebasing and merging of ChangeLog entries to work seamlessly,
+  install and configure git-merge-changelog, currently available as gnulib
+  module.
 
 ================================================================
 = Test suite
 
-* Use "make check" and "make maintainer-check" liberally
+* Use "make check" and "make maintainer-check" liberally.
 
-* Make sure each test file is executable
+* Make sure each test file is executable.
 
 * Use `keep_testdirs=yes' to keep test directories for successful
   tests also.
 
+* See file `tests/README' for more information.
+
 ================================================================
 = Release procedure
 
index bbcc882..d19d974 100644 (file)
@@ -70,6 +70,8 @@ uninstall-hook:
 do_subst = sed \
   -e 's,[@]APIVERSION[@],$(APIVERSION),g' \
   -e 's,[@]PACKAGE[@],$(PACKAGE),g' \
+  -e 's,[@]PACKAGE_BUGREPORT[@],$(PACKAGE_BUGREPORT),g' \
+  -e 's,[@]PACKAGE_URL[@],$(PACKAGE_URL),g' \
   -e 's,[@]PATH_SEPARATOR[@],$(PATH_SEPARATOR),g' \
   -e 's,[@]PERL[@],$(PERL),g' \
   -e 's,[@]PERL_THREADS[@],$(PERL_THREADS),g' \
@@ -138,6 +140,7 @@ sc_tests_required_after_defs \
 sc_tests_overriding_macros_on_cmdline \
 sc_tests_plain_sleep \
 sc_tests_plain_egrep_fgrep \
+sc_tests_PATH_SEPARATOR \
 sc_mkdir_p \
 sc_perl_at_substs \
 sc_unquoted_DESTDIR \
@@ -149,10 +152,10 @@ $(syntax_check_rules): automake aclocal
 maintainer-check: $(syntax_check_rules)
 
 ## This check avoids accidental configure substitutions in the source.
-## There are exactly 6 lines that should be modified.  This works out
-## to 22 lines of diffs.
+## There are exactly 8 lines that should be modified.  This works out
+## to 28 lines of diffs.
 sc_diff_automake_in_automake:
-       @if test `diff $(srcdir)/automake.in automake | wc -l` -ne 22; then \
+       @if test `diff $(srcdir)/automake.in automake | wc -l` -ne 28; then \
          echo "found too many diffs between automake.in and automake" 1>&2; \
          diff -c $(srcdir)/automake.in automake; \
          exit 1; \
@@ -407,6 +410,13 @@ sc_tests_plain_egrep_fgrep:
          exit 1; \
        fi
 
+## Using `:' as a PATH separator is not portable.
+sc_tests_PATH_SEPARATOR:
+       @if grep -E '\bPATH=.*:.*' $(srcdir)/tests/*.test ; then \
+         echo "Use \`$$PATH_SEPARATOR', not \`:', in PATH definitions above." 1>&2; \
+         exit 1; \
+       fi
+
 sc_mkdir_p:
        @if grep 'mkdir_p' $(srcdir)/automake.in \
              $(srcdir)/lib/am/*.am $(srcdir)/tests/*.test; then \
index e9a032b..25d580d 100644 (file)
@@ -2,7 +2,7 @@
 # @configure_input@
 
 # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010  Free Software
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
 # Foundation, Inc.
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -255,6 +255,8 @@ EXTRA_DIST = \
 do_subst = sed \
   -e 's,[@]APIVERSION[@],$(APIVERSION),g' \
   -e 's,[@]PACKAGE[@],$(PACKAGE),g' \
+  -e 's,[@]PACKAGE_BUGREPORT[@],$(PACKAGE_BUGREPORT),g' \
+  -e 's,[@]PACKAGE_URL[@],$(PACKAGE_URL),g' \
   -e 's,[@]PATH_SEPARATOR[@],$(PATH_SEPARATOR),g' \
   -e 's,[@]PERL[@],$(PERL),g' \
   -e 's,[@]PERL_THREADS[@],$(PERL_THREADS),g' \
@@ -296,6 +298,7 @@ sc_tests_required_after_defs \
 sc_tests_overriding_macros_on_cmdline \
 sc_tests_plain_sleep \
 sc_tests_plain_egrep_fgrep \
+sc_tests_PATH_SEPARATOR \
 sc_mkdir_p \
 sc_perl_at_substs \
 sc_unquoted_DESTDIR \
@@ -724,10 +727,15 @@ install-am: all-am
 
 installcheck: installcheck-recursive
 install-strip:
-       $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
-         install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
-         `test -z '$(STRIP)' || \
-           echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+       if test -z '$(STRIP)'; then \
+         $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+           install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+             install; \
+       else \
+         $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+           install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+           "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
+       fi
 mostlyclean-generic:
 
 clean-generic:
@@ -873,7 +881,7 @@ $(syntax_check_rules): automake aclocal
 maintainer-check: $(syntax_check_rules)
 
 sc_diff_automake_in_automake:
-       @if test `diff $(srcdir)/automake.in automake | wc -l` -ne 22; then \
+       @if test `diff $(srcdir)/automake.in automake | wc -l` -ne 28; then \
          echo "found too many diffs between automake.in and automake" 1>&2; \
          diff -c $(srcdir)/automake.in automake; \
          exit 1; \
@@ -1088,6 +1096,12 @@ sc_tests_plain_egrep_fgrep:
          exit 1; \
        fi
 
+sc_tests_PATH_SEPARATOR:
+       @if grep -E '\bPATH=.*:.*' $(srcdir)/tests/*.test ; then \
+         echo "Use \`$$PATH_SEPARATOR', not \`:', in PATH definitions above." 1>&2; \
+         exit 1; \
+       fi
+
 sc_mkdir_p:
        @if grep 'mkdir_p' $(srcdir)/automake.in \
              $(srcdir)/lib/am/*.am $(srcdir)/tests/*.test; then \
diff --git a/NEWS b/NEWS
index b8a0f08..b5cb6e9 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -19,6 +19,9 @@ Bugs fixed in 1.11.0a:
 
   - The `dist-xz' option now uses `xz -9' for maximum compression.
 
+  - The AM_COND_IF macro also works if the shell expression for the conditional
+    is no longer valid for the condition.
+
 * Long standing bugs:
 
   - On Darwin 9, `pythondir' and `pyexecdir' pointed below `/Library/Python'
@@ -42,6 +45,17 @@ Bugs fixed in 1.11.0a:
   - The order of Yacc and Lex flags is fixed to be consistent with other
     languages: $(AM_YFLAGS) comes before $(YFLAGS), and $(AM_LFLAGS) before
     $(LFLAGS), so that the user variables override the developer variables.
+
+  - Rules generated by Automake now try harder to not change any files when
+    `make -n' is invoked.  Fixes include compilation of Emacs Lisp, Vala, or
+    Yacc source files and the rule to update config.h.
+
+  - The code for automatic dependency tracking works around a Solaris
+    make bug triggered by sources containing repeated slashes when the
+    `subdir-objects' option was used.
+
+  - The parallel-tests driver now does not produce erroneous results
+    with Tru64/OSF 5.1 sh upon unreadable log files any more.
 \f
 New in 1.11:
 
@@ -1514,7 +1528,8 @@ New in 0.20:
 -----
 
 Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003,
-2004, 2005, 2006, 2007  Free Software Foundation, Inc.
+2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011  Free Software
+Foundation, Inc.
 
 This 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/README b/README
index de361be..eb49e71 100644 (file)
--- a/README
+++ b/README
@@ -43,7 +43,7 @@ autotools-announce-request@gnu.org if you want to receive them.
 
 -----
 
-Copyright (C) 1994, 1995, 1996, 1997, 1998, 2001, 2003
+Copyright (C) 1994, 1995, 1996, 1997, 1998, 2001, 2003, 2008, 2009, 2011
   Free Software Foundation, Inc.
 
 This program is free software; you can redistribute it and/or modify
diff --git a/THANKS b/THANKS
index fe91cbe..78da1de 100644 (file)
--- a/THANKS
+++ b/THANKS
@@ -22,6 +22,7 @@ Andreas Schwab                schwab@suse.de
 Andrew Cagney          cagney@tpgi.com.au
 Andrew Suffield                asuffield@debian.org
 Andris Pavenis         pavenis@lanet.lv
+Andy Wingo             wingo@pobox.com
 Angus Leeming          a.leeming@ic.ac.uk
 Anthony Green          green@cygnus.com
 Antonio Diaz Diaz      ant_diaz@teleline.es
@@ -193,6 +194,7 @@ Laurent Morichetti  laurentm@cup.hp.com
 Leo Davis              ldavis@fonix.com
 Leonardo Boiko         leoboiko@conectiva.com.br
 Loulou Pouchet         loulou@lrde.epita.fr
+Ludovic Courtès               ludo@gnu.org
 Luo Yi                 luoyi.ly@gmail.com
 Maciej Stachowiak      mstachow@mit.edu
 Maciej W. Rozycki      macro@ds2.pg.gda.pl
@@ -333,6 +335,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 Klausner                tk@giga.or.at
 Thomas Morgan          tmorgan@pobox.com
 Thomas Schwinge                tschwinge@gnu.org
 Thomas Tanner          tanner@ffii.org
index dc84762..2210fe3 100644 (file)
@@ -8,7 +8,8 @@ eval 'case $# in 0) exec @PERL@ -S "$0";; *) exec @PERL@ -S "$0" "$@";; esac'
 # aclocal - create aclocal.m4 by scanning configure.ac
 
 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
-# 2005, 2006, 2007, 2008, 2009, 2010  Free Software Foundation, Inc.
+# 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation,
+# Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -818,7 +819,8 @@ $output";
   $output = "# generated automatically by aclocal $VERSION -*- Autoconf -*-
 
 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
-# 2005, 2006, 2007, 2008, 2009, 2010  Free Software Foundation, Inc.
+# 2005, 2006, 2007, 2008, 2009, 2010, 2011 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.
@@ -897,7 +899,10 @@ Warning categories include:
   `none'          turn off all the warnings
   `error'         treat warnings as errors
 
-Report bugs to <bug-automake\@gnu.org>.\n";
+" . 'Report bugs to <@PACKAGE_BUGREPORT@>.
+GNU Automake home page: <@PACKAGE_URL@>.
+General help using GNU software: <http://www.gnu.org/gethelp/>.
+';
 
   exit $status;
 }
@@ -907,7 +912,7 @@ sub version()
 {
   print <<EOF;
 aclocal (GNU $PACKAGE) $VERSION
-Copyright (C) 2010 Free Software Foundation, Inc.
+Copyright (C) 2011 Free Software Foundation, Inc.
 License GPLv2+: GNU GPL version 2 or later <http://gnu.org/licenses/gpl-2.0.html>
 This is free software: you are free to change and redistribute it.
 There is NO WARRANTY, to the extent permitted by law.
index d7cbc11..f60cbdb 100644 (file)
@@ -1,7 +1,8 @@
 # generated automatically by aclocal 1.11 -*- Autoconf -*-
 
 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
-# 2005, 2006, 2007, 2008, 2009, 2010  Free Software Foundation, Inc.
+# 2005, 2006, 2007, 2008, 2009, 2010, 2011 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.
@@ -13,8 +14,8 @@
 
 m4_ifndef([AC_AUTOCONF_VERSION],
   [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
-m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.65],,
-[m4_warning([this file was generated for autoconf 2.65.
+m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.68],,
+[m4_warning([this file was generated for autoconf 2.68.
 You have another version of autoconf.  It may work, but is not guaranteed to.
 If you have problems, you may need to regenerate the build system entirely.
 To do so, use the procedure documented by the package, typically `autoreconf'.])])
index 3b67405..d56fbf7 100755 (executable)
@@ -7,7 +7,7 @@ eval 'case $# in 0) exec @PERL@ -S "$0";; *) exec @PERL@ -S "$0" "$@";; esac'
 
 # automake - create Makefile.in from Makefile.am
 # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010  Free Software
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
 # Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
@@ -258,7 +258,7 @@ my %standard_prefix =
 # Copyright on generated Makefile.ins.
 my $gen_copyright = "\
 # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010  Free Software
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
 # Foundation, Inc.
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -1369,7 +1369,7 @@ sub handle_languages
 
     my %done;
 
-    # Is the c linker needed?
+    # Is the C linker needed?
     my $needs_c = 0;
     foreach my $ext (sort keys %extension_seen)
     {
@@ -1991,7 +1991,7 @@ sub handle_single_transform ($$$$$%)
 
                # Each item on this list is a reference to a list consisting
                # of four values followed by additional transform flags for
-               # file_contents.   The four values are the derived flag prefix
+               # file_contents.  The four values are the derived flag prefix
                # (e.g. for `foo_CFLAGS', it is `foo'), the name of the
                # source file, the base name of the output file, and
                # the extension for the object file.
@@ -2108,14 +2108,24 @@ sub handle_single_transform ($$$$$%)
 
        # Transform .o or $o file into .P file (for automatic
        # dependency code).
-       if ($lang && $lang->autodep ne 'no')
-       {
-           my $depfile = $object;
-           $depfile =~ s/\.([^.]*)$/.P$1/;
-           $depfile =~ s/\$\(OBJEXT\)$/o/;
-           $dep_files{dirname ($depfile) . '/$(DEPDIR)/'
-                        . basename ($depfile)} = 1;
-       }
+        # Properly flatten multiple adjacent slashes, as Solaris 10 make
+        # might fail over them in an include statement.
+        # Leading double slashes may be special, as per Posix, so deal
+        # with them carefully.
+        if ($lang && $lang->autodep ne 'no')
+        {
+            my $depfile = $object;
+            $depfile =~ s/\.([^.]*)$/.P$1/;
+            $depfile =~ s/\$\(OBJEXT\)$/o/;
+            my $maybe_extra_leading_slash = '';
+            $maybe_extra_leading_slash = '/' if $depfile =~ m,^//[^/],;
+            $depfile =~ s,/+,/,g;
+            my $basename = basename ($depfile);
+            # This might make $dirname empty, but we account for that below.
+            (my $dirname = dirname ($depfile)) =~ s/\/*$//;
+            $dirname = $maybe_extra_leading_slash . $dirname;
+            $dep_files{$dirname . '/$(DEPDIR)/' . $basename} = 1;
+        }
     }
 
     return @result;
@@ -2325,7 +2335,7 @@ sub handle_lib_objects
           if ($val !~ /^-[lL]/ &&
               # Skip -dlopen and -dlpreopen; these are explicitly allowed
               # for Libtool libraries or programs.  (Actually we are a bit
-              # laxe here since this code also applies to non-libtool
+              # lax here since this code also applies to non-libtool
               # libraries or programs, for which -dlopen and -dlopreopen
               # are pure nonsense.  Diagnosing this doesn't seem very
               # important: the developer will quickly get complaints from
@@ -2566,7 +2576,8 @@ sub handle_compile ()
            require_file ($ansi2knr_where, FOREIGN,
                          'ansi2knr.c', 'ansi2knr.1');
 
-           # ansi2knr needs to be built before subdirs, so unshift it.
+           # ansi2knr needs to be built before subdirs, so unshift it
+           # rather then pushing it.
            unshift (@all, '$(ANSI2KNR)');
          }
        else
@@ -3178,7 +3189,7 @@ sub scan_texinfo_file ($)
 # ------------------------------------------------------------------
 # SOURCE - the source Texinfo file
 # DEST - the destination Info file
-# INSRC - wether DEST should be built in the source tree
+# INSRC - whether DEST should be built in the source tree
 # DEPENDENCIES - known dependencies
 sub output_texinfo_build_rules ($$$@)
 {
@@ -4159,7 +4170,7 @@ sub prepend_srcdir (@)
 # Compute a list of dependencies appropriate for the rebuild
 # rule of
 #   AC_CONFIG_FILES($OUTPUT:$INPUT[0]:$INPUTS[1]:...)
-# Also distribute $INPUTs which are not built by another AC_CONFIG_FOOS.
+# Also distribute $INPUTs which are not built by another AC_CONFIG_FOOs.
 sub rewrite_inputs_into_dependencies ($@)
 {
   my ($file, @inputs) = @_;
@@ -5954,11 +5965,11 @@ sub lang_vala_finish_target ($$)
     {
       foreach my $file ($var->value_as_list_recursive)
         {
-          $output_rules .= "\$(srcdir)/$file: \$(srcdir)/${derived}_vala.stamp\n".
-            "\t\@if test -f \$@; then :; else \\\n".
-            "\t  rm -f \$(srcdir)/${derived}_vala.stamp; \\\n".
-            "\t  \$(am__cd) \$(srcdir) && \$(MAKE) \$(AM_MAKEFLAGS) ${derived}_vala.stamp; \\\n".
-            "\tfi\n"
+          $output_rules .= "\$(srcdir)/$file: \$(srcdir)/${derived}_vala.stamp\n"
+            . "\t\@if test -f \$@; then :; else rm -f \$(srcdir)/${derived}_vala.stamp; fi\n"
+            . "\t\@if test -f \$@; then :; else \\\n"
+            . "\t  \$(am__cd) \$(srcdir) && \$(MAKE) \$(AM_MAKEFLAGS) ${derived}_vala.stamp; \\\n"
+           . "\tfi\n"
             if $file =~ s/(.*)\.vala$/$1.c/;
         }
     }
@@ -5974,11 +5985,11 @@ sub lang_vala_finish_target ($$)
                                  '--vapi', '--internal-vapi', '--gir')))
            {
              my $headerfile = $flag;
-             $output_rules .= "\$(srcdir)/$headerfile: \$(srcdir)/${derived}_vala.stamp\n".
-               "\t\@if test -f \$@; then :; else \\\n".
-               "\t  rm -f \$(srcdir)/${derived}_vala.stamp; \\\n".
-               "\t  \$(am__cd) \$(srcdir) && \$(MAKE) \$(AM_MAKEFLAGS) ${derived}_vala.stamp; \\\n".
-               "\tfi\n";
+             $output_rules .= "\$(srcdir)/$headerfile: \$(srcdir)/${derived}_vala.stamp\n"
+               . "\t\@if test -f \$@; then :; else rm -f \$(srcdir)/${derived}_vala.stamp; fi\n"
+               . "\t\@if test -f \$@; then :; else \\\n"
+               . "\t  \$(am__cd) \$(srcdir) && \$(MAKE) \$(AM_MAKEFLAGS) ${derived}_vala.stamp; \\\n"
+               "\tfi\n";
 
              # valac is not used when building from dist tarballs
              # distribute the generated files
@@ -6073,10 +6084,8 @@ sub lang_yacc_target_hook
            $output_rules .=
              "$condstr${header}: $output\n"
              # Recover from removal of $header
-             . "$condstr\t\@if test ! -f \$@; then \\\n"
-             . "$condstr\t  rm -f $output; \\\n"
-             . "$condstr\t  \$(MAKE) \$(AM_MAKEFLAGS) $output; \\\n"
-             . "$condstr\telse :; fi\n";
+             . "$condstr\t\@if test ! -f \$@; then rm -f $output; else :; fi\n"
+             . "$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
@@ -8378,7 +8387,11 @@ Library files:
        write;
     }
 
-    print "\nReport bugs to <bug-automake\@gnu.org>.\n";
+    print '
+Report bugs to <@PACKAGE_BUGREPORT@>.
+GNU Automake home page: <@PACKAGE_URL@>.
+General help using GNU software: <http://www.gnu.org/gethelp/>.
+';
 
     # --help always returns 0 per GNU standards.
     exit 0;
@@ -8392,7 +8405,7 @@ sub version ()
 {
   print <<EOF;
 automake (GNU $PACKAGE) $VERSION
-Copyright (C) 2010 Free Software Foundation, Inc.
+Copyright (C) 2011 Free Software Foundation, Inc.
 License GPLv2+: GNU GPL version 2 or later <http://gnu.org/licenses/gpl-2.0.html>
 This is free software: you are free to change and redistribute it.
 There is NO WARRANTY, to the extent permitted by law.
index 7766bd3..9f1a8d8 100755 (executable)
--- a/bootstrap
+++ b/bootstrap
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
-# Find the path separator.
-# (Snippet copied from configure's initialization in Autoconf 2.65)
-if test "${PATH_SEPARATOR+set}" != set; then
-  PATH_SEPARATOR=:
-  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
-    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
-      PATH_SEPARATOR=';'
-  }
-fi
-
 # Don't ignore failures.
 set -e
 
 # Set program basename.
 me=`echo "$0" | sed 's,^.*/,,'`
 
-# Find perl.  Code based on Autoconf, but without non-POSIX support.
-if test -z "$PERL"; then
-  save_IFS=$IFS
-  IFS=$PATH_SEPARATOR
-  for dir in $PATH; do
-    IFS=$save_IFS
-    test -z "$dir" && dir=.
-    if test -x "$dir/perl" && test ! -d "$dir/perl"; then
-      PERL="$dir/perl"
-      break
-    fi
-  done
-fi
-
-if test -z "$PERL"; then
-  echo "$me: cannot find perl" >&2
-  exit 1
-fi
+# Let user choose which version of autoconf, autom4te and perl to use.
+: ${AUTOCONF=autoconf}
+export AUTOCONF  # might be used by aclocal and/or automake
+: ${AUTOM4TE=autom4te}
+export AUTOM4TE  # ditto
+: ${PERL=perl}
 
 # Variables to substitute.
 VERSION=`sed -ne '/AC_INIT/s/^[^[]*\[[^[]*\[\([^]]*\)\].*$/\1/p' configure.ac`
@@ -71,7 +49,7 @@ fi
 
 # Read the rule for calculating APIVERSION and execute it.
 apiver_cmd=`sed -ne 's/\[\[/[/g;s/\]\]/]/g;/^APIVERSION=/p' configure.ac`
-eval $apiver_cmd
+eval "$apiver_cmd"
 
 # Sanity checks.
 if test -z "$VERSION"; then
@@ -80,7 +58,7 @@ if test -z "$VERSION"; then
 fi
 
 if test -z "$APIVERSION"; then
-  echo "$me: cannot find VERSION" >&2
+  echo "$me: cannot find APIVERSION" >&2
   exit 1
 fi
 
@@ -112,7 +90,6 @@ dosubst ()
   chmod a-w $2
 }
 
-
 # Create temporary replacement for lib/Automake/Config.pm.
 dosubst automake-$APIVERSION/Automake/Config.in \
         automake-$APIVERSION/Automake/Config.pm
@@ -133,10 +110,9 @@ cd ..
 
 # Run the autotools.
 $PERL ./aclocal.tmp -I m4
-autoconf
+$AUTOCONF
 $PERL ./automake.tmp
 
 # Remove temporary files and directories.
 rm -rf aclocal-$APIVERSION automake-$APIVERSION
 rm -f aclocal.tmp automake.tmp
-rm -f lib/Automake/Config.pm
index 51287f5..5af3df8 100755 (executable)
--- a/configure
+++ b/configure
@@ -1,13 +1,13 @@
 #! /bin/sh
 # Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.65 for GNU Automake 1.11.
+# Generated by GNU Autoconf 2.68 for GNU Automake 1.11.
 #
 # Report bugs to <bug-automake@gnu.org>.
 #
 #
 # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
-# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
-# Inc.
+# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software
+# Foundation, Inc.
 #
 #
 # This configure script is free software; the Free Software Foundation
@@ -91,6 +91,7 @@ fi
 IFS=" ""       $as_nl"
 
 # Find who we are.  Look in the path if we contain no directory separator.
+as_myself=
 case $0 in #((
   *[\\/]* ) as_myself=$0 ;;
   *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
@@ -216,11 +217,18 @@ IFS=$as_save_IFS
   # We cannot yet assume a decent shell, so we have to provide a
        # neutralization value for shells without unset; and this also
        # works around shells that cannot unset nonexistent variables.
+       # Preserve -v and -x to the replacement shell.
        BASH_ENV=/dev/null
        ENV=/dev/null
        (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
        export CONFIG_SHELL
-       exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"}
+       case $- in # ((((
+         *v*x* | *x*v* ) as_opts=-vx ;;
+         *v* ) as_opts=-v ;;
+         *x* ) as_opts=-x ;;
+         * ) as_opts= ;;
+       esac
+       exec "$CONFIG_SHELL" $as_opts "$as_myself" ${1+"$@"}
 fi
 
     if test x$as_have_required = xno; then :
@@ -319,7 +327,7 @@ $as_echo X"$as_dir" |
       test -d "$as_dir" && break
     done
     test -z "$as_dirs" || eval "mkdir $as_dirs"
-  } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir"
+  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
 
 
 } # as_fn_mkdir_p
@@ -359,19 +367,19 @@ else
 fi # as_fn_arith
 
 
-# as_fn_error ERROR [LINENO LOG_FD]
-# ---------------------------------
+# as_fn_error STATUS ERROR [LINENO LOG_FD]
+# ----------------------------------------
 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
-# script with status $?, using 1 if that was 0.
+# script with STATUS, using 1 if that was 0.
 as_fn_error ()
 {
-  as_status=$?; test $as_status -eq 0 && as_status=1
-  if test "$3"; then
-    as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
-    $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3
+  as_status=$1; test $as_status -eq 0 && as_status=1
+  if test "$4"; then
+    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
   fi
-  $as_echo "$as_me: error: $1" >&2
+  $as_echo "$as_me: error: $2" >&2
   as_fn_exit $as_status
 } # as_fn_error
 
@@ -533,7 +541,7 @@ test -n "$DJDIR" || exec 7<&0 </dev/null
 exec 6>&1
 
 # Name of the host.
-# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
+# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
 # so uname gets run too.
 ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
 
@@ -708,8 +716,9 @@ do
   fi
 
   case $ac_option in
-  *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
-  *)   ac_optarg=yes ;;
+  *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
+  *=)   ac_optarg= ;;
+  *)    ac_optarg=yes ;;
   esac
 
   # Accept the important Cygnus configure options, so we can diagnose typos.
@@ -754,7 +763,7 @@ do
     ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
     # Reject names that are not valid shell variable names.
     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
-      as_fn_error "invalid feature name: $ac_useropt"
+      as_fn_error $? "invalid feature name: $ac_useropt"
     ac_useropt_orig=$ac_useropt
     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
     case $ac_user_opts in
@@ -780,7 +789,7 @@ do
     ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
     # Reject names that are not valid shell variable names.
     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
-      as_fn_error "invalid feature name: $ac_useropt"
+      as_fn_error $? "invalid feature name: $ac_useropt"
     ac_useropt_orig=$ac_useropt
     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
     case $ac_user_opts in
@@ -984,7 +993,7 @@ do
     ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
     # Reject names that are not valid shell variable names.
     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
-      as_fn_error "invalid package name: $ac_useropt"
+      as_fn_error $? "invalid package name: $ac_useropt"
     ac_useropt_orig=$ac_useropt
     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
     case $ac_user_opts in
@@ -1000,7 +1009,7 @@ do
     ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
     # Reject names that are not valid shell variable names.
     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
-      as_fn_error "invalid package name: $ac_useropt"
+      as_fn_error $? "invalid package name: $ac_useropt"
     ac_useropt_orig=$ac_useropt
     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
     case $ac_user_opts in
@@ -1030,8 +1039,8 @@ do
   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
     x_libraries=$ac_optarg ;;
 
-  -*) as_fn_error "unrecognized option: \`$ac_option'
-Try \`$0 --help' for more information."
+  -*) as_fn_error $? "unrecognized option: \`$ac_option'
+Try \`$0 --help' for more information"
     ;;
 
   *=*)
@@ -1039,7 +1048,7 @@ Try \`$0 --help' for more information."
     # Reject names that are not valid shell variable names.
     case $ac_envvar in #(
       '' | [0-9]* | *[!_$as_cr_alnum]* )
-      as_fn_error "invalid variable name: \`$ac_envvar'" ;;
+      as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
     esac
     eval $ac_envvar=\$ac_optarg
     export $ac_envvar ;;
@@ -1049,7 +1058,7 @@ Try \`$0 --help' for more information."
     $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
     expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
       $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
-    : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
+    : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
     ;;
 
   esac
@@ -1057,13 +1066,13 @@ done
 
 if test -n "$ac_prev"; then
   ac_option=--`echo $ac_prev | sed 's/_/-/g'`
-  as_fn_error "missing argument to $ac_option"
+  as_fn_error $? "missing argument to $ac_option"
 fi
 
 if test -n "$ac_unrecognized_opts"; then
   case $enable_option_checking in
     no) ;;
-    fatal) as_fn_error "unrecognized options: $ac_unrecognized_opts" ;;
+    fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
     *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
   esac
 fi
@@ -1086,7 +1095,7 @@ do
     [\\/$]* | ?:[\\/]* )  continue;;
     NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
   esac
-  as_fn_error "expected an absolute directory name for --$ac_var: $ac_val"
+  as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
 done
 
 # There might be people who depend on the old broken behavior: `$host'
@@ -1100,8 +1109,8 @@ target=$target_alias
 if test "x$host_alias" != x; then
   if test "x$build_alias" = x; then
     cross_compiling=maybe
-    $as_echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
-    If a cross compiler is detected then cross compile mode will be used." >&2
+    $as_echo "$as_me: WARNING: if you wanted to set the --build type, don't use --host.
+    If a cross compiler is detected then cross compile mode will be used" >&2
   elif test "x$build_alias" != "x$host_alias"; then
     cross_compiling=yes
   fi
@@ -1116,9 +1125,9 @@ test "$silent" = yes && exec 6>/dev/null
 ac_pwd=`pwd` && test -n "$ac_pwd" &&
 ac_ls_di=`ls -di .` &&
 ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
-  as_fn_error "working directory cannot be determined"
+  as_fn_error $? "working directory cannot be determined"
 test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
-  as_fn_error "pwd does not report name of working directory"
+  as_fn_error $? "pwd does not report name of working directory"
 
 
 # Find the source files, if location was not specified.
@@ -1157,11 +1166,11 @@ else
 fi
 if test ! -r "$srcdir/$ac_unique_file"; then
   test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
-  as_fn_error "cannot find sources ($ac_unique_file) in $srcdir"
+  as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
 fi
 ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
 ac_abs_confdir=`(
-       cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error "$ac_msg"
+       cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
        pwd)`
 # When building in place, set srcdir=.
 if test "$ac_abs_confdir" = "$ac_pwd"; then
@@ -1201,7 +1210,7 @@ Configuration:
       --help=short        display options specific to this package
       --help=recursive    display the short help of all the included packages
   -V, --version           display version information and exit
-  -q, --quiet, --silent   do not print \`checking...' messages
+  -q, --quiet, --silent   do not print \`checking ...' messages
       --cache-file=FILE   cache test results in FILE [disabled]
   -C, --config-cache      alias for \`--cache-file=config.cache'
   -n, --no-create         do not create output files
@@ -1326,9 +1335,9 @@ test -n "$ac_init_help" && exit $ac_status
 if $ac_init_version; then
   cat <<\_ACEOF
 GNU Automake configure 1.11
-generated by GNU Autoconf 2.65
+generated by GNU Autoconf 2.68
 
-Copyright (C) 2009 Free Software Foundation, Inc.
+Copyright (C) 2010 Free Software Foundation, Inc.
 This configure script is free software; the Free Software Foundation
 gives unlimited permission to copy, distribute and modify it.
 _ACEOF
@@ -1343,7 +1352,7 @@ 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.11, which was
-generated by GNU Autoconf 2.65.  Invocation command line was
+generated by GNU Autoconf 2.68.  Invocation command line was
 
   $ $0 $@
 
@@ -1453,11 +1462,9 @@ trap 'exit_status=$?
   {
     echo
 
-    cat <<\_ASBOX
-## ---------------- ##
+    $as_echo "## ---------------- ##
 ## Cache variables. ##
-## ---------------- ##
-_ASBOX
+## ---------------- ##"
     echo
     # The following way of writing the cache mishandles newlines in values,
 (
@@ -1491,11 +1498,9 @@ $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
 )
     echo
 
-    cat <<\_ASBOX
-## ----------------- ##
+    $as_echo "## ----------------- ##
 ## Output variables. ##
-## ----------------- ##
-_ASBOX
+## ----------------- ##"
     echo
     for ac_var in $ac_subst_vars
     do
@@ -1508,11 +1513,9 @@ _ASBOX
     echo
 
     if test -n "$ac_subst_files"; then
-      cat <<\_ASBOX
-## ------------------- ##
+      $as_echo "## ------------------- ##
 ## File substitutions. ##
-## ------------------- ##
-_ASBOX
+## ------------------- ##"
       echo
       for ac_var in $ac_subst_files
       do
@@ -1526,11 +1529,9 @@ _ASBOX
     fi
 
     if test -s confdefs.h; then
-      cat <<\_ASBOX
-## ----------- ##
+      $as_echo "## ----------- ##
 ## confdefs.h. ##
-## ----------- ##
-_ASBOX
+## ----------- ##"
       echo
       cat confdefs.h
       echo
@@ -1585,7 +1586,12 @@ _ACEOF
 ac_site_file1=NONE
 ac_site_file2=NONE
 if test -n "$CONFIG_SITE"; then
-  ac_site_file1=$CONFIG_SITE
+  # We do not want a PATH search for config.site.
+  case $CONFIG_SITE in #((
+    -*)  ac_site_file1=./$CONFIG_SITE;;
+    */*) ac_site_file1=$CONFIG_SITE;;
+    *)   ac_site_file1=./$CONFIG_SITE;;
+  esac
 elif test "x$prefix" != xNONE; then
   ac_site_file1=$prefix/share/config.site
   ac_site_file2=$prefix/etc/config.site
@@ -1600,7 +1606,11 @@ do
     { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
 $as_echo "$as_me: loading site script $ac_site_file" >&6;}
     sed 's/^/| /' "$ac_site_file" >&5
-    . "$ac_site_file"
+    . "$ac_site_file" \
+      || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "failed to load site script $ac_site_file
+See \`config.log' for more details" "$LINENO" 5; }
   fi
 done
 
@@ -1676,7 +1686,7 @@ if $ac_cache_corrupted; then
 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
   { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
-  as_fn_error "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
+  as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
 fi
 ## -------------------- ##
 ## Main body of script. ##
@@ -1691,18 +1701,26 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
 
 
 
+
+
 ac_aux_dir=
 for ac_dir in lib "$srcdir"/lib; do
-  for ac_t in install-sh install.sh shtool; do
-    if test -f "$ac_dir/$ac_t"; then
-      ac_aux_dir=$ac_dir
-      ac_install_sh="$ac_aux_dir/$ac_t -c"
-      break 2
-    fi
-  done
+  if test -f "$ac_dir/install-sh"; then
+    ac_aux_dir=$ac_dir
+    ac_install_sh="$ac_aux_dir/install-sh -c"
+    break
+  elif test -f "$ac_dir/install.sh"; then
+    ac_aux_dir=$ac_dir
+    ac_install_sh="$ac_aux_dir/install.sh -c"
+    break
+  elif test -f "$ac_dir/shtool"; then
+    ac_aux_dir=$ac_dir
+    ac_install_sh="$ac_aux_dir/shtool install -c"
+    break
+  fi
 done
 if test -z "$ac_aux_dir"; then
-  as_fn_error "cannot find install-sh, install.sh, or shtool in lib \"$srcdir\"/lib" "$LINENO" 5
+  as_fn_error $? "cannot find install-sh, install.sh, or shtool in lib \"$srcdir\"/lib" "$LINENO" 5
 fi
 
 # These three variables are undocumented and unsupported,
@@ -1717,27 +1735,27 @@ ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
 
 # Make sure we can run config.sub.
 $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
-  as_fn_error "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
+  as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
 
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
 $as_echo_n "checking build system type... " >&6; }
-if test "${ac_cv_build+set}" = set; then :
+if ${ac_cv_build+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   ac_build_alias=$build_alias
 test "x$ac_build_alias" = x &&
   ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
 test "x$ac_build_alias" = x &&
-  as_fn_error "cannot guess build type; you must specify one" "$LINENO" 5
+  as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
-  as_fn_error "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
+  as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
 
 fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
 $as_echo "$ac_cv_build" >&6; }
 case $ac_cv_build in
 *-*-*) ;;
-*) as_fn_error "invalid value of canonical build" "$LINENO" 5;;
+*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
 esac
 build=$ac_cv_build
 ac_save_IFS=$IFS; IFS='-'
@@ -1781,7 +1799,7 @@ am__api_version='1.11'
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
 $as_echo_n "checking for a BSD-compatible install... " >&6; }
 if test -z "$INSTALL"; then
-if test "${ac_cv_path_install+set}" = set; then :
+if ${ac_cv_path_install+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
@@ -1865,11 +1883,11 @@ am_lf='
 '
 case `pwd` in
   *[\\\"\#\$\&\'\`$am_lf]*)
-    as_fn_error "unsafe absolute working directory name" "$LINENO" 5;;
+    as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5;;
 esac
 case $srcdir in
   *[\\\"\#\$\&\'\`$am_lf\ \    ]*)
-    as_fn_error "unsafe srcdir value: \`$srcdir'" "$LINENO" 5;;
+    as_fn_error $? "unsafe srcdir value: \`$srcdir'" "$LINENO" 5;;
 esac
 
 # Do `set' in a subshell so we don't clobber the current shell's
@@ -1893,7 +1911,7 @@ if (
        # if, for instance, CONFIG_SHELL is bash and it inherits a
        # broken ls alias from the environment.  This has actually
        # happened.  Such a system could not be considered "sane".
-       as_fn_error "ls -t appears to fail.  Make sure there is not a broken
+       as_fn_error $? "ls -t appears to fail.  Make sure there is not a broken
   alias in your environment" "$LINENO" 5
      fi
      if test "$2" = conftest.file || test $am_try -eq 2; then
@@ -1908,7 +1926,7 @@ then
    # Ok.
    :
 else
-   as_fn_error "newly created file is older than distributed files!
+   as_fn_error $? "newly created file is older than distributed files!
 Check your system clock" "$LINENO" 5
 fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
@@ -1962,7 +1980,7 @@ if test "$cross_compiling" != no; then
 set dummy ${ac_tool_prefix}strip; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_STRIP+set}" = set; then :
+if ${ac_cv_prog_STRIP+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -n "$STRIP"; then
@@ -2002,7 +2020,7 @@ if test -z "$ac_cv_prog_STRIP"; then
 set dummy strip; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then :
+if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -n "$ac_ct_STRIP"; then
@@ -2055,7 +2073,7 @@ INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
 $as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
 if test -z "$MKDIR_P"; then
-  if test "${ac_cv_path_mkdir+set}" = set; then :
+  if ${ac_cv_path_mkdir+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
@@ -2106,7 +2124,7 @@ do
 set dummy $ac_prog; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_AWK+set}" = set; then :
+if ${ac_cv_prog_AWK+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -n "$AWK"; then
@@ -2146,7 +2164,7 @@ done
 $as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
 set x ${MAKE-make}
 ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
-if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then :
+if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   cat >conftest.make <<\_ACEOF
@@ -2154,7 +2172,7 @@ SHELL = /bin/sh
 all:
        @echo '@@@%%%=$(MAKE)=@@@%%%'
 _ACEOF
-# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
+# GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
 case `${MAKE-make} -f conftest.make 2>/dev/null` in
   *@@@%%%=?*=@@@%%%*)
     eval ac_cv_prog_make_${ac_make}_set=yes;;
@@ -2188,7 +2206,7 @@ if test "`cd $srcdir && pwd`" != "`pwd`"; then
   am__isrc=' -I$(srcdir)'
   # test to see if srcdir already configured
   if test -f $srcdir/config.status; then
-    as_fn_error "source directory already configured; run \"make distclean\" there first" "$LINENO" 5
+    as_fn_error $? "source directory already configured; run \"make distclean\" there first" "$LINENO" 5
   fi
 fi
 
@@ -2268,7 +2286,7 @@ AUTOMAKE="perllibdir=\"`pwd`/lib$PATH_SEPARATOR./lib\" \"`pwd`/automake\" --libd
 set dummy perl; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_path_PERL+set}" = set; then :
+if ${ac_cv_path_PERL+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   case $PERL in
@@ -2305,10 +2323,10 @@ fi
 
 
 if test -z "$PERL"; then
-   as_fn_error "perl not found" "$LINENO" 5
+   as_fn_error $? "perl not found" "$LINENO" 5
 fi
 $PERL -e 'require 5.006;' || {
-   as_fn_error "perl 5.6 or better is required; perl 5.8.2 or better
+   as_fn_error $? "perl 5.6 or better is required; perl 5.8.2 or better
 is recommended.  If you have several perl versions
 installed, select the one Automake should use using
   ./configure PERL=/path/to/perl" "$LINENO" 5
@@ -2317,7 +2335,7 @@ installed, select the one Automake should use using
 # 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 test "${am_cv_prog_PERL_ithreads+set}" = set; then :
+if ${am_cv_prog_PERL_ithreads+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if $PERL -e '
@@ -2352,7 +2370,7 @@ fi
 set dummy tex; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_TEX+set}" = set; then :
+if ${ac_cv_prog_TEX+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -n "$TEX"; then
@@ -2400,7 +2418,7 @@ HELP2MAN=${HELP2MAN-"${am_missing_run}help2man"}
 required_autoconf_version=2.62
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether autoconf is installed" >&5
 $as_echo_n "checking whether autoconf is installed... " >&6; }
-if test "${am_cv_autoconf_installed+set}" = set; then :
+if ${am_cv_autoconf_installed+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if { echo "$as_me:$LINENO: eval $am_AUTOCONF --version" >&5
@@ -2417,13 +2435,13 @@ fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_autoconf_installed" >&5
 $as_echo "$am_cv_autoconf_installed" >&6; }
 if test "$am_cv_autoconf_installed" = no; then
-  as_fn_error "Autoconf $required_autoconf_version or better is required.
+  as_fn_error $? "Autoconf $required_autoconf_version or better is required.
     Please make sure it is installed and in your PATH." "$LINENO" 5
 fi
 
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether autoconf works" >&5
 $as_echo_n "checking whether autoconf works... " >&6; }
-if test "${am_cv_autoconf_works+set}" = set; then :
+if ${am_cv_autoconf_works+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   mkdir conftest
@@ -2443,13 +2461,13 @@ fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_autoconf_works" >&5
 $as_echo "$am_cv_autoconf_works" >&6; }
 if test "$am_cv_autoconf_works" = no; then
-  as_fn_error "The installed version of autoconf does not work.
+  as_fn_error $? "The installed version of autoconf does not work.
     Please check config.log for error messages before this one." "$LINENO" 5
 fi
 
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether autoconf is recent enough" >&5
 $as_echo_n "checking whether autoconf is recent enough... " >&6; }
-if test "${am_cv_autoconf_version+set}" = set; then :
+if ${am_cv_autoconf_version+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   mkdir conftest
@@ -2469,13 +2487,13 @@ fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_autoconf_version" >&5
 $as_echo "$am_cv_autoconf_version" >&6; }
 if test "$am_cv_autoconf_version" = no; then
-  as_fn_error "Autoconf $required_autoconf_version or better is required." "$LINENO" 5
+  as_fn_error $? "Autoconf $required_autoconf_version or better is required." "$LINENO" 5
 fi
 
 # Test for ln.  We need use it to install the versioned binaries.
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln works" >&5
 $as_echo_n "checking whether ln works... " >&6; }
-if test "${am_cv_prog_ln+set}" = set; then :
+if ${am_cv_prog_ln+:} false; then :
   $as_echo_n "(cached) " >&6
 else
 
@@ -2510,7 +2528,7 @@ esac
 # Test for things needed by the test suite.
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
 $as_echo_n "checking for grep that handles long lines and -e... " >&6; }
-if test "${ac_cv_path_GREP+set}" = set; then :
+if ${ac_cv_path_GREP+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -z "$GREP"; then
@@ -2559,7 +2577,7 @@ esac
   done
 IFS=$as_save_IFS
   if test -z "$ac_cv_path_GREP"; then
-    as_fn_error "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
+    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
   fi
 else
   ac_cv_path_GREP=$GREP
@@ -2573,7 +2591,7 @@ $as_echo "$ac_cv_path_GREP" >&6; }
 
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
 $as_echo_n "checking for egrep... " >&6; }
-if test "${ac_cv_path_EGREP+set}" = set; then :
+if ${ac_cv_path_EGREP+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
@@ -2625,7 +2643,7 @@ esac
   done
 IFS=$as_save_IFS
   if test -z "$ac_cv_path_EGREP"; then
-    as_fn_error "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
+    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
   fi
 else
   ac_cv_path_EGREP=$EGREP
@@ -2640,7 +2658,7 @@ $as_echo "$ac_cv_path_EGREP" >&6; }
 
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
 $as_echo_n "checking for fgrep... " >&6; }
-if test "${ac_cv_path_FGREP+set}" = set; then :
+if ${ac_cv_path_FGREP+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
@@ -2692,7 +2710,7 @@ esac
   done
 IFS=$as_save_IFS
   if test -z "$ac_cv_path_FGREP"; then
-    as_fn_error "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
+    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
   fi
 else
   ac_cv_path_FGREP=$FGREP
@@ -2708,7 +2726,7 @@ $as_echo "$ac_cv_path_FGREP" >&6; }
 
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether /bin/sh has working 'set -e' with exit trap" >&5
 $as_echo_n "checking whether /bin/sh has working 'set -e' with exit trap... " >&6; }
-if test "${am_cv_sh_errexit_works+set}" = set; then :
+if ${am_cv_sh_errexit_works+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if /bin/sh -ec "trap 'exit \$?' 0; (exit 77); exit 77"; test $? = 77
@@ -2803,10 +2821,21 @@ $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
      :end' >>confcache
 if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
   if test -w "$cache_file"; then
-    test "x$cache_file" != "x/dev/null" &&
+    if test "x$cache_file" != "x/dev/null"; then
       { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
 $as_echo "$as_me: updating cache $cache_file" >&6;}
-    cat confcache >$cache_file
+      if test ! -f "$cache_file" || test -h "$cache_file"; then
+       cat confcache >"$cache_file"
+      else
+        case $cache_file in #(
+        */* | ?:*)
+         mv -f confcache "$cache_file"$$ &&
+         mv -f "$cache_file"$$ "$cache_file" ;; #(
+        *)
+         mv -f confcache "$cache_file" ;;
+       esac
+      fi
+    fi
   else
     { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
@@ -2858,6 +2887,7 @@ DEFS=`sed -n "$ac_script" confdefs.h`
 
 ac_libobjs=
 ac_ltlibobjs=
+U=
 for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
   # 1. Remove the extension, and $U if already installed.
   ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
@@ -2874,7 +2904,7 @@ LTLIBOBJS=$ac_ltlibobjs
 
 
 
-: ${CONFIG_STATUS=./config.status}
+: "${CONFIG_STATUS=./config.status}"
 ac_write_fail=0
 ac_clean_files_save=$ac_clean_files
 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
@@ -2975,6 +3005,7 @@ fi
 IFS=" ""       $as_nl"
 
 # Find who we are.  Look in the path if we contain no directory separator.
+as_myself=
 case $0 in #((
   *[\\/]* ) as_myself=$0 ;;
   *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
@@ -3020,19 +3051,19 @@ export LANGUAGE
 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
 
 
-# as_fn_error ERROR [LINENO LOG_FD]
-# ---------------------------------
+# as_fn_error STATUS ERROR [LINENO LOG_FD]
+# ----------------------------------------
 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
-# script with status $?, using 1 if that was 0.
+# script with STATUS, using 1 if that was 0.
 as_fn_error ()
 {
-  as_status=$?; test $as_status -eq 0 && as_status=1
-  if test "$3"; then
-    as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
-    $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3
+  as_status=$1; test $as_status -eq 0 && as_status=1
+  if test "$4"; then
+    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
   fi
-  $as_echo "$as_me: error: $1" >&2
+  $as_echo "$as_me: error: $2" >&2
   as_fn_exit $as_status
 } # as_fn_error
 
@@ -3228,7 +3259,7 @@ $as_echo X"$as_dir" |
       test -d "$as_dir" && break
     done
     test -z "$as_dirs" || eval "mkdir $as_dirs"
-  } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir"
+  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
 
 
 } # as_fn_mkdir_p
@@ -3282,7 +3313,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
 # values after options handling.
 ac_log="
 This file was extended by GNU Automake $as_me 1.11, which was
-generated by GNU Autoconf 2.65.  Invocation command line was
+generated by GNU Autoconf 2.68.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
   CONFIG_HEADERS  = $CONFIG_HEADERS
@@ -3337,10 +3368,10 @@ 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.11
-configured by $0, generated by GNU Autoconf 2.65,
+configured by $0, generated by GNU Autoconf 2.68,
   with options \\"\$ac_cs_config\\"
 
-Copyright (C) 2009 Free Software Foundation, Inc.
+Copyright (C) 2010 Free Software Foundation, Inc.
 This config.status script is free software; the Free Software Foundation
 gives unlimited permission to copy, distribute and modify it."
 
@@ -3358,11 +3389,16 @@ ac_need_defaults=:
 while test $# != 0
 do
   case $1 in
-  --*=*)
+  --*=?*)
     ac_option=`expr "X$1" : 'X\([^=]*\)='`
     ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
     ac_shift=:
     ;;
+  --*=)
+    ac_option=`expr "X$1" : 'X\([^=]*\)='`
+    ac_optarg=
+    ac_shift=:
+    ;;
   *)
     ac_option=$1
     ac_optarg=$2
@@ -3384,6 +3420,7 @@ do
     $ac_shift
     case $ac_optarg in
     *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
+    '') as_fn_error $? "missing file argument" ;;
     esac
     as_fn_append CONFIG_FILES " '$ac_optarg'"
     ac_need_defaults=false;;
@@ -3394,7 +3431,7 @@ do
     ac_cs_silent=: ;;
 
   # This is an error.
-  -*) as_fn_error "unrecognized option: \`$1'
+  -*) as_fn_error $? "unrecognized option: \`$1'
 Try \`$0 --help' for more information." ;;
 
   *) as_fn_append ac_config_targets " $1"
@@ -3460,7 +3497,7 @@ do
     "tests/aclocal-${APIVERSION}") CONFIG_FILES="$CONFIG_FILES tests/aclocal-${APIVERSION}:tests/aclocal.in" ;;
     "tests/automake-${APIVERSION}") CONFIG_FILES="$CONFIG_FILES tests/automake-${APIVERSION}:tests/automake.in" ;;
 
-  *) as_fn_error "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
+  *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
   esac
 done
 
@@ -3481,9 +3518,10 @@ fi
 # after its creation but before its name has been assigned to `$tmp'.
 $debug ||
 {
-  tmp=
+  tmp= ac_tmp=
   trap 'exit_status=$?
-  { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
+  : "${ac_tmp:=$tmp}"
+  { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
 ' 0
   trap 'as_fn_exit 1' 1 2 13 15
 }
@@ -3491,12 +3529,13 @@ $debug ||
 
 {
   tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
-  test -n "$tmp" && test -d "$tmp"
+  test -d "$tmp"
 }  ||
 {
   tmp=./conf$$-$RANDOM
   (umask 077 && mkdir "$tmp")
-} || as_fn_error "cannot create a temporary directory in ." "$LINENO" 5
+} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
+ac_tmp=$tmp
 
 # Set up the scripts for CONFIG_FILES section.
 # No need to generate them if there are no CONFIG_FILES.
@@ -3513,12 +3552,12 @@ if test "x$ac_cr" = x; then
 fi
 ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
 if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
-  ac_cs_awk_cr='\r'
+  ac_cs_awk_cr='\\r'
 else
   ac_cs_awk_cr=$ac_cr
 fi
 
-echo 'BEGIN {' >"$tmp/subs1.awk" &&
+echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
 _ACEOF
 
 
@@ -3527,18 +3566,18 @@ _ACEOF
   echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
   echo "_ACEOF"
 } >conf$$subs.sh ||
-  as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
-ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'`
+  as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
+ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
 ac_delim='%!_!# '
 for ac_last_try in false false false false false :; do
   . ./conf$$subs.sh ||
-    as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
+    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
 
   ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
   if test $ac_delim_n = $ac_delim_num; then
     break
   elif $ac_last_try; then
-    as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
+    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
   else
     ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
   fi
@@ -3546,7 +3585,7 @@ done
 rm -f conf$$subs.sh
 
 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
-cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&
+cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
 _ACEOF
 sed -n '
 h
@@ -3594,7 +3633,7 @@ t delim
 rm -f conf$$subs.awk
 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
 _ACAWK
-cat >>"\$tmp/subs1.awk" <<_ACAWK &&
+cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
   for (key in S) S_is_set[key] = 1
   FS = "\a"
 
@@ -3626,21 +3665,29 @@ if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
   sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
 else
   cat
-fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \
-  || as_fn_error "could not setup config files machinery" "$LINENO" 5
+fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
+  || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
 _ACEOF
 
-# VPATH may cause trouble with some makes, so we remove $(srcdir),
-# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
+# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
+# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
 # trailing colons and then remove the whole line if VPATH becomes empty
 # (actually we leave an empty line to preserve line numbers).
 if test "x$srcdir" = x.; then
-  ac_vpsub='/^[         ]*VPATH[        ]*=/{
-s/:*\$(srcdir):*/:/
-s/:*\${srcdir}:*/:/
-s/:*@srcdir@:*/:/
-s/^\([^=]*=[    ]*\):*/\1/
+  ac_vpsub='/^[         ]*VPATH[        ]*=[    ]*/{
+h
+s///
+s/^/:/
+s/[     ]*$/:/
+s/:\$(srcdir):/:/g
+s/:\${srcdir}:/:/g
+s/:@srcdir@:/:/g
+s/^:*//
 s/:*$//
+x
+s/\(=[  ]*\).*/\1/
+G
+s/\n//
 s/^[^=]*=[      ]*$//
 }'
 fi
@@ -3658,7 +3705,7 @@ do
   esac
   case $ac_mode$ac_tag in
   :[FHL]*:*);;
-  :L* | :C*:*) as_fn_error "invalid tag \`$ac_tag'" "$LINENO" 5;;
+  :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
   :[FH]-) ac_tag=-:-;;
   :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
   esac
@@ -3677,7 +3724,7 @@ do
     for ac_f
     do
       case $ac_f in
-      -) ac_f="$tmp/stdin";;
+      -) ac_f="$ac_tmp/stdin";;
       *) # Look for the file first in the build tree, then in the source tree
         # (if the path is not absolute).  The absolute path cannot be DOS-style,
         # because $ac_f cannot contain `:'.
@@ -3686,7 +3733,7 @@ do
           [\\/$]*) false;;
           *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
           esac ||
-          as_fn_error "cannot find input file: \`$ac_f'" "$LINENO" 5;;
+          as_fn_error "cannot find input file: \`$ac_f'" "$LINENO" 5;;
       esac
       case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
       as_fn_append ac_file_inputs " '$ac_f'"
@@ -3712,8 +3759,8 @@ $as_echo "$as_me: creating $ac_file" >&6;}
     esac
 
     case $ac_tag in
-    *:-:* | *:-) cat >"$tmp/stdin" \
-      || as_fn_error "could not create $ac_file" "$LINENO" 5 ;;
+    *:-:* | *:-) cat >"$ac_tmp/stdin" \
+      || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
     esac
     ;;
   esac
@@ -3849,23 +3896,24 @@ s&@INSTALL@&$ac_INSTALL&;t t
 s&@MKDIR_P@&$ac_MKDIR_P&;t t
 $ac_datarootdir_hack
 "
-eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \
-  || as_fn_error "could not create $ac_file" "$LINENO" 5
+eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
+  >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
 
 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
-  { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
-  { ac_out=`sed -n '/^[         ]*datarootdir[  ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
+  { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
+  { ac_out=`sed -n '/^[         ]*datarootdir[  ]*:*=/p' \
+      "$ac_tmp/out"`; test -z "$ac_out"; } &&
   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
-which seems to be undefined.  Please make sure it is defined." >&5
+which seems to be undefined.  Please make sure it is defined" >&5
 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
-which seems to be undefined.  Please make sure it is defined." >&2;}
+which seems to be undefined.  Please make sure it is defined" >&2;}
 
-  rm -f "$tmp/stdin"
+  rm -f "$ac_tmp/stdin"
   case $ac_file in
-  -) cat "$tmp/out" && rm -f "$tmp/out";;
-  *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";;
+  -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
+  *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
   esac \
-  || as_fn_error "could not create $ac_file" "$LINENO" 5
+  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
  ;;
 
 
@@ -3886,7 +3934,7 @@ _ACEOF
 ac_clean_files=$ac_clean_files_save
 
 test $ac_write_fail = 0 ||
-  as_fn_error "write failure creating $CONFIG_STATUS" "$LINENO" 5
+  as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
 
 
 # configure is writing to config.log, and then calls config.status.
@@ -3907,7 +3955,7 @@ if test "$no_create" != yes; then
   exec 5>>config.log
   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
   # would make configure fail if this is the last instruction.
-  $ac_cs_success || as_fn_exit $?
+  $ac_cs_success || as_fn_exit 1
 fi
 if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
index 8592fbd..de4583d 100644 (file)
@@ -18,6 +18,9 @@
 
 AC_INIT([GNU Automake], [1.11], [bug-automake@gnu.org])
 
+m4_ifndef([AC_PACKAGE_URL],
+         [AC_SUBST([PACKAGE_URL], [http://www.gnu.org/software/automake/])])
+
 AC_CONFIG_SRCDIR(automake.in)
 AC_CONFIG_AUX_DIR(lib)
 
diff --git a/doc/.cvsignore b/doc/.cvsignore
deleted file mode 100644 (file)
index a3ce790..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-Makefile
-automake.info*
-automake.dvi
-automake-[0-9].*
-*.log
-log
-diffs
-automake.vrs automake.cps automake.tr automake.op automake.cv
-automake.ov automake.toc automake.pg automake.ky automake.tp
-automake.vr automake.fn automake.cp automake.aux
-automake.cm automake.ps automake.html
-*.gz
-stamp-vti
-version.texi
index 95a8fb8..c1739e5 100644 (file)
@@ -2,7 +2,7 @@
 # @configure_input@
 
 # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010  Free Software
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
 # Foundation, Inc.
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -614,10 +614,15 @@ install-am: all-am
 
 installcheck: installcheck-am
 install-strip:
-       $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
-         install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
-         `test -z '$(STRIP)' || \
-           echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+       if test -z '$(STRIP)'; then \
+         $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+           install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+             install; \
+       else \
+         $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+           install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+           "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
+       fi
 mostlyclean-generic:
 
 clean-generic:
index ea500a9..f5066d4 100644 (file)
@@ -15,6 +15,8 @@
 @r{[}@var{\varname\}@r{]}
 @end macro
 
+@set PACKAGE_BUGREPORT bug-automake@@gnu.org
+
 @copying
 
 This manual is for GNU Automake (version @value{VERSION},
@@ -22,8 +24,8 @@ This manual is for GNU Automake (version @value{VERSION},
 Makefiles from template files.
 
 Copyright @copyright{} 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation,
-Inc.
+2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
+Foundation, Inc.
 
 @quotation
 Permission is granted to copy, distribute and/or modify this document
@@ -61,6 +63,7 @@ section entitled ``GNU Free Documentation License.''
 @insertcopying
 @end titlepage
 
+@contents
 
 @c We use the following macros to define indices:
 @c   @cindex   concepts, and anything that does not fit elsewhere
@@ -154,15 +157,16 @@ Use Cases for the GNU Build System
 A Small Hello World
 
 * Creating amhello::            Create @file{amhello-1.0.tar.gz} from scratch
-* amhello Explained::           @file{configure.ac} and @file{Makefile.am} explained
+* amhello's configure.ac Setup Explained::
+* amhello's Makefile.am Setup Explained::
 
 General ideas
 
 * General Operation::           General operation of Automake
 * Strictness::                  Standards conformance checking
 * Uniform::                     The Uniform Naming Scheme
-* Canonicalization::            How derived variables are named
 * Length Limitations::          Staying below the command line length limit
+* Canonicalization::            How derived variables are named
 * User Variables::              Variables reserved for the user
 * Auxiliary Programs::          Programs automake might require
 
@@ -236,7 +240,7 @@ Building a program
 * Program Sources::             Defining program sources
 * Linking::                     Linking with libraries or extra objects
 * Conditional Sources::         Handling conditional sources
-* Conditional Programs::        Building program conditionally
+* Conditional Programs::        Building program conditionally
 
 Building a Shared Library
 
@@ -250,6 +254,11 @@ Building a Shared Library
 * LTLIBOBJS::                   Using $(LTLIBOBJS) and $(LTALLOCA)
 * Libtool Issues::              Common Issues Related to Libtool's Use
 
+Common Issues Related to Libtool's 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
+
 Fortran 77 Support
 
 * Preprocessing Fortran 77::    Preprocessing Fortran 77 sources
@@ -288,7 +297,7 @@ Building documentation
 * Texinfo::                     Texinfo
 * Man Pages::                   Man pages
 
-Installation
+What Gets Installed
 
 * Basics of Installation::      What gets installed where
 * The Two Parts of Install::    Installing data and programs separately
@@ -296,7 +305,7 @@ Installation
 * Staged Installs::             Installation in a temporary location
 * Install Rules for the User::  Useful additional rules
 
-Distribution
+What Goes in a Distribution
 
 * Basics of Distribution::      Files distributed by default
 * Fine-grained Distribution Control::  @code{dist_} and @code{nodist_} prefixes
@@ -304,7 +313,7 @@ Distribution
 * Checking the Distribution::   @samp{make distcheck} explained
 * The Types of Distributions::  A variety of formats and compression methods
 
-Support for Test Suites
+Support for test suites
 
 * Simple Tests::                Listing programs and scripts in @code{TESTS}
 * Simple Tests using parallel-tests::  More powerful test driver
@@ -340,6 +349,7 @@ Frequently Asked Questions about Automake
 * 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
+* Reporting Bugs::              Feedback on bugs and feature requests
 
 History of Automake
 
@@ -347,12 +357,12 @@ History of Automake
 * Dependency Tracking Evolution::  Evolution of Automatic Dependency Tracking
 * Releases::                    Statistics about Automake Releases
 
-Dependency Tracking Evolution
+Dependency Tracking in Automake
 
 * First Take on Dependencies::  Precomputed dependency tracking
 * Dependencies As Side Effects::  Update at developer compile time
 * Dependencies for the User::   Update at user compile time
-* Techniques for Dependencies:: Alternative approaches
+* Techniques for Dependencies::  Alternative approaches
 * Recommendations for Tool Writers::  What tool writers can do to help
 * Future Directions for Dependencies::  Languages Automake does not know
 
@@ -421,8 +431,7 @@ to be built.
 @cindex Reporting bugs
 @cindex E-mail, bug reports
 
-Mail suggestions and bug reports for Automake to
-@email{bug-automake@@gnu.org}.
+For more information on bug reports, @xref{Reporting Bugs}.
 
 @node Autotools Introduction
 @chapter An Introduction to the Autotools
@@ -1017,11 +1026,11 @@ resulting executable is expected to run.  The following
 @command{configure} options are used to specify each of them:
 
 @table @option
-@item --build=@var{BUILD}
-@opindex --build=@var{BUILD}
+@item --build=@var{build}
+@opindex --build=@var{build}
 The system on which the package is built.
-@item --host=@var{HOST}
-@opindex --host=@var{HOST}
+@item --host=@var{host}
+@opindex --host=@var{host}
 The system where built programs and libraries will run.
 @end table
 
@@ -1067,15 +1076,15 @@ built is itself a cross-compiler: we need a third option to specify
 its target architecture.
 
 @table @option
-@item --target=@var{TARGET}
-@opindex --target=@var{TARGET}
+@item --target=@var{target}
+@opindex --target=@var{target}
 When building compiler tools: the system for which the tools will
 create output.
 @end table
 
 For instance when installing GCC, the GNU Compiler Collection, we can
-use @option{--target=@/@var{TARGET}} to specify that we want to build
-GCC as a cross-compiler for @var{TARGET}.  Mixing @option{--build} and
+use @option{--target=@/@var{target}} to specify that we want to build
+GCC as a cross-compiler for @var{target}.  Mixing @option{--build} and
 @option{--target}, we can actually cross-compile a cross-compiler;
 such a three-way cross-compilation is known as a @dfn{Canadian cross}.
 
@@ -1100,15 +1109,15 @@ distinguish it from your vendor's @command{tar}.
 This can be done using one of these three @command{configure} options.
 
 @table @option
-@item --program-prefix=@var{PREFIX}
-@opindex --program-prefix=@var{PREFIX}
-Prepend @var{PREFIX} to installed program names.
-@item --program-suffix=@var{SUFFIX}
-@opindex --program-suffix=@var{SUFFIX}
-Append @var{SUFFIX} to installed program names.
-@item --program-transform-name=@var{PROGRAM}
-@opindex --program-transform-name=@var{PROGRAM}
-Run @code{sed @var{PROGRAM}} on installed program names.
+@item --program-prefix=@var{prefix}
+@opindex --program-prefix=@var{prefix}
+Prepend @var{prefix} to installed program names.
+@item --program-suffix=@var{suffix}
+@opindex --program-suffix=@var{suffix}
+Append @var{suffix} to installed program names.
+@item --program-transform-name=@var{program}
+@opindex --program-transform-name=@var{program}
+Run @code{sed @var{program}} on installed program names.
 @end table
 
 The following commands would install @file{hello}
@@ -1244,6 +1253,10 @@ source being compiled).  Later, any time @command{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,
+@pxref{Dependencies}.
+
 When @command{configure} is executed, you can see it probing each
 compiler for the dependency mechanism it supports (several mechanisms
 can be used):
@@ -1380,9 +1393,11 @@ instantiate the GNU Build System, while the second explains the
 meaning of the @file{configure.ac} and @file{Makefile.am} files read
 by the Autotools.
 
+@anchor{amhello Explained}
 @menu
 * Creating amhello::            Create @file{amhello-1.0.tar.gz} from scratch
-* amhello Explained::           @file{configure.ac} and @file{Makefile.am} explained
+* amhello's configure.ac Setup Explained::
+* amhello's Makefile.am Setup Explained::
 @end menu
 
 @node Creating amhello
@@ -1444,7 +1459,7 @@ create the @command{configure} script.
 
 @example
 ~/amhello % @kbd{cat configure.ac}
-AC_INIT([amhello], [1.0], [bug-automake@@gnu.org])
+AC_INIT([amhello], [1.0], [@value{PACKAGE_BUGREPORT}])
 AM_INIT_AUTOMAKE([-Wall -Werror foreign])
 AC_PROG_CC
 AC_CONFIG_HEADERS([config.h])
@@ -1543,13 +1558,15 @@ creating @file{configure} from @file{configure.ac}, while
 direct you to the right manual when seeking answers.
 
 
-@node amhello Explained
-@subsection @file{amhello-1.0} Explained
+@node amhello's configure.ac Setup Explained
+@subsection @code{amhello}'s @file{configure.ac} Setup Explained
+
+@cindex @file{configure.ac}, Hello World
 
 Let us begin with the contents of @file{configure.ac}.
 
 @example
-AC_INIT([amhello], [1.0], [bug-automake@@gnu.org])
+AC_INIT([amhello], [1.0], [@value{PACKAGE_BUGREPORT}])
 AM_INIT_AUTOMAKE([-Wall -Werror foreign])
 AC_PROG_CC
 AC_CONFIG_HEADERS([config.h])
@@ -1619,7 +1636,7 @@ is an excerpt of @file{config.h} after @command{configure} has run:
 @smallexample
 @dots{}
 /* Define to the address where bug reports for this package should be sent. */
-#define PACKAGE_BUGREPORT "bug-automake@@gnu.org"
+#define PACKAGE_BUGREPORT "@value{PACKAGE_BUGREPORT}"
 
 /* Define to the full name and version of this package. */
 #define PACKAGE_STRING "amhello 1.0"
@@ -1652,6 +1669,10 @@ your package may need (@pxref{autoscan Invocation, , Using
 @command{autoscan} to Create @file{configure.ac}, autoconf, The
 Autoconf Manual}).
 
+
+@node amhello's Makefile.am Setup Explained
+@subsection @code{amhello}'s @file{Makefile.am} Setup Explained
+
 @cindex @file{Makefile.am}, Hello World
 
 We now turn to @file{src/Makefile.am}.  This file contains
@@ -1724,6 +1745,11 @@ automatically distributed is presented by @code{automake --help}).
 The only important effect of this second line is therefore to install
 @file{README} during @code{make install}.
 
+One thing not covered in this example is accessing the installation
+directory values (@pxref{Standard Directory Variables}) from your
+program code, that is, converting them into defined macros.  For this,
+@pxref{Defining Directories,,, autoconf, The Autoconf Manual}.
+
 
 @node Generalities
 @chapter General ideas
@@ -1735,8 +1761,8 @@ understand how Automake works.
 * General Operation::           General operation of Automake
 * Strictness::                  Standards conformance checking
 * Uniform::                     The Uniform Naming Scheme
-* Canonicalization::            How derived variables are named
 * Length Limitations::          Staying below the command line length limit
+* Canonicalization::            How derived variables are named
 * User Variables::              Variables reserved for the user
 * Auxiliary Programs::          Programs automake might require
 @end menu
@@ -1752,12 +1778,12 @@ for instance, a @code{bin_PROGRAMS} variable definition will cause rules
 for compiling and linking programs to be generated.
 
 @cindex Non-standard targets
-@cindex @code{cvs-dist}, non-standard example
-@trindex cvs-dist
+@cindex @code{git-dist}, non-standard example
 @trindex git-dist
 
 The variable definitions and rules in the @file{Makefile.am} are
-copied verbatim into the generated file.  This allows you to add
+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 @file{Makefile.in}.  For instance,
 the Automake distribution includes a non-standard rule for the
 @code{git-dist} target, which the Automake maintainer uses to make
@@ -1974,7 +2000,8 @@ variable names; thus one writes @samp{bin_PROGRAMS} and not
 @samp{bindir_PROGRAMS}.
 
 Not every sort of object can be installed in every directory.  Automake
-will flag those attempts it finds in error.
+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.
 
 @cindex Extending list of installation directories
@@ -1996,6 +2023,33 @@ xmldir = $(datadir)/xml
 xml_DATA = file.xml
 @end example
 
+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:
+
+@example
+# Forbidden directory combinations, automake will error out on this.
+pkglib_PROGRAMS = foo
+doc_LIBRARIES = libquux.a
+@end example
+
+@noindent
+but it will succeed with this:
+
+@example
+# Work around forbidden directory combinations.  Do not use this
+# without a very good reason!
+my_execbindir = $(pkglibdir)
+my_doclibdir = $(docdir)
+my_execbin_PROGRAMS = foo
+my_doclib_LIBRARIES = libquux.a
+@end example
+
+The @samp{exec} substring of the @samp{my_execbindir} variable lets
+the files be installed at the right time (@pxref{The Two Parts of
+Install}).
+
 @cindex @samp{noinst_} primary prefix, definition
 @vindex noinst_
 
@@ -2012,10 +2066,12 @@ should not be built until the @samp{make check} command is run.  Those
 objects are not installed either.
 
 The current primary names are @samp{PROGRAMS}, @samp{LIBRARIES},
-@samp{LISP}, @samp{PYTHON}, @samp{JAVA}, @samp{SCRIPTS}, @samp{DATA},
-@samp{HEADERS}, @samp{MANS}, and @samp{TEXINFOS}.
+@samp{LTLIBRARIES}, @samp{LISP}, @samp{PYTHON}, @samp{JAVA},
+@samp{SCRIPTS}, @samp{DATA}, @samp{HEADERS}, @samp{MANS}, and
+@samp{TEXINFOS}.
 @vindex PROGRAMS
 @vindex LIBRARIES
+@vindex LTLIBRARIES
 @vindex LISP
 @vindex PYTHON
 @vindex JAVA
@@ -2863,7 +2919,7 @@ 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.
 
-As for @code{AC_CONFIG_FILES} (@pxref{Requirements}), parts of the
+As with @code{AC_CONFIG_FILES} (@pxref{Requirements}), parts of the
 specification using shell variables will be ignored as far as
 cleaning, distributing, and rebuilding is concerned.
 
@@ -3137,7 +3193,7 @@ output file.
 
 @cindex serial number and @option{--install}
 When this option is used, and only when this option is used,
-@command{aclocal} will also honor @samp{#serial @var{NUMBER}} lines
+@command{aclocal} will also honor @samp{#serial @var{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 (@pxref{Serials}).
@@ -3400,6 +3456,7 @@ 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,
+
 @example
 # bad style
 AC_PREREQ(2.57)
@@ -3409,8 +3466,10 @@ AX_FOO
 AX_BAR
 ])
 @end example
+
 @noindent
 should be rewritten as
+
 @example
 AC_DEFUN([AX_FOOBAR],
 [AC_PREREQ([2.57])dnl
@@ -3532,11 +3591,11 @@ automatically when new system-wide versions are installed.  A serial
 number should be a single line of the form
 
 @example
-#serial @var{NNN}
+#serial @var{nnn}
 @end example
 
 @noindent
-where @var{NNN} contains only digits and dots.  It should appear in
+where @var{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 @option{--install} option of @command{aclocal}: this allows
@@ -5314,7 +5373,7 @@ 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 @command{libtool} (hence the use of
 @samp{@var{library}_LDFLAGS} for libtool linking flags).  Generic
-options include @option{--tag=@var{TAG}} and @option{--silent}
+options include @option{--tag=@var{tag}} and @option{--silent}
 (@pxref{Invoking libtool, , Invoking @command{libtool}, libtool, The
 Libtool Manual} for more options) should appear before the mode
 selection on the command line; in @file{Makefile.am}s they should
@@ -5323,10 +5382,10 @@ be listed in the @samp{@var{library}_LIBTOOLFLAGS} variable.
 If @samp{@var{library}_LIBTOOLFLAGS} is not defined, then the variable
 @code{AM_LIBTOOLFLAGS} is used instead.
 
-These flags are passed to libtool after the @option{--tag=@var{TAG}}
+These flags are passed to libtool after the @option{--tag=@var{tag}}
 option computed by Automake (if any), so
 @samp{@var{library}_LIBTOOLFLAGS} (or @code{AM_LIBTOOLFLAGS}) is a
-good place to override or supplement the @option{--tag=@var{TAG}}
+good place to override or supplement the @option{--tag=@var{tag}}
 setting.
 
 The libtool rules also use a @code{LIBTOOLFLAGS} variable that should
@@ -5363,8 +5422,8 @@ performed automatically by Autoconf (@pxref{AC_LIBOBJ vs LIBOBJS, ,
 @subsection Common Issues Related to Libtool's Use
 
 @menu
-* Error required file ltmain.sh not found::      The need to run libtoolize
-* Objects created both with libtool and without:: Avoid a specific build race
+* Error required file ltmain.sh not found::  The need to run libtoolize
+* Objects created both with libtool and without::  Avoid a specific build race
 @end menu
 
 @node Error required file ltmain.sh not found
@@ -5573,7 +5632,7 @@ or a shared library.  It overrides the @code{AM_LDFLAGS} variable.
 @item maude_LIBTOOLFLAGS
 This variable is used to pass extra options to @command{libtool}.
 It overrides the @code{AM_LIBTOOLFLAGS} variable.
-These options are output before @command{libtool}'s @option{--mode=@var{MODE}}
+These options are output before @command{libtool}'s @option{--mode=@var{mode}}
 option, so they should not be mode-specific options (those belong to
 the compiler or linker flags).  @xref{Libtool Flags}.
 
@@ -5755,8 +5814,8 @@ Without the last line, they will be built from @file{test1.c},
 @cindex Libtool modules, default source example
 @cindex default source, Libtool modules example
 Another case where this is convenient is building many Libtool modules
-(@file{module@var{N}.la}), each defined in its own file
-(@file{module@var{N}.c}).
+(@file{module@var{n}.la}), each defined in its own file
+(@file{module@var{n}.c}).
 
 @example
 AM_LDFLAGS = -module
@@ -6036,7 +6095,12 @@ intended for the @file{Makefile.am} author.
 @code{AM_YFLAGS} is usually used to pass the @option{-d} option to
 @command{yacc}.  Automake knows what this means and will automatically
 adjust its rules to update and distribute the header file built by
-@samp{yacc -d}.  What Automake cannot guess, though, is where this
+@samp{yacc -d}@footnote{Please note that @command{automake} recognizes
+@option{-d} in @code{AM_YFLAGS} only if it is not clustered with other
+options; for example, it won't be recognized if @code{AM_YFLAGS} is
+@option{-dt}, but it will be if @code{AM_YFLAGS} is @option{-d -t} or
+@option{-d -t}}.
+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
@@ -6556,8 +6620,8 @@ library.
 @comment  node-name,  next,  previous,  up
 @subsection Compiling Fortran 9x Files
 
-@file{@var{N}.o} is made automatically from @file{@var{N}.f90},
-@file{@var{N}.f95}, @file{@var{N}.f03}, or @file{@var{N}.f08}
+@file{@var{file}.o} is made automatically from @file{@var{file}.f90},
+@file{@var{file}.f95}, @file{@var{file}.f03}, or @file{@var{file}.f08}
 by running the Fortran 9x compiler.  The precise command used
 is as follows:
 
@@ -6639,7 +6703,7 @@ 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})
+@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:
@@ -6766,7 +6830,7 @@ vs.@: @code{LIBOBJS}, autoconf, The Autoconf Manual})
 @section Automatic dependency tracking
 
 As a developer it is often painful to continually update the
-@file{Makefile.in} whenever the include-file dependencies change in a
+@file{Makefile.am} whenever the include-file dependencies change in a
 project.  Automake supplies a way to automatically track dependency
 changes (@pxref{Dependency Tracking}).
 
@@ -6910,7 +6974,7 @@ script is distributed in its final, installable form, the
 dist_bin_SCRIPTS = my_script
 @end example
 
-Script are not distributed by default; as we have just seen, those
+Scripts are not distributed by default; as we have just seen, those
 that should be distributed can be specified using a @code{dist_}
 prefix as with other primaries.
 
@@ -7394,18 +7458,20 @@ installation less nice for everybody else.
 
 There are two ways to avoid byte-compiling.  Historically, we have
 recommended the following construct.
+
 @example
 lisp_LISP = file1.el file2.el
 ELCFILES =
 @end example
+
 @noindent
 @code{ELCFILES} is an internal Automake variable that normally lists
 all @file{.elc} files that must be byte-compiled.  Automake defines
 @code{ELCFILES} automatically from @code{lisp_LISP}.  Emptying this
 variable explicitly prevents byte-compilation.
 
-Since Automake 1.8, we now recommend using @code{lisp_DATA} instead.  As
-in
+Since Automake 1.8, we now recommend using @code{lisp_DATA} instead:
+
 @example
 lisp_DATA = file1.el file2.el
 @end example
@@ -7537,17 +7603,17 @@ files in your @file{Makefile.am}, depending on where you want your files
 installed (see the definitions of @code{pythondir} and
 @code{pkgpythondir} below).
 
-@defmac AM_PATH_PYTHON (@ovar{VERSION}, @ovar{ACTION-IF-FOUND}, @ovar{ACTION-IF-NOT-FOUND})
+@defmac AM_PATH_PYTHON (@ovar{version}, @ovar{action-if-found}, @ovar{action-if-not-found})
 
 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: @code{AM_PATH_PYTHON}
-will skip any Python interpreter that is older than @var{VERSION}.
-If an interpreter is found and satisfies @var{VERSION}, then
-@var{ACTION-IF-FOUND} is run.  Otherwise, @var{ACTION-IF-NOT-FOUND} is
+will skip any Python interpreter that is older than @var{version}.
+If an interpreter is found and satisfies @var{version}, then
+@var{action-if-found} is run.  Otherwise, @var{action-if-not-found} is
 run.
 
-If @var{ACTION-IF-NOT-FOUND} is not specified, as in the following
+If @var{action-if-not-found} is not specified, as in the following
 example, the default is to abort @command{configure}.
 
 @example
@@ -7572,7 +7638,7 @@ the Python installation found during configuration.
 The name of the Python executable, or @samp{:} if no suitable
 interpreter could be found.
 
-Assuming @var{ACTION-IF-NOT-FOUND} is used (otherwise @file{./configure}
+Assuming @var{action-if-not-found} is used (otherwise @file{./configure}
 will abort if Python is absent), the value of @code{PYTHON} can be used
 to setup a conditional in order to disable the relevant part of a build
 as follows.
@@ -7618,7 +7684,7 @@ as follows to Automake:
 
 @example
 pyexec_LTLIBRARIES = quaternion.la
-quaternion_SOURCES = quaternion.c support.c support.h
+quaternion_la_SOURCES = quaternion.c support.c support.h
 quaternion_la_LDFLAGS = -avoid-version -module
 @end example
 
@@ -7873,8 +7939,8 @@ subdirectory of @code{mandir}.  Valid section names are the digits
 Sometimes developers prefer to name a man page something like
 @file{foo.man} in the source, and then rename it to have the correct
 suffix, for example @file{foo.1}, when installing the file.  Automake
-also supports this mode.  For a valid section named @var{SECTION},
-there is a corresponding directory named @samp{man@var{SECTION}dir},
+also supports this mode.  For a valid section named @var{section},
+there is a corresponding directory named @samp{man@var{section}dir},
 and a corresponding @code{_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
@@ -7904,7 +7970,7 @@ installed by default.  The user can still explicitly install them via
 @samp{make install-man}.
 
 For fast installation, with many files it is preferable to use
-@samp{man@var{SECTION}_MANS} over @samp{man_MANS} as well as files that
+@samp{man@var{section}_MANS} over @samp{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
@@ -8240,8 +8306,8 @@ subdirectories in @code{EXTRA_DIST}.
 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 CVS/RCS version control files.  We recommend against using
-this feature.
+including, e.g., Subversion's @file{.svn} private directories or CVS/RCS
+version control files.  We recommend against using this feature.
 
 @vindex SUBDIRS
 @vindex DIST_SUBDIRS
@@ -8302,7 +8368,7 @@ recursively included by specifying a directory in EXTRA_DIST:
 EXTRA_DIST = doc
 
 dist-hook:
-        rm -rf `find $(distdir)/doc -name CVS`
+        rm -rf `find $(distdir)/doc -type d -name .svn`
 @end example
 
 @vindex distdir
@@ -8523,6 +8589,12 @@ 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}.
 
+Note that the semantics of some @command{make} implementations when used
+in parallel mode (@pxref{Parallel make,,, autoconf, The Autoconf Manual})
+can cause the automatic detection of a connection to a capable terminal
+to fail.  In that case, you can still resort to the use of
+@samp{AM_COLOR_TESTS=always}.
+
 @vindex TESTS
 @vindex TESTS_ENVIRONMENT
 The variable @code{TESTS_ENVIRONMENT} can be used to set environment
@@ -8530,13 +8602,19 @@ variables for the test run; the environment variable @env{srcdir} is
 set in the rule.  If all your test programs are scripts, you can also
 set @code{TESTS_ENVIRONMENT} to an invocation of the shell (e.g.
 @samp{$(SHELL) -x} can be useful for debugging the tests), or any other
-interpreter.  For instance the following setup is used by the Automake
-package to run four tests in Perl.
+interpreter.  For instance, the following setup may be used to run tests
+with Perl:
+
 @example
-TESTS_ENVIRONMENT = $(PERL) -Mstrict -I $(top_srcdir)/lib -w
-TESTS = Condition.pl DisjConditions.pl Version.pl Wrap.pl
+TESTS_ENVIRONMENT = $(PERL) -Mstrict -w
+TESTS = foo.pl bar.pl baz.pl
 @end example
 
+Note that the @option{parallel-tests} driver provides a more elegant
+way to achieve the same effect, freeing the @code{TESTS_ENVIRONMENT}
+variable for the user to override (@pxref{Simple Tests using
+parallel-tests}).
+
 
 @cindex Tests, expected failure
 @cindex Expected test failure
@@ -8608,10 +8686,10 @@ if a test file name ends in several concatenated suffixes.
 @vindex LOG_COMPILE
 @vindex LOG_COMPILER
 @vindex LOG_FLAGS
-@vindex @var{EXT}_LOG_COMPILE
-@vindex @var{EXT}_LOG_COMPILER
-@vindex @var{EXT}_LOG_FLAGS
-@vindex AM_@var{EXT}_LOG_FLAGS
+@vindex @var{ext}_LOG_COMPILE
+@vindex @var{ext}_LOG_COMPILER
+@vindex @var{ext}_LOG_FLAGS
+@vindex AM_@var{ext}_LOG_FLAGS
 @vindex AM_LOG_FLAGS
 For tests that match an extension @code{.@var{ext}} listed in
 @code{TEST_EXTENSIONS}, you can provide a test driver using the variable
@@ -8864,9 +8942,11 @@ output in all them), so it is safer and easier to @code{AC_SUBST} them
 from @file{configure.ac}.  For instance, the following statement will
 cause @file{configure} to be rerun each time @file{version.sh} is
 changed.
+
 @example
 AC_SUBST([CONFIG_STATUS_DEPENDENCIES], ['$(top_srcdir)/version.sh'])
 @end example
+
 @noindent
 Note the @samp{$(top_srcdir)/} in the file name.  Since this variable
 is to be used in all @file{Makefile}s, its value must be sensible at
@@ -8892,12 +8972,14 @@ Speaking of @file{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 @file{configure.ac}s may look like:
+
 @example
 AC_INIT
 . $srcdir/version.sh
 AM_INIT_AUTOMAKE([name], $VERSION_NUMBER)
 @dots{}
 @end example
+
 @noindent
 Here, @file{version.sh} is a shell fragment that sets
 @code{VERSION_NUMBER}.  The problem with this example is that
@@ -8908,12 +8990,14 @@ to the user), and that it uses the obsolete form of @code{AC_INIT} and
 straightforward, because shell variables are not allowed in
 @code{AC_INIT}'s arguments.  We recommend that @file{version.sh} be
 replaced by an M4 file that is included by @file{configure.ac}:
+
 @example
 m4_include([version.m4])
 AC_INIT([name], VERSION_NUMBER)
 AM_INIT_AUTOMAKE
 @dots{}
 @end example
+
 @noindent
 Here @file{version.m4} could contain something like
 @samp{m4_define([VERSION_NUMBER], [1.2])}.  The advantage of this
@@ -9109,10 +9193,10 @@ Enable test suite driver for @code{TESTS} that can run tests in parallel
 If this release is an alpha release, and the file @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 @samp{@var{MAJOR}.@var{MINOR}.@var{ALPHA}}, where each
+first form is @samp{@var{major}.@var{minor}.@var{alpha}}, where each
 element is a number; the final period and number should be left off for
 non-alpha releases.  The second form is
-@samp{@var{MAJOR}.@var{MINOR}@var{ALPHA}}, where @var{ALPHA} is a
+@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}
@@ -9287,7 +9371,7 @@ 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 @email{bug-automake@@gnu.org} so we
+characters (please report them to @email{@value{PACKAGE_BUGREPORT}} so we
 can document this accurately).
 
 @option{tar-pax} selects the new pax interchange format defined by POSIX
@@ -9793,8 +9877,7 @@ The options @option{no-installinfo} and @option{no-dependencies} are
 implied.
 
 @item
-The macros @code{AM_MAINTAINER_MODE} and @code{AM_CYGWIN32} are
-required.
+The macro @code{AM_MAINTAINER_MODE} is required.
 
 @item
 The @code{check} target doesn't depend on @code{all}.
@@ -10240,12 +10323,14 @@ older releases will not be used.  For instance, use this in your
 @example
   AM_INIT_AUTOMAKE([1.6.1])    dnl Require Automake 1.6.1 or better.
 @end example
+
 @noindent
 or, in a particular @file{Makefile.am}:
 
 @example
   AUTOMAKE_OPTIONS = 1.6.1   # Require Automake 1.6.1 or better.
 @end example
+
 @noindent
 Automake will print an error message if its version is
 older than the requested version.
@@ -10344,6 +10429,7 @@ lists.
 * 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
+* Reporting Bugs::              Feedback on bugs and feature requests
 @end menu
 
 @node CVS
@@ -10528,9 +10614,10 @@ 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 CVS, this feature of @command{missing} allows a user
-@emph{with no maintainer tools} to build a package off CVS, bypassing
-any timestamp inconsistency implied by @samp{cvs update}.
+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}).
 
 If the required tool is installed, @command{missing} will run it and
 won't attempt to continue after failures.  This is correct during
@@ -10585,9 +10672,9 @@ swayed by Fran@,{c}ois's arguments, and got rid of
 @code{AM_MAINTAINER_MODE} in all of his packages.
 
 Still many people continue to use @code{AM_MAINTAINER_MODE}, because
-it helps them working on projects where all files are kept under CVS,
-and because @command{missing} isn't enough if you have the wrong
-version of the tools.
+it helps them working on projects where all files are kept under version
+control, and because @command{missing} isn't enough if you have the
+wrong version of the tools.
 
 
 @node Wildcards
@@ -11130,6 +11217,7 @@ true_CPPFLAGS = -DEXIT_CODE=0
 false_SOURCES = generic.c
 false_CPPFLAGS = -DEXIT_CODE=1
 @end example
+
 @noindent
 Obviously the two programs are built from the same source, but it
 would be bad if they shared the same object, because @file{generic.o}
@@ -11299,6 +11387,7 @@ data.c: data.foo
 data.h: data.foo data.c
         foo data.foo
 @end example
+
 @noindent
 therefore a parallel @command{make} will have to serialize the builds
 of @file{data.c} and @file{data.h}, and will detect that the second is
@@ -11363,11 +11452,15 @@ data.h data.w data.x: data.c
         fi
 @end example
 
-However there are now two minor problems in this setup.  One is related
+However there are now three minor problems in this setup.  One is related
 to the timestamp ordering of @file{data.h}, @file{data.w},
-@file{data.x}, and @file{data.c}.  The other one is a race condition
+@file{data.x}, and @file{data.c}.  Another one is a race condition
 if a parallel @command{make} attempts to run multiple instances of the
-recover block at once.
+recover block at once.  Finally, the recursive rule breaks @samp{make -n}
+when run with GNU @command{make} (as well as some other @command{make}
+implementations), as it may remove @file{data.h} even when it should not
+(@pxref{MAKE Variable, , How the @code{MAKE} Variable Works, make,
+The GNU Make Manual}).
 
 Let us deal with the first problem.  @command{foo} outputs four files,
 but we do not know in which order these files are created.  Suppose
@@ -11475,8 +11568,8 @@ elc-stamp: $(ELFILES)
         @@mv -f elc-temp $@@
 
 $(ELCFILES): elc-stamp
-## Recover from the removal of $@@
         @@if test -f $@@; then :; else \
+## Recover from the removal of $@@
           trap 'rm -rf elc-lock elc-stamp' 1 2 13 15; \
           if mkdir elc-lock 2>/dev/null; then \
 ## This code is being executed by the first process.
@@ -11489,10 +11582,58 @@ $(ELCFILES): elc-stamp
             while test -d elc-lock; do sleep 1; done; \
 ## Succeed if and only if the first process succeeded.
             test -f elc-stamp; exit $$?; \
+@c $$
           fi; \
         fi
 @end example
+
+These solutions all still suffer from the third problem, namely that
+they break the promise that @samp{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 @samp{$(MAKE)}.  The solutions involving
+locking could act upon the contents of the @samp{MAKEFLAGS} variable,
+but parsing that portably is not easy (@pxref{The Make Macro MAKEFLAGS,,,
+autoconf, The Autoconf Manual}).  Here is an example:
+
+@example
+ELFILES = one.el two.el three.el @dots{}
+ELCFILES = $(ELFILES:=c)
+
+elc-stamp: $(ELFILES)
+        @@rm -f elc-temp
+        @@touch elc-temp
+        $(elisp_comp) $(ELFILES)
+        @@mv -f elc-temp $@@
+
+$(ELCFILES): elc-stamp
+## Recover from the removal of $@@
+        @@dry=; for f in x $$MAKEFLAGS; do \
+          case $$f in \
+            *=*|--*);; \
+            *n*) dry=:;; \
+          esac; \
+        done; \
+        if test -f $@@; then :; else \
+          $$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 \
 @c $$
+              sleep 1; \
+            done; \
+## Succeed if and only if the first process succeeded.
+            $$dry test -f elc-stamp; exit $$?; \
+          fi; \
+        fi
+@end example
 
 For completeness it should be noted that GNU @command{make} is able to
 express rules with multiple output files using pattern rules
@@ -11669,9 +11810,59 @@ prerequisites for the @file{Makefile} file itself even with @option{-n}
 @code{make SHELL="/bin/bash -vx"} can help debug complex rules.
 @xref{The Make Macro SHELL,,, autoconf, The Autoconf Manual}, for some
 portability quirks associated with this construct.
+@item
+@code{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 @samp{print} if that is already used or a
+file with that name exists.
+@item
+@url{http://bashdb.sourceforge.net/@/remake/} provides a modified
+GNU @command{make} command called @command{remake} that copes with
+complex GNU @command{make}-specific Makefiles and allows to trace
+execution, examine variables, and call rules interactively, much like
+a debugger.
 @end itemize
 
 
+@node Reporting Bugs
+@section 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.
+
+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 known.
+You can look at the @uref{http://debbugs.gnu.org/, GNU Bug Tracker}
+and the @uref{http://lists.gnu.org/@/archive/@/html/@/bug-automake/,
+bug-automake mailing list archives} for previous bug reports.  We
+previously used a
+@uref{http://sourceware.org/@/cgi-bin/@/gnatsweb.pl?database=automake,
+Gnats database} for bug tracking, so some bugs might have been reported
+there already.  Please do not use it for new bug reports, however.
+
+If the bug is not already known, it should be reported.  It is very
+important to report bugs in a way that is useful and efficient.  For
+this, please familiarize yourself with
+@uref{http://www.chiark.greenend.org.uk/@/~sgtatham/@/bugs.html, How to
+Report Bugs Effectively} and
+@uref{http://catb.org/@/~esr/@/faqs/@/smart-questions.html, How to Ask
+Questions the Smart Way}.  This helps you and developers to save time
+which can then be spent on fixing more bugs and implementing more
+features.
+
+For a bug report, a feature request or other suggestions, please send
+email to @email{@value{PACKAGE_BUGREPORT}}.  This will then open a new
+bug in the @uref{http://debbugs.gnu.org/@/automake, bug tracker}.  Be
+sure to include the versions of Autoconf and Automake that you use.
+Ideally, post a minimal @file{Makefile.am} and @file{configure.ac} that
+reproduces the problem you encounter.  If you have encountered test
+suite failures, please attach the @file{tests/test-suite.log} file.
+
+
 @node History
 @chapter History of Automake
 
@@ -12447,7 +12638,7 @@ for dependency tracking work in Automake.
 * First Take on Dependencies::  Precomputed dependency tracking
 * Dependencies As Side Effects::  Update at developer compile time
 * Dependencies for the User::   Update at user compile time
-* Techniques for Dependencies:: Alternative approaches
+* Techniques for Dependencies::  Alternative approaches
 * Recommendations for Tool Writers::  What tool writers can do to help
 * Future Directions for Dependencies::  Languages Automake does not know
 @end menu
@@ -12846,8 +13037,6 @@ parentheses is the number of generated test cases.
 @printindex cp
 
 
-@page
-@contents
 @bye
 
 @c  LocalWords:  texinfo setfilename settitle setchapternewpage texi direntry
diff --git a/lib/.cvsignore b/lib/.cvsignore
deleted file mode 100644 (file)
index f3c7a7c..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Makefile
diff --git a/lib/Automake/.cvsignore b/lib/Automake/.cvsignore
deleted file mode 100644 (file)
index bbad8cb..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-Makefile
-Config.pm
index a740603..aaca979 100644 (file)
@@ -1,4 +1,5 @@
-# Copyright (C) 2002, 2003, 2006, 2008, 2009 Free Software Foundation, Inc.
+# Copyright (C) 2002, 2003, 2006, 2008, 2009, 2010 Free Software
+# Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -79,7 +80,7 @@ Fatal errors.  Use C<&fatal> to send messages over this channel.
 
 =item C<error>
 
-Common errors.   Use C<&error> to send messages over this channel.
+Common errors.  Use C<&error> to send messages over this channel.
 
 =item C<error-gnu>
 
@@ -147,7 +148,7 @@ register_channel 'automake', type => 'fatal', backtrace => 1,
   header => ("####################\n" .
             "## Internal Error ##\n" .
             "####################\n"),
-  footer => "\nPlease contact <bug-automake\@gnu.org>.",
+  footer => "\nPlease contact <$PACKAGE_BUGREPORT>.",
   uniq_part => UP_NONE, ordered => 0;
 
 register_channel 'gnu', type => 'warning';
index b4908c0..9a2732c 100644 (file)
@@ -15,7 +15,7 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 ###############################################################
-# The main copy of this file is in Automake's CVS repository. #
+# The main copy of this file is in Automake's git repository. #
 # Updates should be sent to automake-patches@gnu.org.         #
 ###############################################################
 
@@ -500,7 +500,7 @@ sub _print_message ($$%)
   my $msg = _format_message ($location, $message, %opts);
   if ($opts{'partial'})
     {
-      # Incomplete message.   Store, don't print.
+      # Incomplete message.  Store, don't print.
       $partial .= $msg;
       return;
     }
index 29a184f..b6674dc 100644 (file)
@@ -1,4 +1,5 @@
-# Copyright (C) 2003, 2004, 2008  Free Software Foundation, Inc.  -*- Perl -*-
+#  -*- Perl -*-
+# Copyright (C) 2003, 2004, 2008, 2010 Free Software Foundation, Inc.
 # @configure_input@
 
 # This program is free software; you can redistribute it and/or modify
@@ -21,17 +22,19 @@ use 5.006;
 require Exporter;
 
 our @ISA = qw (Exporter);
-our @EXPORT = qw ($APIVERSION $PACKAGE $VERSION $libdir $perl_threads);
+our @EXPORT = qw ($APIVERSION $PACKAGE $PACKAGE_BUGREPORT $VERSION $libdir
+                 $perl_threads);
 
 # Parameters set by configure.  Not to be changed.  NOTE: assign
 # VERSION as string so that e.g. version 0.30 will print correctly.
 our $APIVERSION = '@APIVERSION@';
 our $PACKAGE = '@PACKAGE@';
+our $PACKAGE_BUGREPORT = '@PACKAGE_BUGREPORT@';
 our $VERSION = '@VERSION@';
 our $libdir = '@datadir@/@PACKAGE@-@APIVERSION@';
 our $perl_threads = @PERL_THREADS@;
 
-1;;
+1;
 
 ### Setup "GNU" style for perl-mode and cperl-mode.
 ## Local Variables:
index 646fad3..e2bebef 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright (C) 2003, 2005, 2006  Free Software Foundation, Inc.
+# Copyright (C) 2003, 2005, 2006, 2010 Free Software Foundation, Inc.
 
 # This 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 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 ###############################################################
-# The main copy of this file is in Automake's CVS repository. #
+# The main copy of this file is in Automake's git repository. #
 # Updates should be sent to automake-patches@gnu.org.         #
 ###############################################################
 
index e39750d..ba7afc0 100644 (file)
@@ -15,7 +15,7 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 ###############################################################
-# The main copy of this file is in Automake's CVS repository. #
+# The main copy of this file is in Automake's git repository. #
 # Updates should be sent to automake-patches@gnu.org.         #
 ###############################################################
 
index 3b9b863..0858b68 100644 (file)
@@ -1,7 +1,7 @@
 ## Process this file with automake to create Makefile.in
 
-# Copyright (C) 2001, 2002, 2003, 2004, 2008, 2009  Free Software Foundation,
-# Inc.
+# Copyright (C) 2001, 2002, 2003, 2004, 2008, 2009, 2010 Free Software
+# Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -52,6 +52,7 @@ CLEANFILES = $(nodist_perllib_DATA)
 do_subst = in=`echo $@ | sed 's/\.[^.]*$$//'`; sed \
   -e 's,[@]APIVERSION[@],$(APIVERSION),g' \
   -e 's,[@]PACKAGE[@],$(PACKAGE),g' \
+  -e 's,[@]PACKAGE_BUGREPORT[@],$(PACKAGE_BUGREPORT),g' \
   -e 's,[@]PERL[@],$(PERL),g' \
   -e 's,[@]PERL_THREADS[@],$(PERL_THREADS),g' \
   -e 's,[@]SHELL[@],$(SHELL),g' \
index 896bccf..5f051ed 100644 (file)
@@ -2,7 +2,7 @@
 # @configure_input@
 
 # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010  Free Software
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
 # Foundation, Inc.
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -15,8 +15,8 @@
 
 @SET_MAKE@
 
-# Copyright (C) 2001, 2002, 2003, 2004, 2008, 2009  Free Software Foundation,
-# Inc.
+# Copyright (C) 2001, 2002, 2003, 2004, 2008, 2009, 2010 Free Software
+# Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -254,6 +254,7 @@ CLEANFILES = $(nodist_perllib_DATA)
 do_subst = in=`echo $@ | sed 's/\.[^.]*$$//'`; sed \
   -e 's,[@]APIVERSION[@],$(APIVERSION),g' \
   -e 's,[@]PACKAGE[@],$(PACKAGE),g' \
+  -e 's,[@]PACKAGE_BUGREPORT[@],$(PACKAGE_BUGREPORT),g' \
   -e 's,[@]PERL[@],$(PERL),g' \
   -e 's,[@]PERL_THREADS[@],$(PERL_THREADS),g' \
   -e 's,[@]SHELL[@],$(SHELL),g' \
@@ -547,10 +548,15 @@ install-am: all-am
 
 installcheck: installcheck-recursive
 install-strip:
-       $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
-         install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
-         `test -z '$(STRIP)' || \
-           echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+       if test -z '$(STRIP)'; then \
+         $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+           install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+             install; \
+       else \
+         $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+           install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+           "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
+       fi
 mostlyclean-generic:
 
 clean-generic:
index 68b3ea5..3184b24 100644 (file)
@@ -1,4 +1,5 @@
-# Copyright (C) 2003, 2004, 2006, 2007  Free Software Foundation, Inc.
+# Copyright (C) 2003, 2004, 2006, 2007, 2010, 2011 Free Software
+# Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -126,7 +127,7 @@ use vars '%actions';
 
 =item <$suffix_rules>
 
-This maps the source extension for all suffix rule seen to
+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:
@@ -258,7 +259,7 @@ sub reject_rule ($$)
 =item C<accept_extensions (@exts)>
 
 Update C<$KNOWN_EXTENSIONS_PATTERN> to recognize the extensions
-listed C<@exts>.  Extensions should contain a dot if needed.
+listed in C<@exts>.  Extensions should contain a dot if needed.
 
 =cut
 
@@ -306,7 +307,7 @@ sub register_action ($$)
 
 =item C<Automake::Rule::reset>
 
-The I<forget all> function.  Clears all know rules and reset some
+The I<forget all> function.  Clears all known rules and resets some
 other internal data.
 
 =cut
@@ -374,7 +375,7 @@ sub reset()
      # Tarballing.
      'dist-all'             => [],
 
-     # Phoning.
+     # Phonying.
      '.PHONY'               => [],
      # Recursive install targets (so `make -n install' works for BSD Make).
      '.MAKE'               => [],
@@ -384,7 +385,7 @@ sub reset()
 
 =item C<register_suffix_rule ($where, $src, $dest)>
 
-Register a suffix rules defined on C<$where> that transform
+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.
@@ -406,11 +407,11 @@ sub register_suffix_rule ($$$)
   # CANNOT rewrite the target (i.e., automagically replace `.o'
   # and `.obj' by `.$(OBJEXT)' in the output), or warn the user
   # that (s)he'd better use `.$(OBJEXT)', because Automake itself
-  # output suffix rules for `.o' or `.obj'...
+  # 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...
+  # help to understand the update of $suffix_rules that follows ...
 
   # Register $dest as a possible destination from $src.
   # We might have the create the \hash.
@@ -488,7 +489,7 @@ sub suffixes ()
 =item C<rule ($rulename)>
 
 Return the C<Automake::Rule> object for the rule
-named C<$rulename> if defined.   Return 0 otherwise.
+named C<$rulename> if defined.  Return 0 otherwise.
 
 =cut
 
@@ -788,7 +789,7 @@ sub define ($$$$$)
     }
 
   # We honor inference rules with multiple targets because many
-  # make support this and people use it.  However this is disallowed
+  # makes support this and people use it.  However this is disallowed
   # by POSIX.  We'll print a warning later.
   my $target_count = 0;
   my $inference_rule_count = 0;
index 9745779..ae42db2 100644 (file)
@@ -1,5 +1,5 @@
 # autoconf -- create `configure' using m4 macros
-# Copyright (C) 2001, 2002, 2006 Free Software Foundation, Inc.
+# Copyright (C) 2001, 2002, 2006, 2010 Free Software Foundation, Inc.
 
 # This 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 @@
 # we would have two packages defining the same symbols.  Boom.
 
 ###############################################################
-# The main copy of this file is in Automake's CVS repository. #
+# The main copy of this file is in Automake's git repository. #
 # Updates should be sent to automake-patches@gnu.org.         #
 ###############################################################
 
index d7ba155..568c82a 100644 (file)
@@ -185,17 +185,8 @@ sub append ($$$)
   # Furthermore keeping `#' would not be portable if the variable is
   # output on multiple lines.
   $val =~ s/ ?#.*//;
-
-  if (chomp $val)
-    {
-      # Insert a backslash before a trailing newline.
-      $val .= "\\\n";
-    }
-  elsif ($val)
-    {
-      # Insert a separator.
-      $val .= ' ';
-    }
+  # Insert a separator, if required.
+  $val .= ' ' if $val;
   $self->{'value'} = $val . $value;
   # Turn ASIS appended variables into PRETTY variables.  This is to
   # cope with `make' implementation that cannot read very long lines.
index 3261360..cb9d182 100644 (file)
@@ -354,7 +354,7 @@ sub reset ()
 =item C<var ($varname)>
 
 Return the C<Automake::Variable> object for the variable
-named C<$varname> if defined.   Return 0 otherwise.
+named C<$varname> if defined.  Return 0 otherwise.
 
 =cut
 
index 8b2a7bc..347f8f6 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright (C) 2001, 2002, 2003  Free Software Foundation, Inc.
+# Copyright (C) 2001, 2002, 2003, 2010 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -39,7 +39,7 @@ C<MICRO> are digits, C<ALPHA> is a character, and C<FORK> any
 alphanumeric word.
 
 Usually, C<ALPHA> is used to label alpha releases or intermediate
-snapshots, C<FORK> is used for CVS branches or patched releases, and
+snapshots, C<FORK> is used for git branches or patched releases, and
 C<MICRO> is used for bug fixes releases on the C<MAJOR.MINOR> branch.
 
 For the purpose of ordering, C<1.4> is the same as C<1.4.0>, but
index 7c8f5eb..46483e6 100644 (file)
@@ -17,7 +17,7 @@
 # Written by Akim Demaille <akim@freefriends.org>.
 
 ###############################################################
-# The main copy of this file is in Automake's CVS repository. #
+# The main copy of this file is in Automake's git repository. #
 # Updates should be sent to automake-patches@gnu.org.         #
 ###############################################################
 
diff --git a/lib/Automake/tests/.cvsignore b/lib/Automake/tests/.cvsignore
deleted file mode 100644 (file)
index f3c7a7c..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Makefile
index 1401eb9..b4940db 100644 (file)
@@ -2,7 +2,7 @@
 # @configure_input@
 
 # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010  Free Software
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
 # Foundation, Inc.
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -116,7 +116,7 @@ am__text_box = $(AWK) '{                            \
   print line;                                          \
 }'
 # Solaris 10 'make', and several other traditional 'make' implementations,
-# pass "-e" to $(SHELL).  This contradicts POSIX.  Work around the problem
+# pass "-e" to $(SHELL), and POSIX 2008 even requires this.  Work around it
 # by disabling -e (using the XSI extension "set +e") if it's set.
 am__sh_e_setup = case $$- in *e*) set +e;; esac
 # To be inserted before the command running the test.  Creates the
@@ -139,6 +139,35 @@ elif test -f "$$f"; then dir=;                             \
 else dir="$(srcdir)/"; fi;                             \
 tst=$$dir$$f; log='$@'; __SAVED_TERM=$$TERM;           \
 $(TESTS_ENVIRONMENT)
+# To be appended to the command running the test.  Handle the stdout
+# and stderr redirection, and catch the exit status.
+am__check_post = \
+>$@-t 2>&1;                                            \
+estatus=$$?;                                           \
+if test -n '$(DISABLE_HARD_ERRORS)'                    \
+   && test $$estatus -eq 99; then                      \
+  estatus=1;                                           \
+fi;                                                    \
+TERM=$$__SAVED_TERM; export TERM;                      \
+$(am__tty_colors);                                     \
+xfailed=PASS;                                          \
+case " $(XFAIL_TESTS) " in                             \
+  *[\ \        ]$$f[\ \        ]* | *[\ \      ]$$dir$$f[\ \   ]*) \
+    xfailed=XFAIL;;                                    \
+esac;                                                  \
+case $$estatus.$$xfailed in                            \
+    0.XFAIL) col=$$red; res=XPASS;;                    \
+    0.*)     col=$$grn; res=PASS ;;                    \
+    77.*)    col=$$blu; res=SKIP ;;                    \
+    99.*)    col=$$red; res=FAIL ;;                    \
+    *.XFAIL) col=$$lgn; res=XFAIL;;                    \
+    *.*)     col=$$red; res=FAIL ;;                    \
+esac;                                                  \
+echo "$${col}$$res$${std}: $$f";                       \
+echo "$$res: $$f (exit: $$estatus)" |                  \
+  $(am__rst_section) >$@;                              \
+cat $@-t >>$@;                                         \
+rm -f $@-t
 RECHECK_LOGS = $(TEST_LOGS)
 AM_RECURSIVE_TARGETS = check check-html recheck recheck-html
 TEST_SUITE_LOG = test-suite.log
@@ -291,41 +320,12 @@ ctags: CTAGS
 CTAGS:
 
 
-# To be appended to the command running the test.  Handle the stdout
-# and stderr redirection, and catch the exit status.
-am__check_post =                                       \
->$@-t 2>&1;                                            \
-estatus=$$?;                                           \
-if test -n '$(DISABLE_HARD_ERRORS)'                    \
-   && test $$estatus -eq 99; then                      \
-  estatus=1;                                           \
-fi;                                                    \
-TERM=$$__SAVED_TERM; export TERM;                      \
-$(am__tty_colors);                                     \
-xfailed=PASS;                                          \
-case " $(XFAIL_TESTS) " in                             \
-  *[\ \        ]$$f[\ \        ]* | *[\ \      ]$$dir$$f[\ \   ]*) \
-    xfailed=XFAIL;;                                    \
-esac;                                                  \
-case $$estatus:$$xfailed in                            \
-    0:XFAIL) col=$$red; res=XPASS;;                    \
-    0:*)     col=$$grn; res=PASS ;;                    \
-    77:*)    col=$$blu; res=SKIP ;;                    \
-    99:*)    col=$$red; res=FAIL ;;                    \
-    *:XFAIL) col=$$lgn; res=XFAIL;;                    \
-    *:*)     col=$$red; res=FAIL ;;                    \
-esac;                                                  \
-echo "$${col}$$res$${std}: $$f";                       \
-echo "$$res: $$f (exit: $$estatus)" |                  \
-  $(am__rst_section) >$@;                              \
-cat $@-t >>$@;                                         \
-rm -f $@-t
-
 $(TEST_SUITE_LOG): $(TEST_LOGS)
        @$(am__sh_e_setup);                                             \
        list='$(TEST_LOGS)';                                            \
        results=`for f in $$list; do                                    \
-                  read line < $$f && echo "$$line" || echo FAIL;       \
+                  test -r $$f && read line < $$f && echo "$$line"      \
+                    || echo FAIL;                                      \
                 done`;                                                 \
        all=`echo "$$results" | sed '/^$$/d' | wc -l | sed -e 's/^[      ]*//'`; \
        fail=`echo "$$results" | grep -c '^FAIL'`;                      \
@@ -374,7 +374,7 @@ $(TEST_SUITE_LOG): $(TEST_LOGS)
          echo ".. contents:: :depth: 2";                               \
          echo;                                                         \
          for f in $$list; do                                           \
-           read line < $$f;                                            \
+           test -r $$f && read line < $$f || line=;                    \
            case $$line in                                              \
              PASS:*|XFAIL:*);;                                         \
              *) echo; cat $$f;;                                        \
@@ -438,10 +438,11 @@ recheck recheck-html:
        list='$(TEST_LOGS)';                                            \
        list=`for f in $$list; do                                       \
                test -f $$f || continue;                                \
-               if read line < $$f; then                                \
+               if test -r $$f && read line < $$f; then                 \
                  case $$line in FAIL*|XPASS*) echo $$f;; esac;         \
                else echo $$f; fi;                                      \
              done | tr '\012\015' '  '`;                               \
+       list=`echo "$$list" | sed 's/ *$$//'`;                          \
        $(MAKE) $(AM_MAKEFLAGS) $$target AM_MAKEFLAGS='$(AM_MAKEFLAGS) TEST_LOGS="'"$$list"'"'
 .pl.log:
        @p='$<'; $(am__check_pre) $(PL_LOG_COMPILE) "$$tst" $(am__check_post)
@@ -491,10 +492,15 @@ install-am: all-am
 
 installcheck: installcheck-am
 install-strip:
-       $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
-         install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
-         `test -z '$(STRIP)' || \
-           echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+       if test -z '$(STRIP)'; then \
+         $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+           install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+             install; \
+       else \
+         $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+           install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+           "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
+       fi
 mostlyclean-generic:
        -test -z "$(TEST_LOGS)" || rm -f $(TEST_LOGS)
        -test -z "$(TEST_LOGS_TMP)" || rm -f $(TEST_LOGS_TMP)
index f90b085..d9e41e2 100644 (file)
@@ -2,7 +2,7 @@
 # @configure_input@
 
 # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010  Free Software
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
 # Foundation, Inc.
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -519,10 +519,15 @@ install-am: all-am
 
 installcheck: installcheck-recursive
 install-strip:
-       $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
-         install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
-         `test -z '$(STRIP)' || \
-           echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+       if test -z '$(STRIP)'; then \
+         $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+           install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+             install; \
+       else \
+         $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+           install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+           "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
+       fi
 mostlyclean-generic:
 
 clean-generic:
diff --git a/lib/am/.cvsignore b/lib/am/.cvsignore
deleted file mode 100644 (file)
index f3c7a7c..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Makefile
index 8924d17..352c64f 100644 (file)
@@ -2,7 +2,7 @@
 # @configure_input@
 
 # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010  Free Software
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
 # Foundation, Inc.
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -333,10 +333,15 @@ install-am: all-am
 
 installcheck: installcheck-am
 install-strip:
-       $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
-         install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
-         `test -z '$(STRIP)' || \
-           echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+       if test -z '$(STRIP)'; then \
+         $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+           install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+             install; \
+       else \
+         $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+           install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+           "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
+       fi
 mostlyclean-generic:
 
 clean-generic:
index 755bf13..4d10ce9 100644 (file)
@@ -1,6 +1,6 @@
 ## automake - create Makefile.in from Makefile.am
-## Copyright (C) 2001, 2003, 2006, 2007, 2008, 2009, 2010 Free Software
-## Foundation, Inc.
+## Copyright (C) 2001, 2003, 2006, 2007, 2008, 2009, 2010, 2011 Free
+## Software Foundation, Inc.
 
 ## This program is free software; you can redistribute it and/or modify
 ## it under the terms of the GNU General Public License as published by
@@ -87,7 +87,7 @@ am__text_box = $(AWK) '{                              \
 }'
 
 # Solaris 10 'make', and several other traditional 'make' implementations,
-# pass "-e" to $(SHELL).  This contradicts POSIX.  Work around the problem
+# pass "-e" to $(SHELL), and POSIX 2008 even requires this.  Work around it
 # by disabling -e (using the XSI extension "set +e") if it's set.
 am__sh_e_setup = case $$- in *e*) set +e;; esac
 
@@ -128,13 +128,13 @@ case " $(XFAIL_TESTS) " in                                \
   *[\ \        ]$$f[\ \        ]* | *[\ \      ]$$dir$$f[\ \   ]*) \
     xfailed=XFAIL;;                                    \
 esac;                                                  \
-case $$estatus:$$xfailed in                            \
-    0:XFAIL) col=$$red; res=XPASS;;                    \
-    0:*)     col=$$grn; res=PASS ;;                    \
-    77:*)    col=$$blu; res=SKIP ;;                    \
-    99:*)    col=$$red; res=FAIL ;;                    \
-    *:XFAIL) col=$$lgn; res=XFAIL;;                    \
-    *:*)     col=$$red; res=FAIL ;;                    \
+case $$estatus.$$xfailed in                            \
+    0.XFAIL) col=$$red; res=XPASS;;                    \
+    0.*)     col=$$grn; res=PASS ;;                    \
+    77.*)    col=$$blu; res=SKIP ;;                    \
+    99.*)    col=$$red; res=FAIL ;;                    \
+    *.XFAIL) col=$$lgn; res=XFAIL;;                    \
+    *.*)     col=$$red; res=FAIL ;;                    \
 esac;                                                  \
 echo "$${col}$$res$${std}: $$f";                       \
 echo "$$res: $$f (exit: $$estatus)" |                  \
@@ -146,7 +146,8 @@ $(TEST_SUITE_LOG): $(TEST_LOGS)
        @$(am__sh_e_setup);                                             \
        list='$(TEST_LOGS)';                                            \
        results=`for f in $$list; do                                    \
-                  read line < $$f && echo "$$line" || echo FAIL;       \
+                  test -r $$f && read line < $$f && echo "$$line"      \
+                    || echo FAIL;                                      \
                 done`;                                                 \
        all=`echo "$$results" | sed '/^$$/d' | wc -l | sed -e 's/^[      ]*//'`; \
        fail=`echo "$$results" | grep -c '^FAIL'`;                      \
@@ -195,7 +196,7 @@ $(TEST_SUITE_LOG): $(TEST_LOGS)
          echo ".. contents:: :depth: 2";                               \
          echo;                                                         \
          for f in $$list; do                                           \
-           read line < $$f;                                            \
+           test -r $$f && read line < $$f || line=;                    \
            case $$line in                                              \
              PASS:*|XFAIL:*);;                                         \
              *) echo; cat $$f;;                                        \
@@ -234,6 +235,10 @@ check-TESTS:
 ## OTOH, this means that, in the rule for `$(TEST_SUITE_LOG)', we
 ## cannot use `$?' to compute the set of lazily rerun tests, lest
 ## we rely on .PHONY to work portably.
+##
+## Trailing whitespace in `TESTS = foo.test $(empty)' causes GNU make
+## 3.80 to erroneously expand $(TESTS_LOGS) to `foo.log .log'.
+## Work around this bug.
        @test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG)
        @list='$(TEST_LOGS)';                                           \
        list=`for f in $$list; do                                       \
@@ -287,10 +292,13 @@ recheck recheck-html:
        list='$(TEST_LOGS)';                                            \
        list=`for f in $$list; do                                       \
                test -f $$f || continue;                                \
-               if read line < $$f; then                                \
+               if test -r $$f && read line < $$f; then                 \
                  case $$line in FAIL*|XPASS*) echo $$f;; esac;         \
                else echo $$f; fi;                                      \
              done | tr '\012\015' '  '`;                               \
+## This apparently useless munging helps to avoid a nasty bug (a
+## segmentation fault!) on Solaris XPG4 make.
+       list=`echo "$$list" | sed 's/ *$$//'`;                          \
        $(MAKE) $(AM_MAKEFLAGS) $$target AM_MAKEFLAGS='$(AM_MAKEFLAGS) TEST_LOGS="'"$$list"'"'
 
 .PHONY: recheck recheck-html
index d88656c..e0f3bce 100644 (file)
@@ -140,7 +140,7 @@ endif %?TOPDIR_P%
 ## we are not stripping a legitimate filename that starts with the
 ## same pattern as $(srcdir)?
 ## Well, it can't happen without the Makefile author distributing
-## something out of the distribution (which is bad).   As an example,
+## something out of the distribution (which is bad).  As an example,
 ## consider `EXTRA_DIST = ../bar'.  This is an issue if $srcdir is `..',
 ## however getting this value for srcdir is impossible: `EXTRA_DIST = ../bar'
 ## implies we are in a subdirectory (so `../bar' is within the package),
index d261070..01ae49a 100644 (file)
@@ -1,5 +1,5 @@
 ## automake - create Makefile.in from Makefile.am
-## Copyright (C) 2001, 2002, 2003, 2004, 2006, 2008, 2009  Free Software
+## Copyright (C) 2001, 2002, 2003, 2004, 2006, 2008, 2009, 2010 Free Software
 ## Foundation, Inc.
 
 ## This program is free software; you can redistribute it and/or modify
@@ -90,9 +90,17 @@ install-strip:
 ## It's OK to override both with INSTALL_STRIP_PROGRAM, because
 ## INSTALL_STRIP_PROGRAM uses install-sh (see m4/strip.m4 for a rationale).
 ##
-## Use double quotes here because we might need to interpolate some
-## backquotes at runtime.
-       $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
-         install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
-         `test -z '$(STRIP)' || \
-           echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+## Use double quotes for the *_PROGRAM settings because we might need to
+## interpolate some backquotes at runtime.
+##
+## The case for empty $(STRIP) is separate so that it is quoted correctly for
+## multiple words, but does not expand to an empty words if STRIP is empty.
+       if test -z '$(STRIP)'; then \
+         $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+           install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+             install; \
+       else \
+         $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+           install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+           "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
+       fi
index 3449d18..ab45b30 100644 (file)
@@ -1,6 +1,6 @@
 ## automake - create Makefile.in from Makefile.am
 ## Copyright (C) 1996, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
-## 2007, 2008, 2009 Free Software Foundation, Inc.
+## 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
 
 ## This program is free software; you can redistribute it and/or modify
 ## it under the terms of the GNU General Public License as published by
@@ -49,7 +49,16 @@ $(am__ELCFILES): elc-stamp
 ##
 ## Do not call `make elc-stamp' if emacs is not available, because it would
 ## be useless.
-       @if test "$(EMACS)" != no && test ! -f $@; then \
+##
+## If `make -n' is called, do not execute any command in the recipe that
+## changes the tree; however, invoke the recursive make for debuggability.
+       @dry=; for f in x $$MAKEFLAGS; do \
+         case $$f in \
+           *=*|--*);; \
+           *n*) dry=:;; \
+         esac; \
+       done; \
+       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
@@ -58,18 +67,18 @@ $(am__ELCFILES): elc-stamp
 ## 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.
-         trap 'rm -rf elc-lock elc-stamp' 1 2 13 15; \
-         if mkdir elc-lock 2>/dev/null; then \
+         $$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.
-           rm -f elc-stamp; \
+           $$dry rm -f elc-stamp; \
            $(MAKE) $(AM_MAKEFLAGS) elc-stamp; \
-           rmdir elc-lock; \
+           $$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; do sleep 1; done; \
+           while test -d elc-lock && test -z "$$dry"; do sleep 1; done; \
 ## Succeed if and only if the first process succeeded.
-           test -f elc-stamp; exit $$?; \
+           $$dry test -f elc-stamp; exit $$?; \
          fi; \
        else : ; fi
 
index 5077be2..35f4a46 100644 (file)
@@ -1,6 +1,6 @@
 ## automake - create Makefile.in from Makefile.am
 ## Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2001, 2003, 2004, 2005,
-## 2008, 2009 Free Software Foundation, Inc.
+## 2008, 2009, 2010 Free Software Foundation, Inc.
 
 ## This program is free software; you can redistribute it and/or modify
 ## it under the terms of the GNU General Public License as published by
 
 %CONFIG_H%: %STAMP%
 ## Recover from removal of CONFIG_HEADER
-       @if test ! -f $@; then \
-         rm -f %STAMP%; \
-         $(MAKE) $(AM_MAKEFLAGS) %STAMP%; \
-       else :; fi
+       @if test ! -f $@; then rm -f %STAMP%; else :; fi
+       @if test ! -f $@; then $(MAKE) $(AM_MAKEFLAGS) %STAMP%; else :; fi
 
 
 %STAMP%: %CONFIG_H_DEPS% $(top_builddir)/config.status
index f2497ad..2dd0d51 100644 (file)
@@ -2,7 +2,7 @@
 # wanting multilib support.
 #
 # Copyright (C) 1995, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
-# 2005, 2006, 2007  Free Software Foundation, Inc.
+# 2005, 2006, 2007, 2008, 2010  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
@@ -517,6 +517,7 @@ multi-do:
                                prefix="$(prefix)" \
                                exec_prefix="$(exec_prefix)" \
                                GCJFLAGS="$(GCJFLAGS) $${flags}" \
+                               GOCFLAGS="$(GOCFLAGS) $${flags}" \
                                CXXFLAGS="$(CXXFLAGS) $${flags}" \
                                LIBCFLAGS="$(LIBCFLAGS) $${flags}" \
                                LIBCXXFLAGS="$(LIBCXXFLAGS) $${flags}" \
@@ -750,7 +751,7 @@ if [ -n "${multidirs}" ] && [ -z "${ml_norecursion}" ]; then
         break
       fi
     done
-    ml_config_env='CC="${CC_}$flags" CXX="${CXX_}$flags" F77="${F77_}$flags" GCJ="${GCJ_}$flags" GFORTRAN="${GFORTRAN_}$flags"'
+    ml_config_env='CC="${CC_}$flags" CXX="${CXX_}$flags" F77="${F77_}$flags" GCJ="${GCJ_}$flags" GFORTRAN="${GFORTRAN_}$flags" GOC="${GOC_}$flags"'
 
     if [ "${with_target_subdir}" = "." ]; then
        CC_=$CC' '
@@ -758,6 +759,7 @@ if [ -n "${multidirs}" ] && [ -z "${ml_norecursion}" ]; then
        F77_=$F77' '
        GCJ_=$GCJ' '
        GFORTRAN_=$GFORTRAN' '
+       GOC_=$GOC' '
     else
        # Create a regular expression that matches any string as long
        # as ML_POPDIR.
@@ -822,6 +824,18 @@ if [ -n "${multidirs}" ] && [ -z "${ml_norecursion}" ]; then
          esac
        done
 
+       GOC_=
+       for arg in ${GOC}; do
+         case $arg in
+         -[BIL]"${ML_POPDIR}"/*)
+           GOC_="${GOC_}"`echo "X${arg}" | sed -n "s/X\\(-[BIL]${popdir_rx}\\).*/\\1/p"`/${ml_dir}`echo "X${arg}" | sed -n "s/X-[BIL]${popdir_rx}\\(.*\\)/\\1/p"`' ' ;;
+         "${ML_POPDIR}"/*)
+           GOC_="${GOC_}"`echo "X${arg}" | sed -n "s/X\\(${popdir_rx}\\).*/\\1/p"`/${ml_dir}`echo "X${arg}" | sed -n "s/X${popdir_rx}\\(.*\\)/\\1/p"`' ' ;;
+         *)
+           GOC_="${GOC_}${arg} " ;;
+         esac
+       done
+
        if test "x${LD_LIBRARY_PATH+set}" = xset; then
          LD_LIBRARY_PATH_=
          for arg in `echo "$LD_LIBRARY_PATH" | tr ':' ' '`; do
index c2246a4..4c8f032 100755 (executable)
@@ -4,7 +4,7 @@
 #   2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
 #   Free Software Foundation, Inc.
 
-timestamp='2009-12-30'
+timestamp='2010-09-24'
 
 # 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
@@ -92,7 +92,7 @@ if test $# != 0; then
   exit 1
 fi
 
-trap 'exit 1' 1 2 15
+trap 'exit 1' HUP INT TERM
 
 # CC_FOR_BUILD -- compiler used by this script. Note that the use of a
 # compiler to aid in system detection is discouraged as it requires
@@ -106,7 +106,7 @@ trap 'exit 1' 1 2 15
 
 set_cc_for_build='
 trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ;
-trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ;
+trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" HUP INT PIPE TERM ;
 : ${TMPDIR=/tmp} ;
  { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
  { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } ||
@@ -552,7 +552,7 @@ EOF
                echo rs6000-ibm-aix3.2
        fi
        exit ;;
-    *:AIX:*:[456])
+    *:AIX:*:[4567])
        IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
        if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then
                IBM_ARCH=rs6000
@@ -968,6 +968,9 @@ EOF
     sparc:Linux:*:* | sparc64:Linux:*:*)
        echo ${UNAME_MACHINE}-unknown-linux-gnu
        exit ;;
+    tile*:Linux:*:*)
+       echo ${UNAME_MACHINE}-tilera-linux-gnu
+       exit ;;
     vax:Linux:*:*)
        echo ${UNAME_MACHINE}-dec-linux-gnu
        exit ;;
@@ -1231,6 +1234,9 @@ EOF
     *:QNX:*:4*)
        echo i386-pc-qnx
        exit ;;
+    NEO-?:NONSTOP_KERNEL:*:*)
+       echo neo-tandem-nsk${UNAME_RELEASE}
+       exit ;;
     NSE-?:NONSTOP_KERNEL:*:*)
        echo nse-tandem-nsk${UNAME_RELEASE}
        exit ;;
index 8518609..3ec94f1 100755 (executable)
@@ -4,7 +4,7 @@
 #   2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
 #   Free Software Foundation, Inc.
 
-timestamp='2009-12-31'
+timestamp='2010-12-11'
 
 # This file is (in principle) common to ALL GNU software.
 # The presence of a machine in this file suggests that SOME GNU software
@@ -124,8 +124,9 @@ esac
 # Here we must recognize all the valid KERNEL-OS combinations.
 maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
 case $maybe_os in
-  nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | linux-uclibc* | \
-  uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \
+  nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \
+  linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \
+  knetbsd*-gnu* | netbsd*-gnu* | \
   kopensolaris*-gnu* | \
   storm-chaos* | os2-emx* | rtmk-nova*)
     os=-$maybe_os
@@ -282,6 +283,7 @@ case $basic_machine in
        | moxie \
        | mt \
        | msp430 \
+       | nds32 | nds32le | nds32be \
        | nios | nios2 \
        | ns16k | ns32k \
        | or32 \
@@ -295,7 +297,7 @@ case $basic_machine in
        | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \
        | sparcv8 | sparcv9 | sparcv9b | sparcv9v \
        | spu | strongarm \
-       | tahoe | thumb | tic4x | tic80 | tron \
+       | tahoe | thumb | tic4x | tic54x | tic55x | tic6x | tic80 | tron \
        | ubicom32 \
        | v850 | v850e \
        | we32k \
@@ -303,6 +305,15 @@ case $basic_machine in
        | z8k | z80)
                basic_machine=$basic_machine-unknown
                ;;
+       c54x)
+               basic_machine=tic54x-unknown
+               ;;
+       c55x)
+               basic_machine=tic55x-unknown
+               ;;
+       c6x)
+               basic_machine=tic6x-unknown
+               ;;
        m6811 | m68hc11 | m6812 | m68hc12 | picochip)
                # Motorola 68HC11/12.
                basic_machine=$basic_machine-unknown
@@ -334,7 +345,7 @@ case $basic_machine in
        | arm-*  | armbe-* | armle-* | armeb-* | armv*-* \
        | avr-* | avr32-* \
        | bfin-* | bs2000-* \
-       | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \
+       | c[123]* | c30-* | [cjt]90-* | c4x-* \
        | clipper-* | craynv-* | cydra-* \
        | d10v-* | d30v-* | dlx-* \
        | elxsi-* \
@@ -368,6 +379,7 @@ case $basic_machine in
        | mmix-* \
        | mt-* \
        | msp430-* \
+       | nds32-* | nds32le-* | nds32be-* \
        | nios-* | nios2-* \
        | none-* | np1-* | ns16k-* | ns32k-* \
        | orion-* \
@@ -381,7 +393,8 @@ case $basic_machine in
        | sparclite-* \
        | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \
        | tahoe-* | thumb-* \
-       | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* | tile-* \
+       | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
+       | tile-* | tilegx-* \
        | tron-* \
        | ubicom32-* \
        | v850-* | v850e-* | vax-* \
@@ -481,6 +494,15 @@ case $basic_machine in
                basic_machine=powerpc-ibm
                os=-cnk
                ;;
+       c54x-*)
+               basic_machine=tic54x-`echo $basic_machine | sed 's/^[^-]*-//'`
+               ;;
+       c55x-*)
+               basic_machine=tic55x-`echo $basic_machine | sed 's/^[^-]*-//'`
+               ;;
+       c6x-*)
+               basic_machine=tic6x-`echo $basic_machine | sed 's/^[^-]*-//'`
+               ;;
        c90)
                basic_machine=c90-cray
                os=-unicos
@@ -517,7 +539,7 @@ case $basic_machine in
                basic_machine=craynv-cray
                os=-unicosmp
                ;;
-       cr16)
+       cr16 | cr16-*)
                basic_machine=cr16-unknown
                os=-elf
                ;;
@@ -840,6 +862,12 @@ case $basic_machine in
        np1)
                basic_machine=np1-gould
                ;;
+        neo-tandem)
+               basic_machine=neo-tandem
+               ;;
+        nse-tandem)
+               basic_machine=nse-tandem
+               ;;
        nsr-tandem)
                basic_machine=nsr-tandem
                ;;
@@ -1074,17 +1102,10 @@ case $basic_machine in
                basic_machine=t90-cray
                os=-unicos
                ;;
-       tic54x | c54x*)
-               basic_machine=tic54x-unknown
-               os=-coff
-               ;;
-       tic55x | c55x*)
-               basic_machine=tic55x-unknown
-               os=-coff
-               ;;
-       tic6x | c6x*)
-               basic_machine=tic6x-unknown
-               os=-coff
+        # This must be matched before tile*.
+        tilegx*)
+               basic_machine=tilegx-unknown
+               os=-linux-gnu
                ;;
        tile*)
                basic_machine=tile-unknown
@@ -1295,7 +1316,8 @@ case $os in
              | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
              | -chorusos* | -chorusrdb* | -cegcc* \
              | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
-             | -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \
+             | -mingw32* | -linux-gnu* | -linux-android* \
+             | -linux-newlib* | -linux-uclibc* \
              | -uxpv* | -beos* | -mpeix* | -udk* \
              | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
              | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
@@ -1478,6 +1500,15 @@ case $basic_machine in
         c4x-* | tic4x-*)
                os=-coff
                ;;
+       tic54x-*)
+               os=-coff
+               ;;
+       tic55x-*)
+               os=-coff
+               ;;
+       tic6x-*)
+               os=-coff
+               ;;
        # This must come before the *-dec entry.
        pdp10-*)
                os=-tops20
index 3f83ce9..a9244eb 100755 (executable)
@@ -1,7 +1,7 @@
 #!/bin/sh
 # install - install a program, script, or datafile
 
-scriptversion=2010-02-06.18; # UTC
+scriptversion=2011-01-19.21; # UTC
 
 # This originates from X11R5 (mit/util/scripts/install.sh), which was
 # later released in X11R6 (xc/config/util/install.sh) with the
@@ -156,6 +156,10 @@ while test $# -ne 0; do
     -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) no_target_directory=true;;
@@ -186,6 +190,10 @@ if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then
     fi
     shift # arg
     dst_arg=$arg
+    # Protect names problematic for `test' and other utilities.
+    case $dst_arg in
+      -* | [=\(\)!]) dst_arg=./$dst_arg;;
+    esac
   done
 fi
 
@@ -232,9 +240,9 @@ fi
 
 for src
 do
-  # Protect names starting with `-'.
+  # Protect names problematic for `test' and other utilities.
   case $src in
-    -*) src=./$src;;
+    -* | [=\(\)!]) src=./$src;;
   esac
 
   if test -n "$dir_arg"; then
@@ -256,12 +264,7 @@ do
       echo "$0: no destination specified." >&2
       exit 1
     fi
-
     dst=$dst_arg
-    # Protect names starting with `-'.
-    case $dst in
-      -*) dst=./$dst;;
-    esac
 
     # If destination is a directory, append the input filename; won't work
     # if double slashes aren't ignored.
@@ -389,7 +392,7 @@ do
 
       case $dstdir in
        /*) prefix='/';;
-       -*) prefix='./';;
+       [-=\(\)!]*) prefix='./';;
        *)  prefix='';;
       esac
 
@@ -407,7 +410,7 @@ do
 
       for d
       do
-       test -z "$d" && continue
+       test X"$d" = X && continue
 
        prefix=$prefix$d
        if test -d "$prefix"; then
index c477512..60dc485 100755 (executable)
@@ -1,7 +1,7 @@
 #!/bin/sh
 # Get modification time of a file or directory and pretty-print it.
 
-scriptversion=2010-02-22.21; # UTC
+scriptversion=2010-08-21.06; # UTC
 
 # Copyright (C) 1995, 1996, 1997, 2003, 2004, 2005, 2007, 2009, 2010
 # Free Software Foundation, Inc.
@@ -29,6 +29,15 @@ scriptversion=2010-02-22.21; # UTC
 # bugs to <bug-automake@gnu.org> or send patches to
 # <automake-patches@gnu.org>.
 
+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
+fi
+
 case $1 in
   '')
      echo "$0: No file.  Try \`$0 --help' for more information." 1>&2
@@ -51,6 +60,13 @@ EOF
     ;;
 esac
 
+error ()
+{
+  echo "$0: $1" >&2
+  exit 1
+}
+
+
 # Prevent date giving response in another language.
 LANG=C
 export LANG
@@ -100,6 +116,7 @@ month=
 command=
 until test $month
 do
+  test $# -gt 0 || error "failed parsing \`$ls_command /' output"
   shift
   # Add another shift to the command.
   command="$command shift;"
@@ -119,8 +136,10 @@ do
   esac
 done
 
+test -n "$month" || error "failed parsing \`$ls_command /' output"
+
 # Get the extended ls output of the file or directory.
-set dummy x`eval "$ls_command \"\$save_arg1\""`
+set dummy x`eval "$ls_command \"\\\$save_arg1\""`
 
 # Remove all preceding arguments
 eval $command
index 9140826..1130b8f 100644 (file)
@@ -3,11 +3,11 @@
 % Load plain if necessary, i.e., if running under initex.
 \expandafter\ifx\csname fmtname\endcsname\relax\input plain\fi
 %
-\def\texinfoversion{2009-08-14.15}
+\def\texinfoversion{2010-12-23.17}
 %
 % Copyright 1985, 1986, 1988, 1990, 1991, 1992, 1993, 1994, 1995,
 % 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
-% 2007, 2008, 2009 Free Software Foundation, Inc.
+% 2007, 2008, 2009, 2010 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
@@ -65,7 +65,6 @@
 \everyjob{\message{[Texinfo version \texinfoversion]}%
   \catcode`+=\active \catcode`\_=\active}
 
-
 \chardef\other=12
 
 % We never want plain's \outer definition of \+ in Texinfo.
 \let\ptexnewwrite\newwrite
 \let\ptexnoindent=\noindent
 \let\ptexplus=+
+\let\ptexraggedright=\raggedright
 \let\ptexrbrace=\}
 \let\ptexslash=\/
 \let\ptexstar=\*
 \let\ptext=\t
 \let\ptextop=\top
-{\catcode`\'=\active
-\global\let\ptexquoteright'}% Math-mode def from plain.tex.
-\let\ptexraggedright=\raggedright
+{\catcode`\'=\active \global\let\ptexquoteright'}% active in plain's math mode
 
 % If this character appears in an error message or help string, it
 % starts a new line in the output.
 % that mark overfull boxes (in case you have decided
 % that the text looks ok even though it passes the margin).
 %
-\def\finalout{\overfullrule=0pt}
-
-% @| 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).
-%
-\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
-    }%
-  }%
-}
+\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,
 \def\bigbreak{\ifnum\lastpenalty<10000\par\ifdim\lastskip<\bigskipamount
   \removelastskip\penalty-200\bigskip\fi\fi}
 
-% For @cropmarks command.
 % Do @cropmarks to get crop marks.
 %
 \newif\ifcropmarks
 \newhelp\EMsimple{Press RETURN to continue.}
 
 
-%% Simple single-character @ commands
-
-% @@ prints an @
-% Kludge this until the fonts are right (grr).
-\def\@{{\tt\char64}}
-
-% This is turned off because it was never documented
-% and you can use @w{...} around a quote to suppress ligatures.
-%% Define @` and @' to be the same as ` and '
-%% but suppressing ligatures.
-%\def\`{{`}}
-%\def\'{{'}}
-
-% Used to generate quoted braces.
-\def\mylbrace {{\tt\char123}}
-\def\myrbrace {{\tt\char125}}
-\let\{=\mylbrace
-\let\}=\myrbrace
-\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
-
-% @comma{} to avoid , parsing problems.
-\let\comma = ,
-
-% Accents: @, @dotaccent @ringaccent @ubaraccent @udotaccent
-% Others are defined by plain TeX: @` @' @" @^ @~ @= @u @v @H.
-\let\, = \c
-\let\dotaccent = \.
-\def\ringaccent#1{{\accent23 #1}}
-\let\tieaccent = \t
-\let\ubaraccent = \b
-\let\udotaccent = \d
-
-% Other special characters: @questiondown @exclamdown @ordf @ordm
-% 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}}}
-
-% Dotless i and dotless j, used for accents.
-\def\imacro{i}
-\def\jmacro{j}
-\def\dotless#1{%
-  \def\temp{#1}%
-  \ifx\temp\imacro \ifmmode\imath \else\ptexi \fi
-  \else\ifx\temp\jmacro \ifmmode\jmath \else\j \fi
-  \else \errmessage{@dotless can be used only with i or j}%
-  \fi\fi
-}
-
-% The \TeX{} logo, as in plain, but resetting the spacing so that a
-% period following counts as ending a sentence.  (Idea found in latex.)
-%
-\edef\TeX{\TeX \spacefactor=1000 }
-
-% @LaTeX{} logo.  Not quite the same results as the definition in
-% latex.ltx, since we use a different font for the raised A; it's most
-% convenient for us to use an explicitly smaller font, rather than using
-% the \scriptstyle font (since we don't reset \scriptstyle and
-% \scriptscriptstyle).
-%
-\def\LaTeX{%
-  L\kern-.36em
-  {\setbox0=\hbox{T}%
-   \vbox to \ht0{\hbox{\selectfonts\lllsize A}\vss}}%
-  \kern-.15em
-  \TeX
-}
-
 % Be sure we're in horizontal mode when doing a tie, since we make space
 % equivalent to this in @example-like environments. Otherwise, a space
 % at the beginning of a line will start with \penalty -- and
@@ -873,7 +762,7 @@ where each line of input produces a line of output.}
 
 % @inmargin{WHICH}{TEXT} puts TEXT in the WHICH margin next to the current
 % paragraph.  For more general purposes, use the \margin insertion
-% class.  WHICH is `l' or `r'.
+% class.  WHICH is `l' or `r'.  Not documented, written for gawk manual.
 %
 \newskip\inmarginspacing \inmarginspacing=1cm
 \def\strutdepth{\dp\strutbox}
@@ -920,6 +809,36 @@ 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}
@@ -1095,109 +1014,6 @@ where each line of input produces a line of output.}
 }
 
 
-% @asis just yields its argument.  Used with @table, for example.
-%
-\def\asis#1{#1}
-
-% @math outputs its argument in math mode.
-%
-% One complication: _ usually means subscripts, but it could also mean
-% an actual _ character, as in @math{@var{some_variable} + 1}.  So make
-% _ active, and distinguish by seeing if the current family is \slfam,
-% which is what @var uses.
-{
-  \catcode`\_ = \active
-  \gdef\mathunderscore{%
-    \catcode`\_=\active
-    \def_{\ifnum\fam=\slfam \_\else\sb\fi}%
-  }
-}
-% Another complication: we want \\ (and @\) to output a \ character.
-% FYI, plain.tex uses \\ as a temporary control sequence (why?), but
-% this is not advertised and we don't care.  Texinfo does not
-% otherwise define @\.
-%
-% The \mathchar is class=0=ordinary, family=7=ttfam, position=5C=\.
-\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
-}
-\def\finishmath#1{#1$\endgroup}  % Close the group opened by \tex.
-
-% Some active characters (such as <) are spaced differently in math.
-% We have to reset their definitions in case the @math was an argument
-% to a command which sets the catcodes (such as @item or @section).
-%
-{
-  \catcode`^ = \active
-  \catcode`< = \active
-  \catcode`> = \active
-  \catcode`+ = \active
-  \catcode`' = \active
-  \gdef\mathactive{%
-    \let^ = \ptexhat
-    \let< = \ptexless
-    \let> = \ptexgtr
-    \let+ = \ptexplus
-    \let' = \ptexquoteright
-  }
-}
-
-% 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}
-
-% @dots{} outputs an ellipsis using the current font.
-% We do .5em per period so that it has the same spacing in the cm
-% typewriter fonts as three actual period characters; on the other hand,
-% in other typewriter fonts three periods are wider than 1.5em.  So do
-% whichever is larger.
-%
-\def\dots{%
-  \leavevmode
-  \setbox0=\hbox{...}% get width of three periods
-  \ifdim\wd0 > 1.5em
-    \dimen0 = \wd0
-  \else
-    \dimen0 = 1.5em
-  \fi
-  \hbox to \dimen0{%
-    \hskip 0pt plus.25fil
-    .\hskip 0pt plus1fil
-    .\hskip 0pt plus1fil
-    .\hskip 0pt plus.5fil
-  }%
-}
-
-% @enddots{} is an end-of-sentence ellipsis.
-%
-\def\enddots{%
-  \dots
-  \spacefactor=\endofsentencespacefactor
-}
-
-% @comma{} is so commas can be inserted into text without messing up
-% Texinfo's parsing.
-%
-\let\comma = ,
-
 % @refill is a no-op.
 \let\refill=\relax
 
@@ -1492,6 +1308,7 @@ output) for that.)}
       \edef\myrbrace{\iffalse{\else\string}\fi}\let\}=\myrbrace
       %
       % Read toc silently, to get counts of subentries for \pdfoutline.
+      \def\partentry##1##2##3##4{}% ignore parts in the outlines
       \def\numchapentry##1##2##3##4{%
        \def\thischapnum{##2}%
        \def\thissecnum{0}%
@@ -2105,8 +1922,8 @@ end
 \font\reducedsy=cmsy10
 \def\reducedecsize{1000}
 
-% reset the current fonts
-\textfonts
+\textleading = 13.2pt % line spacing for 11pt CM
+\textfonts            % reset the current fonts
 \rm
 } % end of 11pt text font size definitions
 
@@ -2236,11 +2053,9 @@ end
 \font\reducedsy=cmsy9
 \def\reducedecsize{0900}
 
-% reduce space between paragraphs
-\divide\parskip by 2
-
-% reset the current fonts
-\textfonts
+\divide\parskip by 2  % reduce space between paragraphs
+\textleading = 12pt   % line spacing for 10pt CM
+\textfonts            % reset the current fonts
 \rm
 } % end of 10pt text font size definitions
 
@@ -2249,8 +2064,9 @@ end
 %   @fonttextsize 10
 % (or 11) to redefine the text font size.  pt is assumed.
 %
-\def\xword{10}
 \def\xiword{11}
+\def\xword{10}
+\def\xwordpt{10pt}
 %
 \parseargdef\fonttextsize{%
   \def\textsizearg{#1}%
@@ -2308,7 +2124,7 @@ end
   \let\tenttsl=\titlettsl
   \def\curfontsize{title}%
   \def\lsize{chap}\def\lllsize{subsec}%
-  \resetmathfonts \setleading{25pt}}
+  \resetmathfonts \setleading{27pt}}
 \def\titlefont#1{{\titlefonts\rmisbold #1}}
 \def\chapfonts{%
   \let\tenrm=\chaprm \let\tenit=\chapit \let\tensl=\chapsl
@@ -2460,14 +2276,19 @@ end
 
 \let\markupsetuplqcode \markupsetcodequoteleft
 \let\markupsetuprqcode \markupsetcodequoteright
+%
 \let\markupsetuplqexample \markupsetcodequoteleft
 \let\markupsetuprqexample \markupsetcodequoteright
+%
+\let\markupsetuplqsamp \markupsetcodequoteleft
+\let\markupsetuprqsamp \markupsetcodequoteright
+%
 \let\markupsetuplqverb \markupsetcodequoteleft
 \let\markupsetuprqverb \markupsetcodequoteright
+%
 \let\markupsetuplqverbatim \markupsetcodequoteleft
 \let\markupsetuprqverbatim \markupsetcodequoteright
 
-\let\markupsetuplqsamp \markupsetnoligaturesquoteleft
 \let\markupsetuplqkbd \markupsetnoligaturesquoteleft
 
 % Allow an option to not replace quotes with a regular directed right
@@ -2505,27 +2326,40 @@ end
 % Count depth in font-changes, for error checks
 \newcount\fontdepth \fontdepth=0
 
-%% Add scribe-like font environments, plus @l for inline lisp (usually sans
-%% serif) and @ii for TeX italic
+% Font commands.
+
+% #1 is the font command (\sl or \it), #2 is the text to slant.
+% If we are in a monospaced environment, however, 1) always use \ttsl,
+% and 2) do not add an italic correction.
+\def\dosmartslant#1#2{%
+  \ifusingtt 
+    {{\ttsl #2}\let\next=\relax}%
+    {\def\next{{#1#2}\futurelet\next\smartitaliccorrection}}%
+  \next
+}
+\def\smartslanted{\dosmartslant\sl}
+\def\smartitalic{\dosmartslant\it}
 
-% \smartitalic{ARG} outputs arg in italics, followed by an italic correction
-% unless the following character is such as not to need one.
-\def\smartitalicx{\ifx\next,\else\ifx\next-\else\ifx\next.\else
-                    \ptexslash\fi\fi\fi}
-\def\smartslanted#1{{\ifusingtt\ttsl\sl #1}\futurelet\next\smartitalicx}
-\def\smartitalic#1{{\ifusingtt\ttsl\it #1}\futurelet\next\smartitalicx}
+% Output an italic correction unless \next (presumed to be the following
+% character) is such as not to need one.
+\def\smartitaliccorrection{%
+  \ifx\next,%
+  \else\ifx\next-%
+  \else\ifx\next.%
+  \else\ptexslash
+  \fi\fi\fi}
 
-% like \smartslanted except unconditionally uses \ttsl.
+% like \smartslanted except unconditionally uses \ttsl, and no ic.
 % @var is set to this for defun arguments.
-\def\ttslanted#1{{\ttsl #1}\futurelet\next\smartitalicx}
+\def\ttslanted#1{{\ttsl #1}}
 
 % @cite is like \smartslanted except unconditionally use \sl.  We never want
 % ttsl for book titles, do we?
-\def\cite#1{{\sl #1}\futurelet\next\smartitalicx}
+\def\cite#1{{\sl #1}\futurelet\next\smartitaliccorrection}
 
 \let\i=\smartitalic
 \let\slanted=\smartslanted
-\def\var#1{{\setupmarkupstyle{var}\smartslanted{#1}}}
+\def\var#1{\smartslanted{#1}}
 \let\dfn=\smartslanted
 \let\emph=\smartitalic
 
@@ -2819,8 +2653,188 @@ end
   \fi
 }
 
+% @asis just yields its argument.  Used with @table, for example.
+%
+\def\asis#1{#1}
+
+% @math outputs its argument in math mode.
+%
+% One complication: _ usually means subscripts, but it could also mean
+% an actual _ character, as in @math{@var{some_variable} + 1}.  So make
+% _ active, and distinguish by seeing if the current family is \slfam,
+% which is what @var uses.
+{
+  \catcode`\_ = \active
+  \gdef\mathunderscore{%
+    \catcode`\_=\active
+    \def_{\ifnum\fam=\slfam \_\else\sb\fi}%
+  }
+}
+% Another complication: we want \\ (and @\) to output a math (or tt) \.
+% FYI, plain.tex uses \\ as a temporary control sequence (for no
+% particular reason), but this is not advertised and we don't care.
+%
+% The \mathchar is class=0=ordinary, family=7=ttfam, position=5C=\.
+\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
+}
+\def\finishmath#1{#1$\endgroup}  % Close the group opened by \tex.
+
+% Some active characters (such as <) are spaced differently in math.
+% We have to reset their definitions in case the @math was an argument
+% to a command which sets the catcodes (such as @item or @section).
+%
+{
+  \catcode`^ = \active
+  \catcode`< = \active
+  \catcode`> = \active
+  \catcode`+ = \active
+  \catcode`' = \active
+  \gdef\mathactive{%
+    \let^ = \ptexhat
+    \let< = \ptexless
+    \let> = \ptexgtr
+    \let+ = \ptexplus
+    \let' = \ptexquoteright
+  }
+}
+
 
 \message{glyphs,}
+% and logos.
+
+% @@ prints an @.
+\def\@{\char64 }
+
+% Used to generate quoted braces.  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\}=\myrbrace
+\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
+
+% @comma{} to avoid , parsing problems.
+\let\comma = ,
+
+% Accents: @, @dotaccent @ringaccent @ubaraccent @udotaccent
+% Others are defined by plain TeX: @` @' @" @^ @~ @= @u @v @H.
+\let\, = \ptexc
+\let\dotaccent = \ptexdot
+\def\ringaccent#1{{\accent23 #1}}
+\let\tieaccent = \ptext
+\let\ubaraccent = \ptexb
+\let\udotaccent = \d
+
+% Other special characters: @questiondown @exclamdown @ordf @ordm
+% 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}}}
+
+% Dotless i and dotless j, used for accents.
+\def\imacro{i}
+\def\jmacro{j}
+\def\dotless#1{%
+  \def\temp{#1}%
+  \ifx\temp\imacro \ifmmode\imath \else\ptexi \fi
+  \else\ifx\temp\jmacro \ifmmode\jmath \else\j \fi
+  \else \errmessage{@dotless can be used only with i or j}%
+  \fi\fi
+}
+
+% The \TeX{} logo, as in plain, but resetting the spacing so that a
+% period following counts as ending a sentence.  (Idea found in latex.)
+%
+\edef\TeX{\TeX \spacefactor=1000 }
+
+% @LaTeX{} logo.  Not quite the same results as the definition in
+% latex.ltx, since we use a different font for the raised A; it's most
+% convenient for us to use an explicitly smaller font, rather than using
+% the \scriptstyle font (since we don't reset \scriptstyle and
+% \scriptscriptstyle).
+%
+\def\LaTeX{%
+  L\kern-.36em
+  {\setbox0=\hbox{T}%
+   \vbox to \ht0{\hbox{%
+     \ifx\textnominalsize\xwordpt
+       % 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%
+     \fi
+     }%
+     \vss
+  }}%
+  \kern-.15em
+  \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}
+
+% @dots{} outputs an ellipsis using the current font.
+% We do .5em per period so that it has the same spacing in the cm
+% typewriter fonts as three actual period characters; on the other hand,
+% in other typewriter fonts three periods are wider than 1.5em.  So do
+% whichever is larger.
+%
+\def\dots{%
+  \leavevmode
+  \setbox0=\hbox{...}% get width of three periods
+  \ifdim\wd0 > 1.5em
+    \dimen0 = \wd0
+  \else
+    \dimen0 = 1.5em
+  \fi
+  \hbox to \dimen0{%
+    \hskip 0pt plus.25fil
+    .\hskip 0pt plus1fil
+    .\hskip 0pt plus1fil
+    .\hskip 0pt plus.5fil
+  }%
+}
+
+% @enddots{} is an end-of-sentence ellipsis.
+%
+\def\enddots{%
+  \dots
+  \spacefactor=\endofsentencespacefactor
+}
 
 % @point{}, @result{}, @expansion{}, @print{}, @equiv{}.
 %
@@ -3207,10 +3221,14 @@ end
 
 \def\headings #1 {\csname HEADINGS#1\endcsname}
 
-\def\HEADINGSoff{%
-\global\evenheadline={\hfil} \global\evenfootline={\hfil}
-\global\oddheadline={\hfil} \global\oddfootline={\hfil}}
-\HEADINGSoff
+\def\headingsoff{% non-global headings elimination
+  \evenheadline={\hfil}\evenfootline={\hfil}%
+   \oddheadline={\hfil}\oddfootline={\hfil}%
+}
+
+\def\HEADINGSoff{{\globaldefs=1 \headingsoff}} % global setting
+\HEADINGSoff  % it's the default
+
 % When we turn headings on, set the page number to 1.
 % For double-sided printing, put current file name in lower left corner,
 % chapter name on inside top of right hand pages, document
@@ -3322,7 +3340,7 @@ end
     \begingroup
       \advance\leftskip by-\tableindent
       \advance\hsize by\tableindent
-      \advance\rightskip by0pt plus1fil
+      \advance\rightskip by0pt plus1fil\relax
       \leavevmode\unhbox0\par
     \endgroup
     %
@@ -4134,11 +4152,14 @@ end
   \def\@{@}% change to @@ when we switch to @ as escape char in index files.
   \def\ {\realbackslash\space }%
   %
-  % Need these in case \tex is in effect and \{ is a \delimiter again.
-  % But can't use \lbracecmd and \rbracecmd because texindex assumes
-  % braces and backslashes are used only as delimiters.
-  \let\{ = \mylbrace
-  \let\} = \myrbrace
+  % 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
@@ -4191,7 +4212,7 @@ end
 \def\commondummies{%
   %
   % \definedummyword defines \#1 as \string\#1\space, thus effectively
-  % preventing its expansion.  This is used only for control% words,
+  % 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.
@@ -4210,6 +4231,7 @@ end
   \commondummiesnofonts
   %
   \definedummyletter\_%
+  \definedummyletter\-%
   %
   % Non-English letters.
   \definedummyword\AA
@@ -4246,20 +4268,24 @@ end
   \definedummyword\TeX
   %
   % Assorted special characters.
+  \definedummyword\arrow
   \definedummyword\bullet
   \definedummyword\comma
   \definedummyword\copyright
   \definedummyword\registeredsymbol
   \definedummyword\dots
   \definedummyword\enddots
+  \definedummyword\entrybreak
   \definedummyword\equiv
   \definedummyword\error
   \definedummyword\euro
+  \definedummyword\expansion
+  \definedummyword\geq
   \definedummyword\guillemetleft
   \definedummyword\guillemetright
   \definedummyword\guilsinglleft
   \definedummyword\guilsinglright
-  \definedummyword\expansion
+  \definedummyword\leq
   \definedummyword\minus
   \definedummyword\ogonek
   \definedummyword\pounds
@@ -4316,7 +4342,9 @@ end
   \definedummyword\b
   \definedummyword\i
   \definedummyword\r
+  \definedummyword\sansserif
   \definedummyword\sc
+  \definedummyword\slanted
   \definedummyword\t
   %
   % Commands that take arguments.
@@ -4325,10 +4353,12 @@ end
   \definedummyword\code
   \definedummyword\command
   \definedummyword\dfn
+  \definedummyword\dmn
   \definedummyword\email
   \definedummyword\emph
   \definedummyword\env
   \definedummyword\file
+  \definedummyword\indicateurl
   \definedummyword\kbd
   \definedummyword\key
   \definedummyword\math
@@ -4356,7 +4386,7 @@ end
   \def\definedummyaccent##1{\let##1\asis}%
   % We can just ignore other control letters.
   \def\definedummyletter##1{\let##1\empty}%
-  % Hopefully, all control words can become @asis.
+  % All control words become @asis by default; overrides below.
   \let\definedummyword\definedummyaccent
   %
   \commondummiesnofonts
@@ -4368,8 +4398,14 @@ end
   %
   \def\ { }%
   \def\@{@}%
-  % how to handle braces?
   \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\}{|b}%
   %
   % Non-English letters.
   \def\AA{AA}%
@@ -4397,6 +4433,7 @@ end
   %
   % 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}%
@@ -4406,10 +4443,12 @@ end
   \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}%
@@ -4424,6 +4463,9 @@ end
   \def\result{=>}%
   \def\textdegree{o}%
   %
+  \expandafter\ifx\csname SETtxiindexlquoteignore\endcsname\relax
+  \else \indexlquoteignore \fi
+  %
   % 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.
   % makeinfo does not expand macros in the argument to @deffn, which ends up
@@ -4437,6 +4479,11 @@ end
   \macrolist
 }
 
+% 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)?
 
@@ -4694,7 +4741,6 @@ end
 % 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{%
@@ -4731,10 +4777,17 @@ end
     % 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}%
+    %
     % Swallow the left brace of the text (first parameter):
     \afterassignment\doentry
     \let\temp =
 }
+\def\entrybreak{\unskip\space\ignorespaces}%
 \def\doentry{%
     \bgroup % Instead of the swallowed brace.
       \noindent
@@ -4967,7 +5020,22 @@ end
 \message{sectioning,}
 % Chapters, sections, etc.
 
-% \unnumberedno is an oxymoron, of course.  But we count the unnumbered
+% Let's start with @part.
+\outer\parseargdef\part{\partzzz{#1}}
+\def\partzzz#1{%
+  \chapoddpage
+  \null
+  \vskip.3\vsize  % move it down on the page a bit
+  \begingroup
+    \noindent \titlefonts\rmisbold #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
+    \chapoddpage
+  \endgroup
+}
+
+% \unnumberedno is an oxymoron.  But we count the unnumbered
 % sections so that we can refer to them unambiguously in the pdf
 % outlines by their "section number".  We avoid collisions with chapter
 % numbers by starting them at 10000.  (If a document ever has 10000
@@ -5046,8 +5114,8 @@ end
 \chardef\maxseclevel = 3
 %
 % A numbered section within an unnumbered changes to unnumbered too.
-% To achive this, remember the "biggest" unnum. sec. we are currently in:
-\chardef\unmlevel = \maxseclevel
+% To achieve this, remember the "biggest" unnum. sec. we are currently in:
+\chardef\unnlevel = \maxseclevel
 %
 % Trace whether the current chapter is an appendix or not:
 % \chapheadtype is "N" or "A", unnumbered chapters are ignored.
@@ -5072,8 +5140,8 @@ end
   % The heading type:
   \def\headtype{#1}%
   \if \headtype U%
-    \ifnum \absseclevel < \unmlevel
-      \chardef\unmlevel = \absseclevel
+    \ifnum \absseclevel < \unnlevel
+      \chardef\unnlevel = \absseclevel
     \fi
   \else
     % Check for appendix sections:
@@ -5085,10 +5153,10 @@ end
       \fi\fi
     \fi
     % Check for numbered within unnumbered:
-    \ifnum \absseclevel > \unmlevel
+    \ifnum \absseclevel > \unnlevel
       \def\headtype{U}%
     \else
-      \chardef\unmlevel = 3
+      \chardef\unnlevel = 3
     \fi
   \fi
   % Now print the heading:
@@ -5340,9 +5408,8 @@ end
   \chappager
   \ifodd\pageno \else
     \begingroup
-      \evenheadline={\hfil}\evenfootline={\hfil}%
-      \oddheadline={\hfil}\oddfootline={\hfil}%
-      \hbox to 0pt{}%
+      \headingsoff
+      \null
       \chappager
     \endgroup
   \fi
@@ -5785,6 +5852,7 @@ end
 \def\summarycontents{%
   \startcontents{\putwordShortTOC}%
     %
+    \let\partentry = \shortpartentry
     \let\numchapentry = \shortchapentry
     \let\appentry = \shortchapentry
     \let\unnchapentry = \shortunnchapentry
@@ -5840,6 +5908,19 @@ end
 % The last argument is the page number.
 % The arguments in between are the chapter number, section number, ...
 
+% Parts, in the main contents.  Replace the part number, which doesn't
+% exist, with an empty box.  Let's hope all the numbers have the same width.
+% Also ignore the page number, which is conventionally not printed.
+\def\numeralbox{\setbox0=\hbox{8}\hbox to \wd0{\hfil}}
+\def\partentry#1#2#3#4{\dochapentry{\numeralbox\labelspace#1}{}}
+%
+% Parts, in the short toc.
+\def\shortpartentry#1#2#3#4{%
+  \penalty-300
+  \vskip.5\baselineskip plus.15\baselineskip minus.1\baselineskip
+  \shortchapentry{{\bf #1}}{\numeralbox}{}{}%
+}
+
 % Chapters, in the main contents.
 \def\numchapentry#1#2#3#4{\dochapentry{#2\labelspace#1}{#4}}
 %
@@ -5929,9 +6010,9 @@ end
 \message{environments,}
 % @foo ... @end foo.
 
-% @tex ... @end tex    escapes into raw Tex temporarily.
+% @tex ... @end tex    escapes into raw TeX temporarily.
 % One exception: @ is still an escape character, so that @end tex works.
-% But \@ or @@ will get a plain tex @ character.
+% But \@ or @@ will get a plain @ character.
 
 \envdef\tex{%
   \setupmarkupstyle{tex}%
@@ -5948,6 +6029,10 @@ end
   \catcode`\'=\other
   \escapechar=`\\
   %
+  % ' 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
+  %
   \let\b=\ptexb
   \let\bullet=\ptexbullet
   \let\c=\ptexc
@@ -6150,41 +6235,42 @@ end
 }
 
 % We often define two environments, @foo and @smallfoo.
-% Let's do it by one command:
-\def\makedispenv #1#2{
-  \expandafter\envdef\csname#1\endcsname {\setnormaldispenv #2}
-  \expandafter\envdef\csname small#1\endcsname {\setsmalldispenv #2}
+% Let's do it in one command.  #1 is the env name, #2 the definition.
+\def\makedispenvdef#1#2{%
+  \expandafter\envdef\csname#1\endcsname {\setnormaldispenv #2}%
+  \expandafter\envdef\csname small#1\endcsname {\setsmalldispenv #2}%
   \expandafter\let\csname E#1\endcsname \afterenvbreak
   \expandafter\let\csname Esmall#1\endcsname \afterenvbreak
 }
 
-% Define two synonyms:
-\def\maketwodispenvs #1#2#3{
-  \makedispenv{#1}{#3}
-  \makedispenv{#2}{#3}
+% Define two environment synonyms (#1 and #2) for an environment.
+\def\maketwodispenvdef#1#2#3{%
+  \makedispenvdef{#1}{#3}%
+  \makedispenvdef{#2}{#3}%
 }
-
-% @lisp: indented, narrowed, typewriter font; @example: same as @lisp.
+%
+% @lisp: indented, narrowed, typewriter font;
+% @example: same as @lisp.
 %
 % @smallexample and @smalllisp: use smaller fonts.
 % Originally contributed by Pavel@xerox.
 %
-\maketwodispenv{lisp}{example}{%
+\maketwodispenvdef{lisp}{example}{%
   \nonfillstart
   \tt\setupmarkupstyle{example}%
   \let\kbdfont = \kbdexamplefont % Allow @kbd to do something special.
-  \gobble       % eat return
+  \gobble % eat return
 }
 % @display/@smalldisplay: same as @lisp except keep current font.
 %
-\makedispenv {display}{%
+\makedispenvdef{display}{%
   \nonfillstart
   \gobble
 }
 
 % @format/@smallformat: same as @display except don't narrow margins.
 %
-\makedispenv{format}{%
+\makedispenvdef{format}{%
   \let\nonarrowing = t%
   \nonfillstart
   \gobble
@@ -6203,7 +6289,7 @@ end
 \envdef\flushright{%
   \let\nonarrowing = t%
   \nonfillstart
-  \advance\leftskip by 0pt plus 1fill
+  \advance\leftskip by 0pt plus 1fill\relax
   \gobble
 }
 \let\Eflushright = \afterenvbreak
@@ -6238,6 +6324,8 @@ end
 % we're doing normal filling.  So, when using \aboveenvbreak and
 % \afterenvbreak, temporarily make \parskip 0.
 %
+\makedispenvdef{quotation}{\quotationstart}
+%
 \def\quotationstart{%
   {\parskip=0pt \aboveenvbreak}% because \aboveenvbreak inserts \parskip
   \parindent=0pt
@@ -6253,17 +6341,6 @@ end
   \parsearg\quotationlabel
 }
 
-\envdef\quotation{%
-  \setnormaldispenv
-  \quotationstart
-}
-
-\envdef\smallquotation{%
-  \setsmalldispenv
-  \quotationstart
-}
-\let\Esmallquotation = \Equotation
-
 % We have retained a nonzero parskip for the environment, since we're
 % doing normal filling.
 %
@@ -6275,6 +6352,7 @@ end
   \fi
   {\parskip=0pt \afterenvbreak}%
 }
+\def\Esmallquotation{\Equotation}
 
 % If we're given an argument, typeset it in bold with a colon after.
 \def\quotationlabel#1{%
@@ -6331,21 +6409,28 @@ end
 
 % Setup for the @verbatim environment
 %
-% Real tab expansion
+% Real tab expansion.
 \newdimen\tabw \setbox0=\hbox{\tt\space} \tabw=8\wd0 % tab amount
 %
-\def\starttabbox{\setbox0=\hbox\bgroup}
+% We typeset each line of the verbatim in an \hbox, so we can handle
+% tabs.  The \global is in case the verbatim line starts with an accent,
+% or some other command that starts with a begin-group.  Otherwise, the
+% entire \verbbox would disappear at the corresponding end-group, before
+% it is typeset.  Meanwhile, we can't have nested verbatim commands
+% (can we?), so the \global won't be overwriting itself.
+\newbox\verbbox
+\def\starttabbox{\global\setbox\verbbox=\hbox\bgroup}
 %
 \begingroup
   \catcode`\^^I=\active
   \gdef\tabexpand{%
     \catcode`\^^I=\active
     \def^^I{\leavevmode\egroup
-      \dimen0=\wd0 % the width so far, or since the previous tab
-      \divide\dimen0 by\tabw
-      \multiply\dimen0 by\tabw % compute previous multiple of \tabw
-      \advance\dimen0 by\tabw  % advance to next multiple of \tabw
-      \wd0=\dimen0 \box0 \starttabbox
+      \dimen\verbbox=\wd\verbbox % the width so far, or since the previous tab
+      \divide\dimen\verbbox by\tabw
+      \multiply\dimen\verbbox by\tabw % compute previous multiple of \tabw
+      \advance\dimen\verbbox by\tabw  % advance to next multiple of \tabw
+      \wd\verbbox=\dimen\verbbox \box\verbbox \starttabbox
     }%
   }
 \endgroup
@@ -6354,15 +6439,16 @@ end
 \def\setupverbatim{%
   \let\nonarrowing = t%
   \nonfillstart
-  % Easiest (and conventionally used) font for verbatim
-  \tt
-  \def\par{\leavevmode\egroup\box0\endgraf}%
+  \tt % easiest (and conventionally used) font for verbatim
+  % The \leavevmode here is for blank lines.  Otherwise, we would
+  % never \starttabox and the \egroup would end verbatim mode.
+  \def\par{\leavevmode\egroup\box\verbbox\endgraf}%
   \tabexpand
   \setupmarkupstyle{verbatim}%
   % Respect line breaks,
   % print special symbols as themselves, and
-  % make each space count
-  % must do in this order:
+  % make each space count.
+  % Must do in this order:
   \obeylines \uncatcodespecials \sepspaces
   \everypar{\starttabbox}%
 }
@@ -6505,7 +6591,7 @@ end
     #1#2 \endheader
     % common ending:
     \interlinepenalty = 10000
-    \advance\rightskip by 0pt plus 1fil
+    \advance\rightskip by 0pt plus 1fil\relax
     \endgraf
     \nobreak\vskip -\parskip
     \penalty\defunpenalty  % signal to \startdefun and \dodefunx
@@ -6805,25 +6891,28 @@ end
   }
 \fi
 
-\def\scanmacro#1{%
-  \begingroup
-    \newlinechar`\^^M
-    \let\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=`\@
-    % ... and \example
-    \spaceisspace
-    %
-    % Append \endinput to make sure that TeX does not see the ending newline.
-    % I've verified that it is necessary both for e-TeX and for ordinary TeX
-    %                                                  --kasal, 29nov03
-    \scantokens{#1\endinput}%
-  \endgroup
-}
+\def\scanmacro#1{\begingroup
+  \newlinechar`\^^M
+  \let\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=`\@
+  %
+  % ... and for \example:
+  \spaceisspace
+  %
+  % 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.  See the Macro Details node in the manual for the
+  % workaround we currently have to recommend for macros and
+  % line-oriented commands.
+  \scantokens{#1\empty}%
+\endgroup}
 
 \def\scanexp#1{%
   \edef\temp{\noexpand\scanmacro{#1}}%
@@ -6877,17 +6966,18 @@ end
 
 % Macro bodies are absorbed as an argument in a context where
 % all characters are catcode 10, 11 or 12, except \ which is active
-% (as in normal texinfo). It is necessary to change the definition of \.
-
+% (as in normal texinfo). It is necessary to change the definition of \
+% to recognize macro arguments; this is the job of \mbodybackslash.
+%
 % Non-ASCII encodings make 8-bit characters active, so un-activate
 % them to avoid their expansion.  Must do this non-globally, to
 % confine the change to the current group.
-
+%
 % It's necessary to have hard CRs when the macro is executed. This is
-% done by  making ^^M (\endlinechar) catcode 12 when reading the macro
+% done by making ^^M (\endlinechar) catcode 12 when reading the macro
 % body, and then making it the \newlinechar in \scanmacro.
-
-\def\scanctxt{%
+%
+\def\scanctxt{% used as subroutine
   \catcode`\"=\other
   \catcode`\+=\other
   \catcode`\<=\other
@@ -6900,13 +6990,13 @@ end
   \ifx\declaredencoding\ascii \else \setnonasciicharscatcodenonglobal\other \fi
 }
 
-\def\scanargctxt{%
+\def\scanargctxt{% used for copying and captions, not macros.
   \scanctxt
   \catcode`\\=\other
   \catcode`\^^M=\other
 }
 
-\def\macrobodyctxt{%
+\def\macrobodyctxt{% used for @macro definitions
   \scanctxt
   \catcode`\{=\other
   \catcode`\}=\other
@@ -6914,30 +7004,48 @@ end
   \usembodybackslash
 }
 
-\def\macroargctxt{%
+\def\macroargctxt{% used when scanning invocations
   \scanctxt
-  \catcode`\\=\other
+  \catcode`\\=0
 }
+% 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.
+
 
 % \mbodybackslash is the definition of \ in @macro bodies.
 % It maps \foo\ => \csname macarg.foo\endcsname => #N
 % where N is the macro parameter number.
 % We define \csname macarg.\endcsname to be \realbackslash, so
 % \\ in macro replacement text gets you a backslash.
-
+%
 {\catcode`@=0 @catcode`@\=@active
  @gdef@usembodybackslash{@let\=@mbodybackslash}
  @gdef@mbodybackslash#1\{@csname macarg.#1@endcsname}
 }
 \expandafter\def\csname macarg.\endcsname{\realbackslash}
 
+\def\margbackslash#1{\char`\#1 }
+
 \def\macro{\recursivefalse\parsearg\macroxxx}
 \def\rmacro{\recursivetrue\parsearg\macroxxx}
 
 \def\macroxxx#1{%
-  \getargs{#1}%           now \macname is the macname and \argl the arglist
+  \getargs{#1}% now \macname is the macname and \argl the arglist
   \ifx\argl\empty       % no arguments
-     \paramno=0%
+     \paramno=0
   \else
      \expandafter\parsemargdef \argl;%
   \fi
@@ -6986,28 +7094,32 @@ end
 % an opening brace, and that opening brace is not consumed.
 \def\getargs#1{\getargsxxx#1{}}
 \def\getargsxxx#1#{\getmacname #1 \relax\getmacargs}
-\def\getmacname #1 #2\relax{\macname={#1}}
+\def\getmacname#1 #2\relax{\macname={#1}}
 \def\getmacargs#1{\def\argl{#1}}
 
 % 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 be ##N where N is the position in that list.
+% in the params list to be ##N where N is the position in that list.
 % 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
+% 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.
 
-\def\parsemargdef#1;{\paramno=0\def\paramlist{}%
-        \let\hash\relax\let\xeatspaces\relax\parsemargdefxxx#1,;,}
+\def\parsemargdef#1;{%
+  \paramno=0\def\paramlist{}%
+  \let\hash\relax
+  \let\xeatspaces\relax
+  \parsemargdefxxx#1,;,%
+}
 \def\parsemargdefxxx#1,{%
   \if#1;\let\next=\relax
   \else \let\next=\parsemargdefxxx
-    \advance\paramno by 1%
+    \advance\paramno by 1
     \expandafter\edef\csname macarg.\eatspaces{#1}\endcsname
         {\xeatspaces{\hash\the\paramno}}%
     \edef\paramlist{\paramlist\hash\the\paramno,}%
@@ -7015,7 +7127,7 @@ end
 
 % These two commands read recursive and nonrecursive macro bodies.
 % (They're different since rec and nonrec macros end differently.)
-
+%
 \long\def\parsemacbody#1@end macro%
 {\xdef\temp{\eatcr{#1}}\endgroup\defmacro}%
 \long\def\parsermacbody#1@end rmacro%
@@ -7026,6 +7138,7 @@ end
 % Much magic with \expandafter here.
 % \xdef is used so that macro definitions will survive the file
 % they're defined in; @include reads the file inside a group.
+%
 \def\defmacro{%
   \let\hash=##% convert placeholders to macro parameter chars
   \ifrecursive
@@ -7089,7 +7202,8 @@ end
 % \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)
+% as an argument (by \parsebrace or \parsearg).
+% 
 \def\braceorline#1{\let\macnamexxx=#1\futurelet\nchar\braceorlinexxx}
 \def\braceorlinexxx{%
   \ifx\nchar\bgroup\else
@@ -7099,7 +7213,8 @@ end
 
 % @alias.
 % We need some trickery to remove the optional spaces around the equal
-% sign.  Just make them active and then expand them all to nothing.
+% sign.  Make them active and then expand them all to nothing.
+%
 \def\alias{\parseargusing\obeyspaces\aliasxxx}
 \def\aliasxxx #1{\aliasyyy#1\relax}
 \def\aliasyyy #1=#2\relax{%
@@ -7357,7 +7472,8 @@ end
     \angleleft un\-de\-fined\angleright
     \iflinks
       \ifhavexrefs
-        \message{\linenumber Undefined cross reference `#1'.}%
+        {\toks0 = {#1}% avoid expansion of possibly-complex value
+         \message{\linenumber Undefined cross reference `\the\toks0'.}}%
       \else
         \ifwarnedxrefs\else
           \global\warnedxrefstrue
@@ -7687,7 +7803,7 @@ end
 % #2 is (optional) width, #3 is (optional) height.
 % #4 is (ignored optional) html alt text.
 % #5 is (ignored optional) extension.
-% #6 is just the usual extra ignored arg for parsing this stuff.
+% #6 is just the usual extra ignored arg for parsing stuff.
 \newif\ifimagevmode
 \def\imagexxx#1,#2,#3,#4,#5,#6\finish{\begingroup
   \catcode`\^^M = 5     % in case we're inside an example
@@ -8339,8 +8455,8 @@ directory should work if nowhere else does.}
   \gdef^^ea{\ogonek{e}}
   \gdef^^eb{\"e}
   \gdef^^ec{\v e}
-  \gdef^^ed{\'\i}
-  \gdef^^ee{\^\i}
+  \gdef^^ed{\'{\dotless{i}}}
+  \gdef^^ee{\^{\dotless{i}}}
   \gdef^^ef{\v d}
   %
   \gdef^^f0{\dh}
@@ -8899,8 +9015,8 @@ directory should work if nowhere else does.}
 % Prevent underfull vbox error messages.
 \vbadness = 10000
 
-% Don't be so finicky about underfull hboxes, either.
-\hbadness = 2000
+% Don't be very finicky about underfull hboxes, either.
+\hbadness = 6666
 
 % Following George Bush, get rid of widows and orphans.
 \widowpenalty=10000
diff --git a/m4/.cvsignore b/m4/.cvsignore
deleted file mode 100644 (file)
index f3c7a7c..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Makefile
index 270ee91..cd80415 100644 (file)
@@ -2,7 +2,7 @@
 # @configure_input@
 
 # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010  Free Software
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
 # Foundation, Inc.
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -330,10 +330,15 @@ install-am: all-am
 
 installcheck: installcheck-am
 install-strip:
-       $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
-         install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
-         `test -z '$(STRIP)' || \
-           echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+       if test -z '$(STRIP)'; then \
+         $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+           install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+             install; \
+       else \
+         $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+           install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+           "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
+       fi
 mostlyclean-generic:
 
 clean-generic:
index 9f2611e..3a25e32 100644 (file)
@@ -1,12 +1,12 @@
 # AM_COND_IF                                            -*- Autoconf -*-
 
-# Copyright (C) 2008 Free Software Foundation, Inc.
+# Copyright (C) 2008, 2010 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
+# serial 3
 
 # _AM_COND_IF
 # _AM_COND_ELSE
@@ -20,15 +20,15 @@ m4_define([_AM_COND_ENDIF])
 
 # AM_COND_IF(COND, [IF-TRUE], [IF-FALSE])
 # ---------------------------------------
-# If the shell condition matching COND is true, execute IF-TRUE,
-# otherwise execute IF-FALSE.  Allow automake to learn about conditional
-# instantiating macros (the AC_CONFIG_FOOS).
+# If the shell condition COND is true, execute IF-TRUE, otherwise execute
+# IF-FALSE.  Allow automake to learn about conditional instantiating macros
+# (the AC_CONFIG_FOOS).
 AC_DEFUN([AM_COND_IF],
 [m4_ifndef([_AM_COND_VALUE_$1],
           [m4_fatal([$0: no such condition "$1"])])dnl
 _AM_COND_IF([$1])dnl
-if _AM_COND_VALUE_$1; then
-  m4_default([$2], [:])
+if test -z "$$1_TRUE"; then :
+  m4_n([$2])[]dnl
 m4_ifval([$3],
 [_AM_COND_ELSE([$1])dnl
 else
index 8304180..89d37b2 100644 (file)
@@ -1,12 +1,12 @@
 ##                                                          -*- Autoconf -*-
 # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009,
-# 2010  Free Software Foundation, Inc.
+# 2010, 2011 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
+# serial 12
 
 # 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,
@@ -46,6 +46,7 @@ AC_CACHE_CHECK([dependency style of $depcc],
   # instance it was reported that on HP-UX the gcc test will end up
   # making a dummy file named `D' -- because `-MD' means `put the output
   # in D'.
+  rm -rf conftest.dir
   mkdir conftest.dir
   # Copy depcomp to subdir because otherwise we won't find it if we're
   # using a relative directory.
index 4499015..aea5f9d 100644 (file)
@@ -3,20 +3,19 @@
 ## From Franc,ois Pinard               ##
 ## ----------------------------------- ##
 
-# Copyright (C) 1996, 1998, 1999, 2000, 2001, 2002, 2003, 2005
+# Copyright (C) 1996, 1998, 1999, 2000, 2001, 2002, 2003, 2005, 2010
 # 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
+# serial 4
 
 AC_DEFUN([AM_WITH_DMALLOC],
 [AC_MSG_CHECKING([if malloc debugging is wanted])
 AC_ARG_WITH(dmalloc,
-[  --with-dmalloc          use dmalloc, as in
-                         http://www.dmalloc.com/dmalloc.tar.gz],
+[  --with-dmalloc          use dmalloc, as in http://www.dmalloc.com],
 [if test "$withval" = yes; then
   AC_MSG_RESULT(yes)
   AC_DEFINE(WITH_DMALLOC,1,
index 1dc3985..50e1538 100644 (file)
@@ -37,8 +37,8 @@ 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).
   m4_define_default([_AM_PYTHON_INTERPRETER_LIST],
-                    [python python2 python3 python3.1 python3.0 python2.6 python2.5 python2.4 python2.3 python2.2 dnl
-python2.1 python2.0])
+[python python2 python3 python3.2 python3.1 python3.0 python2.7 dnl
+ python2.6 python2.5 python2.4 python2.3 python2.2 python2.1 python2.0])
 
   m4_if([$1],[],[
     dnl No version check is needed.
diff --git a/tests/.cvsignore b/tests/.cvsignore
deleted file mode 100644 (file)
index 69d3d43..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-*.log
-Makefile
-aclocal
-automake
-defs
-diffs
-log
-*.dir
-aclocal-*
-automake-*
index 5c9e36a..78bacf2 100644 (file)
@@ -1,7 +1,7 @@
 ## Process this file with automake to create Makefile.in
 
 # Copyright (C) 1996, 1997, 1998, 1999, 2001, 2002, 2003, 2004, 2005,
-# 2006, 2007, 2008, 2009, 2010  Free Software Foundation, Inc.
+# 2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc.
 
 # This 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/>.
 
-XFAIL_TESTS =                                  \
-all.test                                       \
-auxdir2.test                                   \
-cond17.test                                    \
-gcj6.test                                      \
+XFAIL_TESTS = \
+all.test \
+auxdir2.test \
+cond17.test \
+gcj6.test \
 txinfo5.test
 
 include $(srcdir)/parallel-tests.am
@@ -69,6 +69,7 @@ acsilent.test \
 acsubst.test \
 acsubst2.test \
 all.test \
+all2.test \
 alloca.test \
 alloca2.test \
 alpha.test \
@@ -93,10 +94,19 @@ ar2.test \
 asm.test \
 asm2.test \
 asm3.test \
+autodist.test \
+autodist-subdir.test \
+autodist-acconfig.test \
+autodist-acconfig-no-subdir.test \
+autodist-aclocal-m4.test \
+autodist-config-headers.test \
+autodist-configure-no-subdir.test \
+autodist-stamp-vti.test \
 autohdr.test \
 autohdr2.test \
 autohdr3.test \
 autohdr4.test \
+autohdrdry.test \
 automake.test \
 auxdir.test \
 auxdir2.test \
@@ -156,6 +166,7 @@ comment8.test \
 comment9.test \
 commen10.test \
 commen11.test \
+comments-in-var-defn.test \
 compile.test \
 compile2.test \
 compile_f90_c_cxx.test \
@@ -206,20 +217,23 @@ cond44.test \
 cond45.test \
 condd.test \
 condhook.test \
+condhook2.test \
 condinc.test \
 condinc2.test \
 condlib.test \
 condman.test \
 condman2.test \
+condman3.test \
 configure.test \
-conf2.test \
 confdeps.test \
 conff.test \
 conff2.test \
 confh.test \
 confh4.test \
 confh5.test \
-config.test \
+confh6.test \
+confh7.test \
+confh8.test \
 confincl.test \
 conflnk.test \
 conflnk2.test \
@@ -257,6 +271,8 @@ depcomp4.test \
 depcomp5.test \
 depcomp6.test \
 depcomp7.test \
+depcomp8a.test \
+depcomp8b.test \
 depdist.test \
 depend.test \
 depend2.test \
@@ -278,7 +294,9 @@ distcom6.test \
 distcom7.test \
 distdir.test \
 distlinks.test \
+distlinksbrk.test \
 distname.test \
+dmalloc.test \
 dollar.test \
 dollarvar.test \
 dollarvar2.test \
@@ -325,8 +343,6 @@ fort4.test \
 fort5.test \
 fonly.test \
 fortdep.test \
-fpinst2.test \
-fpinstall.test \
 gcj.test \
 gcj2.test \
 gcj3.test \
@@ -345,6 +361,19 @@ gnits2.test \
 gnits3.test \
 header.test \
 help.test \
+help2.test \
+help3.test \
+help4.test \
+help-depend.test \
+help-depend2.test \
+help-dmalloc.test \
+help-init.test \
+help-lispdir.test \
+help-maintainer.test \
+help-multilib.test \
+help-regex.test \
+help-silent.test \
+help-upc.test \
 hfs.test \
 hosts.test \
 implicit.test \
@@ -352,6 +381,7 @@ include.test \
 include2.test \
 info.test \
 init.test \
+init2.test \
 insh2.test \
 install2.test \
 installdir.test \
@@ -438,6 +468,7 @@ lisp5.test \
 lisp6.test \
 lisp7.test \
 lisp8.test \
+lispdry.test \
 listval.test \
 location.test \
 longline.test \
@@ -471,6 +502,7 @@ mdate2.test \
 mdate3.test \
 mdate4.test \
 mdate5.test \
+mdate6.test \
 missing.test \
 missing2.test \
 missing3.test \
@@ -535,6 +567,7 @@ parallel-tests7.test \
 parallel-tests8.test \
 parallel-tests9.test \
 parallel-tests10.test \
+parallel-tests-unreadable-log.test \
 parse.test \
 percent.test \
 percent2.test \
@@ -549,6 +582,7 @@ pluseq7.test \
 pluseq8.test \
 pluseq9.test \
 pluseq10.test \
+pluseq11.test \
 postproc.test \
 ppf77.test \
 pr2.test \
@@ -610,15 +644,18 @@ silent.test \
 silent2.test \
 silent3.test \
 silent4.test \
-silent5.test \
 silent6.test \
 silent7.test \
 silent9.test \
 silentcxx.test \
 silentf77.test \
 silentf90.test \
-silentlex.test \
-silentyacc.test \
+silent-many-gcc.test \
+silent-many-generic.test \
+silent-lex-gcc.test \
+silent-lex-generic.test \
+silent-yacc-gcc.test \
+silent-yacc-generic.test \
 sinclude.test \
 srcsub.test \
 srcsub2.test \
@@ -631,6 +668,7 @@ specflg7.test \
 specflg8.test \
 specflg9.test \
 specflg10.test \
+specflg-dummy.test \
 spell.test \
 spell2.test \
 spell3.test \
@@ -641,6 +679,8 @@ stamph2.test \
 stdlib.test \
 stdlib2.test \
 strip.test \
+strip2.test \
+strip3.test \
 subdir.test \
 subdir2.test \
 subdir3.test \
@@ -665,6 +705,9 @@ subobj7.test \
 subobj8.test \
 subobj9.test \
 subobj10.test \
+subobj11a.test \
+subobj11b.test \
+subobj11c.test \
 subobjname.test \
 subpkg.test \
 subpkg2.test \
@@ -705,6 +748,7 @@ txinfo2.test \
 txinfo3.test \
 txinfo4.test \
 txinfo5.test \
+txinfo5b.test \
 txinfo6.test \
 txinfo7.test \
 txinfo8.test \
@@ -754,6 +798,8 @@ version8.test \
 vpath.test \
 vtexi.test \
 vtexi2.test \
+vtexi3.test \
+vtexi4.test \
 warnopts.test \
 werror.test \
 werror2.test \
@@ -769,6 +815,7 @@ yacc5.test \
 yacc6.test \
 yacc7.test \
 yacc8.test \
+yaccdry.test \
 yaccpp.test \
 yaccvpath.test \
 yflags.test \
index 8b18055..18cb337 100644 (file)
@@ -2,7 +2,7 @@
 # @configure_input@
 
 # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010  Free Software
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
 # Foundation, Inc.
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -16,7 +16,7 @@
 @SET_MAKE@
 
 # Copyright (C) 1996, 1997, 1998, 1999, 2001, 2002, 2003, 2004, 2005,
-# 2006, 2007, 2008, 2009, 2010  Free Software Foundation, Inc.
+# 2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -119,7 +119,7 @@ am__text_box = $(AWK) '{                            \
   print line;                                          \
 }'
 # Solaris 10 'make', and several other traditional 'make' implementations,
-# pass "-e" to $(SHELL).  This contradicts POSIX.  Work around the problem
+# pass "-e" to $(SHELL), and POSIX 2008 even requires this.  Work around it
 # by disabling -e (using the XSI extension "set +e") if it's set.
 am__sh_e_setup = case $$- in *e*) set +e;; esac
 # To be inserted before the command running the test.  Creates the
@@ -142,6 +142,35 @@ elif test -f "$$f"; then dir=;                             \
 else dir="$(srcdir)/"; fi;                             \
 tst=$$dir$$f; log='$@'; __SAVED_TERM=$$TERM;           \
 $(TESTS_ENVIRONMENT)
+# To be appended to the command running the test.  Handle the stdout
+# and stderr redirection, and catch the exit status.
+am__check_post = \
+>$@-t 2>&1;                                            \
+estatus=$$?;                                           \
+if test -n '$(DISABLE_HARD_ERRORS)'                    \
+   && test $$estatus -eq 99; then                      \
+  estatus=1;                                           \
+fi;                                                    \
+TERM=$$__SAVED_TERM; export TERM;                      \
+$(am__tty_colors);                                     \
+xfailed=PASS;                                          \
+case " $(XFAIL_TESTS) " in                             \
+  *[\ \        ]$$f[\ \        ]* | *[\ \      ]$$dir$$f[\ \   ]*) \
+    xfailed=XFAIL;;                                    \
+esac;                                                  \
+case $$estatus.$$xfailed in                            \
+    0.XFAIL) col=$$red; res=XPASS;;                    \
+    0.*)     col=$$grn; res=PASS ;;                    \
+    77.*)    col=$$blu; res=SKIP ;;                    \
+    99.*)    col=$$red; res=FAIL ;;                    \
+    *.XFAIL) col=$$lgn; res=XFAIL;;                    \
+    *.*)     col=$$red; res=FAIL ;;                    \
+esac;                                                  \
+echo "$${col}$$res$${std}: $$f";                       \
+echo "$$res: $$f (exit: $$estatus)" |                  \
+  $(am__rst_section) >$@;                              \
+cat $@-t >>$@;                                         \
+rm -f $@-t
 RECHECK_LOGS = $(TEST_LOGS)
 AM_RECURSIVE_TARGETS = check check-html recheck recheck-html
 TEST_SUITE_LOG = test-suite.log
@@ -244,10 +273,10 @@ top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
 XFAIL_TESTS = \
-all.test                                       \
-auxdir2.test                                   \
-cond17.test                                    \
-gcj6.test                                      \
+all.test \
+auxdir2.test \
+cond17.test \
+gcj6.test \
 txinfo5.test
 
 parallel_tests = \
@@ -307,6 +336,7 @@ acsilent.test \
 acsubst.test \
 acsubst2.test \
 all.test \
+all2.test \
 alloca.test \
 alloca2.test \
 alpha.test \
@@ -331,10 +361,19 @@ ar2.test \
 asm.test \
 asm2.test \
 asm3.test \
+autodist.test \
+autodist-subdir.test \
+autodist-acconfig.test \
+autodist-acconfig-no-subdir.test \
+autodist-aclocal-m4.test \
+autodist-config-headers.test \
+autodist-configure-no-subdir.test \
+autodist-stamp-vti.test \
 autohdr.test \
 autohdr2.test \
 autohdr3.test \
 autohdr4.test \
+autohdrdry.test \
 automake.test \
 auxdir.test \
 auxdir2.test \
@@ -394,6 +433,7 @@ comment8.test \
 comment9.test \
 commen10.test \
 commen11.test \
+comments-in-var-defn.test \
 compile.test \
 compile2.test \
 compile_f90_c_cxx.test \
@@ -444,20 +484,23 @@ cond44.test \
 cond45.test \
 condd.test \
 condhook.test \
+condhook2.test \
 condinc.test \
 condinc2.test \
 condlib.test \
 condman.test \
 condman2.test \
+condman3.test \
 configure.test \
-conf2.test \
 confdeps.test \
 conff.test \
 conff2.test \
 confh.test \
 confh4.test \
 confh5.test \
-config.test \
+confh6.test \
+confh7.test \
+confh8.test \
 confincl.test \
 conflnk.test \
 conflnk2.test \
@@ -495,6 +538,8 @@ depcomp4.test \
 depcomp5.test \
 depcomp6.test \
 depcomp7.test \
+depcomp8a.test \
+depcomp8b.test \
 depdist.test \
 depend.test \
 depend2.test \
@@ -516,7 +561,9 @@ distcom6.test \
 distcom7.test \
 distdir.test \
 distlinks.test \
+distlinksbrk.test \
 distname.test \
+dmalloc.test \
 dollar.test \
 dollarvar.test \
 dollarvar2.test \
@@ -563,8 +610,6 @@ fort4.test \
 fort5.test \
 fonly.test \
 fortdep.test \
-fpinst2.test \
-fpinstall.test \
 gcj.test \
 gcj2.test \
 gcj3.test \
@@ -583,6 +628,19 @@ gnits2.test \
 gnits3.test \
 header.test \
 help.test \
+help2.test \
+help3.test \
+help4.test \
+help-depend.test \
+help-depend2.test \
+help-dmalloc.test \
+help-init.test \
+help-lispdir.test \
+help-maintainer.test \
+help-multilib.test \
+help-regex.test \
+help-silent.test \
+help-upc.test \
 hfs.test \
 hosts.test \
 implicit.test \
@@ -590,6 +648,7 @@ include.test \
 include2.test \
 info.test \
 init.test \
+init2.test \
 insh2.test \
 install2.test \
 installdir.test \
@@ -676,6 +735,7 @@ lisp5.test \
 lisp6.test \
 lisp7.test \
 lisp8.test \
+lispdry.test \
 listval.test \
 location.test \
 longline.test \
@@ -709,6 +769,7 @@ mdate2.test \
 mdate3.test \
 mdate4.test \
 mdate5.test \
+mdate6.test \
 missing.test \
 missing2.test \
 missing3.test \
@@ -773,6 +834,7 @@ parallel-tests7.test \
 parallel-tests8.test \
 parallel-tests9.test \
 parallel-tests10.test \
+parallel-tests-unreadable-log.test \
 parse.test \
 percent.test \
 percent2.test \
@@ -787,6 +849,7 @@ pluseq7.test \
 pluseq8.test \
 pluseq9.test \
 pluseq10.test \
+pluseq11.test \
 postproc.test \
 ppf77.test \
 pr2.test \
@@ -848,15 +911,18 @@ silent.test \
 silent2.test \
 silent3.test \
 silent4.test \
-silent5.test \
 silent6.test \
 silent7.test \
 silent9.test \
 silentcxx.test \
 silentf77.test \
 silentf90.test \
-silentlex.test \
-silentyacc.test \
+silent-many-gcc.test \
+silent-many-generic.test \
+silent-lex-gcc.test \
+silent-lex-generic.test \
+silent-yacc-gcc.test \
+silent-yacc-generic.test \
 sinclude.test \
 srcsub.test \
 srcsub2.test \
@@ -869,6 +935,7 @@ specflg7.test \
 specflg8.test \
 specflg9.test \
 specflg10.test \
+specflg-dummy.test \
 spell.test \
 spell2.test \
 spell3.test \
@@ -879,6 +946,8 @@ stamph2.test \
 stdlib.test \
 stdlib2.test \
 strip.test \
+strip2.test \
+strip3.test \
 subdir.test \
 subdir2.test \
 subdir3.test \
@@ -903,6 +972,9 @@ subobj7.test \
 subobj8.test \
 subobj9.test \
 subobj10.test \
+subobj11a.test \
+subobj11b.test \
+subobj11c.test \
 subobjname.test \
 subpkg.test \
 subpkg2.test \
@@ -943,6 +1015,7 @@ txinfo2.test \
 txinfo3.test \
 txinfo4.test \
 txinfo5.test \
+txinfo5b.test \
 txinfo6.test \
 txinfo7.test \
 txinfo8.test \
@@ -992,6 +1065,8 @@ version8.test \
 vpath.test \
 vtexi.test \
 vtexi2.test \
+vtexi3.test \
+vtexi4.test \
 warnopts.test \
 werror.test \
 werror2.test \
@@ -1007,6 +1082,7 @@ yacc5.test \
 yacc6.test \
 yacc7.test \
 yacc8.test \
+yaccdry.test \
 yaccpp.test \
 yaccvpath.test \
 yflags.test \
@@ -1064,41 +1140,12 @@ ctags: CTAGS
 CTAGS:
 
 
-# To be appended to the command running the test.  Handle the stdout
-# and stderr redirection, and catch the exit status.
-am__check_post =                                       \
->$@-t 2>&1;                                            \
-estatus=$$?;                                           \
-if test -n '$(DISABLE_HARD_ERRORS)'                    \
-   && test $$estatus -eq 99; then                      \
-  estatus=1;                                           \
-fi;                                                    \
-TERM=$$__SAVED_TERM; export TERM;                      \
-$(am__tty_colors);                                     \
-xfailed=PASS;                                          \
-case " $(XFAIL_TESTS) " in                             \
-  *[\ \        ]$$f[\ \        ]* | *[\ \      ]$$dir$$f[\ \   ]*) \
-    xfailed=XFAIL;;                                    \
-esac;                                                  \
-case $$estatus:$$xfailed in                            \
-    0:XFAIL) col=$$red; res=XPASS;;                    \
-    0:*)     col=$$grn; res=PASS ;;                    \
-    77:*)    col=$$blu; res=SKIP ;;                    \
-    99:*)    col=$$red; res=FAIL ;;                    \
-    *:XFAIL) col=$$lgn; res=XFAIL;;                    \
-    *:*)     col=$$red; res=FAIL ;;                    \
-esac;                                                  \
-echo "$${col}$$res$${std}: $$f";                       \
-echo "$$res: $$f (exit: $$estatus)" |                  \
-  $(am__rst_section) >$@;                              \
-cat $@-t >>$@;                                         \
-rm -f $@-t
-
 $(TEST_SUITE_LOG): $(TEST_LOGS)
        @$(am__sh_e_setup);                                             \
        list='$(TEST_LOGS)';                                            \
        results=`for f in $$list; do                                    \
-                  read line < $$f && echo "$$line" || echo FAIL;       \
+                  test -r $$f && read line < $$f && echo "$$line"      \
+                    || echo FAIL;                                      \
                 done`;                                                 \
        all=`echo "$$results" | sed '/^$$/d' | wc -l | sed -e 's/^[      ]*//'`; \
        fail=`echo "$$results" | grep -c '^FAIL'`;                      \
@@ -1147,7 +1194,7 @@ $(TEST_SUITE_LOG): $(TEST_LOGS)
          echo ".. contents:: :depth: 2";                               \
          echo;                                                         \
          for f in $$list; do                                           \
-           read line < $$f;                                            \
+           test -r $$f && read line < $$f || line=;                    \
            case $$line in                                              \
              PASS:*|XFAIL:*);;                                         \
              *) echo; cat $$f;;                                        \
@@ -1211,10 +1258,11 @@ recheck recheck-html:
        list='$(TEST_LOGS)';                                            \
        list=`for f in $$list; do                                       \
                test -f $$f || continue;                                \
-               if read line < $$f; then                                \
+               if test -r $$f && read line < $$f; then                 \
                  case $$line in FAIL*|XPASS*) echo $$f;; esac;         \
                else echo $$f; fi;                                      \
              done | tr '\012\015' '  '`;                               \
+       list=`echo "$$list" | sed 's/ *$$//'`;                          \
        $(MAKE) $(AM_MAKEFLAGS) $$target AM_MAKEFLAGS='$(AM_MAKEFLAGS) TEST_LOGS="'"$$list"'"'
 .test.log:
        @p='$<'; $(am__check_pre) $(TEST_LOG_COMPILE) "$$tst" $(am__check_post)
@@ -1265,10 +1313,15 @@ install-am: all-am
 
 installcheck: installcheck-am
 install-strip:
-       $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
-         install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
-         `test -z '$(STRIP)' || \
-           echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+       if test -z '$(STRIP)'; then \
+         $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+           install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+             install; \
+       else \
+         $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+           install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+           "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
+       fi
 mostlyclean-generic:
        -test -z "$(TEST_LOGS)" || rm -f $(TEST_LOGS)
        -test -z "$(TEST_LOGS_TMP)" || rm -f $(TEST_LOGS_TMP)
index 7d74083..93f9cbf 100644 (file)
@@ -93,7 +93,9 @@ Do
   Cite the PR number (if any), and the original reporter (if any), so
   we can find or ask for information if needed.
 
-  Use `required=...' for required tools.
+  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).
@@ -134,6 +136,9 @@ Do
 
   Use `Exit' rather than `exit' to abort a test.
 
+  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 sure that Automake's output looks correct.  It might look
   correct and still fail to work.  In other words, prefer
index a4e86d7..1bdf7c7 100755 (executable)
@@ -29,6 +29,7 @@ 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],
@@ -38,6 +39,7 @@ AC_REQUIRE([SOMETHING_ELSE])dnl
 
 AC_DEFUN([SOMETHING])
 EOF
+
 echo 'm4_include([d.m4])' > c.m4
 echo 'AC_DEFUN([SOMETHING_ELSE])' >d.m4
 
@@ -88,26 +90,32 @@ $sleep
 cat >>c.m4 <<\EOF
 AC_DEFUN([FOO], [ANOTHER_MACRO])
 EOF
+
 $MAKE
+
 # Because c.m4 has changed, aclocal.m4 must have been rebuilt.
 test `ls -1t aclocal.m4 stamp | sed 1q` = aclocal.m4
 # However, since FOO is not used, f.m4 should not be included
 # and the contents of aclocal.m4 should remain the same
-cmp aclocal.m4 stamp
-
+diff aclocal.m4 stamp
 
 # If FOO where to be used, that would be another story, of course.
 cat >>configure.in <<EOF
 FOO
 EOF
+
 cp aclocal.m4 stamp
 $sleep
+
 $MAKE
-grep 'defs/f.m4' aclocal.m4
+
+$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
+grep 'a\.m4:1: .*b\.m4.*does not exist' stderr
+
+:
index c38fac4..9826892 100755 (executable)
@@ -88,7 +88,7 @@ ACLOCAL_TESTSUITE_FLAGS='-I 4 -I 1 -I 2'
 rm -f foo
 $ACLOCAL --install 2>stderr && { cat stderr >&2; Exit 1; }
 cat stderr >&2
-grep AM_MACRO2 stderr
+grep 'macro.*AM_MACRO2.*not found' stderr
 
 ACLOCAL_TESTSUITE_FLAGS='-I 4 -I 1'
 rm -f foo
@@ -115,4 +115,6 @@ cat stderr >&2
 cat stdout
 grep '#serial 456' stdout
 test ! -f 4/m1.m4
-grep 'installing.*4/m1.m4' stderr
+grep 'installing.*4/m1\.m4' stderr
+
+:
index accad81..a198d9a 100755 (executable)
@@ -41,9 +41,11 @@ END
 
 $ACLOCAL
 $AUTOCONF
-./configure >stdout
+./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 with-grepme configure
+
+:
index d3437d2..da80d08 100755 (executable)
@@ -27,18 +27,20 @@ test -f fred
 $ACLOCAL --output 2>stderr && { cat stderr >&2; Exit 1; }
 cat stderr >&2
 grep 'option.*--output.*an argument' stderr
-grep help stderr
+grep '[Tt]ry.*--help.*for more information' stderr
 
 $ACLOCAL --unknown-option 2>stderr && { cat stderr >&2; Exit 1; }
 cat stderr >&2
 grep 'unrecognized.*--unknown-option' stderr
-grep help stderr
+grep '[Tt]ry.*--help.*for more information' stderr
 
 $ACLOCAL --ver 2>stderr && { cat stderr >&2; Exit 1; }
 cat stderr >&2
 grep 'unrecognized.*--ver' stderr
-grep help stderr
+grep '[Tt]ry.*--help.*for more information' stderr
 
 $ACLOCAL --versi
 
 test "`$ACLOCAL --print-ac-dir`" = "$testaclocaldir"
+
+:
index 5cd8231..b206587 100755 (executable)
@@ -60,7 +60,7 @@ grep GREPME sub/Makefile
 
 # Make sure configure dependencies are distributed.
 $MAKE distdir
-test -f aclocal5-1.0/m4/moredefs.m4
+test -f $me-1.0/m4/moredefs.m4
 
 # Change the definition of AM_TEST to check that its new definition is
 # used.  Check that AC_DEFUN_ONCE is caught.
@@ -68,3 +68,5 @@ echo 'AC_DEFUN_ONCE([AM_TEST], [AC_SUBST(__$1__)])' > m4/moredefs.m4
 $MAKE
 grep 'm4/moredefs\.m4' aclocal.m4
 grep '__GREPME__' configure
+
+:
index 266d64b..ea6bac3 100755 (executable)
@@ -75,9 +75,9 @@ grep METOO sub/Makefile
 
 # Make sure configure dependencies are distributed.
 $MAKE distdir
-test -f aclocal6-1.0/m4/moredefs.m4
-test -f aclocal6-1.0/m4/somedefs.m4
-test -f aclocal6-1.0/acinclude.m4
+test -f $me-1.0/m4/moredefs.m4
+test -f $me-1.0/m4/somedefs.m4
+test -f $me-1.0/acinclude.m4
 
 # Make sure maintainer-clean works in VPATH builds.
 # (This is unrelated to the rest of this test.)
@@ -89,3 +89,5 @@ $MAKE maintainer-clean
 test ! -d ../autom4te.cache
 test ! -f Makefile
 test ! -f sub/Makefile
+
+:
index ac10aff..d935f4f 100755 (executable)
@@ -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
+$ACLOCAL -I m4 >output 2>&1 || { cat output; Exit 1; }
 test 0 = `wc -l <output`
 grep macro1.m4 aclocal.m4
 grep macro2.m4 aclocal.m4 && Exit 1
+
 :
index 3d761f4..791d081 100755 (executable)
@@ -1,5 +1,6 @@
 #! /bin/sh
-# Copyright (C) 1999, 2001, 2002, 2007  Free Software Foundation, Inc.
+# Copyright (C) 1999, 2001, 2002, 2007, 2010 Free Software Foundation,
+# Inc.
 #
 # This 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 all-local and other -local targets work correctly.
+# Test to make sure several *-local's in a single rule work.
 
 . ./defs || Exit 1
+
 set -e
 
 targets='all install-exec install-data uninstall'
-for target in $targets; do
-   echo "Doing $target"
-   echo "${target}-local:" > Makefile.am
-
-   $ACLOCAL
-   $AUTOMAKE
-
-   $FGREP "${target}-local ${target}-local" Makefile.in && Exit 1
-done
-
-# Several *-local's in a single rule.
-echo "Doing $targets"
 echo "$targets:" | sed -e 's/[ :]/-local&/g' > Makefile.am
+cat Makefile.am  # might be useful for debugging
+
 $ACLOCAL
 $AUTOMAKE
 
 for target in $targets; do
-  $EGREP "${target}-am:.*${target}-local" Makefile.in
+  grep "${target}-local" Makefile.in  # might be useful for debugging
+  grep "${target}-am:.*${target}-local" Makefile.in
 done
 
-Exit 0
+:
diff --git a/tests/all2.test b/tests/all2.test
new file mode 100755 (executable)
index 0000000..38b6f8c
--- /dev/null
@@ -0,0 +1,34 @@
+#! /bin/sh
+# Copyright (C) 2010 Free Software Foundation, Inc.
+#
+# This 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 all-local and other -local targets work correctly.
+
+. ./defs || Exit 1
+
+set -e
+
+$ACLOCAL
+
+targets='all install-exec install-data uninstall'
+for target in $targets; do
+  : Doing $target
+  echo "${target}-local:" > Makefile.am
+  $AUTOMAKE
+  grep "${target}-local ${target}-local" Makefile.in && Exit 1
+  grep "${target}-am:.*${target}-local" Makefile.in
+done
+
+:
index c0778c6..7795f48 100755 (executable)
@@ -42,13 +42,11 @@ END
 : > ansi2knr.1
 
 $ACLOCAL
+$AUTOCONF
 $AUTOMAKE
 
-$FGREP -v @SET_MAKE@ Makefile.in > Makefile.sed
-$MAKE -f Makefile.sed SHELL=$SHELL test1
-
-$AUTOCONF
 ./configure
+
 $MAKE test1
 $MAKE test2
 
index d68fc54..dbdf246 100755 (executable)
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2001, 2002, 2003  Free Software Foundation, Inc.
+# Copyright (C) 2001, 2002, 2003, 2010 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -39,3 +39,5 @@ $AUTOMAKE
 $MAKE
 grep 'it works' libfoo.a
 grep 'really works' libfoo.a
+
+:
index f0485ce..329f804 100755 (executable)
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2004  Free Software Foundation, Inc.
+# Copyright (C) 2004, 2010 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -34,5 +34,7 @@ END
 
 $ACLOCAL
 $AUTOMAKE
-grep 'ARFLAGS =' Makefile.in
-grep 'AR =' Makefile.in
+grep '^ARFLAGS =' Makefile.in
+grep '^AR =' Makefile.in
+
+:
index 6c0aa3d..f1bcb76 100755 (executable)
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2001, 2002, 2003  Free Software Foundation, Inc.
+# Copyright (C) 2001, 2002, 2003, 2010 Free Software Foundation, Inc.
 #
 # This 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 assembly functionality
+# Test of basic assembly functionality.
+# Keep this in sync with sister tests asm2.test and asm3.test.
 
 . ./defs || Exit 1
 
 set -e
 
+mv configure.in configure.stub
+
 cat > Makefile.am << 'END'
 noinst_PROGRAMS = maude
 maude_SOURCES = maude.s
 END
 
-: > maude.s
-
-# Should fail because we need CC and CCAS.
-echo 1
-cat > configure.in << 'END'
-AC_INIT
-AM_INIT_AUTOMAKE(nonesuch, nonesuch)
-AC_SUBST(CCASFLAGS)
-AC_OUTPUT(Makefile)
+echo '*** Try 1 -- should fail because we need CC and CCAS ***'
+cat configure.stub - > configure.in << 'END'
+AC_SUBST([CCASFLAGS])
+AC_OUTPUT
 END
 
 $ACLOCAL
 AUTOMAKE_fails
-grep AM_PROG_AS stderr
+grep '[Aa]ssembler source.*CCAS.* undefined' stderr
+grep 'define .*CCAS.* add .*AM_PROG_AS' stderr
 
 # On fast machines the autom4te.cache created during the above run of
 # $AUTOMAKE is likely to have the same time stamp as the configure.in
@@ -48,51 +47,42 @@ grep AM_PROG_AS stderr
 # bogus installations of Autoconf use a versioned cache.)
 rm -rf autom4te*.cache
 
-# We still need CCAS.
-echo 2
-cat > configure.in << 'END'
-AC_INIT
-AM_INIT_AUTOMAKE(nonesuch, nonesuch)
+echo '*** Try 2 -- we still need CCAS ***'
+cat configure.stub - > configure.in << 'END'
 AC_PROG_CC
-AC_SUBST(CCASFLAGS)
-AC_OUTPUT(Makefile)
+AC_SUBST([CCASFLAGS])
+AC_OUTPUT
 END
 
 $ACLOCAL
 AUTOMAKE_fails
-grep CCAS stderr
-grep AM_PROG_AS stderr
+grep '[Aa]ssembler source.*CCAS.* undefined' stderr
+grep 'define .*CCAS.* add .*AM_PROG_AS' stderr
 
 rm -rf autom4te*.cache
 
-# We need CCASFLAGS.
-echo 3
-cat > configure.in << 'END'
-AC_INIT
-AM_INIT_AUTOMAKE(nonesuch, nonesuch)
+echo '*** Try 3 -- we need CCASFLAGS ***'
+cat configure.stub - > configure.in << 'END'
 CCAS='$(CC)'
-AC_SUBST(CCAS)
+AC_SUBST([CCAS])
 AC_PROG_CC
-AC_OUTPUT(Makefile)
+AC_OUTPUT
 END
 
 $ACLOCAL
 AUTOMAKE_fails
-grep CCASFLAGS stderr
-grep AM_PROG_AS stderr
+grep '[Aa]ssembler source.*CCASFLAGS.* undefined' stderr
+grep 'define .*CCASFLAGS.* add .*AM_PROG_AS' stderr
 
 rm -rf autom4te*.cache
 
-# We have every needed, expect a success.
-echo 4
-cat > configure.in << 'END'
-AC_INIT
-AM_INIT_AUTOMAKE(nonesuch, nonesuch)
+echo '*** Try 4 -- we have everything needed, expect success ***'
+cat configure.stub - > configure.in << 'END'
 CCAS='$(CC)'
-AC_SUBST(CCAS)
+AC_SUBST([CCAS])
 AC_PROG_CC
-AC_SUBST(CCASFLAGS)
-AC_OUTPUT(Makefile)
+AC_SUBST([CCASFLAGS])
+AC_OUTPUT
 END
 
 $ACLOCAL
@@ -100,16 +90,13 @@ $AUTOMAKE
 
 rm -rf autom4te*.cache
 
-# We have every needed, expect a success.
-echo 5
-cat > configure.in << 'END'
-AC_INIT
-AM_INIT_AUTOMAKE(nonesuch, nonesuch)
+echo '*** Try 5 -- we have everything needed, expect success ***'
+cat configure.stub - > configure.in << 'END'
 AM_PROG_AS
-AC_OUTPUT(Makefile)
+AC_OUTPUT
 END
 
 $ACLOCAL
 $AUTOMAKE
 
-Exit 0
+:
index 8afd4f9..ab141e7 100755 (executable)
@@ -1,5 +1,6 @@
 #! /bin/sh
-# Copyright (C) 2001, 2002, 2003, 2006  Free Software Foundation, Inc.
+# Copyright (C) 2001, 2002, 2003, 2006, 2010 Free Software Foundation,
+# Inc.
 #
 # This 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
+# Test of basic preprocessed assembly functionality.
+# Keep this in sync with sister tests asm.test and asm3.test.
 
 . ./defs || Exit 1
 
 set -e
 
+mv configure.in configure.stub
+
 cat > Makefile.am << 'END'
 noinst_PROGRAMS = maude
 maude_SOURCES = maude.S
 END
 
-: > maude.s
-
-# Should fail because we need CC and CCAS.
-echo 1
-cat > configure.in << 'END'
-AC_INIT
-AM_INIT_AUTOMAKE(nonesuch, nonesuch)
-AC_SUBST(CCASFLAGS)
-AC_OUTPUT(Makefile)
+echo '*** Try 1 -- should fail because we need CC and CCAS ***'
+cat configure.stub - > configure.in << 'END'
+AC_SUBST([CCASFLAGS])
+AC_OUTPUT
 END
 
 $ACLOCAL
 AUTOMAKE_fails
-grep AM_PROG_AS stderr
+grep '[Aa]ssembler source.*CCAS.* undefined' stderr
+grep 'define .*CCAS.* add .*AM_PROG_AS' stderr
 
 # On fast machines the autom4te.cache created during the above run of
 # $AUTOMAKE is likely to have the same time stamp as the configure.in
@@ -48,70 +48,58 @@ grep AM_PROG_AS stderr
 # bogus installations of Autoconf use a versioned cache.)
 rm -rf autom4te*.cache
 
-# We still need CCAS.
-echo 2
-cat > configure.in << 'END'
-AC_INIT
-AM_INIT_AUTOMAKE(nonesuch, nonesuch)
+echo '*** Try 2 -- we still need CCAS ***'
+cat configure.stub - > configure.in << 'END'
 AC_PROG_CC
-AC_SUBST(CCASFLAGS)
-AC_OUTPUT(Makefile)
+AC_SUBST([CCASFLAGS])
+AC_OUTPUT
 END
 
 $ACLOCAL
 AUTOMAKE_fails
-grep CCAS stderr
-grep AM_PROG_AS stderr
+grep '[Aa]ssembler source.*CCAS.* undefined' stderr
+grep 'define .*CCAS.* add .*AM_PROG_AS' stderr
 
 rm -rf autom4te*.cache
 
-# We need CCASFLAGS.
-echo 3
-cat > configure.in << 'END'
-AC_INIT
-AM_INIT_AUTOMAKE(nonesuch, nonesuch)
+echo '*** Try 3 -- we need CCASFLAGS ***'
+cat configure.stub - > configure.in << 'END'
 CCAS='$(CC)'
-AC_SUBST(CCAS)
+AC_SUBST([CCAS])
 AC_PROG_CC
-AC_OUTPUT(Makefile)
+AC_OUTPUT
 END
 
 $ACLOCAL
 AUTOMAKE_fails
-grep CCASFLAGS stderr
-grep AM_PROG_AS stderr
+grep '[Aa]ssembler source.*CCASFLAGS.* undefined' stderr
+grep 'define .*CCASFLAGS.* add .*AM_PROG_AS' stderr
 
 rm -rf autom4te*.cache
 
-# We need dependency tracking.
-echo 4
-cat > configure.in << 'END'
-AC_INIT
-AM_INIT_AUTOMAKE(nonesuch, nonesuch)
+echo '*** Try 4 -- we need dependency tracking. ***'
+cat configure.stub - > configure.in << 'END'
 CCAS='$(CC)'
-AC_SUBST(CCAS)
+AC_SUBST([CCAS])
 AC_PROG_CC
-AC_SUBST(CCASFLAGS)
-AC_OUTPUT(Makefile)
+AC_SUBST([CCASFLAGS])
+AC_OUTPUT
 END
 
 $ACLOCAL
 AUTOMAKE_fails
-grep AM_PROG_AS stderr
+grep ' add .*AM_PROG_AS' stderr
 
 rm -rf autom4te*.cache
 
-# We have every needed, expect a success.
-echo 5
-cat > configure.in << 'END'
-AC_INIT
-AM_INIT_AUTOMAKE(nonesuch, nonesuch)
+echo '*** Try 5 -- we have everything needed, expect success. ***'
+cat configure.stub - > configure.in << 'END'
 CCAS='$(CC)'
-AC_SUBST(CCAS)
+AC_SUBST([CCAS])
 AC_PROG_CC
-_AM_DEPENDENCIES(CCAS)
-AC_SUBST(CCASFLAGS)
-AC_OUTPUT(Makefile)
+_AM_DEPENDENCIES([CCAS])
+AC_SUBST([CCASFLAGS])
+AC_OUTPUT
 END
 
 $ACLOCAL
@@ -119,16 +107,13 @@ $AUTOMAKE
 
 rm -rf autom4te*.cache
 
-# We have every needed, expect a success.
-echo 6
-cat > configure.in << 'END'
-AC_INIT
-AM_INIT_AUTOMAKE(nonesuch, nonesuch)
+echo '*** Try 6 -- we have everything needed, expect success. ***'
+cat configure.stub - > configure.in << 'END'
 AM_PROG_AS
-AC_OUTPUT(Makefile)
+AC_OUTPUT
 END
 
 $ACLOCAL
 $AUTOMAKE
 
-Exit 0
+:
index 0738d6a..5c42c48 100755 (executable)
 # 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.
 
 . ./defs || Exit 1
 
 set -e
 
+mv configure.in configure.stub
+
 cat > Makefile.am << 'END'
 noinst_PROGRAMS = maude
 maude_SOURCES = maude.sx
 END
 
-: > maude.sx
-
-# Should fail because we need CC and CCAS.
-echo 1
-cat > configure.in << 'END'
-AC_INIT
-AM_INIT_AUTOMAKE(nonesuch, nonesuch)
-AC_SUBST(CCASFLAGS)
-AC_OUTPUT(Makefile)
+echo '*** Try 1 -- should fail because we need CC and CCAS ***'
+cat configure.stub - > configure.in << 'END'
+AC_SUBST([CCASFLAGS])
+AC_OUTPUT
 END
 
 $ACLOCAL
 AUTOMAKE_fails
-grep AM_PROG_AS stderr
+grep '[Aa]ssembler source.*CCAS.* undefined' stderr
+grep 'define .*CCAS.* add .*AM_PROG_AS' stderr
 
 # On fast machines the autom4te.cache created during the above run of
 # $AUTOMAKE is likely to have the same time stamp as the configure.in
@@ -49,70 +48,58 @@ grep AM_PROG_AS stderr
 # bogus installations of Autoconf use a versioned cache.)
 rm -rf autom4te*.cache
 
-# We still need CCAS.
-echo 2
-cat > configure.in << 'END'
-AC_INIT
-AM_INIT_AUTOMAKE(nonesuch, nonesuch)
+echo '*** Try 2 -- we still need CCAS ***'
+cat configure.stub - > configure.in << 'END'
 AC_PROG_CC
-AC_SUBST(CCASFLAGS)
-AC_OUTPUT(Makefile)
+AC_SUBST([CCASFLAGS])
+AC_OUTPUT
 END
 
 $ACLOCAL
 AUTOMAKE_fails
-grep CCAS stderr
-grep AM_PROG_AS stderr
+grep '[Aa]ssembler source.*CCAS.* undefined' stderr
+grep 'define .*CCAS.* add .*AM_PROG_AS' stderr
 
 rm -rf autom4te*.cache
 
-# We need CCASFLAGS.
-echo 3
-cat > configure.in << 'END'
-AC_INIT
-AM_INIT_AUTOMAKE(nonesuch, nonesuch)
+echo '*** Try 3 -- we need CCASFLAGS ***'
+cat configure.stub - > configure.in << 'END'
 CCAS='$(CC)'
-AC_SUBST(CCAS)
+AC_SUBST([CCAS])
 AC_PROG_CC
-AC_OUTPUT(Makefile)
+AC_OUTPUT
 END
 
 $ACLOCAL
 AUTOMAKE_fails
-grep CCASFLAGS stderr
-grep AM_PROG_AS stderr
+grep '[Aa]ssembler source.*CCASFLAGS.* undefined' stderr
+grep 'define .*CCASFLAGS.* add .*AM_PROG_AS' stderr
 
 rm -rf autom4te*.cache
 
-# We need dependency tracking.
-echo 4
-cat > configure.in << 'END'
-AC_INIT
-AM_INIT_AUTOMAKE(nonesuch, nonesuch)
+echo '*** Try 4 -- we need dependency tracking. ***'
+cat configure.stub - > configure.in << 'END'
 CCAS='$(CC)'
-AC_SUBST(CCAS)
+AC_SUBST([CCAS])
 AC_PROG_CC
-AC_SUBST(CCASFLAGS)
-AC_OUTPUT(Makefile)
+AC_SUBST([CCASFLAGS])
+AC_OUTPUT
 END
 
 $ACLOCAL
 AUTOMAKE_fails
-grep AM_PROG_AS stderr
+grep ' add .*AM_PROG_AS' stderr
 
 rm -rf autom4te*.cache
 
-# We have every needed, expect a success.
-echo 5
-cat > configure.in << 'END'
-AC_INIT
-AM_INIT_AUTOMAKE(nonesuch, nonesuch)
+echo '*** Try 5 -- we have everything needed, expect success. ***'
+cat configure.stub - > configure.in << 'END'
 CCAS='$(CC)'
-AC_SUBST(CCAS)
+AC_SUBST([CCAS])
 AC_PROG_CC
-_AM_DEPENDENCIES(CCAS)
-AC_SUBST(CCASFLAGS)
-AC_OUTPUT(Makefile)
+_AM_DEPENDENCIES([CCAS])
+AC_SUBST([CCASFLAGS])
+AC_OUTPUT
 END
 
 $ACLOCAL
@@ -120,16 +107,13 @@ $AUTOMAKE
 
 rm -rf autom4te*.cache
 
-# We have every needed, expect a success.
-echo 6
-cat > configure.in << 'END'
-AC_INIT
-AM_INIT_AUTOMAKE(nonesuch, nonesuch)
+echo '*** Try 6 -- we have everything needed, expect success. ***'
+cat configure.stub - > configure.in << 'END'
 AM_PROG_AS
-AC_OUTPUT(Makefile)
+AC_OUTPUT
 END
 
 $ACLOCAL
 $AUTOMAKE
 
-Exit 0
+:
diff --git a/tests/autodist-acconfig-no-subdir.test b/tests/autodist-acconfig-no-subdir.test
new file mode 100755 (executable)
index 0000000..e6bd5a9
--- /dev/null
@@ -0,0 +1,58 @@
+#! /bin/sh
+# Copyright (C) 2011 Free Software Foundation, Inc.
+#
+# This 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 `acconfig.h' is *not* automatically distributed when
+# placed in a subdirectory.
+# Related to automake bug#7819.
+
+. ./defs || Exit 1
+
+set -e
+
+cat >> configure.in <<END
+AC_CONFIG_FILES([sub/Makefile])
+AC_OUTPUT
+END
+
+cat > Makefile.am <<'END'
+SUBDIRS = sub
+sub/acconfig.h:
+       echo target $@ should not be built >&2; exit 1
+check-local: distdir
+       ls -l $(distdir)/sub
+       test ! -f $(distdir)/sub/acconfig.h
+END
+
+mkdir sub
+
+cat > sub/Makefile.am <<'END'
+acconfig.h:
+       echo target $@ should not be built >&2; exit 1
+check-local:
+       echo $(DISTFILES) | grep 'acconfig\.h' && exit 1; :
+       echo $(DIST_COMMON) | grep 'acconfig\.h' && exit 1; :
+END
+
+: > sub/acconfig.h
+
+$ACLOCAL
+$AUTOMAKE
+$AUTOCONF
+
+./configure
+$MAKE check
+
+:
diff --git a/tests/autodist-acconfig.test b/tests/autodist-acconfig.test
new file mode 100755 (executable)
index 0000000..49ab2f0
--- /dev/null
@@ -0,0 +1,46 @@
+#! /bin/sh
+# Copyright (C) 2011 Free Software Foundation, Inc.
+#
+# This 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 `acconfig.h' is automatically distributed if it exists
+# (at automake runtime).
+# Related to automake bug#7819.
+
+. ./defs || Exit 1
+
+set -e
+
+cat >> configure.in <<END
+AC_OUTPUT
+END
+
+cat > Makefile.am <<'END'
+.PHONY: test
+test: distdir
+       ls -l $(distdir)
+       echo ' ' $(DIST_COMMON) ' ' | grep '[ /]acconfig\.h '
+       test -f $(distdir)/acconfig.h
+END
+
+: > acconfig.h
+
+$ACLOCAL
+$AUTOMAKE
+$AUTOCONF
+
+./configure
+$MAKE test
+
+:
diff --git a/tests/autodist-aclocal-m4.test b/tests/autodist-aclocal-m4.test
new file mode 100755 (executable)
index 0000000..3f53d59
--- /dev/null
@@ -0,0 +1,55 @@
+#! /bin/sh
+# Copyright (C) 2011 Free Software Foundation, Inc.
+#
+# This 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 `aclocal.m4' is not automatically distributed if not
+# required to build `configure'.  This is *really* a corner-case
+# check, and the behaviour it checks is not documented either, so
+# if that behaviour is deliberately changed in the future, just
+# remove this test.
+# Related to automake bug#7819.
+
+. ./defs || Exit 1
+
+set -e
+
+{ echo 'm4_include([defs.m4])'
+  cat configure.in
+  echo 'AC_OUTPUT'
+} > t
+mv -f t configure.in
+
+cat > Makefile.am <<'END'
+.PHONY: test
+test: distdir
+       ls -l $(distdir)
+       test ! -f $(distdir)/aclocal.m4
+       echo $(DISTFILES) | grep 'aclocal\.m4' && exit 1; :
+       echo $(DIST_COMMON) | grep 'aclocal\.m4' && exit 1; :
+check-local: test
+END
+
+: > defs.m4
+$ACLOCAL
+mv -f aclocal.m4 defs.m4
+
+$AUTOMAKE
+$AUTOCONF
+
+./configure
+$MAKE test
+$MAKE distcheck
+
+:
diff --git a/tests/autodist-config-headers.test b/tests/autodist-config-headers.test
new file mode 100755 (executable)
index 0000000..66c9bea
--- /dev/null
@@ -0,0 +1,61 @@
+#! /bin/sh
+# Copyright (C) 2011 Free Software Foundation, Inc.
+#
+# This 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 config.h.bot and config.h.top are automatically
+# distributed if the AC_CONFIG_HADERS macro is used and they
+# exist at automake runtime.
+# Related to automake bug#7819.
+
+. ./defs || Exit 1
+
+set -e
+
+cat >> configure.in <<END
+AC_CONFIG_HEADERS([config.h sub/config.h cfg2.h:conf2.hin])
+AC_OUTPUT
+END
+
+cat > Makefile.am <<'END'
+.PHONY: test
+test: distdir
+       ls -l $(distdir) $(distdir)/sub
+       echo ' ' $(DIST_COMMON) ' ' | grep '[ /]config\.h\.bot '
+       echo ' ' $(DIST_COMMON) ' ' | grep '[ /]config\.h\.top '
+       echo ' ' $(DIST_COMMON) ' ' | grep '[ /]cfg2\.h\.bot '
+       echo ' ' $(DIST_COMMON) ' ' | grep '[ /]cfg2\.h\.top '
+       echo ' ' $(DIST_COMMON) ' ' | grep '[ /]sub/config\.h\.bot '
+       echo ' ' $(DIST_COMMON) ' ' | grep '[ /]sub/config\.h\.top '
+       test -f $(distdir)/config.h.bot
+       test -f $(distdir)/config.h.top
+       test -f $(distdir)/cfg2.h.bot
+       test -f $(distdir)/cfg2.h.top
+       test -f $(distdir)/sub/config.h.bot
+       test -f $(distdir)/sub/config.h.top
+END
+
+mkdir sub
+touch config.h.in config.h.top config.h.bot \
+      conf2.hin cfg2.h.top cfg2.h.bot \
+      sub/config.h.in sub/config.h.top sub/config.h.bot
+
+$ACLOCAL
+$AUTOMAKE
+$AUTOCONF
+
+./configure
+$MAKE test
+
+:
diff --git a/tests/autodist-configure-no-subdir.test b/tests/autodist-configure-no-subdir.test
new file mode 100755 (executable)
index 0000000..db640c4
--- /dev/null
@@ -0,0 +1,72 @@
+#! /bin/sh
+# Copyright (C) 2011 Free Software Foundation, Inc.
+#
+# This 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', `configure.ac' and `configure.in' are *not*
+# automatically distributed when placed in a subdirectory.
+# Related to automake bug#7819.
+
+. ./defs || Exit 1
+
+set -e
+
+cat >> configure.in <<END
+AC_CONFIG_FILES([sub/Makefile])
+AC_OUTPUT
+END
+
+cat > Makefile.am <<'END'
+SUBDIRS = sub
+dontbuild = echo target $@ should not be built >&2; exit 1
+sub/configure:
+       $(dontbuild)
+sub/configure.ac:
+       $(dontbuild)
+sub/configure.in:
+       $(dontbuild)
+check-local: distdir
+       ls -l $(distdir)/sub
+       test ! -f $(distdir)/sub/configure
+       test ! -f $(distdir)/sub/configure.in
+       test ! -f $(distdir)/sub/configure.ac
+END
+
+mkdir sub
+
+cat > sub/Makefile.am <<'END'
+dontbuild = echo target $@ should not be built >&2; exit 1
+configure:
+       $(dontbuild)
+configure.ac:
+       $(dontbuild)
+configure.in:
+       $(dontbuild)
+check-local:
+       echo $(DISTFILES) | grep 'configure' && exit 1; :
+       echo $(DIST_COMMON) | grep 'configure' && exit 1; :
+END
+
+: > sub/configure.ac
+: > sub/configure.in
+: > sub/configure
+
+$ACLOCAL
+$AUTOMAKE
+$AUTOCONF
+
+./configure
+$MAKE check
+
+:
diff --git a/tests/autodist-stamp-vti.test b/tests/autodist-stamp-vti.test
new file mode 100755 (executable)
index 0000000..4f37e14
--- /dev/null
@@ -0,0 +1,60 @@
+#! /bin/sh
+# Copyright (C) 2011 Free Software Foundation, Inc.
+#
+# This 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 `stamp-vti' is automatically distributed when info_TEXINFOS
+# and version.texi are involved.
+# Related to automake bug#7819.
+
+required=makeinfo
+. ./defs || Exit 1
+
+set -e
+
+cat >> configure.in << END
+AC_OUTPUT
+END
+
+cat > Makefile.am << 'END'
+info_TEXINFOS = foo.texi
+.PHONY: test
+test: all distdir
+       ls -l $(distdir)
+       echo ' ' $(DIST_COMMON) ' ' | grep '[ /]stamp-vti '
+       test -f $(distdir)/stamp-vti
+END
+
+cat > foo.texi << 'END'
+\input texinfo
+@setfilename foo.info
+@settitle Zardoz
+@node Top
+@include version.texi
+bar baz quux
+@bye
+END
+
+# Required when using Texinfo.
+: > texinfo.tex
+cp "$testsrcdir/../lib/mdate-sh" .
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE -a
+
+./configure
+$MAKE test
+
+:
diff --git a/tests/autodist-subdir.test b/tests/autodist-subdir.test
new file mode 100755 (executable)
index 0000000..db694f8
--- /dev/null
@@ -0,0 +1,147 @@
+#! /bin/sh
+# Copyright (C) 2011 Free Software Foundation, Inc.
+#
+# This 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 really automatically distributes all the files
+# it advertises to do, even when in subdirectories.
+#
+# This behavior might be suboptimal, but it has been in place for quite
+# a long time, and it would be risky to change it now.  See also the
+# discussion of automake bug#7819:
+#  <http://debbugs.gnu.org/cgi/bugreport.cgi?bug=7819>
+#
+# Keep this test in sync with sister test `autodist.test'.
+
+. ./defs || Exit 1
+
+set -e
+
+cat >> configure.in <<'END'
+AC_CONFIG_FILES([sub/Makefile])
+AC_OUTPUT
+END
+
+$ACLOCAL
+$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/,/^ *$/p' \
+        | sed 1d`
+list=`for f in $list; do
+        case $f in
+          configure|configure.in|configure.ac)
+            # See test 'autodist-configure-no-subdir.test'.
+            ;;
+          aclocal.m4)
+            # This file should be distributed only when it is a real
+            # dependency for configure.  Anyway, not a check to be
+            # performed in this test.
+            ;;
+          acconfig.h)
+            # Works only when it really exists, not when it is a
+            # target in Makefile.am.
+            ;;
+          stamp-vti)
+            # Works only when using info_TEXINFOS and version.texi.
+            ;;
+          config.h.bot|config.h.top)
+            # Works only when the AC_CONFIG_HADERS macro is used.
+            ;;
+          *)
+            echo $f
+            ;;
+        esac
+      done`
+# Normalize whitespace, just in case.
+list=`echo $list`
+
+test -n "$list"
+
+cat > Makefile.am <<'END'
+SUBDIRS = sub
+check-local:
+## For debugging.
+       @echo DIST_COMMON:
+       @for f in $(DIST_COMMON); do echo "  $$f"; done
+       @echo DISTDIR:
+       @ls -l $(distdir) | sed 's/^/  /'
+## Now the checks.
+       @for f in $(autodist_list); do \
+         echo "file: sub/$$f"; \
+         test -f $(distdir)/sub/$$f \
+           || { echo $$f: distdir fail >&2; exit 1; }; \
+       done
+END
+
+mkdir sub
+
+cat > sub/Makefile.am <<'END'
+include distfiles.am
+check-local:
+## For debugging.
+       @echo DIST_COMMON:
+       @for f in $(DIST_COMMON); do echo "  $$f"; done
+       @echo DISTDIR:
+       @ls -l $(distdir) | sed 's/^/  /'
+## Now the checks.
+       @for f in $(autodist_list); do \
+         echo "file: $$f"; \
+         ## Some filenames might contain dots, but this won't cause spurious
+         ## failures, and "spurious successes" are so unlikely that they're
+         ## not worth worrying about.
+         echo ' ' $(DIST_COMMON) ' ' | grep "[ /]$$f " >/dev/null \
+           || { echo $$f: distcom fail >&2; exit 1; }; \
+       done
+END
+
+: First try listing the automatically-distributed files in proper
+: targets in Makefile.am
+
+echo "MAINTAINERCLEANFILES = $list" > sub/distfiles.am
+for f in $list; do echo "$f :; touch $f"; done >> sub/distfiles.am
+
+cat sub/distfiles.am # For debugging.
+
+$AUTOMAKE -a
+
+./configure
+
+$MAKE distdir
+autodist_list="$list" $MAKE check
+
+$MAKE maintainer-clean
+test ! -f sub/README    # Sanity check.
+rm -rf $me-1.0          # Remove $(distdir).
+
+: Now try creating the automatically-distributed files before
+: running automake.
+
+: > sub/distfiles.am
+for f in $list; do
+  echo dummy > sub/$f
+done
+
+ls -l # For debugging.
+
+$AUTOMAKE
+
+./configure
+
+$MAKE distdir
+autodist_list="$list" $MAKE check
+
+:
diff --git a/tests/autodist.test b/tests/autodist.test
new file mode 100755 (executable)
index 0000000..34b9526
--- /dev/null
@@ -0,0 +1,136 @@
+#! /bin/sh
+# Copyright (C) 2011 Free Software Foundation, Inc.
+#
+# This 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 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'.
+
+. ./defs || Exit 1
+
+set -e
+
+# Ensure we are run from the right directory.
+# (The last thing we want is to delete some random user files.)
+test -f ../defs-static
+rm -f *
+
+cat > configure.in <<END
+AC_INIT([$me], [1.0])
+AC_CONFIG_AUX_DIR([.])
+AM_INIT_AUTOMAKE
+## Will avoid useless regeneration of aclocal.m4, configure, etc.
+AM_MAINTAINER_MODE
+AC_CONFIG_FILES([Makefile])
+AC_OUTPUT
+END
+
+$ACLOCAL
+$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/,/^ *$/p' \
+        | sed 1d`
+list=`for f in $list; do
+        case $f in
+          configure|configure.in|configure.ac)
+            # See test 'autodist-configure-no-subdir.test'.
+            ;;
+          aclocal.m4)
+            # This file should be distributed only when it is a real
+            # dependency for configure.  Anyway, not a check to be
+            # performed in this test.
+            ;;
+          acconfig.h)
+            # Works only when it really exists, not when it is a
+            # target in Makefile.am.
+            ;;
+          stamp-vti)
+            # Works only when using info_TEXINFOS and version.texi.
+            ;;
+          config.h.bot|config.h.top)
+            # Works only when the AC_CONFIG_HADERS macro is used.
+            ;;
+          *)
+            echo $f
+            ;;
+        esac
+      done`
+# Normalize whitespace, just in case.
+list=`echo $list`
+
+test -n "$list"
+
+cat > Makefile.am <<'END'
+include distfiles.am
+check-local:
+## For debugging.
+       @echo DIST_COMMON:
+       @for f in $(DIST_COMMON); do echo "  $$f"; done
+       @echo DISTDIR:
+       @ls -l $(distdir) | sed 's/^/  /'
+## Now the checks.
+       @for f in $(autodist_list); do \
+         echo "file: $$f"; \
+         test -f $(distdir)/$$f \
+           || { echo $$f: distdir fail >&2; exit 1; }; \
+         ## Some filenames might contain dots, but this won't cause spurious
+         ## failures, and "spurious successes" are so unlikely that they're
+         ## not worth worrying about.
+         echo ' ' $(DIST_COMMON) ' ' | grep "[ /]$$f " >/dev/null \
+           || { echo $$f: distcom fail >&2; exit 1; }; \
+       done
+END
+
+: First try listing the automatically-distributed files in proper
+: targets in Makefile.am
+
+echo "MAINTAINERCLEANFILES = $list" > distfiles.am
+for f in $list; do echo "$f :; touch $f"; done >> distfiles.am
+
+cat distfiles.am # For debugging.
+
+$AUTOMAKE -a
+
+./configure
+
+$MAKE distdir
+autodist_list="$list" $MAKE check
+
+$MAKE maintainer-clean
+test ! -f README        # Sanity check.
+rm -rf $me-1.0          # Remove $(distdir).
+
+: Now try creating the automatically-distributed files before
+: running automake.
+
+: > distfiles.am
+for f in $list; do
+  echo dummy > $f
+done
+
+ls -l # For debugging.
+
+$AUTOMAKE
+
+./configure
+
+$MAKE distdir
+autodist_list="$list" $MAKE check
+
+:
index 014d2b7..9293bd1 100755 (executable)
@@ -16,7 +16,7 @@
 
 # Check that autoheaders works, despite our AC_CONFIG_HEADERS hack.
 
-. ./defs
+. ./defs || Exit 1
 
 set -e
 
index 2ddce32..e2a71cf 100755 (executable)
@@ -16,7 +16,7 @@
 
 # Check that autoheaders works, despite our AC_CONFIG_HEADERS hack.
 
-. ./defs
+. ./defs || Exit 1
 
 set -e
 
index 8e9f079..f559295 100755 (executable)
@@ -17,7 +17,7 @@
 # Check rebuild rules for autoheader.
 
 required=GNUmake
-. ./defs
+. ./defs || Exit 1
 
 set -e
 
index 187429f..24c57fb 100755 (executable)
@@ -18,7 +18,7 @@
 # (This should also work without GNU Make.)
 
 required=gcc
-. ./defs
+. ./defs || Exit 1
 
 set -e
 
diff --git a/tests/autohdrdry.test b/tests/autohdrdry.test
new file mode 100755 (executable)
index 0000000..b501e76
--- /dev/null
@@ -0,0 +1,45 @@
+#!/bin/sh
+# Copyright (C) 2010 Free Software Foundation, Inc.
+#
+# This 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/>.
+
+# Removal recovery rules for AC_CONFIG_HEADERS should not remove files
+# with `make -n'.
+
+. ./defs || Exit 1
+
+set -e
+
+cat >>configure.in <<'EOF'
+AC_PROG_CC
+AC_CONFIG_HEADERS([config.h])
+AC_OUTPUT
+EOF
+
+: >Makefile.am
+
+$ACLOCAL
+$AUTOCONF
+$AUTOHEADER
+$AUTOMAKE
+
+./configure
+$MAKE
+
+rm -f config.h
+$MAKE -n
+test -f stamp-h1
+test ! -f config.h
+
+:
index da7a9da..22b5ed3 100755 (executable)
 
 set -e
 
-cat > configure.in << 'END'
-AC_INIT
-AM_INIT_AUTOMAKE(nonesuch, nonesuch)
-AC_OUTPUT(Makefile foo.h:foo.hin)
+cat >> configure.in <<'END'
+AC_CONFIG_FILES([foo.h:foo.hin])
+AC_OUTPUT
 END
 
 : > Makefile.am
 : > foo.hin
-: > stamp-h.in
 
 $ACLOCAL
 $AUTOMAKE
+
+:
index ebb2bfe..a52dfa8 100755 (executable)
@@ -1,5 +1,6 @@
 #! /bin/sh
-# Copyright (C) 1996, 2000, 2001, 2002  Free Software Foundation, Inc.
+# Copyright (C) 1996, 2000, 2001, 2002, 2010 Free Software Foundation,
+# Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
 
 . ./defs || Exit 1
 
-cat > configure.in << 'END'
-AC_INIT
-AM_INIT_AUTOMAKE(nonesuch, nonesuch)
-AC_OUTPUT(Makefile:zardoz.in)
+set -e
+
+cat > configure.in <<END
+AC_INIT([$me], [1.0])
+AM_INIT_AUTOMAKE
+AC_CONFIG_FILES([Makefile:zardoz.in])
+AC_OUTPUT
 END
 
-: > zardoz.am
+echo 'dummy:' > zardoz.am
 
-$ACLOCAL || Exit 1
-$AUTOMAKE || Exit 1
+$ACLOCAL
+$AUTOMAKE
 
 # We actually check several things here.
-test -f zardoz.in || Exit 1
+test -f zardoz.in
 grep '^zardoz:' zardoz.in && Exit 1
-Exit 0
+grep '^dummy:' zardoz.in
+
+:
index 6fed8b9..151d015 100755 (executable)
@@ -1,6 +1,6 @@
 #! /bin/sh
-# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003
-#   Free Software Foundation, Inc.
+# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2010 Free Software
+# Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
 
 set -e
 
-cat > configure.in << 'END'
-AC_INIT
-AM_INIT_AUTOMAKE(nonesuch, nonesuch)
-AC_OUTPUT(Makefile:zardoz.in:two.in:three.in)
+cat > configure.in <<END
+AC_INIT([$me], [1.0])
+AM_INIT_AUTOMAKE
+AC_CONFIG_FILES([Makefile:zardoz.in:two.in:three.in])
+AC_OUTPUT
 END
 
 : > zardoz.am
@@ -35,21 +36,26 @@ END
 $ACLOCAL
 $AUTOMAKE
 
-# We actually check several things here.
 # Automake should have created zardoz.in.
 test -f zardoz.in
 
 # The generated file should refer to zardoz.in and zardoz.am, but
 # never just "zardoz".
-echo Grep1
-grep zardoz zardoz.in | $FGREP -v 'zardoz.in' | $FGREP -v 'zardoz.am' > O || :
-# We cat the output file so we see in when verbose.
-cat O
-test -z "`cat O`"
-
+sed -e 's|zardoz\.am|zrdz.am|g' \
+    -e 's|zardoz\.in|zrdz.in|g' \
+  <zardoz.in | $FGREP 'zardoz' && Exit 1
+
+# FIXME: Do something like this after planned enahncements to tests/defs.
+# FIXME: Or even do proper functional testing.
+## Also, Makefile should depend on two.in and three.in.
+# extract_makefile_deps Makefile zardoz.in > deps
+#$FGREP ' $(srcdir)/two.in ' deps
+#$FGREP ' $(srcdir)/three.in ' deps
+#
+# FIXME: for the moment, we content ourselves with these inferior tests.
 # Makefile should depend on two.in.
-echo Grep2
 grep '^Makefile:.* \$(srcdir)/two.in' zardoz.in
 # Likewise three.in.
-echo Grep3
 grep '^Makefile:.* \$(srcdir)/three.in' zardoz.in
+
+:
index cec3c86..9af6b4e 100755 (executable)
@@ -1,5 +1,6 @@
 #! /bin/sh
-# Copyright (C) 1998, 2000, 2001, 2002  Free Software Foundation, Inc.
+# Copyright (C) 1998, 2000, 2001, 2002, 2010 Free Software Foundation,
+# Inc.
 #
 # This 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 ":" works with files automake generates.
-# This test is for multiple ":"s.
+# Make sure multiple ":"s in AC_CONFIG_FILES do not generate broken
+# rebuild rules.
 # Test from Maciej W. Rozycki.
 
 . ./defs || Exit 1
 
-cat > configure.in << 'END'
-AC_INIT
-AM_INIT_AUTOMAKE(nonesuch, nonesuch)
-AC_OUTPUT(Makefile zardoz:one:two:three)
+set -e
+
+cat >> configure.in <<END
+AC_CONFIG_FILES([zardoz:one:two:three])
+AC_OUTPUT
 END
 
 : > Makefile.am
@@ -31,9 +33,10 @@ END
 : > two
 : > three
 
-$ACLOCAL || Exit 1
-$AUTOMAKE || Exit 1
+$ACLOCAL
+$AUTOMAKE
 
-# The rule should regenerate the file "zardoz".
-grep '^zardoz:one:two' Makefile.in && Exit 1
+# The rule should regenerate the file "zardoz", not a meaningless
+# file "'zardoz:one:two".
+$FGREP 'zardoz:one:two' Makefile.in && Exit 1
 Exit 0
index fe97f99..9dae9c8 100755 (executable)
 
 set -e
 
-cat > configure.in << 'END'
-AC_INIT
-AM_INIT_AUTOMAKE(nonesuch, nonesuch)
-AC_OUTPUT(Makefile:Makefile.in:Makefile.dep)
+cat > configure.in <<END
+AC_INIT([$me], [1.0])
+AM_INIT_AUTOMAKE
+AC_CONFIG_FILES([Makefile:Makefile.in:Makefile.dep])
+AC_OUTPUT
 END
 
-: > Makefile.am
 : > Makefile.dep
 
+cat > Makefile.am <<'END'
+.PHONY: test
+test:
+       case ' $(DIST_COMMON) ' in \
+         *' $(srcdir)/Makefile.dep '*|*' Makefile.dep '*) exit 0;; \
+         *) exit 1;; \
+       esac
+END
+
 $ACLOCAL
 $AUTOMAKE
 
-grep 'Makefile:Makefile.in' Makefile.in
+grep 'Makefile:Makefile\.in' Makefile.in
+grep '^Makefile:.* \$(srcdir)/Makefile\.dep' Makefile.in
+
+sed -e '/@SET_MAKE@/d' -e "s!@SHELL@!$SHELL!g" <Makefile.in >Makefile.sed
+$MAKE -f Makefile.sed SHELL=$SHELL test
+
+:
index 99877c5..7c620d6 100755 (executable)
 
 set -e
 
-cat > configure.in << 'END'
-AC_INIT
-AM_INIT_AUTOMAKE(nonesuch, nonesuch)
-AC_OUTPUT(demo/Makefile demo/version.good:demo/version.gin)
+cat > configure.in <<END
+AC_INIT([$me], [1.0])
+AM_INIT_AUTOMAKE
+AC_CONFIG_FILES([demo/Makefile demo/version.good:demo/version.gin])
+AC_OUTPUT
 END
 
 mkdir demo
 
-: > demo/Makefile.am
 : > demo/version.gin
 
+cat > demo/Makefile.am <<'END'
+.PHONY: test
+test:
+       case ' $(DIST_COMMON) ' in \
+         *' $(srcdir)/version.gin '*) exit 0;; \
+         *) exit 1;; \
+       esac
+END
+
 $ACLOCAL
 $AUTOMAKE
+
+$EGREP 'Makefile:.*(demo|version)' demo/Makefile.in && Exit 1
+grep 'version\.good:.*version\.gin' demo/Makefile.in
+
+sed -e '/@SET_MAKE@/d' -e "s!@SHELL@!$SHELL!g" <demo/Makefile.in >Makefile.sed
+$MAKE -f Makefile.sed SHELL=$SHELL test
+
+:
index 4df6a13..4195188 100755 (executable)
@@ -1,5 +1,6 @@
 #! /bin/sh
-# Copyright (C) 1998, 2000, 2001, 2002  Free Software Foundation, Inc.
+# Copyright (C) 1998, 2000, 2001, 2002, 2010 Free Software Foundation,
+# Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
 
 . ./defs || Exit 1
 
+set -e
+
 cat > configure.in << 'END'
-AC_INIT
-AM_INIT_AUTOMAKE(nonesuch, nonesuch)
+AC_INIT([colon7], [1.0])
+AM_INIT_AUTOMAKE
+dnl: Please do not add proper m4 quoting here.
 AC_OUTPUT(subdir/bar:subdir/foo \
    Makefile \
    subdir/Makefile
@@ -34,8 +38,8 @@ mkdir subdir
 : > subdir/Makefile.am
 : > subdir/foo
 
-$ACLOCAL || Exit 1
-$AUTOMAKE || Exit 1
+$ACLOCAL
+$AUTOMAKE
 
 # shouldn't have any bar.in
 grep 'bar.in' subdir/Makefile.in && Exit 1
@@ -43,4 +47,4 @@ grep 'bar.in' subdir/Makefile.in && Exit 1
 # DIST_COMMON should have foo, not subdir/foo
 grep 'DIST_COMMON.*subdir/foo' subdir/Makefile.in && Exit 1
 
-Exit 0
+:
index 9d86785..c1032fd 100755 (executable)
@@ -34,7 +34,7 @@ std='\e[m'
 # 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) ;;
+  "$std") ;;
   *) echo "$me: grep can't parse nonprinting characters" >&2; Exit 77;;
 esac
 
index eedd37d..306aa04 100755 (executable)
@@ -34,7 +34,7 @@ std='\e[m'
 # 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) ;;
+  "$std") ;;
   *) echo "$me: grep can't parse nonprinting characters" >&2; Exit 77;;
 esac
 
diff --git a/tests/comments-in-var-defn.test b/tests/comments-in-var-defn.test
new file mode 100755 (executable)
index 0000000..b00ee6b
--- /dev/null
@@ -0,0 +1,58 @@
+#! /bin/sh
+# Copyright (C) 2011 Free Software Foundation, Inc.
+#
+# This 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 Automake ignores in-line comments when using variables,
+# but preserve them in the output.
+
+. ./defs || Exit 1
+
+set -e
+
+cat >> configure.in <<'END'
+AC_OUTPUT
+END
+
+# Use a slash in the comment, because automake takes the dirname
+# of TEXINFO_TEX to compute $(am__TEXINFO_TEX_DIR).
+cat > Makefile.am << 'END'
+TEXINFO_TEX = tex/texinfo.tex    # some comment w/ a slash
+info_TEXINFOS = main.texi
+.PHONY: test
+test:
+       test tex/texinfo.tex = $(TEXINFO_TEX)
+       test -d '$(am__TEXINFO_TEX_DIR)'
+       case '$(am__TEXINFO_TEX_DIR)' in tex|./tex) :;; *) exit 1;; esac
+END
+
+cat > main.texi << 'END'
+\input texinfo
+@setfilename main.info
+END
+
+mkdir tex
+: > tex/texinfo.tex
+
+$ACLOCAL
+$AUTOMAKE
+
+grep TEX Makefile.in # for debugging
+grep '^TEXINFO_TEX *= *tex/texinfo\.tex  *# some comment w/ a slash *$' Makefile.in
+
+$AUTOCONF
+./configure
+$MAKE test
+
+:
index fe4574a..334f154 100755 (executable)
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2009  Free Software Foundation, Inc.
+# Copyright (C) 2009, 2010 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -66,11 +66,7 @@ test -f "$amtest_object"
 # Absolute w32 paths should be accepted.
 # Do not actually run this test on anything that could be w32.
 test -d "C:\\" && Exit 77
-# This test is taken from Autoconf's _AS_PATH_SEPARATOR_PREPARE.
-(PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
-  (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
-    Exit 77
-}
+case $PATH_SEPARATOR in ';'|':');; *) Exit 77;; esac
 
 amtest_source='C:\libltdl\libltdl\slist.c'
 amtest_object='C:\libltdl\libltdl\libltdl_libltdl_la-slist.obj'
index a995527..d1836fb 100755 (executable)
@@ -39,6 +39,8 @@ END
 : > foo.f
 : > bar.c
 : > baz.cc
+: > config.guess
+: > config.sub
 
 $ACLOCAL
 $AUTOMAKE
index d8c4361..e5f6be9 100755 (executable)
@@ -33,7 +33,7 @@ cat > Makefile.am << 'END'
 noinst_LIBRARIES = libtest.a
 
 if COND1
-SOURCEVAR1 = 
+SOURCEVAR1 =
 SOURCEVAR2 = habla.cpp espanol.cpp
 else
 SOURCEVAR1 = dummy.cpp
index 2779a3d..09701f7 100755 (executable)
@@ -33,7 +33,7 @@ BUILD_helldl = helldl
 helldl_SOURCES = dlmain.c
 helldl_DEPENDENCIES = libhello.la
 else
-BUILD_helldl = 
+BUILD_helldl =
 bin_SCRIPTS = helldl
 helldl$(EXEEXT):
        rm -f $@
index 4ec596d..e2b133c 100755 (executable)
@@ -17,7 +17,7 @@
 # Check that conditional redefinitions of AC_SUBST'ed variables are detected.
 # Report from Patrik Weiskircher
 
-. ./defs
+. ./defs || Exit 1
 
 set -e
 
index 6f76e4d..e548211 100755 (executable)
@@ -17,7 +17,7 @@
 # Check that conditional redefinitions of AC_SUBST'ed variables are detected.
 # Report from Patrik Weiskircher
 
-. ./defs
+. ./defs || Exit 1
 
 set -e
 
index 332fda5..02614f9 100755 (executable)
@@ -17,7 +17,7 @@
 # Check that conditional primaries can use non-conditional directories.
 # From Pavel Roskin.
 
-. ./defs
+. ./defs || Exit 1
 
 set -e
 
index a9baa55..1d93cc0 100755 (executable)
@@ -17,7 +17,7 @@
 # Check that non-conditional primaries can use conditional directories.
 # Reported by Juergen Keil.
 
-. ./defs
+. ./defs || Exit 1
 
 set -e
 
index 3082902..250b1ef 100755 (executable)
@@ -17,7 +17,7 @@
 # Check that non-conditional primaries cannot use directories defined
 # in some conditions (but not others).
 
-. ./defs
+. ./defs || Exit 1
 
 set -e
 
index ccdcf9e..006ef57 100755 (executable)
@@ -17,7 +17,7 @@
 # Check that conditional primaries can use directories defined
 # in the same conditions (but not others).
 
-. ./defs
+. ./defs || Exit 1
 
 set -e
 
index 12badcb..8310eab 100755 (executable)
@@ -24,7 +24,7 @@
 # or cpu time it can found.  Although this test won't print `FAIL' if
 # it fails, it will take long enough so it can't go unnoticed.
 
-. ./defs
+. ./defs || Exit 1
 
 set -e
 
index e092c45..d1935f7 100755 (executable)
@@ -16,7 +16,7 @@
 
 # For PR/352: make sure we support bin_PROGRAMS being defined conditionally.
 
-. ./defs
+. ./defs || Exit 1
 
 set -e
 
index 4975ef4..224d32c 100755 (executable)
@@ -16,7 +16,7 @@
 
 # Make sure we define conditional _DEPENDENCIES correctly.
 
-. ./defs
+. ./defs || Exit 1
 
 set -e
 
index ae5c8c6..6ec5a20 100755 (executable)
@@ -16,7 +16,7 @@
 
 # Make sure the user can override a conditional _DEPENDENCIES.
 
-. ./defs
+. ./defs || Exit 1
 
 set -e
 
index 0aff11a..f327cb7 100755 (executable)
@@ -17,7 +17,7 @@
 # Check for conditional library with a conditional directory.
 # Report from Ralf Corsepius
 
-. ./defs
+. ./defs || Exit 1
 
 set -e
 
index 9e42eea..ecb1616 100755 (executable)
@@ -17,7 +17,7 @@
 # Check for _DEPDENDENCIES definition with conditional _LDADD.
 # Report from Elena A. Vengerova
 
-. ./defs
+. ./defs || Exit 1
 
 set -e
 
index 6b3a4d4..0f3b8cf 100755 (executable)
@@ -18,7 +18,7 @@
 # Report from Roman Fietze.
 
 required='flex bison gcc'
-. ./defs
+. ./defs || Exit 1
 
 set -e
 
index 58eb529..6826cd5 100755 (executable)
@@ -1,5 +1,5 @@
 #!/bin/sh
-# Copyright (C) 2004  Free Software Foundation, Inc.
+# Copyright (C) 2004, 2011 Free Software Foundation, Inc.
 #
 # This 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,7 @@
 
 # Check rules output for parser defined conditionally.
 
-required='flex bison gcc'
-. ./defs
+. ./defs || Exit 1
 
 set -e
 
@@ -59,3 +58,5 @@ $AUTOMAKE -Wno-error
 test `grep tparse.h: Makefile.in | wc -l` = 2
 grep '@CASE_A_TRUE@tparse.h:' Makefile.in
 grep '@CASE_A_FALSE@tparse.h:' Makefile.in
+
+:
index 144c2ac..a4ae078 100755 (executable)
@@ -17,7 +17,7 @@
 # Check conditional local rules.
 # Report from Simon Josefsson.
 
-. ./defs
+. ./defs || Exit 1
 
 set -e
 
index 0051e1f..b1c3036 100755 (executable)
@@ -17,7 +17,7 @@
 # Check conditional variable ordering.
 # Report from Ed Hartnett.
 
-. ./defs
+. ./defs || Exit 1
 
 set -e
 
index 8d96595..c75c7b5 100755 (executable)
@@ -20,7 +20,7 @@
 
 # Build either as CONFIG_FILE or as PROGRAM.
 
-. ./defs
+. ./defs || Exit 1
 set -e
 
 mkdir sub
index be94fe3..8552cef 100755 (executable)
@@ -1,5 +1,5 @@
-#!/bin/sh
-# Copyright (C) 2008  Free Software Foundation, Inc.
+#! /bin/sh
+# Copyright (C) 2008, 2010 Free Software Foundation, Inc.
 #
 # This file is part of GNU Automake.
 #
@@ -20,7 +20,7 @@
 
 # Test AM_COND_IF.
 
-. ./defs
+. ./defs || Exit 1
 set -e
 
 cat >>configure.in <<'END'
@@ -28,12 +28,21 @@ AC_DEFUN([FOO],
         [AC_CONFIG_FILES([$1])])
 
 AM_CONDITIONAL([COND], [test "$cond" = yes])
+# Next lines should not cause a shell syntax error.
+AM_COND_IF([COND])
+AM_COND_IF([COND],
+          [AC_SUBST([BAR])])
 AM_COND_IF([COND],
           [AC_CONFIG_FILES([file1])])
 
-AM_CONDITIONAL([COND1], [test "$cond1" = yes])
-AM_CONDITIONAL([COND2], [test "$cond2" = yes])
-AM_CONDITIONAL([COND3], [test "$cond3" = yes])
+# Things should work even at a time when the shell expressions
+# for the conditional are not valid any more.
+ok=$cond1
+AM_CONDITIONAL([COND1], [test "$ok" = yes])
+ok=$cond2
+AM_CONDITIONAL([COND2], [test "$ok" = yes])
+ok=$cond3
+AM_CONDITIONAL([COND3], [test "$ok" = yes])
 
 AM_COND_IF([COND1],
           [AM_COND_IF([COND2], [FOO([file2])],
index b32bff3..dd9ffda 100755 (executable)
@@ -20,7 +20,7 @@
 
 # AM_COND_IF with an undefined condition should fail.
 
-. ./defs
+. ./defs || Exit 1
 set -e
 
 cat >>configure.in <<'END'
index 00ca114..428c02b 100755 (executable)
@@ -22,7 +22,7 @@
 # This shouldn't happen with user input, as _AM_COND_* are not documented,
 # but better to be safe.
 
-. ./defs
+. ./defs || Exit 1
 set -e
 
 cat >>configure.in <<'END'
index 1b468a7..1fa413d 100755 (executable)
@@ -20,7 +20,7 @@
 
 # Ensure an error with underquoted usage of AM_COND_IF in configure.ac.
 
-. ./defs
+. ./defs || Exit 1
 set -e
 
 cat >>configure.in <<'END'
index ac907f1..4b5adc2 100755 (executable)
@@ -17,7 +17,7 @@
 # Check that redefinitions of AC_SUBST'ed AM_SUBST_NOTMAKE'd variables
 # are not diagnosed.  See cond23.test.
 
-. ./defs
+. ./defs || Exit 1
 
 set -e
 
index 57dd339..c70fecb 100755 (executable)
@@ -17,7 +17,7 @@
 # Check that redefinitions of AC_SUBST'ed AM_SUBST_NOTMAKE'd variables
 # are not diagnosed.  See cond24.test.
 
-. ./defs
+. ./defs || Exit 1
 
 set -e
 
index 531cda8..50101a6 100755 (executable)
@@ -1,5 +1,6 @@
 #! /bin/sh
-# Copyright (C) 1998, 1999, 2001, 2002  Free Software Foundation, Inc.
+# Copyright (C) 1998, 1999, 2001, 2002, 2010 Free Software Foundation,
+# Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
 
 . ./defs || Exit 1
 
-cat > configure.in << 'END'
-AC_INIT
-AM_INIT_AUTOMAKE(nonesuch, nonesuch)
+set -e
+
+cat >> configure.in << 'END'
 AC_PROG_CC
-AM_CONDITIONAL(ONE, true)
-AM_CONDITIONAL(TWO, false)
-AC_OUTPUT(Makefile)
+AM_CONDITIONAL([ONE], [true])
+AM_CONDITIONAL([TWO], [false])
+AC_OUTPUT
 END
 
 cat > Makefile.am << 'END'
@@ -41,15 +42,31 @@ endif
 targ_SOURCES = main.c $(OPT_SRC)
 END
 
-# The bug is that automake hangs.  So we give it a few seconds and
-# then kill it.
-$ACLOCAL || Exit 1
-$AUTOMAKE &
+# The bug is that automake hangs.  So we give it an appropriate grace
+# time, then kill it if necessary.
+$ACLOCAL
+$AUTOMAKE 2>stderr &
 pid=$!
 
-sleep 60
-kill -0 $pid && {
-   kill $pid
-   Exit 1
-}
-Exit 0
+# MSYS bash seems to have a bug in kill, so don't try to kill too soon;
+# and avoid maintainer-check test.
+sleep '2'
+
+# Make at most 30 tries, one every 10 seconds (= 300 seconds = 5 min).
+try=1
+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`
+  else
+    cat stderr >&2
+    # Automake must fail with a proper error message.
+    grep 'variable.*OPT_SRC.*recursively defined' stderr
+    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
index 0e9b6e8..b70d691 100755 (executable)
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2001, 2002, 2004  Free Software Foundation, Inc.
+# Copyright (C) 2001, 2002, 2004, 2010 Free Software Foundation, Inc.
 #
 # This 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 @@ set -e
 cat >> configure.in << 'END'
 AC_PROG_CC
 dnl Define a macro with the same name as the conditional to exhibit
-dnl any underquotted bug.
+dnl any underquoted bug.
 AC_DEFUN([COND1], ["some'meaningless;characters`])
 AM_CONDITIONAL([COND1], false)
 AC_CONFIG_FILES([foo/Makefile])
@@ -68,3 +68,5 @@ grep "meaningless;characters" configure && Exit 1
 $AUTOMAKE
 ./configure
 $MAKE test
+
+:
index 06fa887..bf9225b 100755 (executable)
@@ -1,5 +1,5 @@
 #!/bin/sh
-# Copyright (C) 2004, 2007  Free Software Foundation, Inc.
+# Copyright (C) 2004, 2007, 2010 Free Software Foundation, Inc.
 #
 # This 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,6 +15,7 @@
 # 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.
 # Report by Nik A. Melchior (PR/428).
 
 . ./defs || Exit 1
@@ -22,7 +23,7 @@
 set -e
 
 cat >> configure.in << 'END'
-AM_CONDITIONAL(TEST, false)
+AM_CONDITIONAL([TEST], [false])
 AC_OUTPUT
 END
 
@@ -30,7 +31,7 @@ cat > Makefile.am << 'END'
 sysconf_DATA = mumble
 if TEST
 install-data-hook:
-       echo foo
+       : > $(top_srcdir)/bad
 endif
 END
 
@@ -39,5 +40,11 @@ END
 $ACLOCAL
 $AUTOCONF
 $AUTOMAKE
+
 ./configure --prefix "`pwd`/inst"
+
 $MAKE install
+test -f inst/etc/mumble
+test ! -f bad
+
+:
diff --git a/tests/condhook2.test b/tests/condhook2.test
new file mode 100755 (executable)
index 0000000..45e2d43
--- /dev/null
@@ -0,0 +1,49 @@
+#!/bin/sh
+# Copyright (C) 2010 Free Software Foundation, Inc.
+#
+# This 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 install when a conditional install-*-hook is defined.
+# Keep this in sync with sister test condhook.test.
+
+. ./defs || Exit 1
+
+set -e
+
+cat >> configure.in << 'END'
+AM_CONDITIONAL([TEST], [true])
+AC_OUTPUT
+END
+
+cat > Makefile.am << 'END'
+sysconf_DATA = mumble
+if TEST
+install-data-hook:
+       : > $(top_srcdir)/good
+endif
+END
+
+: > mumble
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE
+
+./configure --prefix "`pwd`/inst"
+
+$MAKE install
+test -f inst/etc/mumble
+test -f good
+
+:
index 088fb55..9001028 100755 (executable)
@@ -21,7 +21,7 @@
 set -e
 
 cat >> configure.in << 'END'
-AM_CONDITIONAL(TOBE, false)
+AM_CONDITIONAL([TOBE], [false])
 END
 
 cat > Makefile.am << 'END'
@@ -39,3 +39,5 @@ END
 $ACLOCAL
 AUTOMAKE_fails
 grep 'adjunct:3: too many conditionals closed' stderr
+
+:
index 3dc8bcd..ee2d41b 100755 (executable)
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 1998, 2001, 2002  Free Software Foundation, Inc.
+# Copyright (C) 1998, 2001, 2002, 2010 Free Software Foundation, Inc.
 #
 # This 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 conditionals work with man pages.
+
 . ./defs || Exit 1
 
+set -e
+
 cat >> configure.in << 'END'
-AM_CONDITIONAL(FRED, true)
+AM_CONDITIONAL([FRED], [true])
 END
 
 cat > Makefile.am << 'END'
@@ -29,8 +32,7 @@ man_MANS = joe.1
 endif
 END
 
-: > foo.1
-: > joe.1
-
-$ACLOCAL || Exit 1
+$ACLOCAL
 $AUTOMAKE
+
+:
index 0b448e2..c0e7216 100755 (executable)
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 1998, 2001, 2002  Free Software Foundation, Inc.
+# Copyright (C) 1998, 2001, 2002, 2010 Free Software Foundation, Inc.
 #
 # This 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 appropriate man install targets generated in all cases.
+
 . ./defs || Exit 1
 
+set -e
+
 cat > Makefile.am << 'END'
 man_MANS = foo.1 foo.2
 man5_MANS = foo.5
 END
 
-$ACLOCAL || Exit 1
-$AUTOMAKE || Exit 1
+$ACLOCAL
+$AUTOMAKE
+
+grep '^install-man1:' Makefile.in
+grep '^install-man2:' Makefile.in
+grep '^install-man5:' Makefile.in
 
-grep '^install-man1:' Makefile.in || Exit 1
-grep '^install-man2:' Makefile.in || Exit 1
-grep '^install-man5:' Makefile.in || Exit 1
+:
diff --git a/tests/condman3.test b/tests/condman3.test
new file mode 100755 (executable)
index 0000000..ff93daf
--- /dev/null
@@ -0,0 +1,65 @@
+#! /bin/sh
+# Copyright (C) 2010 Free Software Foundation, Inc.
+#
+# This 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 conditionals work with man pages.
+
+. ./defs || Exit 1
+
+set -e
+
+cat >> configure.in << 'END'
+AM_CONDITIONAL([COND], [test x"$FOO" = x"true"])
+AC_OUTPUT
+END
+
+cat > Makefile.am << 'END'
+if COND
+man_MANS = foo.1
+else
+man_MANS = bar.2
+endif
+
+.PHONY: test1 test2
+test1:
+       test -f $(mandir)/man1/foo.1
+       test ! -f $(mandir)/man2/bar.2
+test2:
+       test ! -f $(mandir)/man1/foo.1
+       test -f $(mandir)/man2/bar.2
+END
+
+$ACLOCAL
+$AUTOMAKE
+$AUTOCONF
+
+mkdir dir1
+cd dir1
+../configure FOO=true --prefix="`pwd`/_inst"
+sed -n '/man_MANS/p' Makefile # useful for debugging
+: > foo.1
+$MAKE install
+$MAKE test1
+
+cd ..
+mkdir dir2
+cd dir2
+../configure FOO=false --prefix="`pwd`/_inst"
+sed -n '/man_MANS/p' Makefile # useful for debugging
+: > bar.2
+$MAKE install
+$MAKE test2
+
+:
index 8e1cc64..b09f816 100755 (executable)
@@ -36,4 +36,4 @@ mv -f aclocal.m4t aclocal.m4
 $AUTOMAKE
 grep '^\$(ACLOCAL_M4):' Makefile.in && Exit 1
 
-Exit 0
+:
index 353cb8e..dc6677c 100755 (executable)
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2003  Free Software Foundation, Inc.
+# Copyright (C) 2003, 2010 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -93,3 +93,5 @@ grep 'bot2 rule' stdout
 cd ..
 
 $MAKE distcheck
+
+:
index 0c53067..a0101e1 100755 (executable)
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2003  Free Software Foundation, Inc.
+# Copyright (C) 2003, 2010 Free Software Foundation, Inc.
 #
 # This 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,6 +20,8 @@
 
 set -e
 
+# We avoid using configure.in stub initialized by ./defs, since we need
+# to keep track of line numbers (to grep for error messages).
 cat > configure.in << END
 AC_INIT([$me], [1.0])
 AM_INIT_AUTOMAKE
@@ -30,5 +32,7 @@ END
 
 $ACLOCAL
 AUTOMAKE_fails
-grep 'configure.in:3:.*AC_CONFIG_FILES' stderr
-grep 'configure.in:4:.*AC_CONFIG_HEADERS' stderr
+grep 'configure\.in:3:.* arguments .*AC_CONFIG_FILES' stderr
+grep 'configure\.in:4:.* arguments .*AC_CONFIG_HEADERS' stderr
+
+:
index 772a763..93badef 100755 (executable)
@@ -1,5 +1,6 @@
 #! /bin/sh
-# Copyright (C) 1999, 2000, 2001, 2002, 2006  Free Software Foundation, Inc.
+# Copyright (C) 1999, 2000, 2001, 2002, 2006, 2010 Free Software
+# Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
 
 . ./defs || Exit 1
 
-cat > configure.in << 'END'
-AC_INIT
-AM_INIT_AUTOMAKE(nonesuch, nonesuch)
-AM_CONFIG_HEADER(include/config.h)
-AC_OUTPUT(Makefile include/Makefile)
+set -e
+
+cat >> configure.in << 'END'
+AM_CONFIG_HEADER([include/config.h])
+AC_OUTPUT
 END
 
-: > Makefile.am
-: > acconfig.h
+cat > Makefile.am << 'END'
+.PHONY: test1 test2
+test1:
+       @echo DIST_COMMON = $(DIST_COMMON)
+       echo ' ' $(DIST_COMMON) ' ' | grep '[ /]acconfig\.h '
+test2: distdir
+       ls -l $(distdir)/*
+       test -f $(distdir)/acconfig.h
+check-local: test1 test2
+END
 
 mkdir include
-: > include/Makefile.am
 : > include/config.h.in
+: > acconfig.h
 
-$ACLOCAL || Exit 1
-$AUTOMAKE || 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 acconfig.h) || Exit 1
+# The test used to fail if `include/Makefile.am' was created (!)
+: > include/Makefile.am
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE
+
+./configure
+
+$MAKE test1
+$MAKE test2
+$MAKE distcheck
 
 # Make sure re-running automake in a different way generates same
 # Makefile.in.
-mv Makefile.in save
-$ACLOCAL || Exit 1
-$AUTOMAKE Makefile || Exit 1
-cmp Makefile.in save
+mv Makefile.in Makefile.sav
+$ACLOCAL
+$AUTOMAKE Makefile
+diff Makefile.sav Makefile.in
+
+:
index 6fd4a07..8e36cfa 100755 (executable)
 
 set -e
 
-cat > configure.in << 'END'
-AC_INIT
-AM_INIT_AUTOMAKE(nonesuch, nonesuch)
-AM_CONFIG_HEADER(include/config.h)
+cat >> configure.in << 'END'
+AC_CONFIG_FILES([include/Makefile])
+AM_CONFIG_HEADER([include/config.h])
 AC_PROG_CC
-AC_OUTPUT(Makefile include/Makefile)
 END
 
 cat > Makefile.am << 'END'
@@ -40,9 +38,6 @@ bin_PROGRAMS = foo
 foo_SOURCES = foo.c
 END
 
-: > foo.c
-: > acconfig.h
-
 mkdir include
 : > include/Makefile.am
 : > include/config.h.in
@@ -50,4 +45,6 @@ mkdir include
 $ACLOCAL
 $AUTOMAKE
 
-$EGREP '^DEFAULT_INCLUDES =.* -I(\.|\$\(top_builddir\))/include' Makefile.in
+grep '^ *DEFAULT_INCLUDES *=.* -I\$(top_builddir)/include' Makefile.in
+
+:
index febe000..9af83dc 100755 (executable)
 set -e
 
 cat >> configure.in << 'END'
-AC_SUBST([FOO], [name])
-AC_CONFIG_FILES(include/config.h.in)
-AC_CONFIG_HEADERS(config.h)
-AC_CONFIG_HEADERS(include/config.h)
+AC_SUBST([FOO], [NameToBeGrepped])
+AC_CONFIG_FILES([include/config.h.in])
+AC_CONFIG_HEADERS([config.h])
+AC_CONFIG_HEADERS([include/config.h])
 AC_OUTPUT
 END
 
 cat > Makefile.am << 'END'
+.PHONY: test
 test: distdir
        test -f $(distdir)/config.h.in
        test -f $(distdir)/include/config.h.in.in
@@ -51,6 +52,10 @@ $MAKE
 $sleep
 echo '#undef @FOO@' > include/config.h.in.in
 $MAKE include/config.h
-grep '/\*.*#undef.*name' include/config.h
+# Don't try to be too strict in this grepping, since the substutition
+# is done by config.status, and we don't have too much control on it.
+grep '/\*.*#undef.*NameToBeGrepped' include/config.h
 $MAKE test
 $MAKE distcheck
+
+:
similarity index 84%
rename from tests/config.test
rename to tests/confh6.test
index bed9a92..532a2fd 100755 (executable)
@@ -1,5 +1,6 @@
 #! /bin/sh
-# Copyright (C) 1998, 2000, 2001, 2002, 2003  Free Software Foundation, Inc.
+# Copyright (C) 1998, 2000, 2001, 2002, 2003, 2010 Free Software
+# Foundation, Inc.
 #
 # This 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 +25,7 @@ required=GNUmake
 set -e
 
 cat >> configure.in << 'END'
-AM_CONFIG_HEADER(subdir/config.h)
+AM_CONFIG_HEADER([subdir/config.h])
 AC_OUTPUT
 END
 
@@ -39,8 +40,10 @@ $AUTOMAKE
 $MAKE
 
 $sleep
-echo '#define FOO' > subdir/config.h.in
+echo '#define gRePmE' > subdir/config.h.in
 $MAKE subdir/config.h
-grep FOO subdir/config.h
+$FGREP gRePmE subdir/config.h
 
 $MAKE distcheck
+
+:
similarity index 80%
rename from tests/conf2.test
rename to tests/confh7.test
index 8e53733..4e4f7da 100755 (executable)
 # 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'.
 
 . ./defs || Exit 1
 
 set -e
 
-cat > configure.in << 'END'
-AC_INIT
-AM_INIT_AUTOMAKE(nonesuch, nonesuch)
-AM_CONFIG_HEADER(config.h two.h)
-AC_PROG_CC
-AC_OUTPUT(Makefile)
+cat >> configure.in << 'END'
+AM_CONFIG_HEADER([config.h two.h])
 END
 
 : > Makefile.am
@@ -36,3 +33,15 @@ END
 
 $ACLOCAL
 $AUTOMAKE
+
+# Try again with more macros.
+
+cat >> configure.in << 'END'
+AC_PROG_CC
+AC_OUTPUT
+END
+
+$ACLOCAL --force
+$AUTOMAKE
+
+:
diff --git a/tests/confh8.test b/tests/confh8.test
new file mode 100755 (executable)
index 0000000..146d2f0
--- /dev/null
@@ -0,0 +1,68 @@
+#! /bin/sh
+# Copyright (C) 2010 Free Software Foundation, Inc.
+#
+# This 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 several config headers are allowed.
+# See also sister "minimalistic" test `confh7.test'.
+
+. ./defs || Exit 1
+
+set -e
+
+cat >> configure.in << 'END'
+AM_CONFIG_HEADER([one.h two.h])
+AC_OUTPUT
+END
+
+cat > Makefile.am << 'END'
+.PHONY: test0 test1 test2
+test0:
+       @echo DIST_COMMON = $(DIST_COMMON)
+       echo ' ' $(DIST_COMMON) ' ' | grep '[ /]one\.h\.in '
+       echo ' ' $(DIST_COMMON) ' ' | grep '[ /]two\.h\.in '
+       : Processed header files should not be distributed.
+       if echo ' ' $(DIST_COMMON) ' ' | grep '\.h '; then \
+         exit 1; \
+       else \
+         exit 0; \
+       fi
+test1: all
+       test -f one.h
+       test -f two.h
+test2: distdir
+       ls -l $(distdir)/*
+       test -f $(distdir)/one.h.in
+       test -f $(distdir)/two.h.in
+       : Processed header files should not be distributed.
+       test ! -r $(distdir)/one.h
+       test ! -r $(distdir)/two.h
+check-local: test0 test1 test2
+END
+
+: > one.h.in
+: > two.h.in
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE
+
+./configure
+
+$MAKE test0
+$MAKE test1
+$MAKE test2
+$MAKE distcheck
+
+:
index 838da68..0773a00 100755 (executable)
 
 set -e
 
-cat >configure.ac <<\EOF
-AC_INIT
-AM_INIT_AUTOMAKE([configure], [1.0])
+cat >configure.ac <<EOF
+AC_INIT([$me], [1.0])
+AM_INIT_AUTOMAKE
 AC_CONFIG_FILES([Makefile])
-AC_OUTPUT
 EOF
 
 cat >configure.in <<EOF
-AC_INIT([configure], [1.0])
+AC_INIT([$me], [1.0])
 AM_INIT_AUTOMAKE([an-invalid-automake-option])
 AC_CONFIG_FILES([Makefile])
-AC_OUTPUT
-EOF
-
-cat >configure.in <<EOF
-AC_INIT([configure], [1.0])
-AM_INIT_AUTOMAKE([an-invalid-automake-option])
-AC_CONFIG_FILES([Makefile])
-AC_OUTPUT
 EOF
 
 : >Makefile.am
 
 $ACLOCAL 2>stderr && { cat stderr >&2; Exit 1; }
 cat stderr >&2
-grep 'configure.ac.*configure.in.*both present' stderr
+grep 'configure\.ac.*configure\.in.*both present' stderr
 
 $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
+grep 'configure\.ac.*configure\.in.*both present' stderr
+grep 'proceeding.*configure\.ac' stderr
 
 # Ensure we really proceed with configure.ac.
 AUTOMAKE_fails -Werror
-grep 'configure.ac.*configure.in.*both present' stderr
-grep 'proceeding.*configure.ac' stderr
+grep 'configure\.ac.*configure\.in.*both present' stderr
+grep 'proceeding.*configure\.ac' stderr
 
 AUTOMAKE_run 0 -Wno-error
-grep 'configure.ac.*configure.in.*both present' stderr
-grep 'proceeding.*configure.ac' stderr
+grep 'configure\.ac.*configure\.in.*both present' stderr
+grep 'proceeding.*configure\.ac' stderr
 
 :
index dd0b63e..c4f0cde 100755 (executable)
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 1996, 2001, 2002  Free Software Foundation, Inc.
+# Copyright (C) 1996, 2001, 2002, 2010 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
 
 . ./defs || Exit 1
 
+set -e
+
 cat >> configure.in << 'END'
 AC_PROG_CC
 END
 
-cat > Makefile.am << 'EOF'
+cat > Makefile.am << 'END'
 bin_PROGRAMS = fred
-EOF
+END
+
+$ACLOCAL
+$AUTOMAKE
 
-$ACLOCAL || Exit 1
-$AUTOMAKE || Exit 1
+$FGREP '@CONFIG_INCLUDE_SPEC@' Makefile.in && Exit 1
 
-if grep '@CONFIG_INCLUDE_SPEC@' Makefile.in; then
-   Exit 1
-fi
-Exit 0
+:
index 6bc5970..8dfafbc 100755 (executable)
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2003 Free Software Foundation, Inc.
+# Copyright (C) 2003, 2010 Free Software Foundation, Inc.
 #
 # This 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,12 +29,12 @@ mkdir sdir
 mkdir sdir-no-make
 
 cat >>configure.in << 'EOF'
-AC_CONFIG_FILES(sdir/Makefile)
-AC_CONFIG_LINKS(dest:src)
-AC_CONFIG_LINKS(dest2:src)
-AC_CONFIG_LINKS(sdir/dest3:src)
-AC_CONFIG_LINKS(dest4:sdir/src2)
-AC_CONFIG_LINKS(sdir/dest5:sdir/src2 sdir-no-make/dest6:src)
+AC_CONFIG_FILES([sdir/Makefile])
+AC_CONFIG_LINKS([dest:src])
+AC_CONFIG_LINKS([dest2:src])
+AC_CONFIG_LINKS([sdir/dest3:src])
+AC_CONFIG_LINKS([dest4:sdir/src2])
+AC_CONFIG_LINKS([sdir/dest5:sdir/src2 sdir-no-make/dest6:src])
 AC_OUTPUT
 EOF
 
index 8a045be..8c68c38 100755 (executable)
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2003 Free Software Foundation, Inc.
+# Copyright (C) 2003, 2010 Free Software Foundation, Inc.
 #
 # This 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,6 +23,7 @@ set -e
 
 cat > Makefile.am << 'END'
 SUBDIRS = sdir
+.PHONY: test
 test: distdir
        test -f $(distdir)/src
        test -f $(distdir)/src2
@@ -42,10 +43,10 @@ mkdir sdir-no-make
 : > sdir-no-make/src4
 
 cat >>configure.in << 'EOF'
-AC_CONFIG_FILES(sdir/Makefile)
-AC_CONFIG_LINKS(dest:src)
-AC_CONFIG_LINKS(sdir/dest2:src2 sdir-no-make/dest3:sdir/src3)
-AC_CONFIG_LINKS(sdir/dest4:sdir-no-make/src4)
+AC_CONFIG_FILES([sdir/Makefile])
+AC_CONFIG_LINKS([dest:src])
+AC_CONFIG_LINKS([sdir/dest2:src2 sdir-no-make/dest3:sdir/src3])
+AC_CONFIG_LINKS([sdir/dest4:sdir-no-make/src4])
 AC_OUTPUT
 EOF
 
@@ -54,3 +55,5 @@ $AUTOMAKE
 $AUTOCONF
 ./configure
 $MAKE test
+
+:
index 00e9da2..20f4786 100755 (executable)
@@ -23,6 +23,7 @@ set -e
 
 cat > Makefile.am << 'END'
 SUBDIRS = sdir
+.PHONY: test
 test: distdir
        test ! -r $(distdir)/sdir/dest3
        test ! -r $(distdir)/sdir/dest2
@@ -41,16 +42,16 @@ mkdir sdir
 : > sdir/src3
 
 cat >>configure.in << 'EOF'
-AC_CONFIG_FILES(sdir/Makefile)
+AC_CONFIG_FILES([sdir/Makefile])
 my_src_dir=sdir
 my_dest=dest
-AC_CONFIG_LINKS(sdir/dest2:src2 sdir/dest3:$my_src_dir/src3)
-AC_CONFIG_LINKS($my_dest:src)
+AC_CONFIG_LINKS([sdir/dest2:src2 sdir/dest3:$my_src_dir/src3])
+AC_CONFIG_LINKS([$my_dest:src])
 # the following is a link whose source is itself a link
-AC_CONFIG_LINKS(dest4:sdir/dest2)
+AC_CONFIG_LINKS([dest4:sdir/dest2])
 # Some package prefer to compute links.
 cmplink='dest5:src';
-AC_CONFIG_LINKS($cmplink)
+AC_CONFIG_LINKS([$cmplink])
 AC_OUTPUT
 EOF
 
@@ -79,9 +80,9 @@ test -r dest5 # ditto
 rm -f dest dest5
 test ! -r dest4
 
-## Cannot do the following, because at the time of writing Autoconf
-## (2.59) does not support AC_CONFIG_LINKS source in the build tree.
-# mkdir build
-# cd build
-# ../configure
-# $MAKE test
+mkdir build
+cd build
+../configure
+$MAKE test
+
+:
index 4bedf52..fd96054 100755 (executable)
@@ -34,17 +34,20 @@ mkdir nonmk-subdir sdir sdir/mk-subdir
 
 cat >> Makefile.am <<'EOF'
 SUBDIRS = sdir
+.PHONY: test
 test: distdir
        test -f $(distdir)/src
        test -f $(distdir)/sdir/src2
+       test -f $(distdir)/nonmk-subdir/src3
+       test -f $(distdir)/sdir/mk-subdir/src4
 EOF
 
 cat >>configure.in << 'EOF'
-AC_CONFIG_FILES(sdir/Makefile)
-AC_CONFIG_LINKS(src:src)
-AC_CONFIG_LINKS(sdir/src2:sdir/src2)
-AC_CONFIG_LINKS(nonmk-subdir/src3:nonmk-subdir/src3)
-AC_CONFIG_LINKS(sdir/mk-subdir/src4:sdir/mk-subdir/src4)
+AC_CONFIG_FILES([sdir/Makefile])
+AC_CONFIG_LINKS([src:src])
+AC_CONFIG_LINKS([sdir/src2:sdir/src2])
+AC_CONFIG_LINKS([nonmk-subdir/src3:nonmk-subdir/src3])
+AC_CONFIG_LINKS([sdir/mk-subdir/src4:sdir/mk-subdir/src4])
 AC_OUTPUT
 EOF
 
@@ -56,7 +59,6 @@ mkdir build
 cd build
 ../configure
 
-# TODO: Make sure links are distributed
 $MAKE test
 
 # Make sure nothing is deleted by `make clean'
@@ -84,7 +86,6 @@ test -r sdir/mk-subdir/src4 && Exit 1
 cd ..
 ./configure
 
-# TODO: Make sure links are distributed
 $MAKE test
 
 # Make sure nothing is deleted by `make distclean'
@@ -94,3 +95,5 @@ test -f src
 test -f sdir/src2
 test -f nonmk-subdir/src3
 test -f sdir/mk-subdir/src4
+
+:
index 65ec91b..a0d4fe3 100755 (executable)
@@ -39,8 +39,8 @@ END
 
 echo 'Before.' > subdir/config.hin
 
-$ACLOCAL || Exit 1
-$AUTOMAKE || Exit 1
+$ACLOCAL
+$AUTOMAKE
 
 # Make sure subdir Makefile.in doesn't itself look in the subdir.
 # One line is allowed though:
@@ -49,11 +49,13 @@ $AUTOMAKE || Exit 1
 ($FGREP 'subdir/config.h' subdir/Makefile.in |
    $FGREP -v 'cd $(top_builddir)') && Exit 1
 
-$AUTOCONF || Exit 1
-./configure || Exit 1
+$AUTOCONF
+./configure
 $FGREP 'Before.' subdir/config.h
 
 $sleep
 echo 'After.' > subdir/config.hin
-$MAKE || Exit 1
-$FGREP 'After.' subdir/config.h || Exit 1
+$MAKE
+$FGREP 'After.' subdir/config.h
+
+:
index 99811b0..13cc7dd 100755 (executable)
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 1996, 2001, 2002  Free Software Foundation, Inc.
+# Copyright (C) 1996, 2001, 2002, 2010 Free Software Foundation, Inc.
 #
 # This 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 @@
 set -e
 
 cat >> configure.in << 'END'
-AC_SUBST(QBERT)
+AC_SUBST([QBERT])
 END
 
 : > Makefile.am
@@ -29,4 +29,6 @@ END
 $ACLOCAL
 $AUTOMAKE
 
-grep '^QBERT' Makefile.in
+grep '^QBERT =' Makefile.in
+
+:
index 75c02dc..1cfd2d3 100755 (executable)
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 1996, 2001, 2002  Free Software Foundation, Inc.
+# Copyright (C) 1996, 2001, 2002, 2010 Free Software Foundation, Inc.
 #
 # This 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 @@
 set -e
 
 cat >> configure.in << 'END'
-AC_SUBST(OTHER_SCRIPTS)
+AC_SUBST([OTHER_SCRIPTS])
 END
 
 cat > Makefile.am << 'END'
@@ -30,3 +30,7 @@ END
 
 $ACLOCAL
 $AUTOMAKE
+
+grep '^OTHER_SCRIPTS =' Makefile.in
+
+:
index 1744a07..21fcc34 100644 (file)
@@ -34,6 +34,18 @@ else
   case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac
 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
+
 # Ensure we are running from the right directory.
 test -f ./defs || {
    echo "defs: not found in current directory" 1>&2
@@ -54,6 +66,9 @@ test -f "$srcdir/defs.in" || {
 
 me=`echo "$0" | sed -e 's,.*[\\/],,;s/\.test$//'`
 
+APIVERSION='@APIVERSION@'
+PATH_SEPARATOR='@PATH_SEPARATOR@'
+
 # Make sure we override the user shell.
 SHELL='@SHELL@'
 export SHELL
@@ -66,7 +81,7 @@ test -z "$AUTOUPDATE" && AUTOUPDATE=autoupdate
 test -z "$MISSING" && MISSING=`pwd`/../lib/missing
 # Use -Werror because this also turns some Perl warnings into error.
 # (Tests for which this is inappropriate should use -Wno-error.)
-test -z "$ACLOCAL" && ACLOCAL="aclocal-@APIVERSION@ -Werror"
+test -z "$ACLOCAL" && ACLOCAL="aclocal-$APIVERSION -Werror"
 # Extra flags to pass to aclocal before all other flags added by this script.
 ACLOCAL_TESTSUITE_FLAGS=
 export ACLOCAL_TESTSUITE_FLAGS
@@ -77,9 +92,9 @@ export ACLOCAL_TESTSUITE_FLAGS
 # -Werror by default.  Tests for which this is inappropriate
 # (e.g. when testing that a warning is enabled by a specific switch)
 # should use -Wnone or/and -Wno-error
-test -z "$AUTOMAKE" && AUTOMAKE="automake-@APIVERSION@ --foreign -Werror -Wall"
+test -z "$AUTOMAKE" && AUTOMAKE="automake-$APIVERSION --foreign -Werror -Wall"
 
-PATH="`pwd`@PATH_SEPARATOR@$PATH"
+PATH="`pwd`$PATH_SEPARATOR$PATH"
 echo "$PATH"
 # Some shells forget to export modified environment variables.
 # (See note about `export' in the Autoconf manual.)
index 8b9be29..d5b6c78 100755 (executable)
@@ -40,12 +40,11 @@ END
 
 cp subdir/Makefile.am subdir2/Makefile.am
 
-: > subdir/foo.c
-: > subdir2/foo.c
-
 $ACLOCAL
 $AUTOMAKE --add-missing
 
 # There used to be a bug where this was created in the first subdir with C
 # sources in it instead of in $top_srcdir or $ac_auxdir
 test -f depcomp
+
+:
index 2b4353c..e8e4a67 100755 (executable)
@@ -43,11 +43,12 @@ END
 : > subdir/foo.c
 
 # Ignore user CFLAGS.
-CFLAGS=
-export CFLAGS
+unset CFLAGS || :
 
 $ACLOCAL
 $AUTOMAKE --add-missing
 $AUTOCONF
-./configure CC='gcc' 2>error.log
-test -z "`cat error.log`"
+./configure 2>stderr || { cat stderr >&2; Exit 1; }
+test ! -s stderr
+
+:
index 2a5db60..649fada 100755 (executable)
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2003  Free Software Foundation, Inc.
+# Copyright (C) 2003, 2010 Free Software Foundation, Inc.
 #
 # This 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,14 +32,15 @@ AUTOMAKE_OPTIONS = subdir-objects
 check_PROGRAMS = prg
 prg_SOURCES = src/sub.c src/foo.h
 
+.PHONY: grepdeps
 grepdeps:
-       grep 'src/sub.$(OBJEXT).*:' src/$(DEPDIR)/sub.Po
+       grep 'src/sub\.$(OBJEXT).*:' src/$(DEPDIR)/sub.Po
 
 END
 
 mkdir src
 
-touch src/foo.h
+: > src/foo.h
 
 cat >src/sub.c <<EOF
 #include "foo.h"
@@ -60,3 +61,5 @@ grep am_cv_CC_dependencies_compiler_type configure
 ./configure am_cv_CC_dependencies_compiler_type=dashmstdout
 $MAKE check
 $MAKE grepdeps
+
+:
index 7d22894..4f2df97 100755 (executable)
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2003  Free Software Foundation, Inc.
+# Copyright (C) 2003, 2010 Free Software Foundation, Inc.
 #
 # This 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,8 +31,9 @@ cat > Makefile.am << 'END'
 noinst_LTLIBRARIES = liba.la
 liba_la_SOURCES = a.c foo.h
 
+.PHONY: grepdeps
 grepdeps:
-       grep 'a.lo *:' ./$(DEPDIR)/a.Plo
+       grep 'a\.lo *:' ./$(DEPDIR)/a.Plo
 END
 
 : > foo.h
@@ -51,7 +52,9 @@ $AUTOMAKE -a
 grep am_cv_CC_dependencies_compiler_type configure
 
 ./configure am_cv_CC_dependencies_compiler_type=makedepend
-$MAKE >output 2>&1
+$MAKE >output 2>&1 || { cat output; Exit 1; }
 cat output
 grep 'unknown directive' output && Exit 1
 $MAKE grepdeps
+
+:
index 9637288..4fe7e16 100755 (executable)
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2003, 2004  Free Software Foundation, Inc.
+# Copyright (C) 2003, 2004, 2010 Free Software Foundation, Inc.
 #
 # This 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,6 +19,8 @@
 required='icc'
 . ./defs || Exit 1
 
+set -e
+
 # Automake supports icc since version 7.0 through a dedicated depcomp mode.
 # icc 8.0 and greater understand gcc options, so depmode is set to gcc.
 if icc -V -help 2>&1 | grep 'Version 7'; then
@@ -27,8 +29,6 @@ else
   expect='depmode=gcc'
 fi
 
-set -e
-
 cat >> configure.in << 'END'
 AC_PROG_CC
 AM_PROG_CC_C_O
@@ -40,8 +40,9 @@ AUTOMAKE_OPTIONS = subdir-objects
 check_PROGRAMS = prg
 prg_SOURCES = src/sub.c src/foo.h
 
+.PHONY: grepdeps
 grepdeps:
-       grep 'src/sub.$(OBJEXT).*:' src/$(DEPDIR)/sub.Po
+       grep 'src/sub\.$(OBJEXT).*:' src/$(DEPDIR)/sub.Po
 
 END
 
@@ -66,3 +67,5 @@ $AUTOMAKE -a
 grep "$expect" Makefile
 $MAKE check
 $MAKE grepdeps
+
+:
index 0b6a7f5..ea15e20 100755 (executable)
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2006  Free Software Foundation, Inc.
+# Copyright (C) 2006, 2010, 2011 Free Software Foundation, Inc.
 #
 # This 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 @@ cat >> configure.in << 'END'
 AC_PROG_CC
 AM_PROG_CC_C_O
 AC_PROG_RANLIB
-AC_CONFIG_FILES(sub2/Makefile)
+AC_CONFIG_FILES([sub2/Makefile])
 AC_OUTPUT
 END
 
@@ -47,7 +47,7 @@ cat >foo.c <<'END'
 #include "foo.h"
 #include "sub2/baz.h"
 #include <stdlib.h>
-int main() { printf("foo"); return bar() + baz(); }
+int main (void) { printf ("foo"); return bar () + baz (); }
 END
 
 cat >foo.h <<'END'
@@ -57,28 +57,28 @@ END
 
 cat >sub/bar.c <<'END'
 #include "sub/bar.h"
-int bar() { return 0; }
+int bar (void) { return 0; }
 END
 
 touch sub2/sub3/ba3.h
 
 cat >sub/bar.h <<'END'
 #include <stdio.h>
-extern int bar();
+extern int bar (void);
 END
 
 cat >sub2/baz.c <<'END'
 #include "baz.h"
-int baz() { return 0; }
+int baz (void) { return 0; }
 END
 
 cat >sub2/baz.h <<'END'
-extern int baz();
+extern int baz (void);
 END
 
 cat >sub2/sub3/ba3.c <<'END'
 #include "ba3.h"
-int ba3() { return 0; }
+int ba3 (void) { return 0; }
 END
 
 $ACLOCAL
@@ -86,14 +86,26 @@ $AUTOCONF
 $AUTOMAKE -a
 
 ./configure --enable-dependency-tracking
-$MAKE 
-
-# check that dependency tracking works
-if grep 'depmode=none' Makefile; then :
-else
-  cd sub2
-  $sleep
-  echo 'choke me' > sub3/ba3.h
-  if $MAKE; then Exit 1; fi
+$MAKE
+
+# Check that dependency tracking works.
+if grep 'depmode=none' Makefile; then
+  Exit 77
 fi
+
+cd sub2
+$sleep
+echo 'choke me' > sub3/ba3.h
+# Do not use `$MAKE && Exit 1' here, since even relatively-recent
+# versions of the BSD shell wrongly exit when the `errexit' shell
+# flag is active if a command within "&&" fails inside a compound
+# statement.
+if $MAKE; then Exit 1; else :; fi
+
+# Ensure the deleted header bug is fixed.
+rm -f sub3/ba3.h
+sed 1d sub3/ba3.c >sub3/ba3.t
+mv -f sub3/ba3.t sub3/ba3.c
+$MAKE
+
 :
index 67702c7..47f09fc 100755 (executable)
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2006, 2007  Free Software Foundation, Inc.
+# Copyright (C) 2006, 2007, 2010, 2011 Free Software Foundation, Inc.
 #
 # This 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 @@ cat >> configure.in << 'END'
 AC_PROG_CC
 AM_PROG_CC_C_O
 AM_PROG_LIBTOOL
-AC_CONFIG_FILES(sub2/Makefile)
+AC_CONFIG_FILES([sub2/Makefile])
 AC_OUTPUT
 END
 
@@ -48,7 +48,7 @@ cat >foo.c <<'END'
 #include "foo.h"
 #include "sub2/baz.h"
 #include <stdlib.h>
-int main() { printf("foo"); return bar() + baz(); }
+int main (void) { printf ("foo"); return bar () + baz (); }
 END
 
 cat >foo.h <<'END'
@@ -58,28 +58,28 @@ END
 
 cat >sub/bar.c <<'END'
 #include "sub/bar.h"
-int bar() { return 0; }
+int bar (void) { return 0; }
 END
 
 echo 'extern int x;' > sub2/sub3/ba3.h
 
 cat >sub/bar.h <<'END'
 #include <stdio.h>
-extern int bar();
+extern int bar (void);
 END
 
 cat >sub2/baz.c <<'END'
 #include "baz.h"
-int baz() { return 0; }
+int baz (void) { return 0; }
 END
 
 cat >sub2/baz.h <<'END'
-extern int baz();
+extern int baz (void);
 END
 
-cat >sub2/sub3/ba3.c <<'END'
+cat >sub2/sub3/ba3.in <<'END'
 #include "ba3.h"
-int ba3() { return 0; }
+int ba3 (void) { return 0; }
 END
 
 libtoolize
@@ -87,17 +87,32 @@ $ACLOCAL
 $AUTOCONF
 $AUTOMAKE -a
 
+st=0
 for staticshared in --disable-shared "" --disable-static; do
+
+  cp sub2/sub3/ba3.in sub2/sub3/ba3.c
   ./configure --enable-dependency-tracking $staticshared
-  $MAKE 
+  $MAKE
 
-  # check that dependency tracking works
-  if grep 'depmode=none' Makefile; then :
+  # If we cannot enable dependency tracking, perform only the most basic
+  # checks, and don't consider this test to be PASSed but SKIPped, because
+  # the main purpose of this test is exposing the depmode features.
+  if grep 'depmode=none' Makefile; then
+    st=77
   else
     cd sub2
     $sleep
     echo 'choke me' > sub3/ba3.h
-    if $MAKE; then Exit 1; fi
+    # Do not use `$MAKE && Exit 1' here, since even relatively-recent
+    # versions of the BSD shell wrongly exit when the `errexit' shell
+    # flag is active if a command within "&&" fails inside a compound
+    # statement.
+    if $MAKE; then Exit 1; else :; fi
+
+    # Ensure the deleted header bug is fixed.
+    rm -f sub3/ba3.h
+    sed 1d sub3/ba3.in >sub3/ba3.c
+    $MAKE
     cd ..
   fi
 
@@ -106,4 +121,7 @@ for staticshared in --disable-shared "" --disable-static; do
   test ! -f sub2/sub3/ba3.d
 
   echo 'extern int x;' > sub2/sub3/ba3.h
+
 done
+
+Exit $st
diff --git a/tests/depcomp8a.test b/tests/depcomp8a.test
new file mode 100755 (executable)
index 0000000..b4a0e3a
--- /dev/null
@@ -0,0 +1,79 @@
+#! /bin/sh
+# Copyright (C) 2010 Free Software Foundation, Inc.
+#
+# This 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 regressions in computation of names of .Po files for
+# automatic dependency tracking.
+# Keep this in sync with sister test `depcomp8b.test', which checks the
+# same thing for libtool objects.
+
+. ./defs || Exit 1
+
+set -e
+
+cat >> configure.in << 'END'
+AC_PROG_CC
+AC_OUTPUT
+END
+
+cat > Makefile.am << 'END'
+bin_PROGRAMS = zardoz
+zardoz_SOURCES = foo.c sub/bar.c
+END
+
+mkdir sub
+cat > foo.c << 'END'
+int main(void)
+{
+  extern int bar;
+  return bar;
+}
+END
+cat > sub/bar.c << 'END'
+extern int bar = 0;
+END
+
+$ACLOCAL
+$AUTOMAKE -a
+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
+
+$AUTOCONF
+./configure
+$MAKE
+./zardoz
+$MAKE distcheck
+
+# Try again with subdir-objects option.
+
+echo AM_PROG_CC_C_O >> configure.in
+echo AUTOMAKE_OPTIONS = subdir-objects >> Makefile.am
+
+$ACLOCAL
+$AUTOMAKE -a
+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
+
+$AUTOCONF
+./configure
+$MAKE
+./zardoz
+$MAKE distcheck
+
+:
diff --git a/tests/depcomp8b.test b/tests/depcomp8b.test
new file mode 100755 (executable)
index 0000000..1ae7459
--- /dev/null
@@ -0,0 +1,73 @@
+#! /bin/sh
+# Copyright (C) 2010 Free Software Foundation, Inc.
+#
+# This 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 regressions in computation of names of .Plo files for
+# automatic dependency tracking.
+# Keep this in sync with sister test `depcomp8a.test', which checks the
+# same thing for non-libtool objects.
+
+required=libtoolize
+. ./defs || Exit 1
+
+set -e
+
+cat >> configure.in << 'END'
+AC_PROG_CC
+AC_PROG_LIBTOOL
+AC_OUTPUT
+END
+
+cat > Makefile.am << 'END'
+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
+
+libtoolize
+
+$ACLOCAL
+$AUTOMAKE -a
+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
+
+$AUTOCONF
+./configure
+$MAKE
+$MAKE distcheck
+
+# Try again with subdir-objects option.
+
+echo AM_PROG_CC_C_O >> configure.in
+echo AUTOMAKE_OPTIONS = subdir-objects >> Makefile.am
+
+$ACLOCAL
+$AUTOMAKE -a
+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
+
+$AUTOCONF
+./configure
+$MAKE
+$MAKE distcheck
+
+:
index 8603329..0f32e33 100755 (executable)
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2008, 2009  Free Software Foundation, Inc.
+# Copyright (C) 2008, 2009, 2010 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -63,6 +63,10 @@ mv -f t Makefile.am
 $AUTOMAKE
 ./configure
 $MAKE
-$MAKE -e distcheck && Exit 1
+$MAKE distcheck 2>stderr && { cat srderr >&2; Exit 1; }
+cat stderr >&2
+
+grep 'ERROR:.*files left in build directory after distclean' stderr
+grep '^\./foo\.1$' stderr
 
 :
index 19d3377..23841c6 100755 (executable)
@@ -17,6 +17,7 @@
 
 # Test to make sure that depcomp and compile are added to DIST_COMMON
 # From Pavel Roskin.
+# Please keep this in sync with sister test 'distcom6.test'.
 
 . ./defs || Exit 1
 
@@ -60,16 +61,11 @@ sed -n -e '/^DIST_COMMON =.*\\$/ {
    t loop
    p
    n
-   }' -e '/^DIST_COMMON =/ p' Makefile.in | grep compile
+   }' -e 's/$/ /' -e '/^DIST_COMMON =/p' Makefile.in > dc.txt
 
-sed -n -e '/^DIST_COMMON =.*\\$/ {
-   :loop
-   p
-   n
-   t clear
-   :clear
-   s/\\$/\\/
-   t loop
-   p
-   n
-   }' -e '/^DIST_COMMON =/ p' Makefile.in | grep depcomp
+cat dc.txt # might be useful for debugging
+
+$FGREP ' compile ' dc.txt
+$FGREP ' depcomp ' dc.txt
+
+:
index 04bf365..9cc62ea 100755 (executable)
@@ -1,5 +1,6 @@
 #! /bin/sh
-# Copyright (C) 2001, 2002, 2003, 2004, 2006  Free Software Foundation, Inc.
+# Copyright (C) 2001, 2002, 2003, 2004, 2006, 2010 Free Software
+# Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -34,9 +35,9 @@ END
 $ACLOCAL
 
 # Should not warn about missing README, since it is a target.
-$AUTOMAKE --add-missing --gnu >stdout 2>&1
-cat stdout
-grep README stdout && 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
@@ -54,4 +55,6 @@ sed -n -e '/^DIST_COMMON =.*\\$/ {
 # Should warn about missing README.
 : > Makefile.am
 AUTOMAKE_fails --add-missing --gnu
-grep README stderr
+grep 'required file.*README.*not found' stderr
+
+:
index 32be702..5dde663 100755 (executable)
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2003, 2006  Free Software Foundation, Inc.
+# Copyright (C) 2003, 2006, 2010 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -46,6 +46,7 @@ mkdir tests
 : > README
 : > tests/wrapper.in
 cat > Makefile.am << 'END'
+.PHONY: test
 test: distdir
        test -f $(distdir)/tests/wrapper.in
 END
@@ -68,7 +69,11 @@ sed -n -e '/^DIST_COMMON =.*\\$/ {
    n
    }' -e '/^DIST_COMMON =/ p' Makefile.in > dc.txt
 
+cat dc.txt # might be useful for debugging
+
 test 1 = `grep tests dc.txt | wc -l`
 grep configure dc.txt
 # README must come first.
 grep 'DIST_COMMON = README' Makefile.in
+
+:
index 2462685..7cadfd5 100755 (executable)
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2003, 2006  Free Software Foundation, Inc.
+# Copyright (C) 2003, 2006, 2010 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
 
 set -e
 
+extract_distcommon ()
+{
+  sed -n -e '/^DIST_COMMON =.*\\$/ {
+    :loop
+    p
+    n
+    t clear
+    :clear
+    s/\\$/\\/
+    t loop
+    p
+    n
+    }' -e '/^DIST_COMMON =/ p' ${1+"$@"}
+}
+
 cat >> configure.in << 'END'
    AC_CONFIG_FILES([tests/autoconf:tests/wrapper.in],
                    [chmod +x tests/autoconf])
@@ -47,6 +62,7 @@ mkdir tests
 : > tests/Makefile.am
 cat > Makefile.am << 'END'
 SUBDIRS = tests
+.PHONY: test
 test: distdir
        test -f $(distdir)/tests/wrapper.in
 END
@@ -57,29 +73,14 @@ $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 > top.txt
+extract_distcommon Makefile.in > top.txt
+extract_distcommon tests/Makefile.in > inner.txt
 
-sed -n -e '/^DIST_COMMON =.*\\$/ {
-   :loop
-   p
-   n
-   t clear
-   :clear
-   s/\\$/\\/
-   t loop
-   p
-   n
-   }' -e '/^DIST_COMMON =/ p' 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`
+
+:
index b7abba3..ca71571 100755 (executable)
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2003, 2004, 2006  Free Software Foundation, Inc.
+# Copyright (C) 2003, 2004, 2006, 2010 Free Software Foundation, Inc.
 #
 # This 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,6 +18,7 @@
 # are added to the top-level DIST_COMMON even with --no-force.
 # This is similar to distcom2.test, but with --no-force added.
 # Report from Scott James Remnant (Debian #206299).
+# Please keep this in sync with sister test 'distcom2.test'.
 
 . ./defs || Exit 1
 
@@ -46,7 +47,6 @@ END
 rm -f compile depcomp
 
 $ACLOCAL
-$AUTOCONF
 $AUTOMAKE --add-missing --no-force
 
 test -f compile
@@ -62,16 +62,11 @@ sed -n -e '/^DIST_COMMON =.*\\$/ {
    t loop
    p
    n
-   }' -e '/^DIST_COMMON =/ p' Makefile.in | grep compile
+   }' -e 's/$/ /' -e '/^DIST_COMMON =/p' Makefile.in > dc.txt
 
-sed -n -e '/^DIST_COMMON =.*\\$/ {
-   :loop
-   p
-   n
-   t clear
-   :clear
-   s/\\$/\\/
-   t loop
-   p
-   n
-   }' -e '/^DIST_COMMON =/ p' Makefile.in | grep depcomp
+cat dc.txt # might be useful for debugging
+
+$FGREP ' compile ' dc.txt
+$FGREP ' depcomp ' dc.txt
+
+:
index b2d19d6..3ea5096 100755 (executable)
@@ -34,9 +34,14 @@ END
 rm -f depcomp
 mkdir subdir
 
-echo bin_PROGRAMS = foo > subdir/Makefile.am
+cat > subdir/Makefile.am << 'END'
+bin_PROGRAMS = foo
+END
+
 : > subdir/foo.c
 
 $ACLOCAL
 AUTOMAKE_fails --add-missing subdir/Makefile
 grep 'full run' stderr
+
+:
index af2d01a..04ba363 100755 (executable)
@@ -1,6 +1,6 @@
 #! /bin/sh
-# Copyright (C) 1996, 2001, 2002, 2003, 2006, 2007, 2009  Free Software
-# Foundation, Inc.
+# Copyright (C) 1996, 2001, 2002, 2003, 2006, 2007, 2009, 2010 Free
+# Software Foundation, Inc.
 #
 # This 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,9 @@
 
 set -e
 
-echo AC_OUTPUT >>configure.in
+cat >> configure.in << 'END'
+AC_OUTPUT
+END
 
 cat > Makefile.am << 'END'
 include_HEADERS = some/file another/sub/subsub/file2 yet/another/file3
@@ -67,16 +69,17 @@ $MAKE distdir
 # Check to make sure `foo' isn't made in build directory.
 test -d foo && Exit 1
 
-rm -rf distdir-1.0
+rm -rf $me-1.0
 # Remove the dot from VERSION for the next grep.
-VERSION=10 MKDIR_P='echo MKDIR_P' $MAKE -e distdir >make.log || :
+VERSION=10 MKDIR_P='echo MKDIR_P' $MAKE -e distdir >stdout || :
+cat stdout
 
 # 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.*\.' make.log && Exit 1
+grep 'MKDIR_P.*\.' stdout && Exit 1
 
 cd ..
 ./configure --prefix "`pwd`"
 $MAKE distcheck
 
-Exit 0
+:
index 41a783d..268cfcb 100755 (executable)
@@ -43,7 +43,9 @@ ln -s bar2 bar3
 
 ln -s "`pwd`/foo" quux
 
-echo AC_OUTPUT >>configure.in
+cat >> configure.in << 'END'
+AC_OUTPUT
+END
 
 echo "me = $me" > Makefile.am  # for better failure messages
 cat >> Makefile.am << 'END'
@@ -71,3 +73,5 @@ $AUTOMAKE
 
 ./configure
 $MAKE test
+
+:
diff --git a/tests/distlinksbrk.test b/tests/distlinksbrk.test
new file mode 100755 (executable)
index 0000000..2314408
--- /dev/null
@@ -0,0 +1,73 @@
+#! /bin/sh
+# Copyright (C) 2010 Free Software Foundation, Inc.
+#
+# This 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 distributed broken symlinks cause `make dist' to fail, and
+# to do so with (mostly) meaningful diagnostic.
+
+. ./defs || Exit 1
+
+set -e
+
+# We need, for our broken symlinks, names that make it hard to get false
+# positives when grepping make output to look for them.
+lnk_base=BrknSymlnk
+lnk1=${lnk_base}__001
+lnk2=${lnk_base}__002
+lnka=${lnk_base}__aaa
+lnkb=${lnk_base}__bbb
+
+ln -s nonesuch $lnk1 || {
+  echo "$me: cannot create broken symlinks" >&2
+  Exit 77
+}
+
+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
+test -h $lnk1
+test -h $lnk2
+test -h $lnka
+test -h $lnkb
+
+cat >> configure.in <<'END'
+AC_OUTPUT
+END
+
+$ACLOCAL
+$AUTOCONF
+
+ls -l # for debugging
+
+# Don't try to use "make -k", because some botched make implementations
+# (HP-UX, IRIX) might still exit on the first error in this situations.
+for lnk in $lnk1 $lnk2 $lnka $lnkb; do
+  echo "EXTRA_DIST = $lnk" > Makefile.am
+  $AUTOMAKE
+  ./configure
+  # Distribution must fail, with a decent error message.
+  $MAKE distdir >out 2>&1 && { cat out; Exit 1; }
+  cat out
+  $FGREP $lnk out
+done
+
+:
index 6c18608..117d986 100755 (executable)
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2001, 2002, 2004  Free Software Foundation, Inc.
+# Copyright (C) 2001, 2002, 2004, 2010 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
 
 . ./defs || Exit 1
 
-cat > configure.in << 'END'
-AC_INIT(a.c)
-AM_INIT_AUTOMAKE(nonesuch, 0.23)
+set -e
+
+cat >> configure.in << 'END'
+AC_CONFIG_SRCDIR([a.c])
 AC_PROG_CC
-AM_PROG_CC_C_O
-AC_OUTPUT(Makefile)
+AC_OUTPUT
 END
 
 cat > Makefile.am << 'END'
@@ -34,14 +34,15 @@ END
 
 : > a.c
 
-set -e
-
 $ACLOCAL
 $AUTOCONF
 $AUTOMAKE --include-deps --copy --add-missing
 ./configure
 $MAKE dist
 
-gunzip nonesuch-0.23.tar.gz
-(tar tf nonesuch-0.23.tar | $FGREP './nonesuch-0.23/a.c') && Exit 1
-Exit 0
+gzip -d $me-1.0.tar.gz
+tar tf $me-1.0.tar > stdout || { cat stdout; Exit 1; }
+cat stdout
+$FGREP ./$me-1.0/a.c stdout && Exit 1
+
+:
diff --git a/tests/dmalloc.test b/tests/dmalloc.test
new file mode 100755 (executable)
index 0000000..629c949
--- /dev/null
@@ -0,0 +1,61 @@
+#! /bin/sh
+# Copyright (C) 2010 Free Software Foundation, Inc.
+#
+# This 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/>.
+
+# Simple checks on the `AM_WITH_DMALLOC' macro.
+
+. ./defs || Exit 1
+
+set -e
+
+cat >> configure.in << 'END'
+AC_CONFIG_HEADERS([config.h])
+AM_WITH_DMALLOC
+AC_SUBST([LDFLAGS])
+AC_OUTPUT
+END
+
+cat > config.h.in <<'END'
+#undef WITH_DMALLOC
+END
+
+cat > Makefile.am <<'END'
+check-with-dmalloc:
+## The AM_WITH_DMALLOC assumes that the user is a developer, so that
+## he is expected to install and make available the `dmalloc' library
+## by his own.  So we just check that proper linker and libs flags get
+## added.
+       echo ' ' $(LDFLAGS) ' ' | grep ' -g '
+       echo ' ' $(LIBS) ' ' | grep ' -ldmalloc '
+END
+
+$ACLOCAL
+$AUTOMAKE
+$AUTOCONF
+
+./configure
+cat config.h # debug info
+grep '^ */\* *# *undef  *WITH_DMALLOC *\*/ *$' config.h
+
+./configure --without-dmalloc
+cat config.h # debug info
+grep '^ */\* *# *undef  *WITH_DMALLOC *\*/ *$' config.h
+
+./configure --with-dmalloc
+cat config.h # debug info
+grep '^# *define  *WITH_DMALLOC  *1 *$' config.h
+$MAKE check-with-dmalloc
+
+:
index bdc73ab..7105cb0 100755 (executable)
@@ -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
+. ./defs || Exit 1
 
 set -e
 
index 0d12afd..6fc2737 100755 (executable)
@@ -17,7 +17,7 @@
 # Test to make sure that -Wportability turns on portability-recursive,
 # likewise for -Wno-...
 
-. ./defs
+. ./defs || Exit 1
 
 set -e
 
index b9fe541..d35c4c6 100755 (executable)
@@ -48,6 +48,8 @@ zardoz_LDADD = @FLIBS@
 END
 
 : > zardoz.f
+: > config.guess
+: > config.sub
 
 $ACLOCAL
 $AUTOMAKE
index 982a989..a63f2ca 100755 (executable)
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2004, 2008  Free Software Foundation, Inc.
+# Copyright (C) 2004, 2008, 2011 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -34,6 +34,9 @@ do
   touch x
 done) || Exit 77
 
+# AIX 5.3 `cp -R' is too buggy for `make dist'.
+cp -R 12345678 t || Exit 77
+
 $ACLOCAL
 $AUTOCONF
 $AUTOMAKE
index 465f2af..33ac663 100755 (executable)
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2006, 2008  Free Software Foundation, Inc.
+# Copyright (C) 2006, 2008, 2011 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -55,6 +55,9 @@ do
   touch x
 done)
 
+# AIX 5.3 `cp -R' is too buggy for `make dist'.
+cp -R ${subdirname} t || Exit 77
+
 for init_dir in ${subdirname} .; do
        (
                cd ${init_dir} || Exit 1
index 605a377..84df399 100755 (executable)
@@ -62,12 +62,12 @@ cat >Makefile.am <<'END'
 bin_PROGRAMS = hello goodbye
 hello_SOURCES = hello.f foo.f90 sub/bar.f90
 goodbye_SOURCES = bye.f90 sub/baz.f
-goodbye_FCFLAGS = 
+goodbye_FCFLAGS =
 LDADD = $(FCLIBS)
 END
 
 $ACLOCAL
-$AUTOMAKE
+$AUTOMAKE -a
 # The Fortran 77 linker should be preferred:
 grep '.\$(FCLINK)' Makefile.in && Exit 1
 
index cd2a7d5..d6151a7 100755 (executable)
@@ -70,7 +70,7 @@ hello_LDADD = libhello.la
 libhello_la_SOURCES = foo.f90 sub/bar.f90
 libhello_la_LIBADD = libgoodbye.la
 libgoodbye_la_SOURCES = bye.f90 sub/baz.f
-libgoodbye_la_FCFLAGS = 
+libgoodbye_la_FCFLAGS =
 LDADD = $(FCLIBS)
 END
 
diff --git a/tests/help-depend.test b/tests/help-depend.test
new file mode 100755 (executable)
index 0000000..e676e5e
--- /dev/null
@@ -0,0 +1,41 @@
+#! /bin/sh
+# Copyright (C) 2010 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# Make sure that our private macro `AM_DEP_TRACK' adds proper text to
+# the configure help screen.
+# Keep this in sync with sister test `help-depend2.test'
+
+. ./defs || Exit 1
+
+set -e
+
+cat > configure.in <<END
+AC_INIT([$me], [1.0])
+AM_DEP_TRACK
+END
+
+$ACLOCAL
+$AUTOCONF
+
+./configure --help >stdout || { cat stdout; Exit 1; }
+cat stdout
+
+$EGREP '^  *--enable-dependency-tracking( |$)' stdout
+$EGREP '^  *--disable-dependency-tracking( |$)' stdout
+$FGREP ' speeds up one-time build' stdout
+$FGREP ' slow dependency extract' stdout
+
+:
diff --git a/tests/help-depend2.test b/tests/help-depend2.test
new file mode 100755 (executable)
index 0000000..6bad661
--- /dev/null
@@ -0,0 +1,42 @@
+#! /bin/sh
+# Copyright (C) 2010 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# Make sure that 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'
+
+. ./defs || Exit 1
+
+set -e
+
+cat > configure.in <<END
+AC_INIT([$me], [1.0])
+AM_INIT_AUTOMAKE
+AC_PROG_CC
+END
+
+$ACLOCAL
+$AUTOCONF
+
+./configure --help >stdout || { cat stdout; Exit 1; }
+cat stdout
+
+$EGREP '^  *--enable-dependency-tracking( |$)' stdout
+$EGREP '^  *--disable-dependency-tracking( |$)' stdout
+$FGREP ' speeds up one-time build' stdout
+$FGREP ' slow dependency extract' stdout
+
+:
diff --git a/tests/help-dmalloc.test b/tests/help-dmalloc.test
new file mode 100755 (executable)
index 0000000..51b3ba4
--- /dev/null
@@ -0,0 +1,39 @@
+#! /bin/sh
+# Copyright (C) 2010 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# Make sure that our macro `AM_WITH_DMALLOC' adds proper text to
+# the configure help screen.
+
+. ./defs || Exit 1
+
+set -e
+
+cat > configure.in <<END
+AC_INIT([$me], [1.0])
+AM_WITH_DMALLOC
+END
+
+$ACLOCAL
+$AUTOCONF
+
+./configure --help >stdout || { cat stdout; Exit 1; }
+cat stdout
+
+$EGREP '^   *--with-dmalloc( |$) ' stdout
+$FGREP ' use dmalloc' stdout
+$FGREP 'www.dmalloc.com' stdout
+
+:
diff --git a/tests/help-init.test b/tests/help-init.test
new file mode 100755 (executable)
index 0000000..fdd9fa0
--- /dev/null
@@ -0,0 +1,39 @@
+#! /bin/sh
+# Copyright (C) 2010 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# Make sure that our grand macro `AM_INIT_AUTOMAKE' add proper text
+# to the configure help screen.
+
+. ./defs || Exit 1
+
+set -e
+
+cat > configure.in <<END
+AC_INIT([$me], [1.0])
+AM_INIT_AUTOMAKE
+END
+
+$ACLOCAL
+$AUTOCONF
+
+./configure --help >stdout || { cat stdout; Exit 1; }
+cat stdout
+
+grep '^  *--program-prefix[= ]' stdout
+grep '^  *--program-suffix[= ]' stdout
+grep '^  *--program-transform-name[= ]' stdout
+
+:
diff --git a/tests/help-lispdir.test b/tests/help-lispdir.test
new file mode 100755 (executable)
index 0000000..5eb7ab9
--- /dev/null
@@ -0,0 +1,42 @@
+#! /bin/sh
+# Copyright (C) 2010 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# Make sure that our macro `AM_PATH_LISPDIR' adds proper text to
+# the configure help screen.
+
+. ./defs || Exit 1
+
+set -e
+
+cat > configure.in <<END
+AC_INIT([$me], [1.0])
+AM_PATH_LISPDIR
+END
+
+$ACLOCAL
+$AUTOCONF
+
+./configure --help >stdout || { cat stdout; Exit 1; }
+cat stdout
+
+$EGREP '^  *--with-lispdir( |$)' stdout
+grep ' override.*lisp directory' stdout
+$EGREP '^  *EMACS( |$)' stdout
+grep ' .*[eE]macs editor' stdout
+$EGREP '^  *EMACSLOADPATH( |$)' stdout
+grep ' .*[eE]macs library search path' stdout
+
+:
diff --git a/tests/help-maintainer.test b/tests/help-maintainer.test
new file mode 100755 (executable)
index 0000000..6933d0c
--- /dev/null
@@ -0,0 +1,61 @@
+#! /bin/sh
+# Copyright (C) 2010 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# Make sure that our macro `AM_MAINTAINER_MODE' adds proper text to
+# the configure help screen.
+
+. ./defs || Exit 1
+
+set -e
+
+cat > configure.in <<END
+AC_INIT([$me], [1.0])
+AM_MAINTAINER_MODE
+END
+
+cat configure.in
+$ACLOCAL
+$AUTOCONF --force
+./configure --help >stdout || { cat stdout; Exit 1; }
+cat stdout
+$EGREP '^  *--enable-maintainer-mode( |$)' stdout
+$FGREP ' enable make rules' stdout
+
+rm -rf autom4te*.cache # just to be sure
+sed 's/\(AM_MAINTAINER_MODE\).*/\1([disable])/' configure.in >t
+mv -f t configure.in
+
+cat configure.in
+$ACLOCAL
+$AUTOCONF --force
+./configure --help >stdout || { cat stdout; Exit 1; }
+cat stdout
+$EGREP '^  *--enable-maintainer-mode( |$)' stdout
+$FGREP ' enable make rules' stdout
+
+rm -rf autom4te*.cache # just to be sure
+sed 's/\(AM_MAINTAINER_MODE\).*/\1([enable])/' configure.in >t
+mv -f t configure.in
+
+cat configure.in
+$ACLOCAL
+$AUTOCONF --force
+./configure --help >stdout || { cat stdout; Exit 1; }
+cat stdout
+$EGREP '^  *--disable-maintainer-mode( |$)' stdout
+$FGREP ' disable make rules' stdout
+
+:
diff --git a/tests/help-multilib.test b/tests/help-multilib.test
new file mode 100755 (executable)
index 0000000..1657c34
--- /dev/null
@@ -0,0 +1,38 @@
+#! /bin/sh
+# Copyright (C) 2010 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# Make sure that our macro `AM_ENABLE_MULTILIB' adds proper text to
+# the configure help screen.
+
+. ./defs || Exit 1
+
+set -e
+
+cat > configure.in <<END
+AC_INIT([$me], [1.0])
+AM_ENABLE_MULTILIB
+END
+
+$ACLOCAL
+$AUTOCONF
+
+./configure --help >stdout || { cat stdout; Exit 1; }
+cat stdout
+
+$EGREP '^  *--enable-multilib( |$)' stdout
+$FGREP ' many library versions (default)' stdout
+
+:
similarity index 63%
rename from tests/fpinst2.test
rename to tests/help-regex.test
index c6b4900..3eff5f9 100755 (executable)
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 1996, 1998, 2000, 2001, 2002  Free Software Foundation, Inc.
+# Copyright (C) 2010 Free Software Foundation, Inc.
 #
 # This 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 "reversed" order of AC_PROG_INSTALL and
-# AC_PROG_INSTALL is not buggy.
+# Make sure that obsolescent macro `AM_WITH_REGEX' adds proper text to
+# the configure help screen.
 
 . ./defs || Exit 1
 
-cat > configure.in << 'END'
-AC_INIT
-AM_INIT_AUTOMAKE(nonesuch, nonesuch)
-AC_OUTPUT(Makefile)
-END
+set -e
 
-cat > Makefile.am <<'END'
-bin_SCRIPTS = zot
+cat > configure.in <<END
+AC_INIT([$me], [1.0])
+AM_WITH_REGEX
 END
 
-$ACLOCAL || Exit 1
-$AUTOMAKE || Exit 1
+$ACLOCAL
+$AUTOCONF
+
+./configure --help >stdout || { cat stdout; Exit 1; }
+cat stdout
+
+$FGREP ' --without-regex ' stdout
+$FGREP ' use GNU rx ' stdout
+
+:
diff --git a/tests/help-silent.test b/tests/help-silent.test
new file mode 100755 (executable)
index 0000000..e59f2f1
--- /dev/null
@@ -0,0 +1,45 @@
+#! /bin/sh
+# Copyright (C) 2010 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# Make sure that our macro `AM_SILENT_RULES' adds proper text to
+# the configure help screen.
+
+. ./defs || Exit 1
+
+set -e
+
+cat > configure.in <<END
+AC_INIT([$me], [1.0])
+AM_SILENT_RULES
+END
+
+$ACLOCAL
+
+mv -f configure.in configure.tmpl
+
+for args in '' '([])' '([yes])' '([no])'; do
+  sed "s/AM_SILENT_RULES.*/&$args/" configure.tmpl >configure.in
+  cat configure.in
+  $AUTOCONF --force
+  ./configure --help >stdout || { cat stdout; Exit 1; }
+  cat stdout
+  $EGREP '^  *--enable-silent-rules( |$)' stdout
+  grep ' less verbose build.*undo.*make V=1' stdout
+  $EGREP '^  *--disable-silent-rules ( |$)' stdout
+  grep ' verbose build.*undo.*make V=0' stdout
+done
+
+:
diff --git a/tests/help-upc.test b/tests/help-upc.test
new file mode 100755 (executable)
index 0000000..8f5ff5f
--- /dev/null
@@ -0,0 +1,38 @@
+#! /bin/sh
+# Copyright (C) 2010 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# Make sure that our macro `AM_PROG_UPC' adds proper text to
+# the configure help screen.
+
+. ./defs || Exit 1
+
+set -e
+
+cat > configure.in <<END
+AC_INIT([$me], [1.0])
+AM_PROG_UPC
+END
+
+$ACLOCAL
+$AUTOCONF
+
+./configure --help >stdout || { cat stdout; Exit 1; }
+cat stdout
+
+grep '^  *UPCFLAGS .*Unified Parallel C compiler flags' stdout
+grep '^  *UPC .*Unified Parallel C compiler command' stdout
+
+:
index e9ccf62..dd8b3b4 100755 (executable)
 # 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 --help and --version work, even when no configure.ac
-# is in the current directory.
+# Make sure --help and --version work, even when no configure.ac nor
+# configure.in is in the current directory.
 
 . ./defs || Exit 1
 
 set -e
 
-# Ensure we are run from the right directory.
-# (The last thing we want is to delete some random user files.)
-test -f ../defs
-rm -f *
+# Ensure we run in an empty directory.
+mkdir emptydir
+cd emptydir
+
+# Honour user overrides for $ACLOCAL and $AUTOMAKE.
+ACLOCAL=`echo " $ACLOCAL " | sed 's/ -W[^ ]*/ /g'`
+AUTOMAKE=`echo " $AUTOMAKE " | sed 's/ -W[^ ]*/ /g'`
 
 $ACLOCAL --version
 $ACLOCAL --help
 $AUTOMAKE --version
 $AUTOMAKE --help
 
-# aclocal and automake cannot work without configure.ac or configure.in
+# Sanity checks: aclocal and automake cannot work without configure.ac
+# or configure.in.
 $ACLOCAL 2>stderr && { cat stderr >&2; Exit 1; }
 cat stderr >&2
-grep configure.ac stderr
-grep configure.in stderr
+$FGREP configure.ac stderr
+$FGREP configure.in stderr
 AUTOMAKE_fails
-grep configure.ac stderr
-grep configure.in stderr
+$FGREP configure.ac stderr
+$FGREP configure.in stderr
+
+:
diff --git a/tests/help2.test b/tests/help2.test
new file mode 100755 (executable)
index 0000000..b74f30a
--- /dev/null
@@ -0,0 +1,53 @@
+#! /bin/sh
+# Copyright (C) 2010 Free Software Foundation, Inc.
+#
+# This 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 --help and --version work, even when the current directory
+# contains a broken configure.in and a broken acinclude.m4.
+. ./defs || Exit 1
+
+set -e
+
+# Ensure we run in a new, clean directory.
+mkdir cleandir
+cd cleandir
+
+# Honour user overrides for $ACLOCAL and $AUTOMAKE.
+ACLOCAL=`echo " $ACLOCAL " | sed 's/ -W[^ ]*/ /g'`
+AUTOMAKE=`echo " $AUTOMAKE " | sed 's/ -W[^ ]*/ /g'`
+
+echo '[' > configure.in
+echo '[' > acinclude.m4
+
+$AUTOMAKE --version
+$AUTOMAKE --help
+$ACLOCAL --version
+$ACLOCAL --help
+
+# Sanity check: aclocal cannot work with broken acinclude.m4.
+$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.in.
+$ACLOCAL 2>stderr && { cat stderr >&2; Exit 1; }
+cat stderr >&2
+$FGREP configure.in stderr
+AUTOMAKE_fails
+$FGREP configure.in stderr
+
+:
diff --git a/tests/help3.test b/tests/help3.test
new file mode 100755 (executable)
index 0000000..72399e3
--- /dev/null
@@ -0,0 +1,61 @@
+#! /bin/sh
+# Copyright (C) 2010 Free Software Foundation, Inc.
+#
+# This 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 --help and --version takes precedence over other options.
+
+. ./defs || Exit 1
+
+set -e
+
+# We must have full control over the content of the current directory.
+mkdir cleandir
+cd cleandir
+
+# Honour user overrides for $ACLOCAL and $AUTOMAKE.
+ACLOCAL=`echo " $ACLOCAL " | sed 's/ -W[^ ]*/ /g'`
+AUTOMAKE=`echo " $AUTOMAKE " | sed 's/ -W[^ ]*/ /g'`
+
+cat > configure.in <<END
+AC_INIT([$me], [1.0])
+AC_CONFIG_AUX_DIR([.]) dnl prevent automake from looking into '..'
+AM_INIT_AUTOMAKE([foreign])
+AC_CONFIG_FILES([Makefile])
+END
+
+cat > Makefile.am <<END
+## so that install-sh will be required
+pkgdata_DATA =
+END
+
+$ACLOCAL --force --help --output=foo.m4
+test ! -r foo.m4
+$ACLOCAL --output=foo.m4 --version --force
+test ! -r foo.m4
+# Sanity check.
+$ACLOCAL --output=foo.m4 --force
+test -f foo.m4
+
+mv -f foo.m4 aclocal.m4 # autoconf will need aclocal.m4
+
+$AUTOMAKE --add-missing --help --copy
+test ! -r install-sh
+$AUTOMAKE --copy --version --add-mising
+test ! -r install-sh
+# Sanity check.
+$AUTOMAKE --add-missing --copy
+test -f install-sh
+
+:
diff --git a/tests/help4.test b/tests/help4.test
new file mode 100755 (executable)
index 0000000..1b7de41
--- /dev/null
@@ -0,0 +1,55 @@
+#! /bin/sh
+# Copyright (C) 2010 Free Software Foundation, Inc.
+#
+# This 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 first among --help and --version to be specified on
+# the command line takes precedence over the following one.
+
+. ./defs || Exit 1
+
+set -e
+
+# Ensure we run in an empty directory.
+mkdir emptydir
+cd emptydir
+
+# Honour user overrides for $ACLOCAL and $AUTOMAKE.
+ACLOCAL=`echo " $ACLOCAL " | sed 's/ -W[^ ]*/ /g'`
+AUTOMAKE=`echo " $AUTOMAKE " | sed 's/ -W[^ ]*/ /g'`
+
+escape_dots () { sed 's/\./\\./g'; } # avoid issues with `\' in backquotes
+apiversion_rx=`echo "$APIVERSION" | escape_dots`
+
+$ACLOCAL --version --help >stdout || { cat stdout; Exit 1; }
+cat stdout
+grep "^aclocal.*$apiversion_rx" stdout
+grep "^Usage" stdout && Exit 1
+
+$ACLOCAL --help --version >stdout || { cat stdout; Exit 1; }
+cat stdout
+grep "^Usage" stdout
+grep "^aclocal.*$apiversion_rx" stdout && Exit 1
+
+$AUTOMAKE --version --help >stdout || { cat stdout; Exit 1; }
+cat stdout
+grep "^automake.*$apiversion_rx" stdout
+grep "^Usage" stdout && Exit 1
+
+$AUTOMAKE --help --version >stdout || { cat stdout; Exit 1; }
+cat stdout
+grep "^Usage" stdout
+grep "^automake.*$apiversion_rx" stdout && Exit 1
+
+:
index 8022729..8f0c5cc 100755 (executable)
@@ -20,7 +20,7 @@
 # Darwin).
 # Report from Peter O'Gorman.
 
-. ./defs
+. ./defs || Exit 1
 set -e
 
 echo AC_OUTPUT >>configure.in
diff --git a/tests/init2.test b/tests/init2.test
new file mode 100755 (executable)
index 0000000..31631d7
--- /dev/null
@@ -0,0 +1,32 @@
+#! /bin/sh
+# Copyright (C) 2010 Free Software Foundation, Inc.
+#
+# This 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/>.
+
+# Make sure we give a sensible error message when AM_INIT_AUTOMAKE
+# contains junk.
+
+. ./defs || Exit 1
+
+set -e
+
+cat >configure.in <<END
+AC_INIT([init2], [1.0])
+AM_INIT_AUTOMAKE([nosuchoption])
+END
+
+$ACLOCAL
+AUTOMAKE_fails
+grep 'nosuchoption.*recognized' stderr
+Exit 0
index d1f27fe..3cc71f5 100755 (executable)
@@ -1,5 +1,6 @@
 #! /bin/sh
-# Copyright (C) 1999, 2000, 2001, 2002, 2006  Free Software Foundation, Inc.
+# Copyright (C) 1999, 2000, 2001, 2002, 2006, 2010 Free Software
+# Foundation, Inc.
 #
 # This program 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 +18,8 @@
 # Test for bug in `make dist'
 # From Pavel Roskin.
 
-required=gzip
 . ./defs || Exit 1
+
 set -e
 
 cat > configure.in << 'END'
index 50617c8..8210535 100755 (executable)
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2009  Free Software Foundation, Inc.
+# Copyright (C) 2009, 2011 Free Software Foundation, Inc.
 #
 # This 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,8 @@
 required='makeinfo-html tex texi2dvi'
 . ./defs || Exit 1
 
-(dvips --help 2>/dev/null >/dev/null) || Exit 77
-(pdfetex --help 2>/dev/null >/dev/null) ||
-  (pdftex --help 2>/dev/null >/dev/null) || Exit 77
+dvips --help || Exit 77
+pdfetex --help || pdftex --help || Exit 77
 
 set -e
 
@@ -54,6 +53,7 @@ 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
@@ -67,4 +67,5 @@ $MAKE -e uninstall > stdout || { cat stdout; Exit 1; }
 cat stdout
 grep 'rm -f' stdout && Exit 1
 $MAKE -e uninstall DESTDIR="$destdir"
+
 :
index 5a82bd6..a315447 100755 (executable)
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2003, 2005, 2007  Free Software Foundation, Inc.
+# Copyright (C) 2003, 2005, 2007, 2010  Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -52,7 +52,7 @@ test -f ok
 
 # Make sure that installing a second version doesn't erase the first
 # one.  (This is error prone since `foo' symlinks to `foo-1.0' and the
-# second version will overwrite `foo'.   Hopefully `install' and `install-sh'
+# 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"
index fcee60b..fe55be4 100755 (executable)
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2008, 2009  Free Software Foundation, Inc.
+# Copyright (C) 2008, 2009, 2010 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -123,7 +123,7 @@ test `find "$instdir" -type f -print | wc -l` = 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" $MAKE uninstall
+env save_PATH="$PATH" PATH="`pwd`/..$PATH_SEPARATOR$PATH" $MAKE uninstall
 
 cd $subdir
 srcdir=../../$subdir
@@ -146,4 +146,5 @@ for file in page3.man page$nfiles.man npage3.man npage$nfiles.man; do
   $MAKE install-man3 && Exit 1
   chmod u+r $srcdir/$file
 done
+
 :
index 6831c9e..7648e1b 100755 (executable)
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2008, 2009  Free Software Foundation, Inc.
+# Copyright (C) 2008, 2009, 2010 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -113,7 +113,7 @@ test `find "$instdir" -type f -print | wc -l` = 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" $MAKE uninstall
+env save_PATH="$PATH" PATH="`pwd`/..$PATH_SEPARATOR$PATH" $MAKE uninstall
 
 cd $subdir
 srcdir=../../$subdir
index a3b10cb..2de026d 100755 (executable)
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2008, 2009  Free Software Foundation, Inc.
+# Copyright (C) 2008, 2009, 2010 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -137,7 +137,7 @@ test `find "$instdir" -type f -print | wc -l` = 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" $MAKE uninstall
+env save_PATH="$PATH" PATH="`pwd`/..$PATH_SEPARATOR$PATH" $MAKE uninstall
 
 cd $subdir
 srcdir=../../$subdir
index 778c1a3..927edeb 100755 (executable)
@@ -1,5 +1,6 @@
 #! /bin/sh
-# Copyright (C) 2002, 2004, 2006, 2008  Free Software Foundation, Inc.
+# Copyright (C) 2002, 2004, 2006, 2008, 2011 Free Software Foundation,
+# Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -77,9 +78,40 @@ test -f d3/y
 ./install-sh -T x d3 && Exit 1
 ./install-sh -T x d4// && Exit 1
 
-# Ensure that install-sh works with names that include spaces
+# Ensure that install-sh works with names that include spaces.
 touch 'a  b'
 mkdir 'x  y'
 ./install-sh 'a  b' 'x  y'
 test -f x\ \ y/a\ \ b
 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
+  # Skip tests if the file system is not capable.
+  mkdir ./$c || continue
+  rmdir ./$c
+  ./install-sh -d $c/$c/$c
+  rm -rf ./$c
+  ./install-sh -d $c d5/$c/$c
+  test -d ./$c
+  test -d d5/$c/$c
+  ./install-sh x $c
+  test -f ./$c/x
+  rm -f ./$c/x
+  ./install-sh -t $c x
+  test -f ./$c/x
+  rm -rf ./$c
+  ( : > ./$c ) || continue
+  ./install-sh $c x d5/$c/$c
+  test -f d5/$c/$c/x
+  test -f d5/$c/$c/$c
+  rm -f d5/$c/$c/?
+  ./install-sh -t d5/$c/$c $c x
+  test -f d5/$c/$c/x
+  test -f d5/$c/$c/$c
+done
+
+:
index 414b3e5..7d00788 100755 (executable)
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2004, 2005  Free Software Foundation, Inc.
+# Copyright (C) 2004, 2005, 2011 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -135,9 +135,13 @@ do
 
     cd "$build"
 
+    # Some make implementations eliminate leading and trailing whitespace
+    # from macros passed on the command line, and some eliminate leading
+    # whitespace from macros set from environment variables, so prepend
+    # './' and use the latter here.
     ../configure --prefix "/$file-prefix" &&
     $MAKE &&
-    DESTDIR=$dest file=$file $MAKE -e test-install-sep ||
+    DESTDIR=$dest file=./$file $MAKE -e test-install-sep ||
       eval "${test}_failures=\"\$${test}_failures$lf\$file\""
 
     cd ..
index 59146c7..c4120cf 100755 (executable)
@@ -1,5 +1,6 @@
 #! /bin/sh
-# Copyright (C) 1999, 2001, 2002, 2003, 2004  Free Software Foundation, Inc.
+# Copyright (C) 1999, 2001, 2002, 2003, 2004, 2010 Free Software
+# Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -17,7 +18,7 @@
 # Test associated with PR 19.
 # From Matthew D. Langston.
 
-required='gcc gzip flex GNUmake'
+required='gcc flex GNUmake'
 . ./defs || Exit 1
 
 # Ignore user CFLAGS.
@@ -38,9 +39,7 @@ AC_OUTPUT(Makefile)
 END
 
 cat > Makefile.am << 'END'
-AUTOMAKE_OPTIONS  = foreign
 LDADD             = @LEXLIB@
-
 noinst_PROGRAMS   = foo
 foo_SOURCES       = foo.l
 END
index edbdf9d..88924b2 100755 (executable)
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2002, 2003, 2004  Free Software Foundation, Inc.
+# Copyright (C) 2002, 2003, 2004, 2010 Free Software Foundation, Inc.
 #
 # This 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 subdir lexers.
 
-required='gcc GNUmake gzip flex'
+required='gcc GNUmake flex'
 . ./defs || Exit 1
 
 set -e
@@ -33,7 +33,7 @@ AC_OUTPUT
 END
 
 cat > Makefile.am << 'END'
-AUTOMAKE_OPTIONS  = foreign subdir-objects
+AUTOMAKE_OPTIONS  = subdir-objects
 LDADD             = @LEXLIB@
 
 bin_PROGRAMS    = foo/foo
index ed20703..0ee750c 100755 (executable)
@@ -20,7 +20,7 @@
 # Report from Bill Davidson
 
 required=gcc
-. ./defs
+. ./defs || Exit 1
 
 set -e
 
diff --git a/tests/lispdry.test b/tests/lispdry.test
new file mode 100755 (executable)
index 0000000..3bca21a
--- /dev/null
@@ -0,0 +1,60 @@
+#! /bin/sh
+# Copyright (C) 2005, 2008, 2010 Free Software Foundation, Inc.
+#
+# This 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 GNU Automake; see the file COPYING.  If not, write to
+
+# Check that `make -n' works with the lisp_LISP recover rule.
+
+required='emacs non-root'
+. ./defs || Exit 1
+
+set -e
+
+cat > Makefile.am << 'EOF'
+dist_lisp_LISP = am-one.el am-two.el am-three.el
+EOF
+
+cat >> configure.in << 'EOF'
+AM_PATH_LISPDIR
+AC_OUTPUT
+EOF
+
+echo "(require 'am-two)" > am-one.el
+echo "(require 'am-three) (provide 'am-two)" > am-two.el
+echo "(provide 'am-three)" > am-three.el
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE --add-missing
+./configure
+
+$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
+
+chmod a-w .
+
+$MAKE -n
+
+test ! -f am-one.elc
+test ! -f am-two.elc
+test ! -f am-three.elc
+test ! -f elc-stamp
+
+:
index aa86a9e..de75f83 100755 (executable)
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2008  Free Software Foundation, Inc.
+# Copyright (C) 2008, 2010 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -73,7 +73,7 @@ END
 
 chmod +x foo bar help2man
 save_PATH=$PATH
-PATH=`pwd`:$PATH
+PATH=`pwd`$PATH_SEPARATOR$PATH
 
 $ACLOCAL
 $AUTOMAKE
similarity index 62%
rename from tests/fpinstall.test
rename to tests/mdate6.test
index 6c645eb..e7f7d69 100755 (executable)
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 1996, 1998, 2000, 2001, 2002  Free Software Foundation, Inc.
+# Copyright (C) 2010 Free Software Foundation, Inc.
 #
 # This 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 bug reported by Thomas Morgan.  If both AC_PROG_INSTALL and
-# AC_PROG_INSTALL appear in configure.in, bad error results.
+# mdate-sh can work with weird file names, doesn't eval too much.
 
 . ./defs || Exit 1
 
-cat > configure.in << 'END'
-AC_INIT
-AM_INIT_AUTOMAKE(nonesuch, nonesuch)
-AC_OUTPUT(Makefile)
-END
+set -e
 
-cat > Makefile.am <<'END'
-bin_SCRIPTS = zot
-END
+a=
+file='file  name $a'
+( : > "$file" ) || Exit 77
 
-$ACLOCAL || Exit 1
-$AUTOMAKE || Exit 1
+cp "$testsrcdir"/../lib/mdate-sh .
+$SHELL ./mdate-sh "$file" >stdout 2>stderr ||
+  { cat stdout; cat stderr >&2; Exit 1; }
+cat stdout
+cat stderr >&2
+grep '[12][0-9]\{3\}' stdout
+test ! -s stderr
+
+:
index 3994b85..e543697 100755 (executable)
@@ -22,7 +22,7 @@ set -e
 
 {
   echo 'm4_define([AC_AUTOCONF_VERSION], [9999a])'
-  echo 'm4_define([b], [oops])'
+  echo 'dnl!! m4_define([a], [oops])'
   cat configure.in
   echo AC_OUTPUT
 } >configure.ac
@@ -39,10 +39,9 @@ $AUTOMAKE
 ./configure
 $MAKE
 
-sed 's/\[b\]/[a]/' < configure.ac > configure.tmp
-cmp configure.ac configure.tmp && Exit 1
-
-mv configure.tmp configure.ac
+sed 's/^dnl!! //' < configure.ac > configure.tmp
+cmp configure.ac configure.tmp && Exit 99 # sanity check
+mv -f configure.tmp configure.ac
 
 $MAKE 2>stderr || { cat stderr >&2; Exit 1; }
 cat stderr >&2
index 18f18fb..20b9b04 100755 (executable)
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2005, 2006  Free Software Foundation, Inc.
+# Copyright (C) 2005, 2006, 2010 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -52,7 +52,7 @@ EOF
 chmod +x bin/mkdir
 AM_PATH=$PATH
 export AM_PATH
-PATH=`pwd`/bin:$PATH
+PATH=`pwd`/bin$PATH_SEPARATOR$PATH
 export PATH
 
 # Test mkinstalldirs without mkdir -p.
index 19f83f1..c5a16c9 100755 (executable)
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2008  Free Software Foundation, Inc.
+# Copyright (C) 2008, 2010 Free Software Foundation, Inc.
 #
 # This 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,7 +31,6 @@ $ACLOCAL
 $AUTOCONF
 $AUTOMAKE -a
 
-./configure --help | grep 'enable-maintainer-mode.*enable make rules'
 ./configure
 grep '^MAINT.*#' Makefile
 
@@ -51,7 +50,6 @@ sed 's/\(AM_MAINTAINER_MODE\).*/\1([enable])/' configure.in > configure.int
 mv -f configure.int configure.in
 $AUTOCONF --force
 
-./configure --help | grep 'disable-maintainer-mode.*disable make rules'
 ./configure
 grep '^MAINT.*#' Makefile && Exit 1
 
@@ -64,4 +62,5 @@ grep '^MAINT.*#' Makefile
 sed 's/\(AM_MAINTAINER_MODE\).*/\1([foo])/' configure.in > configure.int
 mv -f configure.int configure.in
 $AUTOCONF --force -Werror && Exit 1
+
 :
index 0f9bb3b..fc94d37 100755 (executable)
@@ -1,5 +1,6 @@
 #! /bin/sh
-# Copyright (C) 2004, 2006, 2007, 2009  Free Software Foundation, Inc.
+# Copyright (C) 2004, 2006, 2007, 2009, 2010 Free Software Foundation,
+# Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -82,7 +83,7 @@ cat >mylex.sh <<'END'
 echo "$@" >lex.yy.c
 END
 chmod +x myyacc.sh mylex.sh
-PATH="`pwd`:$PATH"
+PATH="`pwd`$PATH_SEPARATOR$PATH"
 
 # make maintainer-clean; ./configure; make should always work,
 # per GNU Standard.
index 65b3fd4..3f88be3 100755 (executable)
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2003, 2004, 2007  Free Software Foundation, Inc.
+# Copyright (C) 2003, 2004, 2007, 2010 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -45,7 +45,7 @@ gcc ${1+"$@"}
 END
 
 chmod +x mycc
-PATH=`pwd`:$PATH
+PATH=`pwd`$PATH_SEPARATOR$PATH
 
 cat >Makefile.am <<'EOF'
 SUBDIRS = @subdirs@
@@ -64,7 +64,7 @@ AC_CONFIG_SRCDIR(foo.c)
 # Apparently it doesn't work to have auxdir=.. when
 # multilib uses symlinked trees.
 AC_CONFIG_AUX_DIR(.)
-AM_INIT_AUTOMAKE(foreign)
+AM_INIT_AUTOMAKE
 AC_PROG_CC
 AC_PROG_RANLIB
 AM_ENABLE_MULTILIB(Makefile,[..])
@@ -87,7 +87,7 @@ AC_INIT(libbar, 0.1, nobody@localhost)
 # Apparently it doesn't work to have auxdir=.. when
 # multilib uses symlinked trees.
 AC_CONFIG_AUX_DIR(.)
-AM_INIT_AUTOMAKE(foreign)
+AM_INIT_AUTOMAKE
 AC_PROG_CC
 AC_PROG_RANLIB
 AM_ENABLE_MULTILIB(Makefile,[..])
diff --git a/tests/parallel-tests-unreadable-log.test b/tests/parallel-tests-unreadable-log.test
new file mode 100755 (executable)
index 0000000..572f03d
--- /dev/null
@@ -0,0 +1,60 @@
+#! /bin/sh
+# Copyright (C) 2011 Free Software Foundation, Inc.
+#
+# This 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 testsuite driver copes well with unreadable test logs.
+
+parallel_tests=yes
+. ./defs || Exit 1
+
+cat >> configure.in << 'END'
+AC_OUTPUT
+END
+
+cat > Makefile.am << 'END'
+TESTS = foo.test bar.test
+XFAIL_TESTS = bar.test
+END
+
+cat > foo.test << 'END'
+#! /bin/sh
+exit 0
+END
+cat > bar.test << 'END'
+#! /bin/sh
+exit 1
+END
+chmod a+x foo.test bar.test
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE -a
+
+# The testsuite driver will use this variable, so ensure it sanitizes
+# it and do not allow in spurious values from the environment.
+line=PASS; export line
+
+./configure
+
+$MAKE foo.log
+$MAKE bar.log
+chmod a-r foo.log bar.log
+test ! -r foo.log || Exit 77
+$MAKE test-suite.log >stdout && { cat stdout; Exit 1; }
+cat stdout
+grep '^2 of 2 tests failed *$' stdout
+grep '^2 of 2 tests failed\. *$' test-suite.log
+
+:
index 29111c2..399b23b 100755 (executable)
@@ -41,14 +41,19 @@ foo.log: bar.log
 bar.log: baz.log
 END
 
+# foo.test and bar.test sleep to ensure their logs are always strictly newer
+# than the logs of their prerequisites, for HP-UX make.  The quoting pleases
+# maintainer-check.
 cat >>foo.test <<'END'
 #! /bin/sh
 echo "this is $0"
+sleep '1'
 exit 0
 END
 cat >>bar.test <<'END'
 #! /bin/sh
 echo "this is $0"
+sleep '1'
 exit 99
 END
 cat >>baz.test <<'END'
index 784e07f..524b82b 100755 (executable)
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2009, 2010  Free Software Foundation, Inc.
+# Copyright (C) 2009, 2010, 2011 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -38,7 +38,8 @@ TESTS = foo.test
 ## the next line will cause automake to error out:
 TESTS += $(srcdir)/bar.test $(top_srcdir)/baz.test
 .in.test:
-       cp $< $@
+## Account for VPATH issues on weaker make implementations (e.g. IRIX 6.5)
+       cp `test -f '$<' || echo $(srcdir)/`$< $@
        chmod +x $@
 check_SCRIPTS = $(TESTS)
 EXTRA_DIST = foo.in foo.test
@@ -57,7 +58,7 @@ AUTOMAKE_fails -a
 grep '(srcdir.*bar' stderr
 grep 'top_srcdir.*baz' stderr
 
-sed '/srcdir/d' < Makefile.am > t
+sed '/^TESTS +=.*srcdir/d' < Makefile.am > t
 mv -f t Makefile.am
 $AUTOMAKE -a
 
index 40f9a43..dfb48ae 100755 (executable)
@@ -17,7 +17,7 @@
 # Test to make sure that -Wportability understands %-style pattern
 # rules.
 
-. ./defs
+. ./defs || Exit 1
 
 set -e
 
index f7c7f14..09e4f84 100755 (executable)
@@ -19,7 +19,7 @@
 # `${ARCH}/%.$(OBJEXT):'.
 # Report from Ralf Corsepius.
 
-. ./defs
+. ./defs || Exit 1
 
 set -e
 
index 0f57915..9c9f3d3 100755 (executable)
@@ -17,7 +17,7 @@
 # Make sure .PHONY can be given dependencies several times.
 # From Ralf Corsepius.
 
-. ./defs
+. ./defs || Exit 1
 
 set -e
 
diff --git a/tests/pluseq11.test b/tests/pluseq11.test
new file mode 100755 (executable)
index 0000000..12ec4d7
--- /dev/null
@@ -0,0 +1,54 @@
+#!/bin/sh
+# Copyright (C) 2010 Free Software Foundation, Inc.
+#
+# This 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 for bug in variable concatenation with `+=': an extra backslash
+# is erroneously retained in the final value.
+# See also sister test pluseq11b.test.
+
+. ./defs || Exit 1
+
+set -e
+
+cat >>configure.in <<'END'
+AC_OUTPUT
+END
+
+cat > Makefile.am <<'END'
+## Use more line continuation to ensure we are robust and can (hopefully)
+## cope any number of them, and not just one
+FOO = \
+\
+\
+bar
+## Both these two variable additions are required to trigger the bug.
+FOO +=
+FOO += baz
+
+.PHONY: test
+test:
+       case '$(FOO)' in *\\*) exit 1;; *) exit 0;; esac
+END
+
+$ACLOCAL
+$AUTOMAKE
+
+grep '^ *FOO *=.*\\.' Makefile.in && Exit 1
+
+$AUTOCONF
+./configure
+$MAKE test
+
+:
index 258a8ef..ceb2729 100755 (executable)
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2006 Free Software
+# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2006, 2010 Free Software
 # Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 # Test for bug reported in PR 2.
+# "make dist" fails for AC_OUTPUT(README.foo:templ/README.foo.in).
+#
+# == Report ==
+# When my AC_OUTPUT macro in configure.in contains something
+# like the following (among the Makefiles)
+#       README.foo:templ/README.foo.in
+# the generated dist target in the Makefile.in fails,
+# because DIST_COMMON will contain templ/README.foo.in
+# and the dist target will try to copy templ/README.foo.in
+# to the distribution directory before it creates a templ
+# subdirectory in the distribution directory.
 
 . ./defs || Exit 1
 
 set -e
 
+# Please keep this underquoted and old-style.
 cat > configure.in << 'END'
 AC_INIT
 AM_INIT_AUTOMAKE(nonesuch, nonesuch)
@@ -38,3 +50,5 @@ $AUTOMAKE
 ./configure
 $MAKE distdir
 test -f nonesuch-nonesuch/templ/README.foo.in
+
+:
index 2944449..22a1e54 100755 (executable)
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2002, 2004  Free Software Foundation, Inc.
+# Copyright (C) 2002, 2004, 2010 Free Software Foundation, Inc.
 #
 # This 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,13 +22,10 @@ required='bison gcc'
 
 set -e
 
-cat > configure.in <<'EOF'
-AC_INIT(pr204, 0.1)
-AM_INIT_AUTOMAKE
+cat >> configure.in <<'EOF'
 AM_MAINTAINER_MODE
 AC_PROG_CC
 AC_PROG_YACC
-AC_CONFIG_FILES(Makefile)
 AC_OUTPUT
 EOF
 
@@ -64,8 +61,10 @@ cp parse.y parse2.y
 $ACLOCAL
 $AUTOCONF
 $AUTOMAKE -a
+
 ./configure
 $MAKE distdirtest
+
 # Make sure parse.c and parse2.c are still targets.
 $MAKE parse.c parse2.c
 test -f parse.c
@@ -78,3 +77,5 @@ touch parse.y
 $sleep
 $MAKE parse.c parse2.c
 test `ls -1t parse.c parse.y | sed 1q` = parse.c
+
+:
index 9344fd2..6778f7a 100755 (executable)
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2001, 2002, 2003  Free Software Foundation, Inc.
+# Copyright (C) 2001, 2002, 2003, 2010 Free Software Foundation, Inc.
 #
 # This 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 for PR 211.
+#
+# == Description ==
+# Suppose you have a library and an ltlibrary in the same
+# directory which use the same source:
+#
+#   libfoo_la_SOURCES = foo.c
+#   libbar_a_SOURCES = foo.c
+#
+# In this case foo.c will be compiled twice but using different
+# compilers.  This is a conflict.  In this case the user should
+# rename one of the `foo.o's.
 
 required=libtoolize
 . ./defs || Exit 1
 
 set -e
 
-cat > configure.in << 'END'
-AC_INIT(Makefile.am)
-AM_INIT_AUTOMAKE(hello,0.23)
+cat >> configure.in << 'END'
 AC_PROG_CC
 AC_PROG_LIBTOOL
-AC_OUTPUT(Makefile)
+AC_OUTPUT
 END
 
 cat > Makefile.am << 'END'
@@ -40,3 +49,5 @@ libtoolize
 $ACLOCAL
 AUTOMAKE_fails -a
 $FGREP 'foo.$(OBJEXT)' stderr
+
+:
index 25e1f0e..95212ab 100755 (executable)
@@ -1,5 +1,6 @@
 #! /bin/sh
-# Copyright (C) 2001, 2002, 2004, 2008  Free Software Foundation, Inc.
+# Copyright (C) 2001, 2002, 2004, 2008, 2010 Free Software Foundation,
+# Inc.
 #
 # This 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 for PR automake/220.
+# Test for problems when conditionals are not actually defined.
+# Check that the problems is diagnosed by configure.
+# This isn't perfect (ideally we'd like an error from autoconf),
+# but it is the best we can do.  It certainly makes it easier
+# to debug the problem.
+# Note that this should be also in the documentation.
 
 required=gcc
 . ./defs || Exit 1
 
 set -e
 
-cat >main.c <<EOF
+cat > main.c <<'EOF'
 int main() { return 0; }
 EOF
 
@@ -57,4 +64,6 @@ cd build
 # configure should fail since we've done something invalid.
 ../configure 2>stderr && { cat stderr >&2; Exit 1; }
 cat stderr >&2
-grep NEVER_TRUE stderr
+grep 'conditional.*NEVER_TRUE' stderr
+
+:
index fdcb997..00a7aad 100755 (executable)
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2002  Free Software Foundation, Inc.
+# Copyright (C) 2002, 2010 Free Software Foundation, Inc.
 #
 # This 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 $(top_srcdir) with dependencies.
+# Test for PR automake/224: $(top_srcdir) w.r.t. dependencies.
+#
+# == Description ==
+# Dependency tracking data should be stored in in the relative path
+# of the source file, as opposed the object file.
+# I.e., for `foo.c' in `$(top_srcdir)/bar', being built in
+# `$(top_srcdir)/build', the location of the `.deps' directory
+# should be `$(top_builddir)/bar/.deps'.
 
 required=gcc
 . ./defs || Exit 1
 
+set -e
+
 mkdir foo
 
 cat >foo/main.c <<'EOF'
@@ -31,30 +40,24 @@ bin_PROGRAMS = bar
 bar_SOURCES = foo/main.c
 EOF
 
-cat >configure.in <<'EOF'
-AC_INIT(foo/main.c)
-AC_CONFIG_AUX_DIR(.)
-AM_INIT_AUTOMAKE(test_am, 1.0)
+cat >>configure.in <<'EOF'
 AC_PROG_CC
 AM_PROG_CC_C_O
-AC_OUTPUT(Makefile)
+AC_OUTPUT
 EOF
 
-touch README NEWS AUTHORS ChangeLog
-
 mkdir build
 
-set -e
-
 $ACLOCAL
 $AUTOCONF
 $AUTOMAKE -a
 
 cd build
-CC='gcc' ../configure
-$MAKE
+../configure
 
+$MAKE
 test -d foo/.deps
 $MAKE distclean
 test -d foo/.deps && Exit 1
+
 :
index a97ef4f..0d3f153 100755 (executable)
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2002  Free Software Foundation, Inc.
+# Copyright (C) 2002, 2010 Free Software Foundation, Inc.
 #
 # This 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,6 +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/>.
 
+# Test for PR automake/229.
 # Make sure AC_CYGWIN requires config.{sub,guess}.
 # Reported by James Youngman.
 
@@ -29,5 +30,8 @@ EOF
 
 $ACLOCAL
 $AUTOMAKE -a
+
 test -f config.sub
 test -f config.guess
+
+:
index a5e869e..58fb2a8 100755 (executable)
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 # Test for PR 243.
+# AM_OUTPUT_DEPENDENCY_COMMANDS doesn't handle
+# `Makefile:Makefile.in:tail.mk' in AC_OUTPUT.
+#
+# == Report ==
+# If configure.in has something like:
+#       AC_OUTPUT(Makefile:Makefile.in:tail.mk)
+# then config.status cannot parse the Makefile to build the
+# dependency files in the .deps directory.  This is because
+# the AM_OUTPUT_DEPENDENCY_COMMANDS macro cannot cope with
+# the colon in the CONFIG_FILES variable.
 
 . ./defs || Exit 1
 
-cat > configure.in << 'END'
-AC_INIT(foo, 0.1, dev@null)
-AM_INIT_AUTOMAKE($PACKAGE, $VERSION)
+set -e
+
+cat > configure.in << END
+AC_INIT([$me], [1.0])
+AM_INIT_AUTOMAKE
 AC_PROG_CC
-AC_CONFIG_FILES(Makefile:Makefile.in:tail.mk)
+AC_CONFIG_FILES([Makefile:Makefile.in:tail.mk])
 AC_OUTPUT
 END
 
 : > tail.mk
 
 cat > Makefile.am << 'END'
-include_HEADERS         = 3dfx.h linutil.h
-noinst_HEADERS          = fx64.h fxdll.h fximg.h fxglob.h \
-                          fxos.h fxver.h glob.h
+include_HEADERS  = 3dfx.h linutil.h
+noinst_HEADERS   = fx64.h fxdll.h fximg.h fxglob.h \
+                   fxos.h fxver.h glob.h
 noinst_PROGRAMS = fxmisc
-fxmisc_SOURCES    = fx64.c fximg.c fxos.c linutil.c
+fxmisc_SOURCES  = fx64.c fximg.c fxos.c linutil.c
 END
 
-$ACLOCAL || Exit 1
-$AUTOMAKE || Exit 1
-$AUTOCONF || Exit 1
+$ACLOCAL
+$AUTOMAKE
+$AUTOCONF
+# FIXME: require compiler in $required rather than skipping here
 ./configure || Exit $?
 
 test -f .deps/fx64.Po
+
+:
index a1cd2fe..2bace6f 100755 (executable)
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 # Test for PR 266.
+# Dependency tracking -vs- nonstandard Makefile names
 
 . ./defs || Exit 1
 
-cat > configure.in << 'END'
-AC_INIT(foo, 0.1, dev@null)
-AM_INIT_AUTOMAKE($PACKAGE, $VERSION)
+set -e
+
+cat > configure.in << END
+AC_INIT([$me], [1.0])
+AM_INIT_AUTOMAKE
 AC_PROG_CC
-AC_CONFIG_FILES(Maudefile)
+AC_CONFIG_FILES([Maudefile])
 AC_OUTPUT
 END
 
 cat > Maudefile.am << 'END'
-include_HEADERS         = 3dfx.h linutil.h
-noinst_HEADERS          = fx64.h fxdll.h fximg.h fxglob.h \
-                          fxos.h fxver.h glob.h
+include_HEADERS = 3dfx.h linutil.h
+noinst_HEADERS  = fx64.h fxdll.h fximg.h fxglob.h \
+                  fxos.h fxver.h glob.h
 noinst_PROGRAMS = fxmisc
-fxmisc_SOURCES    = fx64.c fximg.c fxos.c linutil.c
+fxmisc_SOURCES  = fx64.c fximg.c fxos.c linutil.c
 END
 
-$ACLOCAL || Exit 1
-$AUTOMAKE || Exit 1
-$AUTOCONF || Exit 1
-./configure || Exit $?
+$ACLOCAL
+$AUTOMAKE
+$AUTOCONF
+# FIXME: require compiler in $required rather than skipping here
+./configure --enable-dependency-tracking || Exit $?
 
 test -f .deps/fx64.Po
+
+:
index 1d1e675..f4e6fb2 100755 (executable)
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2001, 2002  Free Software Foundation, Inc.
+# Copyright (C) 2001, 2002, 2010 Free Software Foundation, Inc.
 #
 # This 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/>.
 
 # Another test related to PR 279.
+# Multiple DEPENDENCIES on conditionals.
+# Please keep this in sync with sister test pr279.test.
+#
+# == Report ==
+# When defining xxx_LDADD and xxx_DEPENDENCIES variables where the
+# xxx_LDADD one contains values set in conditionals, automake will
+# fail with messages like:
+#       foo_DEPENDENCIES was already defined in condition TRUE, ...
 
 . ./defs || Exit 1
 
-cat > configure.in << 'END'
-AC_INIT(foo, 0.1, dev@null)
-AM_INIT_AUTOMAKE($PACKAGE, $VERSION)
+set -e
+
+cat >> configure.in << 'END'
 AC_PROG_CC
-AM_CONDITIONAL(FOOTEST, false)
-AC_CONFIG_FILES(Makefile)
+AM_CONDITIONAL([FOOTEST], [false])
 AC_OUTPUT
 END
 
 cat > Makefile.am << 'END'
-AUTOMAKE_OPTIONS = foreign
-
 if FOOTEST
 foo_LDADD = zardoz
 else
@@ -39,8 +44,10 @@ endif
 bin_PROGRAMS = foo
 END
 
-$ACLOCAL || Exit 1
-$AUTOMAKE || Exit 1
+$ACLOCAL
+$AUTOMAKE
+
+grep '^@FOOTEST_TRUE@foo_DEPENDENCIES *= *zardoz$' Makefile.in
+grep '^@FOOTEST_FALSE@foo_DEPENDENCIES *= *maude$' Makefile.in
 
-grep '@foo_DEPENDENCIES = zardoz' Makefile.in || Exit 1
-grep '@foo_DEPENDENCIES = maude' Makefile.in || Exit 1
+:
index b7ec641..d658668 100755 (executable)
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2001, 2002  Free Software Foundation, Inc.
+# Copyright (C) 2001, 2002, 2010 Free Software Foundation, Inc.
 #
 # This 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 for PR 279.
+# Multiple DEPENDENCIES on conditionals.
+# Please keep this in sync with sister test pr279-2.test.
+#
+# == Report ==
+# When defining xxx_LDADD and xxx_DEPENDENCIES variables where the
+# xxx_LDADD one contains values set in conditionals, automake will
+# fail with messages like:
+#       foo_DEPENDENCIES was already defined in condition TRUE, ...
 
 . ./defs || Exit 1
 
-cat > configure.in << 'END'
-AC_INIT(foo, 0.1, dev@null)
-AM_INIT_AUTOMAKE($PACKAGE, $VERSION)
+set -e
+
+cat >> configure.in << 'END'
 AC_PROG_CC
-AM_CONDITIONAL(FOOTEST, false)
-AC_CONFIG_FILES(Makefile)
+AM_CONDITIONAL([FOOTEST], [false])
 AC_OUTPUT
 END
 
 cat > Makefile.am << 'END'
-AUTOMAKE_OPTIONS = foreign
-
 if FOOTEST
 xtralib =
 else
@@ -41,5 +46,7 @@ foo_LDADD = ${xtralib}
 foo_DEPENDENCIES =
 END
 
-$ACLOCAL || Exit 1
+$ACLOCAL
 $AUTOMAKE
+
+:
index 58553b5..3a6f902 100755 (executable)
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2002, 2007  Free Software Foundation, Inc.
+# Copyright (C) 2002, 2007, 2010 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
 
 . ./defs || Exit 1
 
-cat > configure.in << 'END'
-AC_INIT(foo, 0.1, dev@null)
-AM_INIT_AUTOMAKE
+set -e
+
+cat >> configure.in << 'END'
 AC_PROG_CC
-AC_CONFIG_FILES(Makefile)
 AC_OUTPUT
 END
 
@@ -38,13 +37,15 @@ END
 
 chmod +x foo
 
-set -e
-
 mkdir install
 
 $ACLOCAL
 $AUTOCONF
 $AUTOMAKE -a
+
 ./configure "--prefix=`cd install && pwd`"
+
 $MAKE
 $MAKE distdir
+
+:
index 3d2fde5..ee46b4b 100755 (executable)
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2002, 2007  Free Software Foundation, Inc.
+# Copyright (C) 2002, 2007, 2010 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -46,7 +46,9 @@ END
 $ACLOCAL
 $AUTOCONF
 $AUTOMAKE --copy --add-missing
+
 ./configure --prefix "`pwd`/inst"
+
 $MAKE
 
 test -f subdir/liba.a
@@ -66,3 +68,5 @@ $MAKE install-strip
 
 test -f inst/lib/liba.a
 test -f inst/lib/subdir/libb.a
+
+:
index c6f9a5e..c47f32e 100755 (executable)
@@ -48,8 +48,10 @@ libtoolize
 $ACLOCAL
 $AUTOCONF
 $AUTOMAKE --copy --add-missing
+
 ./configure --prefix "`pwd`/inst"
-$MAKE V=1 >stdout
+
+$MAKE V=1 >stdout || { cat stdout; Exit 1; }
 cat stdout
 
 grep 'liba.la .*-rpath .*lib' stdout
@@ -75,3 +77,5 @@ $MAKE install-strip
 
 test -f inst/lib/liba.la
 test -f inst/lib/subdir/libb.la
+
+:
index 0b226c6..917a8a2 100755 (executable)
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2002, 2003, 2007  Free Software Foundation, Inc.
+# Copyright (C) 2002, 2003, 2007, 2010 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -63,8 +63,12 @@ END
 $ACLOCAL
 $AUTOCONF
 $AUTOMAKE --copy --add-missing
+
 ./configure --prefix "`pwd`/inst"
+
 $MAKE test-all
 $MAKE test-install
 $MAKE test-uninstall
 $MAKE test-install-strip
+
+:
index 0091415..7676c4b 100755 (executable)
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2002, 2004  Free Software Foundation, Inc.
+# Copyright (C) 2002, 2004, 2010 Free Software Foundation, Inc.
 #
 # This 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 PR 307: depcomp with depmode=dashmstdout libtool race condition
 # Report from Laurent Morichetti.
 # (Also exercises check_LTLIBRARIES.)
+#
+# == Report ==
+#  The dashmstdout depmode calls libtool in parallel to generate the
+#  dependencies (with -M flag) and to build the objfile (both have
+#  --mode=compile and -o).
+#  The process with 'libtool --mode=compile .* -M' can corrupt the objfile
+#  as none is generated by the compiler.  Since --mode=compile and -o are
+#  set libtool assumes that a objfile should be generated and will execute
+#  invalid $mv & $LN_S.
+#
+# == Fix ==
+#  Now 'depcomp' never compute dependencies in the background, as this can
+#  cause races with libtool.  Compute the dependencies after the actual
+#  compilation.
 
 required='libtoolize gcc'
 . ./defs || Exit 1
 
+set -e
+
 cat >> configure.in << 'END'
 AC_PROG_CC
 AC_PROG_LIBTOOL
@@ -34,8 +50,8 @@ librace_la_SOURCES = a.c b.c c.c d.c e.c f.c g.c h.c
 # Make sure the dependencies are updated.
 check-local:
        for i in $(librace_la_SOURCES:.c=.Plo); do \
-         echo checking ./$(DEPDIR)/$$i; \
-         grep foo.h ./$(DEPDIR)/$$i >tst || exit 1; \
+         echo "checking ./$(DEPDIR)/$$i"; \
+         grep 'foo\.h' ./$(DEPDIR)/$$i >tst || exit 1; \
          test `wc -l <tst` -eq 2 || exit 1; \
        done
 END
@@ -49,8 +65,6 @@ int $i() { return 0; }
 EOF
 done
 
-set -e
-
 libtoolize --force
 $ACLOCAL
 $AUTOCONF
@@ -61,6 +75,7 @@ $AUTOMAKE -a
 grep am_cv_CC_dependencies_compiler_type configure
 
 ./configure am_cv_CC_dependencies_compiler_type=dashmstdout
+
 $MAKE
 test -f librace.la && Exit 1
 $MAKE check
@@ -75,3 +90,5 @@ $MAKE check
 
 test -f librace.la
 test -f tst # a proof that check-local was run
+
+:
index 7a092bf..b68b5ed 100755 (executable)
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2005, 2006, 2007  Free Software Foundation, Inc.
+# Copyright (C) 2005, 2006, 2007, 2010 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -178,3 +178,5 @@ $AUTOCONF
 $AUTOMAKE
 ./configure
 $MAKE distcheck
+
+:
index f7f6344..8e296ef 100755 (executable)
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2005, 2006, 2007  Free Software Foundation, Inc.
+# Copyright (C) 2005, 2006, 2007, 2010 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -179,3 +179,5 @@ $AUTOCONF
 $AUTOMAKE
 ./configure
 $MAKE distcheck
+
+:
index fc2f5de..8682dc0 100755 (executable)
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2005, 2006, 2007  Free Software Foundation, Inc.
+# Copyright (C) 2005, 2006, 2007, 2010 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -181,3 +181,5 @@ $AUTOCONF
 $AUTOMAKE
 ./configure
 $MAKE distcheck
+
+:
index d67c17b..ab911ad 100755 (executable)
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2000, 2001, 2002  Free Software Foundation, Inc.
+# Copyright (C) 2000, 2001, 2002, 2010 Free Software Foundation, Inc.
 #
 # This 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 for PR 72
+# Empty _SOURCES results in $(LINK) undefined.
+
 required=libtool
 . ./defs || Exit 1
 
+set -e
+
 cat >> configure.in << 'END'
 AC_PROG_CC
 AC_PROG_LIBTOOL
@@ -34,7 +38,9 @@ END
 : > config.guess
 : > config.sub
 
-$ACLOCAL || Exit 1
-$AUTOMAKE || Exit 1
+$ACLOCAL
+$AUTOMAKE
+
+grep '^LINK =' Makefile.in
 
-grep '^LINK ' Makefile.in
+:
index 369849b..31e6482 100755 (executable)
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2000, 2001, 2002  Free Software Foundation, Inc.
+# Copyright (C) 2000, 2001, 2002, 2010 Free Software Foundation, Inc.
 #
 # This 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 for PR automake/87.
+# "make distcheck" fails when two source dirs exist.
 
 required=gcc
 . ./defs || Exit 1
 
+set -e
+
 subdirs="foo bar"
 
 for i in $subdirs; do
@@ -36,7 +39,7 @@ echo "SUBDIRS = $subdirs" > Makefile.am
 cat >configure.in <<EOF
 AC_INIT(`echo $subdirs | sed 's|\([a-z][a-z]*\).*|\1/\1.c|'`)
 AC_CONFIG_AUX_DIR(.)
-AM_INIT_AUTOMAKE(test_am, 1.0)
+AM_INIT_AUTOMAKE($me, 1.0)
 AC_PROG_CC
 AC_OUTPUT(Makefile `echo $subdirs | sed 's|\([a-z][a-z]*\)|\1/Makefile|g'`)
 EOF
@@ -45,15 +48,11 @@ EOF
 CFLAGS=
 export CFLAGS
 
-touch README NEWS AUTHORS ChangeLog
-
 mkdir build
 
-# We use gcc and not gcc -traditional as the latter fails on some
-# Linux boxes (Red Hat 5.1 in particular).
-$ACLOCAL \
-   && $AUTOCONF \
-   && $AUTOMAKE -a || Exit 1
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE -a
 
 # Regression test for bug where `.c.o:' is followed by blank line.
 (while read line; do
@@ -61,11 +60,15 @@ $ACLOCAL \
        read next
        if test -z "$next"; then
          Exit 1
+       else
+          : # for shells with broken 'set -e'
        fi
        break
     fi
  done) < foo/Makefile.in || Exit 1
 
-cd build \
-   && ../configure \
-   && $MAKE distcheck || Exit 1
+cd build
+../configure
+$MAKE distcheck
+
+:
index dab9734..a2e71d7 100755 (executable)
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 1999, 2001, 2002  Free Software Foundation, Inc.
+# Copyright (C) 1999, 2001, 2002, 2010 Free Software Foundation, Inc.
 #
 # This 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 for bug in PR 9.
+# "make dist" incorrect when AC_CONFIG_AUX_DIR is present.
+#
+# == Report ==
+# When AC_CONFIG_AUX_DIR is set (in my case to `support'), make dist
+# no longer automatically includes config.guess, config.sub, install-sh,
+# ltconfig, ltmain.sh, mdate-sh, missing, and mkinstalldirs.  In fact,
+# the entire `support/' directory is omitted.
 
-required=gzip
 . ./defs || Exit 1
 
-cat > configure.in << 'END'
-AC_INIT(Makefile.am)
-AC_CONFIG_AUX_DIR(support)
-AM_INIT_AUTOMAKE(pr9, 0)
-AC_OUTPUT(Makefile)
+set -e
+
+cat > configure.in << END
+AC_INIT([$me], [1.0])
+AC_CONFIG_AUX_DIR([support])
+AM_INIT_AUTOMAKE
+AC_CONFIG_FILES([Makefile])
+AC_OUTPUT
 END
 
 : > Makefile.am
 
 mkdir support
 
-$ACLOCAL || Exit 1
+$ACLOCAL
+
+$AUTOCONF
+$AUTOMAKE -a -c
+./configure
+$MAKE
+$MAKE distcheck
+
+distdir=$me-1.0
+
+gzip -d $distdir.tar.gz
 
-$AUTOCONF || Exit 1
-$AUTOMAKE -a -c || Exit 1
-./configure || Exit 1
-$MAKE || Exit 1
-$MAKE distcheck || Exit 1
+tar tf $distdir.tar | $FGREP support
 
-gunzip pr9-0.tar.gz || Exit 1
+tar xf $distdir.tar
+ls -l . $distdir # for debugging
+test -d $distdir/support
+ls -l $distdir/support # for debugging
+test -f $distdir/support/install-sh
 
-tar tf pr9-0.tar | $FGREP support
+:
index 8199bd4..8ba92ef 100755 (executable)
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 1996, 2001, 2002  Free Software Foundation, Inc.
+# Copyright (C) 1996, 2001, 2002, 2010 Free Software Foundation, Inc.
 #
 # This 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,6 +18,8 @@
 
 . ./defs || Exit 1
 
+set -e
+
 cat >> configure.in << 'END'
 AC_PROG_CC
 END
@@ -27,5 +29,7 @@ bnidir = $(prefix)/bni
 bni_PROGRAMS = zardoz
 EOF
 
-$ACLOCAL || Exit 1
+$ACLOCAL
 $AUTOMAKE
+
+:
index ac5e54f..a866f8f 100755 (executable)
@@ -1,5 +1,6 @@
 #! /bin/sh
-# Copyright (C) 1996, 2001, 2002, 2003  Free Software Foundation, Inc.
+# Copyright (C) 1996, 2001, 2002, 2003, 2010 Free Software Foundation,
+# Inc.
 #
 # This 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,4 +27,7 @@ END
 
 $ACLOCAL
 AUTOMAKE_fails
-grep 'EXTRA_PROGRAMS' stderr
+grep 'bin_PROGRAMS.*configure substitution' stderr
+grep 'EXTRA_PROGRAMS.*not defined' stderr
+
+:
index faa7aed..2fb3a60 100755 (executable)
@@ -1,5 +1,6 @@
 #! /bin/sh
-# Copyright (C) 1996, 1997, 2001, 2002, 2003  Free Software Foundation, Inc.
+# Copyright (C) 1996, 1997, 2001, 2002, 2003, 2010 Free Software
+# Foundation, Inc.
 #
 # This 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,4 +30,6 @@ END
 
 $ACLOCAL
 AUTOMAKE_fails
-grep EXTRA_PROGRAMS stderr
+grep 'EXTRA_PROGRAMS.*configure substitution' stderr
+
+:
index 578d053..afccd0c 100755 (executable)
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2004  Free Software Foundation, Inc.
+# Copyright (C) 2004, 2010 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -38,3 +38,5 @@ $AUTOCONF
 $AUTOMAKE
 ./configure
 $MAKE
+
+:
index 8881b9d..31745b7 100755 (executable)
@@ -1,5 +1,6 @@
 #! /bin/sh
-# Copyright (C) 1996, 1998, 2001, 2002  Free Software Foundation, Inc.
+# Copyright (C) 1996, 1998, 2001, 2002, 2010 Free Software Foundation,
+# Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
 
 . ./defs || Exit 1
 
+set -e
+
 cat > Makefile.am << 'END'
 bin_SCRIPTS = zardoz qbert brownie
 END
 
-$ACLOCAL || Exit 1
+$ACLOCAL
 $AUTOMAKE
+
+:
diff --git a/tests/silent-lex-gcc.test b/tests/silent-lex-gcc.test
new file mode 100755 (executable)
index 0000000..426dc50
--- /dev/null
@@ -0,0 +1,143 @@
+#!/bin/sh
+# Copyright (C) 2010 Free Software Foundation, Inc.
+#
+# This 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 Lex, forcing gcc depmode.
+# Keep this in sync with sister test `silent-lex-generic.test'.
+
+required='flex gcc'
+. ./defs || Exit 1
+
+set -e
+
+mkdir sub
+
+cat >>configure.in <<'EOF'
+AM_SILENT_RULES
+AM_PROG_CC_C_O
+AC_PROG_LEX
+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.l
+foo2_SOURCES = $(foo1_SOURCES)
+foo2_CFLAGS = $(AM_CFLAGS)
+SUBDIRS = sub
+LDADD = $(LEXLIB)
+EOF
+
+cat > sub/Makefile.am <<'EOF'
+AUTOMAKE_OPTIONS = subdir-objects
+# Need generic and non-generic rules.
+bin_PROGRAMS = bar1 bar2
+bar1_SOURCES = bar.l
+bar2_SOURCES = $(bar1_SOURCES)
+bar2_CFLAGS = $(AM_CFLAGS)
+LDADD = $(LEXLIB)
+EOF
+
+cat > foo.l <<'EOF'
+%%
+"END"   return EOF;
+.
+%%
+EOF
+cp foo.l sub/bar.l
+
+$ACLOCAL
+$AUTOMAKE --add-missing
+$AUTOCONF
+
+# Force gcc ("fast") depmode.
+# This apparently useless "for" loop is here to simplify the syncing
+# with sister test `silent-lex-gcc.test'.
+for config_args in \
+  am_cv_CC_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
+  $EGREP '(mv|ylwrap) ' stdout && Exit 1
+
+  grep 'LEX .*foo\.' stdout
+  grep 'LEX .*bar\.' stdout
+  grep ' CC .*foo\.' stdout
+  grep ' CC .*bar\.' stdout
+  grep 'CCLD .*foo1' stdout
+  grep 'CCLD .*bar1' stdout
+  grep 'CCLD .*foo2' stdout
+  grep 'CCLD .*bar2' stdout
+
+  # Cleaning and then rebuilding with the same V flag (and without
+  # removing the generated sources in between) shouldn't trigger a
+  # different set of rules.
+  $MAKE clean
+
+  $MAKE >stdout || { cat stdout; Exit 1; }
+  cat stdout
+
+  $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
+  grep ' CC .*bar\.' stdout
+  grep 'CCLD .*foo1' stdout
+  grep 'CCLD .*bar1' stdout
+  grep 'CCLD .*foo2' stdout
+  grep 'CCLD .*bar2' stdout
+
+  # Ensure a truly clean rebuild.
+  $MAKE clean
+  rm -f foo.c sub/bar.c
+
+  $MAKE V=1 >stdout || { cat stdout; Exit 1; }
+  cat stdout
+
+  grep ' -c ' stdout
+  grep ' -o ' stdout
+  grep 'ylwrap ' stdout
+
+  $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
+
+  # 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
+
+  # Ensure a truly clean reconfiguration/rebuild.
+  $MAKE clean
+  $MAKE maintainer-clean
+  rm -f foo.c sub/bar.c
+
+done
+
+:
similarity index 91%
rename from tests/silentlex.test
rename to tests/silent-lex-generic.test
index 78e0c7d..66535e8 100755 (executable)
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 # Check silent-rules mode for Lex.
+# Keep this in sync with sister test `silent-lex-gcc.test'.
 
 required='flex'
-. ./defs
+. ./defs || Exit 1
 
 set -e
 
@@ -63,11 +64,11 @@ $ACLOCAL
 $AUTOMAKE --add-missing
 $AUTOCONF
 
-# configure once for fastdep, once for non-fastdep, once for nodep
+# Force dependency tracking explicitly, so that slow dependency
+# extractors are not rejected.  Try also with dependency tracking
+# explicitly disabled.
 for config_args in \
-  '' \
-  am_cv_CC_dependencies_compiler_type=gcc \
-  --disable-dependency-tracking
+  --enable-dependency-tracking --disable-dependency-tracking
 do
   ./configure $config_args --enable-silent-rules
 
diff --git a/tests/silent-many-gcc.test b/tests/silent-many-gcc.test
new file mode 100755 (executable)
index 0000000..d770a46
--- /dev/null
@@ -0,0 +1,220 @@
+#!/bin/sh
+# Copyright (C) 2009, 2010 Free Software Foundation, Inc.
+#
+# This 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 flex bison'
+. ./defs || Exit 1
+
+set -e
+
+# 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.in <<'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)
+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)
+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'
+%%
+"END"   return EOF;
+.
+%%
+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
+
+# Force gcc ("fast") depmode.
+# This apparently useless "for" loop is here to simplify the syncing
+# with sister test `silent-many-gcc.test'.
+for config_args in \
+  am_cv_CC_dependencies_compiler_type=gcc
+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
+
+:
similarity index 86%
rename from tests/silent5.test
rename to tests/silent-many-generic.test
index e1134e8..223a97c 100755 (executable)
 # 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, languages other than C.
+# Check silent-rules mode, with 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 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.
 
 # FIXME: generic C++/Fortran compilers should suffice here
 required='g++ gfortran flex bison'
-. ./defs
+. ./defs || Exit 1
 
 set -e
 
@@ -35,6 +38,10 @@ do_and_check_silent_build ()
 
   $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
@@ -80,11 +87,11 @@ do_and_check_verbose_build ()
   grep ' -c ' stdout
   grep ' -o ' stdout
 
-  grep '(CC|CXX|FC|F77|LD) ' stdout && Exit 1
+  $EGREP '(CC|CXX|FC|F77|LD) ' stdout && Exit 1
 
   if $rebuild; then :; else
     grep 'ylwrap ' stdout
-    grep '(LEX|YACC) ' stdout && Exit 1
+    $EGREP '(LEX|YACC) ' stdout && Exit 1
   fi
 
   unset rebuild
@@ -177,11 +184,11 @@ $ACLOCAL
 $AUTOMAKE --add-missing
 $AUTOCONF
 
-# configure once for fastdep, once for non-fastdep, once for nodep
+# Force dependency tracking explicitly, so that slow dependency
+# extractors are not rejected.  Try also with dependency tracking
+# explicitly disabled.
 for config_args in \
-  '' \
-  am_cv_CC_dependencies_compiler_type=gcc \
-  --disable-dependency-tracking
+  --enable-dependency-tracking --disable-dependency-tracking
 do
 
   ./configure $config_args --enable-silent-rules
diff --git a/tests/silent-yacc-gcc.test b/tests/silent-yacc-gcc.test
new file mode 100755 (executable)
index 0000000..33ae8ae
--- /dev/null
@@ -0,0 +1,145 @@
+#!/bin/sh
+# Copyright (C) 2010 Free Software Foundation, Inc.
+#
+# This 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 Yacc, forcing gcc depmode.
+# Keep this in sync with sister test `silent-yacc-generic.test'.
+
+required='gcc bison'
+. ./defs || Exit 1
+
+set -e
+
+mkdir sub
+
+cat >>configure.in <<'EOF'
+AM_SILENT_RULES
+AM_PROG_CC_C_O
+AC_PROG_YACC
+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.y
+foo2_SOURCES = $(foo1_SOURCES)
+foo2_CFLAGS = $(AM_CPPFLAGS)
+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.y
+bar2_SOURCES = $(bar1_SOURCES)
+bar2_CFLAGS = $(AM_CPPFLAGS)
+EOF
+
+cat > foo.y <<'EOF'
+%{
+void yyerror (char *s) {}
+int yylex (void) {return 0;}
+int main(void) {return 0;}
+%}
+%token EOF
+%%
+fubar : 'f' 'o' 'o' 'b' 'a' 'r' EOF {};
+EOF
+cp foo.y sub/bar.y
+
+$ACLOCAL
+$AUTOMAKE --add-missing
+$AUTOCONF
+
+# Force gcc ("fast") depmode.
+# This apparently useless "for" loop is here to simplify the syncing
+# with sister test `silent-yacc-gcc.test'.
+for config_args in \
+  am_cv_CC_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
+  $EGREP '(mv|ylwrap) ' stdout && Exit 1
+
+  grep 'YACC .*foo\.' stdout
+  grep 'YACC .*bar\.' stdout
+  grep ' CC .*foo\.' stdout
+  grep ' CC .*bar\.' stdout
+  grep 'CCLD .*foo1' stdout
+  grep 'CCLD .*bar1' stdout
+  grep 'CCLD .*foo2' stdout
+  grep 'CCLD .*bar2' stdout
+
+  # Cleaning and then rebuilding with the same V flag (and without
+  # removing the generated sources in between) shouldn't trigger a
+  # different set of rules.
+  $MAKE clean
+
+  $MAKE >stdout || { cat stdout; Exit 1; }
+  cat stdout
+
+  $EGREP ' (-c|-o)' stdout && Exit 1
+  $EGREP '(mv|ylwrap) ' stdout && Exit 1
+
+  # Don't look for YACC, as probably yacc hasn't been re-run.
+  grep ' CC .*foo\.' stdout
+  grep ' CC .*bar\.' stdout
+  grep 'CCLD .*foo1' stdout
+  grep 'CCLD .*bar1' stdout
+  grep 'CCLD .*foo2' stdout
+  grep 'CCLD .*bar2' stdout
+
+  # Ensure a truly clean rebuild.
+  $MAKE clean
+  rm -f foo.[ch] sub/bar.[ch]
+
+  $MAKE V=1 >stdout || { cat stdout; Exit 1; }
+  cat stdout
+
+  grep ' -c ' stdout
+  grep ' -o ' stdout
+  grep 'ylwrap ' stdout
+
+  $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
+
+  # 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
+
+  # Ensure a truly clean reconfiguration/rebuild.
+  $MAKE clean
+  $MAKE maintainer-clean
+  rm -f foo.[ch] sub/bar.[ch]
+
+done
+
+:
similarity index 91%
rename from tests/silentyacc.test
rename to tests/silent-yacc-generic.test
index ac5f061..b7489da 100755 (executable)
 # 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='bison'
-. ./defs
+. ./defs || Exit 1
 
 set -e
 
@@ -65,11 +66,11 @@ $ACLOCAL
 $AUTOMAKE --add-missing
 $AUTOCONF
 
-# configure once for fastdep, once for non-fastdep, once for nodep
+# Force dependency tracking explicitly, so that slow dependency
+# extractors are not rejected.  Try also with dependency tracking
+# explicitly disabled.
 for config_args in \
-  '' \
-  am_cv_CC_dependencies_compiler_type=gcc \
-  --disable-dependency-tracking
+  --enable-dependency-tracking --disable-dependency-tracking
 do
   ./configure $config_args --enable-silent-rules
 
index c91115c..97d881e 100755 (executable)
@@ -18,7 +18,7 @@
 
 # Please keep this file in sync with silent2.test.
 
-. ./defs
+. ./defs || Exit 1
 
 set -e
 
index da22718..aed8546 100755 (executable)
@@ -20,7 +20,7 @@
 # Please keep this file in sync with silent.test.
 
 required=gcc
-. ./defs
+. ./defs || Exit 1
 
 set -e
 
index d0a0131..17f1959 100755 (executable)
@@ -19,7 +19,7 @@
 # Please keep this file in sync with silent4.test and silent9.test.
 
 required=libtoolize
-. ./defs
+. ./defs || Exit 1
 
 set -e
 
@@ -85,6 +85,4 @@ 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
-
 :
index c6c1298..9c343c0 100755 (executable)
@@ -20,7 +20,7 @@
 # Please keep this file in sync with silent3.test and silent9.test.
 
 required="libtoolize gcc"
-. ./defs
+. ./defs || Exit 1
 
 set -e
 
@@ -86,6 +86,4 @@ 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
-
 :
index 2afe6bc..acd9cea 100755 (executable)
@@ -16,7 +16,7 @@
 
 # Check user extensibility of silent-rules mode.
 
-. ./defs
+. ./defs || Exit 1
 
 set -e
 
index cd8e1b5..5ae8ac0 100755 (executable)
@@ -16,7 +16,7 @@
 
 # Check user extensibility of silent-rules mode.
 
-. ./defs
+. ./defs || Exit 1
 
 set -e
 
index 11375f8..f0abb29 100755 (executable)
@@ -19,7 +19,7 @@
 # Please keep this file in sync with silent3.test and silent4.test.
 
 required="libtoolize"
-. ./defs
+. ./defs || Exit 1
 
 set -e
 
@@ -85,6 +85,4 @@ 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
-
 :
index aa64d8f..40fc92e 100755 (executable)
@@ -17,7 +17,7 @@
 # Check silent-rules mode for C++.
 
 required='g++' # FIXME: any decent C++ compiler should be OK
-. ./defs
+. ./defs || Exit 1
 
 set -e
 
index 39495d4..cfdb186 100755 (executable)
@@ -18,7 +18,7 @@
 # Keep this ins sync with the sister test silentf90.test.
 
 required='gfortran' # FIXME: any working Fortran compiler should be OK!
-. ./defs
+. ./defs || Exit 1
 
 set -e
 
@@ -63,6 +63,10 @@ $AUTOCONF
 ./configure --enable-silent-rules
 $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
 grep 'mv ' stdout && Exit 1
@@ -87,5 +91,4 @@ grep ' -o ' stdout
 
 $EGREP '(F77|FC|LD) ' stdout && Exit 1
 
-$MAKE clean
-$MAKE maintainer-clean
+:
index 9330bdd..4fe1c3f 100755 (executable)
@@ -18,7 +18,7 @@
 # Keep this ins sync with the sister test silentf77.test.
 
 required='gfortran' # FIXME: any working Fortran compiler should be OK!
-. ./defs
+. ./defs || Exit 1
 
 set -e
 
@@ -63,6 +63,10 @@ $AUTOCONF
 ./configure --enable-silent-rules
 $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
 grep 'mv ' stdout && Exit 1
@@ -87,5 +91,4 @@ grep ' -o ' stdout
 
 $EGREP '(F77|FC|LD) ' stdout && Exit 1
 
-$MAKE clean
-$MAKE maintainer-clean
+:
diff --git a/tests/specflg-dummy.test b/tests/specflg-dummy.test
new file mode 100755 (executable)
index 0000000..614d6c2
--- /dev/null
@@ -0,0 +1,248 @@
+#! /bin/sh
+# Copyright (C) 2011 Free Software Foundation, Inc.
+#
+# This 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 even "dummy" per-target flags triggers the use of renamed
+# objects.  I.e., a definition like `foo_CFLAGS = $(AM_CFLAGS)' should
+# always cause Automake to trigger the semantics for per-target CFLAGS,
+# even if AM_CFLAGS is undefined. Similarly for other *FLAGS variables
+# (CXXFLAGS, YFLAGS, LDFLAGS, ...)
+
+. ./defs || Exit 1
+
+set -e
+
+# Disable shell globbing if possible.
+(set +f) >/dev/null 2>&1 && set +f
+
+oIFS=$IFS
+nl='
+'
+
+matches=
+add_match ()
+{
+  matches="$matches$nl$1"
+}
+
+do_check ()
+{
+  IFS=$nl
+  for string in $matches; do
+    IFS=$oIFS
+    $FGREP "$string" Makefile.in
+  done
+  IFS=$oIFS
+}
+
+# Fake libtool presence, so that we won't have to require it.
+cat > acinclude.m4 <<END
+AC_DEFUN([AC_PROG_LIBTOOL], [AC_SUBST([LIBTOOL], [dummy])])
+END
+: > ltmain.sh
+
+cat >> configure.in << 'END'
+AC_PROG_CC
+AC_PROG_CXX
+AC_PROG_YACC
+AC_PROG_LEX
+AC_PROG_F77
+AC_PROG_FC
+AM_PROG_GCJ
+AC_PROG_RANLIB
+AC_PROG_LIBTOOL
+AM_PROG_UPC
+AC_PROG_OBJC
+AM_PROG_CC_C_O
+END
+
+cat > Makefile.am <<'END'
+bin_PROGRAMS =
+lib_LIBRARIES =
+lib_LTLIBRARIES =
+END
+
+$ACLOCAL
+
+cat >> Makefile.am <<'END'
+bin_PROGRAMS += prog1
+prog1_SOURCES = source1.c
+prog1_CFLAGS = $(AM_CFLAGS)
+END
+
+add_match 'prog1-source1.$(OBJEXT)'
+
+cat >> Makefile.am <<'END'
+bin_PROGRAMS += prog2
+prog2_SOURCES = source2.c
+prog2_CPPFLAGS = $(AM_CPPFLAGS)
+END
+
+add_match 'prog2-source2.$(OBJEXT)'
+
+cat >> Makefile.am <<'END'
+bin_PROGRAMS += prog3
+prog3_SOURCES = source3.cxx
+prog3_CXXFLAGS = $(AM_CXXFLAGS)
+END
+
+add_match 'prog3-source3.$(OBJEXT)'
+
+cat >> Makefile.am <<'END'
+bin_PROGRAMS += prog4
+prog4_SOURCES = source4.c++
+prog4_CPPFLAGS = $(AM_CPPFLAGS)
+END
+
+add_match 'prog4-source4.$(OBJEXT)'
+
+cat >> Makefile.am <<'END'
+bin_PROGRAMS += prog5
+prog5_SOURCES = source5.f
+prog5_FFLAGS = $(AM_FFLAGS)
+END
+
+add_match 'prog5-source5.$(OBJEXT)'
+
+cat >> Makefile.am <<'END'
+bin_PROGRAMS += prog6
+prog6_SOURCES = source6.f90
+prog6_FCFLAGS = $(AM_FCFLAGS)
+END
+
+add_match 'prog6-source6.$(OBJEXT)'
+
+cat >> Makefile.am <<'END'
+bin_PROGRAMS += prog7
+prog7_SOURCES = source7.r
+prog7_RFLAGS = $(AM_RFLAGS)
+END
+
+add_match 'prog7-source7.$(OBJEXT)'
+
+cat >> Makefile.am <<'END'
+bin_PROGRAMS += prog8
+prog8_SOURCES = source8.java
+prog8_GCJFLAGS = $(AM_GCJFLAGS)
+END
+
+add_match 'prog8-source8.$(OBJEXT)'
+
+cat >> Makefile.am <<'END'
+bin_PROGRAMS += prog9
+prog9_SOURCES = source9.upc
+prog9_UPCFLAGS = $(AM_UPCFLAGS)
+END
+
+add_match 'prog9-source9.$(OBJEXT)'
+
+cat >> Makefile.am <<'END'
+bin_PROGRAMS += prog10
+prog10_SOURCES = source10.m
+prog10_OBJCFLAGS = $(AM_OBJCFLAGS)
+END
+
+add_match 'prog10-source10.$(OBJEXT)'
+
+cat >> Makefile.am <<'END'
+bin_PROGRAMS += linkprog
+linkprog_SOURCES = linkprog.c
+linkprog_LDFLAGS = $(AM_LDFLAGS)
+END
+
+add_match 'linkprog_LINK ='
+
+cat >> Makefile.am <<'END'
+lib_LIBRARIES += libstatic.a
+libstatic_a_SOURCES = static123.c
+libstatic_a_CFLAGS = $(AM_CFLAGS)
+END
+
+add_match 'libstatic_a-static123.$(OBJEXT)'
+
+cat >> Makefile.am <<'END'
+lib_LTLIBRARIES += libshared1.la
+libshared1_la_SOURCES = shared1.c
+libshared1_la_LIBTOOLFLAGS = $(AM_LIBTOOLFLAGS)
+END
+
+add_match 'libshared1_la-shared1.lo'
+
+cat >> Makefile.am <<'END'
+lib_LTLIBRARIES += libshared2.la
+libshared2_la_SOURCES = shared2.cc
+libshared2_la_CXXFLAGS = $(AM_CXXFLAGS)
+END
+
+add_match 'libshared2_la-shared2.lo'
+
+cat >> Makefile.am <<'END'
+bin_PROGRAMS += parse1
+parse1_SOURCES = parse.y
+parse1_YFLAGS = $(AM_YFLAGS)
+END
+
+add_match 'parse1-parse.c'
+
+cat >> Makefile.am <<'END'
+bin_PROGRAMS += parse2
+parse2_SOURCES = parse.ypp
+parse2_YFLAGS = $(AM_YFLAGS)
+END
+
+add_match 'parse2-parse.cpp'
+
+cat >> Makefile.am <<'END'
+bin_PROGRAMS += lexer1
+lexer1_SOURCES = lex.l
+lexer1_LFLAGS = $(AM_YFLAGS)
+END
+
+add_match 'lexer1-lex.c'
+
+cat >> Makefile.am <<'END'
+bin_PROGRAMS += lexer2
+lexer2_SOURCES = lexer.ll
+lexer2_LFLAGS = $(AM_YFLAGS)
+END
+
+add_match 'lexer2-lexer.cc'
+
+# For debugging.
+cat Makefile.am
+
+$AUTOMAKE -a
+do_check
+
+sed '
+  s|^\(.*\)_SOURCES *= *|sub_\1_SOURCES = srcsub/|
+  s|^\(.*\)PROGRAMS *+= *|\1PROGRAMS += sub/|
+  s|^\(.*\)LIBRARIES *+= *|\1LIBRARIES += sub/|
+  s|^\(.*\)FLAGS *=|sub_\1FLAGS =|
+' Makefile.am > t
+
+cat - t > Makefile.am <<'END'
+AUTOMAKE_OPTIONS = subdir-objects
+END
+
+rm -f t
+
+# For debugging.
+cat Makefile.am
+
+$AUTOMAKE
+do_check
+
+:
index 53793a1..60006a5 100755 (executable)
@@ -1,5 +1,6 @@
 #! /bin/sh
-# Copyright (C) 1999, 2001, 2002, 2004  Free Software Foundation, Inc.
+# Copyright (C) 1999, 2001, 2002, 2004, 2010 Free Software Foundation,
+# Inc.
 #
 # This 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 +28,6 @@ AC_OUTPUT(Makefile)
 END
 
 cat > Makefile.am << 'END'
-AUTOMAKE_OPTIONS = foreign
 bin_PROGRAMS = foo
 foo_SOURCES = foo.c
 foo_CFLAGS = -DFOO
index c4993c6..5f1a87b 100755 (executable)
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2003  Free Software Foundation, Inc.
+# Copyright (C) 2003, 2011 Free Software Foundation, Inc.
 #
 # This 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 @@
 
 # Check whether double colon rules work.  The Unix V7 make manual
 # mentions double-colon rules, but POSIX does not.  They seem to be
-# supported by all Make implementation as we can tell. This test case
-# is a spy: we want to detect if there exist implementations where
+# supported by all Make implementation as far as we can tell. This test
+# case is a spy: we want to detect if there exist implementations where
 # these do not work.  We might use these rules to simplify the rebuild
 # rules (instead of the $? hack).
 
@@ -87,8 +87,22 @@ $sleep
 touch b
 $MAKE
 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
+
+# Unfortunately, the following is not portable to FreeBSD/NetBSD/OpenBSD
+# make, see explanation above.
+
+#: > a
+#$sleep
+#touch b c
+#$MAKE
+#grep rule1 a
+#grep rule2 a
+
+:
diff --git a/tests/strip2.test b/tests/strip2.test
new file mode 100755 (executable)
index 0000000..5786ded
--- /dev/null
@@ -0,0 +1,54 @@
+#! /bin/sh
+# Copyright (C) 2010 Free Software Foundation, Inc.
+#
+# This 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 install-strip works when STRIP consists of more than one word.
+# This test needs GNU binutils strip.  See sister test strip3.
+
+required=strip
+. ./defs || Exit 1
+
+set -e
+
+cat >> configure.in << 'END'
+AC_PROG_CC
+AC_PROG_RANLIB
+AC_OUTPUT
+END
+
+cat > Makefile.am << 'END'
+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
+
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE -a
+
+prefix=`pwd`/inst
+./configure --prefix="$prefix" STRIP='strip --verbose'
+$MAKE
+$MAKE install-strip
+
+:
diff --git a/tests/strip3.test b/tests/strip3.test
new file mode 100755 (executable)
index 0000000..b159673
--- /dev/null
@@ -0,0 +1,54 @@
+#! /bin/sh
+# Copyright (C) 2010 Free Software Foundation, Inc.
+#
+# This 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 install-strip works when STRIP consists of more than one word.
+# This test needs GNU binutils strip.  Libtool variant.
+
+required='libtoolize strip'
+. ./defs || Exit 1
+
+set -e
+
+cat >> configure.in << 'END'
+AC_PROG_CC
+AC_PROG_LIBTOOL
+AC_OUTPUT
+END
+
+cat > Makefile.am << 'END'
+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
+
+libtoolize
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE -a
+
+prefix=`pwd`/inst
+./configure --prefix="$prefix" STRIP='strip --verbose'
+$MAKE
+$MAKE install-strip
+
+:
index 85db059..edad4ca 100755 (executable)
@@ -1,5 +1,6 @@
 #! /bin/sh
-# Copyright (C) 1996, 1998, 2000, 2001, 2002  Free Software Foundation, Inc.
+# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2010 Free Software
+# Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
 
 . ./defs || Exit 1
 
+set -e
+
 mkdir zot
 
-cat > configure.in << 'END'
-AC_INIT
-AM_INIT_AUTOMAKE(nonesuch, nonesuch)
-AC_OUTPUT(Makefile zot/Makefile)
+cat >> configure.in << 'END'
+AC_CONFIG_FILES([zot/Makefile])
+AC_OUTPUT
 END
 
 cat > Makefile.am << 'END'
@@ -35,5 +37,7 @@ cat > zot/Makefile.am << 'END'
 pkgdata_DATA =
 END
 
-$ACLOCAL || Exit 1
+$ACLOCAL
 $AUTOMAKE
+
+:
index c71216b..eabd1a9 100755 (executable)
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2009  Free Software Foundation, Inc.
+# Copyright (C) 2009, 2010 Free Software Foundation, Inc.
 #
 # This 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,4 +36,4 @@ $AUTOMAKE
 ./configure
 env fail=1 $MAKE all clean
 
-Exit 0
+:
index aa83436..9412054 100755 (executable)
@@ -1,5 +1,6 @@
 #! /bin/sh
-# Copyright (C) 1996, 1998, 2000, 2001, 2002  Free Software Foundation, Inc.
+# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2010 Free Software
+# Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
 
 . ./defs || Exit 1
 
+set -e
+
 mkdir one
 mkdir one/two
 
-cat > configure.in << 'END'
-AC_INIT
-AM_INIT_AUTOMAKE(nonesuch, nonesuch)
-AC_OUTPUT(Makefile one/Makefile one/two/Makefile)
+cat >> configure.in << 'END'
+AC_CONFIG_FILES([one/Makefile one/two/Makefile])
+AC_OUTPUT
 END
 
 # Files required because we are using `--gnu'.
@@ -47,5 +49,7 @@ cat > one/two/Makefile.am << 'END'
 pkgdata_DATA =
 END
 
-$ACLOCAL || Exit 1
+$ACLOCAL
 $AUTOMAKE --gnu
+
+:
index aa02be0..3da2cc8 100755 (executable)
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 1999, 2001, 2002  Free Software Foundation, Inc.
+# Copyright (C) 1999, 2001, 2002, 2010 Free Software Foundation, Inc.
 #
 # This 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,6 +18,8 @@
 
 . ./defs || Exit 1
 
+set -e
+
 cat > Makefile.am << 'END'
 bin_PROGRAMS = zardoz widdershins
 zardoz_SOURCES = y.c x/z.c
@@ -28,12 +30,9 @@ cat >> configure.in << 'END'
 AC_PROG_CC
 END
 
-mkdir x
-
-: > y.c
-: > x/z.c
-
-$ACLOCAL || Exit 1
-$AUTOMAKE || Exit 1
+$ACLOCAL
+$AUTOMAKE
 
 grep '^z\.o: x/z\.c$' Makefile.in
+
+:
index 2f85213..7ea10f8 100755 (executable)
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2000, 2001, 2002  Free Software Foundation, Inc.
+# Copyright (C) 2000, 2001, 2002, 2010 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
 
 . ./defs || Exit 1
 
+set -e
+
 mkdir lib src
 
-cat > configure.in << 'END'
-AC_INIT
-AM_INIT_AUTOMAKE(nonesuch, nonesuch)
+cat >> configure.in << 'END'
 AC_PROG_RANLIB
 AC_PROG_CC
-AC_OUTPUT(Makefile lib/Makefile src/Makefile)
+AC_CONFIG_FILES([lib/Makefile src/Makefile])
+AC_OUTPUT
 END
 
 # Files required because we are using `--gnu'.
@@ -55,8 +56,8 @@ cat > src/Makefile.am << 'END'
 pkgdata_DATA =
 END
 
-$ACLOCAL || Exit 1
-$AUTOMAKE --gnu || Exit 1
+$ACLOCAL
+$AUTOMAKE --gnu
 
 # Make sure that depcomp is *not* included in the definition
 # of DIST_COMMON in lib/Makefile.in.  If you change this test
@@ -65,4 +66,4 @@ $AUTOMAKE --gnu || Exit 1
 # continued line.
 grep '^DIST_COMMON.*depcomp' lib/Makefile.in && Exit 1
 
-Exit 0
+:
index 2f0113b..5633ac6 100755 (executable)
@@ -1,6 +1,6 @@
 #! /bin/sh
-# Copyright (C) 2001, 2002, 2003, 2004, 2009  Free Software Foundation,
-# Inc.
+# Copyright (C) 2001, 2002, 2003, 2004, 2009, 2010 Free Software
+# Foundation, Inc.
 #
 # This 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 assumes that the `make' utility is able to start
 # over and reload Makefiles which have been remade (a non-POSIX feature).
+# See also the related test subdir8.test.
 required='GNUmake gcc'
 . ./defs || Exit 1
 
 set -e
 
-cat > configure.in << 'END'
-AC_INIT(maude, 1.0)
-AM_INIT_AUTOMAKE
+cat >> configure.in << 'END'
+AC_PROG_CC
 AM_PROG_CC_C_O
-AC_CONFIG_FILES(Makefile)
 AC_OUTPUT
 END
 
@@ -55,26 +54,31 @@ $AUTOMAKE --include-deps --copy --add-missing
 ./configure
 $MAKE
 
+# Now add new directories.
+#
 # We shouldn't need to $sleep here: configure ensures that files
 # generated by it are newer than configure.  Thus, even if
 # Makefile.in is newer than configure but the updated Makefile.am
 # below has the same timestamp as Makefile.in, the latter should
 # be rebuilt due to its dependency on configure.in.
 
-# Now add a new directory.
-cat > configure.in << 'END'
-AC_INIT(maude, 1.0)
-AM_INIT_AUTOMAKE
-AC_PROG_CC
-AM_PROG_CC_C_O
-AC_CONFIG_FILES(Makefile maude/Makefile)
-m4_include([confile.m4])
-AC_OUTPUT
-END
+# First we add a new directory by modifying configure.in directly.
+# We update configure.in *before* updating sub/Makefile.am; subdir8.test
+# does it in the other way: it updates confiles.m4 (which is m4_included
+# by configure.in there) after Makefile.am.
+
+sed <configure.in >configure.tmp -e '/^AC_OUTPUT$/i\
+AC_CONFIG_FILES([maude/Makefile])\
+m4_include([confile.m4])\
+' # last newline required by older OpenBSD sed
+mv -f configure.tmp configure.in
+
+cat configure.in # might be useful for debugging
 
 : > confile.m4
 
 mkdir maude
+
 cat > maude/Makefile.am << 'END'
 include_HEADERS = foo.h
 END
@@ -87,15 +91,21 @@ echo 'SUBDIRS = maude' >> Makefile.am
 $MAKE
 test -f maude/Makefile
 
-# Add yet another directory
+# Then we add a new directory by modifying a file included (through
+# `m4_include') by configure.in.
 mkdir maude2
-echo 'AC_CONFIG_FILES([maude2/Makefile])AC_SUBST([GREPME])' > confile.m4
+cat >> confile.m4 << 'END'
+AC_CONFIG_FILES([maude2/Makefile])
+AC_SUBST([GREPME])
+END
 : > maude2/Makefile.am
 echo 'SUBDIRS += maude2' >> Makefile.am
 
 # We want a simple rebuild to create maude2/Makefile and update
 # all other Makefiles automatically.
 $MAKE
-grep GREPME Makefile
-grep GREPME maude/Makefile
-grep GREPME maude2/Makefile
+grep '^GREPME =' Makefile
+grep '^GREPME =' maude/Makefile
+grep '^GREPME =' maude2/Makefile
+
+:
index 81221ff..f3a2107 100755 (executable)
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2002  Free Software Foundation, Inc.
+# Copyright (C) 2002, 2010 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -38,4 +38,5 @@ $MAKE clean
 test -f sub/stamp-h1
 $MAKE distclean
 test -f sub/stamp-h1 && Exit 1
+
 :
index e72f489..b50b250 100755 (executable)
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2002, 2003, 2004  Free Software Foundation, Inc.
+# Copyright (C) 2002, 2003, 2004, 2010 Free Software Foundation, Inc.
 #
 # This 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 @@ set -e
 mkdir obj
 
 cat >>configure.in << 'END'
-AC_CONFIG_FILES(obj/Makefile)
+AC_CONFIG_FILES([obj/Makefile])
 AC_OUTPUT
 END
 
@@ -35,11 +35,13 @@ $ACLOCAL
 AUTOMAKE_fails
 grep 'Makefile.am:1:.*obj.*BSD' stderr
 
-cat >Makefile.am <<'EOF'
+cat >Makefile.am <<'END'
 SUBDIRS = @STH@
 FOO = obj
 DIST_SUBDIRS = $(FOO)
-EOF
+END
 
 AUTOMAKE_fails
 grep 'Makefile.am:2:.*obj.*BSD' stderr
+
+:
index bc3043e..093fac8 100755 (executable)
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2003, 2004, 2009  Free Software Foundation, Inc.
+# Copyright (C) 2003, 2004, 2009, 2010 Free Software Foundation, Inc.
 #
 # This 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 assumes that the `make' utility is able to start
 # over and reload Makefiles which have been remade (a non-POSIX feature).
+# See also the related test subdir5.test.
 required='GNUmake gcc'
 . ./defs || Exit 1
 
 set -e
 
-echo 'AC_CONFIG_FILES([sub/Makefile])' >confiles.m4
-
 cat >> configure.in << 'END'
 AC_PROG_CC
 AM_PROG_CC_C_O
@@ -36,6 +35,8 @@ MORE_DEFS
 AC_OUTPUT
 END
 
+echo 'AC_CONFIG_FILES([sub/Makefile])' > confiles.m4
+
 cat > Makefile.am << 'END'
 SUBDIRS = sub
 ACLOCAL_AMFLAGS = -I m4
@@ -66,8 +67,18 @@ $AUTOMAKE --copy --add-missing
 ./configure
 $MAKE
 
-# Now add a new directory.
-# See subdir5.test for why we shouldn't need to $sleep here.
+# Now add new directories.
+#
+# We shouldn't need to $sleep here: configure ensures that files
+# generated by it are newer than configure.  Thus, even if
+# Makefile.in is newer than configure but the updated Makefile.am
+# below has the same timestamp as Makefile.in, the latter should
+# be rebuilt due to its dependency on configure.in.
+
+# The first step users typically do when adding a new subdir is
+# editing configure.in.  That is already tested by subdir5.test,
+# though, so here we try to just edit a file that is included by
+# configure.in, without touching configure.in itself.
 
 mkdir sub/maude
 cat > sub/maude/Makefile.am << 'END'
@@ -81,9 +92,8 @@ echo 'SUBDIRS = maude' >> sub/Makefile.am
 mkdir maude
 : > maude/Makefile.am
 
-# Update confile.m4 *after* updating sub/Makefile.am.
-# (subdir5.test do it in the other way: it updates configure.in
-# before Makefile.am)
+# Update confiles.m4 *after* updating sub/Makefile.am; subdir5.test do
+# it in the other way: it updates configure.in before Makefile.am.
 echo 'AC_CONFIG_FILES([maude/Makefile sub/maude/Makefile])' >> confiles.m4
 
 # We want a simple rebuild from sub/ to create sub/maude/Makefile
@@ -98,7 +108,10 @@ test -f sub/maude/Makefile
 # the top-level directory.
 echo 'AC_DEFUN([MORE_DEFS], [AC_SUBST([GREPME])])' > m4/moredefs.m4
 $MAKE
-grep GREPME Makefile
-grep GREPME maude/Makefile
-grep GREPME sub/Makefile
-grep GREPME sub/maude/Makefile
+
+grep '^GREPME =' Makefile
+grep '^GREPME =' maude/Makefile
+grep '^GREPME =' sub/Makefile
+grep '^GREPME =' sub/maude/Makefile
+
+:
index 4346326..c73ca18 100755 (executable)
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2004  Free Software Foundation, Inc.
+# Copyright (C) 2004, 2010 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -43,13 +43,17 @@ cat >src/subdir2/Makefile.am <<'EOF'
 EXTRA_DIST = foo
 EOF
 
+distdir=$me-1.0
+
 $ACLOCAL
 $AUTOCONF
 $AUTOMAKE --copy --add-missing
 ./configure
 $MAKE distdir
-test -f subdir9-1.0/src/subdir/foo
-test -f subdir9-1.0/src/subdir2/foo
+test -f $distdir/src/subdir/foo
+test -f $distdir/src/subdir2/foo
 $MAKE clean
 $MAKE distclean
 test ! -f src/subdir2/Makefile
+
+:
index 8fe506a..a84f28e 100755 (executable)
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2001, 2002  Free Software Foundation, Inc.
+# Copyright (C) 2001, 2002, 2010 Free Software Foundation, Inc.
 #
 # This 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,12 +24,11 @@ set -e
 
 mkdir lib
 
-cat > configure.in << 'END'
-AC_INIT
-AM_INIT_AUTOMAKE(nonesuch, nonesuch)
+cat >> configure.in << 'END'
+AC_CONFIG_FILES([lib/Makefile])
 AC_PROG_RANLIB
 AC_PROG_CC
-AC_OUTPUT(Makefile lib/Makefile)
+AC_OUTPUT
 END
 
 # Files required because we are using `--gnu'.
@@ -60,9 +59,7 @@ END
 
 
 $ACLOCAL
-
 $AUTOCONF
-
 $AUTOMAKE --include-deps --copy --force-missing --add-missing --gnu
 
 ./configure
@@ -71,4 +68,4 @@ $AUTOMAKE --include-deps --copy --force-missing --add-missing --gnu
 # $MAKE -C lib foo.h
 $MAKE
 
-Exit 0
+:
index 64edd0e..39dc1b9 100755 (executable)
@@ -39,10 +39,10 @@ cat stderr >&2
 grep 'install.*compile' stderr
 test -f compile
 
-$FGREP 'generic/a.$(OBJEXT)' Makefile.in
+grep '^generic/a\.\$(OBJEXT):' Makefile.in
 grep '[^/]a\.\$(OBJEXT)' Makefile.in && Exit 1
 
 # Opportunistically test for a different bug.
-grep '^generic/b.\$(OBJEXT):.*dirstamp' Makefile.in
+grep '^generic/b\.\$(OBJEXT):.*dirstamp' Makefile.in
 
 :
index c9c129d..dbddf29 100755 (executable)
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2006  Free Software Foundation, Inc.
+# Copyright (C) 2006, 2010 Free Software Foundation, Inc.
 #
 # This 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,9 +21,9 @@ required=gcc  # avoid compiler errors.
 
 set -e
 
-cat > configure.in << 'END'
-AC_INIT(x, 0, x)
-AM_INIT_AUTOMAKE([foreign subdir-objects])
+cat > configure.in << END
+AC_INIT([$me], [1.0])
+AM_INIT_AUTOMAKE([subdir-objects])
 
 AM_PROG_AS
 AC_PROG_RANLIB
@@ -45,8 +45,6 @@ mkdir src
 : >src/c.s
 : >d.s
 
-set -e
-
 $ACLOCAL
 $AUTOCONF
 $AUTOMAKE -a
@@ -54,3 +52,5 @@ $AUTOMAKE -a
 ./configure
 $MAKE
 $MAKE distcheck
+
+:
diff --git a/tests/subobj11a.test b/tests/subobj11a.test
new file mode 100755 (executable)
index 0000000..3bf3012
--- /dev/null
@@ -0,0 +1,82 @@
+#! /bin/sh
+# Copyright (C) 2010 Free Software Foundation, Inc.
+#
+# This 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 that automake works around a bug of Solaris Make. The bug is the
+# following.  If we have a Makefile containg a file inclusion like this:
+#   include .//foo.mk
+# Solaris make fails with a message like:
+#   make: ... can't find `/foo.mk': No such file or directory
+#   make: fatal error ... read of include file `/foo.mk' failed
+# (even if the file `foo.mk' exists). The error disappear by collapsing
+# the repeated slash `/' characters into a single one.
+#
+# See also sister "grepping" test `subobj11b.test', and related test
+# `subobj11c.test'.
+
+. ./defs || Exit 1
+
+set -e
+
+cat >> configure.in << 'END'
+AC_PROG_CC
+AM_PROG_CC_C_O
+AC_OUTPUT
+END
+
+cat > Makefile.am << 'END'
+AUTOMAKE_OPTIONS = subdir-objects
+bin_PROGRAMS = foo
+## the `.//' is meant
+foo_SOURCES = .//src/foo.c
+END
+
+mkdir src
+
+cat > src/foo.c << 'END'
+int main(void)
+{
+  return 0;
+}
+END
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE -a
+
+./configure --enable-dependency-tracking
+
+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
+fi
+
+ls -l "$depdir"
+test -f "$depdir"/foo.Po
+
+echo 'quux:; echo "z@rd@z" >$@' >> "$depdir"/foo.Po
+
+$MAKE quux
+$FGREP "z@rd@z" quux
+
+$MAKE
+
+DISTCHECK_CONFIGURE_FLAGS='--enable-dependency-tracking' $MAKE distcheck
+DISTCHECK_CONFIGURE_FLAGS='--disable-dependency-tracking' $MAKE distcheck
+
+:
diff --git a/tests/subobj11b.test b/tests/subobj11b.test
new file mode 100755 (executable)
index 0000000..1db5fab
--- /dev/null
@@ -0,0 +1,87 @@
+#! /bin/sh
+# Copyright (C) 2010 Free Software Foundation, Inc.
+#
+# This 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 that automake works around a bug of Solaris Make. The bug is the
+# following.  If we have a Makefile containg a file inclusion like this:
+#   include .//foo.mk
+# Solaris make fails with a message like:
+#   make: ... can't find `/foo.mk': No such file or directory
+#   make: fatal error ... read of include file `/foo.mk' failed
+# (even if the file `foo.mk' exists). The error disappear by collapsing
+# the repeated slash `/' characters into a single one.
+#
+# See also "semantic" sister test `subobj11a.test', and related test
+# `subobj11c.test'.
+
+. ./defs || Exit 1
+
+set -e
+
+cat >> configure.in << 'END'
+AC_PROG_CC
+AM_PROG_CC_C_O
+END
+
+cat > Makefile.am << 'END'
+AUTOMAKE_OPTIONS = subdir-objects
+bin_PROGRAMS = foo
+## The `zardoz' sources should activate a code paths in Automake that
+## cannot be sensibly tested by sister test `subobj11a.test'.  The other
+## sources provide some sort of stress testing.
+foo_SOURCES = \
+  //server/zardoz0.c \
+  //server//zardoz1.c \
+  //server/path/to/zardoz2.c \
+  //server/another//path///to////zardoz3.c \
+  /foobar0.c \
+  ///foobar1.c \
+  ////foobar2.c \
+  /sub///foobar3.c \
+  ///sub/foobar4.c \
+  .//foobar5.c \
+  .//sub/foobar6.c \
+  ./sub//foobar7.c \
+  .//sub//foobar8.c \
+  sub/sub//sub///sub////foobar9.c
+END
+
+$ACLOCAL
+$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
+
+# These checks depend on automake internals, but presently this is
+# the only way to test the code path we are interested in.
+# Please update these checks when (and if) the relevant automake
+# 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=''; b=$x;;
+  esac
+  # Be a little lax in the regexp, to account for automake conditionals,
+  # quoting, and similar stuff.
+  grep "^[^/]*am__include[^/]*//server/$d\\\$(DEPDIR)/$b\\.[^/]*$" Makefile.in
+done
+
+# Sanity checks.
+for i in 0 1 2 3 4 5 6 7 8 9; do
+  grep "am__include.*/foobar$i\\." Makefile.in
+done
+
+:
diff --git a/tests/subobj11c.test b/tests/subobj11c.test
new file mode 100755 (executable)
index 0000000..9262d15
--- /dev/null
@@ -0,0 +1,53 @@
+#! /bin/sh
+# Copyright (C) 2010 Free Software Foundation, Inc.
+#
+# This 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/>.
+
+# 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'
+
+. ./defs || Exit 1
+
+set -e
+
+cat >> configure.in << 'END'
+AC_PROG_CC
+AM_PROG_CC_C_O
+END
+
+cat > Makefile.am << 'END'
+AUTOMAKE_OPTIONS = subdir-objects
+bin_PROGRAMS = foo
+foo_SOURCES = //zardoz.c
+END
+
+$ACLOCAL
+$AUTOMAKE -a
+
+#
+# This check depends on automake internals, but presently this is
+# the only way to test the code path we are interested in.
+# Please update these checks when (and if) the relevant automake
+# internals are changed.
+#
+# Be a little lax in the regexp, to account for automake conditionals,
+# quoting, and similar stuff.
+#
+# FIXME: Are we sure this is the most sensible output in our situation?
+#
+grep '^[^/]*am__include[^/]*//\$(DEPDIR)/zardoz\.[^/]*$' Makefile.in
+
+:
index 1282f80..87a4671 100755 (executable)
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 1999, 2001, 2002  Free Software Foundation, Inc.
+# Copyright (C) 1999, 2001, 2002, 2010 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -35,4 +35,6 @@ $AUTOMAKE
 
 $FGREP 'generic/a.$(OBJEXT)' Makefile.in
 grep '[^/]a\.\$(OBJEXT)' Makefile.in && Exit 1
-$FGREP -e '-c -o' Makefile.in
+grep '.*-c -o' Makefile.in
+
+:
index a4ba765..4fe685c 100755 (executable)
@@ -1,6 +1,6 @@
 #! /bin/sh
-# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2006  Free Software
-# Foundation, Inc.
+# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2006, 2010 Free
+# Software Foundation, Inc.
 #
 # This 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,16 +22,17 @@ required=gcc
 
 set -e
 
-cat > configure.in << 'END'
-AC_INIT(sub/hello.c)
+cat > configure.in << END
+AC_INIT([$me], [1.0])
 dnl Prevent automake from looking in .. and ../..
-AC_CONFIG_AUX_DIR(.)
-AM_INIT_AUTOMAKE(hello,0.23)
+AC_CONFIG_AUX_DIR([.])
+AM_INIT_AUTOMAKE
 AC_PROG_CC
 AC_PROG_CC_STDC
 AM_PROG_CC_C_O
 AM_C_PROTOTYPES
-AC_OUTPUT(Makefile)
+AC_CONFIG_FILES([Makefile])
+AC_OUTPUT
 END
 
 cat > Makefile.am << 'END'
@@ -63,3 +64,5 @@ $AUTOMAKE -a
 ./configure
 ANSI2KNR=./ansi2knr U=_ $MAKE -e
 ./hello
+
+:
index f98ae5b..ead2305 100755 (executable)
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2001, 2002, 2004  Free Software Foundation, Inc.
+# Copyright (C) 2001, 2002, 2004, 2010 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
 
 . ./defs || Exit 1
 
+set -e
+
 cat >> configure.in << 'END'
 AC_PROG_CC
 AM_PROG_CC_C_O
 AC_PROG_CXX
-AC_OUTPUT(d1/Makefile d2/Makefile)
+AC_CONFIG_FILES([d1/Makefile d2/Makefile])
+AC_OUTPUT
 END
 
 mkdir d1 d2
@@ -43,7 +46,9 @@ END
 : > compile
 : > d2/z.c
 
-$ACLOCAL || Exit 1
-$AUTOMAKE || Exit 1
+$ACLOCAL
+$AUTOMAKE
+
+grep '\$(CC) .*\.\./d2/z\.c' d1/Makefile.in
 
-grep 'CC.*z' d1/Makefile.in
+:
index 9c9568a..c857e73 100755 (executable)
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2001, 2002, 2004  Free Software Foundation, Inc.
+# Copyright (C) 2001, 2002, 2004, 2010 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
 
 . ./defs || Exit 1
 
-cat > configure.in << 'END'
-AC_INIT(generic/a.c)
-AM_INIT_AUTOMAKE(nonesuch, nonesuch)
+set -e
+
+cat >> configure.in << 'END'
+AC_CONFIG_FILES([generic/Makefile])
 AC_PROG_CC
 AM_PROG_CC_C_O
-AC_OUTPUT(Makefile generic/Makefile)
+AC_OUTPUT
 END
 
 cat > Makefile.am << 'END'
@@ -36,10 +37,12 @@ mkdir generic
 : > generic/a.c
 : > generic/Makefile.am
 
-set -e
-
 $ACLOCAL
 $AUTOCONF
 $AUTOMAKE --include-deps --copy --add-missing
+
 ./configure
+
 $MAKE dist
+
+:
index 42b6e14..228a1e9 100755 (executable)
@@ -1,5 +1,6 @@
 #! /bin/sh
-# Copyright (C) 2001, 2002, 2003, 2004  Free Software Foundation, Inc.
+# Copyright (C) 2001, 2002, 2003, 2004, 2010 Free Software Foundation,
+# Inc.
 #
 # This 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,6 +21,8 @@
 required=gcc
 . ./defs || Exit 1
 
+set -e
+
 cat >> configure.in << 'END'
 AM_PROG_CC_C_O
 AC_OUTPUT
@@ -38,9 +41,6 @@ test-distclean: distclean
        test ! -f generic/$(am__dirstamp)
 END
 
-# The ac-init file.
-: > f
-
 mkdir generic
 cat > generic/a.c << 'END'
 #include <stdio.h>
@@ -51,8 +51,6 @@ int main ()
 }
 END
 
-set -e
-
 $ACLOCAL
 $AUTOCONF
 $AUTOMAKE --include-deps --copy --add-missing
@@ -86,3 +84,5 @@ cd build2
 ../configure
 $MAKE
 $MAKE mostlyclean
+
+:
index d77670c..dd1a8fe 100755 (executable)
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2001, 2002, 2004  Free Software Foundation, Inc.
+# Copyright (C) 2001, 2002, 2004, 2010 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
 
 set -e
 
-cat > configure.in << 'END'
-AC_INIT(f)
-AM_INIT_AUTOMAKE(nonesuch, nonesuch)
+cat >> configure.in << 'END'
 AC_PROG_CC
 AM_PROG_CC_C_O
-AC_OUTPUT(Makefile)
+AC_OUTPUT
 END
 
 cat > Makefile.am << 'END'
index 63a02d1..ae9b09b 100755 (executable)
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2001, 2002  Free Software Foundation, Inc.
+# Copyright (C) 2001, 2002, 2010 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
 
 . ./defs || Exit 1
 
-cat > configure.in << 'END'
-AC_INIT(Makefile.am)
-AC_CONFIG_AUX_DIR(tools)
-AM_INIT_AUTOMAKE(nonesuch, nonesuch)
+set -e
+
+cat > configure.in << END
+AC_INIT([$me], [1.0])
+AC_CONFIG_AUX_DIR([tools])
+AM_INIT_AUTOMAKE
 AC_PROG_CC
 AM_PROG_CC_C_O
-AC_OUTPUT(Makefile foo/Makefile)
+AC_CONFIG_FILES([Makefile foo/Makefile])
+AC_OUTPUT
 END
 
 mkdir tools foo foo/bar
@@ -33,12 +36,14 @@ cat > Makefile.am << 'END'
 SUBDIRS = foo
 END
 
-cat > foo/Makefile.am << 'EOF'
+cat > foo/Makefile.am << 'END'
 AUTOMAKE_OPTIONS = subdir-objects
 bin_PROGRAMS = mumble
 mumble_SOURCES = bar/a.c
-EOF
+END
+
+$ACLOCAL
+$AUTOMAKE --add-missing
+test -f tools/compile
 
-$ACLOCAL || Exit 1
-$AUTOMAKE --add-missing || Exit 1
-test -f tools/compile || Exit 1
+:
index 99fe6e8..83f3a31 100755 (executable)
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2002, 2004, 2005  Free Software Foundation, Inc.
+# Copyright (C) 2002, 2004, 2005, 2010 Free Software Foundation, Inc.
 #
 # This 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='libtoolize g++'
 . ./defs || Exit 1
 
-cat > configure.in << 'END'
-AC_INIT(x, 0, x)
-AM_INIT_AUTOMAKE([foreign subdir-objects])
+set -e
 
+cat > configure.in << END
+AC_INIT([$me], [1.0])
+AM_INIT_AUTOMAKE([subdir-objects])
 AC_PROG_CXX
 AM_PROG_LIBTOOL
-
 AC_CONFIG_FILES([Makefile])
 AC_OUTPUT
 END
@@ -33,7 +33,7 @@ END
 cat > Makefile.am << 'END'
 noinst_LTLIBRARIES = libfoo.la
 libfoo_la_SOURCES = src/foo.cc .//src/bar.cc  # the `.//' is meant.
-
+.PHONY: print
 print:
        @echo BEG1: "$(LTCXXCOMPILE)" :1END
        @echo BEG2: "$(CXXLINK)" :2END
@@ -55,7 +55,6 @@ int doit2 (void)
 }
 END
 
-set -e
 
 libtoolize --force
 $ACLOCAL
@@ -65,17 +64,22 @@ $AUTOMAKE -a
 # Skip this test on configure errors (e.g., broken C++ compilers).
 ./configure || Exit 77
 
-# opportunistically check that --tag=CXX is used when supported
-if test -n "`./libtool --help | grep tag=TAG`"; then
-  $MAKE print >stdout
+# Ensure './libtool --help' will use the right tool versions.
+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
   grep 'BEG1: .*--tag=CXX.*--mode=compile.* :1END' stdout
   grep 'BEG2: .*--tag=CXX.*--mode=link.* :2END' stdout
 fi
 
 $MAKE
-$MAKE distcheck 2>&1 | tee out
+$MAKE distcheck >output 2>&1 || { cat output; Exit 1; }
+cat output
 # GNU Make used to complain that the Makefile contained two rules
 # for `src/.dirstamp' and `.//src/.dirstamp'.
-grep 'overriding commands' out && Exit 1
+grep 'overriding commands' output && Exit 1
+
 :
index 79584cf..a8128bb 100755 (executable)
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2002  Free Software Foundation, Inc.
+# Copyright (C) 2002, 2010 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -70,3 +70,5 @@ dobj=`sed -n '/^am_d_OBJECTS = / {
                p
               }' Makefile.in`
 test "$cobj" = "$dobj"
+
+:
index 3d4da05..23dc168 100755 (executable)
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2001, 2002, 2010 Free Software Foundation, Inc.
+# Copyright (C) 2001, 2002, 2010, 2011 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -63,7 +63,7 @@ diff exp got
 
 # 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 contains $(helldl_SOURCES).
+# it's not needed.  DIST_SOURCES should contain $(helldl_SOURCES).
 grep am__helldl_SOURCES_DIST Makefile && Exit 1
 grep 'DIST_SOURCES.*\$(helldl_SOURCES)' Makefile
 
index 2b39460..8120024 100755 (executable)
@@ -1,6 +1,6 @@
 #! /bin/sh
-# Copyright (C) 2002, 2003, 2006, 2009, 2010 Free Software Foundation,
-# Inc.
+# Copyright (C) 2002, 2003, 2006, 2009, 2010, 2011 Free Software
+# Foundation, Inc.
 #
 # This file is part of GNU Automake.
 #
@@ -38,7 +38,8 @@ AUTOMAKE_OPTIONS = subdir-objects
 SUFFIXES = .baz .c
 .baz.c:
        case $@ in sub/*) $(MKDIR_P) sub;; *) :;; esac
-       cp $< $@
+## Account for VPATH issues on weaker make implementations (e.g. IRIX 6.5)
+       cp `test -f '$<' || echo $(srcdir)/`$< $@
 
 DISTCLEANFILES = sub/bar.c
 
index 60058b8..eb67195 100755 (executable)
@@ -15,7 +15,7 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 # Test to make sure Automake supports implicit rules "confusing"
-# extensions.  Inspired by a mail from Alex Hornby. 
+# extensions.  Inspired by a mail from Alex Hornby.
 
 . ./defs || Exit 1
 
index d0f83f3..b324568 100755 (executable)
@@ -1,5 +1,6 @@
 #! /bin/sh
-# Copyright (C) 2000, 2001, 2002, 2004  Free Software Foundation, Inc.
+# Copyright (C) 2000, 2001, 2002, 2004, 2010 Free Software Foundation,
+# Inc.
 #
 # This 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,7 +30,7 @@ AC_OUTPUT(Makefile)
 END
 
 cat > Makefile.am << 'END'
-AUTOMAKE_OPTIONS = foreign no-dependencies
+AUTOMAKE_OPTIONS = no-dependencies
 
 bin_PROGRAMS = foo bar
 foo_CFLAGS   = -DFOO
index 3f1c533..b764e53 100755 (executable)
@@ -1,6 +1,6 @@
 #! /bin/sh
-# Copyright (C) 1996, 1997, 1998, 2000, 2001, 2002, 2003
-# Free Software Foundation, Inc.
+# Copyright (C) 1996, 1997, 1998, 2000, 2001, 2002, 2003, 2011 Free
+# Software Foundation, Inc.
 #
 # This 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 texinfo.tex included in distribution.  Bug report by
+# Test to ensure texinfo.tex is included in distribution.  Bug report by
 # Jim Meyering.
 
+required=makeinfo
 . ./defs || Exit 1
 
+set -e
+
+cat >> configure.in <<'END'
+AC_OUTPUT
+END
+
 cat > Makefile.am << 'END'
 info_TEXINFOS = textutils.texi
-magic:
-       @echo $(DISTFILES)
+.PHONY: test1 test2
+test1:
+       @echo DISTFILES = $(DISTFILES)
+       echo ' ' $(DISTFILES) ' ' | grep '[ /]texinfo\.tex '
+test2: distdir
+       ls -l $(distdir)
+       test -f $(distdir)/texinfo.tex
 END
 
 echo '@setfilename textutils.info' > textutils.texi
 : > texinfo.tex
 
-$ACLOCAL || Exit 1
-$AUTOMAKE || Exit 1
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE
+./configure
+$MAKE test1 test2
 
-$FGREP -v @SET_MAKE@ Makefile.in > Makefile.sed
-$MAKE -s -f Makefile.sed SHELL=$SHELL magic | grep 'texinfo\.tex'
+:
index 66ed686..4c14aba 100755 (executable)
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2002, 2003, 2008  Free Software Foundation, Inc.
+# Copyright (C) 2002, 2003, 2008, 2011 Free Software Foundation, Inc.
 #
 # This 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 info files are not built in $(srcdir).
+# Check that info files are normally built in $(srcdir),
+# not in $(builddir).
 
 required='makeinfo tex texi2dvi'
 . ./defs || Exit 1
 
 set -e
 
-echo AC_OUTPUT >> configure.in
+cat >> configure.in << 'END'
+AC_OUTPUT
+END
 
 cat > Makefile.am << 'END'
 info_TEXINFOS = main.texi
@@ -86,3 +89,5 @@ $MAKE dvi
 test -f main.dvi
 
 $MAKE distcheck
+
+:
index 4df5257..8dc8961 100755 (executable)
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2002, 2008, 2009  Free Software Foundation, Inc.
+# Copyright (C) 2002, 2008, 2009, 2011 Free Software Foundation, Inc.
 #
 # This 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,9 @@ required='makeinfo tex texi2dvi'
 
 set -e
 
-echo AC_OUTPUT >> configure.in
+cat >> configure.in << 'END'
+AC_OUTPUT
+END
 
 cat > Makefile.am << 'END'
 info_TEXINFOS = main.texi
@@ -62,4 +64,14 @@ $AUTOMAKE --add-missing
 $AUTOCONF
 
 ./configure
+
+$MAKE dvi
+ls -l           # for debugging
+test -f main.sa # sanity check
+$MAKE clean
+ls -l           # for debugging
+test x"`echo main.*`" = x"main.texi"
+
 TAR_OPTIONS= $MAKE distcheck
+
+:
index 2324f57..f51d0b6 100755 (executable)
@@ -1,5 +1,6 @@
 #! /bin/sh
-# Copyright (C) 1996, 1997, 2001, 2002, 2003  Free Software Foundation, Inc.
+# Copyright (C) 1996, 1997, 2001, 2002, 2003, 2011 Free Software
+# Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
 
 set -e
 
-echo AC_OUTPUT >> configure.in
+cat >> configure.in << 'END'
+AC_OUTPUT
+END
 
 cat > Makefile.am << 'END'
 info_TEXINFOS = textutils.texi
-magic:
-       @echo $(DISTFILES)
+.PHONY: test
+test:
+       @echo DISTFILES = $(DISTFILES)
+       case '$(DISTFILES)' in *'~'*) exit 1;; *) exit 0;; esac
 END
 
 : > texinfo.tex
 echo '@setfilename textutils.info' > textutils.texi
 : > textutils.info~
 
-
 $ACLOCAL
 $AUTOCONF
 $AUTOMAKE
+
 ./configure
-$MAKE magic >stdout
-cat stdout
-grep '~' stdout && Exit 1
-Exit 0
+$MAKE test
+
+:
index 3c2265d..c2f23e1 100755 (executable)
@@ -1,5 +1,6 @@
 #! /bin/sh
-# Copyright (C) 2003, 2004, 2007, 2008  Free Software Foundation, Inc.
+# Copyright (C) 2003, 2004, 2007, 2008, 2011 Free Software Foundation,
+# Inc.
 #
 # This 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 user can override TEXINFO_TEX.
-# Report from Tom Tromey.
-# Also make sure Automake ignores in-line comments when using variables,
-# but preserve them in the output.
 # Also make sure TEXINFO_TEX is not distributed.
+# Report from Tom Tromey.
 
 required='makeinfo tex texi2dvi'
 . ./defs || Exit 1
 
 set -e
 
-cat > configure.in << 'END'
-AC_INIT([txinfo22], [1.0])
+cat > configure.in << END
+AC_INIT([$me], [1.0])
 AC_CONFIG_AUX_DIR([aux1])
 AM_INIT_AUTOMAKE
 AC_CONFIG_FILES([Makefile])
 AC_OUTPUT
 END
 
-# Use a slash in the comment, because automake takes the dirname
-# of TEXINFO_TEX to compute $(am__TEXINFO_TEX_DIR)...
 cat > Makefile.am << 'END'
-TEXINFO_TEX = $(srcdir)/tex/texinfo.tex    # some comment w/ a slash
+TEXINFO_TEX = $(srcdir)/tex/texinfo.tex
 info_TEXINFOS = main.texi
 sure_it_exists:
        test -f $(TEXINFO_TEX)
-       test -d "$(am__TEXINFO_TEX_DIR)"
 sure_it_is_not_distributed: distdir
        test ! -f $(distdir)/tex/texinfo.tex
 END
@@ -67,7 +63,9 @@ test ! -f aux1/texinfo.tex
 test -f tex/texinfo.tex
 
 ./configure
+
 $MAKE sure_it_exists
 $MAKE distcheck
-grep 'TEXINFO_TEX = .* # some comment w/ a slash' Makefile
 $MAKE sure_it_is_not_distributed
+
+:
index 903e681..660487d 100755 (executable)
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2002, 2003, 2007  Free Software Foundation, Inc.
+# Copyright (C) 2002, 2003, 2007, 2011 Free Software Foundation, Inc.
 #
 # This 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 for subdir Texinfo in $(srcdir).
+# 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)
 
 required='makeinfo tex texi2dvi-o'
 . ./defs || Exit 1
 
 set -e
 
-echo AC_OUTPUT >> configure.in
+cat >> configure.in << 'END'
+AC_OUTPUT
+END
 
 cat > Makefile.am << 'END'
 DISTCLEANFILES = subdir/*.info*
@@ -50,7 +54,6 @@ cat > subdir/inc.texi << 'END'
 I'm included.
 END
 
-
 $ACLOCAL
 $AUTOMAKE --add-missing
 $AUTOCONF
@@ -60,3 +63,6 @@ cd build
 ../configure
 $MAKE distcheck
 test -f subdir/main.info
+test ! -f ../subdir/main.info
+
+:
index 4c0bc82..fc9f9d1 100755 (executable)
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2002, 2003  Free Software Foundation, Inc.
+# Copyright (C) 2002, 2003, 2011 Free Software Foundation, Inc.
 #
 # This 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.
 # (Similar to txinfo16.test, plus CLEANFILES.)
+# (See also txinfo23.test and txinfo25.test)
 
 required='makeinfo tex texi2dvi-o'
 . ./defs || Exit 1
 
 set -e
 
-echo AC_OUTPUT >> configure.in
+cat >> configure.in << 'END'
+AC_OUTPUT
+END
 
 cat > Makefile.am << 'END'
 CLEANFILES = main.info
@@ -47,6 +50,7 @@ mkdir build
 cd build
 ../configure
 $MAKE
+test ! -f ../main.info
 test -f main.info
 
 cd ..
@@ -77,3 +81,5 @@ $MAKE dvi
 test -f main.dvi
 
 $MAKE distcheck
+
+:
index 85007f9..f80b035 100755 (executable)
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2003  Free Software Foundation, Inc.
+# Copyright (C) 2003, 2011 Free Software Foundation, Inc.
 #
 # This 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/>.
 
-# Similar to texinfo24.test, but with two info files, only one of
-# which being cleaned.
+# 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)
 
 required='makeinfo tex texi2dvi-o'
 . ./defs || Exit 1
 
 set -e
 
-echo AC_OUTPUT >> configure.in
+cat >> configure.in << 'END'
+AC_OUTPUT
+END
 
 cat > Makefile.am << 'END'
 CLEANFILES = [a-m]*.info
@@ -104,3 +109,5 @@ test -f main.dvi
 test -f other.dvi
 
 $MAKE distcheck
+
+:
index 1d4aeff..42dd3ab 100755 (executable)
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2004  Free Software Foundation, Inc.
+# Copyright (C) 2004, 2011 Free Software Foundation, Inc.
 #
 # This 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,7 +30,7 @@ echo '@setfilename baz.info' > bar.texi
 
 $ACLOCAL
 AUTOMAKE_fails --add-missing
-grep '^Makefile.am:1:.*user variable.*INFO_DEPS' stderr
+grep '^Makefile\.am:1:.*user variable.*INFO_DEPS' stderr
 grep 'overrides Automake variable.*INFO_DEPS' stderr
 
 $AUTOMAKE -Wno-override
@@ -38,19 +38,20 @@ $AUTOMAKE -Wno-override
 # There is only one definition of INFO_DEPS
 test 1 = `grep '^INFO_DEPS.*=' Makefile.in | wc -l`
 # and it is the right one.
-grep '^INFO_DEPS = foo.info$' Makefile.in
-
+grep '^INFO_DEPS *= *foo.info *$' Makefile.in
 
 # Likewise with AC_SUBST.
 
 cat > Makefile.am << 'END'
 info_TEXINFOS = bar.texi
 END
-echo 'AC_SUBST([INFO_DEPS])' >>configure.in
+cat >> configure.in << 'END'
+AC_SUBST([INFO_DEPS])
+END
 rm -rf autom4te.cache # Make sure autoconf sees the configure.in update.
 AUTOMAKE_fails
 
-grep '^configure.in:4:.*user variable.*INFO_DEPS' stderr
+grep '^configure\.in:4:.*user variable.*INFO_DEPS' stderr
 grep 'overrides Automake variable.*INFO_DEPS' stderr
 
 $AUTOMAKE -Wno-override
@@ -58,4 +59,6 @@ $AUTOMAKE -Wno-override
 # There is only one definition of INFO_DEPS
 test 1 = `grep '^INFO_DEPS.*=' Makefile.in | wc -l`
 # and it is the right one.
-grep '^INFO_DEPS = @INFO_DEPS@$' Makefile.in
+grep '^INFO_DEPS *= *@INFO_DEPS@ *$' Makefile.in
+
+:
index dcdfcfa..6af712f 100755 (executable)
@@ -1,6 +1,6 @@
 #! /bin/sh
-# Copyright (C) 1997, 2001, 2002, 2003, 2008  Free Software Foundation,
-# Inc.
+# Copyright (C) 1997, 2001, 2002, 2003, 2008, 2011 Free Software
+# Foundation, Inc.
 #
 # This 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,9 @@ required='makeinfo tex texi2dvi'
 
 set -e
 
-echo AC_OUTPUT >> configure.in
+cat >> configure.in << 'END'
+AC_OUTPUT
+END
 
 cat > Makefile.am << 'END'
 info_TEXINFOS = textutils.texi
@@ -45,8 +47,10 @@ grep '^INFO_DEPS.*textutils$' Makefile.in
 
 # We should not use single suffix inference rules (with separate
 # dependencies), this confuses Solaris make.
-grep '^.texi:$' Makefile.in && Exit 1
-grep 'textutils: textutils.texi' Makefile.in
+grep '^\.texi:$' Makefile.in && Exit 1
+grep 'textutils: *textutils\.texi' Makefile.in
 
 ./configure
 $MAKE distcheck
+
+:
index 8db42d9..296180d 100755 (executable)
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2005  Free Software Foundation, Inc.
+# Copyright (C) 2005, 2010 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -41,7 +41,7 @@ EOF
 
 chmod +x makeinfo
 
-PATH=`pwd`:$PATH
+PATH=`pwd`$PATH_SEPARATOR$PATH
 export PATH
 
 $ACLOCAL
index 1c6a92f..0c55a1c 100755 (executable)
@@ -1,5 +1,6 @@
 #! /bin/sh
-# Copyright (C) 1997, 2001, 2002, 2003  Free Software Foundation, Inc.
+# Copyright (C) 1997, 2001, 2002, 2003, 2011 Free Software Foundation,
+# Inc.
 #
 # This 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,4 +30,6 @@ echo '@setfilename textutils.frob' > textutils.texi
 
 $ACLOCAL
 AUTOMAKE_fails
-grep 'textutils.texi:1:.*textutils.frob.*extension' stderr
+grep 'textutils\.texi:1:.*textutils\.frob.*extension' stderr
+
+:
index 0bbc7d9..0b3ea68 100755 (executable)
@@ -1,5 +1,6 @@
 #! /bin/sh
-# Copyright (C) 1998, 2001, 2002, 2008  Free Software Foundation, Inc.
+# Copyright (C) 1998, 2001, 2002, 2008, 2011 Free Software Foundation,
+# Inc.
 #
 # This 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 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
 
+set -e
+
 cat >> configure.in << 'END'
 AM_MAINTAINER_MODE
 END
@@ -28,5 +35,7 @@ END
 
 echo '@setfilename ian.info' > ian.texi
 
-$ACLOCAL || Exit 1
+$ACLOCAL
 $AUTOMAKE --cygnus
+
+:
diff --git a/tests/txinfo5b.test b/tests/txinfo5b.test
new file mode 100755 (executable)
index 0000000..f14eadb
--- /dev/null
@@ -0,0 +1,44 @@
+#! /bin/sh
+# Copyright (C) 1998, 2001, 2002, 2008, 2011 Free Software Foundation,
+# Inc.
+#
+# This 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
+
+set -e
+
+cat >> configure.in << 'END'
+AM_MAINTAINER_MODE
+END
+
+cat > Makefile.am << 'END'
+# Disable `override' warning to work around an unrelated
+# texi+cygnus bug.
+AUTOMAKE_OPTIONS = -Wno-override
+info_TEXINFOS = ian.texi
+END
+
+echo '@setfilename ian.info' > ian.texi
+
+$ACLOCAL
+$AUTOMAKE --cygnus
+$AUTOMAKE -a --cygnus
+test ! -f texinfo.tex
+
+:
index ad3704e..f5b8c0b 100755 (executable)
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 1998, 2001, 2002  Free Software Foundation, Inc.
+# Copyright (C) 1998, 2001, 2002, 2011 Free Software Foundation, Inc.
 #
 # This 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 `.txi' extension works.
+
 . ./defs || Exit 1
 
+set -e
+
 cat > Makefile.am << 'END'
 info_TEXINFOS = foo.txi
 END
@@ -24,7 +27,9 @@ END
 echo '@setfilename foo.info' > foo.txi
 : > texinfo.tex
 
-$ACLOCAL || Exit 1
-$AUTOMAKE || Exit 1
+$ACLOCAL
+$AUTOMAKE
+
+grep '^\.txi\.info: *$' Makefile.in
 
-$FGREP '.txi.info' Makefile.in
+:
index 466a216..9a1dd5c 100755 (executable)
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 1998, 2001, 2002  Free Software Foundation, Inc.
+# Copyright (C) 1998, 2001, 2002, 2011 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
 
 . ./defs || Exit 1
 
+set -e
+
 cat > Makefile.am << 'END'
 info_TEXINFOS = textutils.texi
-magic:
-       @echo $(DISTFILES)
 END
 
 echo '@setfilename textutils.info' > textutils.texi
 
-$ACLOCAL || Exit 1
-$AUTOMAKE -a || Exit 1
+$ACLOCAL
+$AUTOMAKE -a
 
 test -f texinfo.tex
+
+:
index 7975b28..13c8e31 100755 (executable)
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004  Free Software
+# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2011 Free Software
 # Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 
 . ./defs || Exit 1
 
-cat > configure.in << 'END'
-AC_INIT
-AC_CONFIG_AUX_DIR(sub)
-AM_INIT_AUTOMAKE(nonesuch, nonesuch)
-AC_OUTPUT(Makefile sub/Makefile)
+set -e
+
+cat > configure.in << END
+AC_INIT([$me], [1.0])
+AC_CONFIG_AUX_DIR([auxdir])
+AM_INIT_AUTOMAKE
+AC_CONFIG_FILES([Makefile])
+AC_OUTPUT
 END
 
 cat > Makefile.am << 'END'
 info_TEXINFOS = textutils.texi
+.PHONY: test1 test2
+test1:
+       @echo DISTFILES = $(DISTFILES)
+       echo ' ' $(DISTFILES) ' ' | grep '[ /]auxdir/texinfo\.tex '
+test2: distdir
+       ls -l $(distdir)/*
+       test -f $(distdir)/auxdir/texinfo.tex
 END
 
 echo '@setfilename textutils.info' > textutils.texi
 
-test -d sub || mkdir sub
+mkdir auxdir
 
-cat > sub/Makefile.am << 'END'
-magic:
-       @echo $(DISTFILES)
-END
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE -a
+
+test -f auxdir/texinfo.tex
+
+./configure
 
-$ACLOCAL || Exit 1
-$AUTOMAKE -a || Exit 1
+# Create textutils.info by hand, so that we don't have to require
+# makeinfo.  Also ensure it's really newer than textutils.texi, so
+# that make won't try to re-create it.
+$sleep
+: > textutils.info
 
-$FGREP -v @SET_MAKE@ sub/Makefile.in > sub/Makefile.sed
-test -f sub/texinfo.tex &&
-$MAKE -s -f sub/Makefile.sed SHELL=$SHELL magic | grep 'texinfo\.tex'
-stat=$?
+$MAKE test1 test2
 
-Exit $stat
+:
index b9eb7b5..71b5efb 100755 (executable)
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2001, 2002  Free Software Foundation, Inc.
+# Copyright (C) 2001, 2002, 2011 Free Software Foundation, Inc.
 #
 # This 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 only create dist-info target once.
-# This is just an example -- basically for many targets in texinfos.am
-# we only want them to appear once.
+# Make sure we only create texinfo-related targets once.
 
 . ./defs || Exit 1
 
+set -e
+
 cat > Makefile.am << 'END'
 info_TEXINFOS = maude.texi liver.txi heart.texinfo
 END
@@ -29,7 +29,15 @@ echo '@setfilename liver.info' > liver.txi
 echo '@setfilename heart.info' > heart.texinfo
 : > texinfo.tex
 
-$ACLOCAL || Exit 1
-$AUTOMAKE || Exit 1
+$ACLOCAL
+$AUTOMAKE
+
+# These are just examples -- basically for many targets in texinfos.am
+# we only want them to appear once.  But grepping them all would be
+# overkill.
+for t in info dist-info dvi-am install-html uninstall-pdf-am; do
+  $EGREP "(^| )$t*.:" Makefile.in # help in debugging
+  test `$EGREP -c "(^| )$t(:| *.:)" Makefile.in` -eq 1
+done
 
-test `grep '^dist-info:' Makefile.in | wc -l` -eq 1
+:
index c28a356..e9a4511 100755 (executable)
@@ -1,6 +1,6 @@
 #!/bin/sh
-# Copyright (C) 1996, 1997, 2000, 2001, 2002, 2003
-#   Free Software Foundation, Inc.
+# Copyright (C) 1996, 1997, 2000, 2001, 2002, 2003, 2011 Free Software
+# Foundation, Inc.
 #
 # This 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/>.
 
+# Basic checks and some regressions testing on `version.texi'
+# support for texinfo files.
+
 . ./defs || Exit 1
 
+set -e
+
 cat > Makefile.am << 'END'
 info_TEXINFOS = textutils.texi
 END
@@ -30,9 +35,7 @@ END
 : > mdate-sh
 : > texinfo.tex
 
-set -e
-
-$ACLOCAL || Exit 1
+$ACLOCAL
 $AUTOMAKE
 
 # Test for bug reported by Jim Meyering:
@@ -41,25 +44,22 @@ $AUTOMAKE
 #   textutils.info: textutils.texi
 # instead of
 #   textutils.info: textutils.texi version.texi
-# (Today this should be `textutils.info: version.texi')
-
-grep 'textutils\.info:.*version\.texi$' Makefile.in
-
+# Today this should be:
+#   $(srcdir)/textutils.info: $(srcdir)/version.texi
+# or:
+#   $(srcdir)/textutils.info: version.texi
+grep '^\$(srcdir)/textutils\.info:.*[ /]version\.texi *$' Makefile.in
 
 # Test for bug reported by Lars Hecking:
 # When running the first version of configure.ac aware automake,
 # @CONFIGURE_AC@ was not properly substituted.
-
 $EGREP 'stamp-vti:.*textutils\.texi( .*)?$' Makefile.in
 $EGREP 'stamp-vti:.*\$\(top_srcdir\)/configure( .*)?$' Makefile.in
 
-
 # Check that the path to mdate-sh is correct.  Over escaping of `$'
 # 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
 
-# Filter out '$(srcdir)/mdate-sh'; output occurrences of `SOMETHING/mdate-sh'
-sed -n 's,\$(srcdir)/mdate-sh,,g;s,.* \([^ ]*/mdate-sh\) .*,\1,gp' Makefile.in|
-# There must remain nothing.
- grep . && Exit 1
-
-Exit 0
+:
index e1a1b93..00e4c1e 100755 (executable)
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 1996, 1997, 2001, 2002, 2010 Free Software Foundation,
+# Copyright (C) 1996, 1997, 2001, 2002, 2011 Free Software Foundation,
 # Inc.
 #
 # This program is free software; you can redistribute it and/or modify
@@ -29,7 +29,7 @@ info_TEXINFOS = zardoz.texi
 END
 
 cat > zardoz.texi << 'END'
-@setfilename  zardoz  
+@setfilename zardoz
 @include version.texi
 END
 
@@ -40,4 +40,6 @@ END
 $ACLOCAL
 $AUTOMAKE
 
-grep '^zardoz\.dvi:' Makefile.in
+grep '^zardoz\.dvi:.*[ /]version.texi' Makefile.in
+
+:
diff --git a/tests/vtexi3.test b/tests/vtexi3.test
new file mode 100755 (executable)
index 0000000..34f46c5
--- /dev/null
@@ -0,0 +1,124 @@
+#! /bin/sh
+# Copyright (C) 2011 Free Software Foundation, Inc.
+#
+# This 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 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.
+
+. ./defs || Exit 1
+
+set -e
+
+distdir=$me-7.45.3a
+
+# This should work without tex, texinfo or makeinfo
+TEX=false TEXI2DVI=false MAKEINFO=false
+export TEX TEXI2DVI MAKEINFO
+
+cat > configure.in << END
+AC_INIT([$me], [7.45.3a])
+AM_INIT_AUTOMAKE
+AC_CONFIG_FILES([Makefile])
+AC_OUTPUT
+END
+
+cat > Makefile.am << 'END'
+info_TEXINFOS = foobar.texi quux.texi zardoz.texi
+.PHONY: echo-distfiles
+echo-distfiles:
+       @echo ' ' $(DISTFILES) ' '
+END
+
+cat > foobar.texi << 'END'
+@setfilename foobar.info
+random text
+@include version.texi
+END
+
+cat > quux.texi << 'END'
+@setfilename quux.info
+@include version-quux.texi
+random text
+END
+
+cat > zardoz.texi << 'END'
+@setfilename zardoz.info
+some randome text
+@include vers1a_2b.texi
+more random text
+END
+
+# Required when using Texinfo.
+: > texinfo.tex
+cp "$testsrcdir/../lib/mdate-sh" .
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE
+
+day='([1-9]|1[0-9]|2[0-9]|3[01])'
+month='(January|February|March|April|May|June|July|August|September|October|November|December)'
+year='20[0-9][0-9]' # Hopefully automake will be obsolete in 80 years ;-)
+date="$day $month $year"
+
+do_check ()
+{
+  # Basename of the vers*.texi file.
+  vfile=$1
+  # The $(srcdir) of the current build.
+  srcdir=$2
+  # The vers*.texi file must be created in $(srcdir).
+  $MAKE $srcdir/$vfile.texi
+  cat $srcdir/$vfile.texi
+  # EDITION and VERSION are synonyms, as per documentation.
+  grep "^@set EDITION 7\\.45\\.3a$" $srcdir/$vfile.texi
+  grep "^@set VERSION 7\\.45\\.3a$" $srcdir/$vfile.texi
+  # 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}'`
+  grep "^@set UPDATED-MONTH $vmonth$" $srcdir/$vfile.texi
+  # Check that the vers*.texi file is distributed according
+  # to $(DISTFILES).
+  $MAKE echo-distfiles # For debugging.
+  $MAKE -s echo-distfiles | grep "[ /]$vfile\\.texi"
+}
+
+mkdir build
+cd build
+../configure
+
+do_check version ..
+do_check version-quux ..
+do_check vers1a_2b ..
+
+# The various $(srcdir)/*.info are required for the distribution
+# and they must be newer than version.texi, so that make won't try
+# to rebuild them.
+$sleep
+touch ../foobar.info
+touch ../quux.info
+touch ../zardoz.info
+# Check that the vers*.texi files are really distributed.
+$MAKE distdir
+ls -l $distdir
+diff ../version.texi $distdir/version.texi
+diff ../version-quux.texi $distdir/version-quux.texi
+diff ../version.texi $distdir/vers1a_2b.texi
+
+:
diff --git a/tests/vtexi4.test b/tests/vtexi4.test
new file mode 100755 (executable)
index 0000000..3c8ab41
--- /dev/null
@@ -0,0 +1,118 @@
+#! /bin/sh
+# Copyright (C) 2011 Free Software Foundation, Inc.
+#
+# This 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 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
+# texi2dvi.
+
+required='makeinfo tex texi2dvi-o'
+. ./defs || Exit 1
+
+set -e
+
+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" \
+  || { echo "$me: 'date' is not POSIX-compliant enough"; Exit 77; }
+day=`echo "$day" | sed 's/^0//'`
+
+# This test requires a grep program that can work on non-text input.
+(echo '\ex\a' | grep x) || {
+  echo "$me: grep doesn't work on input that is not pure text" >&2
+  Exit 77
+}
+
+cat > configure.in << END
+AC_INIT([$me], [123.456])
+AM_INIT_AUTOMAKE
+AC_CONFIG_FILES([Makefile])
+AC_OUTPUT
+END
+
+cat > defs.am <<END
+my_date_rx = $day $month $year
+my_month_rx = $month $year
+my_version_rx = 123\.456
+END
+
+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
+## 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)='
+       cat $(srcdir)/foo.info | grep 'GREPDATE=$(my_date_rx)='
+       cat $(srcdir)/foo.info | grep 'GREPMONTH=$(my_month_rx)='
+test-distfiles:
+       @echo DISTFILES = $(DISTFILES)
+       echo ' ' $(DISTFILES) ' ' | grep '[ /]version.texi '
+test-distdir: distdir
+       ls -l $(distdir)
+       diff $(srcdir)/version.texi $(distdir)/version.texi
+.PHONY: test-grepinfo test-distfiles test-distdir
+check-local: test-grepinfo test-distfiles test-distdir
+END
+
+cat > foo.texi << 'END'
+\input texinfo
+@c %**start of header
+@setfilename foo.info
+@settitle Zardoz
+@c %**end of header
+
+@node Top
+@include version.texi
+
+GREPVERSION=@value{VERSION}=
+
+GREPEDITION=@value{EDITION}=
+
+GREPDATE=@value{UPDATED}=
+
+GREPMONTH=@value{UPDATED-MONTH}=
+
+@bye
+END
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE -a
+
+./configure
+$MAKE all dvi
+
+# debugging & sanity checks
+ls -l
+cat version.texi
+cat foo.info
+test -f foo.dvi
+
+$MAKE test-grepinfo
+$MAKE test-distfiles
+$MAKE test-distdir
+$MAKE distcheck
+
+:
diff --git a/tests/yaccdry.test b/tests/yaccdry.test
new file mode 100755 (executable)
index 0000000..d2e7632
--- /dev/null
@@ -0,0 +1,60 @@
+#! /bin/sh
+# Copyright (C) 2010 Free Software Foundation, Inc.
+#
+# This 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/>.
+
+# Removal recovery rules for headers should not remove files with `make -n'.
+
+required=bison
+. ./defs || Exit 1
+
+set -e
+
+cat >> configure.in << 'END'
+AC_PROG_CC
+AC_PROG_YACC
+AC_OUTPUT
+END
+
+cat > Makefile.am << 'END'
+AM_YFLAGS = -d
+bin_PROGRAMS = foo
+foo_SOURCES = foo.c parse.y
+END
+
+cat > foo.c << 'END'
+int main () { return 0; }
+END
+
+cat > parse.y << 'END'
+%{
+int yylex () {return 0;}
+void yyerror (char *s) {}
+%}
+%%
+foobar : 'f' 'o' 'o' 'b' 'a' 'r' {};
+END
+
+$ACLOCAL
+$AUTOMAKE --add-missing
+$AUTOCONF
+./configure
+$MAKE
+
+rm -f parse.h
+$MAKE -n parse.h
+test -f parse.c
+test ! -f parse.h
+
+:
index fcb0c64..dbc3a73 100755 (executable)
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2010 Free Software Foundation, Inc.
+# Copyright (C) 2010, 2011 Free Software Foundation, Inc.
 #
 # This 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,6 +30,10 @@ 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.in <<'END'
 AC_PROG_CC
 # Simulate presence of Yacc using our fake-yacc script.
index 346c2e4..02aed8d 100755 (executable)
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2010 Free Software Foundation, Inc.
+# Copyright (C) 2010, 2011 Free Software Foundation, Inc.
 #
 # This 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,10 @@ 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.in <<'END'
 AC_PROG_CXX
 # Simulate presence of Yacc using our fake-yacc script.