automake-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Automake-commit] [SCM] GNU Automake branch, msvc, updated. v1.11-740-g5


From: Peter Rosin
Subject: [Automake-commit] [SCM] GNU Automake branch, msvc, updated. v1.11-740-g54a402e
Date: Fri, 02 Mar 2012 15:42:10 +0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU Automake".

http://git.sv.gnu.org/gitweb/?p=automake.git;a=commitdiff;h=54a402e5e624bebdfef421512faecf5e4f3463ab

The branch, msvc has been updated
       via  54a402e5e624bebdfef421512faecf5e4f3463ab (commit)
       via  8be5d254bc1534436571aeeca0ad76bf6058e7f1 (commit)
       via  aadd78e9ce1407d49af2e690c2f230ef468fba82 (commit)
       via  51f61dfb1e861062aaa1d73fab71278c85fe0594 (commit)
       via  7d335efe6f874af817c2f29ef85a803d8db8a43a (commit)
       via  4df475a2d5ee114d1709884ec57698d34c5493cb (commit)
       via  db5ddc2bfceeb4470d02c2ff2375cf5900415493 (commit)
       via  8dd5009996be46270a58bde8be4343410ea5df51 (commit)
       via  43b8af82db9fb7077ae687998bf96e9781460665 (commit)
       via  4ced60d7fc474f008d642e280f7205f75f7c04d9 (commit)
       via  06684c510ab3115093178cdcfb28c2fff41b324c (commit)
       via  f874f9eeb7d996a7fc56c11342e9a094a87a402a (commit)
       via  3974270e2819447efdd3f4749c8f0f910bc9388c (commit)
       via  f5f838a2eba1bb26a755762665095ae76fe59a9e (commit)
       via  947ce0ed641ca226c632a3c05adfc068b802c518 (commit)
       via  ea4f1a91ac1c11a91a21169125b7ed931a4ab7fe (commit)
       via  da0964eb751461516bda1a38b8423cb412b601d6 (commit)
       via  d51da57f66d5ad66d1edfe3898baa0bef625f4e1 (commit)
       via  85cadc4e7738b84cc107b2f7a2adad5a2fa29005 (commit)
       via  c3e4962a9819b260a61e156f2105b58558af6396 (commit)
       via  32cde2a4722d25ad41e5ae2e33d43ceb2c6f4a90 (commit)
       via  0436a1ed2c44b9e8b3c8f2f049e06bfac4969d3e (commit)
       via  d55b9302515d68c178259048df592f0a80d1d67d (commit)
       via  be0a696aac24a55f8281e9585c87a14138206eb5 (commit)
       via  b6c3ed5e0debbeb47c4316afb62e8415ed76f26f (commit)
       via  af5f9390a4fe3268944823ab0f3ac5af4fcf8bb0 (commit)
       via  49c9194035b60d89c9204dab9e3be27058ba832e (commit)
       via  5060920b1390bedaef7c0a4269b306bf7fa19799 (commit)
       via  bff57e68f5376806e75ef004708dbd76a5540f58 (commit)
       via  3a422887c20556cc9f5e4a856c046f336f2997b4 (commit)
       via  b08103fedac9fbdf0a24f9192a901ea4b01e45af (commit)
       via  d266b5f7fb2fbb7fddb5b8515d57c32b45a50c67 (commit)
       via  8ddff1004c14bf94d9bcaf1c3b2a29da58e7adf7 (commit)
       via  91158d7245f194f7fc40d8da8965c59965112601 (commit)
       via  c5df21e8dde255778896e512f7b7b037049dbf7e (commit)
       via  84fbf466f32d0e47291a91d620f7d4831bba34fe (commit)
       via  be0d69f0467763fca65d3acd1bfe0e03ff987206 (commit)
       via  52246cc7355cedbc9cb992095870572beb767ca1 (commit)
       via  a1e77caf20a62b14d549307a73131fedb9c0f696 (commit)
       via  fbeda3da9d12736b3dcc6d1e11e9f2f09cf4ce96 (commit)
       via  2a9862a89875f9060f95547b6fd4274c86738617 (commit)
       via  a6e60819ba512d6bf7376c543f8c40c9389eb4d7 (commit)
       via  443114bf1b15790e0349a087a5673e4de25981ff (commit)
       via  e29c49181fb4ffa2506ca690964b5e9e07c8fb49 (commit)
       via  3d6197fe647445ecbcfaac6c004449246471d5b6 (commit)
       via  8fec2399264ee4822ecf2c0d9275d890edbc8e50 (commit)
       via  12dc0ec5e3c7e1a12569d5cfdbb8ceaa5a5f5f58 (commit)
       via  3da9c4c757ff0b6b1df0daf36a8a12274292a9e1 (commit)
       via  d9a7182ed15654aebdd049857282106e84962813 (commit)
       via  20f2ac90d14d04caef07c6e445e7b3e582374701 (commit)
       via  20d99e05c9286ded040131e89c0c90a70334ed05 (commit)
       via  068b2f53579c55365b67619dce4685066cd70a60 (commit)
       via  27f1a1c967bc6af59cc940ba42114d795fb458d5 (commit)
       via  48c9d57f1769789dfd6cb876bd3e82d2252d1e59 (commit)
       via  3b594a8cc0fa3e8835e4f79b68515fe4e7b72a78 (commit)
       via  8856653ec87c826ec5f7f7c577e01afaa64c3ed5 (commit)
       via  9d9f00ed0e3a21b4537c21280b81f6b9f0ae15bd (commit)
       via  17542c3cd03c70b462eb134b565ed4698a9bff54 (commit)
       via  05c02989174d490b842c46cb8f25fb8b601a7c4f (commit)
       via  def0340b7e8ae999eafe4466fc934e7694fe372d (commit)
       via  59367c05bbfd19062c6754f088d16bec33f39b54 (commit)
       via  0188e0f50e4b9802f50ccaa11390a364db7354a6 (commit)
       via  4013982ecfc418f588d6c423c61600d49ad9d3f4 (commit)
       via  539cae3bb691b4cef90e3c1fdbce833093ed6203 (commit)
       via  dfb5e52f5f52fda733f1a6d27680fc347ba17286 (commit)
       via  f1df5481b9a51023b46390d7730c3a401a00e9fd (commit)
       via  657eed2e1b1f2e0fac19f4c840b72a71ec6e1141 (commit)
       via  e064ff7997a1425942fe32c0c0488f922fe1ea9a (commit)
       via  d850165e6c9722adf2b80442974f3ca014c35298 (commit)
       via  72f7e5de24468adfeded4b14eae97a839ae3b531 (commit)
       via  c7ee8c6db00ddc4cd90b9d44c5ccf3a90d26663b (commit)
       via  01c3294bac3b67004d208449fe9460fc3ab61ee4 (commit)
       via  741a0a1e94ce855fcd2109d5557a924e792b9320 (commit)
       via  92f688d82f4562bf27948b4bd3780a3b18eee8cf (commit)
       via  e3b0e12400f5fa4220fc0aa79dd0989e56def9c6 (commit)
       via  a6ccc2ae80a5e4044fff3cf26ef718600b7e1b92 (commit)
       via  b40372f93b4c839ac5dd819ef2659b4ce91ff91b (commit)
       via  e23a89ed6192cea452e3103edfe464129afe6ef9 (commit)
       via  4e4dae500390d2ace681e4e4bc4c590ecdca38c6 (commit)
       via  971000c121b9b79b787435f1eaaa76caa37986ee (commit)
       via  f4e221b65d381243553f82e125c615eaaf8ed5de (commit)
       via  4337813be1c35f0d821283aae2ccb3d67c2ff1df (commit)
      from  6fca3afa13f5b9ccdc9990e769793b0d9f31f5db (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
-----------------------------------------------------------------------

Summary of changes:
 .gitattributes                                     |    2 +-
 .gitignore                                         |    4 +-
 HACKING                                            |   34 +-
 Makefile.am                                        |  172 +++--
 NEWS                                               |   43 +
 THANKS                                             |    5 +
 aclocal.in                                         |   54 +-
 automake.in                                        |  118 +--
 configure.ac                                       |    8 +-
 tests/nodepcomp.test => contrib/Makefile.am        |   28 +-
 contrib/README                                     |   27 +
 {m4 => contrib/multilib}/multi.m4                  |    0
 doc/Makefile.am                                    |    6 +-
 doc/automake.texi                                  |  122 ++--
 lib/Automake/Getopt.pm                             |  115 +++
 lib/Automake/Makefile.am                           |   16 +-
 lib/Automake/Variable.pm                           |    2 +-
 lib/Automake/tests/Makefile.am                     |   30 -
 lib/Makefile.am                                    |    2 +-
 lib/am/Makefile.am                                 |    3 +-
 lib/am/check-html.am                               |   61 ++
 lib/am/check.am                                    |  113 +--
 lib/am/distdir.am                                  |   31 +-
 lib/am/header-vars.am                              |   29 +
 lib/am/library.am                                  |    6 +-
 lib/am/lisp.am                                     |    7 +-
 lib/am/ltlibrary.am                                |    6 +-
 lib/am/program.am                                  |    6 +-
 lib/ar-lib                                         |   13 +-
 lib/config.guess                                   |   22 +-
 lib/config.sub                                     |   13 +-
 lib/gitlog-to-changelog                            |   64 +-
 lib/gnupload                                       |   28 +-
 lib/missing                                        |   32 +-
 lib/texinfo.tex                                    |  174 +++--
 lib/update-copyright                               |  274 ++++++
 m4/Makefile.am                                     |   12 +-
 m4/multi.m4                                        |    5 +-
 m4/tar.m4                                          |    9 +-
 tests/CheckListOfTests.am                          |   67 ++
 tests/Makefile.am                                  |  933 +-------------------
 tests/acloca10.test                                |    8 +-
 tests/acloca18.test                                |   22 +-
 tests/aclocal5.test                                |    2 +
 tests/aclocal9.test                                |    6 +-
 tests/ar-lib.test                                  |   26 +
 tests/check.test                                   |    4 +-
 tests/check8.test                                  |   16 +-
 tests/conffile-leading-dot.test                    |   62 ++
 tests/defs.in                                      |   27 +-
 tests/deleted-am.test                              |    4 +-
 tests/depcomp8a.test                               |    4 +-
 tests/depcomp8b.test                               |    4 +-
 tests/distcheck-pr10470.test                       |   61 ++
 tests/extradep.test                                |  108 +++
 tests/extradep2.test                               |   89 ++
 tests/gen-parallel-tests                           |   26 +-
 tests/get-sysconf.test                             |   14 +-
 tests/getopt.test                                  |   41 -
 tests/{Makefile.am => list-of-tests.mk}            |  186 +---
 tests/lzma.test                                    |    3 +-
 tests/make-dryrun.test                             |   67 ++
 tests/maken.test                                   |    9 +-
 tests/maken2.test                                  |   63 --
 tests/maken3.test                                  |   24 +-
 tests/maken4.test                                  |  172 ----
 tests/missing-tar.test                             |  160 ----
 tests/multlib.test                                 |   28 +-
 tests/{extra10.test => objext-pr10128.test}        |   40 +-
 tests/parallel-tests-dryrun.test                   |   93 ++
 tests/parallel-tests2.test                         |   35 +
 {lib/Automake/tests => tests/pm}/Condition-t.pl    |    0
 {lib/Automake/tests => tests/pm}/Condition.pl      |    0
 .../tests => tests/pm}/DisjConditions-t.pl         |    0
 {lib/Automake/tests => tests/pm}/DisjConditions.pl |    0
 {lib/Automake/tests => tests/pm}/Version.pl        |    0
 {lib/Automake/tests => tests/pm}/Wrap.pl           |    0
 tests/pr300-lib.test                               |    9 +-
 tests/pr300-ltlib.test                             |   11 +-
 tests/primary-prefix-invalid-couples.test          |    2 +-
 tests/primary-prefix-valid-couples.test            |    2 +-
 tests/specflg7.test                                |    7 +-
 tests/specflg8.test                                |    7 +-
 tests/substref.test                                |    5 +-
 tests/suffix8.test                                 |    5 +-
 tests/tar-override.test                            |   67 ++
 tests/transform2.test                              |   17 +-
 tests/vala-mix.test                                |  117 +++
 tests/vala-mix2.test                               |  121 +++
 tests/vala-vpath.test                              |   28 +-
 tests/vala.test                                    |   59 +-
 tests/vala2.test                                   |   11 +-
 tests/vala5.test                                   |   48 +-
 93 files changed, 2404 insertions(+), 2212 deletions(-)
 copy tests/nodepcomp.test => contrib/Makefile.am (74%)
 mode change 100755 => 100644
 create mode 100644 contrib/README
 copy {m4 => contrib/multilib}/multi.m4 (100%)
 create mode 100644 lib/Automake/Getopt.pm
 delete mode 100644 lib/Automake/tests/Makefile.am
 create mode 100644 lib/am/check-html.am
 delete mode 100644 lib/am/comp-vars.am
 create mode 100755 lib/update-copyright
 create mode 100644 tests/CheckListOfTests.am
 mode change 100644 => 100755 tests/aclocal-install-absdir.test
 create mode 100755 tests/conffile-leading-dot.test
 create mode 100755 tests/distcheck-pr10470.test
 create mode 100755 tests/extradep.test
 create mode 100755 tests/extradep2.test
 delete mode 100755 tests/getopt.test
 copy tests/{Makefile.am => list-of-tests.mk} (76%)
 create mode 100755 tests/make-dryrun.test
 delete mode 100755 tests/maken2.test
 delete mode 100755 tests/maken4.test
 delete mode 100755 tests/missing-tar.test
 copy tests/{extra10.test => objext-pr10128.test} (54%)
 create mode 100755 tests/parallel-tests-dryrun.test
 rename {lib/Automake/tests => tests/pm}/Condition-t.pl (100%)
 rename {lib/Automake/tests => tests/pm}/Condition.pl (100%)
 rename {lib/Automake/tests => tests/pm}/DisjConditions-t.pl (100%)
 rename {lib/Automake/tests => tests/pm}/DisjConditions.pl (100%)
 rename {lib/Automake/tests => tests/pm}/Version.pl (100%)
 rename {lib/Automake/tests => tests/pm}/Wrap.pl (100%)
 create mode 100755 tests/tar-override.test
 create mode 100755 tests/vala-mix.test
 create mode 100755 tests/vala-mix2.test

diff --git a/.gitattributes b/.gitattributes
index b6c3614..5126add 100644
--- a/.gitattributes
+++ b/.gitattributes
@@ -1,2 +1,2 @@
-ChangeLog merge=merge-changelog
+NEWS merge=union
 *.texi* diff=texinfo
diff --git a/.gitignore b/.gitignore
index 33e3827..f219153 100644
--- a/.gitignore
+++ b/.gitignore
@@ -47,10 +47,10 @@ Makefile
 /doc/amhello/install-sh
 /doc/amhello/missing
 /lib/Automake/Config.pm
-/lib/Automake/tests/*.log
-/lib/Automake/tests/*.log-t
 /tests/*.log
 /tests/*.log-t
+/tests/pm/*.log
+/tests/pm/*.log-t
 /tests/*.dir
 /tests/*-p.test
 /tests/aclocal-1.*
diff --git a/HACKING b/HACKING
index 6da0e59..26f1d91 100644
--- a/HACKING
+++ b/HACKING
@@ -16,24 +16,24 @@
   appropriate paperwork.
   Second, be sure to add their name and email address to THANKS
 
-* If a change fixes a test, mention the test in the ChangeLog entry.
+* If a change fixes a test, mention the test in the commit message.
   If a change fixes a bug registered in the Automake debbugs tracker,
-  mention the bug number in the ChangeLog entry.
+  mention the bug number in the commit message.
 
-* If somebody reports a new bug, mention his name in the ChangeLog entry
+* If somebody reports a new bug, mention his name in the commit message
   and in the test case you write.  Put him into THANKS.
 
 * When documenting a non-trivial idiom or example in the manual, be
   sure to add a test case for it, and to reference such test case from
   a proper Texinfo comment.
 
-* Some files in the automake package are not owned by automake.  These
-  files should never be edited here.  These files are
-      COPYING (from FSF),
-      INSTALL (address@hidden),
-      config.guess, config.sub (address@hidden),
-      texinfo.tex (address@hidden),
-  Most of them are updated before release with `make fetch'.
+* Some files in the automake package are not owned by automake; these
+  files are listed in the $(FETCHFILES) variable in Makefile.am.  They
+  should never be edited here.  Almost all of them can be updated from
+  respective upstreams with "make fetch" (this should be done especially
+  before releases).  The only exception is the 'lib/COPYING' (from FSF),
+  which should be updated by hand whenever the GPL gets updated (which
+  shouldn't happen that often anyway :-)
 
 * Changes other than bug fixes must be mentioned in NEWS.  Important
   bug fixes should be mentioned in NEWS, too.
@@ -164,10 +164,6 @@
   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
 
@@ -198,8 +194,6 @@
   The repository will always have its own "odd" number so we can easily
   distinguish net and repo versions.)
 
-* Update ChangeLog.
-
 * Run this:
   ./bootstrap && ./configure && make && make check && make distcheck
 
@@ -208,8 +202,8 @@
 
 * Run `make git-release'.
   This will run "make dist" to create the tarballs, commit the last
-  NEWS/configure.ac/ChangeLog changes, tag the repository, sign
-  the tarballs, and upload them.
+  changes to NEWS, configure.ac and m4/amversion.m4, tag the repository,
+  sign the tarballs, and upload them.
   Use `make GNUPLOADFLAGS="--user key" git-release' to sign with
   a non-default key.
 
@@ -240,8 +234,8 @@
 
 -----
 
-Copyright (C) 2003, 2007, 2008, 2010, 2011 Free Software Foundation,
-Inc.
+Copyright (C) 2003, 2007, 2008, 2010, 2011, 2012 Free Software
+Foundation, Inc.
 
 This program is free software; you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
diff --git a/Makefile.am b/Makefile.am
index ed01bbb..d02731f 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -3,8 +3,8 @@
 ## Makefile for Automake.
 
 # Copyright (C) 1995, 1996, 1997, 1998, 1999, 2001, 2002, 2003, 2004,
-# 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation,
-# Inc.
+# 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Free Software
+# Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -23,7 +23,7 @@
 ## automake (run in doc, tests, and in the rebuild rules.)
 ## `.' goes before doc and tests, because the latter two directories
 ## run aclocal and automake.
-SUBDIRS = lib . doc m4 tests
+SUBDIRS = lib . contrib doc m4 tests
 
 bin_SCRIPTS = automake aclocal
 
@@ -91,17 +91,15 @@ do_subst = sed \
 automake: automake.in
 aclocal: aclocal.in
 automake aclocal: Makefile
-       rm -f $@ address@hidden
-       $(do_subst) $(srcdir)/address@hidden >address@hidden
-       chmod +x address@hidden
-       chmod a-w address@hidden
-       mv -f address@hidden $@
+       $(AM_V_at)rm -f $@ address@hidden
+       $(AM_V_GEN)$(do_subst) $(srcdir)/address@hidden >address@hidden
+       $(AM_V_at)chmod a+x,a-w address@hidden && mv -f address@hidden $@
 
 ## The master location for INSTALL is lib/INSTALL.
 ## This is where `make fetch' will install new versions.
 ## Make sure we also update this copy.
 INSTALL: lib/INSTALL
-       cp $(srcdir)/lib/INSTALL $@
+       $(AM_V_GEN)cp $(srcdir)/lib/INSTALL $@
 
 ################################################################
 ##
@@ -110,7 +108,8 @@ INSTALL: lib/INSTALL
 ##
 
 gitlog_to_changelog_command = $(PERL) $(srcdir)/lib/gitlog-to-changelog
-gitlog_to_changelog_options = --since='2011-12-28 00:00:00'
+gitlog_to_changelog_options = --since='2011-12-28 00:00:00' \
+                              --no-cluster --format '%s%n%n%b'
 
 # Automatic generation of the ChangeLog from git history.
 #
@@ -194,9 +193,16 @@ sc_unquoted_DESTDIR \
 sc_tabs_in_texi \
 sc_at_in_texi
 
-.PHONY: $(syntax_check_rules)
 $(syntax_check_rules): automake aclocal
 maintainer-check: $(syntax_check_rules)
+.PHONY: maintainer-check $(syntax_check_rules)
+
+## Check that the list of tests given in the Makefile is equal to the
+## list of all test scripts in the Automake testsuite.
+.PHONY: maintainer-check-list-of-tests
+maintainer-check-list-of-tests:
+       $(am__cd) tests && $(MAKE) $(AM_MAKEFLAGS) $@
+maintainer-check: maintainer-check-list-of-tests
 
 ## Look for test whose names can cause spurious failures when used as
 ## first argument to AC_INIT (chiefly because they might contain an
@@ -277,8 +283,8 @@ sc_diff_aclocal_in_aclocal:
 
 ## Syntax check with default Perl (on my machine, Perl 5).
 sc_perl_syntax:
-       perllibdir="./lib$(PATH_SEPARATOR)$(srcdir)/lib" $(PERL) -c -w automake
-       perllibdir="./lib$(PATH_SEPARATOR)$(srcdir)/lib" $(PERL) -c -w aclocal
+       @perllibdir="./lib$(PATH_SEPARATOR)$(srcdir)/lib" $(PERL) -c -w automake
+       @perllibdir="./lib$(PATH_SEPARATOR)$(srcdir)/lib" $(PERL) -c -w aclocal
 
 ## expect no instances of '${...}'.  However, $${...} is ok, since that
 ## is a shell construct, not a Makefile construct.
@@ -391,7 +397,8 @@ sc_AMDEP_TRUE_in_automake_in:
          exit 1; \
        fi
 
-## Tests should never call make directly.
+## Recursive make invocations should always pass $(AM_MAKEFLAGS)
+## to $(MAKE), for portability to non-GNU make.
 sc_tests_make_without_am_makeflags:
        @if grep '^[^#].*(MAKE) ' $(srcdir)/lib/am/*.am $(srcdir)/automake.in |\
                grep -v 'AM_MAKEFLAGS'; then \
@@ -401,7 +408,7 @@ sc_tests_make_without_am_makeflags:
 
 ## Tests should never call make directly.
 sc_tests_plain_make:
-       @if grep -v '^#' $(srcdir)/tests/*.test | grep ':[      ]*make'; then \
+       @if grep -v '^#' $(srcdir)/tests/*.test | $(EGREP) ':[  ]*make( |$$)'; 
then \
          echo 'Do not run "make" in the above tests.  Use "$$MAKE" instead.' 
1>&2; \
          exit 1; \
        fi
@@ -600,50 +607,66 @@ sc_at_in_texi:
          exit 1; \
        fi
 
-
-git-dist: maintainer-check
-## Make sure the NEWS file is up-to-date.
-       @if sed 1q $(srcdir)/NEWS | grep -e "$(VERSION)" > /dev/null; then :; 
else \
-         echo "NEWS not updated; not releasing" 1>&2; \
-         exit 1;                               \
-       fi
-## Build the distribution.  We expect the developer to have already run
-## "make check" and "make distcheck" on his own (as required in the
-## HACKING file, section "Release procedure").
-       $(MAKE) $(AM_MAKEFLAGS) dist
-## Finally, if anything was successful, commit the last changes and tag
-## the release in the repository.  We don't use RCS keywords so it's OK
-## to distribute the files before they were committed.
-       cd $(srcdir) && git commit -a -s && \
-          git tag -s "v$(VERSION)" -m "Release $(VERSION)"
-
-git-release: git-dist
-       case $(VERSION) in \
-         *[a-z]) dest=alpha;; \
-         *)      dest=ftp;; \
+## Tagging and/or uploading stable and beta releases.
+
+GIT = git
+
+version_rx = ^[1-9][0-9]*\.[0-9][0-9]*(\.[0-9][0-9]*)?
+stable_version_rx = $(version_rx)$$
+beta_version_rx = $(version_rx)[bdfhjlnprtvxz]$$
+match_version = echo "$(VERSION)" | $(EGREP) >/dev/null
+
+## Check that we don't have uncommitted or unstaged changes.
+## TODO: Maybe the git suite already offers a shortcut to verify if the
+## TODO: working directory is "clean" or not?  If yes, use that instead
+## TODO: of duplicating the logic here.
+git_must_have_clean_workdir = \
+  $(GIT) rev-parse --verify HEAD >/dev/null \
+    && $(GIT) update-index -q --refresh \
+    && $(GIT) diff-files --quiet \
+    && $(GIT) diff-index --quiet --cached HEAD \
+    || fatal "you have uncommitted or unstaged changes"
+
+determine_release_type = \
+  if $(match_version) '$(stable_version_rx)'; then \
+    release_type='Release' dest=ftp; \
+  elif $(match_version) '$(beta_version_rx)'; then \
+    release_type='Beta release' dest=alpha; \
+  else \
+    fatal "invalid version '$(VERSION)' for a release"; \
+  fi
+
+git-tag-release: maintainer-check
+       @set -e; set -u; \
+       fatal () { echo "$@: $$*; not tagging" >&2; exit 1; }; \
+       case '$(AM_TAG_DRYRUN)' in \
+         ""|[nN]|[nN]o|NO) run="";; \
+         *) run="echo Running:";; \
        esac; \
-       $(srcdir)/lib/gnupload $(GNUPLOADFLAGS) \
-         --to $$dest.gnu.org:automake $(DIST_ARCHIVES)
-
-git-diff:
-       thisver="v$(VERSION)"; \
-       if test -z "$$OLDVERSION"; then \
-         prevno=`echo "$(VERSION)" - 0.01 | bc | sed 's/^\./0./'`; \
-       else prevno="$$OLDVERSION"; fi; \
-       prevver=v$$prevno; \
-       git diff $$prevver..$$thisver $(PACKAGE) \
-           > $(PACKAGE)-$$prevno-$(VERSION).diff
-
-## Check our path lengths.
-path-check: distdir
-       (cd $(distdir) && \
-## FIXME there's got to be a better way!  pathchk should take the list
-## of files on stdin, at least.
-         find . -print | xargs pathchk -p); \
-         estatus=$$?; \
-         find $(distdir) -type d '!' -perm -200 -exec chmod u+w {} ';'; \
-         rm -rf $(distdir); \
-         exit $$estatus
+       $(determine_release_type); \
+       $(git_must_have_clean_workdir); \
+## Make sure the NEWS file is up-to-date.
+       sed 1q $(srcdir)/NEWS | grep '$(VERSION)' >/dev/null \
+         || fatal "NEWS not updated"; \
+## If all was successful, tag the release in the local repository.
+       $$run $(GIT) tag -s "v$(VERSION)" -m "$$release_type $(VERSION)"
+
+git-upload-release:
+       @set -e; set -u; \
+       fatal () { echo "$@: $$*; not releasing" >&2; exit 1; }; \
+       $(determine_release_type); \
+       dest=$$dest.gnu.org:automake; \
+       $(git_must_have_clean_workdir); \
+## Check that we are releasing from a valid tag.
+       tag=`$(GIT) describe` \
+         && case $$tag in "v$(VERSION)") true;; *) false;; esac \
+         || fatal "you can only create a release from a tagged version"; \
+## Build and upload the distribution tarball(s).
+       $(MAKE) $(AM_MAKEFLAGS) dist || exit 1; \
+       echo Will upload to $$dest: $(DIST_ARCHIVES); \
+       $(srcdir)/lib/gnupload $(GNUPLOADFLAGS) --to $$dest $(DIST_ARCHIVES)
+
+.PHONY: git-upload-release git-tag-release
 
 ## Visually comparing differences between the Makefile.in files in
 ## automake's own build system as generated in two different branches
@@ -720,17 +743,17 @@ WGET_SV_CVS = $(WGET) 
http://savannah.gnu.org/cgi-bin/viewcvs/~checkout~/
 WGET_SV_GIT_CF = $(WGET) 
'http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;hb=HEAD;f='
 WGET_SV_GIT_AC = $(WGET) 
'http://git.savannah.gnu.org/gitweb/?p=autoconf.git;a=blob_plain;hb=HEAD;f='
 WGET_SV_GIT_GL = $(WGET) 
'http://git.savannah.gnu.org/gitweb/?p=gnulib.git;a=blob_plain;hb=HEAD;f='
-WGET_GCC = $(WGET) 'http://gcc.gnu.org/viewcvs/*checkout*/trunk/'
 
 ## Files that we fetch and which we compare against.
-## FIXME should be a lot more here
+## The 'lib/COPYING' file must still be synced by hand.
 FETCHFILES = \
 INSTALL \
-config-ml.in \
 config.guess \
 config.sub \
-symlink-tree \
-texinfo.tex
+gnupload \
+gitlog-to-changelog \
+texinfo.tex \
+update-copyright
 
 ## Fetch the latest versions of files we care about.
 fetch:
@@ -742,9 +765,9 @@ fetch:
        $(WGET_SV_GIT_CF)config.sub -O config.sub && \
        $(WGET_SV_CVS)texinfo/texinfo/doc/texinfo.tex -O texinfo.tex && \
        $(WGET_SV_GIT_GL)doc/INSTALL -O INSTALL && \
-       $(WGET_SV_GIT_GL)build-aux/gitlog-to-changelog -O gitlog-to-changelog 
&& \
-       $(WGET_GCC)config-ml.in -O config-ml.in && \
-       $(WGET_GCC)symlink-tree -O symlink-tree)
+       $(WGET_SV_GIT_GL)build-aux/gnupload -O gnupload && \
+       $(WGET_SV_GIT_GL)build-aux/update-copyright -O update-copyright && \
+       $(WGET_SV_GIT_GL)build-aux/gitlog-to-changelog -O gitlog-to-changelog)
 ## Don't exit after test because we want to give as many errors as
 ## possible.
        @stat=0; for file in $(FETCHFILES); do \
@@ -759,12 +782,14 @@ fetch:
        test $$stat = 0 || \
          echo "See Fetchdir/update.patch for a log of the changes."; \
        exit $$stat
+.PHONY: fetch
 
 ## Generate release statistics, for the table in automake.texi.
 ## This has to be run in an up to date build tree, but there must
 ## be no temp files nor unused other files lying around!
 release-stats: ps
-       @am=`wc -l < automake` && \
+       $(AM_V_GEN): && \
+       am=`wc -l < automake` && \
        acl=`wc -l < aclocal` && \
        pmfiles="lib/Automake/*.pm" && \
        if test . != '$(srcdir)'; then pmfiles="$$pmfiles 
$(srcdir)/lib/Automake/*.pm"; \
@@ -789,3 +814,16 @@ release-stats: ps
        printf '@item %s @tab %-6s @tab %4d @tab %4d @tab %4d @tab %4d %-4s 
@tab %4d %-4s @tab %3d @tab %d %-4s\n' \
                      $$today $(VERSION) $$am    $$acl    $$pm   $$aml 
"($$amf)" $$m4l "($$m4f)" $$doc $$t "($$tgen)"
 .PHONY: release-stats
+
+update_copyright_env = \
+  UPDATE_COPYRIGHT_FORCE=1 \
+  UPDATE_COPYRIGHT_USE_INTERVALS=2
+
+.PHONY: update-copyright
+update-copyright:
+       $(AM_V_GEN)excluded_re=`echo $(FETCHFILES) \
+         | sed -e 's|^|lib/|' -e 's| | lib/|g' -e 's, ,|,g'`; \
+       $(GIT) ls-files \
+         | grep -Ev '/(COPYING|INSTALL)' \
+         | grep -Ev "^($$excluded_re)$$" \
+         | $(update_copyright_env) xargs $(srcdir)/lib/$@
diff --git a/NEWS b/NEWS
index 21be8ac..442b303 100644
--- a/NEWS
+++ b/NEWS
@@ -2,6 +2,14 @@ New in 1.11.0a:
 
 * WARNING: Future backward-incompatibilities!
 
+  - The support for the "obscure" multilib feature has been deprecated,
+    and will be moved out of the automake core in the next major Automake
+    release (1.12).
+
+  - The support for ".log -> .html" conversion and the check-html and
+    recheck-html targets will be removed in the next major Automake
+    release (1.12).
+
   - The `lzma' compression format for distribution archives has been
     deprecated in favor of `xz' and `lzip', and will be removed in the
     next major Automake release (1.12).
@@ -32,6 +40,19 @@ New in 1.11.0a:
 
 * Miscellaneous changes:
 
+  - Automake's own build system is more silent by default, making use of
+    the 'silent-rules' option.
+
+  - The master copy of the `gnupload' script is now maintained in gnulib,
+    not in automake.
+
+  - The `missing' script doesn't try to wrap calls to `tar' anymore.
+
+  - "make dist" doesn't wrap `tar' invocations with the `missing' script
+    anymore.  Similarly, the obsolescent variable `$(AMTAR)' (which you
+    shouldn't be using BTW ;-) does not invoke the missing script anymore
+    to wrap tar, but simply invokes the `tar' program itself.
+
   - "make dist" can now create lzip-compressed tarballs.
 
   - In the Automake info documentation, the Top node and the nodes about
@@ -83,10 +104,30 @@ New in 1.11.0a:
     the `${infodir}/dir' file, by exporting the new environment variable
     `AM_UPDATE_INFO_DIR' to the value "no".
 
+  - For programs and libraries, automake now detects EXTRA_foo_DEPENDENCIES
+    and adds them to the normal list of dependencies, but without
+    overwriting the foo_DEPENDENCIES variable, which is normally computed
+    by automake.
+
+  - The 'ar-lib' script now ignores the "s" (symbol index) and "S" (no
+    symbol index) modifiers as well as the "s" action, as the symbol index
+    is created unconditionally by Microsoft lib.  Also, the "q" (quick)
+    action is now a synonym for "r" (replace).  Also, the script has been
+    ignoring the "v" (verbose) modifier already since Automake 1.11.3.
+
 Bugs fixed in 1.11.0a:
 
+* Bugs introduced by 1.11.2:
+
+  - Automake now correctly recognizes the prefix/primary combination
+   `pkglibexec_SCRIPTS' as valid.
+
 * Bugs introduced by 1.11:
 
+  - The parallel-tests harness doesn't trip anymore on sed implementations
+    with stricter limits on the length of input lines (problem seen at
+    least on Solaris 8).
+
   - The `parallel-tests' test driver works around a GNU make 3.80 bug with
     trailing white space in the test list (`TESTS = foo $(EMPTY)'), and
     does not report spurious successes when used with concurrent FreeBSD
@@ -116,6 +157,8 @@ Bugs fixed in 1.11.0a:
 
 * Long-standing bugs:
 
+  - Vala support now works better in VPATH setups.
+
   - The "deleted header file problem" for *.am files is avoided by stub
     rules.  This allows `make' to trigger a rerun of `automake' also if
     some previously needed `.am' file has been removed.
diff --git a/THANKS b/THANKS
index e9da06c..d54e9d4 100644
--- a/THANKS
+++ b/THANKS
@@ -3,6 +3,7 @@ It would not be what it is today without the invaluable help of 
these
 people:
 
 Adam J. Richter                address@hidden
+Adam Sampson           address@hidden
 Adrian Bunk            address@hidden
 Akim Demaille          address@hidden
 Alan Modra             address@hidden
@@ -78,6 +79,7 @@ David Pashley         address@hidden
 David Zaroski          address@hidden
 Dean Povey             address@hidden
 Dennis J. Linse                address@hidden
+Dennis Schridde                address@hidden
 Derek R. Price         address@hidden
 Diab Jerius            address@hidden
 Didier Cassirame       address@hidden
@@ -192,6 +194,7 @@ Klaus Reichl                address@hidden
 Krzysztof Żelechowski address@hidden
 L. Peter Deutsch       address@hidden
 Ladislav Strojil       address@hidden
+Larry Daniel           address@hidden
 Larry Jones            address@hidden
 Lars Hecking           address@hidden
 Lars J. Aas            address@hidden
@@ -261,6 +264,7 @@ Olivier Louchart-Fletcher address@hidden
 Olly Betts             address@hidden
 Oren Ben-Kiki          address@hidden
 Owen Taylor            address@hidden
+Quentin Glidic         address@hidden
 Patrick Welche         address@hidden
 Patrik Weiskircher     address@hidden
 Paul Berrevoets                address@hidden
@@ -314,6 +318,7 @@ Roman Fietze                address@hidden
 Ronald Landheer                address@hidden
 Roumen Petrov          address@hidden
 Rusty Ballinger                address@hidden
+Ryan Lortie            address@hidden
 Ryan T. Sammartino     address@hidden
 Sam Hocevar            address@hidden
 Sam Sirlin             address@hidden
diff --git a/aclocal.in b/aclocal.in
index 2ae9a89..ed1d8d9 100644
--- a/aclocal.in
+++ b/aclocal.in
@@ -945,6 +945,8 @@ sub parse_arguments ()
 
   my %cli_options =
     (
+     'help'            => sub { usage(0); },
+     'version'         => \&version,
      'acdir=s'         => \&handle_acdir_option,
      'system-acdir=s'  => sub { shift; @system_includes = @_; },
      'automake-acdir=s'        => sub { shift; @automake_includes = @_; },
@@ -958,55 +960,9 @@ sub parse_arguments ()
      'verbose'         => sub { setup_channel 'verb', silent => 0; },
      'W|warnings=s'     => \&parse_warnings,
      );
-  use Getopt::Long;
-  Getopt::Long::config ("bundling", "pass_through");
-
-  # See if --version or --help is used.  We want to process these before
-  # anything else because the GNU Coding Standards require us to
-  # `exit 0' after processing these options, and we can't guarantee this
-  # if we treat other options first.  (Handling other options first
-  # could produce error diagnostics, and in this condition it is
-  # confusing if aclocal does `exit 0'.)
-  my %cli_options_1st_pass =
-    (
-     'version' => \&version,
-     'help'    => sub { usage(0); },
-     # Recognize all other options (and their arguments) but do nothing.
-     map { $_ => sub {} } (keys %cli_options)
-     );
-  my @ARGV_backup = @ARGV;
-  Getopt::Long::GetOptions %cli_options_1st_pass
-    or exit 1;
-  @ARGV = @ARGV_backup;
-
-  # Now *really* process the options.  This time we know that --help
-  # and --version are not present, but we specify them nonetheless so
-  # that ambiguous abbreviation are diagnosed.
-  Getopt::Long::GetOptions %cli_options, 'version' => sub {}, 'help' => sub {}
-    or exit 1;
-
-  if (@ARGV)
-    {
-      my %argopts;
-      for my $k (keys %cli_options)
-       {
-         if ($k =~ /(.*)=s$/)
-           {
-             map { $argopts{(length ($_) == 1)
-                            ? "-$_" : "--$_" } = 1; } (split (/\|/, $1));
-           }
-       }
-      if (exists $argopts{$ARGV[0]})
-       {
-         fatal ("option `$ARGV[0]' requires an argument\n"
-                . "Try `$0 --help' for more information.");
-       }
-      else
-       {
-         fatal ("unrecognized option `$ARGV[0]'\n"
-                . "Try `$0 --help' for more information.");
-       }
-    }
+
+  use Automake::Getopt ();
+  Automake::Getopt::parse_options %cli_options;
 
   if ($print_and_exit)
     {
diff --git a/automake.in b/automake.in
index e178642..08b3300 100644
--- a/automake.in
+++ b/automake.in
@@ -7,8 +7,8 @@ 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, 2011 Free Software
-# Foundation, Inc.
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Free
+# Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -2681,6 +2681,7 @@ sub handle_programs
                  "use `${xname}_LDADD', not `${xname}_LIBADD'");
 
       set_seen ($xname . '_DEPENDENCIES');
+      set_seen ('EXTRA_' . $xname . '_DEPENDENCIES');
       set_seen ($xname . '_LDFLAGS');
 
       # Determine program to use for link.
@@ -2792,6 +2793,7 @@ sub handle_libraries
 
       # Make sure we at look at this.
       set_seen ($xlib . '_DEPENDENCIES');
+      set_seen ('EXTRA_' . $xlib . '_DEPENDENCIES');
 
       &handle_source_transform ($xlib, $onelib, $obj, $where,
                                NONLIBTOOL => 1, LIBTOOL => 0);
@@ -2978,6 +2980,7 @@ sub handle_ltlibraries
       # Make sure we look at these.
       set_seen ($xlib . '_LDFLAGS');
       set_seen ($xlib . '_DEPENDENCIES');
+      set_seen ('EXTRA_' . $xlib . '_DEPENDENCIES');
 
       # Generate support for conditional object inclusion in
       # libraries.
@@ -3105,7 +3108,7 @@ sub handle_scripts
     # useful to sometimes distribute scripts verbatim.  This happens
     # e.g. in Automake itself.
     &am_install_var ('-candist', 'scripts', 'SCRIPTS',
-                    'bin', 'sbin', 'libexec', 'pkgdata',
+                    'bin', 'sbin', 'libexec', 'pkglibexec', 'pkgdata',
                     'noinst', 'check');
 }
 
@@ -4972,9 +4975,11 @@ sub handle_tests
   if (var ('TESTS'))
     {
       push (@check_tests, 'check-TESTS');
+      my $check_deps = "@check";
       $output_rules .= &file_contents ('check', new Automake::Location,
                                       COLOR => !! option 'color-tests',
-                                      PARALLEL_TESTS => !! option 
'parallel-tests');
+                                      PARALLEL_TESTS => !! option 
'parallel-tests',
+                                       CHECK_DEPS => $check_deps);
 
       # Tests that are known programs should have $(EXEEXT) appended.
       # For matching purposes, we need to adjust XFAIL_TESTS as well.
@@ -4985,7 +4990,6 @@ sub handle_tests
       if (option 'parallel-tests')
         {
          define_variable ('TEST_SUITE_LOG', 'test-suite.log', INTERNAL);
-         define_variable ('TEST_SUITE_HTML', '$(TEST_SUITE_LOG:.log=.html)', 
INTERNAL);
          my $suff = '.test';
          my $at_exeext = '';
          my $handle_exeext = exists $configure_vars{'EXEEXT'};
@@ -5101,7 +5105,6 @@ sub handle_tests
          $clean_files{'$(TEST_LOGS_TMP)'} = MOSTLY_CLEAN;
          $clean_files{'$(TEST_LOGS)'} = MOSTLY_CLEAN;
          $clean_files{'$(TEST_SUITE_LOG)'} = MOSTLY_CLEAN;
-         $clean_files{'$(TEST_SUITE_HTML)'} = MOSTLY_CLEAN;
        }
     }
 }
@@ -5267,10 +5270,11 @@ sub scan_autoconf_config_files ($$)
       # Handle $local:$input syntax.
       my ($local, @rest) = split (/:/);
       @rest = ("$local.in",) unless @rest;
-      msg ('portability', $where,
-         "Omit leading `./' from config file names such as `$local',"
-         . "\nas not all make implementations treat `file' and `./file' 
equally.")
-       if ($local =~ /^\.\//);
+      # Keep in sync with 'conffile-leading-dot.test'.
+      msg ('unsupported', $where,
+           "omit leading './' from config file names such as '$local';"
+           . "\nremake rules might be subtly broken otherwise")
+        if ($local =~ /^\.\//);
       my $input = locate_am @rest;
       if ($input)
        {
@@ -6032,20 +6036,19 @@ sub lang_vala_finish_target ($$)
   my ($self, $name) = @_;
 
   my $derived = canonicalize ($name);
-  my $varname = $derived . '_SOURCES';
-  my $var = var ($varname);
+  my $var = var "${derived}_SOURCES";
+  return unless $var;
 
-  if ($var)
+  my @vala_sources = grep { /\.vala$/ } ($var->value_as_list_recursive);
+
+  foreach my $vala_file (@vala_sources)
     {
-      foreach my $file ($var->value_as_list_recursive)
-        {
-          $output_rules .= "\$(srcdir)/$file: 
\$(srcdir)/${derived}_vala.stamp\n"
-            . "address@hidden test -f \$@; then :; else rm -f 
\$(srcdir)/${derived}_vala.stamp; fi\n"
-            . "address@hidden test -f \$@; then :; else \\\n"
-            . "\t  \$(am__cd) \$(srcdir) && \$(MAKE) \$(AM_MAKEFLAGS) 
${derived}_vala.stamp; \\\n"
-           . "\tfi\n"
-            if $file =~ s/(.*)\.vala$/$1.c/;
-        }
+      (my $c_file = $vala_file) =~ s/(.*)\.vala$/$1.c/;
+      $output_rules .= "\$(srcdir)/$c_file: \$(srcdir)/${derived}_vala.stamp\n"
+        . "address@hidden test -f \$@; then :; else rm -f 
\$(srcdir)/${derived}_vala.stamp; fi\n"
+        . "address@hidden test -f \$@; then :; else \\\n"
+        . "\t  \$(MAKE) \$(AM_MAKEFLAGS) \$(srcdir)/${derived}_vala.stamp; 
\\\n"
+        . "\tfi\n"
     }
 
   # Add rebuild rules for generated header and vapi files
@@ -6062,7 +6065,7 @@ sub lang_vala_finish_target ($$)
              $output_rules .= "\$(srcdir)/$headerfile: 
\$(srcdir)/${derived}_vala.stamp\n"
                . "address@hidden test -f \$@; then :; else rm -f 
\$(srcdir)/${derived}_vala.stamp; fi\n"
                . "address@hidden test -f \$@; then :; else \\\n"
-               . "\t  \$(am__cd) \$(srcdir) && \$(MAKE) \$(AM_MAKEFLAGS) 
${derived}_vala.stamp; \\\n"
+               . "\t  \$(MAKE) \$(AM_MAKEFLAGS) 
\$(srcdir)/${derived}_vala.stamp; \\\n"
                . "\tfi\n";
 
              # valac is not used when building from dist tarballs
@@ -6095,9 +6098,16 @@ sub lang_vala_finish_target ($$)
   my $silent = silent_flag ();
 
   $output_rules .=
-    "${derived}_vala.stamp: \$(${derived}_SOURCES)\n".
-    "\t${verbose}${compile} \$(${derived}_SOURCES)\n".
-    "\t${silent}touch address@hidden";
+    "\$(srcdir)/${derived}_vala.stamp: @vala_sources\n".
+# Since the C files generated from the vala sources depend on the
+# ${derived}_vala.stamp file, we must ensure its timestamp is older than
+# those of the C files generated by the valac invocation below (this is
+# especially important on systems with sub-second timestamp resolution).
+# Thus we need to create the stamp file *before* invoking valac, and to
+# move it to its final location only after valac has been invoked.
+    "\t${silent}rm -f \$\@ && echo stamp > address@hidden".
+    "\t${verbose}\$(am__cd) \$(srcdir) && $compile @vala_sources\n".
+    "\t${silent}mv -f address@hidden address@hidden";
 
   push_dist_common ("${derived}_vala.stamp");
 
@@ -8508,6 +8518,8 @@ sub parse_arguments ()
   my $cli_where = new Automake::Location;
   my %cli_options =
     (
+     'version' => \&version,
+     'help'    => \&usage,
      'libdir=s'        => \$libdir,
      'gnu'             => sub { set_strictness ('gnu'); },
      'gnits'           => sub { set_strictness ('gnits'); },
@@ -8528,32 +8540,9 @@ sub parse_arguments ()
      'Werror'           => sub { parse_warnings 'W', 'error'; },
      'Wno-error'        => sub { parse_warnings 'W', 'no-error'; },
      );
-  use Getopt::Long;
-  Getopt::Long::config ("bundling", "pass_through");
-
-  # See if --version or --help is used.  We want to process these before
-  # anything else because the GNU Coding Standards require us to
-  # `exit 0' after processing these options, and we can't guarantee this
-  # if we treat other options first.  (Handling other options first
-  # could produce error diagnostics, and in this condition it is
-  # confusing if Automake does `exit 0'.)
-  my %cli_options_1st_pass =
-    (
-     'version' => \&version,
-     'help'    => \&usage,
-     # Recognize all other options (and their arguments) but do nothing.
-     map { $_ => sub {} } (keys %cli_options)
-     );
-  my @ARGV_backup = @ARGV;
-  Getopt::Long::GetOptions %cli_options_1st_pass
-    or exit 1;
-  @ARGV = @ARGV_backup;
 
-  # Now *really* process the options.  This time we know that --help
-  # and --version are not present, but we specify them nonetheless so
-  # that ambiguous abbreviation are diagnosed.
-  Getopt::Long::GetOptions %cli_options, 'version' => sub {}, 'help' => sub {}
-    or exit 1;
+  use Automake::Getopt ();
+  Automake::Getopt::parse_options %cli_options;
 
   if (defined $output_directory)
     {
@@ -8567,33 +8556,6 @@ sub parse_arguments ()
 
   return unless @ARGV;
 
-  if ($ARGV[0] =~ /^-./)
-    {
-      my %argopts;
-      for my $k (keys %cli_options)
-       {
-         if ($k =~ /(.*)=s$/)
-           {
-             map { $argopts{(length ($_) == 1)
-                            ? "-$_" : "--$_" } = 1; } (split (/\|/, $1));
-           }
-       }
-      if ($ARGV[0] eq '--')
-       {
-         shift @ARGV;
-       }
-      elsif (exists $argopts{$ARGV[0]})
-       {
-         fatal ("option `$ARGV[0]' requires an argument\n"
-                . "Try `$0 --help' for more information.");
-       }
-      else
-       {
-         fatal ("unrecognized option `$ARGV[0]'.\n"
-                . "Try `$0 --help' for more information.");
-       }
-    }
-
   my $errspec = 0;
   foreach my $arg (@ARGV)
     {
diff --git a/configure.ac b/configure.ac
index 1ae68c5..18dbd8a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,8 +1,8 @@
 # Process this file with autoconf to produce a configure script.
 
 # Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003,
-# 2004, 2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation,
-# Inc.
+# 2004, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Free Software
+# Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -23,6 +23,8 @@ AC_INIT([GNU Automake], [1.11.0a], address@hidden)
 AC_CONFIG_SRCDIR([automake.in])
 AC_CONFIG_AUX_DIR([lib])
 
+AM_SILENT_RULES([yes])
+
 AC_CANONICAL_BUILD
 
 # Save the AUTOCONF setting before AM_INIT_AUTOMAKE overrides it; this
@@ -204,9 +206,9 @@ AC_SUBST([sh_errexit_works], [$am_cv_sh_errexit_works])
 
 AC_CONFIG_FILES([
   Makefile
+  contrib/Makefile
   doc/Makefile
   lib/Automake/Makefile
-  lib/Automake/tests/Makefile
   lib/Makefile
   lib/am/Makefile
   m4/Makefile
diff --git a/tests/nodepcomp.test b/contrib/Makefile.am
old mode 100755
new mode 100644
similarity index 74%
copy from tests/nodepcomp.test
copy to contrib/Makefile.am
index 735c363..820b547
--- a/tests/nodepcomp.test
+++ b/contrib/Makefile.am
@@ -1,28 +1,22 @@
-#! /bin/sh
-# Copyright (C) 2000, 2001, 2002, 2010 Free Software Foundation, Inc.
-#
+## Process this file with automake to create Makefile.in
+
+## Makefile for Automake contrib.
+
+# Copyright (C) 2012 Free Software Foundation, Inc.
+
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
 # the Free Software Foundation; either version 2, or (at your option)
 # any later version.
-#
+
 # This program is distributed in the hope that it will be useful,
 # but WITHOUT ANY WARRANTY; without even the implied warranty of
 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 # GNU General Public License for more details.
-#
+
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
-# Test to make sure depcomp isn't always required.
-
-. ./defs || Exit 1
-
-set -e
-
-rm -f depcomp
-
-: > Makefile.am
-
-$ACLOCAL
-$AUTOMAKE
+EXTRA_DIST = \
+  multilib/multi.m4 \
+  README
diff --git a/contrib/README b/contrib/README
new file mode 100644
index 0000000..bbef72f
--- /dev/null
+++ b/contrib/README
@@ -0,0 +1,27 @@
+This is the 'contrib' directory of the GNU Automake distribution.
+
+Here you'll find additions to the Automake base distribution, in form of
+makefile fragments, m4 macros, scripts, documentation, et cetera.  Such
+addition that might be useful for a significant percentage of its general
+audience, but (for one reason or another) are not deemed appropriate for
+inclusion into the Automake core.
+
+There are several reasons for which a feature can be kept in contrib:
+
+  1. The long-term usefulness of the feature is debatable and uncertain;
+     on-field and real-word testing are necessary to prove or disprove
+     its usefulness, before the feature can be committed into the Automake
+     core (as doing so too early would later force us to continue the
+     support for backward-compatibility, even if the features proves
+     flawed or fails to attract widespread use).
+  
+  2. The APIs or overall design of the feature are still unstable, and
+     need on-field testing to iron warts and usability bugs, or uncover
+     potential flaws.
+
+  3. The feature was an historical one, mostly obsoleted but still used
+     "here and there" in the wild; so we want to to deprecate it and
+     remove it from the Automake core, but cannot remove it altogether,
+     for the sake of those still-existing usage.  So it gets moved in
+     contrib.
+
diff --git a/m4/multi.m4 b/contrib/multilib/multi.m4
similarity index 100%
copy from m4/multi.m4
copy to contrib/multilib/multi.m4
diff --git a/doc/Makefile.am b/doc/Makefile.am
index f4f76c6..655673b 100644
--- a/doc/Makefile.am
+++ b/doc/Makefile.am
@@ -2,7 +2,8 @@
 
 ## Makefile for Automake.
 
-# Copyright (C) 2003, 2006, 2008, 2009  Free Software Foundation, Inc.
+# Copyright (C) 2003, 2006, 2008, 2009, 2012 Free Software Foundation,
+# Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -70,7 +71,8 @@ dist_doc_DATA = $(srcdir)/amhello-1.0.tar.gz
 # aclocal-$(APIVERSION) and automake-$(APIVERSION) are generated by
 # configure in tests/.
 $(srcdir)/amhello-1.0.tar.gz: $(amhello_sources) $(top_srcdir)/configure.ac
-       PATH="`pwd`/../tests$(PATH_SEPARATOR)$$PATH" && \
+       $(AM_V_GEN)abs_top_builddir=`cd '$(top_builddir)' && pwd` && \
+       PATH="$$abs_top_builddir/tests$(PATH_SEPARATOR)$$PATH" && \
        export PATH && \
        cd $(srcdir)/amhello && \
        ACLOCAL=aclocal-$(APIVERSION) && export ACLOCAL && \
diff --git a/doc/automake.texi b/doc/automake.texi
index bc19ad0..7421029 100644
--- a/doc/automake.texi
+++ b/doc/automake.texi
@@ -24,7 +24,7 @@ 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, 2011 Free Software
+2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Free Software
 Foundation, Inc.
 
 @quotation
@@ -323,7 +323,7 @@ Miscellaneous Rules
 
 * Tags::                        Interfacing to etags and mkid
 * Suffixes::                    Handling new file extensions
-* Multilibs::                   Support for multilibs.
+* Multilibs::                   Support for multilibs (deprecated, soon to be 
removed).
 
 Conditionals
 
@@ -2278,8 +2278,11 @@ release.
 
 @item config-ml.in
 This file is not a program, it is a @file{configure} fragment used for
-multilib support (@pxref{Multilibs}).  This file is maintained in the
-GCC tree at @url{http://gcc.gnu.org/svn.html}.
+multilib support (@pxref{Multilibs}).  Since the Automake multilib
+support has been @emph{deprecated} and targeted for removal, this
+file is going to be @emph{removed from the Automake core} in the next
+major release.  The master copy of this file is maintained in the GCC
+tree at @url{http://gcc.gnu.org/svn.html}.
 
 @item depcomp
 This program understands how to run a compiler so that it will
@@ -2320,8 +2323,11 @@ This is used to byte-compile Python scripts.
 @item symlink-tree
 This program duplicates a tree of directories, using symbolic links
 instead of copying files.  Such an operation is performed when building
-multilibs (@pxref{Multilibs}).  This file is maintained in the GCC
-tree at @url{http://gcc.gnu.org/svn.html}.
+multilibs (@pxref{Multilibs}).  Since the Automake multilib support has
+been @emph{deprecated} and targeted for removal, this file is going to
+be @emph{removed from the Automake core} in the next major release.
+The master copy of this file is maintained in the GCC tree at
address@hidden://gcc.gnu.org/svn.html}.
 
 @item texinfo.tex
 Not a program, this file is required for @samp{make dvi}, @samp{make
@@ -3921,12 +3927,18 @@ Automake ships with several Autoconf macros that you 
can use from your
 
 @item AM_ENABLE_MULTILIB
 @acindex AM_ENABLE_MULTILIB
-This is used when a ``multilib'' library is being built.  The first
-optional argument is the name of the @file{Makefile} being generated; it
-defaults to @samp{Makefile}.  The second optional argument is used to find
-the top source directory; it defaults to the empty string (generally
-this should not be used unless you are familiar with the internals).
address@hidden
+
+This is used when a ``multilib'' library is being built.  Please be
+aware that multilib support @emph{will be removed} from the Automake
+core in the next major release, and then @emph{this macro will go away
+as well} (even if a ``frozen'' version of will remain available in the
address@hidden/} directory of the Automake distribution).
+
+The first optional argument is the name of the @file{Makefile} being
+generated; it defaults to @samp{Makefile}.  The second optional argument
+is used to find the top source directory; it defaults to the empty
+string (generally this should not be used unless you are familiar with
+the internals).  @xref{Multilibs}.
 
 @item AM_INIT_AUTOMAKE([OPTIONS])
 @itemx AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
@@ -4849,11 +4861,12 @@ this purpose.
 
 @cindex @code{_DEPENDENCIES}, defined
 @vindex maude_DEPENDENCIES
address@hidden EXTRA_maude_DEPENDENCIES
 It is also occasionally useful to have a program depend on some other
 target that is not actually part of that program.  This can be done
-using the @address@hidden variable.  Each program
-depends on the contents of such a variable, but no further
-interpretation is done.
+using either the @address@hidden or the
address@hidden@var{prog}_DEPENDENCIES} variable.  Each program depends on
+the contents both variables, but no further interpretation is done.
 
 Since these dependencies are associated to the link rule used to
 create the programs they should normally list files used by the link
@@ -4876,6 +4889,10 @@ generated.
 @ref{Conditional Sources} shows a situation where @code{_DEPENDENCIES}
 may be used.
 
+The @address@hidden may be useful for cases where
+you merely want to augment the @command{automake}-generated
address@hidden@var{prog}_DEPENDENCIES} rather than replacing it.
+
 @cindex @code{LDADD} and @option{-l}
 @cindex @option{-l} and @code{LDADD}
 We recommend that you avoid using @option{-l} options in @code{LDADD}
@@ -5752,6 +5769,7 @@ option, so they should not be mode-specific options 
(those belong to
 the compiler or linker flags).  @xref{Libtool Flags}.
 
 @item maude_DEPENDENCIES
address@hidden EXTRA_maude_DEPENDENCIES
 It is also occasionally useful to have a target (program or library)
 depend on some other file that is not actually part of that target.
 This can be done using the @code{_DEPENDENCIES} variable.  Each
@@ -5782,6 +5800,10 @@ compilation using an @code{AC_SUBST} variable that 
contains a list of
 objects.  @xref{Conditional Sources}, and @ref{Conditional Libtool
 Sources}.
 
+The @code{EXTRA_*_DEPENDENCIES} variable may be useful for cases where
+you merely want to augment the @command{automake}-generated
address@hidden variable rather than replacing it.
+
 @item maude_LINK
 You can override the linker on a per-program basis.  By default the
 linker is chosen according to the languages used by the program.  For
@@ -5992,9 +6014,10 @@ However there is no need to list the corresponding 
sources in
 automatically adds @samp{$(LIBOBJS)} and @samp{$(ALLOCA)} to the
 dependencies, and it will discover the list of corresponding source
 files automatically (by tracing the invocations of the
address@hidden Autoconf macros).  However, if you have already
-defined @samp{*_DEPENDENCIES} explicitly for an unrelated reason, then
-you have to add these variables manually.
address@hidden Autoconf macros).  If you have already defined
address@hidden explicitly for an unrelated reason, then you
+either need to add these variables manually, or use
address@hidden instead of @samp{*_DEPENDENCIES}.
 
 These variables are usually used to build a portability library that
 is linked with all the programs of the project.  We now review a
@@ -7117,11 +7140,12 @@ prefix as with other primaries.
 @vindex sbin_SCRIPTS
 @vindex libexec_SCRIPTS
 @vindex pkgdata_SCRIPTS
address@hidden pkglibexec_SCRIPTS
 @vindex noinst_SCRIPTS
 @vindex check_SCRIPTS
 
 Scripts can be installed in @code{bindir}, @code{sbindir},
address@hidden, or @code{pkgdatadir}.
address@hidden, @code{pkglibexecdir}, or @code{pkgdatadir}.
 
 Scripts that need not be installed can be listed in
 @code{noinst_SCRIPTS}, and among them, those which are needed only by
@@ -8846,17 +8870,17 @@ by the tests, not the tests themselves.  Of course you 
can set
 @section Simple Tests using @samp{parallel-tests}
 @cindex @option{parallel-tests}, Using
 
-The option @option{parallel-tests} (@pxref{Options}) enables a test
-suite driver that is mostly compatible to the simple test driver described
-in the previous section, but provides a few more features and slightly 
different
-semantics.  It features concurrent execution of tests with @code{make -j},
-allows to specify inter-test dependencies, lazy reruns of tests that
-have not completed in a prior run, summary and verbose output in
address@hidden (reStructuredText) and @samp{HTML} format, and hard errors
-for exceptional failures.  Similar to the simple test driver,
address@hidden, @code{AM_COLOR_TESTS}, @code{XFAIL_TESTS}, and
-the @code{check_*} variables are honored, and the environment variable
address@hidden is set during test execution.
+The option @option{parallel-tests} (@pxref{Options}) enables a test suite
+driver that is mostly compatible to the simple test driver described in
+the previous section, but provides a few more features and slightly
+different semantics.  It features concurrent execution of tests with
address@hidden -j} and automatic collection of the test scripts output and
+summary thereof in @file{.log} files, and allows to specify inter-test
+dependencies, lazy reruns of tests that have not completed in a prior
+run, and hard errors for exceptional failures.  Similar to the simple
+test driver, @code{TESTS_ENVIRONMENT}, @code{AM_COLOR_TESTS},
address@hidden, and the @code{check_*} variables are honored,
+and the environment variable @env{srcdir} is set during test execution.
 
 This test driver is still experimental and may undergo changes in order
 to satisfy additional portability requirements.
@@ -8935,16 +8959,13 @@ intermingled output.  The output from failed tests is 
collected in the
 file is output after the summary.  For best results, the tests should be
 verbose by default now.
 
address@hidden mostlyclean
 @trindex check-html
 @vindex RST2HTML
 @vindex TEST_SUITE_HTML
-With @code{make check-html}, the log files may be converted from RST
-(reStructuredText, see @uref{http://docutils.sourceforge.net/@/rst.html})
-to HTML using @samp{RST2HTML}, which defaults to @command{rst2html} or
address@hidden  The variable @samp{TEST_SUITE_HTML} contains the
-set of converted log files.  The log and HTML files are removed upon
address@hidden mostlyclean}.
+Previous versions of automake used to provide a @code{check-html} target
+to convert the log files to HTML.  This feature is now deprecated, and
address@hidden be removed} in the next major Automake release, so don't rely
+on it anymore.
 
 @vindex DISABLE_HARD_ERRORS
 @cindex Exit status 99, special interpretation
@@ -9019,13 +9040,10 @@ env RECHECK_LOGS= make -e check
 
 @item
 @trindex recheck
address@hidden recheck-html
 You can ensure that all tests are rerun which have failed or passed
 unexpectedly, by running @code{make recheck} in the test directory.
 This convenience target will set @code{RECHECK_LOGS} appropriately
-before invoking the main test driver.  The @code{recheck-html} target
-does the same as @code{recheck} but again converts the resulting log
-file in HTML format, like the @code{check-html} target.
+before invoking the main test driver.
 @end itemize
 
 In order to guarantee an ordering between tests even with @code{make
@@ -9591,9 +9609,9 @@ the @code{AM_INIT_AUTOMAKE} macro in @file{configure.ac}.
 There are a few rules and variables that didn't fit anywhere else.
 
 @menu
-* Tags::                        Interfacing to etags and mkid
-* Suffixes::                    Handling new file extensions
-* Multilibs::                   Support for multilibs.
+* Tags::        Interfacing to etags and mkid
+* Suffixes::    Handling new file extensions
+* Multilibs::   Support for multilibs (deprecated, soon to be removed).
 @end menu
 
 
@@ -9714,19 +9732,21 @@ Automake generate the suffix list for @code{.SUFFIXES}. 
 Any given
 by Automake generated suffixes not already in the list.
 
 @node Multilibs
address@hidden Support for Multilibs
address@hidden Support for Multilibs (deprecated, soon to be removed).
 
-Automake has support for an obscure feature called multilibs.  A
address@hidden is a library that is built for multiple different ABIs
+Automake used to support an obscure feature called multilibs.  @emph{This
+feature is now deprecated, and will be removed in the next major Automake
+version}.  Still, its implementation will remain available in the
address@hidden/} directory of the Automake distribution, so it should be
+very easy for motivated users to continue to use it in their projects,
+if they really need to.
+
+A @dfn{multilib} is a library that is built for multiple different ABIs
 at a single time; each time the library is built with a different target
 flag combination.  This is only useful when the library is intended to
 be cross-compiled, and it is almost exclusively used for compiler
 support libraries.
 
-The multilib support is still experimental.  Only use it if you are
-familiar with multilibs and can debug problems you might encounter.
-
-
 @node Include
 @chapter Include
 
diff --git a/lib/Automake/Getopt.pm b/lib/Automake/Getopt.pm
new file mode 100644
index 0000000..84cee5e
--- /dev/null
+++ b/lib/Automake/Getopt.pm
@@ -0,0 +1,115 @@
+# Copyright (C) 2012 Free Software Foundation, Inc.
+
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 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/>.
+
+package Automake::Getopt;
+
+=head1 NAME
+
+Automake::Getopt - GCS conforming parser for command line options
+
+=head1 SYNOPSIS
+
+  use Automake::Getopt;
+
+=head1 DESCRIPTION
+
+Export a function C<parse_options>, performing parsing of command
+line options in conformance to the GNU Coding standards.
+
+=cut
+
+use 5.006_002;
+use strict;
+use warnings FATAL => 'all';
+use Exporter ();
+use Getopt::Long ();
+use Automake::ChannelDefs qw/fatal/;
+use Carp qw/croak confess/;
+
+use vars qw (@ISA @EXPORT);
address@hidden = qw (Exporter);
address@hidden qw/getopt/;
+
+=item C<parse_options (%option)>
+
+Wrapper around C<Getopt::Long>, trying to conform to the GNU
+Coding Standards for error messages.
+
+=cut
+
+sub parse_options (%)
+{
+  my %option = @_;
+
+  Getopt::Long::Configure ("bundling", "pass_through");
+  # Unrecognized options are passed through, so GetOption can only fail
+  # due to internal errors or misuse of options specification.
+  Getopt::Long::GetOptions (%option)
+    or confess "error in options specification (likely)";
+
+  if (@ARGV && $ARGV[0] =~ /^-./)
+    {
+      my %argopts;
+      for my $k (keys %option)
+       {
+         if ($k =~ /(.*)=s$/)
+           {
+             map { $argopts{(length ($_) == 1)
+                            ? "-$_" : "--$_" } = 1; } (split (/\|/, $1));
+           }
+       }
+      if ($ARGV[0] eq '--')
+       {
+         shift @ARGV;
+       }
+      elsif (exists $argopts{$ARGV[0]})
+       {
+         fatal ("option `$ARGV[0]' requires an argument\n"
+                . "Try `$0 --help' for more information.");
+       }
+      else
+       {
+         fatal ("unrecognized option `$ARGV[0]'.\n"
+                . "Try `$0 --help' for more information.");
+       }
+    }
+}
+
+=back
+
+=head1 SEE ALSO
+
+L<Getopt::Long>
+
+=cut
+
+1; # for require
+
+### Setup "GNU" style for perl-mode and cperl-mode.
+## Local Variables:
+## perl-indent-level: 2
+## perl-continued-statement-offset: 2
+## perl-continued-brace-offset: 0
+## perl-brace-offset: 0
+## perl-brace-imaginary-offset: 0
+## perl-label-offset: -2
+## cperl-indent-level: 2
+## cperl-brace-offset: 0
+## cperl-continued-brace-offset: 0
+## cperl-label-offset: -2
+## cperl-extra-newline-before-brace: t
+## cperl-merge-trailing-else: nil
+## cperl-continued-statement-offset: 2
+## End:
diff --git a/lib/Automake/Makefile.am b/lib/Automake/Makefile.am
index 0858b68..ac9356a 100644
--- a/lib/Automake/Makefile.am
+++ b/lib/Automake/Makefile.am
@@ -1,7 +1,7 @@
 ## Process this file with automake to create Makefile.in
 
-# Copyright (C) 2001, 2002, 2003, 2004, 2008, 2009, 2010 Free Software
-# Foundation, Inc.
+# Copyright (C) 2001, 2002, 2003, 2004, 2008, 2009, 2010, 2012 Free
+# Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -16,9 +16,6 @@
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
-# `make clean check' should build Config.pm first.
-SUBDIRS = . tests
-
 perllibdir = $(pkgvdatadir)/Automake
 dist_perllib_DATA = \
   ChannelDefs.pm \
@@ -28,6 +25,7 @@ dist_perllib_DATA = \
   DisjConditions.pm \
   FileUtils.pm \
   General.pm \
+  Getopt.pm \
   Item.pm \
   ItemDef.pm \
   Location.pm \
@@ -64,10 +62,8 @@ do_subst = in=`echo $@ | sed 's/\.[^.]*$$//'`; sed \
 ## $(datadir) or other do_subst'ituted variables change.
 ## Use chmod a-w to prevent people from editing the wrong file by accident.
 Config.pm: Config.in Makefile
-       rm -f Config.tmp Config.pm
-       $(do_subst) $(srcdir)/Config.in >Config.tmp
-       chmod +x Config.tmp
-       chmod a-w Config.tmp
-       mv -f Config.tmp Config.pm
+       $(AM_V_at)rm -f $@ address@hidden
+       $(AM_V_GEN)$(do_subst) $(srcdir)/Config.in >address@hidden
+       $(AM_V_at)chmod a+x,a-w address@hidden && mv -f address@hidden $@
 
 EXTRA_DIST = Config.in
diff --git a/lib/Automake/Variable.pm b/lib/Automake/Variable.pm
index 686847d..8f712bd 100644
--- a/lib/Automake/Variable.pm
+++ b/lib/Automake/Variable.pm
@@ -181,7 +181,7 @@ my %_ac_macro_for_var =
    CXX => 'AC_PROG_CXX',
    CXXFLAGS => 'AC_PROG_CXX',
    F77 => 'AC_PROG_F77',
-   F77FLAGS => 'AC_PROG_F77',
+   FFLAGS => 'AC_PROG_F77',
    FC => 'AC_PROG_FC',
    FCFLAGS => 'AC_PROG_FC',
    OBJC => 'AC_PROG_OBJC',
diff --git a/lib/Automake/tests/Makefile.am b/lib/Automake/tests/Makefile.am
deleted file mode 100644
index c5e53d2..0000000
--- a/lib/Automake/tests/Makefile.am
+++ /dev/null
@@ -1,30 +0,0 @@
-## Process this file with automake to create Makefile.in
-
-# Copyright (C) 2002, 2003, 2008, 2009  Free Software Foundation, Inc.
-
-# This program 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/>.
-
-PL_LOG_COMPILER = $(PERL)
-AM_PL_LOG_FLAGS = -Mstrict -I ../.. -I $(top_srcdir)/lib -w
-TEST_EXTENSIONS = .pl
-
-TESTS = \
-Condition.pl \
-Condition-t.pl \
-DisjConditions.pl \
-DisjConditions-t.pl \
-Version.pl \
-Wrap.pl
-
-EXTRA_DIST = $(TESTS)
diff --git a/lib/Makefile.am b/lib/Makefile.am
index f4acc8a..d9dabb6 100644
--- a/lib/Makefile.am
+++ b/lib/Makefile.am
@@ -31,7 +31,7 @@ dist_script_DATA = config.guess config.sub install-sh 
mdate-sh missing \
   mkinstalldirs elisp-comp ylwrap acinstall depcomp compile py-compile \
   symlink-tree ar-lib
 
-EXTRA_DIST = gnupload gitlog-to-changelog
+EXTRA_DIST = gnupload gitlog-to-changelog update-copyright
 
 install-data-hook:
        @$(POST_INSTALL)
diff --git a/lib/am/Makefile.am b/lib/am/Makefile.am
index a255f70..7b37989 100644
--- a/lib/am/Makefile.am
+++ b/lib/am/Makefile.am
@@ -3,7 +3,7 @@
 ## Makefile for Automake lib/am.
 
 # Copyright (C) 1995, 1996, 1997, 1998, 1999, 2001, 2003, 2004, 2008,
-# 2009  Free Software Foundation, Inc.
+# 2009, 2012 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -23,6 +23,7 @@ amdir = $(pkgvdatadir)/am
 dist_am_DATA = \
 ansi2knr.am \
 check.am \
+check-html.am \
 check2.am \
 clean-hdr.am \
 clean.am \
diff --git a/lib/am/check-html.am b/lib/am/check-html.am
new file mode 100644
index 0000000..13f0a47
--- /dev/null
+++ b/lib/am/check-html.am
@@ -0,0 +1,61 @@
+## automake - create Makefile.in from Makefile.am
+## Copyright (C) 2001, 2003, 2006, 2007, 2008, 2009, 2010, 2011, 2012
+## Free Software Foundation, Inc.
+##
+## This program is free software; you can redistribute it and/or modify
+## it under the terms of the GNU General Public License as published by
+## the Free Software Foundation; either version 2, or (at your option)
+## any later version.
+##
+## This program is distributed in the hope that it will be useful,
+## but WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+## GNU General Public License for more details.
+##
+## You should have received a copy of the GNU General Public License
+## along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+## Makefile.am fragment to produce HTML output from RST-formatted
+## log files produced by the parallel-tests output.
+## This fragment was part of the automake core in the 1.11.x release
+## series, but is to be moved out in the 1.12 release.
+
+TEST_SUITE_HTML = $(TEST_SUITE_LOG:.log=.html)
+
+mostlyclean-am: am--mostlyclean-test-html
+.PHONY: am--mostlyclean-test-html
+am--mostlyclean-test-html:
+## Expand $(TEST_LOGS) only once, to avoid exceeding line length limits.
+       list='$(TEST_LOGS:.log=.html)'; test -z "$$list" || rm -f $$list
+       rm -f $(TEST_SUITE_HTML)
+
+.log.html:
+       @list='$(RST2HTML) $$RST2HTML rst2html rst2html.py';            \
+       for r2h in $$list; do                                           \
+         if ($$r2h --version) >/dev/null 2>&1; then                    \
+           R2H=$$r2h;                                                  \
+         fi;                                                           \
+       done;                                                           \
+       if test -z "$$R2H"; then                                        \
+         echo >&2 "cannot find rst2html, cannot create $@";            \
+         exit 2;                                                       \
+       fi;                                                             \
+       $$R2H $< >address@hidden
+       @mv address@hidden $@
+
+# Be sure to run check first, and then to convert the result.
+# Beware of concurrent executions.  Run "check" not "check-TESTS", as
+# check-SCRIPTS and other dependencies are rebuilt by the former only.
+# And expect check to fail.
+check-html recheck-html:
+       @target=`echo $@ | sed 's/-html$$//'`; \
+       rv=0; $(MAKE) $(AM_MAKEFLAGS) $$target || rv=$$?; \
+## The nullification of $(TEST_LOGS) is required to ensure that
+## "make recheck-html" do not try to uselessly re-run tests.
+       $(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_HTML) TEST_LOGS= || exit 4; \
+       exit $$rv
+
+AM_RECURSIVE_TARGETS += check-html recheck-html
+
+.PHONY: check-html recheck-html
+.MAKE: check-html recheck-html
diff --git a/lib/am/check.am b/lib/am/check.am
index 3d0188d..7e2e771 100644
--- a/lib/am/check.am
+++ b/lib/am/check.am
@@ -1,6 +1,6 @@
 ## automake - create Makefile.in from Makefile.am
-## Copyright (C) 2001, 2003, 2006, 2007, 2008, 2009, 2010, 2011 Free
-## Software Foundation, Inc.
+## Copyright (C) 2001, 2003, 2006, 2007, 2008, 2009, 2010, 2011, 2012
+## Free Software Foundation, Inc.
 
 ## This program is free software; you can redistribute it and/or modify
 ## it under the terms of the GNU General Public License as published by
@@ -233,88 +233,63 @@ $(TEST_SUITE_LOG): $(TEST_LOGS)
 
 RECHECK_LOGS = $(TEST_LOGS)
 
-# Run all the tests.
-check-TESTS:
+check-TESTS recheck:
+## If we are running "make recheck", it's not the user which can decide
+## which tests to consider for re-execution, so we must ignore the value
+## of $(RECHECK_LOGS).
+       @if test $@ != recheck; then \
 ## Expand $(RECHECK_LOGS) only once, to avoid exceeding line length limits.
-       @list='$(RECHECK_LOGS)'; test -z "$$list" || rm -f $$list
+          list='$(RECHECK_LOGS)'; test -z "$$list" || rm -f $$list; \
+        fi
 ## We always have to remove TEST_SUITE_LOG, to ensure its rule is run
 ## in any case even in lazy mode: otherwise, if no test needs rerunning,
-## or a prior run plus reruns all happen within the same timestamp
-## (can happen with a prior `make TESTS=<subset>'),
-## then we get no log output.
+## or a prior run plus reruns all happen within the same timestamp (can
+## happen with a prior `make TESTS=<subset>'), then we get no log output.
 ## 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.
-##
+       @test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG)
+       @list='' list2='$(TEST_LOGS)'; for f in $$list2; do \
 ## 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                                       \
-         test .log = $$f || echo $$f;                                  \
-       done | tr '\012\015' '  '`;                                     \
+         test .log = $$f && continue; \
+## If running a "make recheck", we must only consider tests that had
+## an unexpected outcome (FAIL or XPASS) in the earlier run.
+         if test $@ = recheck; then \
+           test -f $$f || continue; \
+           if test -r $$f && read line < $$f; then \
+             case $$line in FAIL*|XPASS*) : ;; *) continue;; esac; \
+           fi; \
+         fi; \
+## Be careful to avoid extra whitespace in the definition of $list, since
+## its value will be passed to the recursive make invocation below through
+## the TEST_LOGS macro, and leading/trailing white space in a make macro
+## definition can be problematic.  In this particular case, trailing white
+## space was known to cause a segmentation fault on Solaris 10 XPG4 make:
+## <http://lists.gnu.org/archive/html/bug-automake/2010-08/msg00004.html>
+         if test -z "$$list"; then list=$$f; else list="$$list $$f"; fi; \
+       done; \
+## Under "make recheck", remove the logs of the files to recheck, so that
+## those will be rerun by the "make test-suite.log" recursive invocation
+## below.  But avoid extra files removal when running under "make -n".
+       if test $@ = recheck && test -n "$$list"; then \
+         $(am__make_dryrun) || rm -f $$list || exit 1; \
+       fi; \
        $(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_LOG) TEST_LOGS="$$list"
 
-AM_RECURSIVE_TARGETS += check
+## Recheck must depend on $(check_SCRIPTS), $(check_PROGRAMS), etc.
+recheck: %CHECK_DEPS%
 
-## -------------- ##
-## Produce HTML.  ##
-## -------------- ##
+AM_RECURSIVE_TARGETS += check recheck
 
-.log.html:
-       @list='$(RST2HTML) $$RST2HTML rst2html rst2html.py';            \
-       for r2h in $$list; do                                           \
-         if ($$r2h --version) >/dev/null 2>&1; then                    \
-           R2H=$$r2h;                                                  \
-         fi;                                                           \
-       done;                                                           \
-       if test -z "$$R2H"; then                                        \
-         echo >&2 "cannot find rst2html, cannot create $@";            \
-         exit 2;                                                       \
-       fi;                                                             \
-       $$R2H $< >address@hidden
-       @mv address@hidden $@
-
-# Be sure to run check first, and then to convert the result.
-# Beware of concurrent executions.  Run "check" not "check-TESTS", as
-# check-SCRIPTS and other dependencies are rebuilt by the former only.
-# And expect check to fail.
-check-html:
-       @if $(MAKE) $(AM_MAKEFLAGS) check; then                 \
-         rv=0; else rv=$$?;                                    \
-       fi;                                                     \
-       $(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_HTML) || exit 4;   \
-       exit $$rv
-
-.PHONY: check-html
-.MAKE: check-html
-
-AM_RECURSIVE_TARGETS += check-html
-
-## -------------------- ##
-## Rechecking failures. ##
-## -------------------- ##
-
-## Rerun all FAILed or XPASSed tests.
-recheck recheck-html:
-       @target=`echo $@ | sed 's,^re,,'`;                              \
-       list='$(TEST_LOGS)';                                            \
-       list=`for f in $$list; do                                       \
-               test -f $$f || continue;                                \
-               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
 
-.PHONY: recheck recheck-html
-.MAKE: recheck recheck-html
+## ----------------------------------------------- ##
+## Produce HTML.  To be removed in automake 1.12.  ##
+## ----------------------------------------------- ##
 
-AM_RECURSIVE_TARGETS += recheck recheck-html
+include check-html.am
 
 else !%?PARALLEL_TESTS%
 
diff --git a/lib/am/comp-vars.am b/lib/am/comp-vars.am
deleted file mode 100644
index e69de29..0000000
diff --git a/lib/am/distdir.am b/lib/am/distdir.am
index a681101..da9028b 100644
--- a/lib/am/distdir.am
+++ b/lib/am/distdir.am
@@ -1,6 +1,6 @@
 ## automake - create Makefile.in from Makefile.am
 ## Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009,
-## 2010, 2011 Free Software Foundation, Inc.
+## 2010, 2011, 2012 Free Software Foundation, Inc.
 
 ## This program is free software; you can redistribute it and/or modify
 ## it under the terms of the GNU General Public License as published by
@@ -23,10 +23,17 @@ distdir = $(PACKAGE)-$(VERSION)
 top_distdir = $(distdir)
 
 am__remove_distdir = \
-  { test ! -d "$(distdir)" \
-    || { find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \
-         && rm -fr "$(distdir)"; }; }
-
+  if test -d "$(distdir)"; then \
+    find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \
+      && rm -rf "$(distdir)" \
+## On MSYS (1.0.17) it is not possible to remove a directory that is in
+## use; so, if the first rm fails, we sleep some seconds and retry, to
+## give pending processes some time to exit and "release" the directory
+## before we remove it.  The value of "some seconds" is 5 for the moment,
+## which is mostly an arbitrary value, but seems high enough in practice.
+## See automake bug#10470.
+      || { sleep 5 && rm -rf "$(distdir)"; }; \
+  else :; fi
 endif %?TOPDIR_P%
 
 if %?SUBDIRS%
@@ -229,19 +236,13 @@ endif %?TOPDIR_P%
 ## at the top level do the right thing.  If we're in the topmost
 ## directory, then we use `distdir' instead of `top_distdir'; this lets
 ## us work correctly with an enclosing package.
-##
-## Split the loop for the directory creation and the one for recursion,
-## so that with GNU make -n, only the latter is executed.
 if %?SUBDIRS%
        @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
          if test "$$subdir" = .; then :; else \
-           test -d "$(distdir)/$$subdir" \
-           || $(MKDIR_P) "$(distdir)/$$subdir" \
-           || exit 1; \
-         fi; \
-       done
-       @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
-         if test "$$subdir" = .; then :; else \
+           $(am__make_dryrun) \
+             || test -d "$(distdir)/$$subdir" \
+             || $(MKDIR_P) "$(distdir)/$$subdir" \
+             || exit 1; \
            dir1=$$subdir; dir2="$(distdir)/$$subdir"; \
            $(am__relativize); \
            new_distdir=$$reldir; \
diff --git a/lib/am/header-vars.am b/lib/am/header-vars.am
index d1cd76e..2d81009 100644
--- a/lib/am/header-vars.am
+++ b/lib/am/header-vars.am
@@ -27,6 +27,35 @@ VPATH = @srcdir@
 ## a vendor make.
 ## DESTDIR =
 
+## Shell code that determines whether make is running in "dry mode"
+## ("make -n") or not.  Useful in rules that invoke make recursively,
+## and are thus executed also with "make -n" -- either because they
+## are declared as dependencies to '.MAKE' (NetBSD make), or because
+## their recipes contain the "$(MAKE)" string (GNU and Solaris make).
+
+am__make_dryrun = \
+  { \
+    am__dry=no; \
+    case $$MAKEFLAGS in \
+## If we run "make TESTS='snooze nap'", GNU make will export MAKEFLAGS
+## to "TESTS=foo\ nap", so that the simpler loop below (on word-splitted
+## $$MAKEFLAGS) would see a "make flag" equal to "nap", and would wrongly
+## misinterpret that as and indication that make is running in dry mode.
+## This has already happened in practice.  So we need this hack.
+      *\\[\ \  ]*) \
+        echo 'am--echo: ; @echo "AM"  OK' | $(MAKE) -f - 2>/dev/null \
+          | grep '^AM OK$$' >/dev/null || am__dry=yes;; \
+      *) \
+        for am__flg in $$MAKEFLAGS; do \
+          case $$am__flg in \
+            *=*|--*) ;; \
+            *n*) am__dry=yes; break;; \
+          esac; \
+        done;; \
+    esac; \
+    test $$am__dry = yes; \
+  }
+
 ## Some derived variables that have been found to be useful.
 pkgdatadir = $(datadir)/@PACKAGE@
 pkgincludedir = $(includedir)/@PACKAGE@
diff --git a/lib/am/library.am b/lib/am/library.am
index ce94e5e..4045558 100644
--- a/lib/am/library.am
+++ b/lib/am/library.am
@@ -1,6 +1,6 @@
 ## automake - create Makefile.in from Makefile.am
-## Copyright (C) 1994, 1995, 1996, 1999, 2003, 2009 Free Software
-## Foundation, Inc.
+## Copyright (C) 1994, 1995, 1996, 1999, 2003, 2009, 2010, 2012 Free
+## Software Foundation, Inc.
 
 ## This program is free software; you can redistribute it and/or modify
 ## it under the terms of the GNU General Public License as published by
@@ -14,7 +14,7 @@
 
 ## You should have received a copy of the GNU General Public License
 ## along with this program.  If not, see <http://www.gnu.org/licenses/>.
-%LIBRARY%: $(%XLIBRARY%_OBJECTS) $(%XLIBRARY%_DEPENDENCIES) %DIRSTAMP%
+%LIBRARY%: $(%XLIBRARY%_OBJECTS) $(%XLIBRARY%_DEPENDENCIES) 
$(EXTRA_%XLIBRARY%_DEPENDENCIES) %DIRSTAMP%
        %SILENT%-rm -f %LIBRARY%
        %VERBOSE%$(%XLIBRARY%_AR) %LIBRARY% $(%XLIBRARY%_OBJECTS) 
$(%XLIBRARY%_LIBADD)
        %SILENT%$(RANLIB) %LIBRARY%
diff --git a/lib/am/lisp.am b/lib/am/lisp.am
index 6ffcdbf..0194c1b 100644
--- a/lib/am/lisp.am
+++ b/lib/am/lisp.am
@@ -52,12 +52,7 @@ $(am__ELCFILES): elc-stamp
 ##
 ## 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 $(am__make_dryrun); then dry=:; else dry=; fi; \
        if test "$(EMACS)" != no && test ! -f $@; then \
 ## If `make -j' is used and more than one file has been erased, several
 ## processes can execute this block.  We have to make sure that only
diff --git a/lib/am/ltlibrary.am b/lib/am/ltlibrary.am
index 9455234..dd958fd 100644
--- a/lib/am/ltlibrary.am
+++ b/lib/am/ltlibrary.am
@@ -1,6 +1,6 @@
 ## automake - create Makefile.in from Makefile.am
-## Copyright (C) 1994, 1995, 1996, 2003, 2005, 2008, 2009 Free Software
-## Foundation, Inc.
+## Copyright (C) 1994, 1995, 1996, 2003, 2005, 2008, 2009, 2010, 2012
+## Free Software Foundation, Inc.
 
 ## This program is free software; you can redistribute it and/or modify
 ## it under the terms of the GNU General Public License as published by
@@ -14,5 +14,5 @@
 
 ## You should have received a copy of the GNU General Public License
 ## along with this program.  If not, see <http://www.gnu.org/licenses/>.
-%LTLIBRARY%: $(%XLTLIBRARY%_OBJECTS) $(%XLTLIBRARY%_DEPENDENCIES) %DIRSTAMP%
+%LTLIBRARY%: $(%XLTLIBRARY%_OBJECTS) $(%XLTLIBRARY%_DEPENDENCIES) 
$(EXTRA_%XLTLIBRARY%_DEPENDENCIES) %DIRSTAMP%
        %VERBOSE%$(%XLINK%) %RPATH% $(%XLTLIBRARY%_OBJECTS) 
$(%XLTLIBRARY%_LIBADD) $(LIBS)
diff --git a/lib/am/program.am b/lib/am/program.am
index 7e568e7..42c585e 100644
--- a/lib/am/program.am
+++ b/lib/am/program.am
@@ -1,6 +1,6 @@
 ## automake - create Makefile.in from Makefile.am
-## Copyright (C) 1994, 1995, 1996, 1997, 2001, 2003, 2005, 2009
-## Free Software Foundation, Inc.
+## Copyright (C) 1994, 1995, 1996, 1997, 2001, 2003, 2005, 2009, 2010,
+## 2012 Free Software Foundation, Inc.
 
 ## This program is free software; you can redistribute it and/or modify
 ## it under the terms of the GNU General Public License as published by
@@ -14,7 +14,7 @@
 
 ## You should have received a copy of the GNU General Public License
 ## along with this program.  If not, see <http://www.gnu.org/licenses/>.
-%PROGRAM%%EXEEXT%: $(%XPROGRAM%_OBJECTS) $(%XPROGRAM%_DEPENDENCIES) %DIRSTAMP%
+%PROGRAM%%EXEEXT%: $(%XPROGRAM%_OBJECTS) $(%XPROGRAM%_DEPENDENCIES) 
$(EXTRA_%XPROGRAM%_DEPENDENCIES) %DIRSTAMP%
 ## Remove program before linking.  Otherwise the link will fail if the
 ## program is running somewhere.  FIXME: this could be a loss if
 ## you're using an incremental linker.  Maybe we should think twice?
diff --git a/lib/ar-lib b/lib/ar-lib
index c0286a4..0f62c6f 100755
--- a/lib/ar-lib
+++ b/lib/ar-lib
@@ -2,7 +2,7 @@
 # Wrapper for Microsoft lib.exe
 
 me=ar-lib
-scriptversion=2012-01-30.22; # UTC
+scriptversion=2012-03-01.08; # UTC
 
 # Copyright (C) 2010, 2012 Free Software Foundation, Inc.
 # Written by Peter Rosin <address@hidden>.
@@ -153,7 +153,9 @@ action=${action#-}
 delete=
 extract=
 list=
+quick=
 replace=
+index=
 create=
 
 while test -n "$action"
@@ -162,7 +164,10 @@ do
     d*) delete=yes  ;;
     x*) extract=yes ;;
     t*) list=yes    ;;
+    q*) quick=yes   ;;
     r*) replace=yes ;;
+    s*) index=yes   ;;
+    S*)             ;; # the index is always updated implicitly
     c*) create=yes  ;;
     u*)             ;; # TODO: don't ignore the update modifier
     v*)             ;; # TODO: don't ignore the verbose modifier
@@ -173,8 +178,8 @@ do
   action=${action#?}
 done
 
-case $delete$extract$list$replace in
-  yes)
+case $delete$extract$list$quick$replace,$index in
+  yes,* | ,yes)
     ;;
   yesyes*)
     func_error "more than one action specified"
@@ -225,7 +230,7 @@ elif test -n "$extract"; then
     done
   fi
 
-elif test -n "$replace"; then
+elif test -n "$quick$replace"; then
   if test ! -f "$orig_archive"; then
     if test -z "$create"; then
       echo "$me: creating $orig_archive"
diff --git a/lib/config.guess b/lib/config.guess
index 8152efd..49ba16f 100755
--- a/lib/config.guess
+++ b/lib/config.guess
@@ -2,9 +2,9 @@
 # Attempt to guess a canonical system name.
 #   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
 #   2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
-#   2011 Free Software Foundation, Inc.
+#   2011, 2012 Free Software Foundation, Inc.
 
-timestamp='2011-11-11'
+timestamp='2012-01-01'
 
 # 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
@@ -57,8 +57,8 @@ GNU config.guess ($timestamp)
 
 Originally written by Per Bothner.
 Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
-2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free
-Software Foundation, Inc.
+2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012
+Free Software Foundation, Inc.
 
 This is free software; see the source for copying conditions.  There is NO
 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
@@ -145,7 +145,7 @@ UNAME_VERSION=`(uname -v) 2>/dev/null` || 
UNAME_VERSION=unknown
 case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
     *:NetBSD:*:*)
        # NetBSD (nbsd) targets should (where applicable) match one or
-       # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*,
+       # more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*,
        # *-*-netbsdecoff* and *-*-netbsd*.  For targets that recently
        # switched to ELF, *-*-netbsd* would select the old
        # object file format.  This provides both forward
@@ -897,16 +897,16 @@ EOF
        echo ${UNAME_MACHINE}-unknown-linux-gnu
        exit ;;
     cris:Linux:*:*)
-       echo cris-axis-linux-gnu
+       echo ${UNAME_MACHINE}-axis-linux-gnu
        exit ;;
     crisv32:Linux:*:*)
-       echo crisv32-axis-linux-gnu
+       echo ${UNAME_MACHINE}-axis-linux-gnu
        exit ;;
     frv:Linux:*:*)
-       echo frv-unknown-linux-gnu
+       echo ${UNAME_MACHINE}-unknown-linux-gnu
        exit ;;
     hexagon:Linux:*:*)
-       echo hexagon-unknown-linux-gnu
+       echo ${UNAME_MACHINE}-unknown-linux-gnu
        exit ;;
     i*86:Linux:*:*)
        LIBC=gnu
@@ -948,7 +948,7 @@ EOF
        test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
        ;;
     or32:Linux:*:*)
-       echo or32-unknown-linux-gnu
+       echo ${UNAME_MACHINE}-unknown-linux-gnu
        exit ;;
     padre:Linux:*:*)
        echo sparc-unknown-linux-gnu
@@ -989,7 +989,7 @@ EOF
        echo ${UNAME_MACHINE}-dec-linux-gnu
        exit ;;
     x86_64:Linux:*:*)
-       echo x86_64-unknown-linux-gnu
+       echo ${UNAME_MACHINE}-unknown-linux-gnu
        exit ;;
     xtensa*:Linux:*:*)
        echo ${UNAME_MACHINE}-unknown-linux-gnu
diff --git a/lib/config.sub b/lib/config.sub
index e76eaf4..d6b6b3c 100755
--- a/lib/config.sub
+++ b/lib/config.sub
@@ -2,9 +2,9 @@
 # Configuration validation subroutine script.
 #   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
 #   2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
-#   2011 Free Software Foundation, Inc.
+#   2011, 2012 Free Software Foundation, Inc.
 
-timestamp='2011-11-11'
+timestamp='2012-01-01'
 
 # This file is (in principle) common to ALL GNU software.
 # The presence of a machine in this file suggests that SOME GNU software
@@ -76,8 +76,8 @@ version="\
 GNU config.sub ($timestamp)
 
 Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
-2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free
-Software Foundation, Inc.
+2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012
+Free Software Foundation, Inc.
 
 This is free software; see the source for copying conditions.  There is NO
 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
@@ -320,7 +320,6 @@ case $basic_machine in
                basic_machine=tic6x-unknown
                ;;
        m6811 | m68hc11 | m6812 | m68hc12 | picochip)
-               # Motorola 68HC11/12.
                basic_machine=$basic_machine-unknown
                os=-none
                ;;
@@ -719,7 +718,6 @@ case $basic_machine in
        i370-ibm* | ibm*)
                basic_machine=i370-ibm
                ;;
-# I'm not sure what "Sysv32" means.  Should this be sysv3.2?
        i*86v32)
                basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
                os=-sysv32
@@ -1559,9 +1557,6 @@ case $basic_machine in
                ;;
        m68000-sun)
                os=-sunos3
-               # This also exists in the configure program, but was not the
-               # default.
-               # os=-sunos4
                ;;
        m68*-cisco)
                os=-aout
diff --git a/lib/gitlog-to-changelog b/lib/gitlog-to-changelog
index ee1ac87..38c6f3a 100755
--- a/lib/gitlog-to-changelog
+++ b/lib/gitlog-to-changelog
@@ -3,13 +3,13 @@ eval '(exit $?0)' && eval 'exec perl -wS "$0" ${1+"$@"}'
     if 0;
 # Convert git log output to ChangeLog format.
 
-my $VERSION = '2011-12-24 18:51'; # UTC
+my $VERSION = '2012-01-18 07:50'; # UTC
 # The definition above must lie within the first 8 lines in order
 # for the Emacs time-stamp write hook (at end) to update it.
 # If you change this file with Emacs, please let the write hook
 # do its job.  Otherwise, update this string manually.
 
-# Copyright (C) 2008-2011 Free Software Foundation, Inc.
+# Copyright (C) 2008-2012 Free Software Foundation, Inc.
 
 # This program is free software: you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -47,7 +47,7 @@ sub usage ($)
   my $STREAM = ($exit_code == 0 ? *STDOUT : *STDERR);
   if ($exit_code != 0)
     {
-      print $STREAM "Try `$ME --help' for more information.\n";
+      print $STREAM "Try '$ME --help' for more information.\n";
     }
   else
     {
@@ -64,6 +64,10 @@ OPTIONS:
                   makes a change to SHA1's commit log text or metadata.
    --append-dot append a dot to the first line of each commit message if
                   there is no other punctuation or blank at the end.
+   --no-cluster never cluster commit messages under the same date/author
+                  header; the default is to cluster adjacent commit messages
+                  if their headers are the same and neither commit message
+                  contains multiple paragraphs.
    --since=DATE convert only the logs since DATE;
                   the default is to convert all log entries.
    --format=FMT set format string for commit subject and body;
@@ -78,6 +82,21 @@ EXAMPLE:
   $ME --since=2008-01-01 > ChangeLog
   $ME -- -n 5 foo > last-5-commits-to-branch-foo
 
+SPECIAL SYNTAX:
+
+The following types of strings are interpreted specially when they appear
+at the beginning of a log message line.  They are not copied to the output.
+
+  Copyright-paperwork-exempt: Yes
+    Append the "(tiny change)" notation to the usual "date name email"
+    ChangeLog header to mark a change that does not require a copyright
+    assignment.
+  Co-authored-by: Joe User <address@hidden>
+    List the specified name and email address on a second
+    ChangeLog header, denoting a co-author.
+  Signed-off-by: Joe User <address@hidden>
+    These lines are simply elided.
+
 In a FILE specified via --amend, comment lines (starting with "#") are ignored.
 FILE must consist of <SHA,CODE+> pairs where SHA is a 40-byte SHA1 (alone on
 a line) referring to a commit in the current project, and CODE refers to one
@@ -93,7 +112,7 @@ s/all tile types/all file types/
 1379ed974f1fa39b12e2ffab18b3f7a607082202
 # Due to a bug in vc-dwim, I mis-attributed a patch by Paul to myself.
 # Change the author to be Paul.  Note the escaped "@":
-s,Jim .*>,Paul Eggert <address@hidden>,
+s,Jim .*>,Paul Eggert <address@hidden>,
 
 EOF
     }
@@ -175,6 +194,7 @@ sub parse_amend_file($)
   my $format_string = '%s%n%b%n';
   my $amend_file;
   my $append_dot = 0;
+  my $cluster = 1;
   GetOptions
     (
      help => sub { usage 0 },
@@ -183,6 +203,7 @@ sub parse_amend_file($)
      'format=s' => \$format_string,
      'amend=s' => \$amend_file,
      'append-dot' => \$append_dot,
+     'cluster!' => \$cluster,
     ) or usage 1;
 
 
@@ -196,7 +217,7 @@ sub parse_amend_file($)
   my @cmd = (qw (git log --log-size),
              '--pretty=format:%H:%ct  %an  <%ae>%n%n'.$format_string, @ARGV);
   open PIPE, '-|', @cmd
-    or die ("$ME: failed to run `". quoted_cmd (@cmd) ."': $!\n"
+    or die ("$ME: failed to run '". quoted_cmd (@cmd) ."': $!\n"
             . "(Is your Git too old?  Version 1.5.1 or later is required.)\n");
 
   my $prev_multi_paragraph;
@@ -249,12 +270,21 @@ sub parse_amend_file($)
       $author_line =~ /^(\d+)  (.*>)$/
         or die "$ME:$.: Invalid line "
           . "(expected date/author/email):\n$author_line\n";
-      my $date_line = sprintf "%s  $2\n", strftime ("%F", localtime ($1));
+
+      # Format 'Copyright-paperwork-exempt: Yes' as a standard ChangeLog
+      # `(tiny change)' annotation.
+      my $tiny = (grep (/^Copyright-paperwork-exempt:\s+[Yy]es$/, @line)
+                  ? '  (tiny change)' : '');
+
+      my $date_line = sprintf "%s  %s$tiny\n",
+        strftime ("%F", localtime ($1)), $2;
 
       my @coauthors = grep /^Co-authored-by:.*$/, @line;
-      # Omit "Co-authored-by..." and "Signed-off-by..." lines.
-      @line = grep !/^Signed-off-by: .*>$/, @line;
-      @line = grep !/^Co-authored-by: /, @line;
+      # Omit meta-data lines we've already interpreted.
+      @line = grep !/^(?:Signed-off-by:[ ].*>$
+                       |Co-authored-by:[ ]
+                       |Copyright-paperwork-exempt:[ ]
+                       )/x, @line;
 
       # Remove leading and trailing blank lines.
       if (@line)
@@ -278,13 +308,15 @@ sub parse_amend_file($)
               . substr ($_, 5) . "\n";
         }
 
-      # If this header would be different from the previous date/name/email/
-      # coauthors header, or if this or the previous entry consists of two
-      # or more paragraphs, then print the header.
-      if ($date_line ne $prev_date_line
-          or "@coauthors" ne "@prev_coauthors"
-          or $multi_paragraph
-          or $prev_multi_paragraph)
+      # If clustering of commit messages has been disabled, if this header
+      # would be different from the previous date/name/email/coauthors header,
+      # or if this or the previous entry consists of two or more paragraphs,
+      # then print the header.
+      if ( ! $cluster
+          || $date_line ne $prev_date_line
+          || "@coauthors" ne "@prev_coauthors"
+          || $multi_paragraph
+          || $prev_multi_paragraph)
         {
           $prev_date_line eq ''
             or print "\n";
diff --git a/lib/gnupload b/lib/gnupload
index 5036752..51e17c6 100755
--- a/lib/gnupload
+++ b/lib/gnupload
@@ -1,10 +1,9 @@
 #!/bin/sh
 # Sign files and upload them.
 
-scriptversion=2010-05-23.15; # UTC
+scriptversion=2012-01-15.15; # UTC
 
-# Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software
-# Foundation, Inc.
+# Copyright (C) 2004-2010, 2012 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -20,6 +19,8 @@ scriptversion=2010-05-23.15; # UTC
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 # Originally written by Alexandre Duret-Lutz <address@hidden>.
+# The master copy of this file is maintained in the gnulib Git repository.
+# Please send bug reports and feature requests to address@hidden
 
 set -e
 
@@ -57,7 +58,7 @@ Options:
   --version                output version information and exit
 
 If --symlink-regex is given without EXPR, then the link target name
-is created by replacing the version information with \`-latest', e.g.:
+is created by replacing the version information with '-latest', e.g.:
 
   foo-1.3.4.tar.gz -> foo-latest.tar.gz
 
@@ -105,8 +106,7 @@ happen to have an ncftp package installed, the ncftpput-ftp 
script in
 the build-aux/ directory of the gnulib package
 (http://savannah.gnu.org/projects/gnulib) may serve as a replacement.
 
-Report bugs to <address@hidden>.
-Send patches to <address@hidden>."
+Send patches and bug reports to <address@hidden>."
 
 # Read local configuration file
 if test -r "$conffile"; then
@@ -170,7 +170,7 @@ while test -n "$1"; do
       break
       ;;
     -*)
-      echo "$0: Unknown option \`$1', try \`$0 --help'" 1>&2
+      echo "$0: Unknown option '$1', try '$0 --help'" 1>&2
       exit 1
       ;;
     esac
@@ -188,7 +188,7 @@ done
 
 dprint()
 {
-  echo "Running $*..."
+  echo "Running $* ..."
 }
 
 if $dry_run; then
@@ -219,7 +219,7 @@ else
   for file
   do
     if test ! -f $file; then
-      echo "$0: Cannot find \`$file'" 1>&2
+      echo "$0: Cannot find '$file'" 1>&2
       exit 1
     elif test -n "$symlink_expr"; then
       linkname=`echo $file | sed "$symlink_expr"`
@@ -238,10 +238,10 @@ fi
 unset passphrase
 
 # Reset PATH to be sure that echo is a built-in.  We will later use
-# `echo $passphrase' to output the passphrase, so it is important that
-# it is a built-in (third-party programs tend to appear in `ps'
+# 'echo $passphrase' to output the passphrase, so it is important that
+# it is a built-in (third-party programs tend to appear in 'ps'
 # listings with their arguments...).
-# Remember this script runs with `set -e', so if echo is not built-in
+# Remember this script runs with 'set -e', so if echo is not built-in
 # it will exit now.
 PATH=/empty echo -n "Enter GPG passphrase: "
 stty -echo
@@ -252,7 +252,7 @@ echo
 if test $# -ne 0; then
   for file
   do
-    echo "Signing $file..."
+    echo "Signing $file ..."
     rm -f $file.sig
     echo "$passphrase" | $dbg $GPG --passphrase-fd 0 -ba -o $file.sig $file
   done
@@ -391,7 +391,7 @@ for dest in $to
 do
   for file
   do
-    echo "Uploading $file to $dest..."
+    echo "Uploading $file to $dest ..."
     stmt=
     files="$file $file.sig"
     destdir=`echo $dest | sed 's/[^:]*://'`
diff --git a/lib/missing b/lib/missing
index 1039955..86a8fc3 100755
--- a/lib/missing
+++ b/lib/missing
@@ -1,10 +1,10 @@
 #! /bin/sh
 # Common stub for a few missing GNU programs while installing.
 
-scriptversion=2011-12-22.11; # UTC
+scriptversion=2012-01-06.13; # UTC
 
 # Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005, 2006,
-# 2008, 2009, 2010, 2011 Free Software Foundation, Inc.
+# 2008, 2009, 2010, 2011, 2012 Free Software Foundation, Inc.
 # Originally by Fran,cois Pinard <address@hidden>, 1996.
 
 # This program is free software; you can redistribute it and/or modify
@@ -84,7 +84,6 @@ Supported PROGRAM values:
   help2man     touch the output file
   lex          create \`lex.yy.c', if possible, from existing .c
   makeinfo     touch the output file
-  tar          try tar, gnutar, gtar, then tar without non-portable flags
   yacc         create \`y.tab.[ch]', if possible, from existing .[ch]
 
 Version suffixes to PROGRAM as well as the prefixes \`gnu-', \`gnu', and
@@ -122,15 +121,6 @@ case $1 in
     # Not GNU programs, they don't have --version.
     ;;
 
-  tar*)
-    if test -n "$run"; then
-       echo 1>&2 "ERROR: \`tar' requires --run"
-       exit 1
-    elif test "x$2" = "x--version" || test "x$2" = "x--help"; then
-       exit 1
-    fi
-    ;;
-
   *)
     if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
        # We have it, but it failed.
@@ -318,24 +308,6 @@ WARNING: \`$1' is $msg.  You should only need it if
     touch $file
     ;;
 
-  tar*)
-    shift
-    # We have already tried tar in the generic part.  So try with GNU tar.
-    # Look for gnutar/gtar before invocation to avoid ugly error messages.
-    for cmd in gnutar gtar; do
-      ($cmd --version) > /dev/null 2>&1 || continue
-      echo 1>&2 "\
-WARNING: I can't seem to be able to run \`tar' with the given arguments.
-         Trying to use GNU tar (\"$cmd\") instead ..."
-      exec $cmd "$@"
-    done
-    echo 1>&2 "\
-WARNING: I can't seem to be able to run \`tar' with the given arguments.
-         You may want to install GNU tar or Free paxutils, or check the
-         command line arguments."
-    exit 1
-    ;;
-
   *)
     echo 1>&2 "\
 WARNING: \`$1' is needed, and is $msg.
diff --git a/lib/texinfo.tex b/lib/texinfo.tex
index d831117..2abda0f 100644
--- a/lib/texinfo.tex
+++ b/lib/texinfo.tex
@@ -3,7 +3,7 @@
 % Load plain if necessary, i.e., if running under initex.
 \expandafter\ifx\csname fmtname\endcsname\relax\input plain\fi
 %
-\def\texinfoversion{2011-11-09.15}
+\def\texinfoversion{2012-01-03.09}
 %
 % Copyright 1985, 1986, 1988, 1990, 1991, 1992, 1993, 1994, 1995,
 % 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
@@ -230,6 +230,13 @@
   \errorcontextlines16
 }%
 
+% @errormsg{MSG}.  Do the index-like expansions on MSG, but if things
+% aren't perfect, it's not the end of the world, being an error message,
+% after all.
+% 
+\def\errormsg{\begingroup \indexnofonts \doerrormsg}
+\def\doerrormsg#1{\errmessage{#1}}
+
 % add check for \lastpenalty to plain's definitions.  If the last thing
 % we did was a \nobreak, we don't want to insert more space.
 %
@@ -1090,50 +1097,24 @@ where each line of input produces a line of output.}
 % for display in the outlines, and in other places.  Thus, we have to
 % double any backslashes.  Otherwise, a name like "\node" will be
 % interpreted as a newline (\n), followed by o, d, e.  Not good.
-% http://www.ntg.nl/pipermail/ntg-pdftex/2004-July/000654.html
-% (and related messages, the final outcome is that it is up to the TeX
-% user to double the backslashes and otherwise make the string valid, so
-% that's what we do).
-
-% double active backslashes.
-%
address@hidden \catcode`\\=\active
- @address@hidden
-   @address@hidden@active
-   @address@hidden
-}
-
-% To handle parens, we must adopt a different approach, since parens are
-% not active characters.  hyperref.dtx (which has the same problem as
-% us) handles it with this amazing macro to replace tokens, with minor
-% changes for Texinfo.  It is included here under the GPL by permission
-% from the author, Heiko Oberdiek.
-%
-% #1 is the tokens to replace.
-% #2 is the replacement.
-% #3 is the control sequence with the string.
-%
-\def\HyPsdSubst#1#2#3{%
-  \def\HyPsdReplace##1#1##2\END{%
-    ##1%
-    \ifx\\##2\\%
-    \else
-      #2%
-      \HyReturnAfterFi{%
-        \HyPsdReplace##2\END
-      }%
-    \fi
-  }%
-  \xdef#3{\expandafter\HyPsdReplace#3#1\END}%
-}
-\long\def\HyReturnAfterFi#1\fi{\fi#1}
-
-% #1 is a control sequence in which to do the replacements.
-\def\backslashparens#1{%
-  \xdef#1{#1}% redefine it as its expansion; the definition is simply
-             % \lastnode when called from \setref -> \pdfmkdest.
-  \HyPsdSubst{(}{\realbackslash(}{#1}%
-  \HyPsdSubst{)}{\realbackslash)}{#1}%
+% 
+% See http://www.ntg.nl/pipermail/ntg-pdftex/2004-July/000654.html and
+% related messages.  The final outcome is that it is up to the TeX user
+% to double the backslashes and otherwise make the string valid, so
+% that's what we do.  pdftex 1.30.0 (ca.2005) introduced a primitive to
+% do this reliably, so we use it.
+
+% #1 is a control sequence in which to do the replacements,
+% which we \xdef.
+\def\txiescapepdf#1{%
+  \ifx\pdfescapestring\relax
+    % No primitive available; should we give a warning or log?
+    % Many times it won't matter.
+  \else
+    % The expandable \pdfescapestring primitive escapes parentheses,
+    % backslashes, and other special chars.
+    \xdef#1{\pdfescapestring{#1}}%
+  \fi
 }
 
 \newhelp\nopdfimagehelp{Texinfo supports .png, .jpg, .jpeg, and .pdf images
@@ -1247,10 +1228,9 @@ output) for that.)}
     % such as \, aren't expanded when present in a section title.
     \indexnofonts
     \turnoffactive
-    \activebackslashdouble
     \makevalueexpandable
     \def\pdfdestname{#1}%
-    \backslashparens\pdfdestname
+    \txiescapepdf\pdfdestname
     \safewhatsit{\pdfdest name{\pdfdestname} xyz}%
   }}
   %
@@ -1282,28 +1262,22 @@ output) for that.)}
     % page number.  We could generate a destination for the section
     % text in the case where a section has no node, but it doesn't
     % seem worth the trouble, since most documents are normally structured.
-    \def\pdfoutlinedest{#3}%
+    \edef\pdfoutlinedest{#3}%
     \ifx\pdfoutlinedest\empty
       \def\pdfoutlinedest{#4}%
     \else
-      % Doubled backslashes in the name.
-      {\activebackslashdouble \xdef\pdfoutlinedest{#3}%
-       \backslashparens\pdfoutlinedest}%
+      \txiescapepdf\pdfoutlinedest
     \fi
     %
-    % Also double the backslashes in the display string.
-    {\activebackslashdouble \xdef\pdfoutlinetext{#1}%
-     \backslashparens\pdfoutlinetext}%
+    % Also escape PDF chars in the display string.
+    \edef\pdfoutlinetext{#1}%
+    \txiescapepdf\pdfoutlinetext
     %
     \pdfoutline goto name{\pdfmkpgn{\pdfoutlinedest}}#2{\pdfoutlinetext}%
   }
   %
   \def\pdfmakeoutlines{%
     \begingroup
-      % Thanh's hack / proper braces in bookmarks
-      \edef\mylbrace{\iftrue \string{\else}\fi}\let\{=\mylbrace
-      \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{%
@@ -1359,15 +1333,26 @@ output) for that.)}
       % Latin 2 (0xea) gets translated to a | character.  Info from
       % Staszek Wawrykiewicz, 19 Jan 2004 04:09:24 +0100.
       %
-      % xx to do this right, we have to translate 8-bit characters to
-      % their "best" equivalent, based on the @documentencoding.  Right
-      % now, I guess we'll just let the pdf reader have its way.
+      % TODO this right, we have to translate 8-bit characters to
+      % their "best" equivalent, based on the @documentencoding.  Too
+      % much work for too little return.  Just use the ASCII equivalents
+      % we use for the index sort strings.
+      % 
       \indexnofonts
       \setupdatafile
+      % We can have normal brace characters in the PDF outlines, unlike
+      % Texinfo index files.  So set that up.
+      \def\{{\lbracecharliteral}%
+      \def\}{\rbracecharliteral}%
       \catcode`\\=\active \otherbackslash
       \input \tocreadfilename
     \endgroup
   }
+  {\catcode`[=1 \catcode`]=2
+   \catcode`{=\other \catcode`}=\other
+   \gdef\lbracecharliteral[{]%
+   \gdef\rbracecharliteral[}]%
+  ]
   %
   \def\skipspaces#1{\def\PP{#1}\def\D{|}%
     \ifx\PP\D\let\nextsp\relax
@@ -2851,20 +2836,48 @@ end
   }
 }
 
+% @inlinefmt{FMTNAME,PROCESSED-TEXT} and @inlineraw{FMTNAME,RAW-TEXT}.
+% Ignore unless FMTNAME == tex; then it is like @iftex and @tex,
+% except specified as a normal braced arg, so no newlines to worry about.
+% 
+\def\outfmtnametex{tex}
+%
+\def\inlinefmt#1{\doinlinefmt #1,\finish}
+\def\doinlinefmt#1,#2,\finish{%
+  \def\inlinefmtname{#1}%
+  \ifx\inlinefmtname\outfmtnametex \ignorespaces #2\fi
+}
+% For raw, must switch into @tex before parsing the argument, to avoid
+% setting catcodes prematurely.  Doing it this way means that, for
+% example, @inlineraw{html, foo{bar} gets a parse error instead of being
+% ignored.  But this isn't important because if people want a literal
+% *right* brace they would have to use a command anyway, so they may as
+% well use a command to get a left brace too.  We could re-use the
+% delimiter character idea from \verb, but it seems like overkill.
+% 
+\def\inlineraw{\tex \doinlineraw}
+\def\doinlineraw#1{\doinlinerawtwo #1,\finish}
+\def\doinlinerawtwo#1,#2,\finish{%
+  \def\inlinerawname{#1}%
+  \ifx\inlinerawname\outfmtnametex \ignorespaces #2\fi
+  \endgroup % close group opened by \tex.
+}
+
 
 \message{glyphs,}
 % and logos.
 
-% @@ prints an @.
+% @@ prints an @, as does @atchar{}.
 address@hidden }
+\let\atchar=\@
 
-% 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.
+% @{ @} @lbracechar{} @rbracechar{} all generate brace characters.
+% Unless we're in typewriter, use \ecfont because the CM text fonts do
+% not have braces, and we don't want to switch into math.
 \def\mylbrace{{\ifmonospace\else\ecfont\fi \char123}}
 \def\myrbrace{{\ifmonospace\else\ecfont\fi \char125}}
-\let\{=\mylbrace
-\let\}=\myrbrace
+\let\{=\mylbrace \let\lbracechar=\{
+\let\}=\myrbrace \let\rbracechar=\}
 \begingroup
   % Definitions to produce \{ and \} commands for indices,
   % and @{ and @} for the aux/toc files.
@@ -4486,6 +4499,7 @@ end
   %
   % Commands that take arguments.
   \definedummyword\acronym
+  \definedummyword\anchor
   \definedummyword\cite
   \definedummyword\code
   \definedummyword\command
@@ -7825,9 +7839,8 @@ end
      % etc. don't get their TeX definitions.
      \getfilename{#4}%
      %
-     % See comments at \activebackslashdouble.
-     {\activebackslashdouble \xdef\pdfxrefdest{#1}%
-      \backslashparens\pdfxrefdest}%
+     \edef\pdfxrefdest{#1}%
+     \txiescapepdf\pdfxrefdest
      %
      \leavevmode
      \startlink attr{/Border [0 0 0]}%
@@ -9796,14 +9809,24 @@ directory should work if nowhere else does.}
 
 % In texinfo, backslash is an active character; it prints the backslash
 % in fixed width font.
-\catcode`\\=\active
address@hidden@address@hidden@backslashcurfont}}
+\catcode`\\=\active  % @ for escape char from now on.
+
+% The story here is that in math mode, the \char of \backslashcurfont
+% ends up printing the roman \ from the math symbol font (because \char
+% in math mode uses the \mathcode, and plain.tex sets
+% \mathcode`\\="026E).  It seems better for @backslashchar{} to always
+% print a typewriter backslash, hence we use an explicit \mathchar,
+% which is the decimal equivalent of "715c (class 7, e.g., use \fam;
+% ignored family value; char position "5C).  We can't use " for the
+% usual hex value because it has already been made active.
address@hidden@address@hidden @ifmmode @mathchar29020 @else @backslashcurfont 
@fi}}
address@hidden@backslashchar = @normalbackslash % @backslashchar{} is for user 
documents.
+
 % On startup, @fixbackslash assigns:
 %  @let \ = @normalbackslash
-
 % \rawbackslash defines an active \ to do \backslashcurfont.
 % \otherbackslash defines an active \ to be a literal `\' character with
-% catcode other.
+% catcode other.  We switch back and forth between these.
 @address@hidden@address@hidden
 @address@hidden@address@hidden
 
@@ -9859,10 +9882,13 @@ directory should work if nowhere else does.}
 @address@hidden/}
 
 % These look ok in all fonts, so just make them not special.
+% @hashchar{} gets its own user-level command, because of #line.
 @catcode`@& = @other @address@hidden&}
 @address@hidden = @other @address@hidden
 @address@hidden = @other @address@hidden
 
address@hidden @hashchar = @normalhash
+
 @c Finally, make ` and ' active, so that txicodequoteundirected and
 @c txicodequotebacktick work right in, e.g., @address@hidden'}}.  If we
 @c don't make ` and ' active, @code will not get them as active chars.
diff --git a/lib/update-copyright b/lib/update-copyright
new file mode 100755
index 0000000..082b749
--- /dev/null
+++ b/lib/update-copyright
@@ -0,0 +1,274 @@
+eval '(exit $?0)' && eval 'exec perl -wS -0777 -pi "$0" ${1+"$@"}'
+  & eval 'exec perl -wS -0777 -pi "$0" $argv:q'
+    if 0;
+# Update an FSF copyright year list to include the current year.
+
+my $VERSION = '2012-02-05.21:39'; # UTC
+
+# Copyright (C) 2009-2012 Free Software Foundation, Inc.
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# Written by Jim Meyering and Joel E. Denny
+
+# The arguments to this script should be names of files that contain
+# copyright statements to be updated.  The copyright holder's name
+# defaults to "Free Software Foundation, Inc." but may be changed to
+# any other name by using the "UPDATE_COPYRIGHT_HOLDER" environment
+# variable.
+#
+# For example, you might wish to use the update-copyright target rule
+# in maint.mk from gnulib's maintainer-makefile module.
+#
+# Iff a copyright statement is recognized in a file and the final
+# year is not the current year, then the statement is updated for the
+# new year and it is reformatted to:
+#
+#   1. Fit within 72 columns.
+#   2. Convert 2-digit years to 4-digit years by prepending "19".
+#   3. Expand copyright year intervals.  (See "Environment variables"
+#      below.)
+#
+# A warning is printed for every file for which no copyright
+# statement is recognized.
+#
+# Each file's copyright statement must be formatted correctly in
+# order to be recognized.  For example, each of these is fine:
+#
+#   Copyright @copyright{} 1990-2005, 2007-2009 Free Software
+#   Foundation, Inc.
+#
+#   # Copyright (C) 1990-2005, 2007-2009 Free Software
+#   # Foundation, Inc.
+#
+#   /*
+#    * Copyright &copy; 90,2005,2007-2009
+#    * Free Software Foundation, Inc.
+#    */
+#
+# However, the following format is not recognized because the line
+# prefix changes after the first line:
+#
+#   ## Copyright (C) 1990-2005, 2007-2009 Free Software
+#   #  Foundation, Inc.
+#
+# However, any correctly formatted copyright statement following
+# a non-matching copyright statements would be recognized.
+#
+# The exact conditions that a file's copyright statement must meet
+# to be recognized are:
+#
+#   1. It is the first copyright statement that meets all of the
+#      following conditions.  Subsequent copyright statements are
+#      ignored.
+#   2. Its format is "Copyright (C)", then a list of copyright years,
+#      and then the name of the copyright holder.
+#   3. The "(C)" takes one of the following forms or is omitted
+#      entirely:
+#
+#        A. (C)
+#        B. (c)
+#        C. @copyright{}
+#        D. &copy;
+#
+#   4. The "Copyright" appears at the beginning of a line, except that it
+#      may be prefixed by any sequence (e.g., a comment) of no more than
+#      5 characters -- including white space.
+#   5. Iff such a prefix is present, the same prefix appears at the
+#      beginning of each remaining line within the FSF copyright
+#      statement.  There is one exception in order to support C-style
+#      comments: if the first line's prefix contains nothing but
+#      whitespace surrounding a "/*", then the prefix for all subsequent
+#      lines is the same as the first line's prefix except with each of
+#      "/" and possibly "*" replaced by a " ".  The replacement of "*"
+#      by " " is consistent throughout all subsequent lines.
+#   6. Blank lines, even if preceded by the prefix, do not appear
+#      within the FSF copyright statement.
+#   7. Each copyright year is 2 or 4 digits, and years are separated by
+#      commas or dashes.  Whitespace may appear after commas.
+#
+# Environment variables:
+#
+#   1. If UPDATE_COPYRIGHT_FORCE=1, a recognized FSF copyright statement
+#      is reformatted even if it does not need updating for the new
+#      year.  If unset or set to 0, only updated FSF copyright
+#      statements are reformatted.
+#   2. If UPDATE_COPYRIGHT_USE_INTERVALS=1, every series of consecutive
+#      copyright years (such as 90, 1991, 1992-2007, 2008) in a
+#      reformatted FSF copyright statement is collapsed to a single
+#      interval (such as 1990-2008).  If unset or set to 0, all existing
+#      copyright year intervals in a reformatted FSF copyright statement
+#      are expanded instead.
+#      If UPDATE_COPYRIGHT_USE_INTERVALS=2, convert a sequence with gaps
+#      to the minimal containing range.  For example, convert
+#      2000, 2004-2007, 2009 to 2000-2009.
+#   3. For testing purposes, you can set the assumed current year in
+#      UPDATE_COPYRIGHT_YEAR.
+#   4. The default maximum line length for a copyright line is 72.
+#      Set UPDATE_COPYRIGHT_MAX_LINE_LENGTH to use a different length.
+#   5. Set UPDATE_COPYRIGHT_HOLDER if the copyright holder is other
+#      than "Free Software Foundation, Inc.".
+
+use strict;
+use warnings;
+
+my $copyright_re = 'Copyright';
+my $circle_c_re = '(?:\([cC]\)|@copyright{}|&copy;)';
+my $holder = $ENV{UPDATE_COPYRIGHT_HOLDER};
+$holder ||= 'Free Software Foundation, Inc.';
+my $prefix_max = 5;
+my $margin = $ENV{UPDATE_COPYRIGHT_MAX_LINE_LENGTH};
+!$margin || $margin !~ m/^\d+$/
+  and $margin = 72;
+
+my $tab_width = 8;
+
+my $this_year = $ENV{UPDATE_COPYRIGHT_YEAR};
+if (!$this_year || $this_year !~ m/^\d{4}$/)
+  {
+    my ($sec, $min, $hour, $mday, $month, $year) = localtime (time ());
+    $this_year = $year + 1900;
+  }
+
+# Unless the file consistently uses "\r\n" as the EOL, use "\n" instead.
+my $eol = /(?:^|[^\r])\n/ ? "\n" : "\r\n";
+
+my $leading;
+my $prefix;
+my $ws_re;
+my $stmt_re;
+while (/(^|\n)(.{0,$prefix_max})$copyright_re/g)
+  {
+    $leading = "$1$2";
+    $prefix = $2;
+    if ($prefix =~ /^(\s*\/)\*(\s*)$/)
+      {
+        $prefix =~ s,/, ,;
+        my $prefix_ws = $prefix;
+        $prefix_ws =~ s/\*/ /; # Only whitespace.
+        if (/\G(?:[^*\n]|\*[^\/\n])*\*?\n$prefix_ws/)
+          {
+            $prefix = $prefix_ws;
+          }
+      }
+    $ws_re = '[ \t\r\f]'; # \s without \n
+    $ws_re =
+      "(?:$ws_re*(?:$ws_re|\\n" . quotemeta($prefix) . ")$ws_re*)";
+    my $holder_re = $holder;
+    $holder_re =~ s/\s/$ws_re/g;
+    my $stmt_remainder_re =
+      "(?:$ws_re$circle_c_re)?"
+      . "$ws_re(?:(?:\\d\\d)?\\d\\d(?:,$ws_re?|-))*"
+      . "((?:\\d\\d)?\\d\\d)$ws_re$holder_re";
+    if (/\G$stmt_remainder_re/)
+      {
+        $stmt_re =
+          quotemeta($leading) . "($copyright_re$stmt_remainder_re)";
+        last;
+      }
+  }
+if (defined $stmt_re)
+  {
+    /$stmt_re/ or die; # Should never die.
+    my $stmt = $1;
+    my $final_year_orig = $2;
+
+    # Handle two-digit year numbers like "98" and "99".
+    my $final_year = $final_year_orig;
+    $final_year <= 99
+      and $final_year += 1900;
+
+    if ($final_year != $this_year)
+      {
+        # Update the year.
+        $stmt =~ s/$final_year_orig/$final_year, $this_year/;
+      }
+    if ($final_year != $this_year || $ENV{'UPDATE_COPYRIGHT_FORCE'})
+      {
+        # Normalize all whitespace including newline-prefix sequences.
+        $stmt =~ s/$ws_re/ /g;
+
+        # Put spaces after commas.
+        $stmt =~ s/, ?/, /g;
+
+        # Convert 2-digit to 4-digit years.
+        $stmt =~ s/(\b\d\d\b)/19$1/g;
+
+        # Make the use of intervals consistent.
+        if (!$ENV{UPDATE_COPYRIGHT_USE_INTERVALS})
+          {
+            $stmt =~ s/(\d{4})-(\d{4})/join(', ', $1..$2)/eg;
+          }
+        else
+          {
+            $stmt =~
+              s/
+                (\d{4})
+                (?:
+                  (,\ |-)
+                  ((??{
+                    if    ($2 eq '-') { '\d{4}'; }
+                    elsif (!$3)       { $1 + 1;  }
+                    else              { $3 + 1;  }
+                  }))
+                )+
+              /$1-$3/gx;
+
+            # When it's 2, emit a single range encompassing all year numbers.
+            $ENV{UPDATE_COPYRIGHT_USE_INTERVALS} == 2
+              and $stmt =~ s/\b(\d{4})\b.*\b(\d{4})\b/$1-$2/;
+          }
+
+        # Format within margin.
+        my $stmt_wrapped;
+        my $text_margin = $margin - length($prefix);
+        if ($prefix =~ /^(\t+)/)
+          {
+            $text_margin -= length($1) * ($tab_width - 1);
+          }
+        while (length $stmt)
+          {
+            if (($stmt =~ s/^(.{1,$text_margin})(?: |$)//)
+                || ($stmt =~ s/^([\S]+)(?: |$)//))
+              {
+                my $line = $1;
+                $stmt_wrapped .= $stmt_wrapped ? "$eol$prefix" : $leading;
+                $stmt_wrapped .= $line;
+              }
+            else
+              {
+                # Should be unreachable, but we don't want an infinite
+                # loop if it can be reached.
+                die;
+              }
+          }
+
+        # Replace the old copyright statement.
+        s/$stmt_re/$stmt_wrapped/;
+      }
+  }
+else
+  {
+    print STDERR "$ARGV: warning: copyright statement not found\n";
+  }
+
+# Local variables:
+# mode: perl
+# indent-tabs-mode: nil
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "my $VERSION = '"
+# time-stamp-format: "%:y-%02m-%02d.%02H:%02M"
+# time-stamp-time-zone: "UTC"
+# time-stamp-end: "'; # UTC"
+# End:
diff --git a/m4/Makefile.am b/m4/Makefile.am
index eebf04e..c1442f6 100644
--- a/m4/Makefile.am
+++ b/m4/Makefile.am
@@ -3,7 +3,7 @@
 ## Makefile for Automake m4.
 
 # Copyright (C) 1996, 1997, 1998, 1999, 2001, 2002, 2003, 2004, 2006,
-# 2008, 2009, 2011 Free Software Foundation, Inc.
+# 2008, 2009, 2011, 2012 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -73,10 +73,10 @@ EXTRA_DIST = acdir/dirlist amversion.in
 # loop otherwise.
 # Use `$(top_srcdir)/m4' for the benefit of non-GNU makes: this is
 # how amversion.m4 appears in our dependencies.
-$(top_srcdir)/m4/amversion.m4: $(srcdir)/amversion.in
-       sed -e 's,address@hidden@],$(VERSION),g' \
+$(top_srcdir)/m4/amversion.m4: $(top_srcdir)/configure.ac 
$(srcdir)/amversion.in
+       $(AM_V_at)sed \
+           -e 's,address@hidden@],$(VERSION),g' \
            -e 's,address@hidden@],$(APIVERSION),g' \
            -e "s,address@hidden@],Generated from amversion.in; do not edit by 
hand.,g" \
-           $(srcdir)/amversion.in > address@hidden
-       chmod a-w address@hidden
-       mv -f address@hidden $@
+           $(srcdir)/amversion.in > address@hidden
+       @$(AM_V_at)chmod a-w address@hidden && mv -f address@hidden $@
diff --git a/m4/multi.m4 b/m4/multi.m4
index 9841767..447591f 100644
--- a/m4/multi.m4
+++ b/m4/multi.m4
@@ -1,5 +1,5 @@
 ##                                                          -*- Autoconf -*-
-# Copyright (C) 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006
+# Copyright (C) 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006, 2012
 # Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
@@ -12,6 +12,9 @@
 # ---------------------------------------------------
 # Add --enable-multilib to configure.
 AC_DEFUN([AM_ENABLE_MULTILIB],
+[m4_warn([obsolete], [$0 will be removed from Automake core soon.
+Files implementing the "multilib" feature are (and will remain) available
+to the 'contrib/' directory in the Automake distribution.])]dnl
 [# Default to --enable-multilib
 AC_ARG_ENABLE(multilib,
 [  --enable-multilib       build many library versions (default)],
diff --git a/m4/tar.m4 b/m4/tar.m4
index a4a00ec..0683951 100644
--- a/m4/tar.m4
+++ b/m4/tar.m4
@@ -1,6 +1,6 @@
 # Check how to create a tarball.                            -*- Autoconf -*-
 
-# Copyright (C) 2004, 2005  Free Software Foundation, Inc.
+# Copyright (C) 2004, 2005, 2012 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -22,10 +22,11 @@
 # a tarball read from stdin.
 #     $(am__untar) < result.tar
 AC_DEFUN([_AM_PROG_TAR],
-[# Always define AMTAR for backward compatibility.
-AM_MISSING_PROG([AMTAR], [tar])
+[# Always define AMTAR for backward compatibility.  Yes, it's still used
+# in the wild :-(  We should find a proper way to deprecate it ...
+AC_SUBST([AMTAR], ['$${TAR-tar}'])
 m4_if([$1], [v7],
-     [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'],
+     [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'],
      [m4_case([$1], [ustar],, [pax],,
               [m4_fatal([Unknown tar format])])
 AC_MSG_CHECKING([how to create a $1 tar archive])
diff --git a/tests/CheckListOfTests.am b/tests/CheckListOfTests.am
new file mode 100644
index 0000000..c71c7fc
--- /dev/null
+++ b/tests/CheckListOfTests.am
@@ -0,0 +1,67 @@
+## -*- Automake -*-
+##
+## Copyright (C) 2011, 2012 Free Software Foundation, Inc.
+##
+## This program is free software; you can redistribute it and/or modify
+## it under the terms of the GNU General Public License as published by
+## the Free Software Foundation; either version 2, or (at your option)
+## any later version.
+##
+## This program is distributed in the hope that it will be useful,
+## but WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+## GNU General Public License for more details.
+##
+## You should have received a copy of the GNU General Public License
+## along with this program.  If not, see <http://www.gnu.org/licenses/>.
+##
+
+## Temporary files used in the `check-list-of-tests' target.
+am__tmk = tests-in-makefile-list.tmp
+am__tfs = tests-on-filesystem-list.tmp
+am__tdf = diff-in-tests-lists.tmp
+
+## Check that the list of tests given in the Makefile is equal to the
+## list of all test scripts in the Automake testsuite.
+.PHONY: maintainer-check-list-of-tests
+maintainer-check-list-of-tests:
+## Prefer unified diffs over plain diffs, for readability.
+        @if diff -u /dev/null /dev/null >/dev/null 2>&1; then \
+          diff='diff -u'; \
+        else \
+          diff='diff'; \
+        fi; \
+## List of tests in Makefile.
+        lst='$(expected_list_of_tests)'; \
+        test -n "$$lst" || lst='$(TESTS)'; \
+        for t in $$lst; do \
+          echo "$$t"; \
+        done | sort >$(am__tmk); \
+## List of subdirs where to look for tests.
+        dirs='$(test_subdirs)'; \
+        test -n "$$dirs" || dirs=.; \
+## List of tests on filesystem.  Be careful to cater for VPATH builds too.
+        for ext in $(TEST_EXTENSIONS); do \
+          for dir in $$dirs; do \
+            ls $$dir/*$$ext 2>/dev/null; \
+            if test $(srcdir) != $(builddir); then \
+              (cd $(srcdir) && ls $$dir/*$$ext 2>/dev/null); \
+            fi; \
+          done; \
+        done | sed 's,^\./,,' | sort | uniq >$(am__tfs); \
+## Compare the two lists, complain if they differ.
+        if $$diff $(am__tmk) $(am__tfs) >$(am__tdf); then \
+           result=0; \
+        else \
+           echo '$@: list of tests in Makefile an on filesystem differ' >&2; \
+           echo "+ $$diff in-makefile on-filesystem" >&2; \
+           cat $(am__tdf) >&2; \
+           result=1; \
+        fi; \
+        rm -f $(am__tmk) $(am__tfs) $(am__tdf); \
+        exit $$result;
+
+.PHONY: clean-maintcheck-testslist-tmp
+clean-local: clean-maintcheck-testslist-tmp
+clean-maintcheck-testslist-tmp:
+       rm -f $(am__tmk) $(am__tfs) $(am__tdf)
diff --git a/tests/Makefile.am b/tests/Makefile.am
index bf732e5..d909942 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -1,7 +1,8 @@
 ## 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, 2011 Free Software Foundation, Inc.
+# 2006, 2007, 2008, 2009, 2010, 2011, 2012 Free Software Foundation,
+# Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -24,23 +25,23 @@ dist-auxfile.test \
 dist-auxfile-2.test \
 gcj6.test \
 java-nobase.test \
+objext-pr10128.test \
 pr8365-remake-timing.test \
 lex-subobj-nodep.test \
 remake-am-pr10111.test \
 remake-m4-pr10111.test \
-vala-vpath.test \
 txinfo5.test
 
 include $(srcdir)/parallel-tests.am
 
 $(srcdir)/parallel-tests.am: gen-parallel-tests Makefile.am
-       (cd $(srcdir) && $(SHELL) ./gen-parallel-tests) >$@
+       $(AM_V_GEN)(cd $(srcdir) && $(SHELL) ./gen-parallel-tests) >$@
 
 $(parallel_tests): $(parallel_tests:-p.test=.test) Makefile.am
-       input=`echo $@ | sed 's,.*/,,; s,-p.test$$,.test,'`; \
-       sed 's|^\. \./defs.*|parallel_tests=yes; &|' \
-         < $(srcdir)/$$input >$@
-       chmod a+rx $@
+       $(AM_V_GEN)input=`echo $@ | sed 's,.*/,,; s,-p.test$$,.test,'` \
+         && sed 's|^\. \./defs.*|parallel_tests=yes; &|' \
+              < $(srcdir)/$$input >$@ \
+         && chmod a+rx $@
 
 MAINTAINERCLEANFILES = $(parallel_tests)
 
@@ -51,910 +52,14 @@ TESTS_ENVIRONMENT = \
   test x"$$required" = x || unset required; \
   test x"$$parallel_tests" = x || unset parallel_tests;
 
-TESTS = \
-get-sysconf.test \
-self-check-env-sanitize.test \
-self-check-report.test \
-aclibobj.test \
-aclocal.test \
-aclocal3.test \
-aclocal4.test \
-aclocal5.test \
-aclocal6.test \
-aclocal7.test \
-aclocal8.test \
-aclocal9.test \
-acloca10.test \
-acloca11.test \
-acloca12.test \
-acloca13.test \
-acloca14.test \
-acloca15.test \
-acloca16.test \
-acloca17.test \
-acloca18.test \
-acloca19.test \
-acloca20.test \
-acloca21.test \
-acloca22.test \
-aclocal-acdir.test \
-aclocal-install-absdir.test \
-aclocal-print-acdir.test \
-aclocal-path.test \
-aclocal-path-install.test \
-aclocal-path-install-serial.test \
-aclocal-path-nonexistent.test \
-aclocal-path-precedence.test \
-acoutnoq.test \
-acoutpt.test \
-acoutpt2.test \
-acoutqnl.test \
-acoutbs.test \
-acoutbs2.test \
-acsilent.test \
-acsubst.test \
-acsubst2.test \
-all.test \
-all2.test \
-alloca.test \
-alloca2.test \
-alpha.test \
-alpha2.test \
-amhello-cflags.test \
-amhello-cross-compile.test \
-amhello-binpkg.test \
-amassign.test \
-ammissing.test \
-amopt.test \
-amsubst.test \
-ansi2knr-deprecation.test \
-ansi.test \
-ansi2.test \
-ansi3.test \
-ansi3b.test \
-ansi4.test \
-ansi5.test \
-ansi6.test \
-ansi7.test \
-ansi8.test \
-ansi9.test \
-ansi10.test \
-ar-lib.test \
-ar-lib2.test \
-ar-lib3.test \
-ar-lib4.test \
-ar-lib5a.test \
-ar-lib5b.test \
-ar-lib6a.test \
-ar-lib6b.test \
-ar-lib7.test \
-ar.test \
-ar2.test \
-ar3.test \
-ar4.test \
-ar5.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-no-duplicate.test \
-autodist-stamp-vti.test \
-autohdr.test \
-autohdr2.test \
-autohdr3.test \
-autohdr4.test \
-autohdrdry.test \
-automake.test \
-auxdir.test \
-auxdir2.test \
-auxdir3.test \
-auxdir4.test \
-backsl.test \
-backsl2.test \
-backsl3.test \
-backsl4.test \
-badline.test \
-badopt.test \
-badprog.test \
-block.test \
-bsource.test \
-canon.test \
-canon2.test \
-canon3.test \
-canon4.test \
-canon5.test \
-canon-name.test \
-ccnoco.test \
-ccnoco2.test \
-ccnoco3.test \
-check.test \
-check2.test \
-check3.test \
-check4.test \
-check5.test \
-check6.test \
-check7.test \
-check8.test \
-check9.test \
-check10.test \
-check11.test \
-check-exported-srcdir.test \
-check-tests-in-builddir.test \
-check-tests_environment.test \
-check-concurrency-bug9245.test \
-tests-environment-backcompat.test \
-checkall.test \
-clean.test \
-clean2.test \
-colneq.test \
-colneq2.test \
-colon.test \
-colon2.test \
-colon3.test \
-colon4.test \
-colon5.test \
-colon6.test \
-colon7.test \
-color.test \
-color2.test \
-comment.test \
-comment2.test \
-comment3.test \
-comment4.test \
-comment5.test \
-comment6.test \
-comment7.test \
-comment8.test \
-comment9.test \
-commen10.test \
-commen11.test \
-comments-in-var-def.test \
-compile.test \
-compile2.test \
-compile3.test \
-compile4.test \
-compile5.test \
-compile6.test \
-compile_f90_c_cxx.test \
-compile_f_c_cxx.test \
-cond.test \
-cond2.test \
-cond3.test \
-cond4.test \
-cond5.test \
-cond6.test \
-cond7.test \
-cond8.test \
-cond9.test \
-cond10.test \
-cond11.test \
-cond13.test \
-cond14.test \
-cond15.test \
-cond16.test \
-cond17.test \
-cond18.test \
-cond19.test \
-cond20.test \
-cond21.test \
-cond22.test \
-cond23.test \
-cond24.test \
-cond25.test \
-cond26.test \
-cond27.test \
-cond28.test \
-cond29.test \
-cond30.test \
-cond31.test \
-cond32.test \
-cond33.test \
-cond34.test \
-cond35.test \
-cond36.test \
-cond37.test \
-cond38.test \
-cond39.test \
-cond40.test \
-cond41.test \
-cond42.test \
-cond43.test \
-cond44.test \
-cond45.test \
-condd.test \
-condhook.test \
-condhook2.test \
-condinc.test \
-condinc2.test \
-condlib.test \
-condman.test \
-condman2.test \
-condman3.test \
-configure.test \
-confdeps.test \
-conff.test \
-conff2.test \
-confh.test \
-confh4.test \
-confh5.test \
-confh6.test \
-confh7.test \
-confh8.test \
-confincl.test \
-conflnk.test \
-conflnk2.test \
-conflnk3.test \
-conflnk4.test \
-confsub.test \
-confvar.test \
-confvar2.test \
-copy.test \
-ctarget1.test \
-cxx.test \
-cxx2.test \
-cxxansi.test \
-cxxcpp.test \
-cxxlibobj.test \
-cxxlink.test \
-cxxnoc.test \
-cxxo.test \
-cygwin32.test \
-dash.test \
-defun.test \
-defun2.test \
-dejagnu.test \
-dejagnu2.test \
-dejagnu3.test \
-dejagnu4.test \
-dejagnu5.test \
-dejagnu6.test \
-dejagnu7.test \
-dejagnu-absolute-builddir.test \
-dejagnu-relative-srcdir.test \
-dejagnu-siteexp-extend.test \
-dejagnu-siteexp-append.test \
-dejagnu-siteexp-useredit.test \
-deleted-am.test \
-deleted-m4.test \
-depacl2.test \
-depcomp.test \
-depcomp2.test \
-depcomp3.test \
-depcomp4.test \
-depcomp5.test \
-depcomp6.test \
-depcomp7.test \
-depcomp8a.test \
-depcomp8b.test \
-depcomp9.test \
-depcomp10.test \
-depdist.test \
-depend.test \
-depend2.test \
-depend3.test \
-depend4.test \
-depend5.test \
-depend6.test \
-destdir.test \
-dirlist.test \
-dirlist2.test \
-discover.test \
-dist-auxfile.test \
-dist-auxfile-2.test \
-dist-included-parent-dir.test \
-distcleancheck.test \
-distcom2.test \
-distcom3.test \
-distcom4.test \
-distcom5.test \
-distcom6.test \
-distcom7.test \
-distdir.test \
-distlinks.test \
-distlinksbrk.test \
-distname.test \
-distcheck-configure-flags.test \
-distcheck-configure-flags-am.test \
-distcheck-configure-flags-subpkg.test \
-distcheck-hook.test \
-distcheck-hook2.test \
-distcheck-missing-m4.test \
-distcheck-outdated-m4.test \
-distcheck-pr9579.test \
-distcheck-override-infodir.test \
-dmalloc.test \
-doc-parsing-buglets-colneq-subst.test \
-doc-parsing-buglets-tabs.test \
-dollar.test \
-dollarvar.test \
-dollarvar2.test \
-double.test \
-dup2.test \
-else.test \
-empty.test \
-empty2.test \
-empty3.test \
-empty4.test \
-exdir.test \
-exdir2.test \
-exdir3.test \
-exeext.test \
-exeext2.test \
-exeext3.test \
-exeext4.test \
-exsource.test \
-ext.test \
-ext2.test \
-extra.test \
-extra2.test \
-extra3.test \
-extra4.test \
-extra5.test \
-extra6.test \
-extra7.test \
-extra8.test \
-extra10.test \
-extra11.test \
-extra12.test \
-extra-portability.test \
-extra-portability2.test \
-extra-portability3.test \
-f90only.test \
-flavor.test \
-flibs.test \
-fn99.test \
-fn99subdir.test \
-fnoc.test \
-fo.test \
-forcemiss.test \
-forcemiss2.test \
-fort1.test \
-fort2.test \
-fort4.test \
-fort5.test \
-fonly.test \
-fortdep.test \
-gcj.test \
-gcj2.test \
-gcj3.test \
-gcj4.test \
-gcj5.test \
-gcj6.test \
-getopt.test \
-gettext.test \
-gettext2.test \
-gettext3.test \
-gnumake.test \
-gnuwarn.test \
-gnuwarn2.test \
-gnits.test \
-gnits2.test \
-gnits3.test \
-hdr-vars-defined-once.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-multilib.test \
-help-python.test \
-help-regex.test \
-help-silent.test \
-help-upc.test \
-hfs.test \
-hosts.test \
-implicit.test \
-info.test \
-init.test \
-init2.test \
-insh2.test \
-install2.test \
-installdir.test \
-install-info-dir.test \
-instsh.test \
-instsh2.test \
-instsh3.test \
-instdat.test \
-instdat2.test \
-instdir.test \
-instdir2.test \
-instdir-java.test \
-instdir-lisp.test \
-instdir-ltlib.test \
-instdir-prog.test \
-instdir-python.test \
-instdir-texi.test \
-instexec.test \
-instfail.test \
-instfail-info.test \
-instfail-java.test \
-instfail-libtool.test \
-insthook.test \
-instman.test \
-instman2.test \
-instmany.test \
-instmany-mans.test \
-instmany-python.test \
-instspc.test \
-interp.test \
-interp2.test \
-java.test \
-java2.test \
-java3.test \
-java-check.test \
-java-empty-classpath.test \
-javadir-undefined.test \
-javaprim.test \
-javasubst.test \
-java-clean.test \
-java-nobase.test \
-java-compile-install.test \
-java-sources.test \
-java-no-duplicate.test \
-java-mix.test \
-ldadd.test \
-ldflags.test \
-lex.test \
-lex2.test \
-lex3.test \
-lex4.test \
-lex5.test \
-lex-subobj-nodep.test \
-lflags.test \
-lflags2.test \
-libexec.test \
-libobj2.test \
-libobj3.test \
-libobj4.test \
-libobj5.test \
-libobj7.test \
-libobj8.test \
-libobj10.test \
-libobj11.test \
-libobj12.test \
-libobj13.test \
-libobj14.test \
-library.test \
-library2.test \
-library3.test \
-libtool.test \
-libtool2.test \
-libtool3.test \
-libtool4.test \
-libtool5.test \
-libtool6.test \
-libtool7.test \
-libtool8.test \
-libtool9.test \
-libtoo10.test \
-libtoo11.test \
-license.test \
-license2.test \
-link_c_cxx.test \
-link_dist.test \
-link_f90_only.test \
-link_fc.test \
-link_fccxx.test \
-link_fcxx.test \
-link_f_only.test \
-lisp2.test \
-lisp3.test \
-lisp4.test \
-lisp5.test \
-lisp6.test \
-lisp7.test \
-lisp8.test \
-lispdry.test \
-listval.test \
-location.test \
-longline.test \
-longlin2.test \
-ltcond.test \
-ltcond2.test \
-ltconv.test \
-ltdeps.test \
-ltinit.test \
-ltinstloc.test \
-ltlibobjs.test \
-ltlibsrc.test \
-ltorder.test \
-lzip.test \
-lzma.test \
-m4-inclusion.test \
-maintclean.test \
-maintclean-vpath.test \
-maintmode-configure-msg.test \
-make.test \
-makefile-deps.test \
-makej.test \
-makej2.test \
-maken.test \
-maken2.test \
-maken3.test \
-maken4.test \
-makevars.test \
-man.test \
-man2.test \
-man3.test \
-man4.test \
-man5.test \
-mdate.test \
-mdate2.test \
-mdate3.test \
-mdate4.test \
-mdate5.test \
-mdate6.test \
-missing.test \
-missing2.test \
-missing3.test \
-missing4.test \
-missing5.test \
-missing6.test \
-missing-tar.test \
-mkinstall.test \
-mkinst2.test \
-mkinst3.test \
-mmode.test \
-mmodely.test \
-multlib.test \
-nobase.test \
-nobase-libtool.test \
-nobase-python.test \
-nobase-nodist.test \
-nodef.test \
-nodef2.test \
-nodep.test \
-nodep2.test \
-nodepcomp.test \
-nodist.test \
-nodist2.test \
-nodist3.test \
-nogzip.test \
-nogzip2.test \
-noinst.test \
-noinstdir.test \
-nolink.test \
-nostdinc.test \
-notrans.test \
-number.test \
-objc.test \
-objc2.test \
-obsolete.test \
-order.test \
-outdir.test \
-output.test \
-output2.test \
-output3.test \
-output4.test \
-output5.test \
-output6.test \
-output7.test \
-output8.test \
-output9.test \
-output10.test \
-output11.test \
-output12.test \
-output13.test \
-output-order.test \
-overrid.test \
-parallel-am.test \
-parallel-am2.test \
-parallel-am3.test \
-parallel-tests.test \
-parallel-tests2.test \
-parallel-tests3.test \
-parallel-tests4.test \
-parallel-tests5.test \
-parallel-tests6.test \
-parallel-tests7.test \
-parallel-tests8.test \
-parallel-tests9.test \
-parallel-tests10.test \
-parallel-tests-harderror.test \
-parallel-tests-unreadable-log.test \
-parallel-tests-subdir.test \
-parallel-tests-log-override-1.test \
-parallel-tests-log-override-2.test \
-parallel-tests-log-override-recheck.test \
-parallel-tests-log-compiler-example.test \
-test-extensions.test \
-test-extensions-cond.test \
-parse.test \
-percent.test \
-percent2.test \
-phony.test \
-pluseq.test \
-pluseq2.test \
-pluseq3.test \
-pluseq4.test \
-pluseq5.test \
-pluseq6.test \
-pluseq7.test \
-pluseq8.test \
-pluseq9.test \
-pluseq10.test \
-pluseq11.test \
-postproc.test \
-ppf77.test \
-pr2.test \
-pr9.test \
-pr72.test \
-pr87.test \
-pr204.test \
-pr211.test \
-pr220.test \
-pr224.test \
-pr229.test \
-pr243.test \
-pr266.test \
-pr279.test \
-pr279-2.test \
-pr287.test \
-pr300-lib.test \
-pr300-ltlib.test \
-pr300-prog.test \
-pr307.test \
-pr401.test \
-pr401b.test \
-pr401c.test \
-prefix.test \
-primary.test \
-primary2.test \
-primary3.test \
-primary-prefix-invalid-couples.test \
-primary-prefix-valid-couples.test \
-primary-prefix-couples-force-valid.test \
-primary-prefix-couples-documented-valid.test \
-proginst.test \
-py-compile-basic.test \
-py-compile-basic2.test \
-py-compile-basedir.test \
-py-compile-destdir.test \
-py-compile-env.test \
-py-compile-option-terminate.test \
-py-compile-usage.test \
-python.test \
-python2.test \
-python3.test \
-python4.test \
-python5.test \
-python6.test \
-python7.test \
-python8.test \
-python9.test \
-python10.test \
-python11.test \
-python12.test \
-recurs.test \
-recurs2.test \
-remake.test \
-remake2.test \
-remake3.test \
-remake4.test \
-remake5.test \
-remake6.test \
-remake7.test \
-remake-subdir-from-subdir.test \
-remake-subdir-gnu.test \
-remake-subdir.test \
-remake-subdir2.test \
-remake-subdir-long-time.test \
-remake-am-pr10111.test \
-remake-m4-pr10111.test \
-remake-deleted-am.test \
-remake-deleted-am-2.test \
-remake-deleted-am-subdir.test \
-remake-renamed-am.test \
-pr8365-remake-timing.test \
-regex.test \
-regex-obsolete.test \
-req.test \
-reqd.test \
-reqd2.test \
-rulepat.test \
-sanity.test \
-scripts.test \
-seenc.test \
-silent.test \
-silent2.test \
-silent3.test \
-silent4.test \
-silent6.test \
-silent7.test \
-silent9.test \
-silentcxx.test \
-silentf77.test \
-silentf90.test \
-silent-many-gcc.test \
-silent-many-generic.test \
-silent-lex-gcc.test \
-silent-lex-generic.test \
-silent-nested-vars.test \
-silent-yacc-gcc.test \
-silent-yacc-generic.test \
-silent-configsite.test \
-srcsub.test \
-srcsub2.test \
-space.test \
-specflg.test \
-specflg2.test \
-specflg3.test \
-specflg6.test \
-specflg7.test \
-specflg8.test \
-specflg9.test \
-specflg10.test \
-specflg-dummy.test \
-spell.test \
-spell2.test \
-spell3.test \
-spelling.test \
-spy.test \
-stdinc.test \
-stamph2.test \
-stdlib.test \
-stdlib2.test \
-strip.test \
-strip2.test \
-strip3.test \
-subdir.test \
-subdir2.test \
-subdir3.test \
-subdir4.test \
-subdir5.test \
-subdir6.test \
-subdir7.test \
-subdir8.test \
-subdir9.test \
-subdir10.test \
-subdirbuiltsources.test \
-subcond.test \
-subcond2.test \
-subcond3.test \
-subobj.test \
-subobj2.test \
-subobj3.test \
-subobj4.test \
-subobj5.test \
-subobj6.test \
-subobj7.test \
-subobj8.test \
-subobj9.test \
-subobj10.test \
-subobj11a.test \
-subobj11b.test \
-subobj11c.test \
-subobjname.test \
-subpkg.test \
-subpkg2.test \
-subpkg3.test \
-subpkg4.test \
-subpkg-yacc.test \
-subst.test \
-subst2.test \
-subst3.test \
-subst4.test \
-substref.test \
-substre2.test \
-substtarg.test \
-suffix.test \
-suffix2.test \
-suffix3.test \
-suffix4.test \
-suffix5.test \
-suffix6.test \
-suffix7.test \
-suffix8.test \
-suffix9.test \
-suffix10.test \
-suffix11.test \
-suffix12.test \
-suffix13.test \
-symlink.test \
-symlink2.test \
-syntax.test \
-tags.test \
-tagsub.test \
-tar.test \
-tar2.test \
-tar3.test \
-target-cflags.test \
-targetclash.test \
-txinfo.test \
-txinfo2.test \
-txinfo3.test \
-txinfo4.test \
-txinfo5.test \
-txinfo5b.test \
-txinfo6.test \
-txinfo7.test \
-txinfo8.test \
-txinfo9.test \
-txinfo10.test \
-txinfo13.test \
-txinfo16.test \
-txinfo17.test \
-txinfo18.test \
-txinfo19.test \
-txinfo20.test \
-txinfo21.test \
-txinfo22.test \
-txinfo23.test \
-txinfo24.test \
-txinfo25.test \
-txinfo26.test \
-txinfo27.test \
-txinfo28.test \
-txinfo29.test \
-txinfo30.test \
-txinfo31.test \
-txinfo32.test \
-txinfo33.test \
-transform.test \
-transform2.test \
-uninstall-pr9578.test \
-uninstall-fail.test \
-unused.test \
-upc.test \
-upc2.test \
-upc3.test \
-vala.test \
-vala1.test \
-vala2.test \
-vala3.test \
-vala4.test \
-vala5.test \
-vala-vpath.test \
-vars.test \
-vars3.test \
-vartar.test \
-version.test \
-version2.test \
-version3.test \
-version4.test \
-version6.test \
-version7.test \
-version8.test \
-vpath.test \
-vtexi.test \
-vtexi2.test \
-vtexi3.test \
-vtexi4.test \
-warnopts.test \
-werror.test \
-werror2.test \
-werror3.test \
-whoami.test \
-xsource.test \
-xz.test \
-yacc.test \
-yacc2.test \
-yacc3.test \
-yacc4.test \
-yacc5.test \
-yacc6.test \
-yacc7.test \
-yacc8.test \
-yaccdry.test \
-yaccpp.test \
-yaccvpath.test \
-yacc-dist-nobuild-subdir.test \
-yflags.test \
-yflags2.test \
-libtool-macros.test \
-gettext-macros.test \
-$(parallel_tests)
+TEST_EXTENSIONS = .pl .test
+
+PL_LOG_COMPILER = $(PERL)
+AM_PL_LOG_FLAGS = -Mstrict -I $(top_builddir)/lib -I $(top_srcdir)/lib -w
+
+include $(srcdir)/list-of-tests.mk
+
+TESTS = $(handwritten_TESTS) $(parallel_tests)
 
 # FIXME: make these automatically computed once we are merged into
 # FIXME: the `testsuite-work' branch.
@@ -964,6 +69,7 @@ ar-lib6b.log: libtool-macros.log
 depcomp4.log: libtool-macros.log
 depcomp7.log: libtool-macros.log
 depcomp8b.log: libtool-macros.log
+extradep2.log: libtool-macros.log
 fort5.log: libtool-macros.log
 instdir-ltlib.log: libtool-macros.log
 instfail-libtool.log: libtool-macros.log
@@ -1029,6 +135,11 @@ EXTRA_DIST += distcheck-hook-m4.am
 # Each test case depends on defs, aclocal, and automake.
 check_SCRIPTS = defs aclocal-$(APIVERSION) automake-$(APIVERSION)
 
+## Checking the list of tests.
+test_subdirs = . pm
+include $(srcdir)/CheckListOfTests.am
+maintainer-check-list-of-tests: $(parallel_tests)
+
 clean-local: clean-local-check
 .PHONY: clean-local-check
 clean-local-check:
diff --git a/tests/acloca10.test b/tests/acloca10.test
index d7a058f..581fe77 100755
--- a/tests/acloca10.test
+++ b/tests/acloca10.test
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2003, 2005  Free Software Foundation, Inc.
+# Copyright (C) 2003, 2005, 2012 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -55,6 +55,8 @@ grep MACRO3 aclocal.m4
 test ! -f m4_1/macro.m4
 test ! -f m4_2/macro.m4
 
+$sleep
+
 $ACLOCAL -I m4_2 -I m4_1
 $AUTOCONF
 ./configure
@@ -65,6 +67,8 @@ grep MACRO3 aclocal.m4
 test ! -f m4_1/macro.m4
 test ! -f m4_2/macro.m4
 
+$sleep
+
 $ACLOCAL -I m4_1 -I m4_2 --install
 $AUTOCONF
 ./configure
@@ -76,6 +80,8 @@ test -f m4_1/macro.m4
 test ! -f m4_2/macro.m4
 cp aclocal.m4 copy.m4
 
+$sleep
+
 echo '#GREPME' >>dirlist-test/macro.m4
 $ACLOCAL -I m4_1 -I m4_2 --install
 $AUTOCONF
diff --git a/tests/acloca18.test b/tests/acloca18.test
index de99786..7c97301 100755
--- a/tests/acloca18.test
+++ b/tests/acloca18.test
@@ -1,5 +1,6 @@
 #! /bin/sh
-# Copyright (C) 2005, 2006, 2008, 2010 Free Software Foundation, Inc.
+# Copyright (C) 2005, 2006, 2008, 2010, 2012 Free Software Foundation,
+# Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -53,39 +54,46 @@ cat >4/mumble.m4 <<EOF
 AC_DEFUN([AM_MACRO1], [echo macro14 >> foo])
 EOF
 
+clean_stale ()
+{
+  rm -rf aclocal.m4 configure foo autom4te*.cache
+}
+
 $ACLOCAL -I 1 -I 2 -I 3 -I 4
 $AUTOCONF
 ./configure
 grep macro11 foo
 grep macro21 foo
 
-rm -rf foo autom4te*.cache
+clean_stale
 $ACLOCAL  -I 1 -I 2 -I 3 -I 4 --install
 $AUTOCONF
 ./configure
 grep macro12 foo
 grep macro23 foo
 
-rm -rf foo autom4te*.cache
+cp -f aclocal.m4 aclocal-m4.sav
+clean_stale
+mv -f aclocal-m4.sav aclocal.m4
 $ACLOCAL -I 4 -I 1 -I 2 -I 3 --install --dry-run
 $AUTOCONF
 ./configure
 grep macro12 foo
 grep macro23 foo
 
-rm -rf foo autom4te*.cache
+clean_stale
 $ACLOCAL -I 4 -I 1 -I 2 -I 3 --install
 $AUTOCONF
 ./configure
 grep macro14 foo
 grep macro23 foo
 
-rm -rf foo autom4te*.cache
+clean_stale
 $ACLOCAL -I 4 -I 1 -I 2 --install 2>stderr && { cat stderr >&2; Exit 1; }
 cat stderr >&2
 grep 'macro.*AM_MACRO2.*not found' stderr
 
-rm -rf foo autom4te*.cache
+clean_stale
 $ACLOCAL -I 4 -I 1 --install
 $AUTOCONF
 ./configure
@@ -98,7 +106,7 @@ cat >dirlist-test/m1.m4 <<EOF
 AC_DEFUN([AM_MACRO1], [echo macro1d >> foo])
 AC_DEFUN([AM_MACRO2], [echo macro2d >> foo])
 EOF
-rm -rf foo autom4te*.cache
+clean_stale
 $ACLOCAL -I 4 -I 1 --diff=diff >stdout 2>stderr || {
   cat stderr >&2
   cat stdout
diff --git a/tests/aclocal-install-absdir.test 
b/tests/aclocal-install-absdir.test
old mode 100644
new mode 100755
diff --git a/tests/aclocal5.test b/tests/aclocal5.test
index b206587..ec032e4 100755
--- a/tests/aclocal5.test
+++ b/tests/aclocal5.test
@@ -51,6 +51,7 @@ $MAKE
 # updated, even from a sub-directory.  Check that AU_ALIAS is
 # recognized. Change the definition of AM_TEST to check that its new
 # definition is used.
+$sleep # Modified configure dependencies must be newer than config.status.
 echo 'AU_ALIAS([AM_TEST], [AC_SUBST])' > m4/moredefs.m4
 cd sub
 $MAKE
@@ -64,6 +65,7 @@ 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.
+$sleep # Modified configure dependencies must be newer than config.status.
 echo 'AC_DEFUN_ONCE([AM_TEST], [AC_SUBST(__$1__)])' > m4/moredefs.m4
 $MAKE
 grep 'm4/moredefs\.m4' aclocal.m4
diff --git a/tests/aclocal9.test b/tests/aclocal9.test
index 325f6ae..7a786aa 100755
--- a/tests/aclocal9.test
+++ b/tests/aclocal9.test
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2003  Free Software Foundation, Inc.
+# Copyright (C) 2003, 2012 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -42,8 +42,8 @@ $AUTOCONF
 grep macro11 foo
 grep macro21 foo
 
-$ACLOCAL -I m4_2 -I m4_1
-$AUTOCONF
+$ACLOCAL --force -I m4_2 -I m4_1
+$AUTOCONF --force
 ./configure
 grep macro12 foo
 grep macro21 foo
diff --git a/tests/ar-lib.test b/tests/ar-lib.test
index a929ea4..1bb46b1 100755
--- a/tests/ar-lib.test
+++ b/tests/ar-lib.test
@@ -45,6 +45,23 @@ touch foo.lib
 opts=`./ar-lib ./lib r foo.lib foo.obj`
 test x"$opts" = x"lib -NOLOGO -OUT:foo.lib foo.lib foo.obj"
 
+# Check if ar-lib can update an existing archive with "q".
+opts=`./ar-lib ./lib q foo.lib foo.obj`
+test x"$opts" = x"lib -NOLOGO -OUT:foo.lib foo.lib foo.obj"
+
+# Check if ar-lib accepts "u" as a modifier.
+# NOTE: "u" should have an effect, but currently doesn't.
+opts=`./ar-lib ./lib ru foo.lib foo.obj`
+test x"$opts" = x"lib -NOLOGO -OUT:foo.lib foo.lib foo.obj"
+
+# Check if ar-lib accepts "s" as a modifier.
+opts=`./ar-lib ./lib rs foo.lib foo.obj`
+test x"$opts" = x"lib -NOLOGO -OUT:foo.lib foo.lib foo.obj"
+
+# Check if ar-lib accepts "S" as a modifier.
+opts=`./ar-lib ./lib rS foo.lib foo.obj`
+test x"$opts" = x"lib -NOLOGO -OUT:foo.lib foo.lib foo.obj"
+
 # Check if ar-lib passes on @FILE with "r"
 opts=`./ar-lib ./lib r foo.lib @list`
 test x"$opts" = x"lib -NOLOGO -OUT:foo.lib foo.lib @list"
@@ -62,6 +79,11 @@ test x"$opts" = x"lib -NOLOGO -REMOVE:foo.obj foo.lib"
 opts=`./ar-lib ./lib t foo.lib`
 test x"$opts" = x"lib -NOLOGO -LIST foo.lib"
 
+# Check if ar-lib accepts "v" as a modifier.
+# NOTE: "v" should have an effect, but currently doesn't.
+opts=`./ar-lib ./lib tv foo.lib`
+test x"$opts" = x"lib -NOLOGO -LIST foo.lib"
+
 # Check if ar-lib can extract archive members with "x"
 touch fake.lib
 opts=`./ar-lib ./lib x fake.lib`
@@ -84,4 +106,8 @@ touch fake2.lib
 opts=`./ar-lib ./lib x fake2.lib`
 test x"$opts" = x"lib -NOLOGO -EXTRACT:dir\\fake2.obj fake2.lib"
 
+# Check if ar-lib accepts "s" as an action.
+opts=`./ar-lib ./lib s foo.lib`
+test x"$opts" = x
+
 :
diff --git a/tests/check.test b/tests/check.test
index 0c258c5..3001228 100755
--- a/tests/check.test
+++ b/tests/check.test
@@ -29,8 +29,8 @@ END
 $ACLOCAL
 $AUTOMAKE
 
-grep '^check-TESTS:' Makefile.in
-grep '^check-DEJAGNU' Makefile.in && Exit 1
+grep 'check-TESTS.*:' Makefile.in
+grep 'check-DEJAGNU' Makefile.in && Exit 1
 
 # check-TESTS is phony.
 sed -n '/^\.PHONY:/,/^$/p' Makefile.in | grep check-TESTS
diff --git a/tests/check8.test b/tests/check8.test
index dc8d3dd..cbf1052 100755
--- a/tests/check8.test
+++ b/tests/check8.test
@@ -65,7 +65,7 @@ $AUTOCONF
 $AUTOMAKE -a
 
 ./configure
-AM_COLOR_TESTS=always $MAKE -e check >stdout 2>stderr &&
+AM_COLOR_TESTS=always $MAKE check >stdout 2>stderr &&
   { cat stdout; cat stderr >&2; Exit 1; }
 cat stdout
 cat stderr >&2
@@ -87,12 +87,14 @@ cd build
 ../configure
 $MAKE check >stdout && { cat stdout; Exit 1; }
 cat stdout
-# Note: we are not grepping for the space here, due to the Solaris make VPATH
-# rewriting (if we fix that, we can still write a separate test for it).
+# Note: we are not grepping for the space in the lines from the 'foo'
+# tests, due to the Solaris make VPATH rewriting (if we fix that, we
+# can still write a separate test for it).
 grep 'XPASS.*foo$' stdout
 grep '^[^X]*PASS.*sub/foo$' stdout
-grep '^[^X]*PASS.*bar' stdout
-grep '^[^X]*PASS.*sub/bar' stdout
-grep '^[^X]*FAIL.*baz' stdout
-grep 'XFAIL.*sub/baz' stdout
+grep '^[^X]*PASS.* bar' stdout
+grep '^[^X]*PASS.* sub/bar' stdout
+grep '^[^X]*FAIL.* baz' stdout
+grep 'XFAIL.* sub/baz' stdout
+
 :
diff --git a/tests/conffile-leading-dot.test b/tests/conffile-leading-dot.test
new file mode 100755
index 0000000..1d3d12f
--- /dev/null
+++ b/tests/conffile-leading-dot.test
@@ -0,0 +1,62 @@
+#! /bin/sh
+# Copyright (C) 2012 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# Automake must complain if AC_CONFIG_FILES is passed something starting
+# with a dot (like "./Makefile"), since the remake rules might be subtly
+# broken in that case.
+
+required=GNUmake
+. ./defs || Exit 1
+
+set -e
+
+cat > configure.in << END
+AC_INIT([$me], [1.0])
+AM_INIT_AUTOMAKE
+AC_CONFIG_FILES([./Makefile])
+AC_CONFIG_FILES([./foo:a.in:b.in:c.in])
+AC_OUTPUT
+END
+
+echo foo = barbarbar > Makefile.am
+
+touch a.in b.in c.in
+
+$ACLOCAL
+
+AUTOMAKE_fails -Wnone -Wunsupported
+grep "^configure\.in:3:.*'\\./Makefile'" stderr
+grep "^configure\.in:3:.* omit leading '\\./'" stderr
+grep "^configure\.in:3:.*remake rules might be subtly broken" stderr
+grep "^configure\.in:4:.*'\\./foo'" stderr
+grep "^configure\.in:4:.* omit leading '\\./'" stderr
+grep "^configure\.in:4:.*remake rules might be subtly broken" stderr
+
+# Check that our warning was actually justified.
+$AUTOCONF
+$AUTOMAKE -Wall -Wno-unsupported
+./configure
+$MAKE
+grep barbarbar Makefile
+# No need to sleep here, configure did that for us already.
+echo foo = bazbazbaz > Makefile.am
+# Check that remake rules do truly break -- otherwise automake is
+# giving a bogus warning.
+$MAKE 2>stderr && { cat stderr >&2 Exit 1; }
+cat stderr >&2
+grep "config\\.status:.*invalid argument.*[\`\"']Makefile[\`\"']" stderr
+
+:
diff --git a/tests/defs.in b/tests/defs.in
index 457c04e..6c7a168 100644
--- a/tests/defs.in
+++ b/tests/defs.in
@@ -509,20 +509,37 @@ old_timestamp=198309271735.59
 # Resolve ties in favor of FILE.
 is_newest ()
 {
-  is_newest_files=`find "$@" -newer "$1"`
+  is_newest_files=`find "$@" -prune -newer "$1"`
   test -z "$is_newest_files"
 }
 
 # using_gmake
 # -----------
 # Return success if $MAKE is GNU make, return failure otherwise.
+# Caches the result for speed reasons.
 using_gmake ()
 {
-  # Use --version AND -v, because SGI Make doesn't fail on --version.
-  # Also grep for GNU because newer versions of FreeBSD make do
-  # not complain about `--version' (they seem to silently ignore it).
-  $MAKE --version -v | grep GNU
+  case $am__using_gmake in
+    yes)
+      return 0;;
+    no)
+      return 1;;
+    '')
+      # Use --version AND -v, because SGI Make doesn't fail on --version.
+      # Also grep for GNU because newer versions of FreeBSD make do
+      # not complain about `--version' (they seem to silently ignore it).
+      if $MAKE --version -v | grep GNU; then
+        am__using_gmake=yes
+        return 0
+      else
+        am__using_gmake=no
+        return 1
+      fi;;
+    *)
+      fatal_ "invalid value for \$am__using_gmake: '$am__using_gmake'";;
+  esac
 }
+am__using_gmake="" # Avoid interferences from the environment.
 
 # AUTOMAKE_run status [options...]
 # --------------------------------
diff --git a/tests/deleted-am.test b/tests/deleted-am.test
index fa41e9e..1e8d11a 100755
--- a/tests/deleted-am.test
+++ b/tests/deleted-am.test
@@ -37,6 +37,7 @@ $AUTOMAKE
 $MAKE
 
 rm -f zardoz.am
+$sleep # Required to avoid racy failures with FreeBSD make.
 $MAKE >output 2>&1 && { cat output; Exit 1; }
 cat output
 # This error will come from automake, not make, so we can be stricter
@@ -44,12 +45,13 @@ cat output
 grep 'cannot open.*zardoz\.am' output
 grep 'foobar\.am' output && Exit 1 # No spurious error, please.
 
-# Try  with one less indirection.
+# Try with one less indirection.
 : > foobar.am
 $AUTOMAKE Makefile
 ./config.status Makefile
 $MAKE # Sanity check.
 rm -f foobar.am
+$sleep # Required to avoid racy failures with FreeBSD make.
 $MAKE >output 2>&1 && { cat output; Exit 1; }
 cat output
 # This error will come from automake, not make, so we can be stricter
diff --git a/tests/depcomp8a.test b/tests/depcomp8a.test
index ea14c3f..b94cf1d 100755
--- a/tests/depcomp8a.test
+++ b/tests/depcomp8a.test
@@ -25,6 +25,7 @@ set -e
 
 cat >> configure.in << 'END'
 AC_PROG_CC
+#x AM_PROG_CC_C_O
 AC_OUTPUT
 END
 
@@ -61,7 +62,8 @@ DISTCHECK_CONFIGURE_FLAGS='--enable-dependency-tracking' 
$MAKE distcheck
 
 # Try again with subdir-objects option.
 
-echo AM_PROG_CC_C_O >> configure.in
+sed 's/#x //' configure.in >configure.int
+mv -f configure.int configure.in
 echo AUTOMAKE_OPTIONS = subdir-objects >> Makefile.am
 
 $ACLOCAL
diff --git a/tests/depcomp8b.test b/tests/depcomp8b.test
index 5651479..3a87d40 100755
--- a/tests/depcomp8b.test
+++ b/tests/depcomp8b.test
@@ -26,6 +26,7 @@ set -e
 
 cat >> configure.in << 'END'
 AC_PROG_CC
+#x AM_PROG_CC_C_O
 AM_PROG_AR
 AC_PROG_LIBTOOL
 AC_OUTPUT
@@ -57,7 +58,8 @@ DISTCHECK_CONFIGURE_FLAGS='--enable-dependency-tracking' 
$MAKE distcheck
 
 # Try again with subdir-objects option.
 
-echo AM_PROG_CC_C_O >> configure.in
+sed 's/#x //' configure.in >configure.int
+mv -f configure.int configure.in
 echo AUTOMAKE_OPTIONS = subdir-objects >> Makefile.am
 
 $ACLOCAL
diff --git a/tests/distcheck-pr10470.test b/tests/distcheck-pr10470.test
new file mode 100755
index 0000000..e774dd7
--- /dev/null
+++ b/tests/distcheck-pr10470.test
@@ -0,0 +1,61 @@
+#! /bin/sh
+# Copyright (C) 2012 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# Ensure "make distcheck" does not experience racy failures on
+# systems (like MinGW/MSYS) that cannot remove a directory "in use"
+# by a process (e.g., that is its "current working directory").
+# See automake bug#10470.
+
+parallel_tests=no
+. ./defs || Exit 1
+
+set -e
+
+mkdir foo.d
+sh -c "cd foo.d && sleep '4'" &
+# Without this sleep, the "rm -rf foo.d" below would reliably beat
+# the "cd foo.d" in the subshell above, and the test would be always
+# skipped, even on MinGW/MSYS.
+sleep '1'
+rm -rf foo.d && skip_ 'system is able to remove "in use" directories'
+
+echo AC_OUTPUT >> configure.in
+
+cat > Makefile.am <<END
+TESTS = foo.test
+EXTRA_DIST= foo.test
+END
+
+cat > foo.test <<END
+#!/bin/sh
+sleep '4' &
+exit 0
+END
+chmod a+x foo.test
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE
+./configure
+
+# We can build the distribution.
+$MAKE distcheck >output 2>&1 || { cat output; Exit 1; }
+cat output
+# Sanity check: verify that our code has hit a problem removing
+# the distdir, but has recovered from it.
+grep "rm:.*$destdir" output || fatal_ "expected code path not covered"
+
+:
diff --git a/tests/extradep.test b/tests/extradep.test
new file mode 100755
index 0000000..4cbfda5
--- /dev/null
+++ b/tests/extradep.test
@@ -0,0 +1,108 @@
+#! /bin/sh
+# Copyright (C) 2010, 2011, 2012 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# Test EXTRA_*_DEPENDENCIES.  See extradep2 for libtool variant.
+
+required=cc
+. ./defs || Exit 1
+
+set -e
+
+cat >> configure.in << 'END'
+AC_PROG_CC
+AC_PROG_RANLIB
+AC_SUBST([deps], [bardep])
+AM_CONDITIONAL([COND], [test -n "$cond"])
+AC_OUTPUT
+END
+
+cat > Makefile.am << 'END'
+noinst_LIBRARIES = libfoo.a
+EXTRA_libfoo_a_DEPENDENCIES = libfoodep
+libfoodep:
+       @echo making $@
+       @: > $@
+CLEANFILES = libfoodep
+
+bin_PROGRAMS = foo bar
+EXTRA_foo_DEPENDENCIES = foodep
+if COND
+EXTRA_foo_DEPENDENCIES += foodep2
+endif
+bar_LDADD = libfoo.a
+EXTRA_bar_DEPENDENCIES = $(deps)
+
+EXTRA_DIST = foodep bardep
+
+.PHONY: bar-has-been-updated
+bar-has-been-updated:
+       stat older bar$(EXEEXT) libfoo.a || : For debugging.
+       test `ls -t bar$(EXEEXT) older | sed q` = bar$(EXEEXT)
+END
+
+cat >libfoo.c <<'END'
+int libfoo () { return 0; }
+END
+
+cat >foo.c <<'END'
+int main () { return 0; }
+END
+
+cat >bar.c <<'END'
+extern int libfoo ();
+int main () { return libfoo (); }
+END
+
+$ACLOCAL
+$AUTOMAKE --add-missing
+$AUTOCONF
+
+./configure cond=yes
+
+# Hypotheses:
+#  - EXTRA_*_DEPENDENCIES are honored.
+#  - Conditionals and substitutions are honored.
+#  - *_DEPENDENCIES are not overwritten by their EXTRA_* counterparts.
+
+: >foodep
+: >foodep2
+: >bardep
+$MAKE >stdout || { cat stdout; Exit 1; }
+cat stdout
+grep 'making libfoodep' stdout
+
+rm -f foodep
+$MAKE && Exit 1
+: >foodep
+
+rm -f foodep2
+$MAKE && Exit 1
+: >foodep2
+
+rm -f bardep
+$MAKE && Exit 1
+: >bardep
+
+$MAKE
+: > older
+$sleep
+touch libfoo.a
+$MAKE
+$MAKE bar-has-been-updated
+
+$MAKE distcheck
+
+:
diff --git a/tests/extradep2.test b/tests/extradep2.test
new file mode 100755
index 0000000..3d44512
--- /dev/null
+++ b/tests/extradep2.test
@@ -0,0 +1,89 @@
+#! /bin/sh
+# Copyright (C) 2010, 2011, 2012 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# Test EXTRA_*_DEPENDENCIES, libtool version; see extradep.test.
+
+required='cc libtoolize'
+. ./defs || Exit 1
+
+set -e
+
+cat >> configure.in << 'END'
+AC_PROG_CC
+AC_PROG_LIBTOOL
+AC_SUBST([deps], [bardep])
+AC_OUTPUT
+END
+
+cat > Makefile.am << 'END'
+noinst_LTLIBRARIES = libfoo.la
+EXTRA_libfoo_la_DEPENDENCIES = libfoodep
+libfoodep:
+       @echo making $@
+       @: > $@
+CLEANFILES = libfoodep
+
+bin_PROGRAMS = bar
+bar_LDADD = libfoo.la
+EXTRA_bar_DEPENDENCIES = $(deps)
+
+EXTRA_DIST = bardep
+
+.PHONY: bar-has-been-updated
+bar-has-been-updated:
+       stat older bar$(EXEEXT) libfoo.la || : For debugging.
+       test `ls -t bar$(EXEEXT) older | sed q` = bar$(EXEEXT)
+END
+
+cat >libfoo.c <<'END'
+int libfoo () { return 0; }
+END
+
+cat >bar.c <<'END'
+extern int libfoo ();
+int main () { return libfoo (); }
+END
+
+libtoolize
+$ACLOCAL
+$AUTOMAKE --add-missing
+$AUTOCONF
+
+./configure
+
+# Hypothesis: EXTRA_*_DEPENDENCIES are honored.
+
+: >foodep
+: >foodep2
+: >bardep
+$MAKE >stdout || { cat stdout; Exit 1; }
+cat stdout
+grep 'making libfoodep' stdout
+
+rm -f bardep
+$MAKE && Exit 1
+: >bardep
+
+$MAKE
+: > older
+$sleep
+touch libfoo.la
+$MAKE
+$MAKE bar-has-been-updated
+
+$MAKE distcheck
+
+:
diff --git a/tests/gen-parallel-tests b/tests/gen-parallel-tests
index 451fb77..fa51327 100755
--- a/tests/gen-parallel-tests
+++ b/tests/gen-parallel-tests
@@ -1,7 +1,7 @@
 #! /bin/sh
 # Generate parallel-tests.am.
 #
-# Copyright (C) 2009, 2010  Free Software Foundation, Inc.
+# Copyright (C) 2009, 2010, 2012 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -16,21 +16,21 @@
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
-# For each test in the TESTS list in this Makefile.am file, that itself
-# tests features of the TESTS automake interface, generate a sibling
-# test that does likewise, but with the option `parallel-tests' enabled.
-# Individual tests can prevent the creation of such a sibling by
-# explicitly setting the `$parallel_tests' variable to either "yes" or
-# "no".  The rationale for this is that if the variable is set to "yes",
-# the test already uses the `parallel-tests' option, so that a sibling
-# would be just a duplicate; while if the variable is set to "no", the
-# test doesn't support, or is not meant to run with, the `parallel-tests'
-# option, and forcing it to do so in the sibling would likely cause a
-# spurious failure.
+# For each automake test case that checks features of the TESTS automake
+# interface, generate a sibling test that does likewise, but with the
+# option `parallel-tests' enabled.  Individual tests can prevent the
+# creation of such a sibling by explicitly setting the `$parallel_tests'
+# variable to either "yes" or "no".  The rationale for this is that if
+# the variable is set to "yes", the test already uses the `parallel-tests'
+# option, so that a sibling would be just a duplicate; while if the
+# variable is set to "no", the test doesn't support, or is not meant to
+# run with, the `parallel-tests' option, and forcing it to do so in the
+# sibling would likely cause a spurious failure.
 
 set -e
 
-tests=`sed -n '/^TESTS =/,/^$/s/\(.*\.test\).*/\1/p' Makefile.am`
+tests=`sed -n '/^handwritten_TESTS *=/,$p' <list-of-tests.mk \
+         | sed -n 's/\(.*\.test\).*/\1/p'`
 {
   grep -l '^TESTS ' $tests
   grep -l ' TESTS ' $tests
diff --git a/tests/get-sysconf.test b/tests/get-sysconf.test
index 1a549a3..bad4735 100755
--- a/tests/get-sysconf.test
+++ b/tests/get-sysconf.test
@@ -30,7 +30,19 @@ testbuilddir=`(cd .. && pwd)`
 top_testbuilddir=`(cd $testbuilddir/.. && pwd)`
 
 st=0
-sed 20q "$top_testsrcdir/ChangeLog" || st=1
+if test -d "$top_testsrcdir"/.git; then
+  # We are running from a git checkout.
+  git log -1 || st=1
+else
+  # We are probably running from a distribution tarball, so
+  # the ChangeLog file must be present.
+  awk '
+    BEGIN { first = 1 }
+    (first == 1) { print; first = 0; next; }
+    /^[^\t]/ { exit(0); }
+    { print }
+  ' "$top_testsrcdir"/ChangeLog || st=1
+fi
 $PERL -V || st=1
 cat "$top_testbuilddir/config.log" || st=1
 cat "$testbuilddir/aclocal-$APIVERSION" || st=1
diff --git a/tests/getopt.test b/tests/getopt.test
deleted file mode 100755
index bc82984..0000000
--- a/tests/getopt.test
+++ /dev/null
@@ -1,41 +0,0 @@
-#! /bin/sh
-# Copyright (C) 2002, 2003, 2008  Free Software Foundation, Inc.
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program.  If not, see <http://www.gnu.org/licenses/>.
-
-# Automake --help, and --version should have priority over any other option
-# so that their `Exit 0' is coherent.
-
-. ./defs || Exit 1
-
-set -e
-
-# This is expected to fail ...
-AUTOMAKE_fails -Wnonexistent
-grep ':.*nonexistent' stderr
-
-# ... but this should not.
-AUTOMAKE_run 0 -Wnonexistent --help
-grep ':.*nonexistent' stderr && Exit 1
-
-
-# Similarly, this should fail ...
-AUTOMAKE_fails --nonexistent
-grep ':.*nonexistent' stderr
-
-# ... but this should not.
-AUTOMAKE_run 0 --nonexistent --help
-grep ':.*nonexistent' stderr && Exit 1
-
-:
diff --git a/tests/Makefile.am b/tests/list-of-tests.mk
similarity index 76%
copy from tests/Makefile.am
copy to tests/list-of-tests.mk
index bf732e5..e974d0f 100644
--- a/tests/Makefile.am
+++ b/tests/list-of-tests.mk
@@ -1,58 +1,37 @@
-## Process this file with automake to create Makefile.in
+## Makefile fragment that holds the list of test scripts of the automake
+## testsuite.  This fragment is meant to be included by the Makefile.am,
+## but also to be executed directly by make when bootstrapping automake.
 
-# Copyright (C) 1996, 1997, 1998, 1999, 2001, 2002, 2003, 2004, 2005,
-# 2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc.
+## Copyright (C) 2011, 2012 Free Software Foundation, Inc.
+##
+## This program is free software; you can redistribute it and/or modify
+## it under the terms of the GNU General Public License as published by
+## the Free Software Foundation; either version 2, or (at your option)
+## any later version.
+##
+## This program is distributed in the hope that it will be useful,
+## but WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+## GNU General Public License for more details.
+##
+## You should have received a copy of the GNU General Public License
+## along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
-# This program 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.
+perl_TESTS = \
+pm/Condition.pl \
+pm/Condition-t.pl \
+pm/DisjConditions.pl \
+pm/DisjConditions-t.pl \
+pm/Version.pl \
+pm/Wrap.pl
 
-# 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/>.
-
-XFAIL_TESTS = \
-all.test \
-auxdir2.test \
-cond17.test \
-dist-auxfile.test \
-dist-auxfile-2.test \
-gcj6.test \
-java-nobase.test \
-pr8365-remake-timing.test \
-lex-subobj-nodep.test \
-remake-am-pr10111.test \
-remake-m4-pr10111.test \
-vala-vpath.test \
-txinfo5.test
-
-include $(srcdir)/parallel-tests.am
-
-$(srcdir)/parallel-tests.am: gen-parallel-tests Makefile.am
-       (cd $(srcdir) && $(SHELL) ./gen-parallel-tests) >$@
-
-$(parallel_tests): $(parallel_tests:-p.test=.test) Makefile.am
-       input=`echo $@ | sed 's,.*/,,; s,-p.test$$,.test,'`; \
-       sed 's|^\. \./defs.*|parallel_tests=yes; &|' \
-         < $(srcdir)/$$input >$@
-       chmod a+rx $@
-
-MAINTAINERCLEANFILES = $(parallel_tests)
-
-# Some testsuite-influential variables should be overridable from the
-# test scripts, but not from the environment.
-TESTS_ENVIRONMENT = \
-  test x"$$me" = x || unset me; \
-  test x"$$required" = x || unset required; \
-  test x"$$parallel_tests" = x || unset parallel_tests;
-
-TESTS = \
+# The order here is mostly alphabetical, with the deliberate exception
+# that tests having a high runtime (especially TAP tests that run various
+# checks sequentially) are listed early; this improves performance on
+# concurrent testsuite runs.
+handwritten_TESTS = \
 get-sysconf.test \
+$(perl_TESTS) \
 self-check-env-sanitize.test \
 self-check-report.test \
 aclibobj.test \
@@ -184,6 +163,7 @@ check8.test \
 check9.test \
 check10.test \
 check11.test \
+check12.test \
 check-exported-srcdir.test \
 check-tests-in-builddir.test \
 check-tests_environment.test \
@@ -280,6 +260,7 @@ configure.test \
 confdeps.test \
 conff.test \
 conff2.test \
+conffile-leading-dot.test \
 confh.test \
 confh4.test \
 confh5.test \
@@ -348,6 +329,9 @@ discover.test \
 dist-auxfile.test \
 dist-auxfile-2.test \
 dist-included-parent-dir.test \
+dist-missing-am.test \
+dist-missing-included-m4.test \
+dist-missing-m4.test \
 distcleancheck.test \
 distcom2.test \
 distcom3.test \
@@ -367,6 +351,7 @@ distcheck-hook2.test \
 distcheck-missing-m4.test \
 distcheck-outdated-m4.test \
 distcheck-pr9579.test \
+distcheck-pr10470.test \
 distcheck-override-infodir.test \
 dmalloc.test \
 doc-parsing-buglets-colneq-subst.test \
@@ -405,6 +390,8 @@ extra12.test \
 extra-portability.test \
 extra-portability2.test \
 extra-portability3.test \
+extradep.test \
+extradep2.test \
 f90only.test \
 flavor.test \
 flibs.test \
@@ -426,7 +413,6 @@ gcj3.test \
 gcj4.test \
 gcj5.test \
 gcj6.test \
-getopt.test \
 gettext.test \
 gettext2.test \
 gettext3.test \
@@ -580,9 +566,8 @@ makefile-deps.test \
 makej.test \
 makej2.test \
 maken.test \
-maken2.test \
 maken3.test \
-maken4.test \
+make-dryrun.test \
 makevars.test \
 man.test \
 man2.test \
@@ -601,7 +586,6 @@ missing3.test \
 missing4.test \
 missing5.test \
 missing6.test \
-missing-tar.test \
 mkinstall.test \
 mkinst2.test \
 mkinst3.test \
@@ -630,6 +614,7 @@ notrans.test \
 number.test \
 objc.test \
 objc2.test \
+objext-pr10128.test \
 obsolete.test \
 order.test \
 outdir.test \
@@ -661,6 +646,7 @@ parallel-tests7.test \
 parallel-tests8.test \
 parallel-tests9.test \
 parallel-tests10.test \
+parallel-tests-dryrun.test \
 parallel-tests-harderror.test \
 parallel-tests-unreadable-log.test \
 parallel-tests-subdir.test \
@@ -869,6 +855,7 @@ tagsub.test \
 tar.test \
 tar2.test \
 tar3.test \
+tar-override.test \
 target-cflags.test \
 targetclash.test \
 txinfo.test \
@@ -916,6 +903,8 @@ vala3.test \
 vala4.test \
 vala5.test \
 vala-vpath.test \
+vala-mix.test \
+vala-mix2.test \
 vars.test \
 vars3.test \
 vartar.test \
@@ -953,89 +942,4 @@ yacc-dist-nobuild-subdir.test \
 yflags.test \
 yflags2.test \
 libtool-macros.test \
-gettext-macros.test \
-$(parallel_tests)
-
-# FIXME: make these automatically computed once we are merged into
-# FIXME: the `testsuite-work' branch.
-ar-lib4.log: libtool-macros.log
-ar-lib6a.log: libtool-macros.log
-ar-lib6b.log: libtool-macros.log
-depcomp4.log: libtool-macros.log
-depcomp7.log: libtool-macros.log
-depcomp8b.log: libtool-macros.log
-fort5.log: libtool-macros.log
-instdir-ltlib.log: libtool-macros.log
-instfail-libtool.log: libtool-macros.log
-ldadd.log: libtool-macros.log
-ldflags.log: libtool-macros.log
-libobj13.log: libtool-macros.log
-libtoo10.log: libtool-macros.log
-libtoo11.log: libtool-macros.log
-libtool.log: libtool-macros.log
-libtool2.log: libtool-macros.log
-libtool3.log: libtool-macros.log
-libtool5.log: libtool-macros.log
-libtool6.log: libtool-macros.log
-libtool7.log: libtool-macros.log
-libtool8.log: libtool-macros.log
-libtool9.log: libtool-macros.log
-listval.log: libtool-macros.log
-ltcond.log: libtool-macros.log
-ltcond2.log: libtool-macros.log
-ltconv.log: libtool-macros.log
-ltdeps.log: libtool-macros.log
-ltinit.log: libtool-macros.log
-ltinstloc.log: libtool-macros.log
-ltlibobjs.log: libtool-macros.log
-ltlibsrc.log: libtool-macros.log
-ltorder.log: libtool-macros.log
-nobase-libtool.log: libtool-macros.log
-pr211.log: libtool-macros.log
-pr300-ltlib.log: libtool-macros.log
-pr307.log: libtool-macros.log
-pr401b.log: libtool-macros.log
-pr72.log: libtool-macros.log
-reqd2.log: libtool-macros.log
-silent3.log: libtool-macros.log
-silent4.log: libtool-macros.log
-silent9.log: libtool-macros.log
-stdlib2.log: libtool-macros.log
-strip3.log: libtool-macros.log
-subobj9.log: libtool-macros.log
-suffix10.log: libtool-macros.log
-suffix2.log: libtool-macros.log
-suffix5.log: libtool-macros.log
-suffix8.log: libtool-macros.log
-vala.log: libtool-macros.log
-vala1.log: libtool-macros.log
-vala2.log: libtool-macros.log
-vala3.log: libtool-macros.log
-vala4.log: libtool-macros.log
-vala5.log: libtool-macros.log
-
-# FIXME: make these automatically computed once we are merged into
-# FIXME: the `testsuite-work' branch.
-gettext.log: gettext-macros.log
-gettext2.log: gettext-macros.log
-gettext3.log: gettext-macros.log
-subcond.log: gettext-macros.log
-
-EXTRA_DIST = ChangeLog-old gen-parallel-tests $(TESTS)
-
-distcheck-missing-m4.log distcheck-outdated-m4.log: distcheck-hook-m4.am
-EXTRA_DIST += distcheck-hook-m4.am
-
-# Each test case depends on defs, aclocal, and automake.
-check_SCRIPTS = defs aclocal-$(APIVERSION) automake-$(APIVERSION)
-
-clean-local: clean-local-check
-.PHONY: clean-local-check
-clean-local-check:
-       -set x *.dir; shift; \
-        if test "$$#,$$1" = "1,*.dir"; then \
-          : there is no test directory to clean; \
-        else \
-          find "$$@" -type d ! -perm -700 -exec chmod u+rwx {} ';'; \
-          rm -rf "$$@"; \
-        fi;
+gettext-macros.test
diff --git a/tests/lzma.test b/tests/lzma.test
index 7ee59f7..bf65aea 100755
--- a/tests/lzma.test
+++ b/tests/lzma.test
@@ -40,7 +40,8 @@ test: distcheck
        test -f $(DIST_ARCHIVES)
 END
 
-$ACLOCAL --force
+rm -rf autom4te*.cache
+$ACLOCAL
 AUTOMAKE_fails
 grep "^configure\\.in:2:.*$errmsg" stderr
 
diff --git a/tests/make-dryrun.test b/tests/make-dryrun.test
new file mode 100755
index 0000000..072d02f
--- /dev/null
+++ b/tests/make-dryrun.test
@@ -0,0 +1,67 @@
+#! /bin/sh
+# Copyright (C) 2012 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# Check that $(am__make_dryrun) works as expected.
+
+. ./defs || Exit 1
+
+set -e
+
+mkdir sub
+
+echo AC_OUTPUT >> configure.in
+
+cat > Makefile.am <<'END'
+all:
+       : Dummy, nothing to do.
+foo:
+       $(MAKE) all
+notdry:
+       @echo ":: $$MAKEFLAGS ::"; : For debugging.
+       $(am__make_dryrun) && exit 1; exit 0
+dry:
+       address@hidden ":: $$MAKEFLAGS ::"; : For debugging.
+       +$(am__make_dryrun) || exit 1; echo ok > from-dry-mode
+END
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE
+./configure
+
+$MAKE notdry
+
+# Test against a known regressions.  This was especially
+# heinous, since make running in normal mode was sometimes
+# mistaken for make running in dry mode.
+$MAKE notdry TESTS="n1.test n2.test"
+$MAKE notdry TESTS="n1 n2" AM_MAKEFLAGS="TESTS='n1 n2'"
+$MAKE notdry TESTS="n1 n2" AM_MAKEFLAGS='TESTS="n1 n2"'
+$MAKE notdry FOOFLAGS="-n -n -knf2 \\n --none -n"
+$MAKE notdry BARFLAGS="-n \"n\" '-n' --none -n"
+
+if echo 'all: ; @+printf %sbb%s aa cc' | $MAKE -n -f - | grep aabbcc; then
+  $MAKE -n dry
+  test -f from-dry-mode
+  rm -f from-dry-mode
+fi
+
+if using_gmake; then
+  $MAKE --dry-run -k dry
+  test -f from-dry-mode
+fi
+
+:
diff --git a/tests/maken.test b/tests/maken.test
index 8c78b97..61f6886 100755
--- a/tests/maken.test
+++ b/tests/maken.test
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2009  Free Software Foundation, Inc.
+# Copyright (C) 2009, 2012 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -16,8 +16,8 @@
 
 # Ensure that `make -n dist' and `make -n distcheck' do not change files
 # on disk, due to GNU make executing rules containing `$(MAKE)'.
-
-# Please keep this test in sync with sister test maken2.test.
+# Also, ensure that `make -n dist' and `make -n distcheck' show what
+# would happen, at least when using GNU make.
 
 . ./defs || Exit 1
 
@@ -54,6 +54,9 @@ echo stamp > stampfile
 $sleep
 for target in dist distcheck; do
   $MAKE -n $target
+  if using_gmake; then
+    $MAKE -n $target | grep stamp-sub-dist-hook || Exit 1
+  fi
   $MAKE test-no-distdir
   test `ls -1t | sed 1q` = stampfile
 done
diff --git a/tests/maken2.test b/tests/maken2.test
deleted file mode 100755
index 97bf798..0000000
--- a/tests/maken2.test
+++ /dev/null
@@ -1,63 +0,0 @@
-#! /bin/sh
-# Copyright (C) 2009  Free Software Foundation, Inc.
-#
-# This program 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 that `make -n dist' and `make -n distcheck' show what would happen.
-# This currently works for GNU make only.
-
-# Please keep this test in sync with sister test maken.test.
-
-required=GNUmake
-. ./defs || Exit 1
-
-set -e
-
-mkdir sub
-
-cat >> configure.in << 'END'
-AC_CONFIG_FILES([sub/Makefile])
-AC_OUTPUT
-END
-
-cat > Makefile.am <<'END'
-SUBDIRS = sub
-distcheck-hook:
-       @: > stamp-distcheck-hook
-test-no-distdir:
-       test ! -d $(distdir)
-       test ! -f stamp-distcheck-hook
-       test ! -f sub/stamp-sub-dist-hook
-END
-cat >sub/Makefile.am <<'END'
-dist-hook:
-       @: > stamp-sub-dist-hook
-END
-
-$ACLOCAL
-$AUTOCONF
-$AUTOMAKE
-./configure
-
-$sleep
-echo stamp > stampfile
-$sleep
-for target in dist distcheck; do
-  $MAKE -n $target
-  $MAKE test-no-distdir
-  $MAKE -n $target | grep stamp-sub-dist-hook
-  test `ls -1t | sed 1q` = stampfile
-done
-
-Exit 0
diff --git a/tests/maken3.test b/tests/maken3.test
index b839d0d..27494cc 100755
--- a/tests/maken3.test
+++ b/tests/maken3.test
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2009  Free Software Foundation, Inc.
+# Copyright (C) 2009, 2012 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -14,14 +14,19 @@
 # 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 `make -n' for various targets, to ensure that no files or
-# directories are created.
+# Test `make -n' for various targets, to ensure that:
+#
+#  1. no files or directories are created or removed, and
+#
+#  2. if using GNU make, stdout output is sufficiently complete.
+#
+# FIXME: The checks in (2) should also work with BSD make implementations
+# FIXME: that support the `.MAKE' special target, but currently we don't
+# FIXME: explicitly test that this is truly the case.
 #
 # This test exercises the GCS-mandated targets (except for dist)
 # as well as tags, TAGS.
 
-# Please keep this test in sync with sister test maken4.test.
-
 . ./defs || Exit 1
 
 set -e
@@ -134,18 +139,27 @@ check_targets ()
     case $target in
     install-* | installdirs | tags | TAGS ) ;;
     *)
+      if using_gmake; then
+        grep "stamp-$target$" stdout || Exit 1
+      fi
       test ! -f "stamp-$target$" || Exit 1
       ;;
     esac
     case $target in
     install-* | installdirs ) ;;
     *)
+      if using_gmake; then
+        grep "stamp-$target-sub" stdout || Exit 1
+      fi
       test ! -f "sub/stamp-$target-sub" || Exit 1
       ;;
     esac
     case $target in
     distclean | maintainer-clean ) ;;
     *)
+      if using_gmake; then
+        grep "should-not-be-executed" stdout || Exit 1
+      fi
       test ! -f "sub2/sub2-$target-should-not-be-executed" || Exit 1
       ;;
     esac
diff --git a/tests/maken4.test b/tests/maken4.test
deleted file mode 100755
index ae5ce27..0000000
--- a/tests/maken4.test
+++ /dev/null
@@ -1,172 +0,0 @@
-#! /bin/sh
-# Copyright (C) 2009  Free Software Foundation, Inc.
-#
-# This program 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 `make -n' for various targets, to ensure that stdout output is
-# sufficiently complete.  This currently only works for GNU make and
-# BSD make implementations that support the `.MAKE' special target.
-#
-# This test exercises the GCS-mandated targets (except for dist)
-# as well as tags, TAGS.
-
-# Please keep this test in sync with sister test maken3.test.
-
-required=GNUmake
-. ./defs || Exit 1
-
-set -e
-
-mkdir sub sub2
-
-cat >> configure.in << 'END'
-AC_CONFIG_FILES([sub/Makefile sub2/Makefile])
-AC_OUTPUT
-END
-
-cat > Makefile.am <<'END'
-TESTS = foo.test
-SUBDIRS = sub sub2
-##BUILT_SOURCES = foo
-foo:
-foo.test:
-all-local:
-       @: > stamp-all
-install-data-local:
-       @: > stamp-install
-uninstall-local:
-       @: > stamp-uninstall
-clean-local:
-       @: > stamp-clean
-distclean-local:
-       @: > stamp-distclean
-info-local:
-       @: > stamp-info
-html-local:
-       @: > stamp-html
-dvi-local:
-       @: > stamp-dvi
-ps-local:
-       @: > stamp-ps
-pdf-local:
-       @: > stamp-pdf
-check-local:
-       @: > stamp-check
-installcheck-local:
-       @: > stamp-installcheck
-mostlyclean-local:
-       @: > stamp-mostlyclean
-maintainer-clean-local:
-       @: > stamp-maintainer-clean
-END
-cat >sub/Makefile.am <<'END'
-all-local:
-       @: > stamp-all-sub
-install-data-local:
-       @: > stamp-install-sub
-uninstall-local:
-       @: > stamp-uninstall-sub
-clean-local:
-       @: > stamp-clean-sub
-distclean-local:
-       @: > stamp-distclean-sub
-info-local:
-       @: > stamp-info-sub
-html-local:
-       @: > stamp-html-sub
-dvi-local:
-       @: > stamp-dvi-sub
-ps-local:
-       @: > stamp-ps-sub
-pdf-local:
-       @: > stamp-pdf-sub
-check-local:
-       @: > stamp-check-sub
-installcheck-local:
-       @: > stamp-installcheck-sub
-tags:
-       @: > stamp-tags-sub
-TAGS:
-       @: > stamp-TAGS-sub
-mostlyclean-local:
-       @: > stamp-mostlyclean-sub
-maintainer-clean-local:
-       @: > stamp-maintainer-clean-sub
-END
-cat >sub2/Makefile.am <<'END'
-all install uninstall clean check:
-       @: > address@hidden
-info dvi pdf ps:
-       @: > address@hidden
-html:
-       @: > address@hidden
-install-info install-html install-dvi install-pdf install-ps:
-       @: > address@hidden
-installcheck installdirs tags TAGS mostlyclean:
-       @: > address@hidden
-## These targets cannot be overridden like this:
-## install-strip distclean maintainer-clean
-END
-
-$ACLOCAL
-$AUTOCONF
-
-check_targets ()
-{
-  set -e
-  for target in \
-    all install install-strip uninstall clean distclean check \
-    info html dvi pdf ps \
-    install-info install-html install-dvi install-pdf install-ps \
-    installcheck installdirs tags TAGS mostlyclean maintainer-clean
-  do
-    $MAKE -n $target >stdout || { cat stdout; Exit 1; }
-    cat stdout
-    case $target in
-    install-* | installdirs | tags | TAGS ) ;;
-    *)
-      grep "stamp-$target$" stdout || Exit 1
-      test ! -f "stamp-$target$" || Exit 1
-      ;;
-    esac
-    case $target in
-    install-* | installdirs ) ;;
-    *)
-      grep "stamp-$target-sub" stdout || Exit 1
-      test ! -f "sub/stamp-$target-sub" || Exit 1
-      ;;
-    esac
-    case $target in
-    distclean | maintainer-clean ) ;;
-    *)
-      grep "should-not-be-executed" stdout || Exit 1
-      test ! -f "sub2/sub2-$target-should-not-be-executed" || Exit 1
-      ;;
-    esac
-  done
-}
-
-$AUTOMAKE -Wno-override
-./configure
-check_targets || Exit 1
-
-# Now, introduce BUILT_SOURCES into the toplevel Makefile
-# TODO: add BUILT_SOURCES to sub2, fix fallout.
-sed 's/##//' < Makefile.am > t
-mv -f t Makefile.am
-$AUTOMAKE -Wno-override --force Makefile
-./configure
-check_targets || Exit 1
-
-Exit 0
diff --git a/tests/missing-tar.test b/tests/missing-tar.test
deleted file mode 100755
index 889ae20..0000000
--- a/tests/missing-tar.test
+++ /dev/null
@@ -1,160 +0,0 @@
-#! /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/>.
-
-# Test how the `missing' script wraps the`tar' program .
-# FIXME: we should also try to run the `missing' script with the
-#        $CONFIG_SHELL ...
-
-. ./defs || Exit 1
-
-set -e
-
-# FIXME: make this working with "installcheck" too ...
-cp "$testsrcdir"/../lib/missing . \
-  || fatal_ "failed to fetch auxiliary script \`missing'"
-
-old_PATH=$PATH; export old_PATH
-new_PATH=`pwd`/bin$PATH_SEPARATOR$PATH
-mkdir bin
-
-cat > data.txt <<'END'
-To be, or not to be: that is the question:
-Whether 'tis nobler in the mind to suffer
-...
-END
-
-cat > nonesuch <<'END'
-#!/bin/sh
-exit 127
-END
-chmod a+x nonesuch
-
-# Simple runs.
-for nullify_gnu in yes no; do
-  case $nullify_gnu in
-    yes)
-      cp nonesuch bin/gtar
-      cp nonesuch bin/gnutar
-      PATH=$new_PATH; export PATH;
-      mkdir simple-nognu
-      cd simple-nognu
-      ;;
-    no)
-      mkdir simple-dflt
-      cd simple-dflt
-      ;;
-    *)
-      Exit 99 # Can't happen.
-      ;;
-  esac
-  cp ../data.txt foobar.txt
-  ../missing --run tar cvf mu.tar foobar.txt
-  rm -f foobar.txt
-  test -f mu.tar
-  ../missing --run tar tf mu.tar >output 2>&1 || { cat output; Exit 1; }
-  cat output
-  $FGREP 'foobar.txt' output
-  test ! -f foobar.txt
-  ../missing --run tar xvf mu.tar
-  diff ../data.txt foobar.txt
-  PATH=$old_PATH; export PATH;
-  cd ..
-done
-
-rm -f bin/*
-
-# Helper scripts and functions for next tests.
-
-cat > fake-gnu-tar <<'END'
-#!/bin/sh
-case " $* " in *\ --version\ *) echo fake GNU tar; exit $?;; esac
-PATH=$old_PATH; export PATH
-exec tar "$@"
-END
-chmod a+x fake-gnu-tar
-
-cat > failing-tar <<'END'
-#!/bin/sh
-echo "Error message from tar passed through" >&2
-exit 1
-END
-chmod a+x failing-tar
-
-grep_tar_failed ()
-{
-  grep "WARNING:.* can't.* run \`tar' with .*given arguments" $*
-}
-
-# The `tar' program does not work with the given options, but we have
-# gtar or gnutar.
-cp failing-tar bin/tar
-for pfx in g gnu; do
-  case $pfx in g) othpfx=gnu;; gnu) othpfx=g;; *) Exit 99;; esac
-  cp nonesuch bin/${othpfx}tar
-  if ${pfx}tar --version | grep GNU; then :; else
-    cp fake-gnu-tar bin/${pfx}tar
-  fi
-  tarball=foo-$pfx.tar
-  PATH=$new_PATH; export PATH
-  ./missing --run tar cvf $tarball ./data.txt 2>stderr \
-    || { cat stderr >&2; Exit 1; }
-  cat stderr >&2
-  PATH=$old_PATH; export PATH
-  test -f $tarball
-  grep_tar_failed stderr
-  grep "Error message from tar passed through" stderr
-  grep "[Tt]rying to use GNU tar.*${pfx}tar" stderr
-  grep "${othpfx}tar" stderr && Exit 1
-  : # For shells with broken 'set -e'
-done
-
-rm -f bin/*
-
-# The `tar' program does not work with the given options, and we don't
-# have neither gtar nor gnutar.
-cp failing-tar bin/tar
-cp nonesuch bin/gtar
-cp nonesuch bin/gnutar
-PATH=$new_PATH; export PATH
-./missing --run tar cvf foo.tar ./data.txt 2>stderr \
-  && { cat stderr >&2; Exit 1; }
-cat stderr >&2
-PATH=$old_PATH; export PATH
-test ! -f foo.tar
-grep_tar_failed stderr
-grep "Error message from tar passed through" stderr
-grep "[iI]nstall GNU tar or Free [pP]axutils" stderr
-$EGREP "(g|gnu)tar" stderr && Exit 1
-
-rm -f bin/*
-
-# We try to use an option that causes any `tar' program (GNU or non-GNU) to.
-./missing --run tar --bad-unknonw-option cvf foo.tar ./data.txt 2>stderr \
-  && { cat stderr >&2; Exit 1; }
-cat stderr >&2
-test ! -f foo.tar
-grep_tar_failed stderr
-grep "bad-unknonw-option" stderr
-for p in gtar gnutar; do
-  if $p --version; then
-    cnt=1
-  else
-    cnt=0
-  fi
-  test `$EGREP -c "[Tt]rying to use GNU tar.*$p" stderr` -eq $cnt
-done
-
-:
diff --git a/tests/multlib.test b/tests/multlib.test
index 1072a57..59a2260 100755
--- a/tests/multlib.test
+++ b/tests/multlib.test
@@ -1,5 +1,6 @@
 #! /bin/sh
-# Copyright (C) 2003, 2004, 2007, 2010 Free Software Foundation, Inc.
+# Copyright (C) 2003, 2004, 2007, 2010, 2012 Free Software Foundation,
+# Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -22,6 +23,23 @@ required='gcc GNUmake'
 
 set -e
 
+# Multilib support has been deprecated in the Automake core.
+
+cat >>configure.in <<'END'
+AM_ENABLE_MULTILIB([Makefile], [.])
+END
+
+$ACLOCAL
+$AUTOCONF -Wall -Werror 2>stderr && { cat stderr >&2; Exit 1; }
+cat stderr >&2
+grep '^configure\.in:4:.*AM_ENABLE_MULTILIB.* removed.* soon' stderr
+grep '"multilib".*feature' stderr
+grep 'contrib.* in the Automake distribution' stderr
+
+rm -rf autom4te*.cache aclocal.m4 configure
+
+# Functional tests now.
+
 cat >configure.in <<'END'
 AC_INIT([multlib], [1.0])
 AC_CONFIG_SRCDIR(libfoo/foo.c)
@@ -112,16 +130,16 @@ mkdir libbar/sub
 cp "$testsrcdir/../lib/config-ml.in" .
 cp "$testsrcdir/../lib/symlink-tree" .
 
-$ACLOCAL
-$AUTOCONF
+$ACLOCAL -Wno-obsolete
+$AUTOCONF -Werror -Wall -Wno-obsolete
 $AUTOMAKE --add-missing
 cd libfoo
 $ACLOCAL
-$AUTOCONF
+$AUTOCONF -Werror -Wall -Wno-obsolete
 $AUTOMAKE --add-missing
 cd ../libbar
 $ACLOCAL
-$AUTOCONF
+$AUTOCONF -Werror -Wall -Wno-obsolete
 $AUTOMAKE --add-missing
 cd ..
 
diff --git a/tests/extra10.test b/tests/objext-pr10128.test
similarity index 54%
copy from tests/extra10.test
copy to tests/objext-pr10128.test
index 7bd6556..0692164 100755
--- a/tests/extra10.test
+++ b/tests/objext-pr10128.test
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2010  Free Software Foundation, Inc.
+# Copyright (C) 2012 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -14,10 +14,9 @@
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
-# Check that wildcards in EXTRA_DIST are honoured.
-# Suggested by observations from Braden McDaniel.
+# Test for automake bug#10128: $(OBJEXT) redefinition causes
+# $(foo_OBJECTS) to be defined as empty.
 
-required=GNUmake
 . ./defs || Exit 1
 
 set -e
@@ -25,20 +24,37 @@ set -e
 echo AC_OUTPUT >> configure.in
 
 cat > Makefile.am <<'END'
-EXTRA_DIST=*.foo
+LINK = echo >$@ Linked $@ from
+OBJEXT = fasl
+EXEEXT =
+
+noinst_PROGRAMS = foo zardoz
+foo_SOURCES = foo.lisp
+zardoz_SOURCES = mu1.lisp mu2.lisp
+
+## Un-commenting this is enough to make the test pass.  Weird!
+##.lisp.o:
+
+.lisp.fasl:
+       touch $@
+
 .PHONY: test
-test: distdir
-       diff a.foo $(distdir)/a.foo
-       diff b.foo $(distdir)/b.foo
-       test ! -r $(distdir)/c.bar
+test:
+       test '$(foo_OBJECTS)'    = 'foo.fasl'
+       test '$(zardoz_OBJECTS)' = 'mu1.fasl mu2.fasl'
 END
 
 $ACLOCAL
 $AUTOMAKE
 $AUTOCONF
 
-echo aaa > a.foo
-echo bbb > b.foo
-echo ccc > c.foo
 ./configure
 $MAKE test
+touch foo.lisp mu1.lisp mu2.lisp
+$MAKE all
+cat foo
+cat zardoz
+test "`cat foo`"    = "Linked foo from foo.fasl"
+test "`cat zardoz`" = "Linked zardoz from mu1.fasl mu2.fasl"
+
+:
diff --git a/tests/parallel-tests-dryrun.test b/tests/parallel-tests-dryrun.test
new file mode 100755
index 0000000..c79a293
--- /dev/null
+++ b/tests/parallel-tests-dryrun.test
@@ -0,0 +1,93 @@
+#! /bin/sh
+# Copyright (C) 2012 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# Check parallel-tests interactions with "make -n".
+
+parallel_tests=yes
+. ./defs || Exit 1
+
+set -e
+
+echo AC_OUTPUT >> configure.in
+
+cat > Makefile.am <<'END'
+TESTS = foo.test bar.test
+$(TESTS):
+END
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE -a
+
+./configure
+
+# Avoid confusion with test logs.
+rm -f config.log
+
+log_files='test-suite.log foo.log bar.log'
+html_files='test-suite.html foo.html bar.html'
+the_files="$log_files $html_files"
+
+all_exist ()
+{
+  st=0
+  for i in $*; do
+    test -f $i || { echo File $i not found; st=1; }
+  done
+  test $st -eq 0
+}
+
+none_exist ()
+{
+  st=0
+  for i in $*; do
+    { test -r $i || test -f $i; } && { echo File $i found; st=1; }
+  done
+  test $st -eq 0
+}
+
+for targ in check recheck check-html recheck-html $the_files; do
+  $MAKE -n "$targ"
+  none_exist $the_files
+done
+
+touch $the_files
+
+$MAKE -n mostlyclean
+all_exist $the_files
+$MAKE -n clean
+all_exist $the_files
+
+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
+
+$MAKE check && Exit 1
+
+for targ in recheck recheck-html clean mostlyclean distclean; do
+  $MAKE -n "$targ"
+  all_exist $the_files
+done
+
+:
diff --git a/tests/parallel-tests2.test b/tests/parallel-tests2.test
index 9cfe14f..78d5a76 100755
--- a/tests/parallel-tests2.test
+++ b/tests/parallel-tests2.test
@@ -76,14 +76,49 @@ env TESTS=foo.test $MAKE -e recheck-html >stdout || { cat 
stdout; Exit 1; }
 cat stdout
 test -f mylog.html
 
+# Create HTML output for an individual test.
+$MAKE foo.html
+grep 'this is .*foo\.test' foo.html
+test ! -f bar.html
+test ! -f baz.html
+
+# Create HTML output for individual tests.  Since the pre-existing log
+# files are expected to be used for the HTML conversion, this should
+# go smoothly even for failed tests.
+$MAKE bar.html baz.html
+grep 'this is .*bar\.test' bar.html
+grep 'this is .*baz\.test' baz.html
+
+# HTML output removed by mostlyclean.
+$MAKE mostlyclean
+test ! -f foo.html
+test ! -f bar.html
+test ! -f baz.html
+test ! -f mylog.html
+
 # check-html and recheck-html should cause check_SCRIPTS to be created,
 # and recheck-html should rerun no tests if check has not been run.
+
 $MAKE clean
+test ! -f mylog.html
 env TESTS=foo.test $MAKE -e check-html
 test -f bla
+test -f foo.log
+test ! -f bar.log
+test ! -f baz.log
+
 $MAKE clean
 env TESTS=foo.test $MAKE -e recheck-html
 test -f bla
 test ! -f foo.log
 test -f mylog.html
+
+$MAKE clean
+$MAKE recheck-html
+test -f bla
+test ! -f foo.log
+test ! -f bar.log
+test ! -f baz.log
+test -f mylog.html
+
 :
diff --git a/lib/Automake/tests/Condition-t.pl b/tests/pm/Condition-t.pl
similarity index 100%
rename from lib/Automake/tests/Condition-t.pl
rename to tests/pm/Condition-t.pl
diff --git a/lib/Automake/tests/Condition.pl b/tests/pm/Condition.pl
similarity index 100%
rename from lib/Automake/tests/Condition.pl
rename to tests/pm/Condition.pl
diff --git a/lib/Automake/tests/DisjConditions-t.pl 
b/tests/pm/DisjConditions-t.pl
similarity index 100%
rename from lib/Automake/tests/DisjConditions-t.pl
rename to tests/pm/DisjConditions-t.pl
diff --git a/lib/Automake/tests/DisjConditions.pl b/tests/pm/DisjConditions.pl
similarity index 100%
rename from lib/Automake/tests/DisjConditions.pl
rename to tests/pm/DisjConditions.pl
diff --git a/lib/Automake/tests/Version.pl b/tests/pm/Version.pl
similarity index 100%
rename from lib/Automake/tests/Version.pl
rename to tests/pm/Version.pl
diff --git a/lib/Automake/tests/Wrap.pl b/tests/pm/Wrap.pl
similarity index 100%
rename from lib/Automake/tests/Wrap.pl
rename to tests/pm/Wrap.pl
diff --git a/tests/pr300-lib.test b/tests/pr300-lib.test
index e10be24..d2ea942 100755
--- a/tests/pr300-lib.test
+++ b/tests/pr300-lib.test
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2002, 2007, 2010 Free Software Foundation, Inc.
+# Copyright (C) 2002, 2007, 2010, 2012 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -47,7 +47,12 @@ $ACLOCAL
 $AUTOCONF
 $AUTOMAKE -Wno-extra-portability --copy --add-missing
 
-./configure --prefix "`pwd`/inst"
+# We pass '--libdir' explicitly, to avoid spurious failures due to users
+# or distributions possibly overriding '${libdir}' in their $CONFIG_SITE
+# file (for example, defining it to '${prefix}/lib64' on 64-bit systems,
+# as is the case with openSUSE 12.1).  See automake bug#10426.
+cwd=`pwd` || Exit 99
+./configure --prefix "$cwd/inst" --libdir "$cwd/inst/lib"
 
 $MAKE
 
diff --git a/tests/pr300-ltlib.test b/tests/pr300-ltlib.test
index 5e8c052..6976683 100755
--- a/tests/pr300-ltlib.test
+++ b/tests/pr300-ltlib.test
@@ -1,6 +1,6 @@
 #! /bin/sh
-# Copyright (C) 2002, 2007, 2008, 2009, 2010 Free Software Foundation,
-# Inc.
+# Copyright (C) 2002, 2007, 2008, 2009, 2010, 2012 Free Software
+# Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -49,7 +49,12 @@ $ACLOCAL
 $AUTOCONF
 $AUTOMAKE -Wno-extra-portability --copy --add-missing
 
-./configure --prefix "`pwd`/inst"
+# We pass '--libdir' explicitly, to avoid spurious failures due to users
+# or distributions possibly overriding '${libdir}' in their $CONFIG_SITE
+# file (for example, defining it to '${prefix}/lib64' on 64-bit systems,
+# as is the case with openSUSE 12.1).  See automake bug#10426.
+cwd=`pwd` || Exit 99
+./configure --prefix "$cwd/inst" --libdir "$cwd/inst/lib"
 
 $MAKE V=1 >stdout || { cat stdout; Exit 1; }
 cat stdout
diff --git a/tests/primary-prefix-invalid-couples.test 
b/tests/primary-prefix-invalid-couples.test
index 16e9f43..60d509b 100755
--- a/tests/primary-prefix-invalid-couples.test
+++ b/tests/primary-prefix-invalid-couples.test
@@ -81,7 +81,7 @@ for primary in $primaries; do
       prefixes_ok='bin sbin libexec pkglibexec'
       ;;
     SCRIPTS)
-      prefixes_ok='bin sbin libexec pkgdata'
+      prefixes_ok='bin sbin libexec pkglibexec pkgdata'
       ;;
     DATA)
       prefixes_ok='data dataroot pkgdata doc html dvi pdf ps
diff --git a/tests/primary-prefix-valid-couples.test 
b/tests/primary-prefix-valid-couples.test
index 13520f2..47aac5e 100755
--- a/tests/primary-prefix-valid-couples.test
+++ b/tests/primary-prefix-valid-couples.test
@@ -59,7 +59,7 @@ for p in lib pkglib; do
   echo "${p}_LTLIBRARIES = libd-$p.la" >> Makefile.am
 done
 
-for p in bin sbin libexec pkgdata; do
+for p in bin sbin libexec pkglibexec pkgdata; do
   echo "${p}_SCRIPTS = $p.sh" >> Makefile.am
 done
 
diff --git a/tests/specflg7.test b/tests/specflg7.test
index 067a36d..e41b316 100755
--- a/tests/specflg7.test
+++ b/tests/specflg7.test
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2002, 2004  Free Software Foundation, Inc.
+# Copyright (C) 2002, 2004, 2012 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -59,5 +59,6 @@ $AUTOMAKE -a
 $MAKE
 ./true | grep true
 ./false | grep false
-test -f ./t-false.o
-test -f ./f-false.o
+objext=`sed -n -e 's/^OBJEXT = //p' < Makefile`
+test -f ./t-false.$objext
+test -f ./f-false.$objext
diff --git a/tests/specflg8.test b/tests/specflg8.test
index 79daa15..c5a30d7 100755
--- a/tests/specflg8.test
+++ b/tests/specflg8.test
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2002, 2004, 2011 Free Software Foundation, Inc.
+# Copyright (C) 2002, 2004, 2011, 2012 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -59,7 +59,8 @@ $MAKE
 ./true
 ./false && Exit 1
 
-test -f ./true-true.o
-test -f ./true-true.o
+objext=`sed -n -e 's/^OBJEXT = //p' < Makefile`
+test -f ./true-true.$objext
+test -f ./false-true.$objext
 
 :
diff --git a/tests/substref.test b/tests/substref.test
index 23dc168..6bbe8b1 100755
--- a/tests/substref.test
+++ b/tests/substref.test
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2001, 2002, 2010, 2011 Free Software Foundation, Inc.
+# Copyright (C) 2001, 2002, 2010, 2011, 2012 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -56,7 +56,8 @@ $AUTOMAKE -a
 
 ./configure
 
-echo dlmain.c dlmain.o >exp
+objext=`sed -n -e 's/^OBJEXT = //p' < Makefile`
+echo dlmain.c dlmain.$objext >exp
 $MAKE got
 cat got
 diff exp got
diff --git a/tests/suffix8.test b/tests/suffix8.test
index d2ba0d4..4110056 100755
--- a/tests/suffix8.test
+++ b/tests/suffix8.test
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2002, 2003, 2010 Free Software Foundation, Inc.
+# Copyright (C) 2002, 2003, 2010, 2012 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -41,6 +41,9 @@ libfoo_la_SOURCES = bar.x_
 .y_.o:
        cp $< $@
 
+.y_.obj:
+       cp $< $@
+
 .y_.z_:
        cp $< $@
 
diff --git a/tests/tar-override.test b/tests/tar-override.test
new file mode 100755
index 0000000..b08c9f8
--- /dev/null
+++ b/tests/tar-override.test
@@ -0,0 +1,67 @@
+#! /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 user can override the tar program used by "make dist"
+# at runtime, by redefining the `TAR' environment variable.
+# FIXME: currently this works only when the tar format used is `v7'
+# FIXME: (which is the default one).
+
+. ./defs || Exit 1
+
+set -e
+
+cwd=`pwd` || fatal_ "couldn't get current working directory"
+
+echo AC_OUTPUT >> configure.in
+
+cat > am--tar <<'END'
+#!/bin/sh
+echo $1 > am--tar-has-run
+shift
+exec tar "$@"
+END
+chmod a+x am--tar
+
+cat > Makefile.am <<'END'
+check-local: dist
+       test -f am--tar-has-run
+CLEANFILES = am--tar-has-run
+END
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE
+./configure
+
+$MAKE dist
+test -f $me-1.0.tar.gz
+ls | grep has-run && Exit 1
+
+rm -f *.tar.* *has-run*
+
+TAR="$cwd/am--tar foo" $MAKE distcheck
+test -f $me-1.0.tar.gz
+test "`cat am--tar-has-run`" = foo
+
+rm -f *.tar.* *has-run*
+
+TAR=; unset TAR
+# Creative use of eval to pacify maintainer checks.
+eval \$'MAKE dist "TAR=./am--tar mu"'
+test -f $me-1.0.tar.gz
+test "`cat am--tar-has-run`" = mu
+
+:
diff --git a/tests/transform2.test b/tests/transform2.test
index 0f9d5ec..07943bc 100755
--- a/tests/transform2.test
+++ b/tests/transform2.test
@@ -1,5 +1,6 @@
 #! /bin/sh
-# Copyright (C) 2002, 2003, 2004, 2007, 2008  Free Software Foundation, Inc.
+# Copyright (C) 2002, 2003, 2004, 2007, 2008, 2012 Free Software
+# Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -74,9 +75,23 @@ $MAKE uninstall
 test `find inst -type f -print | wc -l` = 0
 
 # Also squash all file types in question.
+
+# On newer Cygwin versions, that won't work, likely due to overly
+# aggressive appending of '.exe' suffix when copying/renaming Windows
+# executables).  So let's skip this part of the test if we detect the
+# faulty heuristic is present.  See also:
+# <http://lists.gnu.org/archive/html/automake-patches/2010-08/msg00153.html>
+# <http://thread.gmane.org/gmane.os.cygwin/119380>
+echo Foo > foo
+echo Bar > bar.exe
+chmod a+x foo bar.exe
+cp foo bar && cmp foo bar \
+  || skip_ "your Cygwin is too aggressive in tweaking '.exe' suffixes"
+
 ./configure --program-transform-name='s/.*/foo/' --prefix "`pwd`/inst" 
--mandir "`pwd`/inst/man"
 $MAKE
 $MAKE test-install-foo
 $MAKE uninstall
 test `find inst -type f -print | wc -l` = 0
+
 :
diff --git a/tests/vala-mix.test b/tests/vala-mix.test
new file mode 100755
index 0000000..73a07d9
--- /dev/null
+++ b/tests/vala-mix.test
@@ -0,0 +1,117 @@
+#! /bin/sh
+# Copyright (C) 2012 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# Vala sources and C sources in the same program.  Functional test.
+
+required='valac cc GNUmake'
+. ./defs || Exit 1
+
+set -e
+
+cat >> configure.in <<'END'
+AC_PROG_CC
+AM_PROG_CC_C_O
+AM_PROG_VALAC
+AC_OUTPUT
+END
+
+cat > Makefile.am <<'END'
+bin_PROGRAMS = zardoz mu
+AM_VALAFLAGS = --profile=posix
+zardoz_SOURCES = foo.vala bar.c
+mu_SOURCES = 1.vala 2.c
+mu_VALAFLAGS = $(AM_VALAFLAGS) --main=run
+mu_CFLAGS = -DHAVE_MU
+END
+
+if cross_compiling; then :; else
+  unindent >> Makefile.am <<'END'
+    check-local:
+       ./zardoz
+       ./mu
+       ./zardoz | grep "foo is alive"
+       ./mu | grep "Howdy, World!"
+END
+fi
+
+cat > foo.vala <<'END'
+int main ()
+{
+  stdout.printf ("foo is alive\n");
+  return 0;
+}
+END
+
+echo 'extern int i = 0;' > bar.c
+
+cat > 1.vala <<'END'
+int run ()
+{
+  stdout.printf ("Howdy, World!\n");
+  return 0;
+}
+END
+
+cat > 2.c <<'END'
+#ifdef HAVE_MU
+int all_is_ok = 1;
+#else
+#error "HAVE_MU no defined"
+chocke me
+#endif
+END
+
+$ACLOCAL
+$AUTOMAKE -a
+$AUTOCONF
+
+./configure
+
+$MAKE all
+ls -l # For debugging.
+$MAKE check
+
+have_generated_files ()
+{
+  test -f mu_vala.stamp
+  test -f zardoz_vala.stamp
+  test -f foo.c
+  test -f 1.c
+}
+
+# Our vala-related rules must create stamp files and intermediate
+# C files.
+have_generated_files
+
+# Remake rules are not uselessly triggered.
+$MAKE -q
+$MAKE -n | $FGREP vala.stamp && Exit 1
+
+# Check the distribution.
+$MAKE distcheck
+
+# Stamp files and intermediate C files should *not* be removed
+# by "make clean".
+$MAKE clean
+have_generated_files
+
+# But stamp files should be removed by "maintainer-clean" (the
+# behaviour w.r.t. intermediate C files is still unclear, and
+# better left undefined for the moment).
+$MAKE maintainer-clean
+ls *vala*.stamp | grep . && Exit 1
+
+:
diff --git a/tests/vala-mix2.test b/tests/vala-mix2.test
new file mode 100755
index 0000000..88d2818
--- /dev/null
+++ b/tests/vala-mix2.test
@@ -0,0 +1,121 @@
+#! /bin/sh
+# Copyright (C) 2012 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# Vala sources, C and C++ sources and C and C++ headers in the same
+# program.  Functional test.  See automake bug#10894.
+
+required='valac cc c++ GNUmake'
+. ./defs || Exit 1
+
+set -e
+
+cat >> configure.in <<'END'
+AC_PROG_CC
+AC_PROG_CXX
+AM_PROG_VALAC
+AC_OUTPUT
+END
+
+cat > Makefile.am <<'END'
+bin_PROGRAMS = zardoz
+AM_VALAFLAGS = --profile=posix
+zardoz_SOURCES = zardoz.vala foo.h bar.c baz.c zen.hh master.cxx
+END
+
+cat > zardoz.vala <<'END'
+int main ()
+{
+  stdout.printf ("foo is alive\n");
+  return 0;
+}
+END
+
+cat > foo.h <<'END'
+int foo;
+int bar (void);
+int baz (void);
+END
+
+cat > bar.c <<'END'
+#include "foo.h"
+int bar (void) { return foo + baz (); }
+END
+
+cat > baz.c <<'END'
+#include "foo.h"
+extern int foo = 0;
+int baz (void) { return 0; }
+END
+
+cat > zen.hh <<'END'
+#include <iostream>
+END
+
+cat > master.cxx <<'END'
+#include "zen.hh"
+void chatty (void) { std::cout << "Hello, stranger!\n"; }
+END
+
+$ACLOCAL
+$AUTOMAKE -a
+$AUTOCONF
+
+./configure
+
+$MAKE all
+ls -l # For debugging.
+
+have_generated_files ()
+{
+  test -f zardoz_vala.stamp
+  test -f zardoz.c
+}
+
+# Our vala-related rules must create stamp files and intermediate
+# C files.
+have_generated_files
+
+# Remake rules are not uselessly triggered.
+$MAKE -q
+$MAKE -n | $FGREP vala.stamp && Exit 1
+
+# But are triggered when they should.
+for file in zardoz.vala foo.h bar.c baz.c zen.hh master.cxx; do
+  $sleep
+  echo '& choke me !' >> $file
+  $MAKE && Exit 1
+  $sleep
+  sed '$d' $file > t
+  mv -f t $file
+  $MAKE
+done
+
+# Check the distribution.
+$MAKE distcheck
+
+# Stamp files and intermediate C files should *not* be removed
+# by "make clean".
+$MAKE clean
+ls -l # For debugging.
+have_generated_files
+
+# But stamp files should be removed by "maintainer-clean" (the
+# behaviour w.r.t. intermediate C files is still unclear, and
+# better left undefined for the moment).
+$MAKE maintainer-clean
+ls *vala*.stamp | grep . && Exit 1
+
+:
diff --git a/tests/vala-vpath.test b/tests/vala-vpath.test
index 98e0f43..8f2b677 100755
--- a/tests/vala-vpath.test
+++ b/tests/vala-vpath.test
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2011 Free Software Foundation, Inc.
+# Copyright (C) 2011, 2012 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -17,13 +17,11 @@
 # Test to make sure vala support handles from-scratch VPATH builds.
 # See automake bug#8753.
 
-required="valac"
+required="valac GNUmake"
 . ./defs || Exit 1
 
 set -e
 
-mkdir src
-
 cat >> configure.in << 'END'
 AC_CONFIG_SRCDIR([hello.vala])
 AC_PROG_CC
@@ -31,17 +29,16 @@ AM_PROG_VALAC([0.7])
 AC_OUTPUT
 END
 
-
 cat > Makefile.am <<'END'
 bin_PROGRAMS = foo
+foo_VALAFLAGS = --profile=posix
 foo_SOURCES = hello.vala
 END
 
 cat > hello.vala <<'END'
 void main ()
 {
-  stdout.printf ("foo\n");
-  return 0;
+  stdout.printf ("foofoofoo\n");
 }
 END
 
@@ -53,6 +50,23 @@ mkdir build
 cd build
 ../configure || Exit 77
 $MAKE
+grep foofoofoo ../hello.c
 $MAKE distcheck
 
+# Rebuild rules work also in VPATH builds.
+cat > ../hello.vala <<'END'
+int main ()
+{
+  stdout.printf ("barbarbar\n");
+  return 0;
+}
+END
+
+$MAKE
+grep barbarbar ../hello.c
+
+# Rebuild rules are not uselessly triggered.
+$MAKE -q
+$MAKE -n | grep '\.stamp' && Exit 1
+
 :
diff --git a/tests/vala.test b/tests/vala.test
index 34b71d4..2c7dae1 100755
--- a/tests/vala.test
+++ b/tests/vala.test
@@ -1,6 +1,6 @@
 #! /bin/sh
-# Copyright (C) 1996, 2001, 2002, 2006, 2008, 2009
-# Free Software Foundation, Inc.
+# Copyright (C) 1996, 2001, 2002, 2006, 2008, 2009, 2012 Free Software
+# Foundation, Inc.
 #
 # This file is part of GNU Automake.
 #
@@ -19,22 +19,31 @@
 # the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
 # Boston, MA 02110-1301, USA.
 
-# Test to make sure intermediate .c files are built from vala source.
+# Basic "grepping" test on vala support.
 
-required="libtool"
 . ./defs || Exit 1
 
 set -e
 
-cat >> 'configure.in' << 'END'
+# So that we won't require libtool macros.
+cat > acinclude.m4 <<'END'
+AC_DEFUN([AC_PROG_LIBTOOL],
+         [AC_SUBST([LIBTOOL], [:])])
+END
+
+cat >> configure.in <<'END'
 AC_PROG_CC
+AC_PROG_CXX
 AM_PROG_AR
 AC_PROG_LIBTOOL
 AM_PROG_VALAC
+AC_CONFIG_FILES([sub/Makefile])
 AC_OUTPUT
 END
 
-cat > 'Makefile.am' <<'END'
+cat > Makefile.am <<'END'
+SUBDIRS = sub
+
 bin_PROGRAMS = zardoz
 zardoz_SOURCES = zardoz.vala
 zardoz_VALAFLAGS = --debug
@@ -43,6 +52,13 @@ lib_LTLIBRARIES = libzardoz.la
 libzardoz_la_SOURCES = zardoz-foo.vala zardoz-bar.vala
 END
 
+mkdir sub
+
+cat > sub/Makefile.am <<'END'
+bin_PROGRAMS = foo
+foo_SOURCES = bar.vala baz.vala mu.c zap.cxx
+END
+
 : > ltmain.sh
 : > config.sub
 : > config.guess
@@ -50,11 +66,28 @@ END
 $ACLOCAL
 $AUTOMAKE -a
 
-grep 'VALAC' Makefile.in
-grep 'am_zardoz_OBJECTS' Makefile.in
-grep 'am_libzardoz_la_OBJECTS' Makefile.in
-grep 'zardoz_vala.stamp' Makefile.in
-grep 'libzardoz_la_vala.stamp' Makefile.in
-grep 'zardoz\.c' Makefile.in
-grep 'zardoz-foo\.c' Makefile.in
+grep '\$(VALAC).* \$(AM_VALAFLAGS) \$(VALAFLAGS) ' Makefile.in
+grep '\$(VALAC).* \$(zardoz_VALAFLAGS) \$(VALAFLAGS) ' Makefile.in
+$FGREP 'am_zardoz_OBJECTS' Makefile.in
+$FGREP 'am_libzardoz_la_OBJECTS' Makefile.in
+$FGREP 'zardoz_vala.stamp:' Makefile.in
+$FGREP 'libzardoz_la_vala.stamp:' Makefile.in
+test `$FGREP -c '.stamp:' Makefile.in` -eq 2
+$FGREP 'zardoz.c' Makefile.in
+$FGREP 'zardoz-foo.c' Makefile.in
+$FGREP 'zardoz-bar.c' Makefile.in
+
+grep '\$(VALAC).* \$(AM_VALAFLAGS) \$(VALAFLAGS) ' sub/Makefile.in
+$FGREP 'foo_VALAFLAGS' sub/Makefile.in && Exit 1
+$FGREP 'am_foo_OBJECTS' sub/Makefile.in
+$FGREP 'bar.c' sub/Makefile.in
+$FGREP 'baz.c' sub/Makefile.in
+$FGREP 'foo_vala.stamp:' sub/Makefile.in
+test `$FGREP -c '.stamp:' sub/Makefile.in` -eq 1
+
+# Check against regression for weird bug due to unescaped '@'
+# characters used in a "..." perl string when writing the vala
+# rules from automake.in.
+grep '\$[0-9][0-9]*t' Makefile.in sub/Makefile.in && Exit 1
 
+:
diff --git a/tests/vala2.test b/tests/vala2.test
index e559540..a8a3d90 100755
--- a/tests/vala2.test
+++ b/tests/vala2.test
@@ -81,7 +81,14 @@ cd build
 $MAKE
 $MAKE distcheck
 
-# test rebuild rules from builddir
-touch ../src/zardoz.vala
+# Test rebuild rules from builddir.
+rm -f ../src/zardoz.c
 $MAKE
+grep 'Zardoz!' ../src/zardoz.c
+sed 's/Zardoz!/FooBar!/' ../src/zardoz.c > t
+mv -f t ../src/zardoz.c
+$MAKE
+grep 'FooBar!' ../src/zardoz.c
+grep 'Zardoz!' ../src/zardoz.c && Exit 1
 
+:
diff --git a/tests/vala5.test b/tests/vala5.test
index 8fc703c..2206b25 100755
--- a/tests/vala5.test
+++ b/tests/vala5.test
@@ -1,6 +1,6 @@
 #! /bin/sh
-# Copyright (C) 1996, 2001, 2002, 2006, 2008, 2009
-# Free Software Foundation, Inc.
+# Copyright (C) 1996, 2001, 2002, 2006, 2008, 2009, 2012 Free Software
+# Foundation, Inc.
 #
 # This file is part of GNU Automake.
 #
@@ -21,54 +21,70 @@
 
 # Test per-target flags.
 
-required="libtool libtoolize pkg-config valac gcc GNUmake"
+required="pkg-config valac gcc GNUmake"
 . ./defs || Exit 1
 
 set -e
 
 mkdir src
 
-cat >> 'configure.in' << 'END'
+cat >> configure.in <<'END'
 AC_PROG_CC
 AM_PROG_CC_C_O
-AC_PROG_LIBTOOL
 AM_PROG_VALAC([0.7.0])
-PKG_CHECK_MODULES([GOBJECT],[gobject-2.0 >= 2.10])
+PKG_CHECK_MODULES([GOBJECT], [gobject-2.0 >= 2.10])
 AC_CONFIG_FILES([src/Makefile])
 AC_OUTPUT
 END
 
-cat > 'Makefile.am' <<'END'
+cat > Makefile.am <<'END'
 SUBDIRS = src
 END
 
-cat > 'src/Makefile.am' <<'END'
+cat > src/Makefile.am <<'END'
 bin_PROGRAMS = foo bar
 foo_CFLAGS = $(GOBJECT_CFLAGS)
 foo_LDADD = $(GOBJECT_LIBS)
-foo_SOURCES = baz.vala
-bar_SOURCES = baz.vala
+foo_SOURCES = xfoo.vala
+bar_SOURCES = xbar.vala
 bar_VALAFLAGS = -D BAR
 bar_CFLAGS = $(GOBJECT_CFLAGS)
 bar_LDADD = $(GOBJECT_LIBS)
 END
 
-cat > 'src/baz.vala' <<'END'
-void main () {
+cat > src/xfoo.vala <<'END'
+int main ()
+{
+  stdout.printf ("foo\n");
+  return 0;
+}
+END
+
+cat > src/xbar.vala <<'END'
+void main ()
+{
 #if BAR
   stdout.printf ("bar\n");
 #else
-  stdout.printf ("foo\n");
+  stdout.oops_an_invalid_method ();
 #endif
 }
 END
 
-libtoolize
-
 $ACLOCAL
 $AUTOCONF
 $AUTOMAKE -a
 
-./configure || Exit 77
+grep PKG_CHECK_MODULES configure && skip_ "pkg-config m4 macros not found"
+
+./configure
 $MAKE
 
+if cross_compiling; then :; else
+  ./src/foo
+  ./src/bar
+  test `./src/foo` = foo
+  test `./src/bar` = bar
+fi
+
+:


hooks/post-receive
-- 
GNU Automake



reply via email to

[Prev in Thread] Current Thread [Next in Thread]